VandenBroeck and Keller, Equation (23)

Percentage Accurate: 76.3% → 99.5%
Time: 7.3s
Alternatives: 32
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 32 alternatives:

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

Initial Program: 76.3% 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.5% accurate, 0.9× speedup?

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

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

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


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

    1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.20000000000000007e154 < F < 7e3

    1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

    if 7e3 < F

    1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 95.8% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 76.3%

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

      \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
    3. Step-by-step derivation
      1. Applied rewrites49.3%

        \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
      2. Applied rewrites49.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto F \cdot \frac{-1}{F \cdot \color{blue}{\sin B}} - \frac{x}{B} \]
        3. lower-sin.f6435.4

          \[\leadsto F \cdot \frac{-1}{F \cdot \sin B} - \frac{x}{B} \]
      7. Applied rewrites35.4%

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

      if -2.89999999999999988e157 < F < 7e3

      1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

      if 7e3 < F

      1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 3: 95.8% accurate, 1.0× speedup?

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

      1. Initial program 76.3%

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

        \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
      3. Step-by-step derivation
        1. Applied rewrites49.3%

          \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
        2. Applied rewrites49.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto F \cdot \frac{-1}{F \cdot \color{blue}{\sin B}} - \frac{x}{B} \]
          3. lower-sin.f6435.4

            \[\leadsto F \cdot \frac{-1}{F \cdot \sin B} - \frac{x}{B} \]
        7. Applied rewrites35.4%

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

        if -2.89999999999999988e157 < F < 1.2e20

        1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\frac{-1}{2}}}{\cos B} - x}{\tan B} \]
          11. lower-cos.f6484.7

            \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5}}{\cos B} - x}{\tan B} \]
        6. Applied rewrites84.7%

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

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

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

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

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

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

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

            \[\leadsto \frac{\frac{{\left(2 + \left({F}^{2} + 2 \cdot x\right)\right)}^{\frac{-1}{2}} \cdot F}{\cos B} - x}{\tan B} \]
          8. associate-+l+N/A

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

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

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

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

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

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

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

        if 1.2e20 < F

        1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 4: 94.4% accurate, 1.0× speedup?

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

        1. Initial program 76.3%

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

          \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
        3. Step-by-step derivation
          1. Applied rewrites49.3%

            \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
          2. Applied rewrites49.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if -1.1999999999999999e129 < F < 7e3

          1. Initial program 76.3%

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

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

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

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

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

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

            \[\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 7e3 < F

          1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 5: 92.3% accurate, 1.1× speedup?

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

          1. Initial program 76.3%

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

            \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
          3. Step-by-step derivation
            1. Applied rewrites49.3%

              \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
            2. Applied rewrites49.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if -4.0999999999999996 < F < 1.79999999999999997e-7

            1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

              if 1.79999999999999997e-7 < F

              1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 6: 92.2% accurate, 1.1× speedup?

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

              1. Initial program 76.3%

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

                \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
              3. Step-by-step derivation
                1. Applied rewrites49.3%

                  \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                2. Applied rewrites49.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if -4.0999999999999996 < F < 1.79999999999999997e-7

                1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {2}^{\color{blue}{\frac{-1}{2}}} \]
                6. Step-by-step derivation
                  1. lower-pow.f6456.8

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

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

                if 1.79999999999999997e-7 < F

                1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              Alternative 7: 85.7% accurate, 1.1× speedup?

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

                1. Initial program 76.3%

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

                  \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                3. Step-by-step derivation
                  1. Applied rewrites49.3%

                    \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                  2. Applied rewrites49.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto F \cdot \frac{-1}{F \cdot \color{blue}{\sin B}} - \frac{x}{B} \]
                    3. lower-sin.f6435.4

                      \[\leadsto F \cdot \frac{-1}{F \cdot \sin B} - \frac{x}{B} \]
                  7. Applied rewrites35.4%

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

                  if -8.9999999999999997e151 < F < -6e-73

                  1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  if -6e-73 < F < 1.70000000000000004e-140

                  1. Initial program 76.3%

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

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

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

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

                  if 1.70000000000000004e-140 < F < 5e19

                  1. Initial program 76.3%

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

                    \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                  3. Step-by-step derivation
                    1. Applied rewrites49.3%

                      \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                    2. Applied rewrites49.4%

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

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

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

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

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

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

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

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

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

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

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

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

                    if 5e19 < F

                    1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  Alternative 8: 85.7% accurate, 1.2× speedup?

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

                    1. Initial program 76.3%

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

                      \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                    3. Step-by-step derivation
                      1. Applied rewrites49.3%

                        \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                      2. Applied rewrites49.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto F \cdot \frac{-1}{F \cdot \color{blue}{\sin B}} - \frac{x}{B} \]
                        3. lower-sin.f6435.4

                          \[\leadsto F \cdot \frac{-1}{F \cdot \sin B} - \frac{x}{B} \]
                      7. Applied rewrites35.4%

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

                      if -4.00000000000000015e154 < F < -6e-73

                      1. Initial program 76.3%

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

                        \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                      3. Step-by-step derivation
                        1. Applied rewrites49.3%

                          \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                        2. Applied rewrites49.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        if -6e-73 < F < 1.70000000000000004e-140

                        1. Initial program 76.3%

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

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

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

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

                        if 1.70000000000000004e-140 < F < 5e19

                        1. Initial program 76.3%

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

                          \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                        3. Step-by-step derivation
                          1. Applied rewrites49.3%

                            \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                          2. Applied rewrites49.4%

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

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

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

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

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

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

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

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

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

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

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

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

                          if 5e19 < F

                          1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        Alternative 9: 85.7% accurate, 1.2× speedup?

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

                          1. Initial program 76.3%

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

                            \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                          3. Step-by-step derivation
                            1. Applied rewrites49.3%

                              \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                            2. Applied rewrites49.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto F \cdot \frac{-1}{F \cdot \color{blue}{\sin B}} - \frac{x}{B} \]
                              3. lower-sin.f6435.4

                                \[\leadsto F \cdot \frac{-1}{F \cdot \sin B} - \frac{x}{B} \]
                            7. Applied rewrites35.4%

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

                            if -4.00000000000000015e154 < F < -6e-73

                            1. Initial program 76.3%

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

                              \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                            3. Step-by-step derivation
                              1. Applied rewrites49.3%

                                \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                              2. Applied rewrites49.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              if -6e-73 < F < 1.70000000000000004e-140

                              1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

                              if 1.70000000000000004e-140 < F < 5e19

                              1. Initial program 76.3%

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

                                \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                              3. Step-by-step derivation
                                1. Applied rewrites49.3%

                                  \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                2. Applied rewrites49.4%

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

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

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

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

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

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

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

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

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

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

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

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

                                if 5e19 < F

                                1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              Alternative 10: 79.6% accurate, 1.3× speedup?

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

                                1. Initial program 76.3%

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

                                  \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                3. Step-by-step derivation
                                  1. Applied rewrites49.3%

                                    \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                  2. Applied rewrites49.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      \[\leadsto F \cdot \frac{-1}{F \cdot \color{blue}{\sin B}} - \frac{x}{B} \]
                                    3. lower-sin.f6435.4

                                      \[\leadsto F \cdot \frac{-1}{F \cdot \sin B} - \frac{x}{B} \]
                                  7. Applied rewrites35.4%

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

                                  if -4.00000000000000015e154 < F < -6e-73

                                  1. Initial program 76.3%

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

                                    \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                  3. Step-by-step derivation
                                    1. Applied rewrites49.3%

                                      \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                    2. Applied rewrites49.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    if -6e-73 < F < 1.70000000000000004e-140

                                    1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    if 1.70000000000000004e-140 < F < 1e94

                                    1. Initial program 76.3%

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

                                      \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                    3. Step-by-step derivation
                                      1. Applied rewrites49.3%

                                        \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                      2. Applied rewrites49.4%

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

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

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

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

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

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

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

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

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

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

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

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

                                      if 1e94 < F

                                      1. Initial program 76.3%

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

                                        \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                      3. Step-by-step derivation
                                        1. Applied rewrites49.3%

                                          \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                        2. Applied rewrites49.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                            \[\leadsto F \cdot \frac{1}{F \cdot \color{blue}{\sin B}} - \frac{x}{B} \]
                                          3. lower-sin.f6432.3

                                            \[\leadsto F \cdot \frac{1}{F \cdot \sin B} - \frac{x}{B} \]
                                        7. Applied rewrites32.3%

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

                                      Alternative 11: 77.3% accurate, 1.3× speedup?

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

                                        1. Initial program 76.3%

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

                                          \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                        3. Step-by-step derivation
                                          1. Applied rewrites49.3%

                                            \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                          2. Applied rewrites49.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                              \[\leadsto F \cdot \frac{-1}{F \cdot \color{blue}{\sin B}} - \frac{x}{B} \]
                                            3. lower-sin.f6435.4

                                              \[\leadsto F \cdot \frac{-1}{F \cdot \sin B} - \frac{x}{B} \]
                                          7. Applied rewrites35.4%

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

                                          if -4.00000000000000015e154 < F < -7.40000000000000008e-178

                                          1. Initial program 76.3%

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

                                            \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                          3. Step-by-step derivation
                                            1. Applied rewrites49.3%

                                              \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                            2. Step-by-step derivation
                                              1. lift-+.f64N/A

                                                \[\leadsto \color{blue}{\left(-x \cdot \frac{1}{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}{B}\right)} \]
                                            3. Applied rewrites57.7%

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

                                            if -7.40000000000000008e-178 < F < 8.0999999999999998e-143

                                            1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                            if 8.0999999999999998e-143 < F < 1e94

                                            1. Initial program 76.3%

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

                                              \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                            3. Step-by-step derivation
                                              1. Applied rewrites49.3%

                                                \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                              2. Applied rewrites49.4%

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

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

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

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

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

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

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

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

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

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

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

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

                                              if 1e94 < F

                                              1. Initial program 76.3%

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

                                                \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                              3. Step-by-step derivation
                                                1. Applied rewrites49.3%

                                                  \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                                2. Applied rewrites49.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                    \[\leadsto F \cdot \frac{1}{F \cdot \color{blue}{\sin B}} - \frac{x}{B} \]
                                                  3. lower-sin.f6432.3

                                                    \[\leadsto F \cdot \frac{1}{F \cdot \sin B} - \frac{x}{B} \]
                                                7. Applied rewrites32.3%

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

                                              Alternative 12: 77.2% accurate, 1.3× speedup?

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

                                                1. Initial program 76.3%

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

                                                  \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                                3. Step-by-step derivation
                                                  1. Applied rewrites49.3%

                                                    \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                                  2. Applied rewrites49.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                      \[\leadsto F \cdot \frac{-1}{F \cdot \color{blue}{\sin B}} - \frac{x}{B} \]
                                                    3. lower-sin.f6435.4

                                                      \[\leadsto F \cdot \frac{-1}{F \cdot \sin B} - \frac{x}{B} \]
                                                  7. Applied rewrites35.4%

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

                                                  if -4.00000000000000015e154 < F < -7.40000000000000008e-178

                                                  1. Initial program 76.3%

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

                                                    \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                                  3. Step-by-step derivation
                                                    1. Applied rewrites49.3%

                                                      \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                                    2. Applied rewrites49.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                    if -7.40000000000000008e-178 < F < 8.0999999999999998e-143

                                                    1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                    if 8.0999999999999998e-143 < F < 1e94

                                                    1. Initial program 76.3%

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

                                                      \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                                    3. Step-by-step derivation
                                                      1. Applied rewrites49.3%

                                                        \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                                      2. Applied rewrites49.4%

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

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

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

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

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

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

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

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

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

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

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

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

                                                      if 1e94 < F

                                                      1. Initial program 76.3%

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

                                                        \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                                      3. Step-by-step derivation
                                                        1. Applied rewrites49.3%

                                                          \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                                        2. Applied rewrites49.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                            \[\leadsto F \cdot \frac{1}{F \cdot \color{blue}{\sin B}} - \frac{x}{B} \]
                                                          3. lower-sin.f6432.3

                                                            \[\leadsto F \cdot \frac{1}{F \cdot \sin B} - \frac{x}{B} \]
                                                        7. Applied rewrites32.3%

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

                                                      Alternative 13: 77.2% accurate, 1.3× speedup?

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

                                                        1. Initial program 76.3%

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

                                                          \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                                        3. Step-by-step derivation
                                                          1. Applied rewrites49.3%

                                                            \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                                          2. Applied rewrites49.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                          if -1.99999999999999993e118 < F < -7.40000000000000008e-178 or 8.0999999999999998e-143 < F < 1e94

                                                          1. Initial program 76.3%

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

                                                            \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                                          3. Step-by-step derivation
                                                            1. Applied rewrites49.3%

                                                              \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                                            2. Applied rewrites49.4%

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

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

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

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

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

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

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

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

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

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

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

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

                                                            if -7.40000000000000008e-178 < F < 8.0999999999999998e-143

                                                            1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                            if 1e94 < F

                                                            1. Initial program 76.3%

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

                                                              \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                                            3. Step-by-step derivation
                                                              1. Applied rewrites49.3%

                                                                \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                                              2. Applied rewrites49.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                  \[\leadsto F \cdot \frac{1}{F \cdot \color{blue}{\sin B}} - \frac{x}{B} \]
                                                                3. lower-sin.f6432.3

                                                                  \[\leadsto F \cdot \frac{1}{F \cdot \sin B} - \frac{x}{B} \]
                                                              7. Applied rewrites32.3%

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

                                                            Alternative 14: 77.2% accurate, 1.3× speedup?

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

                                                              1. Initial program 76.3%

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

                                                                \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                                              3. Step-by-step derivation
                                                                1. Applied rewrites49.3%

                                                                  \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                                                2. Applied rewrites49.4%

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

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

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

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

                                                                    \[\leadsto \frac{F \cdot \color{blue}{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}}}}{\sin B} - \frac{x}{B} \]
                                                                  5. lift-fma.f64N/A

                                                                    \[\leadsto \frac{F \cdot {\left(\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F + 2}\right)\right)}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                  6. lift-fma.f64N/A

                                                                    \[\leadsto \frac{F \cdot {\color{blue}{\left(x \cdot 2 + \left(F \cdot F + 2\right)\right)}}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                  7. add-flipN/A

                                                                    \[\leadsto \frac{F \cdot {\color{blue}{\left(x \cdot 2 - \left(\mathsf{neg}\left(\left(F \cdot F + 2\right)\right)\right)\right)}}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                  8. *-commutativeN/A

                                                                    \[\leadsto \frac{F \cdot {\left(\color{blue}{2 \cdot x} - \left(\mathsf{neg}\left(\left(F \cdot F + 2\right)\right)\right)\right)}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                  9. add-flipN/A

                                                                    \[\leadsto \frac{F \cdot {\color{blue}{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                  10. +-commutativeN/A

                                                                    \[\leadsto \frac{F \cdot {\color{blue}{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                  11. associate-/l*N/A

                                                                    \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\frac{-1}{2}}}{\sin B}} - \frac{x}{B} \]
                                                                  12. lower-*.f64N/A

                                                                    \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\frac{-1}{2}}}{\sin B}} - \frac{x}{B} \]
                                                                  13. lower-/.f64N/A

                                                                    \[\leadsto F \cdot \color{blue}{\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\frac{-1}{2}}}{\sin B}} - \frac{x}{B} \]
                                                                4. Applied rewrites57.7%

                                                                  \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B}} - \frac{x}{B} \]
                                                                5. Taylor expanded in F around -inf

                                                                  \[\leadsto F \cdot \frac{\color{blue}{\frac{-1}{F}}}{\sin B} - \frac{x}{B} \]
                                                                6. Step-by-step derivation
                                                                  1. lower-/.f6435.4

                                                                    \[\leadsto F \cdot \frac{\frac{-1}{\color{blue}{F}}}{\sin B} - \frac{x}{B} \]
                                                                7. Applied rewrites35.4%

                                                                  \[\leadsto F \cdot \frac{\color{blue}{\frac{-1}{F}}}{\sin B} - \frac{x}{B} \]

                                                                if -6.8e9 < F < -7.40000000000000008e-178 or 8.0999999999999998e-143 < F < 7e3

                                                                1. Initial program 76.3%

                                                                  \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                2. Taylor expanded in B around 0

                                                                  \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                                                3. Step-by-step derivation
                                                                  1. Applied rewrites49.3%

                                                                    \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                                                  2. Applied rewrites49.4%

                                                                    \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} - \frac{x}{B}} \]

                                                                  if -7.40000000000000008e-178 < F < 8.0999999999999998e-143

                                                                  1. Initial program 76.3%

                                                                    \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                  2. Step-by-step derivation
                                                                    1. lift-+.f64N/A

                                                                      \[\leadsto \color{blue}{\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
                                                                    2. +-commutativeN/A

                                                                      \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
                                                                    3. lift-neg.f64N/A

                                                                      \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \color{blue}{\left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)} \]
                                                                    4. sub-flip-reverseN/A

                                                                      \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - x \cdot \frac{1}{\tan B}} \]
                                                                    5. lift-*.f64N/A

                                                                      \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \color{blue}{x \cdot \frac{1}{\tan B}} \]
                                                                    6. lift-/.f64N/A

                                                                      \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - x \cdot \color{blue}{\frac{1}{\tan B}} \]
                                                                    7. mult-flip-revN/A

                                                                      \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \color{blue}{\frac{x}{\tan B}} \]
                                                                    8. sub-to-fractionN/A

                                                                      \[\leadsto \color{blue}{\frac{\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right) \cdot \tan B - x}{\tan B}} \]
                                                                    9. lower-/.f64N/A

                                                                      \[\leadsto \color{blue}{\frac{\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right) \cdot \tan B - x}{\tan B}} \]
                                                                  3. Applied rewrites76.4%

                                                                    \[\leadsto \color{blue}{\frac{\left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \frac{F}{\sin B}\right) \cdot \tan B - x}{\tan B}} \]
                                                                  4. Taylor expanded in F around 0

                                                                    \[\leadsto \frac{\color{blue}{-1 \cdot x}}{\tan B} \]
                                                                  5. Step-by-step derivation
                                                                    1. lower-*.f6455.6

                                                                      \[\leadsto \frac{-1 \cdot \color{blue}{x}}{\tan B} \]
                                                                  6. Applied rewrites55.6%

                                                                    \[\leadsto \frac{\color{blue}{-1 \cdot x}}{\tan B} \]

                                                                  if 7e3 < F

                                                                  1. Initial program 76.3%

                                                                    \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                  2. Taylor expanded in B around 0

                                                                    \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                                                  3. Step-by-step derivation
                                                                    1. Applied rewrites49.3%

                                                                      \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                                                    2. Applied rewrites49.4%

                                                                      \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} - \frac{x}{B}} \]
                                                                    3. Step-by-step derivation
                                                                      1. lift-*.f64N/A

                                                                        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}}} - \frac{x}{B} \]
                                                                      2. lift-/.f64N/A

                                                                        \[\leadsto \color{blue}{\frac{F}{\sin B}} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}} - \frac{x}{B} \]
                                                                      3. associate-*l/N/A

                                                                        \[\leadsto \color{blue}{\frac{F \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}}}{\sin B}} - \frac{x}{B} \]
                                                                      4. lift-pow.f64N/A

                                                                        \[\leadsto \frac{F \cdot \color{blue}{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}}}}{\sin B} - \frac{x}{B} \]
                                                                      5. lift-fma.f64N/A

                                                                        \[\leadsto \frac{F \cdot {\left(\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F + 2}\right)\right)}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                      6. lift-fma.f64N/A

                                                                        \[\leadsto \frac{F \cdot {\color{blue}{\left(x \cdot 2 + \left(F \cdot F + 2\right)\right)}}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                      7. add-flipN/A

                                                                        \[\leadsto \frac{F \cdot {\color{blue}{\left(x \cdot 2 - \left(\mathsf{neg}\left(\left(F \cdot F + 2\right)\right)\right)\right)}}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                      8. *-commutativeN/A

                                                                        \[\leadsto \frac{F \cdot {\left(\color{blue}{2 \cdot x} - \left(\mathsf{neg}\left(\left(F \cdot F + 2\right)\right)\right)\right)}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                      9. add-flipN/A

                                                                        \[\leadsto \frac{F \cdot {\color{blue}{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                      10. +-commutativeN/A

                                                                        \[\leadsto \frac{F \cdot {\color{blue}{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                      11. associate-/l*N/A

                                                                        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\frac{-1}{2}}}{\sin B}} - \frac{x}{B} \]
                                                                      12. lower-*.f64N/A

                                                                        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\frac{-1}{2}}}{\sin B}} - \frac{x}{B} \]
                                                                      13. lower-/.f64N/A

                                                                        \[\leadsto F \cdot \color{blue}{\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\frac{-1}{2}}}{\sin B}} - \frac{x}{B} \]
                                                                    4. Applied rewrites57.7%

                                                                      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B}} - \frac{x}{B} \]
                                                                    5. Taylor expanded in F around inf

                                                                      \[\leadsto F \cdot \color{blue}{\frac{1}{F \cdot \sin B}} - \frac{x}{B} \]
                                                                    6. Step-by-step derivation
                                                                      1. lower-/.f64N/A

                                                                        \[\leadsto F \cdot \frac{1}{\color{blue}{F \cdot \sin B}} - \frac{x}{B} \]
                                                                      2. lower-*.f64N/A

                                                                        \[\leadsto F \cdot \frac{1}{F \cdot \color{blue}{\sin B}} - \frac{x}{B} \]
                                                                      3. lower-sin.f6432.3

                                                                        \[\leadsto F \cdot \frac{1}{F \cdot \sin B} - \frac{x}{B} \]
                                                                    7. Applied rewrites32.3%

                                                                      \[\leadsto F \cdot \color{blue}{\frac{1}{F \cdot \sin B}} - \frac{x}{B} \]
                                                                  4. Recombined 4 regimes into one program.
                                                                  5. Add Preprocessing

                                                                  Alternative 15: 76.5% accurate, 1.4× speedup?

                                                                  \[\begin{array}{l} \mathbf{if}\;F \leq -0.58:\\ \;\;\;\;F \cdot \frac{\frac{-1}{F}}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq -7.4 \cdot 10^{-178}:\\ \;\;\;\;\frac{F}{\sin B} \cdot {\left(\mathsf{fma}\left(x, 2, 2\right)\right)}^{-0.5} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 8.1 \cdot 10^{-143}:\\ \;\;\;\;\frac{-1 \cdot x}{\tan B}\\ \mathbf{elif}\;F \leq 1.8 \cdot 10^{-7}:\\ \;\;\;\;\frac{F \cdot {\left(2 + 2 \cdot x\right)}^{-0.5}}{\sin B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;F \cdot \frac{1}{F \cdot \sin B} - \frac{x}{B}\\ \end{array} \]
                                                                  (FPCore (F B x)
                                                                   :precision binary64
                                                                   (if (<= F -0.58)
                                                                     (- (* F (/ (/ -1.0 F) (sin B))) (/ x B))
                                                                     (if (<= F -7.4e-178)
                                                                       (- (* (/ F (sin B)) (pow (fma x 2.0 2.0) -0.5)) (/ x B))
                                                                       (if (<= F 8.1e-143)
                                                                         (/ (* -1.0 x) (tan B))
                                                                         (if (<= F 1.8e-7)
                                                                           (- (/ (* F (pow (+ 2.0 (* 2.0 x)) -0.5)) (sin B)) (/ x B))
                                                                           (- (* F (/ 1.0 (* F (sin B)))) (/ x B)))))))
                                                                  double code(double F, double B, double x) {
                                                                  	double tmp;
                                                                  	if (F <= -0.58) {
                                                                  		tmp = (F * ((-1.0 / F) / sin(B))) - (x / B);
                                                                  	} else if (F <= -7.4e-178) {
                                                                  		tmp = ((F / sin(B)) * pow(fma(x, 2.0, 2.0), -0.5)) - (x / B);
                                                                  	} else if (F <= 8.1e-143) {
                                                                  		tmp = (-1.0 * x) / tan(B);
                                                                  	} else if (F <= 1.8e-7) {
                                                                  		tmp = ((F * pow((2.0 + (2.0 * x)), -0.5)) / sin(B)) - (x / B);
                                                                  	} else {
                                                                  		tmp = (F * (1.0 / (F * sin(B)))) - (x / B);
                                                                  	}
                                                                  	return tmp;
                                                                  }
                                                                  
                                                                  function code(F, B, x)
                                                                  	tmp = 0.0
                                                                  	if (F <= -0.58)
                                                                  		tmp = Float64(Float64(F * Float64(Float64(-1.0 / F) / sin(B))) - Float64(x / B));
                                                                  	elseif (F <= -7.4e-178)
                                                                  		tmp = Float64(Float64(Float64(F / sin(B)) * (fma(x, 2.0, 2.0) ^ -0.5)) - Float64(x / B));
                                                                  	elseif (F <= 8.1e-143)
                                                                  		tmp = Float64(Float64(-1.0 * x) / tan(B));
                                                                  	elseif (F <= 1.8e-7)
                                                                  		tmp = Float64(Float64(Float64(F * (Float64(2.0 + Float64(2.0 * x)) ^ -0.5)) / sin(B)) - Float64(x / B));
                                                                  	else
                                                                  		tmp = Float64(Float64(F * Float64(1.0 / Float64(F * sin(B)))) - Float64(x / B));
                                                                  	end
                                                                  	return tmp
                                                                  end
                                                                  
                                                                  code[F_, B_, x_] := If[LessEqual[F, -0.58], N[(N[(F * N[(N[(-1.0 / F), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -7.4e-178], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(x * 2.0 + 2.0), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8.1e-143], N[(N[(-1.0 * x), $MachinePrecision] / N[Tan[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.8e-7], N[(N[(N[(F * N[Power[N[(2.0 + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(F * N[(1.0 / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]
                                                                  
                                                                  \begin{array}{l}
                                                                  \mathbf{if}\;F \leq -0.58:\\
                                                                  \;\;\;\;F \cdot \frac{\frac{-1}{F}}{\sin B} - \frac{x}{B}\\
                                                                  
                                                                  \mathbf{elif}\;F \leq -7.4 \cdot 10^{-178}:\\
                                                                  \;\;\;\;\frac{F}{\sin B} \cdot {\left(\mathsf{fma}\left(x, 2, 2\right)\right)}^{-0.5} - \frac{x}{B}\\
                                                                  
                                                                  \mathbf{elif}\;F \leq 8.1 \cdot 10^{-143}:\\
                                                                  \;\;\;\;\frac{-1 \cdot x}{\tan B}\\
                                                                  
                                                                  \mathbf{elif}\;F \leq 1.8 \cdot 10^{-7}:\\
                                                                  \;\;\;\;\frac{F \cdot {\left(2 + 2 \cdot x\right)}^{-0.5}}{\sin B} - \frac{x}{B}\\
                                                                  
                                                                  \mathbf{else}:\\
                                                                  \;\;\;\;F \cdot \frac{1}{F \cdot \sin B} - \frac{x}{B}\\
                                                                  
                                                                  
                                                                  \end{array}
                                                                  
                                                                  Derivation
                                                                  1. Split input into 5 regimes
                                                                  2. if F < -0.57999999999999996

                                                                    1. Initial program 76.3%

                                                                      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                    2. Taylor expanded in B around 0

                                                                      \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                                                    3. Step-by-step derivation
                                                                      1. Applied rewrites49.3%

                                                                        \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                                                      2. Applied rewrites49.4%

                                                                        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} - \frac{x}{B}} \]
                                                                      3. Step-by-step derivation
                                                                        1. lift-*.f64N/A

                                                                          \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}}} - \frac{x}{B} \]
                                                                        2. lift-/.f64N/A

                                                                          \[\leadsto \color{blue}{\frac{F}{\sin B}} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}} - \frac{x}{B} \]
                                                                        3. associate-*l/N/A

                                                                          \[\leadsto \color{blue}{\frac{F \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}}}{\sin B}} - \frac{x}{B} \]
                                                                        4. lift-pow.f64N/A

                                                                          \[\leadsto \frac{F \cdot \color{blue}{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}}}}{\sin B} - \frac{x}{B} \]
                                                                        5. lift-fma.f64N/A

                                                                          \[\leadsto \frac{F \cdot {\left(\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F + 2}\right)\right)}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                        6. lift-fma.f64N/A

                                                                          \[\leadsto \frac{F \cdot {\color{blue}{\left(x \cdot 2 + \left(F \cdot F + 2\right)\right)}}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                        7. add-flipN/A

                                                                          \[\leadsto \frac{F \cdot {\color{blue}{\left(x \cdot 2 - \left(\mathsf{neg}\left(\left(F \cdot F + 2\right)\right)\right)\right)}}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                        8. *-commutativeN/A

                                                                          \[\leadsto \frac{F \cdot {\left(\color{blue}{2 \cdot x} - \left(\mathsf{neg}\left(\left(F \cdot F + 2\right)\right)\right)\right)}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                        9. add-flipN/A

                                                                          \[\leadsto \frac{F \cdot {\color{blue}{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                        10. +-commutativeN/A

                                                                          \[\leadsto \frac{F \cdot {\color{blue}{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                        11. associate-/l*N/A

                                                                          \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\frac{-1}{2}}}{\sin B}} - \frac{x}{B} \]
                                                                        12. lower-*.f64N/A

                                                                          \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\frac{-1}{2}}}{\sin B}} - \frac{x}{B} \]
                                                                        13. lower-/.f64N/A

                                                                          \[\leadsto F \cdot \color{blue}{\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\frac{-1}{2}}}{\sin B}} - \frac{x}{B} \]
                                                                      4. Applied rewrites57.7%

                                                                        \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B}} - \frac{x}{B} \]
                                                                      5. Taylor expanded in F around -inf

                                                                        \[\leadsto F \cdot \frac{\color{blue}{\frac{-1}{F}}}{\sin B} - \frac{x}{B} \]
                                                                      6. Step-by-step derivation
                                                                        1. lower-/.f6435.4

                                                                          \[\leadsto F \cdot \frac{\frac{-1}{\color{blue}{F}}}{\sin B} - \frac{x}{B} \]
                                                                      7. Applied rewrites35.4%

                                                                        \[\leadsto F \cdot \frac{\color{blue}{\frac{-1}{F}}}{\sin B} - \frac{x}{B} \]

                                                                      if -0.57999999999999996 < F < -7.40000000000000008e-178

                                                                      1. Initial program 76.3%

                                                                        \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                      2. Taylor expanded in B around 0

                                                                        \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                                                      3. Step-by-step derivation
                                                                        1. Applied rewrites49.3%

                                                                          \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                                                        2. Applied rewrites49.4%

                                                                          \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} - \frac{x}{B}} \]
                                                                        3. Taylor expanded in F around 0

                                                                          \[\leadsto \frac{F}{\sin B} \cdot {\left(\mathsf{fma}\left(x, 2, \color{blue}{2}\right)\right)}^{\frac{-1}{2}} - \frac{x}{B} \]
                                                                        4. Step-by-step derivation
                                                                          1. Applied rewrites36.0%

                                                                            \[\leadsto \frac{F}{\sin B} \cdot {\left(\mathsf{fma}\left(x, 2, \color{blue}{2}\right)\right)}^{-0.5} - \frac{x}{B} \]

                                                                          if -7.40000000000000008e-178 < F < 8.0999999999999998e-143

                                                                          1. Initial program 76.3%

                                                                            \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                          2. Step-by-step derivation
                                                                            1. lift-+.f64N/A

                                                                              \[\leadsto \color{blue}{\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
                                                                            2. +-commutativeN/A

                                                                              \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
                                                                            3. lift-neg.f64N/A

                                                                              \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \color{blue}{\left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)} \]
                                                                            4. sub-flip-reverseN/A

                                                                              \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - x \cdot \frac{1}{\tan B}} \]
                                                                            5. lift-*.f64N/A

                                                                              \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \color{blue}{x \cdot \frac{1}{\tan B}} \]
                                                                            6. lift-/.f64N/A

                                                                              \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - x \cdot \color{blue}{\frac{1}{\tan B}} \]
                                                                            7. mult-flip-revN/A

                                                                              \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \color{blue}{\frac{x}{\tan B}} \]
                                                                            8. sub-to-fractionN/A

                                                                              \[\leadsto \color{blue}{\frac{\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right) \cdot \tan B - x}{\tan B}} \]
                                                                            9. lower-/.f64N/A

                                                                              \[\leadsto \color{blue}{\frac{\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right) \cdot \tan B - x}{\tan B}} \]
                                                                          3. Applied rewrites76.4%

                                                                            \[\leadsto \color{blue}{\frac{\left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \frac{F}{\sin B}\right) \cdot \tan B - x}{\tan B}} \]
                                                                          4. Taylor expanded in F around 0

                                                                            \[\leadsto \frac{\color{blue}{-1 \cdot x}}{\tan B} \]
                                                                          5. Step-by-step derivation
                                                                            1. lower-*.f6455.6

                                                                              \[\leadsto \frac{-1 \cdot \color{blue}{x}}{\tan B} \]
                                                                          6. Applied rewrites55.6%

                                                                            \[\leadsto \frac{\color{blue}{-1 \cdot x}}{\tan B} \]

                                                                          if 8.0999999999999998e-143 < F < 1.79999999999999997e-7

                                                                          1. Initial program 76.3%

                                                                            \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                          2. Taylor expanded in B around 0

                                                                            \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                                                          3. Step-by-step derivation
                                                                            1. Applied rewrites49.3%

                                                                              \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                                                            2. Applied rewrites49.4%

                                                                              \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} - \frac{x}{B}} \]
                                                                            3. Taylor expanded in F around 0

                                                                              \[\leadsto \color{blue}{\frac{F \cdot {\left(2 + 2 \cdot x\right)}^{\frac{-1}{2}}}{\sin B}} - \frac{x}{B} \]
                                                                            4. Step-by-step derivation
                                                                              1. lower-/.f64N/A

                                                                                \[\leadsto \frac{F \cdot {\left(2 + 2 \cdot x\right)}^{\frac{-1}{2}}}{\color{blue}{\sin B}} - \frac{x}{B} \]
                                                                              2. lower-*.f64N/A

                                                                                \[\leadsto \frac{F \cdot {\left(2 + 2 \cdot x\right)}^{\frac{-1}{2}}}{\sin \color{blue}{B}} - \frac{x}{B} \]
                                                                              3. lower-pow.f64N/A

                                                                                \[\leadsto \frac{F \cdot {\left(2 + 2 \cdot x\right)}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                              4. lower-+.f64N/A

                                                                                \[\leadsto \frac{F \cdot {\left(2 + 2 \cdot x\right)}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                              5. lower-*.f64N/A

                                                                                \[\leadsto \frac{F \cdot {\left(2 + 2 \cdot x\right)}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                              6. lower-sin.f6436.7

                                                                                \[\leadsto \frac{F \cdot {\left(2 + 2 \cdot x\right)}^{-0.5}}{\sin B} - \frac{x}{B} \]
                                                                            5. Applied rewrites36.7%

                                                                              \[\leadsto \color{blue}{\frac{F \cdot {\left(2 + 2 \cdot x\right)}^{-0.5}}{\sin B}} - \frac{x}{B} \]

                                                                            if 1.79999999999999997e-7 < F

                                                                            1. Initial program 76.3%

                                                                              \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                            2. Taylor expanded in B around 0

                                                                              \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                                                            3. Step-by-step derivation
                                                                              1. Applied rewrites49.3%

                                                                                \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                                                              2. Applied rewrites49.4%

                                                                                \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} - \frac{x}{B}} \]
                                                                              3. Step-by-step derivation
                                                                                1. lift-*.f64N/A

                                                                                  \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}}} - \frac{x}{B} \]
                                                                                2. lift-/.f64N/A

                                                                                  \[\leadsto \color{blue}{\frac{F}{\sin B}} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}} - \frac{x}{B} \]
                                                                                3. associate-*l/N/A

                                                                                  \[\leadsto \color{blue}{\frac{F \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}}}{\sin B}} - \frac{x}{B} \]
                                                                                4. lift-pow.f64N/A

                                                                                  \[\leadsto \frac{F \cdot \color{blue}{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}}}}{\sin B} - \frac{x}{B} \]
                                                                                5. lift-fma.f64N/A

                                                                                  \[\leadsto \frac{F \cdot {\left(\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F + 2}\right)\right)}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                6. lift-fma.f64N/A

                                                                                  \[\leadsto \frac{F \cdot {\color{blue}{\left(x \cdot 2 + \left(F \cdot F + 2\right)\right)}}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                7. add-flipN/A

                                                                                  \[\leadsto \frac{F \cdot {\color{blue}{\left(x \cdot 2 - \left(\mathsf{neg}\left(\left(F \cdot F + 2\right)\right)\right)\right)}}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                8. *-commutativeN/A

                                                                                  \[\leadsto \frac{F \cdot {\left(\color{blue}{2 \cdot x} - \left(\mathsf{neg}\left(\left(F \cdot F + 2\right)\right)\right)\right)}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                9. add-flipN/A

                                                                                  \[\leadsto \frac{F \cdot {\color{blue}{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                10. +-commutativeN/A

                                                                                  \[\leadsto \frac{F \cdot {\color{blue}{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                11. associate-/l*N/A

                                                                                  \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\frac{-1}{2}}}{\sin B}} - \frac{x}{B} \]
                                                                                12. lower-*.f64N/A

                                                                                  \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\frac{-1}{2}}}{\sin B}} - \frac{x}{B} \]
                                                                                13. lower-/.f64N/A

                                                                                  \[\leadsto F \cdot \color{blue}{\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\frac{-1}{2}}}{\sin B}} - \frac{x}{B} \]
                                                                              4. Applied rewrites57.7%

                                                                                \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B}} - \frac{x}{B} \]
                                                                              5. Taylor expanded in F around inf

                                                                                \[\leadsto F \cdot \color{blue}{\frac{1}{F \cdot \sin B}} - \frac{x}{B} \]
                                                                              6. Step-by-step derivation
                                                                                1. lower-/.f64N/A

                                                                                  \[\leadsto F \cdot \frac{1}{\color{blue}{F \cdot \sin B}} - \frac{x}{B} \]
                                                                                2. lower-*.f64N/A

                                                                                  \[\leadsto F \cdot \frac{1}{F \cdot \color{blue}{\sin B}} - \frac{x}{B} \]
                                                                                3. lower-sin.f6432.3

                                                                                  \[\leadsto F \cdot \frac{1}{F \cdot \sin B} - \frac{x}{B} \]
                                                                              7. Applied rewrites32.3%

                                                                                \[\leadsto F \cdot \color{blue}{\frac{1}{F \cdot \sin B}} - \frac{x}{B} \]
                                                                            4. Recombined 5 regimes into one program.
                                                                            5. Add Preprocessing

                                                                            Alternative 16: 76.5% accurate, 1.4× speedup?

                                                                            \[\begin{array}{l} t_0 := \frac{F}{\sin B} \cdot {\left(\mathsf{fma}\left(x, 2, 2\right)\right)}^{-0.5} - \frac{x}{B}\\ \mathbf{if}\;F \leq -0.58:\\ \;\;\;\;F \cdot \frac{\frac{-1}{F}}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq -7.4 \cdot 10^{-178}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;F \leq 8.1 \cdot 10^{-143}:\\ \;\;\;\;\frac{-1 \cdot x}{\tan B}\\ \mathbf{elif}\;F \leq 1.8 \cdot 10^{-7}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;F \cdot \frac{1}{F \cdot \sin B} - \frac{x}{B}\\ \end{array} \]
                                                                            (FPCore (F B x)
                                                                             :precision binary64
                                                                             (let* ((t_0 (- (* (/ F (sin B)) (pow (fma x 2.0 2.0) -0.5)) (/ x B))))
                                                                               (if (<= F -0.58)
                                                                                 (- (* F (/ (/ -1.0 F) (sin B))) (/ x B))
                                                                                 (if (<= F -7.4e-178)
                                                                                   t_0
                                                                                   (if (<= F 8.1e-143)
                                                                                     (/ (* -1.0 x) (tan B))
                                                                                     (if (<= F 1.8e-7) t_0 (- (* F (/ 1.0 (* F (sin B)))) (/ x B))))))))
                                                                            double code(double F, double B, double x) {
                                                                            	double t_0 = ((F / sin(B)) * pow(fma(x, 2.0, 2.0), -0.5)) - (x / B);
                                                                            	double tmp;
                                                                            	if (F <= -0.58) {
                                                                            		tmp = (F * ((-1.0 / F) / sin(B))) - (x / B);
                                                                            	} else if (F <= -7.4e-178) {
                                                                            		tmp = t_0;
                                                                            	} else if (F <= 8.1e-143) {
                                                                            		tmp = (-1.0 * x) / tan(B);
                                                                            	} else if (F <= 1.8e-7) {
                                                                            		tmp = t_0;
                                                                            	} else {
                                                                            		tmp = (F * (1.0 / (F * sin(B)))) - (x / B);
                                                                            	}
                                                                            	return tmp;
                                                                            }
                                                                            
                                                                            function code(F, B, x)
                                                                            	t_0 = Float64(Float64(Float64(F / sin(B)) * (fma(x, 2.0, 2.0) ^ -0.5)) - Float64(x / B))
                                                                            	tmp = 0.0
                                                                            	if (F <= -0.58)
                                                                            		tmp = Float64(Float64(F * Float64(Float64(-1.0 / F) / sin(B))) - Float64(x / B));
                                                                            	elseif (F <= -7.4e-178)
                                                                            		tmp = t_0;
                                                                            	elseif (F <= 8.1e-143)
                                                                            		tmp = Float64(Float64(-1.0 * x) / tan(B));
                                                                            	elseif (F <= 1.8e-7)
                                                                            		tmp = t_0;
                                                                            	else
                                                                            		tmp = Float64(Float64(F * Float64(1.0 / Float64(F * sin(B)))) - Float64(x / B));
                                                                            	end
                                                                            	return tmp
                                                                            end
                                                                            
                                                                            code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(x * 2.0 + 2.0), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.58], N[(N[(F * N[(N[(-1.0 / F), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -7.4e-178], t$95$0, If[LessEqual[F, 8.1e-143], N[(N[(-1.0 * x), $MachinePrecision] / N[Tan[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.8e-7], t$95$0, N[(N[(F * N[(1.0 / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]
                                                                            
                                                                            \begin{array}{l}
                                                                            t_0 := \frac{F}{\sin B} \cdot {\left(\mathsf{fma}\left(x, 2, 2\right)\right)}^{-0.5} - \frac{x}{B}\\
                                                                            \mathbf{if}\;F \leq -0.58:\\
                                                                            \;\;\;\;F \cdot \frac{\frac{-1}{F}}{\sin B} - \frac{x}{B}\\
                                                                            
                                                                            \mathbf{elif}\;F \leq -7.4 \cdot 10^{-178}:\\
                                                                            \;\;\;\;t\_0\\
                                                                            
                                                                            \mathbf{elif}\;F \leq 8.1 \cdot 10^{-143}:\\
                                                                            \;\;\;\;\frac{-1 \cdot x}{\tan B}\\
                                                                            
                                                                            \mathbf{elif}\;F \leq 1.8 \cdot 10^{-7}:\\
                                                                            \;\;\;\;t\_0\\
                                                                            
                                                                            \mathbf{else}:\\
                                                                            \;\;\;\;F \cdot \frac{1}{F \cdot \sin B} - \frac{x}{B}\\
                                                                            
                                                                            
                                                                            \end{array}
                                                                            
                                                                            Derivation
                                                                            1. Split input into 4 regimes
                                                                            2. if F < -0.57999999999999996

                                                                              1. Initial program 76.3%

                                                                                \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                              2. Taylor expanded in B around 0

                                                                                \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                                                              3. Step-by-step derivation
                                                                                1. Applied rewrites49.3%

                                                                                  \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                                                                2. Applied rewrites49.4%

                                                                                  \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} - \frac{x}{B}} \]
                                                                                3. Step-by-step derivation
                                                                                  1. lift-*.f64N/A

                                                                                    \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}}} - \frac{x}{B} \]
                                                                                  2. lift-/.f64N/A

                                                                                    \[\leadsto \color{blue}{\frac{F}{\sin B}} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}} - \frac{x}{B} \]
                                                                                  3. associate-*l/N/A

                                                                                    \[\leadsto \color{blue}{\frac{F \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}}}{\sin B}} - \frac{x}{B} \]
                                                                                  4. lift-pow.f64N/A

                                                                                    \[\leadsto \frac{F \cdot \color{blue}{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}}}}{\sin B} - \frac{x}{B} \]
                                                                                  5. lift-fma.f64N/A

                                                                                    \[\leadsto \frac{F \cdot {\left(\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F + 2}\right)\right)}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                  6. lift-fma.f64N/A

                                                                                    \[\leadsto \frac{F \cdot {\color{blue}{\left(x \cdot 2 + \left(F \cdot F + 2\right)\right)}}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                  7. add-flipN/A

                                                                                    \[\leadsto \frac{F \cdot {\color{blue}{\left(x \cdot 2 - \left(\mathsf{neg}\left(\left(F \cdot F + 2\right)\right)\right)\right)}}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                  8. *-commutativeN/A

                                                                                    \[\leadsto \frac{F \cdot {\left(\color{blue}{2 \cdot x} - \left(\mathsf{neg}\left(\left(F \cdot F + 2\right)\right)\right)\right)}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                  9. add-flipN/A

                                                                                    \[\leadsto \frac{F \cdot {\color{blue}{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                  10. +-commutativeN/A

                                                                                    \[\leadsto \frac{F \cdot {\color{blue}{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                  11. associate-/l*N/A

                                                                                    \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\frac{-1}{2}}}{\sin B}} - \frac{x}{B} \]
                                                                                  12. lower-*.f64N/A

                                                                                    \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\frac{-1}{2}}}{\sin B}} - \frac{x}{B} \]
                                                                                  13. lower-/.f64N/A

                                                                                    \[\leadsto F \cdot \color{blue}{\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\frac{-1}{2}}}{\sin B}} - \frac{x}{B} \]
                                                                                4. Applied rewrites57.7%

                                                                                  \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B}} - \frac{x}{B} \]
                                                                                5. Taylor expanded in F around -inf

                                                                                  \[\leadsto F \cdot \frac{\color{blue}{\frac{-1}{F}}}{\sin B} - \frac{x}{B} \]
                                                                                6. Step-by-step derivation
                                                                                  1. lower-/.f6435.4

                                                                                    \[\leadsto F \cdot \frac{\frac{-1}{\color{blue}{F}}}{\sin B} - \frac{x}{B} \]
                                                                                7. Applied rewrites35.4%

                                                                                  \[\leadsto F \cdot \frac{\color{blue}{\frac{-1}{F}}}{\sin B} - \frac{x}{B} \]

                                                                                if -0.57999999999999996 < F < -7.40000000000000008e-178 or 8.0999999999999998e-143 < F < 1.79999999999999997e-7

                                                                                1. Initial program 76.3%

                                                                                  \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                2. Taylor expanded in B around 0

                                                                                  \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                                                                3. Step-by-step derivation
                                                                                  1. Applied rewrites49.3%

                                                                                    \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                                                                  2. Applied rewrites49.4%

                                                                                    \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} - \frac{x}{B}} \]
                                                                                  3. Taylor expanded in F around 0

                                                                                    \[\leadsto \frac{F}{\sin B} \cdot {\left(\mathsf{fma}\left(x, 2, \color{blue}{2}\right)\right)}^{\frac{-1}{2}} - \frac{x}{B} \]
                                                                                  4. Step-by-step derivation
                                                                                    1. Applied rewrites36.0%

                                                                                      \[\leadsto \frac{F}{\sin B} \cdot {\left(\mathsf{fma}\left(x, 2, \color{blue}{2}\right)\right)}^{-0.5} - \frac{x}{B} \]

                                                                                    if -7.40000000000000008e-178 < F < 8.0999999999999998e-143

                                                                                    1. Initial program 76.3%

                                                                                      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                    2. Step-by-step derivation
                                                                                      1. lift-+.f64N/A

                                                                                        \[\leadsto \color{blue}{\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
                                                                                      2. +-commutativeN/A

                                                                                        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
                                                                                      3. lift-neg.f64N/A

                                                                                        \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \color{blue}{\left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)} \]
                                                                                      4. sub-flip-reverseN/A

                                                                                        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - x \cdot \frac{1}{\tan B}} \]
                                                                                      5. lift-*.f64N/A

                                                                                        \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \color{blue}{x \cdot \frac{1}{\tan B}} \]
                                                                                      6. lift-/.f64N/A

                                                                                        \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - x \cdot \color{blue}{\frac{1}{\tan B}} \]
                                                                                      7. mult-flip-revN/A

                                                                                        \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \color{blue}{\frac{x}{\tan B}} \]
                                                                                      8. sub-to-fractionN/A

                                                                                        \[\leadsto \color{blue}{\frac{\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                      9. lower-/.f64N/A

                                                                                        \[\leadsto \color{blue}{\frac{\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                    3. Applied rewrites76.4%

                                                                                      \[\leadsto \color{blue}{\frac{\left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \frac{F}{\sin B}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                    4. Taylor expanded in F around 0

                                                                                      \[\leadsto \frac{\color{blue}{-1 \cdot x}}{\tan B} \]
                                                                                    5. Step-by-step derivation
                                                                                      1. lower-*.f6455.6

                                                                                        \[\leadsto \frac{-1 \cdot \color{blue}{x}}{\tan B} \]
                                                                                    6. Applied rewrites55.6%

                                                                                      \[\leadsto \frac{\color{blue}{-1 \cdot x}}{\tan B} \]

                                                                                    if 1.79999999999999997e-7 < F

                                                                                    1. Initial program 76.3%

                                                                                      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                    2. Taylor expanded in B around 0

                                                                                      \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                                                                    3. Step-by-step derivation
                                                                                      1. Applied rewrites49.3%

                                                                                        \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                                                                      2. Applied rewrites49.4%

                                                                                        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} - \frac{x}{B}} \]
                                                                                      3. Step-by-step derivation
                                                                                        1. lift-*.f64N/A

                                                                                          \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}}} - \frac{x}{B} \]
                                                                                        2. lift-/.f64N/A

                                                                                          \[\leadsto \color{blue}{\frac{F}{\sin B}} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}} - \frac{x}{B} \]
                                                                                        3. associate-*l/N/A

                                                                                          \[\leadsto \color{blue}{\frac{F \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}}}{\sin B}} - \frac{x}{B} \]
                                                                                        4. lift-pow.f64N/A

                                                                                          \[\leadsto \frac{F \cdot \color{blue}{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}}}}{\sin B} - \frac{x}{B} \]
                                                                                        5. lift-fma.f64N/A

                                                                                          \[\leadsto \frac{F \cdot {\left(\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F + 2}\right)\right)}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                        6. lift-fma.f64N/A

                                                                                          \[\leadsto \frac{F \cdot {\color{blue}{\left(x \cdot 2 + \left(F \cdot F + 2\right)\right)}}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                        7. add-flipN/A

                                                                                          \[\leadsto \frac{F \cdot {\color{blue}{\left(x \cdot 2 - \left(\mathsf{neg}\left(\left(F \cdot F + 2\right)\right)\right)\right)}}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                        8. *-commutativeN/A

                                                                                          \[\leadsto \frac{F \cdot {\left(\color{blue}{2 \cdot x} - \left(\mathsf{neg}\left(\left(F \cdot F + 2\right)\right)\right)\right)}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                        9. add-flipN/A

                                                                                          \[\leadsto \frac{F \cdot {\color{blue}{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                        10. +-commutativeN/A

                                                                                          \[\leadsto \frac{F \cdot {\color{blue}{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                        11. associate-/l*N/A

                                                                                          \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\frac{-1}{2}}}{\sin B}} - \frac{x}{B} \]
                                                                                        12. lower-*.f64N/A

                                                                                          \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\frac{-1}{2}}}{\sin B}} - \frac{x}{B} \]
                                                                                        13. lower-/.f64N/A

                                                                                          \[\leadsto F \cdot \color{blue}{\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\frac{-1}{2}}}{\sin B}} - \frac{x}{B} \]
                                                                                      4. Applied rewrites57.7%

                                                                                        \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B}} - \frac{x}{B} \]
                                                                                      5. Taylor expanded in F around inf

                                                                                        \[\leadsto F \cdot \color{blue}{\frac{1}{F \cdot \sin B}} - \frac{x}{B} \]
                                                                                      6. Step-by-step derivation
                                                                                        1. lower-/.f64N/A

                                                                                          \[\leadsto F \cdot \frac{1}{\color{blue}{F \cdot \sin B}} - \frac{x}{B} \]
                                                                                        2. lower-*.f64N/A

                                                                                          \[\leadsto F \cdot \frac{1}{F \cdot \color{blue}{\sin B}} - \frac{x}{B} \]
                                                                                        3. lower-sin.f6432.3

                                                                                          \[\leadsto F \cdot \frac{1}{F \cdot \sin B} - \frac{x}{B} \]
                                                                                      7. Applied rewrites32.3%

                                                                                        \[\leadsto F \cdot \color{blue}{\frac{1}{F \cdot \sin B}} - \frac{x}{B} \]
                                                                                    4. Recombined 4 regimes into one program.
                                                                                    5. Add Preprocessing

                                                                                    Alternative 17: 76.5% accurate, 1.4× speedup?

                                                                                    \[\begin{array}{l} t_0 := F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, 2\right)\right)}^{-0.5}}{\sin B} - \frac{x}{B}\\ \mathbf{if}\;F \leq -0.58:\\ \;\;\;\;F \cdot \frac{\frac{-1}{F}}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq -7.4 \cdot 10^{-178}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;F \leq 8.1 \cdot 10^{-143}:\\ \;\;\;\;\frac{-1 \cdot x}{\tan B}\\ \mathbf{elif}\;F \leq 1.8 \cdot 10^{-7}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;F \cdot \frac{1}{F \cdot \sin B} - \frac{x}{B}\\ \end{array} \]
                                                                                    (FPCore (F B x)
                                                                                     :precision binary64
                                                                                     (let* ((t_0 (- (* F (/ (pow (fma x 2.0 2.0) -0.5) (sin B))) (/ x B))))
                                                                                       (if (<= F -0.58)
                                                                                         (- (* F (/ (/ -1.0 F) (sin B))) (/ x B))
                                                                                         (if (<= F -7.4e-178)
                                                                                           t_0
                                                                                           (if (<= F 8.1e-143)
                                                                                             (/ (* -1.0 x) (tan B))
                                                                                             (if (<= F 1.8e-7) t_0 (- (* F (/ 1.0 (* F (sin B)))) (/ x B))))))))
                                                                                    double code(double F, double B, double x) {
                                                                                    	double t_0 = (F * (pow(fma(x, 2.0, 2.0), -0.5) / sin(B))) - (x / B);
                                                                                    	double tmp;
                                                                                    	if (F <= -0.58) {
                                                                                    		tmp = (F * ((-1.0 / F) / sin(B))) - (x / B);
                                                                                    	} else if (F <= -7.4e-178) {
                                                                                    		tmp = t_0;
                                                                                    	} else if (F <= 8.1e-143) {
                                                                                    		tmp = (-1.0 * x) / tan(B);
                                                                                    	} else if (F <= 1.8e-7) {
                                                                                    		tmp = t_0;
                                                                                    	} else {
                                                                                    		tmp = (F * (1.0 / (F * sin(B)))) - (x / B);
                                                                                    	}
                                                                                    	return tmp;
                                                                                    }
                                                                                    
                                                                                    function code(F, B, x)
                                                                                    	t_0 = Float64(Float64(F * Float64((fma(x, 2.0, 2.0) ^ -0.5) / sin(B))) - Float64(x / B))
                                                                                    	tmp = 0.0
                                                                                    	if (F <= -0.58)
                                                                                    		tmp = Float64(Float64(F * Float64(Float64(-1.0 / F) / sin(B))) - Float64(x / B));
                                                                                    	elseif (F <= -7.4e-178)
                                                                                    		tmp = t_0;
                                                                                    	elseif (F <= 8.1e-143)
                                                                                    		tmp = Float64(Float64(-1.0 * x) / tan(B));
                                                                                    	elseif (F <= 1.8e-7)
                                                                                    		tmp = t_0;
                                                                                    	else
                                                                                    		tmp = Float64(Float64(F * Float64(1.0 / Float64(F * sin(B)))) - Float64(x / B));
                                                                                    	end
                                                                                    	return tmp
                                                                                    end
                                                                                    
                                                                                    code[F_, B_, x_] := Block[{t$95$0 = N[(N[(F * N[(N[Power[N[(x * 2.0 + 2.0), $MachinePrecision], -0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.58], N[(N[(F * N[(N[(-1.0 / F), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -7.4e-178], t$95$0, If[LessEqual[F, 8.1e-143], N[(N[(-1.0 * x), $MachinePrecision] / N[Tan[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.8e-7], t$95$0, N[(N[(F * N[(1.0 / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]
                                                                                    
                                                                                    \begin{array}{l}
                                                                                    t_0 := F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, 2\right)\right)}^{-0.5}}{\sin B} - \frac{x}{B}\\
                                                                                    \mathbf{if}\;F \leq -0.58:\\
                                                                                    \;\;\;\;F \cdot \frac{\frac{-1}{F}}{\sin B} - \frac{x}{B}\\
                                                                                    
                                                                                    \mathbf{elif}\;F \leq -7.4 \cdot 10^{-178}:\\
                                                                                    \;\;\;\;t\_0\\
                                                                                    
                                                                                    \mathbf{elif}\;F \leq 8.1 \cdot 10^{-143}:\\
                                                                                    \;\;\;\;\frac{-1 \cdot x}{\tan B}\\
                                                                                    
                                                                                    \mathbf{elif}\;F \leq 1.8 \cdot 10^{-7}:\\
                                                                                    \;\;\;\;t\_0\\
                                                                                    
                                                                                    \mathbf{else}:\\
                                                                                    \;\;\;\;F \cdot \frac{1}{F \cdot \sin B} - \frac{x}{B}\\
                                                                                    
                                                                                    
                                                                                    \end{array}
                                                                                    
                                                                                    Derivation
                                                                                    1. Split input into 4 regimes
                                                                                    2. if F < -0.57999999999999996

                                                                                      1. Initial program 76.3%

                                                                                        \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                      2. Taylor expanded in B around 0

                                                                                        \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                                                                      3. Step-by-step derivation
                                                                                        1. Applied rewrites49.3%

                                                                                          \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                                                                        2. Applied rewrites49.4%

                                                                                          \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} - \frac{x}{B}} \]
                                                                                        3. Step-by-step derivation
                                                                                          1. lift-*.f64N/A

                                                                                            \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}}} - \frac{x}{B} \]
                                                                                          2. lift-/.f64N/A

                                                                                            \[\leadsto \color{blue}{\frac{F}{\sin B}} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}} - \frac{x}{B} \]
                                                                                          3. associate-*l/N/A

                                                                                            \[\leadsto \color{blue}{\frac{F \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}}}{\sin B}} - \frac{x}{B} \]
                                                                                          4. lift-pow.f64N/A

                                                                                            \[\leadsto \frac{F \cdot \color{blue}{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}}}}{\sin B} - \frac{x}{B} \]
                                                                                          5. lift-fma.f64N/A

                                                                                            \[\leadsto \frac{F \cdot {\left(\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F + 2}\right)\right)}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                          6. lift-fma.f64N/A

                                                                                            \[\leadsto \frac{F \cdot {\color{blue}{\left(x \cdot 2 + \left(F \cdot F + 2\right)\right)}}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                          7. add-flipN/A

                                                                                            \[\leadsto \frac{F \cdot {\color{blue}{\left(x \cdot 2 - \left(\mathsf{neg}\left(\left(F \cdot F + 2\right)\right)\right)\right)}}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                          8. *-commutativeN/A

                                                                                            \[\leadsto \frac{F \cdot {\left(\color{blue}{2 \cdot x} - \left(\mathsf{neg}\left(\left(F \cdot F + 2\right)\right)\right)\right)}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                          9. add-flipN/A

                                                                                            \[\leadsto \frac{F \cdot {\color{blue}{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                          10. +-commutativeN/A

                                                                                            \[\leadsto \frac{F \cdot {\color{blue}{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                          11. associate-/l*N/A

                                                                                            \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\frac{-1}{2}}}{\sin B}} - \frac{x}{B} \]
                                                                                          12. lower-*.f64N/A

                                                                                            \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\frac{-1}{2}}}{\sin B}} - \frac{x}{B} \]
                                                                                          13. lower-/.f64N/A

                                                                                            \[\leadsto F \cdot \color{blue}{\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\frac{-1}{2}}}{\sin B}} - \frac{x}{B} \]
                                                                                        4. Applied rewrites57.7%

                                                                                          \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B}} - \frac{x}{B} \]
                                                                                        5. Taylor expanded in F around -inf

                                                                                          \[\leadsto F \cdot \frac{\color{blue}{\frac{-1}{F}}}{\sin B} - \frac{x}{B} \]
                                                                                        6. Step-by-step derivation
                                                                                          1. lower-/.f6435.4

                                                                                            \[\leadsto F \cdot \frac{\frac{-1}{\color{blue}{F}}}{\sin B} - \frac{x}{B} \]
                                                                                        7. Applied rewrites35.4%

                                                                                          \[\leadsto F \cdot \frac{\color{blue}{\frac{-1}{F}}}{\sin B} - \frac{x}{B} \]

                                                                                        if -0.57999999999999996 < F < -7.40000000000000008e-178 or 8.0999999999999998e-143 < F < 1.79999999999999997e-7

                                                                                        1. Initial program 76.3%

                                                                                          \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                        2. Taylor expanded in B around 0

                                                                                          \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                                                                        3. Step-by-step derivation
                                                                                          1. Applied rewrites49.3%

                                                                                            \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                                                                          2. Applied rewrites49.4%

                                                                                            \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} - \frac{x}{B}} \]
                                                                                          3. Step-by-step derivation
                                                                                            1. lift-*.f64N/A

                                                                                              \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}}} - \frac{x}{B} \]
                                                                                            2. lift-/.f64N/A

                                                                                              \[\leadsto \color{blue}{\frac{F}{\sin B}} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}} - \frac{x}{B} \]
                                                                                            3. associate-*l/N/A

                                                                                              \[\leadsto \color{blue}{\frac{F \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}}}{\sin B}} - \frac{x}{B} \]
                                                                                            4. lift-pow.f64N/A

                                                                                              \[\leadsto \frac{F \cdot \color{blue}{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}}}}{\sin B} - \frac{x}{B} \]
                                                                                            5. lift-fma.f64N/A

                                                                                              \[\leadsto \frac{F \cdot {\left(\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F + 2}\right)\right)}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                            6. lift-fma.f64N/A

                                                                                              \[\leadsto \frac{F \cdot {\color{blue}{\left(x \cdot 2 + \left(F \cdot F + 2\right)\right)}}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                            7. add-flipN/A

                                                                                              \[\leadsto \frac{F \cdot {\color{blue}{\left(x \cdot 2 - \left(\mathsf{neg}\left(\left(F \cdot F + 2\right)\right)\right)\right)}}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                            8. *-commutativeN/A

                                                                                              \[\leadsto \frac{F \cdot {\left(\color{blue}{2 \cdot x} - \left(\mathsf{neg}\left(\left(F \cdot F + 2\right)\right)\right)\right)}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                            9. add-flipN/A

                                                                                              \[\leadsto \frac{F \cdot {\color{blue}{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                            10. +-commutativeN/A

                                                                                              \[\leadsto \frac{F \cdot {\color{blue}{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                            11. associate-/l*N/A

                                                                                              \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\frac{-1}{2}}}{\sin B}} - \frac{x}{B} \]
                                                                                            12. lower-*.f64N/A

                                                                                              \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\frac{-1}{2}}}{\sin B}} - \frac{x}{B} \]
                                                                                            13. lower-/.f64N/A

                                                                                              \[\leadsto F \cdot \color{blue}{\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\frac{-1}{2}}}{\sin B}} - \frac{x}{B} \]
                                                                                          4. Applied rewrites57.7%

                                                                                            \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B}} - \frac{x}{B} \]
                                                                                          5. Taylor expanded in F around 0

                                                                                            \[\leadsto F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \color{blue}{2}\right)\right)}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                          6. Step-by-step derivation
                                                                                            1. Applied rewrites36.7%

                                                                                              \[\leadsto F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \color{blue}{2}\right)\right)}^{-0.5}}{\sin B} - \frac{x}{B} \]

                                                                                            if -7.40000000000000008e-178 < F < 8.0999999999999998e-143

                                                                                            1. Initial program 76.3%

                                                                                              \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                            2. Step-by-step derivation
                                                                                              1. lift-+.f64N/A

                                                                                                \[\leadsto \color{blue}{\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
                                                                                              2. +-commutativeN/A

                                                                                                \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
                                                                                              3. lift-neg.f64N/A

                                                                                                \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \color{blue}{\left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)} \]
                                                                                              4. sub-flip-reverseN/A

                                                                                                \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - x \cdot \frac{1}{\tan B}} \]
                                                                                              5. lift-*.f64N/A

                                                                                                \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \color{blue}{x \cdot \frac{1}{\tan B}} \]
                                                                                              6. lift-/.f64N/A

                                                                                                \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - x \cdot \color{blue}{\frac{1}{\tan B}} \]
                                                                                              7. mult-flip-revN/A

                                                                                                \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \color{blue}{\frac{x}{\tan B}} \]
                                                                                              8. sub-to-fractionN/A

                                                                                                \[\leadsto \color{blue}{\frac{\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                              9. lower-/.f64N/A

                                                                                                \[\leadsto \color{blue}{\frac{\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                            3. Applied rewrites76.4%

                                                                                              \[\leadsto \color{blue}{\frac{\left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \frac{F}{\sin B}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                            4. Taylor expanded in F around 0

                                                                                              \[\leadsto \frac{\color{blue}{-1 \cdot x}}{\tan B} \]
                                                                                            5. Step-by-step derivation
                                                                                              1. lower-*.f6455.6

                                                                                                \[\leadsto \frac{-1 \cdot \color{blue}{x}}{\tan B} \]
                                                                                            6. Applied rewrites55.6%

                                                                                              \[\leadsto \frac{\color{blue}{-1 \cdot x}}{\tan B} \]

                                                                                            if 1.79999999999999997e-7 < F

                                                                                            1. Initial program 76.3%

                                                                                              \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                            2. Taylor expanded in B around 0

                                                                                              \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                                                                            3. Step-by-step derivation
                                                                                              1. Applied rewrites49.3%

                                                                                                \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                                                                              2. Applied rewrites49.4%

                                                                                                \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} - \frac{x}{B}} \]
                                                                                              3. Step-by-step derivation
                                                                                                1. lift-*.f64N/A

                                                                                                  \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}}} - \frac{x}{B} \]
                                                                                                2. lift-/.f64N/A

                                                                                                  \[\leadsto \color{blue}{\frac{F}{\sin B}} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}} - \frac{x}{B} \]
                                                                                                3. associate-*l/N/A

                                                                                                  \[\leadsto \color{blue}{\frac{F \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}}}{\sin B}} - \frac{x}{B} \]
                                                                                                4. lift-pow.f64N/A

                                                                                                  \[\leadsto \frac{F \cdot \color{blue}{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}}}}{\sin B} - \frac{x}{B} \]
                                                                                                5. lift-fma.f64N/A

                                                                                                  \[\leadsto \frac{F \cdot {\left(\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F + 2}\right)\right)}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                                6. lift-fma.f64N/A

                                                                                                  \[\leadsto \frac{F \cdot {\color{blue}{\left(x \cdot 2 + \left(F \cdot F + 2\right)\right)}}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                                7. add-flipN/A

                                                                                                  \[\leadsto \frac{F \cdot {\color{blue}{\left(x \cdot 2 - \left(\mathsf{neg}\left(\left(F \cdot F + 2\right)\right)\right)\right)}}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                                8. *-commutativeN/A

                                                                                                  \[\leadsto \frac{F \cdot {\left(\color{blue}{2 \cdot x} - \left(\mathsf{neg}\left(\left(F \cdot F + 2\right)\right)\right)\right)}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                                9. add-flipN/A

                                                                                                  \[\leadsto \frac{F \cdot {\color{blue}{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                                10. +-commutativeN/A

                                                                                                  \[\leadsto \frac{F \cdot {\color{blue}{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                                11. associate-/l*N/A

                                                                                                  \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\frac{-1}{2}}}{\sin B}} - \frac{x}{B} \]
                                                                                                12. lower-*.f64N/A

                                                                                                  \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\frac{-1}{2}}}{\sin B}} - \frac{x}{B} \]
                                                                                                13. lower-/.f64N/A

                                                                                                  \[\leadsto F \cdot \color{blue}{\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\frac{-1}{2}}}{\sin B}} - \frac{x}{B} \]
                                                                                              4. Applied rewrites57.7%

                                                                                                \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B}} - \frac{x}{B} \]
                                                                                              5. Taylor expanded in F around inf

                                                                                                \[\leadsto F \cdot \color{blue}{\frac{1}{F \cdot \sin B}} - \frac{x}{B} \]
                                                                                              6. Step-by-step derivation
                                                                                                1. lower-/.f64N/A

                                                                                                  \[\leadsto F \cdot \frac{1}{\color{blue}{F \cdot \sin B}} - \frac{x}{B} \]
                                                                                                2. lower-*.f64N/A

                                                                                                  \[\leadsto F \cdot \frac{1}{F \cdot \color{blue}{\sin B}} - \frac{x}{B} \]
                                                                                                3. lower-sin.f6432.3

                                                                                                  \[\leadsto F \cdot \frac{1}{F \cdot \sin B} - \frac{x}{B} \]
                                                                                              7. Applied rewrites32.3%

                                                                                                \[\leadsto F \cdot \color{blue}{\frac{1}{F \cdot \sin B}} - \frac{x}{B} \]
                                                                                            4. Recombined 4 regimes into one program.
                                                                                            5. Add Preprocessing

                                                                                            Alternative 18: 70.8% accurate, 1.7× speedup?

                                                                                            \[\begin{array}{l} \mathbf{if}\;F \leq -11:\\ \;\;\;\;F \cdot \frac{\frac{-1}{F}}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq -7.4 \cdot 10^{-178}:\\ \;\;\;\;\left(1 + -1 \cdot \frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5}}{x}\right) \cdot \frac{-x}{B}\\ \mathbf{elif}\;F \leq 5.6 \cdot 10^{-18}:\\ \;\;\;\;\frac{-1 \cdot x}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;F \cdot \frac{1}{F \cdot \sin B} - \frac{x}{B}\\ \end{array} \]
                                                                                            (FPCore (F B x)
                                                                                             :precision binary64
                                                                                             (if (<= F -11.0)
                                                                                               (- (* F (/ (/ -1.0 F) (sin B))) (/ x B))
                                                                                               (if (<= F -7.4e-178)
                                                                                                 (*
                                                                                                  (+ 1.0 (* -1.0 (/ (* F (pow (+ 2.0 (fma 2.0 x (pow F 2.0))) -0.5)) x)))
                                                                                                  (/ (- x) B))
                                                                                                 (if (<= F 5.6e-18)
                                                                                                   (/ (* -1.0 x) (tan B))
                                                                                                   (- (* F (/ 1.0 (* F (sin B)))) (/ x B))))))
                                                                                            double code(double F, double B, double x) {
                                                                                            	double tmp;
                                                                                            	if (F <= -11.0) {
                                                                                            		tmp = (F * ((-1.0 / F) / sin(B))) - (x / B);
                                                                                            	} else if (F <= -7.4e-178) {
                                                                                            		tmp = (1.0 + (-1.0 * ((F * pow((2.0 + fma(2.0, x, pow(F, 2.0))), -0.5)) / x))) * (-x / B);
                                                                                            	} else if (F <= 5.6e-18) {
                                                                                            		tmp = (-1.0 * x) / tan(B);
                                                                                            	} else {
                                                                                            		tmp = (F * (1.0 / (F * sin(B)))) - (x / B);
                                                                                            	}
                                                                                            	return tmp;
                                                                                            }
                                                                                            
                                                                                            function code(F, B, x)
                                                                                            	tmp = 0.0
                                                                                            	if (F <= -11.0)
                                                                                            		tmp = Float64(Float64(F * Float64(Float64(-1.0 / F) / sin(B))) - Float64(x / B));
                                                                                            	elseif (F <= -7.4e-178)
                                                                                            		tmp = Float64(Float64(1.0 + Float64(-1.0 * Float64(Float64(F * (Float64(2.0 + fma(2.0, x, (F ^ 2.0))) ^ -0.5)) / x))) * Float64(Float64(-x) / B));
                                                                                            	elseif (F <= 5.6e-18)
                                                                                            		tmp = Float64(Float64(-1.0 * x) / tan(B));
                                                                                            	else
                                                                                            		tmp = Float64(Float64(F * Float64(1.0 / Float64(F * sin(B)))) - Float64(x / B));
                                                                                            	end
                                                                                            	return tmp
                                                                                            end
                                                                                            
                                                                                            code[F_, B_, x_] := If[LessEqual[F, -11.0], N[(N[(F * N[(N[(-1.0 / F), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -7.4e-178], N[(N[(1.0 + N[(-1.0 * 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]), $MachinePrecision]), $MachinePrecision] * N[((-x) / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.6e-18], N[(N[(-1.0 * x), $MachinePrecision] / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(F * N[(1.0 / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]
                                                                                            
                                                                                            \begin{array}{l}
                                                                                            \mathbf{if}\;F \leq -11:\\
                                                                                            \;\;\;\;F \cdot \frac{\frac{-1}{F}}{\sin B} - \frac{x}{B}\\
                                                                                            
                                                                                            \mathbf{elif}\;F \leq -7.4 \cdot 10^{-178}:\\
                                                                                            \;\;\;\;\left(1 + -1 \cdot \frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5}}{x}\right) \cdot \frac{-x}{B}\\
                                                                                            
                                                                                            \mathbf{elif}\;F \leq 5.6 \cdot 10^{-18}:\\
                                                                                            \;\;\;\;\frac{-1 \cdot x}{\tan B}\\
                                                                                            
                                                                                            \mathbf{else}:\\
                                                                                            \;\;\;\;F \cdot \frac{1}{F \cdot \sin B} - \frac{x}{B}\\
                                                                                            
                                                                                            
                                                                                            \end{array}
                                                                                            
                                                                                            Derivation
                                                                                            1. Split input into 4 regimes
                                                                                            2. if F < -11

                                                                                              1. Initial program 76.3%

                                                                                                \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                              2. Taylor expanded in B around 0

                                                                                                \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                                                                              3. Step-by-step derivation
                                                                                                1. Applied rewrites49.3%

                                                                                                  \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                                                                                2. Applied rewrites49.4%

                                                                                                  \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} - \frac{x}{B}} \]
                                                                                                3. Step-by-step derivation
                                                                                                  1. lift-*.f64N/A

                                                                                                    \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}}} - \frac{x}{B} \]
                                                                                                  2. lift-/.f64N/A

                                                                                                    \[\leadsto \color{blue}{\frac{F}{\sin B}} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}} - \frac{x}{B} \]
                                                                                                  3. associate-*l/N/A

                                                                                                    \[\leadsto \color{blue}{\frac{F \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}}}{\sin B}} - \frac{x}{B} \]
                                                                                                  4. lift-pow.f64N/A

                                                                                                    \[\leadsto \frac{F \cdot \color{blue}{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}}}}{\sin B} - \frac{x}{B} \]
                                                                                                  5. lift-fma.f64N/A

                                                                                                    \[\leadsto \frac{F \cdot {\left(\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F + 2}\right)\right)}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                                  6. lift-fma.f64N/A

                                                                                                    \[\leadsto \frac{F \cdot {\color{blue}{\left(x \cdot 2 + \left(F \cdot F + 2\right)\right)}}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                                  7. add-flipN/A

                                                                                                    \[\leadsto \frac{F \cdot {\color{blue}{\left(x \cdot 2 - \left(\mathsf{neg}\left(\left(F \cdot F + 2\right)\right)\right)\right)}}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                                  8. *-commutativeN/A

                                                                                                    \[\leadsto \frac{F \cdot {\left(\color{blue}{2 \cdot x} - \left(\mathsf{neg}\left(\left(F \cdot F + 2\right)\right)\right)\right)}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                                  9. add-flipN/A

                                                                                                    \[\leadsto \frac{F \cdot {\color{blue}{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                                  10. +-commutativeN/A

                                                                                                    \[\leadsto \frac{F \cdot {\color{blue}{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                                  11. associate-/l*N/A

                                                                                                    \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\frac{-1}{2}}}{\sin B}} - \frac{x}{B} \]
                                                                                                  12. lower-*.f64N/A

                                                                                                    \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\frac{-1}{2}}}{\sin B}} - \frac{x}{B} \]
                                                                                                  13. lower-/.f64N/A

                                                                                                    \[\leadsto F \cdot \color{blue}{\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\frac{-1}{2}}}{\sin B}} - \frac{x}{B} \]
                                                                                                4. Applied rewrites57.7%

                                                                                                  \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B}} - \frac{x}{B} \]
                                                                                                5. Taylor expanded in F around -inf

                                                                                                  \[\leadsto F \cdot \frac{\color{blue}{\frac{-1}{F}}}{\sin B} - \frac{x}{B} \]
                                                                                                6. Step-by-step derivation
                                                                                                  1. lower-/.f6435.4

                                                                                                    \[\leadsto F \cdot \frac{\frac{-1}{\color{blue}{F}}}{\sin B} - \frac{x}{B} \]
                                                                                                7. Applied rewrites35.4%

                                                                                                  \[\leadsto F \cdot \frac{\color{blue}{\frac{-1}{F}}}{\sin B} - \frac{x}{B} \]

                                                                                                if -11 < F < -7.40000000000000008e-178

                                                                                                1. Initial program 76.3%

                                                                                                  \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                                2. Taylor expanded in B around 0

                                                                                                  \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                                                                                3. Step-by-step derivation
                                                                                                  1. Applied rewrites49.3%

                                                                                                    \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                                                                                  2. Applied rewrites40.4%

                                                                                                    \[\leadsto \color{blue}{\left(1 + \frac{\frac{F}{\sin B} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\frac{-x}{B}}\right) \cdot \frac{-x}{B}} \]
                                                                                                  3. Taylor expanded in B around 0

                                                                                                    \[\leadsto \left(1 + \color{blue}{-1 \cdot \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}}}{x}}\right) \cdot \frac{-x}{B} \]
                                                                                                  4. Step-by-step derivation
                                                                                                    1. lower-*.f64N/A

                                                                                                      \[\leadsto \left(1 + -1 \cdot \color{blue}{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}}}{x}}\right) \cdot \frac{-x}{B} \]
                                                                                                    2. lower-/.f64N/A

                                                                                                      \[\leadsto \left(1 + -1 \cdot \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}}}{\color{blue}{x}}\right) \cdot \frac{-x}{B} \]
                                                                                                    3. lower-*.f64N/A

                                                                                                      \[\leadsto \left(1 + -1 \cdot \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}}}{x}\right) \cdot \frac{-x}{B} \]
                                                                                                    4. lower-pow.f64N/A

                                                                                                      \[\leadsto \left(1 + -1 \cdot \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}}}{x}\right) \cdot \frac{-x}{B} \]
                                                                                                    5. lower-+.f64N/A

                                                                                                      \[\leadsto \left(1 + -1 \cdot \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}}}{x}\right) \cdot \frac{-x}{B} \]
                                                                                                    6. lower-fma.f64N/A

                                                                                                      \[\leadsto \left(1 + -1 \cdot \frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\frac{-1}{2}}}{x}\right) \cdot \frac{-x}{B} \]
                                                                                                    7. lower-pow.f6444.0

                                                                                                      \[\leadsto \left(1 + -1 \cdot \frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5}}{x}\right) \cdot \frac{-x}{B} \]
                                                                                                  5. Applied rewrites44.0%

                                                                                                    \[\leadsto \left(1 + \color{blue}{-1 \cdot \frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5}}{x}}\right) \cdot \frac{-x}{B} \]

                                                                                                  if -7.40000000000000008e-178 < F < 5.60000000000000025e-18

                                                                                                  1. Initial program 76.3%

                                                                                                    \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                                  2. Step-by-step derivation
                                                                                                    1. lift-+.f64N/A

                                                                                                      \[\leadsto \color{blue}{\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
                                                                                                    2. +-commutativeN/A

                                                                                                      \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
                                                                                                    3. lift-neg.f64N/A

                                                                                                      \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \color{blue}{\left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)} \]
                                                                                                    4. sub-flip-reverseN/A

                                                                                                      \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - x \cdot \frac{1}{\tan B}} \]
                                                                                                    5. lift-*.f64N/A

                                                                                                      \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \color{blue}{x \cdot \frac{1}{\tan B}} \]
                                                                                                    6. lift-/.f64N/A

                                                                                                      \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - x \cdot \color{blue}{\frac{1}{\tan B}} \]
                                                                                                    7. mult-flip-revN/A

                                                                                                      \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \color{blue}{\frac{x}{\tan B}} \]
                                                                                                    8. sub-to-fractionN/A

                                                                                                      \[\leadsto \color{blue}{\frac{\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                    9. lower-/.f64N/A

                                                                                                      \[\leadsto \color{blue}{\frac{\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                  3. Applied rewrites76.4%

                                                                                                    \[\leadsto \color{blue}{\frac{\left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \frac{F}{\sin B}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                  4. Taylor expanded in F around 0

                                                                                                    \[\leadsto \frac{\color{blue}{-1 \cdot x}}{\tan B} \]
                                                                                                  5. Step-by-step derivation
                                                                                                    1. lower-*.f6455.6

                                                                                                      \[\leadsto \frac{-1 \cdot \color{blue}{x}}{\tan B} \]
                                                                                                  6. Applied rewrites55.6%

                                                                                                    \[\leadsto \frac{\color{blue}{-1 \cdot x}}{\tan B} \]

                                                                                                  if 5.60000000000000025e-18 < F

                                                                                                  1. Initial program 76.3%

                                                                                                    \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                                  2. Taylor expanded in B around 0

                                                                                                    \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                                                                                  3. Step-by-step derivation
                                                                                                    1. Applied rewrites49.3%

                                                                                                      \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                                                                                    2. Applied rewrites49.4%

                                                                                                      \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} - \frac{x}{B}} \]
                                                                                                    3. Step-by-step derivation
                                                                                                      1. lift-*.f64N/A

                                                                                                        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}}} - \frac{x}{B} \]
                                                                                                      2. lift-/.f64N/A

                                                                                                        \[\leadsto \color{blue}{\frac{F}{\sin B}} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}} - \frac{x}{B} \]
                                                                                                      3. associate-*l/N/A

                                                                                                        \[\leadsto \color{blue}{\frac{F \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}}}{\sin B}} - \frac{x}{B} \]
                                                                                                      4. lift-pow.f64N/A

                                                                                                        \[\leadsto \frac{F \cdot \color{blue}{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}}}}{\sin B} - \frac{x}{B} \]
                                                                                                      5. lift-fma.f64N/A

                                                                                                        \[\leadsto \frac{F \cdot {\left(\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F + 2}\right)\right)}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                                      6. lift-fma.f64N/A

                                                                                                        \[\leadsto \frac{F \cdot {\color{blue}{\left(x \cdot 2 + \left(F \cdot F + 2\right)\right)}}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                                      7. add-flipN/A

                                                                                                        \[\leadsto \frac{F \cdot {\color{blue}{\left(x \cdot 2 - \left(\mathsf{neg}\left(\left(F \cdot F + 2\right)\right)\right)\right)}}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                                      8. *-commutativeN/A

                                                                                                        \[\leadsto \frac{F \cdot {\left(\color{blue}{2 \cdot x} - \left(\mathsf{neg}\left(\left(F \cdot F + 2\right)\right)\right)\right)}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                                      9. add-flipN/A

                                                                                                        \[\leadsto \frac{F \cdot {\color{blue}{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                                      10. +-commutativeN/A

                                                                                                        \[\leadsto \frac{F \cdot {\color{blue}{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                                      11. associate-/l*N/A

                                                                                                        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\frac{-1}{2}}}{\sin B}} - \frac{x}{B} \]
                                                                                                      12. lower-*.f64N/A

                                                                                                        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\frac{-1}{2}}}{\sin B}} - \frac{x}{B} \]
                                                                                                      13. lower-/.f64N/A

                                                                                                        \[\leadsto F \cdot \color{blue}{\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\frac{-1}{2}}}{\sin B}} - \frac{x}{B} \]
                                                                                                    4. Applied rewrites57.7%

                                                                                                      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B}} - \frac{x}{B} \]
                                                                                                    5. Taylor expanded in F around inf

                                                                                                      \[\leadsto F \cdot \color{blue}{\frac{1}{F \cdot \sin B}} - \frac{x}{B} \]
                                                                                                    6. Step-by-step derivation
                                                                                                      1. lower-/.f64N/A

                                                                                                        \[\leadsto F \cdot \frac{1}{\color{blue}{F \cdot \sin B}} - \frac{x}{B} \]
                                                                                                      2. lower-*.f64N/A

                                                                                                        \[\leadsto F \cdot \frac{1}{F \cdot \color{blue}{\sin B}} - \frac{x}{B} \]
                                                                                                      3. lower-sin.f6432.3

                                                                                                        \[\leadsto F \cdot \frac{1}{F \cdot \sin B} - \frac{x}{B} \]
                                                                                                    7. Applied rewrites32.3%

                                                                                                      \[\leadsto F \cdot \color{blue}{\frac{1}{F \cdot \sin B}} - \frac{x}{B} \]
                                                                                                  4. Recombined 4 regimes into one program.
                                                                                                  5. Add Preprocessing

                                                                                                  Alternative 19: 70.8% accurate, 1.9× speedup?

                                                                                                  \[\begin{array}{l} \mathbf{if}\;F \leq -11:\\ \;\;\;\;F \cdot \frac{\frac{-1}{F}}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq -7.4 \cdot 10^{-178}:\\ \;\;\;\;\frac{F}{B} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 5.6 \cdot 10^{-18}:\\ \;\;\;\;\frac{-1 \cdot x}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;F \cdot \frac{1}{F \cdot \sin B} - \frac{x}{B}\\ \end{array} \]
                                                                                                  (FPCore (F B x)
                                                                                                   :precision binary64
                                                                                                   (if (<= F -11.0)
                                                                                                     (- (* F (/ (/ -1.0 F) (sin B))) (/ x B))
                                                                                                     (if (<= F -7.4e-178)
                                                                                                       (- (* (/ F B) (pow (fma x 2.0 (fma F F 2.0)) -0.5)) (/ x B))
                                                                                                       (if (<= F 5.6e-18)
                                                                                                         (/ (* -1.0 x) (tan B))
                                                                                                         (- (* F (/ 1.0 (* F (sin B)))) (/ x B))))))
                                                                                                  double code(double F, double B, double x) {
                                                                                                  	double tmp;
                                                                                                  	if (F <= -11.0) {
                                                                                                  		tmp = (F * ((-1.0 / F) / sin(B))) - (x / B);
                                                                                                  	} else if (F <= -7.4e-178) {
                                                                                                  		tmp = ((F / B) * pow(fma(x, 2.0, fma(F, F, 2.0)), -0.5)) - (x / B);
                                                                                                  	} else if (F <= 5.6e-18) {
                                                                                                  		tmp = (-1.0 * x) / tan(B);
                                                                                                  	} else {
                                                                                                  		tmp = (F * (1.0 / (F * sin(B)))) - (x / B);
                                                                                                  	}
                                                                                                  	return tmp;
                                                                                                  }
                                                                                                  
                                                                                                  function code(F, B, x)
                                                                                                  	tmp = 0.0
                                                                                                  	if (F <= -11.0)
                                                                                                  		tmp = Float64(Float64(F * Float64(Float64(-1.0 / F) / sin(B))) - Float64(x / B));
                                                                                                  	elseif (F <= -7.4e-178)
                                                                                                  		tmp = Float64(Float64(Float64(F / B) * (fma(x, 2.0, fma(F, F, 2.0)) ^ -0.5)) - Float64(x / B));
                                                                                                  	elseif (F <= 5.6e-18)
                                                                                                  		tmp = Float64(Float64(-1.0 * x) / tan(B));
                                                                                                  	else
                                                                                                  		tmp = Float64(Float64(F * Float64(1.0 / Float64(F * sin(B)))) - Float64(x / B));
                                                                                                  	end
                                                                                                  	return tmp
                                                                                                  end
                                                                                                  
                                                                                                  code[F_, B_, x_] := If[LessEqual[F, -11.0], N[(N[(F * N[(N[(-1.0 / F), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -7.4e-178], N[(N[(N[(F / B), $MachinePrecision] * N[Power[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.6e-18], N[(N[(-1.0 * x), $MachinePrecision] / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(F * N[(1.0 / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]
                                                                                                  
                                                                                                  \begin{array}{l}
                                                                                                  \mathbf{if}\;F \leq -11:\\
                                                                                                  \;\;\;\;F \cdot \frac{\frac{-1}{F}}{\sin B} - \frac{x}{B}\\
                                                                                                  
                                                                                                  \mathbf{elif}\;F \leq -7.4 \cdot 10^{-178}:\\
                                                                                                  \;\;\;\;\frac{F}{B} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} - \frac{x}{B}\\
                                                                                                  
                                                                                                  \mathbf{elif}\;F \leq 5.6 \cdot 10^{-18}:\\
                                                                                                  \;\;\;\;\frac{-1 \cdot x}{\tan B}\\
                                                                                                  
                                                                                                  \mathbf{else}:\\
                                                                                                  \;\;\;\;F \cdot \frac{1}{F \cdot \sin B} - \frac{x}{B}\\
                                                                                                  
                                                                                                  
                                                                                                  \end{array}
                                                                                                  
                                                                                                  Derivation
                                                                                                  1. Split input into 4 regimes
                                                                                                  2. if F < -11

                                                                                                    1. Initial program 76.3%

                                                                                                      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                                    2. Taylor expanded in B around 0

                                                                                                      \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                                                                                    3. Step-by-step derivation
                                                                                                      1. Applied rewrites49.3%

                                                                                                        \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                                                                                      2. Applied rewrites49.4%

                                                                                                        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} - \frac{x}{B}} \]
                                                                                                      3. Step-by-step derivation
                                                                                                        1. lift-*.f64N/A

                                                                                                          \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}}} - \frac{x}{B} \]
                                                                                                        2. lift-/.f64N/A

                                                                                                          \[\leadsto \color{blue}{\frac{F}{\sin B}} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}} - \frac{x}{B} \]
                                                                                                        3. associate-*l/N/A

                                                                                                          \[\leadsto \color{blue}{\frac{F \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}}}{\sin B}} - \frac{x}{B} \]
                                                                                                        4. lift-pow.f64N/A

                                                                                                          \[\leadsto \frac{F \cdot \color{blue}{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}}}}{\sin B} - \frac{x}{B} \]
                                                                                                        5. lift-fma.f64N/A

                                                                                                          \[\leadsto \frac{F \cdot {\left(\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F + 2}\right)\right)}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                                        6. lift-fma.f64N/A

                                                                                                          \[\leadsto \frac{F \cdot {\color{blue}{\left(x \cdot 2 + \left(F \cdot F + 2\right)\right)}}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                                        7. add-flipN/A

                                                                                                          \[\leadsto \frac{F \cdot {\color{blue}{\left(x \cdot 2 - \left(\mathsf{neg}\left(\left(F \cdot F + 2\right)\right)\right)\right)}}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                                        8. *-commutativeN/A

                                                                                                          \[\leadsto \frac{F \cdot {\left(\color{blue}{2 \cdot x} - \left(\mathsf{neg}\left(\left(F \cdot F + 2\right)\right)\right)\right)}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                                        9. add-flipN/A

                                                                                                          \[\leadsto \frac{F \cdot {\color{blue}{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                                        10. +-commutativeN/A

                                                                                                          \[\leadsto \frac{F \cdot {\color{blue}{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                                        11. associate-/l*N/A

                                                                                                          \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\frac{-1}{2}}}{\sin B}} - \frac{x}{B} \]
                                                                                                        12. lower-*.f64N/A

                                                                                                          \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\frac{-1}{2}}}{\sin B}} - \frac{x}{B} \]
                                                                                                        13. lower-/.f64N/A

                                                                                                          \[\leadsto F \cdot \color{blue}{\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\frac{-1}{2}}}{\sin B}} - \frac{x}{B} \]
                                                                                                      4. Applied rewrites57.7%

                                                                                                        \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B}} - \frac{x}{B} \]
                                                                                                      5. Taylor expanded in F around -inf

                                                                                                        \[\leadsto F \cdot \frac{\color{blue}{\frac{-1}{F}}}{\sin B} - \frac{x}{B} \]
                                                                                                      6. Step-by-step derivation
                                                                                                        1. lower-/.f6435.4

                                                                                                          \[\leadsto F \cdot \frac{\frac{-1}{\color{blue}{F}}}{\sin B} - \frac{x}{B} \]
                                                                                                      7. Applied rewrites35.4%

                                                                                                        \[\leadsto F \cdot \frac{\color{blue}{\frac{-1}{F}}}{\sin B} - \frac{x}{B} \]

                                                                                                      if -11 < F < -7.40000000000000008e-178

                                                                                                      1. Initial program 76.3%

                                                                                                        \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                                      2. Taylor expanded in B around 0

                                                                                                        \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                                                                                      3. Step-by-step derivation
                                                                                                        1. Applied rewrites49.3%

                                                                                                          \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                                                                                        2. Applied rewrites49.4%

                                                                                                          \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} - \frac{x}{B}} \]
                                                                                                        3. Taylor expanded in B around 0

                                                                                                          \[\leadsto \color{blue}{\frac{F}{B}} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}} - \frac{x}{B} \]
                                                                                                        4. Step-by-step derivation
                                                                                                          1. lower-/.f6435.7

                                                                                                            \[\leadsto \frac{F}{\color{blue}{B}} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} - \frac{x}{B} \]
                                                                                                        5. Applied rewrites35.7%

                                                                                                          \[\leadsto \color{blue}{\frac{F}{B}} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} - \frac{x}{B} \]

                                                                                                        if -7.40000000000000008e-178 < F < 5.60000000000000025e-18

                                                                                                        1. Initial program 76.3%

                                                                                                          \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                                        2. Step-by-step derivation
                                                                                                          1. lift-+.f64N/A

                                                                                                            \[\leadsto \color{blue}{\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
                                                                                                          2. +-commutativeN/A

                                                                                                            \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
                                                                                                          3. lift-neg.f64N/A

                                                                                                            \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \color{blue}{\left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)} \]
                                                                                                          4. sub-flip-reverseN/A

                                                                                                            \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - x \cdot \frac{1}{\tan B}} \]
                                                                                                          5. lift-*.f64N/A

                                                                                                            \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \color{blue}{x \cdot \frac{1}{\tan B}} \]
                                                                                                          6. lift-/.f64N/A

                                                                                                            \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - x \cdot \color{blue}{\frac{1}{\tan B}} \]
                                                                                                          7. mult-flip-revN/A

                                                                                                            \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \color{blue}{\frac{x}{\tan B}} \]
                                                                                                          8. sub-to-fractionN/A

                                                                                                            \[\leadsto \color{blue}{\frac{\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                          9. lower-/.f64N/A

                                                                                                            \[\leadsto \color{blue}{\frac{\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                        3. Applied rewrites76.4%

                                                                                                          \[\leadsto \color{blue}{\frac{\left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \frac{F}{\sin B}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                        4. Taylor expanded in F around 0

                                                                                                          \[\leadsto \frac{\color{blue}{-1 \cdot x}}{\tan B} \]
                                                                                                        5. Step-by-step derivation
                                                                                                          1. lower-*.f6455.6

                                                                                                            \[\leadsto \frac{-1 \cdot \color{blue}{x}}{\tan B} \]
                                                                                                        6. Applied rewrites55.6%

                                                                                                          \[\leadsto \frac{\color{blue}{-1 \cdot x}}{\tan B} \]

                                                                                                        if 5.60000000000000025e-18 < F

                                                                                                        1. Initial program 76.3%

                                                                                                          \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                                        2. Taylor expanded in B around 0

                                                                                                          \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                                                                                        3. Step-by-step derivation
                                                                                                          1. Applied rewrites49.3%

                                                                                                            \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                                                                                          2. Applied rewrites49.4%

                                                                                                            \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} - \frac{x}{B}} \]
                                                                                                          3. Step-by-step derivation
                                                                                                            1. lift-*.f64N/A

                                                                                                              \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}}} - \frac{x}{B} \]
                                                                                                            2. lift-/.f64N/A

                                                                                                              \[\leadsto \color{blue}{\frac{F}{\sin B}} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}} - \frac{x}{B} \]
                                                                                                            3. associate-*l/N/A

                                                                                                              \[\leadsto \color{blue}{\frac{F \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}}}{\sin B}} - \frac{x}{B} \]
                                                                                                            4. lift-pow.f64N/A

                                                                                                              \[\leadsto \frac{F \cdot \color{blue}{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}}}}{\sin B} - \frac{x}{B} \]
                                                                                                            5. lift-fma.f64N/A

                                                                                                              \[\leadsto \frac{F \cdot {\left(\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F + 2}\right)\right)}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                                            6. lift-fma.f64N/A

                                                                                                              \[\leadsto \frac{F \cdot {\color{blue}{\left(x \cdot 2 + \left(F \cdot F + 2\right)\right)}}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                                            7. add-flipN/A

                                                                                                              \[\leadsto \frac{F \cdot {\color{blue}{\left(x \cdot 2 - \left(\mathsf{neg}\left(\left(F \cdot F + 2\right)\right)\right)\right)}}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                                            8. *-commutativeN/A

                                                                                                              \[\leadsto \frac{F \cdot {\left(\color{blue}{2 \cdot x} - \left(\mathsf{neg}\left(\left(F \cdot F + 2\right)\right)\right)\right)}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                                            9. add-flipN/A

                                                                                                              \[\leadsto \frac{F \cdot {\color{blue}{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                                            10. +-commutativeN/A

                                                                                                              \[\leadsto \frac{F \cdot {\color{blue}{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                                            11. associate-/l*N/A

                                                                                                              \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\frac{-1}{2}}}{\sin B}} - \frac{x}{B} \]
                                                                                                            12. lower-*.f64N/A

                                                                                                              \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\frac{-1}{2}}}{\sin B}} - \frac{x}{B} \]
                                                                                                            13. lower-/.f64N/A

                                                                                                              \[\leadsto F \cdot \color{blue}{\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\frac{-1}{2}}}{\sin B}} - \frac{x}{B} \]
                                                                                                          4. Applied rewrites57.7%

                                                                                                            \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B}} - \frac{x}{B} \]
                                                                                                          5. Taylor expanded in F around inf

                                                                                                            \[\leadsto F \cdot \color{blue}{\frac{1}{F \cdot \sin B}} - \frac{x}{B} \]
                                                                                                          6. Step-by-step derivation
                                                                                                            1. lower-/.f64N/A

                                                                                                              \[\leadsto F \cdot \frac{1}{\color{blue}{F \cdot \sin B}} - \frac{x}{B} \]
                                                                                                            2. lower-*.f64N/A

                                                                                                              \[\leadsto F \cdot \frac{1}{F \cdot \color{blue}{\sin B}} - \frac{x}{B} \]
                                                                                                            3. lower-sin.f6432.3

                                                                                                              \[\leadsto F \cdot \frac{1}{F \cdot \sin B} - \frac{x}{B} \]
                                                                                                          7. Applied rewrites32.3%

                                                                                                            \[\leadsto F \cdot \color{blue}{\frac{1}{F \cdot \sin B}} - \frac{x}{B} \]
                                                                                                        4. Recombined 4 regimes into one program.
                                                                                                        5. Add Preprocessing

                                                                                                        Alternative 20: 70.8% accurate, 1.9× speedup?

                                                                                                        \[\begin{array}{l} t_0 := F \cdot \sin B\\ \mathbf{if}\;F \leq -11:\\ \;\;\;\;F \cdot \frac{-1}{t\_0} - \frac{x}{B}\\ \mathbf{elif}\;F \leq -7.4 \cdot 10^{-178}:\\ \;\;\;\;\frac{F}{B} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 5.6 \cdot 10^{-18}:\\ \;\;\;\;\frac{-1 \cdot x}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;F \cdot \frac{1}{t\_0} - \frac{x}{B}\\ \end{array} \]
                                                                                                        (FPCore (F B x)
                                                                                                         :precision binary64
                                                                                                         (let* ((t_0 (* F (sin B))))
                                                                                                           (if (<= F -11.0)
                                                                                                             (- (* F (/ -1.0 t_0)) (/ x B))
                                                                                                             (if (<= F -7.4e-178)
                                                                                                               (- (* (/ F B) (pow (fma x 2.0 (fma F F 2.0)) -0.5)) (/ x B))
                                                                                                               (if (<= F 5.6e-18)
                                                                                                                 (/ (* -1.0 x) (tan B))
                                                                                                                 (- (* F (/ 1.0 t_0)) (/ x B)))))))
                                                                                                        double code(double F, double B, double x) {
                                                                                                        	double t_0 = F * sin(B);
                                                                                                        	double tmp;
                                                                                                        	if (F <= -11.0) {
                                                                                                        		tmp = (F * (-1.0 / t_0)) - (x / B);
                                                                                                        	} else if (F <= -7.4e-178) {
                                                                                                        		tmp = ((F / B) * pow(fma(x, 2.0, fma(F, F, 2.0)), -0.5)) - (x / B);
                                                                                                        	} else if (F <= 5.6e-18) {
                                                                                                        		tmp = (-1.0 * x) / tan(B);
                                                                                                        	} else {
                                                                                                        		tmp = (F * (1.0 / t_0)) - (x / B);
                                                                                                        	}
                                                                                                        	return tmp;
                                                                                                        }
                                                                                                        
                                                                                                        function code(F, B, x)
                                                                                                        	t_0 = Float64(F * sin(B))
                                                                                                        	tmp = 0.0
                                                                                                        	if (F <= -11.0)
                                                                                                        		tmp = Float64(Float64(F * Float64(-1.0 / t_0)) - Float64(x / B));
                                                                                                        	elseif (F <= -7.4e-178)
                                                                                                        		tmp = Float64(Float64(Float64(F / B) * (fma(x, 2.0, fma(F, F, 2.0)) ^ -0.5)) - Float64(x / B));
                                                                                                        	elseif (F <= 5.6e-18)
                                                                                                        		tmp = Float64(Float64(-1.0 * x) / tan(B));
                                                                                                        	else
                                                                                                        		tmp = Float64(Float64(F * Float64(1.0 / t_0)) - Float64(x / B));
                                                                                                        	end
                                                                                                        	return tmp
                                                                                                        end
                                                                                                        
                                                                                                        code[F_, B_, x_] := Block[{t$95$0 = N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -11.0], N[(N[(F * N[(-1.0 / t$95$0), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -7.4e-178], N[(N[(N[(F / B), $MachinePrecision] * N[Power[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.6e-18], N[(N[(-1.0 * x), $MachinePrecision] / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(F * N[(1.0 / t$95$0), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]
                                                                                                        
                                                                                                        \begin{array}{l}
                                                                                                        t_0 := F \cdot \sin B\\
                                                                                                        \mathbf{if}\;F \leq -11:\\
                                                                                                        \;\;\;\;F \cdot \frac{-1}{t\_0} - \frac{x}{B}\\
                                                                                                        
                                                                                                        \mathbf{elif}\;F \leq -7.4 \cdot 10^{-178}:\\
                                                                                                        \;\;\;\;\frac{F}{B} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} - \frac{x}{B}\\
                                                                                                        
                                                                                                        \mathbf{elif}\;F \leq 5.6 \cdot 10^{-18}:\\
                                                                                                        \;\;\;\;\frac{-1 \cdot x}{\tan B}\\
                                                                                                        
                                                                                                        \mathbf{else}:\\
                                                                                                        \;\;\;\;F \cdot \frac{1}{t\_0} - \frac{x}{B}\\
                                                                                                        
                                                                                                        
                                                                                                        \end{array}
                                                                                                        
                                                                                                        Derivation
                                                                                                        1. Split input into 4 regimes
                                                                                                        2. if F < -11

                                                                                                          1. Initial program 76.3%

                                                                                                            \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                                          2. Taylor expanded in B around 0

                                                                                                            \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                                                                                          3. Step-by-step derivation
                                                                                                            1. Applied rewrites49.3%

                                                                                                              \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                                                                                            2. Applied rewrites49.4%

                                                                                                              \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} - \frac{x}{B}} \]
                                                                                                            3. Step-by-step derivation
                                                                                                              1. lift-*.f64N/A

                                                                                                                \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}}} - \frac{x}{B} \]
                                                                                                              2. lift-/.f64N/A

                                                                                                                \[\leadsto \color{blue}{\frac{F}{\sin B}} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}} - \frac{x}{B} \]
                                                                                                              3. associate-*l/N/A

                                                                                                                \[\leadsto \color{blue}{\frac{F \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}}}{\sin B}} - \frac{x}{B} \]
                                                                                                              4. lift-pow.f64N/A

                                                                                                                \[\leadsto \frac{F \cdot \color{blue}{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}}}}{\sin B} - \frac{x}{B} \]
                                                                                                              5. lift-fma.f64N/A

                                                                                                                \[\leadsto \frac{F \cdot {\left(\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F + 2}\right)\right)}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                                              6. lift-fma.f64N/A

                                                                                                                \[\leadsto \frac{F \cdot {\color{blue}{\left(x \cdot 2 + \left(F \cdot F + 2\right)\right)}}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                                              7. add-flipN/A

                                                                                                                \[\leadsto \frac{F \cdot {\color{blue}{\left(x \cdot 2 - \left(\mathsf{neg}\left(\left(F \cdot F + 2\right)\right)\right)\right)}}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                                              8. *-commutativeN/A

                                                                                                                \[\leadsto \frac{F \cdot {\left(\color{blue}{2 \cdot x} - \left(\mathsf{neg}\left(\left(F \cdot F + 2\right)\right)\right)\right)}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                                              9. add-flipN/A

                                                                                                                \[\leadsto \frac{F \cdot {\color{blue}{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                                              10. +-commutativeN/A

                                                                                                                \[\leadsto \frac{F \cdot {\color{blue}{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                                              11. associate-/l*N/A

                                                                                                                \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\frac{-1}{2}}}{\sin B}} - \frac{x}{B} \]
                                                                                                              12. lower-*.f64N/A

                                                                                                                \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\frac{-1}{2}}}{\sin B}} - \frac{x}{B} \]
                                                                                                              13. lower-/.f64N/A

                                                                                                                \[\leadsto F \cdot \color{blue}{\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\frac{-1}{2}}}{\sin B}} - \frac{x}{B} \]
                                                                                                            4. Applied rewrites57.7%

                                                                                                              \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B}} - \frac{x}{B} \]
                                                                                                            5. Taylor expanded in F around -inf

                                                                                                              \[\leadsto F \cdot \color{blue}{\frac{-1}{F \cdot \sin B}} - \frac{x}{B} \]
                                                                                                            6. Step-by-step derivation
                                                                                                              1. lower-/.f64N/A

                                                                                                                \[\leadsto F \cdot \frac{-1}{\color{blue}{F \cdot \sin B}} - \frac{x}{B} \]
                                                                                                              2. lower-*.f64N/A

                                                                                                                \[\leadsto F \cdot \frac{-1}{F \cdot \color{blue}{\sin B}} - \frac{x}{B} \]
                                                                                                              3. lower-sin.f6435.4

                                                                                                                \[\leadsto F \cdot \frac{-1}{F \cdot \sin B} - \frac{x}{B} \]
                                                                                                            7. Applied rewrites35.4%

                                                                                                              \[\leadsto F \cdot \color{blue}{\frac{-1}{F \cdot \sin B}} - \frac{x}{B} \]

                                                                                                            if -11 < F < -7.40000000000000008e-178

                                                                                                            1. Initial program 76.3%

                                                                                                              \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                                            2. Taylor expanded in B around 0

                                                                                                              \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                                                                                            3. Step-by-step derivation
                                                                                                              1. Applied rewrites49.3%

                                                                                                                \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                                                                                              2. Applied rewrites49.4%

                                                                                                                \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} - \frac{x}{B}} \]
                                                                                                              3. Taylor expanded in B around 0

                                                                                                                \[\leadsto \color{blue}{\frac{F}{B}} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}} - \frac{x}{B} \]
                                                                                                              4. Step-by-step derivation
                                                                                                                1. lower-/.f6435.7

                                                                                                                  \[\leadsto \frac{F}{\color{blue}{B}} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} - \frac{x}{B} \]
                                                                                                              5. Applied rewrites35.7%

                                                                                                                \[\leadsto \color{blue}{\frac{F}{B}} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} - \frac{x}{B} \]

                                                                                                              if -7.40000000000000008e-178 < F < 5.60000000000000025e-18

                                                                                                              1. Initial program 76.3%

                                                                                                                \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                                              2. Step-by-step derivation
                                                                                                                1. lift-+.f64N/A

                                                                                                                  \[\leadsto \color{blue}{\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
                                                                                                                2. +-commutativeN/A

                                                                                                                  \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
                                                                                                                3. lift-neg.f64N/A

                                                                                                                  \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \color{blue}{\left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)} \]
                                                                                                                4. sub-flip-reverseN/A

                                                                                                                  \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - x \cdot \frac{1}{\tan B}} \]
                                                                                                                5. lift-*.f64N/A

                                                                                                                  \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \color{blue}{x \cdot \frac{1}{\tan B}} \]
                                                                                                                6. lift-/.f64N/A

                                                                                                                  \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - x \cdot \color{blue}{\frac{1}{\tan B}} \]
                                                                                                                7. mult-flip-revN/A

                                                                                                                  \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \color{blue}{\frac{x}{\tan B}} \]
                                                                                                                8. sub-to-fractionN/A

                                                                                                                  \[\leadsto \color{blue}{\frac{\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                                9. lower-/.f64N/A

                                                                                                                  \[\leadsto \color{blue}{\frac{\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                              3. Applied rewrites76.4%

                                                                                                                \[\leadsto \color{blue}{\frac{\left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \frac{F}{\sin B}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                              4. Taylor expanded in F around 0

                                                                                                                \[\leadsto \frac{\color{blue}{-1 \cdot x}}{\tan B} \]
                                                                                                              5. Step-by-step derivation
                                                                                                                1. lower-*.f6455.6

                                                                                                                  \[\leadsto \frac{-1 \cdot \color{blue}{x}}{\tan B} \]
                                                                                                              6. Applied rewrites55.6%

                                                                                                                \[\leadsto \frac{\color{blue}{-1 \cdot x}}{\tan B} \]

                                                                                                              if 5.60000000000000025e-18 < F

                                                                                                              1. Initial program 76.3%

                                                                                                                \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                                              2. Taylor expanded in B around 0

                                                                                                                \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                                                                                              3. Step-by-step derivation
                                                                                                                1. Applied rewrites49.3%

                                                                                                                  \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                                                                                                2. Applied rewrites49.4%

                                                                                                                  \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} - \frac{x}{B}} \]
                                                                                                                3. Step-by-step derivation
                                                                                                                  1. lift-*.f64N/A

                                                                                                                    \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}}} - \frac{x}{B} \]
                                                                                                                  2. lift-/.f64N/A

                                                                                                                    \[\leadsto \color{blue}{\frac{F}{\sin B}} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}} - \frac{x}{B} \]
                                                                                                                  3. associate-*l/N/A

                                                                                                                    \[\leadsto \color{blue}{\frac{F \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}}}{\sin B}} - \frac{x}{B} \]
                                                                                                                  4. lift-pow.f64N/A

                                                                                                                    \[\leadsto \frac{F \cdot \color{blue}{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}}}}{\sin B} - \frac{x}{B} \]
                                                                                                                  5. lift-fma.f64N/A

                                                                                                                    \[\leadsto \frac{F \cdot {\left(\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F + 2}\right)\right)}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                                                  6. lift-fma.f64N/A

                                                                                                                    \[\leadsto \frac{F \cdot {\color{blue}{\left(x \cdot 2 + \left(F \cdot F + 2\right)\right)}}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                                                  7. add-flipN/A

                                                                                                                    \[\leadsto \frac{F \cdot {\color{blue}{\left(x \cdot 2 - \left(\mathsf{neg}\left(\left(F \cdot F + 2\right)\right)\right)\right)}}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                                                  8. *-commutativeN/A

                                                                                                                    \[\leadsto \frac{F \cdot {\left(\color{blue}{2 \cdot x} - \left(\mathsf{neg}\left(\left(F \cdot F + 2\right)\right)\right)\right)}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                                                  9. add-flipN/A

                                                                                                                    \[\leadsto \frac{F \cdot {\color{blue}{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                                                  10. +-commutativeN/A

                                                                                                                    \[\leadsto \frac{F \cdot {\color{blue}{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                                                  11. associate-/l*N/A

                                                                                                                    \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\frac{-1}{2}}}{\sin B}} - \frac{x}{B} \]
                                                                                                                  12. lower-*.f64N/A

                                                                                                                    \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\frac{-1}{2}}}{\sin B}} - \frac{x}{B} \]
                                                                                                                  13. lower-/.f64N/A

                                                                                                                    \[\leadsto F \cdot \color{blue}{\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\frac{-1}{2}}}{\sin B}} - \frac{x}{B} \]
                                                                                                                4. Applied rewrites57.7%

                                                                                                                  \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B}} - \frac{x}{B} \]
                                                                                                                5. Taylor expanded in F around inf

                                                                                                                  \[\leadsto F \cdot \color{blue}{\frac{1}{F \cdot \sin B}} - \frac{x}{B} \]
                                                                                                                6. Step-by-step derivation
                                                                                                                  1. lower-/.f64N/A

                                                                                                                    \[\leadsto F \cdot \frac{1}{\color{blue}{F \cdot \sin B}} - \frac{x}{B} \]
                                                                                                                  2. lower-*.f64N/A

                                                                                                                    \[\leadsto F \cdot \frac{1}{F \cdot \color{blue}{\sin B}} - \frac{x}{B} \]
                                                                                                                  3. lower-sin.f6432.3

                                                                                                                    \[\leadsto F \cdot \frac{1}{F \cdot \sin B} - \frac{x}{B} \]
                                                                                                                7. Applied rewrites32.3%

                                                                                                                  \[\leadsto F \cdot \color{blue}{\frac{1}{F \cdot \sin B}} - \frac{x}{B} \]
                                                                                                              4. Recombined 4 regimes into one program.
                                                                                                              5. Add Preprocessing

                                                                                                              Alternative 21: 69.9% accurate, 2.2× speedup?

                                                                                                              \[\begin{array}{l} \mathbf{if}\;F \leq -11:\\ \;\;\;\;F \cdot \frac{-1}{F \cdot \sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq -7.4 \cdot 10^{-178}:\\ \;\;\;\;\frac{F}{B} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 5.2 \cdot 10^{-17}:\\ \;\;\;\;\frac{-1 \cdot x}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
                                                                                                              (FPCore (F B x)
                                                                                                               :precision binary64
                                                                                                               (if (<= F -11.0)
                                                                                                                 (- (* F (/ -1.0 (* F (sin B)))) (/ x B))
                                                                                                                 (if (<= F -7.4e-178)
                                                                                                                   (- (* (/ F B) (pow (fma x 2.0 (fma F F 2.0)) -0.5)) (/ x B))
                                                                                                                   (if (<= F 5.2e-17) (/ (* -1.0 x) (tan B)) (/ 1.0 (sin B))))))
                                                                                                              double code(double F, double B, double x) {
                                                                                                              	double tmp;
                                                                                                              	if (F <= -11.0) {
                                                                                                              		tmp = (F * (-1.0 / (F * sin(B)))) - (x / B);
                                                                                                              	} else if (F <= -7.4e-178) {
                                                                                                              		tmp = ((F / B) * pow(fma(x, 2.0, fma(F, F, 2.0)), -0.5)) - (x / B);
                                                                                                              	} else if (F <= 5.2e-17) {
                                                                                                              		tmp = (-1.0 * x) / tan(B);
                                                                                                              	} else {
                                                                                                              		tmp = 1.0 / sin(B);
                                                                                                              	}
                                                                                                              	return tmp;
                                                                                                              }
                                                                                                              
                                                                                                              function code(F, B, x)
                                                                                                              	tmp = 0.0
                                                                                                              	if (F <= -11.0)
                                                                                                              		tmp = Float64(Float64(F * Float64(-1.0 / Float64(F * sin(B)))) - Float64(x / B));
                                                                                                              	elseif (F <= -7.4e-178)
                                                                                                              		tmp = Float64(Float64(Float64(F / B) * (fma(x, 2.0, fma(F, F, 2.0)) ^ -0.5)) - Float64(x / B));
                                                                                                              	elseif (F <= 5.2e-17)
                                                                                                              		tmp = Float64(Float64(-1.0 * x) / tan(B));
                                                                                                              	else
                                                                                                              		tmp = Float64(1.0 / sin(B));
                                                                                                              	end
                                                                                                              	return tmp
                                                                                                              end
                                                                                                              
                                                                                                              code[F_, B_, x_] := If[LessEqual[F, -11.0], N[(N[(F * N[(-1.0 / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -7.4e-178], N[(N[(N[(F / B), $MachinePrecision] * N[Power[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.2e-17], N[(N[(-1.0 * x), $MachinePrecision] / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]]
                                                                                                              
                                                                                                              \begin{array}{l}
                                                                                                              \mathbf{if}\;F \leq -11:\\
                                                                                                              \;\;\;\;F \cdot \frac{-1}{F \cdot \sin B} - \frac{x}{B}\\
                                                                                                              
                                                                                                              \mathbf{elif}\;F \leq -7.4 \cdot 10^{-178}:\\
                                                                                                              \;\;\;\;\frac{F}{B} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} - \frac{x}{B}\\
                                                                                                              
                                                                                                              \mathbf{elif}\;F \leq 5.2 \cdot 10^{-17}:\\
                                                                                                              \;\;\;\;\frac{-1 \cdot x}{\tan B}\\
                                                                                                              
                                                                                                              \mathbf{else}:\\
                                                                                                              \;\;\;\;\frac{1}{\sin B}\\
                                                                                                              
                                                                                                              
                                                                                                              \end{array}
                                                                                                              
                                                                                                              Derivation
                                                                                                              1. Split input into 4 regimes
                                                                                                              2. if F < -11

                                                                                                                1. Initial program 76.3%

                                                                                                                  \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                                                2. Taylor expanded in B around 0

                                                                                                                  \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                                                                                                3. Step-by-step derivation
                                                                                                                  1. Applied rewrites49.3%

                                                                                                                    \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                                                                                                  2. Applied rewrites49.4%

                                                                                                                    \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} - \frac{x}{B}} \]
                                                                                                                  3. Step-by-step derivation
                                                                                                                    1. lift-*.f64N/A

                                                                                                                      \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}}} - \frac{x}{B} \]
                                                                                                                    2. lift-/.f64N/A

                                                                                                                      \[\leadsto \color{blue}{\frac{F}{\sin B}} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}} - \frac{x}{B} \]
                                                                                                                    3. associate-*l/N/A

                                                                                                                      \[\leadsto \color{blue}{\frac{F \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}}}{\sin B}} - \frac{x}{B} \]
                                                                                                                    4. lift-pow.f64N/A

                                                                                                                      \[\leadsto \frac{F \cdot \color{blue}{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}}}}{\sin B} - \frac{x}{B} \]
                                                                                                                    5. lift-fma.f64N/A

                                                                                                                      \[\leadsto \frac{F \cdot {\left(\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F + 2}\right)\right)}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                                                    6. lift-fma.f64N/A

                                                                                                                      \[\leadsto \frac{F \cdot {\color{blue}{\left(x \cdot 2 + \left(F \cdot F + 2\right)\right)}}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                                                    7. add-flipN/A

                                                                                                                      \[\leadsto \frac{F \cdot {\color{blue}{\left(x \cdot 2 - \left(\mathsf{neg}\left(\left(F \cdot F + 2\right)\right)\right)\right)}}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                                                    8. *-commutativeN/A

                                                                                                                      \[\leadsto \frac{F \cdot {\left(\color{blue}{2 \cdot x} - \left(\mathsf{neg}\left(\left(F \cdot F + 2\right)\right)\right)\right)}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                                                    9. add-flipN/A

                                                                                                                      \[\leadsto \frac{F \cdot {\color{blue}{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                                                    10. +-commutativeN/A

                                                                                                                      \[\leadsto \frac{F \cdot {\color{blue}{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}}^{\frac{-1}{2}}}{\sin B} - \frac{x}{B} \]
                                                                                                                    11. associate-/l*N/A

                                                                                                                      \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\frac{-1}{2}}}{\sin B}} - \frac{x}{B} \]
                                                                                                                    12. lower-*.f64N/A

                                                                                                                      \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\frac{-1}{2}}}{\sin B}} - \frac{x}{B} \]
                                                                                                                    13. lower-/.f64N/A

                                                                                                                      \[\leadsto F \cdot \color{blue}{\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\frac{-1}{2}}}{\sin B}} - \frac{x}{B} \]
                                                                                                                  4. Applied rewrites57.7%

                                                                                                                    \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B}} - \frac{x}{B} \]
                                                                                                                  5. Taylor expanded in F around -inf

                                                                                                                    \[\leadsto F \cdot \color{blue}{\frac{-1}{F \cdot \sin B}} - \frac{x}{B} \]
                                                                                                                  6. Step-by-step derivation
                                                                                                                    1. lower-/.f64N/A

                                                                                                                      \[\leadsto F \cdot \frac{-1}{\color{blue}{F \cdot \sin B}} - \frac{x}{B} \]
                                                                                                                    2. lower-*.f64N/A

                                                                                                                      \[\leadsto F \cdot \frac{-1}{F \cdot \color{blue}{\sin B}} - \frac{x}{B} \]
                                                                                                                    3. lower-sin.f6435.4

                                                                                                                      \[\leadsto F \cdot \frac{-1}{F \cdot \sin B} - \frac{x}{B} \]
                                                                                                                  7. Applied rewrites35.4%

                                                                                                                    \[\leadsto F \cdot \color{blue}{\frac{-1}{F \cdot \sin B}} - \frac{x}{B} \]

                                                                                                                  if -11 < F < -7.40000000000000008e-178

                                                                                                                  1. Initial program 76.3%

                                                                                                                    \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                                                  2. Taylor expanded in B around 0

                                                                                                                    \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                                                                                                  3. Step-by-step derivation
                                                                                                                    1. Applied rewrites49.3%

                                                                                                                      \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                                                                                                    2. Applied rewrites49.4%

                                                                                                                      \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} - \frac{x}{B}} \]
                                                                                                                    3. Taylor expanded in B around 0

                                                                                                                      \[\leadsto \color{blue}{\frac{F}{B}} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}} - \frac{x}{B} \]
                                                                                                                    4. Step-by-step derivation
                                                                                                                      1. lower-/.f6435.7

                                                                                                                        \[\leadsto \frac{F}{\color{blue}{B}} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} - \frac{x}{B} \]
                                                                                                                    5. Applied rewrites35.7%

                                                                                                                      \[\leadsto \color{blue}{\frac{F}{B}} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} - \frac{x}{B} \]

                                                                                                                    if -7.40000000000000008e-178 < F < 5.20000000000000006e-17

                                                                                                                    1. Initial program 76.3%

                                                                                                                      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                                                    2. Step-by-step derivation
                                                                                                                      1. lift-+.f64N/A

                                                                                                                        \[\leadsto \color{blue}{\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
                                                                                                                      2. +-commutativeN/A

                                                                                                                        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
                                                                                                                      3. lift-neg.f64N/A

                                                                                                                        \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \color{blue}{\left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)} \]
                                                                                                                      4. sub-flip-reverseN/A

                                                                                                                        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - x \cdot \frac{1}{\tan B}} \]
                                                                                                                      5. lift-*.f64N/A

                                                                                                                        \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \color{blue}{x \cdot \frac{1}{\tan B}} \]
                                                                                                                      6. lift-/.f64N/A

                                                                                                                        \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - x \cdot \color{blue}{\frac{1}{\tan B}} \]
                                                                                                                      7. mult-flip-revN/A

                                                                                                                        \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \color{blue}{\frac{x}{\tan B}} \]
                                                                                                                      8. sub-to-fractionN/A

                                                                                                                        \[\leadsto \color{blue}{\frac{\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                                      9. lower-/.f64N/A

                                                                                                                        \[\leadsto \color{blue}{\frac{\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                                    3. Applied rewrites76.4%

                                                                                                                      \[\leadsto \color{blue}{\frac{\left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \frac{F}{\sin B}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                                    4. Taylor expanded in F around 0

                                                                                                                      \[\leadsto \frac{\color{blue}{-1 \cdot x}}{\tan B} \]
                                                                                                                    5. Step-by-step derivation
                                                                                                                      1. lower-*.f6455.6

                                                                                                                        \[\leadsto \frac{-1 \cdot \color{blue}{x}}{\tan B} \]
                                                                                                                    6. Applied rewrites55.6%

                                                                                                                      \[\leadsto \frac{\color{blue}{-1 \cdot x}}{\tan B} \]

                                                                                                                    if 5.20000000000000006e-17 < F

                                                                                                                    1. Initial program 76.3%

                                                                                                                      \[\left(-x \cdot \frac{1}{\tan 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.3

                                                                                                                        \[\leadsto \frac{1}{\sin B} \]
                                                                                                                    4. Applied rewrites16.3%

                                                                                                                      \[\leadsto \color{blue}{\frac{1}{\sin B}} \]
                                                                                                                  4. Recombined 4 regimes into one program.
                                                                                                                  5. Add Preprocessing

                                                                                                                  Alternative 22: 64.5% accurate, 2.1× speedup?

                                                                                                                  \[\mathsf{copysign}\left(1, B\right) \cdot \begin{array}{l} \mathbf{if}\;\left|B\right| \leq 1.9 \cdot 10^{-9}:\\ \;\;\;\;\frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot F - x}{\left|B\right|}\\ \mathbf{else}:\\ \;\;\;\;\frac{-1 \cdot x}{\tan \left(\left|B\right|\right)}\\ \end{array} \]
                                                                                                                  (FPCore (F B x)
                                                                                                                   :precision binary64
                                                                                                                   (*
                                                                                                                    (copysign 1.0 B)
                                                                                                                    (if (<= (fabs B) 1.9e-9)
                                                                                                                      (/ (- (* (pow (fma x 2.0 (fma F F 2.0)) -0.5) F) x) (fabs B))
                                                                                                                      (/ (* -1.0 x) (tan (fabs B))))))
                                                                                                                  double code(double F, double B, double x) {
                                                                                                                  	double tmp;
                                                                                                                  	if (fabs(B) <= 1.9e-9) {
                                                                                                                  		tmp = ((pow(fma(x, 2.0, fma(F, F, 2.0)), -0.5) * F) - x) / fabs(B);
                                                                                                                  	} else {
                                                                                                                  		tmp = (-1.0 * x) / tan(fabs(B));
                                                                                                                  	}
                                                                                                                  	return copysign(1.0, B) * tmp;
                                                                                                                  }
                                                                                                                  
                                                                                                                  function code(F, B, x)
                                                                                                                  	tmp = 0.0
                                                                                                                  	if (abs(B) <= 1.9e-9)
                                                                                                                  		tmp = Float64(Float64(Float64((fma(x, 2.0, fma(F, F, 2.0)) ^ -0.5) * F) - x) / abs(B));
                                                                                                                  	else
                                                                                                                  		tmp = Float64(Float64(-1.0 * 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.9e-9], N[(N[(N[(N[Power[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * F), $MachinePrecision] - x), $MachinePrecision] / N[Abs[B], $MachinePrecision]), $MachinePrecision], N[(N[(-1.0 * x), $MachinePrecision] / N[Tan[N[Abs[B], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
                                                                                                                  
                                                                                                                  \mathsf{copysign}\left(1, B\right) \cdot \begin{array}{l}
                                                                                                                  \mathbf{if}\;\left|B\right| \leq 1.9 \cdot 10^{-9}:\\
                                                                                                                  \;\;\;\;\frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot F - x}{\left|B\right|}\\
                                                                                                                  
                                                                                                                  \mathbf{else}:\\
                                                                                                                  \;\;\;\;\frac{-1 \cdot x}{\tan \left(\left|B\right|\right)}\\
                                                                                                                  
                                                                                                                  
                                                                                                                  \end{array}
                                                                                                                  
                                                                                                                  Derivation
                                                                                                                  1. Split input into 2 regimes
                                                                                                                  2. if B < 1.90000000000000006e-9

                                                                                                                    1. Initial program 76.3%

                                                                                                                      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                                                    2. Step-by-step derivation
                                                                                                                      1. lift-+.f64N/A

                                                                                                                        \[\leadsto \color{blue}{\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
                                                                                                                      2. +-commutativeN/A

                                                                                                                        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
                                                                                                                      3. lift-neg.f64N/A

                                                                                                                        \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \color{blue}{\left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)} \]
                                                                                                                      4. sub-flip-reverseN/A

                                                                                                                        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - x \cdot \frac{1}{\tan B}} \]
                                                                                                                      5. lift-*.f64N/A

                                                                                                                        \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \color{blue}{x \cdot \frac{1}{\tan B}} \]
                                                                                                                      6. lift-/.f64N/A

                                                                                                                        \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - x \cdot \color{blue}{\frac{1}{\tan B}} \]
                                                                                                                      7. mult-flip-revN/A

                                                                                                                        \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \color{blue}{\frac{x}{\tan B}} \]
                                                                                                                      8. sub-to-fractionN/A

                                                                                                                        \[\leadsto \color{blue}{\frac{\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                                      9. lower-/.f64N/A

                                                                                                                        \[\leadsto \color{blue}{\frac{\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                                    3. Applied rewrites76.4%

                                                                                                                      \[\leadsto \color{blue}{\frac{\left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \frac{F}{\sin B}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                                    4. Taylor expanded in B around inf

                                                                                                                      \[\leadsto \frac{\color{blue}{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}}}{\cos B}} - x}{\tan B} \]
                                                                                                                    5. Step-by-step derivation
                                                                                                                      1. metadata-evalN/A

                                                                                                                        \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                      2. metadata-evalN/A

                                                                                                                        \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                      3. lower-/.f64N/A

                                                                                                                        \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\color{blue}{\cos B}} - x}{\tan B} \]
                                                                                                                      4. lower-*.f64N/A

                                                                                                                        \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos \color{blue}{B}} - x}{\tan B} \]
                                                                                                                      5. lower-pow.f64N/A

                                                                                                                        \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                      6. lower-+.f64N/A

                                                                                                                        \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                      7. lower-fma.f64N/A

                                                                                                                        \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                      8. lower-pow.f64N/A

                                                                                                                        \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                      9. metadata-evalN/A

                                                                                                                        \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                      10. metadata-evalN/A

                                                                                                                        \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\frac{-1}{2}}}{\cos B} - x}{\tan B} \]
                                                                                                                      11. lower-cos.f6484.7

                                                                                                                        \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5}}{\cos B} - x}{\tan B} \]
                                                                                                                    6. Applied rewrites84.7%

                                                                                                                      \[\leadsto \frac{\color{blue}{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5}}{\cos B}} - x}{\tan B} \]
                                                                                                                    7. 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}} \]
                                                                                                                    8. Step-by-step derivation
                                                                                                                      1. lower-/.f64N/A

                                                                                                                        \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{\color{blue}{B}} \]
                                                                                                                      2. lower--.f64N/A

                                                                                                                        \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                      3. lower-*.f64N/A

                                                                                                                        \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                      4. lower-pow.f64N/A

                                                                                                                        \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                      5. lower-+.f64N/A

                                                                                                                        \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                      6. lower-fma.f64N/A

                                                                                                                        \[\leadsto \frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                      7. lower-pow.f6444.1

                                                                                                                        \[\leadsto \frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5} - x}{B} \]
                                                                                                                    9. Applied rewrites44.1%

                                                                                                                      \[\leadsto \color{blue}{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5} - x}{B}} \]
                                                                                                                    10. Step-by-step derivation
                                                                                                                      1. lift-*.f64N/A

                                                                                                                        \[\leadsto \frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                      2. *-commutativeN/A

                                                                                                                        \[\leadsto \frac{{\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                                                                                                      3. lift-+.f64N/A

                                                                                                                        \[\leadsto \frac{{\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                                                                                                      4. +-commutativeN/A

                                                                                                                        \[\leadsto \frac{{\left(\mathsf{fma}\left(2, x, {F}^{2}\right) + 2\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                                                                                                      5. lift-fma.f64N/A

                                                                                                                        \[\leadsto \frac{{\left(\left(2 \cdot x + {F}^{2}\right) + 2\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                                                                                                      6. associate-+r+N/A

                                                                                                                        \[\leadsto \frac{{\left(2 \cdot x + \left({F}^{2} + 2\right)\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                                                                                                      7. *-commutativeN/A

                                                                                                                        \[\leadsto \frac{{\left(x \cdot 2 + \left({F}^{2} + 2\right)\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                                                                                                      8. lift-pow.f64N/A

                                                                                                                        \[\leadsto \frac{{\left(x \cdot 2 + \left({F}^{2} + 2\right)\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                                                                                                      9. pow2N/A

                                                                                                                        \[\leadsto \frac{{\left(x \cdot 2 + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                                                                                                      10. lift-fma.f64N/A

                                                                                                                        \[\leadsto \frac{{\left(x \cdot 2 + \mathsf{fma}\left(F, F, 2\right)\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                                                                                                      11. lift-fma.f64N/A

                                                                                                                        \[\leadsto \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                                                                                                      12. lift-*.f6444.1

                                                                                                                        \[\leadsto \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot F - x}{B} \]
                                                                                                                    11. Applied rewrites44.1%

                                                                                                                      \[\leadsto \color{blue}{\frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot F - x}{B}} \]

                                                                                                                    if 1.90000000000000006e-9 < B

                                                                                                                    1. Initial program 76.3%

                                                                                                                      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                                                    2. Step-by-step derivation
                                                                                                                      1. lift-+.f64N/A

                                                                                                                        \[\leadsto \color{blue}{\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
                                                                                                                      2. +-commutativeN/A

                                                                                                                        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
                                                                                                                      3. lift-neg.f64N/A

                                                                                                                        \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \color{blue}{\left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)} \]
                                                                                                                      4. sub-flip-reverseN/A

                                                                                                                        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - x \cdot \frac{1}{\tan B}} \]
                                                                                                                      5. lift-*.f64N/A

                                                                                                                        \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \color{blue}{x \cdot \frac{1}{\tan B}} \]
                                                                                                                      6. lift-/.f64N/A

                                                                                                                        \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - x \cdot \color{blue}{\frac{1}{\tan B}} \]
                                                                                                                      7. mult-flip-revN/A

                                                                                                                        \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \color{blue}{\frac{x}{\tan B}} \]
                                                                                                                      8. sub-to-fractionN/A

                                                                                                                        \[\leadsto \color{blue}{\frac{\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                                      9. lower-/.f64N/A

                                                                                                                        \[\leadsto \color{blue}{\frac{\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                                    3. Applied rewrites76.4%

                                                                                                                      \[\leadsto \color{blue}{\frac{\left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \frac{F}{\sin B}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                                    4. Taylor expanded in F around 0

                                                                                                                      \[\leadsto \frac{\color{blue}{-1 \cdot x}}{\tan B} \]
                                                                                                                    5. Step-by-step derivation
                                                                                                                      1. lower-*.f6455.6

                                                                                                                        \[\leadsto \frac{-1 \cdot \color{blue}{x}}{\tan B} \]
                                                                                                                    6. Applied rewrites55.6%

                                                                                                                      \[\leadsto \frac{\color{blue}{-1 \cdot x}}{\tan B} \]
                                                                                                                  3. Recombined 2 regimes into one program.
                                                                                                                  4. Add Preprocessing

                                                                                                                  Alternative 23: 52.7% accurate, 2.5× speedup?

                                                                                                                  \[\begin{array}{l} \mathbf{if}\;F \leq -11:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 10^{+19}:\\ \;\;\;\;\frac{F}{B} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
                                                                                                                  (FPCore (F B x)
                                                                                                                   :precision binary64
                                                                                                                   (if (<= F -11.0)
                                                                                                                     (/ -1.0 (sin B))
                                                                                                                     (if (<= F 1e+19)
                                                                                                                       (- (* (/ F B) (pow (fma x 2.0 (fma F F 2.0)) -0.5)) (/ x B))
                                                                                                                       (/ 1.0 (sin B)))))
                                                                                                                  double code(double F, double B, double x) {
                                                                                                                  	double tmp;
                                                                                                                  	if (F <= -11.0) {
                                                                                                                  		tmp = -1.0 / sin(B);
                                                                                                                  	} else if (F <= 1e+19) {
                                                                                                                  		tmp = ((F / B) * pow(fma(x, 2.0, fma(F, F, 2.0)), -0.5)) - (x / B);
                                                                                                                  	} else {
                                                                                                                  		tmp = 1.0 / sin(B);
                                                                                                                  	}
                                                                                                                  	return tmp;
                                                                                                                  }
                                                                                                                  
                                                                                                                  function code(F, B, x)
                                                                                                                  	tmp = 0.0
                                                                                                                  	if (F <= -11.0)
                                                                                                                  		tmp = Float64(-1.0 / sin(B));
                                                                                                                  	elseif (F <= 1e+19)
                                                                                                                  		tmp = Float64(Float64(Float64(F / B) * (fma(x, 2.0, fma(F, F, 2.0)) ^ -0.5)) - Float64(x / B));
                                                                                                                  	else
                                                                                                                  		tmp = Float64(1.0 / sin(B));
                                                                                                                  	end
                                                                                                                  	return tmp
                                                                                                                  end
                                                                                                                  
                                                                                                                  code[F_, B_, x_] := If[LessEqual[F, -11.0], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1e+19], N[(N[(N[(F / B), $MachinePrecision] * N[Power[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]
                                                                                                                  
                                                                                                                  \begin{array}{l}
                                                                                                                  \mathbf{if}\;F \leq -11:\\
                                                                                                                  \;\;\;\;\frac{-1}{\sin B}\\
                                                                                                                  
                                                                                                                  \mathbf{elif}\;F \leq 10^{+19}:\\
                                                                                                                  \;\;\;\;\frac{F}{B} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} - \frac{x}{B}\\
                                                                                                                  
                                                                                                                  \mathbf{else}:\\
                                                                                                                  \;\;\;\;\frac{1}{\sin B}\\
                                                                                                                  
                                                                                                                  
                                                                                                                  \end{array}
                                                                                                                  
                                                                                                                  Derivation
                                                                                                                  1. Split input into 3 regimes
                                                                                                                  2. if F < -11

                                                                                                                    1. Initial program 76.3%

                                                                                                                      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                                                    2. Taylor expanded in F around -inf

                                                                                                                      \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                                                                                                    3. Step-by-step derivation
                                                                                                                      1. lower-/.f64N/A

                                                                                                                        \[\leadsto \frac{-1}{\color{blue}{\sin B}} \]
                                                                                                                      2. lower-sin.f6417.7

                                                                                                                        \[\leadsto \frac{-1}{\sin B} \]
                                                                                                                    4. Applied rewrites17.7%

                                                                                                                      \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]

                                                                                                                    if -11 < F < 1e19

                                                                                                                    1. Initial program 76.3%

                                                                                                                      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                                                    2. Taylor expanded in B around 0

                                                                                                                      \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                                                                                                    3. Step-by-step derivation
                                                                                                                      1. Applied rewrites49.3%

                                                                                                                        \[\leadsto \left(-x \cdot \frac{1}{\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)} \]
                                                                                                                      2. Applied rewrites49.4%

                                                                                                                        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} - \frac{x}{B}} \]
                                                                                                                      3. Taylor expanded in B around 0

                                                                                                                        \[\leadsto \color{blue}{\frac{F}{B}} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}} - \frac{x}{B} \]
                                                                                                                      4. Step-by-step derivation
                                                                                                                        1. lower-/.f6435.7

                                                                                                                          \[\leadsto \frac{F}{\color{blue}{B}} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} - \frac{x}{B} \]
                                                                                                                      5. Applied rewrites35.7%

                                                                                                                        \[\leadsto \color{blue}{\frac{F}{B}} \cdot {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} - \frac{x}{B} \]

                                                                                                                      if 1e19 < F

                                                                                                                      1. Initial program 76.3%

                                                                                                                        \[\left(-x \cdot \frac{1}{\tan 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.3

                                                                                                                          \[\leadsto \frac{1}{\sin B} \]
                                                                                                                      4. Applied rewrites16.3%

                                                                                                                        \[\leadsto \color{blue}{\frac{1}{\sin B}} \]
                                                                                                                    4. Recombined 3 regimes into one program.
                                                                                                                    5. Add Preprocessing

                                                                                                                    Alternative 24: 52.7% accurate, 2.6× speedup?

                                                                                                                    \[\begin{array}{l} \mathbf{if}\;F \leq -11:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 10^{+19}:\\ \;\;\;\;\frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot F - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
                                                                                                                    (FPCore (F B x)
                                                                                                                     :precision binary64
                                                                                                                     (if (<= F -11.0)
                                                                                                                       (/ -1.0 (sin B))
                                                                                                                       (if (<= F 1e+19)
                                                                                                                         (/ (- (* (pow (fma x 2.0 (fma F F 2.0)) -0.5) F) x) B)
                                                                                                                         (/ 1.0 (sin B)))))
                                                                                                                    double code(double F, double B, double x) {
                                                                                                                    	double tmp;
                                                                                                                    	if (F <= -11.0) {
                                                                                                                    		tmp = -1.0 / sin(B);
                                                                                                                    	} else if (F <= 1e+19) {
                                                                                                                    		tmp = ((pow(fma(x, 2.0, fma(F, F, 2.0)), -0.5) * F) - x) / B;
                                                                                                                    	} else {
                                                                                                                    		tmp = 1.0 / sin(B);
                                                                                                                    	}
                                                                                                                    	return tmp;
                                                                                                                    }
                                                                                                                    
                                                                                                                    function code(F, B, x)
                                                                                                                    	tmp = 0.0
                                                                                                                    	if (F <= -11.0)
                                                                                                                    		tmp = Float64(-1.0 / sin(B));
                                                                                                                    	elseif (F <= 1e+19)
                                                                                                                    		tmp = Float64(Float64(Float64((fma(x, 2.0, fma(F, F, 2.0)) ^ -0.5) * F) - x) / B);
                                                                                                                    	else
                                                                                                                    		tmp = Float64(1.0 / sin(B));
                                                                                                                    	end
                                                                                                                    	return tmp
                                                                                                                    end
                                                                                                                    
                                                                                                                    code[F_, B_, x_] := If[LessEqual[F, -11.0], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1e+19], N[(N[(N[(N[Power[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * F), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]
                                                                                                                    
                                                                                                                    \begin{array}{l}
                                                                                                                    \mathbf{if}\;F \leq -11:\\
                                                                                                                    \;\;\;\;\frac{-1}{\sin B}\\
                                                                                                                    
                                                                                                                    \mathbf{elif}\;F \leq 10^{+19}:\\
                                                                                                                    \;\;\;\;\frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot F - x}{B}\\
                                                                                                                    
                                                                                                                    \mathbf{else}:\\
                                                                                                                    \;\;\;\;\frac{1}{\sin B}\\
                                                                                                                    
                                                                                                                    
                                                                                                                    \end{array}
                                                                                                                    
                                                                                                                    Derivation
                                                                                                                    1. Split input into 3 regimes
                                                                                                                    2. if F < -11

                                                                                                                      1. Initial program 76.3%

                                                                                                                        \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                                                      2. Taylor expanded in F around -inf

                                                                                                                        \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                                                                                                      3. Step-by-step derivation
                                                                                                                        1. lower-/.f64N/A

                                                                                                                          \[\leadsto \frac{-1}{\color{blue}{\sin B}} \]
                                                                                                                        2. lower-sin.f6417.7

                                                                                                                          \[\leadsto \frac{-1}{\sin B} \]
                                                                                                                      4. Applied rewrites17.7%

                                                                                                                        \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]

                                                                                                                      if -11 < F < 1e19

                                                                                                                      1. Initial program 76.3%

                                                                                                                        \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                                                      2. Step-by-step derivation
                                                                                                                        1. lift-+.f64N/A

                                                                                                                          \[\leadsto \color{blue}{\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
                                                                                                                        2. +-commutativeN/A

                                                                                                                          \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
                                                                                                                        3. lift-neg.f64N/A

                                                                                                                          \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \color{blue}{\left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)} \]
                                                                                                                        4. sub-flip-reverseN/A

                                                                                                                          \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - x \cdot \frac{1}{\tan B}} \]
                                                                                                                        5. lift-*.f64N/A

                                                                                                                          \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \color{blue}{x \cdot \frac{1}{\tan B}} \]
                                                                                                                        6. lift-/.f64N/A

                                                                                                                          \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - x \cdot \color{blue}{\frac{1}{\tan B}} \]
                                                                                                                        7. mult-flip-revN/A

                                                                                                                          \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \color{blue}{\frac{x}{\tan B}} \]
                                                                                                                        8. sub-to-fractionN/A

                                                                                                                          \[\leadsto \color{blue}{\frac{\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                                        9. lower-/.f64N/A

                                                                                                                          \[\leadsto \color{blue}{\frac{\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                                      3. Applied rewrites76.4%

                                                                                                                        \[\leadsto \color{blue}{\frac{\left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \frac{F}{\sin B}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                                      4. Taylor expanded in B around inf

                                                                                                                        \[\leadsto \frac{\color{blue}{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}}}{\cos B}} - x}{\tan B} \]
                                                                                                                      5. Step-by-step derivation
                                                                                                                        1. metadata-evalN/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        2. metadata-evalN/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        3. lower-/.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\color{blue}{\cos B}} - x}{\tan B} \]
                                                                                                                        4. lower-*.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos \color{blue}{B}} - x}{\tan B} \]
                                                                                                                        5. lower-pow.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        6. lower-+.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        7. lower-fma.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        8. lower-pow.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        9. metadata-evalN/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        10. metadata-evalN/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\frac{-1}{2}}}{\cos B} - x}{\tan B} \]
                                                                                                                        11. lower-cos.f6484.7

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5}}{\cos B} - x}{\tan B} \]
                                                                                                                      6. Applied rewrites84.7%

                                                                                                                        \[\leadsto \frac{\color{blue}{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5}}{\cos B}} - x}{\tan B} \]
                                                                                                                      7. 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}} \]
                                                                                                                      8. Step-by-step derivation
                                                                                                                        1. lower-/.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{\color{blue}{B}} \]
                                                                                                                        2. lower--.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                        3. lower-*.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                        4. lower-pow.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                        5. lower-+.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                        6. lower-fma.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                        7. lower-pow.f6444.1

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5} - x}{B} \]
                                                                                                                      9. Applied rewrites44.1%

                                                                                                                        \[\leadsto \color{blue}{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5} - x}{B}} \]
                                                                                                                      10. Step-by-step derivation
                                                                                                                        1. lift-*.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                        2. *-commutativeN/A

                                                                                                                          \[\leadsto \frac{{\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                                                                                                        3. lift-+.f64N/A

                                                                                                                          \[\leadsto \frac{{\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                                                                                                        4. +-commutativeN/A

                                                                                                                          \[\leadsto \frac{{\left(\mathsf{fma}\left(2, x, {F}^{2}\right) + 2\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                                                                                                        5. lift-fma.f64N/A

                                                                                                                          \[\leadsto \frac{{\left(\left(2 \cdot x + {F}^{2}\right) + 2\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                                                                                                        6. associate-+r+N/A

                                                                                                                          \[\leadsto \frac{{\left(2 \cdot x + \left({F}^{2} + 2\right)\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                                                                                                        7. *-commutativeN/A

                                                                                                                          \[\leadsto \frac{{\left(x \cdot 2 + \left({F}^{2} + 2\right)\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                                                                                                        8. lift-pow.f64N/A

                                                                                                                          \[\leadsto \frac{{\left(x \cdot 2 + \left({F}^{2} + 2\right)\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                                                                                                        9. pow2N/A

                                                                                                                          \[\leadsto \frac{{\left(x \cdot 2 + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                                                                                                        10. lift-fma.f64N/A

                                                                                                                          \[\leadsto \frac{{\left(x \cdot 2 + \mathsf{fma}\left(F, F, 2\right)\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                                                                                                        11. lift-fma.f64N/A

                                                                                                                          \[\leadsto \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                                                                                                        12. lift-*.f6444.1

                                                                                                                          \[\leadsto \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot F - x}{B} \]
                                                                                                                      11. Applied rewrites44.1%

                                                                                                                        \[\leadsto \color{blue}{\frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot F - x}{B}} \]

                                                                                                                      if 1e19 < F

                                                                                                                      1. Initial program 76.3%

                                                                                                                        \[\left(-x \cdot \frac{1}{\tan 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.3

                                                                                                                          \[\leadsto \frac{1}{\sin B} \]
                                                                                                                      4. Applied rewrites16.3%

                                                                                                                        \[\leadsto \color{blue}{\frac{1}{\sin B}} \]
                                                                                                                    3. Recombined 3 regimes into one program.
                                                                                                                    4. Add Preprocessing

                                                                                                                    Alternative 25: 52.7% accurate, 2.7× speedup?

                                                                                                                    \[\begin{array}{l} \mathbf{if}\;F \leq -11:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 10000:\\ \;\;\;\;\frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot F - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B}\\ \end{array} \]
                                                                                                                    (FPCore (F B x)
                                                                                                                     :precision binary64
                                                                                                                     (if (<= F -11.0)
                                                                                                                       (/ -1.0 (sin B))
                                                                                                                       (if (<= F 10000.0)
                                                                                                                         (/ (- (* (pow (fma x 2.0 (fma F F 2.0)) -0.5) F) x) B)
                                                                                                                         (/ (* F (fma -1.0 (/ x F) (/ 1.0 F))) B))))
                                                                                                                    double code(double F, double B, double x) {
                                                                                                                    	double tmp;
                                                                                                                    	if (F <= -11.0) {
                                                                                                                    		tmp = -1.0 / sin(B);
                                                                                                                    	} else if (F <= 10000.0) {
                                                                                                                    		tmp = ((pow(fma(x, 2.0, fma(F, F, 2.0)), -0.5) * F) - x) / B;
                                                                                                                    	} else {
                                                                                                                    		tmp = (F * fma(-1.0, (x / F), (1.0 / F))) / B;
                                                                                                                    	}
                                                                                                                    	return tmp;
                                                                                                                    }
                                                                                                                    
                                                                                                                    function code(F, B, x)
                                                                                                                    	tmp = 0.0
                                                                                                                    	if (F <= -11.0)
                                                                                                                    		tmp = Float64(-1.0 / sin(B));
                                                                                                                    	elseif (F <= 10000.0)
                                                                                                                    		tmp = Float64(Float64(Float64((fma(x, 2.0, fma(F, F, 2.0)) ^ -0.5) * F) - x) / B);
                                                                                                                    	else
                                                                                                                    		tmp = Float64(Float64(F * fma(-1.0, Float64(x / F), Float64(1.0 / F))) / B);
                                                                                                                    	end
                                                                                                                    	return tmp
                                                                                                                    end
                                                                                                                    
                                                                                                                    code[F_, B_, x_] := If[LessEqual[F, -11.0], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 10000.0], N[(N[(N[(N[Power[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * F), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(F * N[(-1.0 * N[(x / F), $MachinePrecision] + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]]]
                                                                                                                    
                                                                                                                    \begin{array}{l}
                                                                                                                    \mathbf{if}\;F \leq -11:\\
                                                                                                                    \;\;\;\;\frac{-1}{\sin B}\\
                                                                                                                    
                                                                                                                    \mathbf{elif}\;F \leq 10000:\\
                                                                                                                    \;\;\;\;\frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot F - x}{B}\\
                                                                                                                    
                                                                                                                    \mathbf{else}:\\
                                                                                                                    \;\;\;\;\frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B}\\
                                                                                                                    
                                                                                                                    
                                                                                                                    \end{array}
                                                                                                                    
                                                                                                                    Derivation
                                                                                                                    1. Split input into 3 regimes
                                                                                                                    2. if F < -11

                                                                                                                      1. Initial program 76.3%

                                                                                                                        \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                                                      2. Taylor expanded in F around -inf

                                                                                                                        \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                                                                                                      3. Step-by-step derivation
                                                                                                                        1. lower-/.f64N/A

                                                                                                                          \[\leadsto \frac{-1}{\color{blue}{\sin B}} \]
                                                                                                                        2. lower-sin.f6417.7

                                                                                                                          \[\leadsto \frac{-1}{\sin B} \]
                                                                                                                      4. Applied rewrites17.7%

                                                                                                                        \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]

                                                                                                                      if -11 < F < 1e4

                                                                                                                      1. Initial program 76.3%

                                                                                                                        \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                                                      2. Step-by-step derivation
                                                                                                                        1. lift-+.f64N/A

                                                                                                                          \[\leadsto \color{blue}{\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
                                                                                                                        2. +-commutativeN/A

                                                                                                                          \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
                                                                                                                        3. lift-neg.f64N/A

                                                                                                                          \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \color{blue}{\left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)} \]
                                                                                                                        4. sub-flip-reverseN/A

                                                                                                                          \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - x \cdot \frac{1}{\tan B}} \]
                                                                                                                        5. lift-*.f64N/A

                                                                                                                          \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \color{blue}{x \cdot \frac{1}{\tan B}} \]
                                                                                                                        6. lift-/.f64N/A

                                                                                                                          \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - x \cdot \color{blue}{\frac{1}{\tan B}} \]
                                                                                                                        7. mult-flip-revN/A

                                                                                                                          \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \color{blue}{\frac{x}{\tan B}} \]
                                                                                                                        8. sub-to-fractionN/A

                                                                                                                          \[\leadsto \color{blue}{\frac{\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                                        9. lower-/.f64N/A

                                                                                                                          \[\leadsto \color{blue}{\frac{\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                                      3. Applied rewrites76.4%

                                                                                                                        \[\leadsto \color{blue}{\frac{\left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \frac{F}{\sin B}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                                      4. Taylor expanded in B around inf

                                                                                                                        \[\leadsto \frac{\color{blue}{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}}}{\cos B}} - x}{\tan B} \]
                                                                                                                      5. Step-by-step derivation
                                                                                                                        1. metadata-evalN/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        2. metadata-evalN/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        3. lower-/.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\color{blue}{\cos B}} - x}{\tan B} \]
                                                                                                                        4. lower-*.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos \color{blue}{B}} - x}{\tan B} \]
                                                                                                                        5. lower-pow.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        6. lower-+.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        7. lower-fma.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        8. lower-pow.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        9. metadata-evalN/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        10. metadata-evalN/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\frac{-1}{2}}}{\cos B} - x}{\tan B} \]
                                                                                                                        11. lower-cos.f6484.7

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5}}{\cos B} - x}{\tan B} \]
                                                                                                                      6. Applied rewrites84.7%

                                                                                                                        \[\leadsto \frac{\color{blue}{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5}}{\cos B}} - x}{\tan B} \]
                                                                                                                      7. 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}} \]
                                                                                                                      8. Step-by-step derivation
                                                                                                                        1. lower-/.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{\color{blue}{B}} \]
                                                                                                                        2. lower--.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                        3. lower-*.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                        4. lower-pow.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                        5. lower-+.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                        6. lower-fma.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                        7. lower-pow.f6444.1

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5} - x}{B} \]
                                                                                                                      9. Applied rewrites44.1%

                                                                                                                        \[\leadsto \color{blue}{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5} - x}{B}} \]
                                                                                                                      10. Step-by-step derivation
                                                                                                                        1. lift-*.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                        2. *-commutativeN/A

                                                                                                                          \[\leadsto \frac{{\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                                                                                                        3. lift-+.f64N/A

                                                                                                                          \[\leadsto \frac{{\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                                                                                                        4. +-commutativeN/A

                                                                                                                          \[\leadsto \frac{{\left(\mathsf{fma}\left(2, x, {F}^{2}\right) + 2\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                                                                                                        5. lift-fma.f64N/A

                                                                                                                          \[\leadsto \frac{{\left(\left(2 \cdot x + {F}^{2}\right) + 2\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                                                                                                        6. associate-+r+N/A

                                                                                                                          \[\leadsto \frac{{\left(2 \cdot x + \left({F}^{2} + 2\right)\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                                                                                                        7. *-commutativeN/A

                                                                                                                          \[\leadsto \frac{{\left(x \cdot 2 + \left({F}^{2} + 2\right)\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                                                                                                        8. lift-pow.f64N/A

                                                                                                                          \[\leadsto \frac{{\left(x \cdot 2 + \left({F}^{2} + 2\right)\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                                                                                                        9. pow2N/A

                                                                                                                          \[\leadsto \frac{{\left(x \cdot 2 + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                                                                                                        10. lift-fma.f64N/A

                                                                                                                          \[\leadsto \frac{{\left(x \cdot 2 + \mathsf{fma}\left(F, F, 2\right)\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                                                                                                        11. lift-fma.f64N/A

                                                                                                                          \[\leadsto \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                                                                                                        12. lift-*.f6444.1

                                                                                                                          \[\leadsto \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot F - x}{B} \]
                                                                                                                      11. Applied rewrites44.1%

                                                                                                                        \[\leadsto \color{blue}{\frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot F - x}{B}} \]

                                                                                                                      if 1e4 < F

                                                                                                                      1. Initial program 76.3%

                                                                                                                        \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                                                      2. Step-by-step derivation
                                                                                                                        1. lift-+.f64N/A

                                                                                                                          \[\leadsto \color{blue}{\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
                                                                                                                        2. +-commutativeN/A

                                                                                                                          \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
                                                                                                                        3. lift-neg.f64N/A

                                                                                                                          \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \color{blue}{\left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)} \]
                                                                                                                        4. sub-flip-reverseN/A

                                                                                                                          \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - x \cdot \frac{1}{\tan B}} \]
                                                                                                                        5. lift-*.f64N/A

                                                                                                                          \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \color{blue}{x \cdot \frac{1}{\tan B}} \]
                                                                                                                        6. lift-/.f64N/A

                                                                                                                          \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - x \cdot \color{blue}{\frac{1}{\tan B}} \]
                                                                                                                        7. mult-flip-revN/A

                                                                                                                          \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \color{blue}{\frac{x}{\tan B}} \]
                                                                                                                        8. sub-to-fractionN/A

                                                                                                                          \[\leadsto \color{blue}{\frac{\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                                        9. lower-/.f64N/A

                                                                                                                          \[\leadsto \color{blue}{\frac{\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                                      3. Applied rewrites76.4%

                                                                                                                        \[\leadsto \color{blue}{\frac{\left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \frac{F}{\sin B}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                                      4. Taylor expanded in B around inf

                                                                                                                        \[\leadsto \frac{\color{blue}{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}}}{\cos B}} - x}{\tan B} \]
                                                                                                                      5. Step-by-step derivation
                                                                                                                        1. metadata-evalN/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        2. metadata-evalN/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        3. lower-/.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\color{blue}{\cos B}} - x}{\tan B} \]
                                                                                                                        4. lower-*.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos \color{blue}{B}} - x}{\tan B} \]
                                                                                                                        5. lower-pow.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        6. lower-+.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        7. lower-fma.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        8. lower-pow.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        9. metadata-evalN/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        10. metadata-evalN/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\frac{-1}{2}}}{\cos B} - x}{\tan B} \]
                                                                                                                        11. lower-cos.f6484.7

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5}}{\cos B} - x}{\tan B} \]
                                                                                                                      6. Applied rewrites84.7%

                                                                                                                        \[\leadsto \frac{\color{blue}{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5}}{\cos B}} - x}{\tan B} \]
                                                                                                                      7. 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}} \]
                                                                                                                      8. Step-by-step derivation
                                                                                                                        1. lower-/.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{\color{blue}{B}} \]
                                                                                                                        2. lower--.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                        3. lower-*.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                        4. lower-pow.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                        5. lower-+.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                        6. lower-fma.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                        7. lower-pow.f6444.1

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5} - x}{B} \]
                                                                                                                      9. Applied rewrites44.1%

                                                                                                                        \[\leadsto \color{blue}{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5} - x}{B}} \]
                                                                                                                      10. Taylor expanded in F around inf

                                                                                                                        \[\leadsto \frac{F \cdot \left(-1 \cdot \frac{x}{F} + \frac{1}{F}\right)}{B} \]
                                                                                                                      11. Step-by-step derivation
                                                                                                                        1. lower-*.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot \left(-1 \cdot \frac{x}{F} + \frac{1}{F}\right)}{B} \]
                                                                                                                        2. lower-fma.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B} \]
                                                                                                                        3. lower-/.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B} \]
                                                                                                                        4. lower-/.f6428.4

                                                                                                                          \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B} \]
                                                                                                                      12. Applied rewrites28.4%

                                                                                                                        \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B} \]
                                                                                                                    3. Recombined 3 regimes into one program.
                                                                                                                    4. Add Preprocessing

                                                                                                                    Alternative 26: 51.8% accurate, 2.7× speedup?

                                                                                                                    \[\begin{array}{l} \mathbf{if}\;F \leq -5 \cdot 10^{+151}:\\ \;\;\;\;\frac{-1 \cdot \left(F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)\right)}{B}\\ \mathbf{elif}\;F \leq 10000:\\ \;\;\;\;\frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot F - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B}\\ \end{array} \]
                                                                                                                    (FPCore (F B x)
                                                                                                                     :precision binary64
                                                                                                                     (if (<= F -5e+151)
                                                                                                                       (/ (* -1.0 (* F (+ (/ 1.0 F) (/ x F)))) B)
                                                                                                                       (if (<= F 10000.0)
                                                                                                                         (/ (- (* (pow (fma x 2.0 (fma F F 2.0)) -0.5) F) x) B)
                                                                                                                         (/ (* F (fma -1.0 (/ x F) (/ 1.0 F))) B))))
                                                                                                                    double code(double F, double B, double x) {
                                                                                                                    	double tmp;
                                                                                                                    	if (F <= -5e+151) {
                                                                                                                    		tmp = (-1.0 * (F * ((1.0 / F) + (x / F)))) / B;
                                                                                                                    	} else if (F <= 10000.0) {
                                                                                                                    		tmp = ((pow(fma(x, 2.0, fma(F, F, 2.0)), -0.5) * F) - x) / B;
                                                                                                                    	} else {
                                                                                                                    		tmp = (F * fma(-1.0, (x / F), (1.0 / F))) / B;
                                                                                                                    	}
                                                                                                                    	return tmp;
                                                                                                                    }
                                                                                                                    
                                                                                                                    function code(F, B, x)
                                                                                                                    	tmp = 0.0
                                                                                                                    	if (F <= -5e+151)
                                                                                                                    		tmp = Float64(Float64(-1.0 * Float64(F * Float64(Float64(1.0 / F) + Float64(x / F)))) / B);
                                                                                                                    	elseif (F <= 10000.0)
                                                                                                                    		tmp = Float64(Float64(Float64((fma(x, 2.0, fma(F, F, 2.0)) ^ -0.5) * F) - x) / B);
                                                                                                                    	else
                                                                                                                    		tmp = Float64(Float64(F * fma(-1.0, Float64(x / F), Float64(1.0 / F))) / B);
                                                                                                                    	end
                                                                                                                    	return tmp
                                                                                                                    end
                                                                                                                    
                                                                                                                    code[F_, B_, x_] := If[LessEqual[F, -5e+151], N[(N[(-1.0 * N[(F * N[(N[(1.0 / F), $MachinePrecision] + N[(x / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 10000.0], N[(N[(N[(N[Power[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * F), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(F * N[(-1.0 * N[(x / F), $MachinePrecision] + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]]]
                                                                                                                    
                                                                                                                    \begin{array}{l}
                                                                                                                    \mathbf{if}\;F \leq -5 \cdot 10^{+151}:\\
                                                                                                                    \;\;\;\;\frac{-1 \cdot \left(F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)\right)}{B}\\
                                                                                                                    
                                                                                                                    \mathbf{elif}\;F \leq 10000:\\
                                                                                                                    \;\;\;\;\frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot F - x}{B}\\
                                                                                                                    
                                                                                                                    \mathbf{else}:\\
                                                                                                                    \;\;\;\;\frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B}\\
                                                                                                                    
                                                                                                                    
                                                                                                                    \end{array}
                                                                                                                    
                                                                                                                    Derivation
                                                                                                                    1. Split input into 3 regimes
                                                                                                                    2. if F < -5.0000000000000002e151

                                                                                                                      1. Initial program 76.3%

                                                                                                                        \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                                                      2. Step-by-step derivation
                                                                                                                        1. lift-+.f64N/A

                                                                                                                          \[\leadsto \color{blue}{\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
                                                                                                                        2. +-commutativeN/A

                                                                                                                          \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
                                                                                                                        3. lift-neg.f64N/A

                                                                                                                          \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \color{blue}{\left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)} \]
                                                                                                                        4. sub-flip-reverseN/A

                                                                                                                          \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - x \cdot \frac{1}{\tan B}} \]
                                                                                                                        5. lift-*.f64N/A

                                                                                                                          \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \color{blue}{x \cdot \frac{1}{\tan B}} \]
                                                                                                                        6. lift-/.f64N/A

                                                                                                                          \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - x \cdot \color{blue}{\frac{1}{\tan B}} \]
                                                                                                                        7. mult-flip-revN/A

                                                                                                                          \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \color{blue}{\frac{x}{\tan B}} \]
                                                                                                                        8. sub-to-fractionN/A

                                                                                                                          \[\leadsto \color{blue}{\frac{\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                                        9. lower-/.f64N/A

                                                                                                                          \[\leadsto \color{blue}{\frac{\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                                      3. Applied rewrites76.4%

                                                                                                                        \[\leadsto \color{blue}{\frac{\left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \frac{F}{\sin B}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                                      4. Taylor expanded in B around inf

                                                                                                                        \[\leadsto \frac{\color{blue}{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}}}{\cos B}} - x}{\tan B} \]
                                                                                                                      5. Step-by-step derivation
                                                                                                                        1. metadata-evalN/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        2. metadata-evalN/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        3. lower-/.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\color{blue}{\cos B}} - x}{\tan B} \]
                                                                                                                        4. lower-*.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos \color{blue}{B}} - x}{\tan B} \]
                                                                                                                        5. lower-pow.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        6. lower-+.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        7. lower-fma.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        8. lower-pow.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        9. metadata-evalN/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        10. metadata-evalN/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\frac{-1}{2}}}{\cos B} - x}{\tan B} \]
                                                                                                                        11. lower-cos.f6484.7

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5}}{\cos B} - x}{\tan B} \]
                                                                                                                      6. Applied rewrites84.7%

                                                                                                                        \[\leadsto \frac{\color{blue}{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5}}{\cos B}} - x}{\tan B} \]
                                                                                                                      7. 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}} \]
                                                                                                                      8. Step-by-step derivation
                                                                                                                        1. lower-/.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{\color{blue}{B}} \]
                                                                                                                        2. lower--.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                        3. lower-*.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                        4. lower-pow.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                        5. lower-+.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                        6. lower-fma.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                        7. lower-pow.f6444.1

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5} - x}{B} \]
                                                                                                                      9. Applied rewrites44.1%

                                                                                                                        \[\leadsto \color{blue}{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5} - x}{B}} \]
                                                                                                                      10. Taylor expanded in F around -inf

                                                                                                                        \[\leadsto \frac{-1 \cdot \left(F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)\right)}{B} \]
                                                                                                                      11. Step-by-step derivation
                                                                                                                        1. lower-*.f64N/A

                                                                                                                          \[\leadsto \frac{-1 \cdot \left(F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)\right)}{B} \]
                                                                                                                        2. lower-*.f64N/A

                                                                                                                          \[\leadsto \frac{-1 \cdot \left(F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)\right)}{B} \]
                                                                                                                        3. lower-+.f64N/A

                                                                                                                          \[\leadsto \frac{-1 \cdot \left(F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)\right)}{B} \]
                                                                                                                        4. lower-/.f64N/A

                                                                                                                          \[\leadsto \frac{-1 \cdot \left(F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)\right)}{B} \]
                                                                                                                        5. lower-/.f6428.2

                                                                                                                          \[\leadsto \frac{-1 \cdot \left(F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)\right)}{B} \]
                                                                                                                      12. Applied rewrites28.2%

                                                                                                                        \[\leadsto \frac{-1 \cdot \left(F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)\right)}{B} \]

                                                                                                                      if -5.0000000000000002e151 < F < 1e4

                                                                                                                      1. Initial program 76.3%

                                                                                                                        \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                                                      2. Step-by-step derivation
                                                                                                                        1. lift-+.f64N/A

                                                                                                                          \[\leadsto \color{blue}{\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
                                                                                                                        2. +-commutativeN/A

                                                                                                                          \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
                                                                                                                        3. lift-neg.f64N/A

                                                                                                                          \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \color{blue}{\left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)} \]
                                                                                                                        4. sub-flip-reverseN/A

                                                                                                                          \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - x \cdot \frac{1}{\tan B}} \]
                                                                                                                        5. lift-*.f64N/A

                                                                                                                          \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \color{blue}{x \cdot \frac{1}{\tan B}} \]
                                                                                                                        6. lift-/.f64N/A

                                                                                                                          \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - x \cdot \color{blue}{\frac{1}{\tan B}} \]
                                                                                                                        7. mult-flip-revN/A

                                                                                                                          \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \color{blue}{\frac{x}{\tan B}} \]
                                                                                                                        8. sub-to-fractionN/A

                                                                                                                          \[\leadsto \color{blue}{\frac{\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                                        9. lower-/.f64N/A

                                                                                                                          \[\leadsto \color{blue}{\frac{\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                                      3. Applied rewrites76.4%

                                                                                                                        \[\leadsto \color{blue}{\frac{\left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \frac{F}{\sin B}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                                      4. Taylor expanded in B around inf

                                                                                                                        \[\leadsto \frac{\color{blue}{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}}}{\cos B}} - x}{\tan B} \]
                                                                                                                      5. Step-by-step derivation
                                                                                                                        1. metadata-evalN/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        2. metadata-evalN/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        3. lower-/.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\color{blue}{\cos B}} - x}{\tan B} \]
                                                                                                                        4. lower-*.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos \color{blue}{B}} - x}{\tan B} \]
                                                                                                                        5. lower-pow.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        6. lower-+.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        7. lower-fma.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        8. lower-pow.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        9. metadata-evalN/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        10. metadata-evalN/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\frac{-1}{2}}}{\cos B} - x}{\tan B} \]
                                                                                                                        11. lower-cos.f6484.7

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5}}{\cos B} - x}{\tan B} \]
                                                                                                                      6. Applied rewrites84.7%

                                                                                                                        \[\leadsto \frac{\color{blue}{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5}}{\cos B}} - x}{\tan B} \]
                                                                                                                      7. 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}} \]
                                                                                                                      8. Step-by-step derivation
                                                                                                                        1. lower-/.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{\color{blue}{B}} \]
                                                                                                                        2. lower--.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                        3. lower-*.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                        4. lower-pow.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                        5. lower-+.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                        6. lower-fma.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                        7. lower-pow.f6444.1

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5} - x}{B} \]
                                                                                                                      9. Applied rewrites44.1%

                                                                                                                        \[\leadsto \color{blue}{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5} - x}{B}} \]
                                                                                                                      10. Step-by-step derivation
                                                                                                                        1. lift-*.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                        2. *-commutativeN/A

                                                                                                                          \[\leadsto \frac{{\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                                                                                                        3. lift-+.f64N/A

                                                                                                                          \[\leadsto \frac{{\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                                                                                                        4. +-commutativeN/A

                                                                                                                          \[\leadsto \frac{{\left(\mathsf{fma}\left(2, x, {F}^{2}\right) + 2\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                                                                                                        5. lift-fma.f64N/A

                                                                                                                          \[\leadsto \frac{{\left(\left(2 \cdot x + {F}^{2}\right) + 2\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                                                                                                        6. associate-+r+N/A

                                                                                                                          \[\leadsto \frac{{\left(2 \cdot x + \left({F}^{2} + 2\right)\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                                                                                                        7. *-commutativeN/A

                                                                                                                          \[\leadsto \frac{{\left(x \cdot 2 + \left({F}^{2} + 2\right)\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                                                                                                        8. lift-pow.f64N/A

                                                                                                                          \[\leadsto \frac{{\left(x \cdot 2 + \left({F}^{2} + 2\right)\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                                                                                                        9. pow2N/A

                                                                                                                          \[\leadsto \frac{{\left(x \cdot 2 + \left(F \cdot F + 2\right)\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                                                                                                        10. lift-fma.f64N/A

                                                                                                                          \[\leadsto \frac{{\left(x \cdot 2 + \mathsf{fma}\left(F, F, 2\right)\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                                                                                                        11. lift-fma.f64N/A

                                                                                                                          \[\leadsto \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                                                                                                        12. lift-*.f6444.1

                                                                                                                          \[\leadsto \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot F - x}{B} \]
                                                                                                                      11. Applied rewrites44.1%

                                                                                                                        \[\leadsto \color{blue}{\frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot F - x}{B}} \]

                                                                                                                      if 1e4 < F

                                                                                                                      1. Initial program 76.3%

                                                                                                                        \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                                                      2. Step-by-step derivation
                                                                                                                        1. lift-+.f64N/A

                                                                                                                          \[\leadsto \color{blue}{\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
                                                                                                                        2. +-commutativeN/A

                                                                                                                          \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
                                                                                                                        3. lift-neg.f64N/A

                                                                                                                          \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \color{blue}{\left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)} \]
                                                                                                                        4. sub-flip-reverseN/A

                                                                                                                          \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - x \cdot \frac{1}{\tan B}} \]
                                                                                                                        5. lift-*.f64N/A

                                                                                                                          \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \color{blue}{x \cdot \frac{1}{\tan B}} \]
                                                                                                                        6. lift-/.f64N/A

                                                                                                                          \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - x \cdot \color{blue}{\frac{1}{\tan B}} \]
                                                                                                                        7. mult-flip-revN/A

                                                                                                                          \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \color{blue}{\frac{x}{\tan B}} \]
                                                                                                                        8. sub-to-fractionN/A

                                                                                                                          \[\leadsto \color{blue}{\frac{\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                                        9. lower-/.f64N/A

                                                                                                                          \[\leadsto \color{blue}{\frac{\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                                      3. Applied rewrites76.4%

                                                                                                                        \[\leadsto \color{blue}{\frac{\left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \frac{F}{\sin B}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                                      4. Taylor expanded in B around inf

                                                                                                                        \[\leadsto \frac{\color{blue}{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}}}{\cos B}} - x}{\tan B} \]
                                                                                                                      5. Step-by-step derivation
                                                                                                                        1. metadata-evalN/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        2. metadata-evalN/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        3. lower-/.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\color{blue}{\cos B}} - x}{\tan B} \]
                                                                                                                        4. lower-*.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos \color{blue}{B}} - x}{\tan B} \]
                                                                                                                        5. lower-pow.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        6. lower-+.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        7. lower-fma.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        8. lower-pow.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        9. metadata-evalN/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        10. metadata-evalN/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\frac{-1}{2}}}{\cos B} - x}{\tan B} \]
                                                                                                                        11. lower-cos.f6484.7

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5}}{\cos B} - x}{\tan B} \]
                                                                                                                      6. Applied rewrites84.7%

                                                                                                                        \[\leadsto \frac{\color{blue}{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5}}{\cos B}} - x}{\tan B} \]
                                                                                                                      7. 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}} \]
                                                                                                                      8. Step-by-step derivation
                                                                                                                        1. lower-/.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{\color{blue}{B}} \]
                                                                                                                        2. lower--.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                        3. lower-*.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                        4. lower-pow.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                        5. lower-+.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                        6. lower-fma.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                        7. lower-pow.f6444.1

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5} - x}{B} \]
                                                                                                                      9. Applied rewrites44.1%

                                                                                                                        \[\leadsto \color{blue}{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5} - x}{B}} \]
                                                                                                                      10. Taylor expanded in F around inf

                                                                                                                        \[\leadsto \frac{F \cdot \left(-1 \cdot \frac{x}{F} + \frac{1}{F}\right)}{B} \]
                                                                                                                      11. Step-by-step derivation
                                                                                                                        1. lower-*.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot \left(-1 \cdot \frac{x}{F} + \frac{1}{F}\right)}{B} \]
                                                                                                                        2. lower-fma.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B} \]
                                                                                                                        3. lower-/.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B} \]
                                                                                                                        4. lower-/.f6428.4

                                                                                                                          \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B} \]
                                                                                                                      12. Applied rewrites28.4%

                                                                                                                        \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B} \]
                                                                                                                    3. Recombined 3 regimes into one program.
                                                                                                                    4. Add Preprocessing

                                                                                                                    Alternative 27: 51.4% accurate, 3.0× speedup?

                                                                                                                    \[\begin{array}{l} \mathbf{if}\;F \leq -0.58:\\ \;\;\;\;\frac{-1 \cdot \left(F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)\right)}{B}\\ \mathbf{elif}\;F \leq 0.00165:\\ \;\;\;\;\frac{F \cdot {\left(2 + 2 \cdot x\right)}^{-0.5} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B}\\ \end{array} \]
                                                                                                                    (FPCore (F B x)
                                                                                                                     :precision binary64
                                                                                                                     (if (<= F -0.58)
                                                                                                                       (/ (* -1.0 (* F (+ (/ 1.0 F) (/ x F)))) B)
                                                                                                                       (if (<= F 0.00165)
                                                                                                                         (/ (- (* F (pow (+ 2.0 (* 2.0 x)) -0.5)) x) B)
                                                                                                                         (/ (* F (fma -1.0 (/ x F) (/ 1.0 F))) B))))
                                                                                                                    double code(double F, double B, double x) {
                                                                                                                    	double tmp;
                                                                                                                    	if (F <= -0.58) {
                                                                                                                    		tmp = (-1.0 * (F * ((1.0 / F) + (x / F)))) / B;
                                                                                                                    	} else if (F <= 0.00165) {
                                                                                                                    		tmp = ((F * pow((2.0 + (2.0 * x)), -0.5)) - x) / B;
                                                                                                                    	} else {
                                                                                                                    		tmp = (F * fma(-1.0, (x / F), (1.0 / F))) / B;
                                                                                                                    	}
                                                                                                                    	return tmp;
                                                                                                                    }
                                                                                                                    
                                                                                                                    function code(F, B, x)
                                                                                                                    	tmp = 0.0
                                                                                                                    	if (F <= -0.58)
                                                                                                                    		tmp = Float64(Float64(-1.0 * Float64(F * Float64(Float64(1.0 / F) + Float64(x / F)))) / B);
                                                                                                                    	elseif (F <= 0.00165)
                                                                                                                    		tmp = Float64(Float64(Float64(F * (Float64(2.0 + Float64(2.0 * x)) ^ -0.5)) - x) / B);
                                                                                                                    	else
                                                                                                                    		tmp = Float64(Float64(F * fma(-1.0, Float64(x / F), Float64(1.0 / F))) / B);
                                                                                                                    	end
                                                                                                                    	return tmp
                                                                                                                    end
                                                                                                                    
                                                                                                                    code[F_, B_, x_] := If[LessEqual[F, -0.58], N[(N[(-1.0 * N[(F * N[(N[(1.0 / F), $MachinePrecision] + N[(x / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 0.00165], N[(N[(N[(F * N[Power[N[(2.0 + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(F * N[(-1.0 * N[(x / F), $MachinePrecision] + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]]]
                                                                                                                    
                                                                                                                    \begin{array}{l}
                                                                                                                    \mathbf{if}\;F \leq -0.58:\\
                                                                                                                    \;\;\;\;\frac{-1 \cdot \left(F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)\right)}{B}\\
                                                                                                                    
                                                                                                                    \mathbf{elif}\;F \leq 0.00165:\\
                                                                                                                    \;\;\;\;\frac{F \cdot {\left(2 + 2 \cdot x\right)}^{-0.5} - x}{B}\\
                                                                                                                    
                                                                                                                    \mathbf{else}:\\
                                                                                                                    \;\;\;\;\frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B}\\
                                                                                                                    
                                                                                                                    
                                                                                                                    \end{array}
                                                                                                                    
                                                                                                                    Derivation
                                                                                                                    1. Split input into 3 regimes
                                                                                                                    2. if F < -0.57999999999999996

                                                                                                                      1. Initial program 76.3%

                                                                                                                        \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                                                      2. Step-by-step derivation
                                                                                                                        1. lift-+.f64N/A

                                                                                                                          \[\leadsto \color{blue}{\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
                                                                                                                        2. +-commutativeN/A

                                                                                                                          \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
                                                                                                                        3. lift-neg.f64N/A

                                                                                                                          \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \color{blue}{\left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)} \]
                                                                                                                        4. sub-flip-reverseN/A

                                                                                                                          \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - x \cdot \frac{1}{\tan B}} \]
                                                                                                                        5. lift-*.f64N/A

                                                                                                                          \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \color{blue}{x \cdot \frac{1}{\tan B}} \]
                                                                                                                        6. lift-/.f64N/A

                                                                                                                          \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - x \cdot \color{blue}{\frac{1}{\tan B}} \]
                                                                                                                        7. mult-flip-revN/A

                                                                                                                          \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \color{blue}{\frac{x}{\tan B}} \]
                                                                                                                        8. sub-to-fractionN/A

                                                                                                                          \[\leadsto \color{blue}{\frac{\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                                        9. lower-/.f64N/A

                                                                                                                          \[\leadsto \color{blue}{\frac{\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                                      3. Applied rewrites76.4%

                                                                                                                        \[\leadsto \color{blue}{\frac{\left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \frac{F}{\sin B}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                                      4. Taylor expanded in B around inf

                                                                                                                        \[\leadsto \frac{\color{blue}{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}}}{\cos B}} - x}{\tan B} \]
                                                                                                                      5. Step-by-step derivation
                                                                                                                        1. metadata-evalN/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        2. metadata-evalN/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        3. lower-/.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\color{blue}{\cos B}} - x}{\tan B} \]
                                                                                                                        4. lower-*.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos \color{blue}{B}} - x}{\tan B} \]
                                                                                                                        5. lower-pow.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        6. lower-+.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        7. lower-fma.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        8. lower-pow.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        9. metadata-evalN/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        10. metadata-evalN/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\frac{-1}{2}}}{\cos B} - x}{\tan B} \]
                                                                                                                        11. lower-cos.f6484.7

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5}}{\cos B} - x}{\tan B} \]
                                                                                                                      6. Applied rewrites84.7%

                                                                                                                        \[\leadsto \frac{\color{blue}{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5}}{\cos B}} - x}{\tan B} \]
                                                                                                                      7. 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}} \]
                                                                                                                      8. Step-by-step derivation
                                                                                                                        1. lower-/.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{\color{blue}{B}} \]
                                                                                                                        2. lower--.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                        3. lower-*.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                        4. lower-pow.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                        5. lower-+.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                        6. lower-fma.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                        7. lower-pow.f6444.1

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5} - x}{B} \]
                                                                                                                      9. Applied rewrites44.1%

                                                                                                                        \[\leadsto \color{blue}{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5} - x}{B}} \]
                                                                                                                      10. Taylor expanded in F around -inf

                                                                                                                        \[\leadsto \frac{-1 \cdot \left(F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)\right)}{B} \]
                                                                                                                      11. Step-by-step derivation
                                                                                                                        1. lower-*.f64N/A

                                                                                                                          \[\leadsto \frac{-1 \cdot \left(F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)\right)}{B} \]
                                                                                                                        2. lower-*.f64N/A

                                                                                                                          \[\leadsto \frac{-1 \cdot \left(F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)\right)}{B} \]
                                                                                                                        3. lower-+.f64N/A

                                                                                                                          \[\leadsto \frac{-1 \cdot \left(F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)\right)}{B} \]
                                                                                                                        4. lower-/.f64N/A

                                                                                                                          \[\leadsto \frac{-1 \cdot \left(F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)\right)}{B} \]
                                                                                                                        5. lower-/.f6428.2

                                                                                                                          \[\leadsto \frac{-1 \cdot \left(F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)\right)}{B} \]
                                                                                                                      12. Applied rewrites28.2%

                                                                                                                        \[\leadsto \frac{-1 \cdot \left(F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)\right)}{B} \]

                                                                                                                      if -0.57999999999999996 < F < 0.00165

                                                                                                                      1. Initial program 76.3%

                                                                                                                        \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                                                      2. Step-by-step derivation
                                                                                                                        1. lift-+.f64N/A

                                                                                                                          \[\leadsto \color{blue}{\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
                                                                                                                        2. +-commutativeN/A

                                                                                                                          \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
                                                                                                                        3. lift-neg.f64N/A

                                                                                                                          \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \color{blue}{\left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)} \]
                                                                                                                        4. sub-flip-reverseN/A

                                                                                                                          \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - x \cdot \frac{1}{\tan B}} \]
                                                                                                                        5. lift-*.f64N/A

                                                                                                                          \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \color{blue}{x \cdot \frac{1}{\tan B}} \]
                                                                                                                        6. lift-/.f64N/A

                                                                                                                          \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - x \cdot \color{blue}{\frac{1}{\tan B}} \]
                                                                                                                        7. mult-flip-revN/A

                                                                                                                          \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \color{blue}{\frac{x}{\tan B}} \]
                                                                                                                        8. sub-to-fractionN/A

                                                                                                                          \[\leadsto \color{blue}{\frac{\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                                        9. lower-/.f64N/A

                                                                                                                          \[\leadsto \color{blue}{\frac{\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                                      3. Applied rewrites76.4%

                                                                                                                        \[\leadsto \color{blue}{\frac{\left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \frac{F}{\sin B}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                                      4. Taylor expanded in B around inf

                                                                                                                        \[\leadsto \frac{\color{blue}{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}}}{\cos B}} - x}{\tan B} \]
                                                                                                                      5. Step-by-step derivation
                                                                                                                        1. metadata-evalN/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        2. metadata-evalN/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        3. lower-/.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\color{blue}{\cos B}} - x}{\tan B} \]
                                                                                                                        4. lower-*.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos \color{blue}{B}} - x}{\tan B} \]
                                                                                                                        5. lower-pow.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        6. lower-+.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        7. lower-fma.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        8. lower-pow.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        9. metadata-evalN/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        10. metadata-evalN/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\frac{-1}{2}}}{\cos B} - x}{\tan B} \]
                                                                                                                        11. lower-cos.f6484.7

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5}}{\cos B} - x}{\tan B} \]
                                                                                                                      6. Applied rewrites84.7%

                                                                                                                        \[\leadsto \frac{\color{blue}{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5}}{\cos B}} - x}{\tan B} \]
                                                                                                                      7. 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}} \]
                                                                                                                      8. Step-by-step derivation
                                                                                                                        1. lower-/.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{\color{blue}{B}} \]
                                                                                                                        2. lower--.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                        3. lower-*.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                        4. lower-pow.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                        5. lower-+.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                        6. lower-fma.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                        7. lower-pow.f6444.1

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5} - x}{B} \]
                                                                                                                      9. Applied rewrites44.1%

                                                                                                                        \[\leadsto \color{blue}{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5} - x}{B}} \]
                                                                                                                      10. Taylor expanded in F around 0

                                                                                                                        \[\leadsto \frac{F \cdot {\left(2 + 2 \cdot x\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                      11. Step-by-step derivation
                                                                                                                        1. lower-*.f6429.9

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + 2 \cdot x\right)}^{-0.5} - x}{B} \]
                                                                                                                      12. Applied rewrites29.9%

                                                                                                                        \[\leadsto \frac{F \cdot {\left(2 + 2 \cdot x\right)}^{-0.5} - x}{B} \]

                                                                                                                      if 0.00165 < F

                                                                                                                      1. Initial program 76.3%

                                                                                                                        \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                                                      2. Step-by-step derivation
                                                                                                                        1. lift-+.f64N/A

                                                                                                                          \[\leadsto \color{blue}{\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
                                                                                                                        2. +-commutativeN/A

                                                                                                                          \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
                                                                                                                        3. lift-neg.f64N/A

                                                                                                                          \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \color{blue}{\left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)} \]
                                                                                                                        4. sub-flip-reverseN/A

                                                                                                                          \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - x \cdot \frac{1}{\tan B}} \]
                                                                                                                        5. lift-*.f64N/A

                                                                                                                          \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \color{blue}{x \cdot \frac{1}{\tan B}} \]
                                                                                                                        6. lift-/.f64N/A

                                                                                                                          \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - x \cdot \color{blue}{\frac{1}{\tan B}} \]
                                                                                                                        7. mult-flip-revN/A

                                                                                                                          \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \color{blue}{\frac{x}{\tan B}} \]
                                                                                                                        8. sub-to-fractionN/A

                                                                                                                          \[\leadsto \color{blue}{\frac{\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                                        9. lower-/.f64N/A

                                                                                                                          \[\leadsto \color{blue}{\frac{\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                                      3. Applied rewrites76.4%

                                                                                                                        \[\leadsto \color{blue}{\frac{\left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \frac{F}{\sin B}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                                      4. Taylor expanded in B around inf

                                                                                                                        \[\leadsto \frac{\color{blue}{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}}}{\cos B}} - x}{\tan B} \]
                                                                                                                      5. Step-by-step derivation
                                                                                                                        1. metadata-evalN/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        2. metadata-evalN/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        3. lower-/.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\color{blue}{\cos B}} - x}{\tan B} \]
                                                                                                                        4. lower-*.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos \color{blue}{B}} - x}{\tan B} \]
                                                                                                                        5. lower-pow.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        6. lower-+.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        7. lower-fma.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        8. lower-pow.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        9. metadata-evalN/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        10. metadata-evalN/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\frac{-1}{2}}}{\cos B} - x}{\tan B} \]
                                                                                                                        11. lower-cos.f6484.7

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5}}{\cos B} - x}{\tan B} \]
                                                                                                                      6. Applied rewrites84.7%

                                                                                                                        \[\leadsto \frac{\color{blue}{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5}}{\cos B}} - x}{\tan B} \]
                                                                                                                      7. 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}} \]
                                                                                                                      8. Step-by-step derivation
                                                                                                                        1. lower-/.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{\color{blue}{B}} \]
                                                                                                                        2. lower--.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                        3. lower-*.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                        4. lower-pow.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                        5. lower-+.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                        6. lower-fma.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                        7. lower-pow.f6444.1

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5} - x}{B} \]
                                                                                                                      9. Applied rewrites44.1%

                                                                                                                        \[\leadsto \color{blue}{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5} - x}{B}} \]
                                                                                                                      10. Taylor expanded in F around inf

                                                                                                                        \[\leadsto \frac{F \cdot \left(-1 \cdot \frac{x}{F} + \frac{1}{F}\right)}{B} \]
                                                                                                                      11. Step-by-step derivation
                                                                                                                        1. lower-*.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot \left(-1 \cdot \frac{x}{F} + \frac{1}{F}\right)}{B} \]
                                                                                                                        2. lower-fma.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B} \]
                                                                                                                        3. lower-/.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B} \]
                                                                                                                        4. lower-/.f6428.4

                                                                                                                          \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B} \]
                                                                                                                      12. Applied rewrites28.4%

                                                                                                                        \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B} \]
                                                                                                                    3. Recombined 3 regimes into one program.
                                                                                                                    4. Add Preprocessing

                                                                                                                    Alternative 28: 44.2% accurate, 4.3× speedup?

                                                                                                                    \[\begin{array}{l} \mathbf{if}\;F \leq -1.3 \cdot 10^{-15}:\\ \;\;\;\;\frac{-1 \cdot \left(F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)\right)}{B}\\ \mathbf{elif}\;F \leq 1.45 \cdot 10^{-18}:\\ \;\;\;\;-1 \cdot \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B}\\ \end{array} \]
                                                                                                                    (FPCore (F B x)
                                                                                                                     :precision binary64
                                                                                                                     (if (<= F -1.3e-15)
                                                                                                                       (/ (* -1.0 (* F (+ (/ 1.0 F) (/ x F)))) B)
                                                                                                                       (if (<= F 1.45e-18)
                                                                                                                         (* -1.0 (/ x B))
                                                                                                                         (/ (* F (fma -1.0 (/ x F) (/ 1.0 F))) B))))
                                                                                                                    double code(double F, double B, double x) {
                                                                                                                    	double tmp;
                                                                                                                    	if (F <= -1.3e-15) {
                                                                                                                    		tmp = (-1.0 * (F * ((1.0 / F) + (x / F)))) / B;
                                                                                                                    	} else if (F <= 1.45e-18) {
                                                                                                                    		tmp = -1.0 * (x / B);
                                                                                                                    	} else {
                                                                                                                    		tmp = (F * fma(-1.0, (x / F), (1.0 / F))) / B;
                                                                                                                    	}
                                                                                                                    	return tmp;
                                                                                                                    }
                                                                                                                    
                                                                                                                    function code(F, B, x)
                                                                                                                    	tmp = 0.0
                                                                                                                    	if (F <= -1.3e-15)
                                                                                                                    		tmp = Float64(Float64(-1.0 * Float64(F * Float64(Float64(1.0 / F) + Float64(x / F)))) / B);
                                                                                                                    	elseif (F <= 1.45e-18)
                                                                                                                    		tmp = Float64(-1.0 * Float64(x / B));
                                                                                                                    	else
                                                                                                                    		tmp = Float64(Float64(F * fma(-1.0, Float64(x / F), Float64(1.0 / F))) / B);
                                                                                                                    	end
                                                                                                                    	return tmp
                                                                                                                    end
                                                                                                                    
                                                                                                                    code[F_, B_, x_] := If[LessEqual[F, -1.3e-15], N[(N[(-1.0 * N[(F * N[(N[(1.0 / F), $MachinePrecision] + N[(x / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.45e-18], N[(-1.0 * N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(F * N[(-1.0 * N[(x / F), $MachinePrecision] + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]]]
                                                                                                                    
                                                                                                                    \begin{array}{l}
                                                                                                                    \mathbf{if}\;F \leq -1.3 \cdot 10^{-15}:\\
                                                                                                                    \;\;\;\;\frac{-1 \cdot \left(F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)\right)}{B}\\
                                                                                                                    
                                                                                                                    \mathbf{elif}\;F \leq 1.45 \cdot 10^{-18}:\\
                                                                                                                    \;\;\;\;-1 \cdot \frac{x}{B}\\
                                                                                                                    
                                                                                                                    \mathbf{else}:\\
                                                                                                                    \;\;\;\;\frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B}\\
                                                                                                                    
                                                                                                                    
                                                                                                                    \end{array}
                                                                                                                    
                                                                                                                    Derivation
                                                                                                                    1. Split input into 3 regimes
                                                                                                                    2. if F < -1.30000000000000002e-15

                                                                                                                      1. Initial program 76.3%

                                                                                                                        \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                                                      2. Step-by-step derivation
                                                                                                                        1. lift-+.f64N/A

                                                                                                                          \[\leadsto \color{blue}{\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
                                                                                                                        2. +-commutativeN/A

                                                                                                                          \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
                                                                                                                        3. lift-neg.f64N/A

                                                                                                                          \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \color{blue}{\left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)} \]
                                                                                                                        4. sub-flip-reverseN/A

                                                                                                                          \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - x \cdot \frac{1}{\tan B}} \]
                                                                                                                        5. lift-*.f64N/A

                                                                                                                          \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \color{blue}{x \cdot \frac{1}{\tan B}} \]
                                                                                                                        6. lift-/.f64N/A

                                                                                                                          \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - x \cdot \color{blue}{\frac{1}{\tan B}} \]
                                                                                                                        7. mult-flip-revN/A

                                                                                                                          \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \color{blue}{\frac{x}{\tan B}} \]
                                                                                                                        8. sub-to-fractionN/A

                                                                                                                          \[\leadsto \color{blue}{\frac{\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                                        9. lower-/.f64N/A

                                                                                                                          \[\leadsto \color{blue}{\frac{\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                                      3. Applied rewrites76.4%

                                                                                                                        \[\leadsto \color{blue}{\frac{\left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \frac{F}{\sin B}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                                      4. Taylor expanded in B around inf

                                                                                                                        \[\leadsto \frac{\color{blue}{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}}}{\cos B}} - x}{\tan B} \]
                                                                                                                      5. Step-by-step derivation
                                                                                                                        1. metadata-evalN/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        2. metadata-evalN/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        3. lower-/.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\color{blue}{\cos B}} - x}{\tan B} \]
                                                                                                                        4. lower-*.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos \color{blue}{B}} - x}{\tan B} \]
                                                                                                                        5. lower-pow.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        6. lower-+.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        7. lower-fma.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        8. lower-pow.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        9. metadata-evalN/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        10. metadata-evalN/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\frac{-1}{2}}}{\cos B} - x}{\tan B} \]
                                                                                                                        11. lower-cos.f6484.7

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5}}{\cos B} - x}{\tan B} \]
                                                                                                                      6. Applied rewrites84.7%

                                                                                                                        \[\leadsto \frac{\color{blue}{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5}}{\cos B}} - x}{\tan B} \]
                                                                                                                      7. 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}} \]
                                                                                                                      8. Step-by-step derivation
                                                                                                                        1. lower-/.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{\color{blue}{B}} \]
                                                                                                                        2. lower--.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                        3. lower-*.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                        4. lower-pow.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                        5. lower-+.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                        6. lower-fma.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                        7. lower-pow.f6444.1

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5} - x}{B} \]
                                                                                                                      9. Applied rewrites44.1%

                                                                                                                        \[\leadsto \color{blue}{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5} - x}{B}} \]
                                                                                                                      10. Taylor expanded in F around -inf

                                                                                                                        \[\leadsto \frac{-1 \cdot \left(F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)\right)}{B} \]
                                                                                                                      11. Step-by-step derivation
                                                                                                                        1. lower-*.f64N/A

                                                                                                                          \[\leadsto \frac{-1 \cdot \left(F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)\right)}{B} \]
                                                                                                                        2. lower-*.f64N/A

                                                                                                                          \[\leadsto \frac{-1 \cdot \left(F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)\right)}{B} \]
                                                                                                                        3. lower-+.f64N/A

                                                                                                                          \[\leadsto \frac{-1 \cdot \left(F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)\right)}{B} \]
                                                                                                                        4. lower-/.f64N/A

                                                                                                                          \[\leadsto \frac{-1 \cdot \left(F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)\right)}{B} \]
                                                                                                                        5. lower-/.f6428.2

                                                                                                                          \[\leadsto \frac{-1 \cdot \left(F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)\right)}{B} \]
                                                                                                                      12. Applied rewrites28.2%

                                                                                                                        \[\leadsto \frac{-1 \cdot \left(F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)\right)}{B} \]

                                                                                                                      if -1.30000000000000002e-15 < F < 1.45e-18

                                                                                                                      1. Initial program 76.3%

                                                                                                                        \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                                                      2. Step-by-step derivation
                                                                                                                        1. lift-+.f64N/A

                                                                                                                          \[\leadsto \color{blue}{\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
                                                                                                                        2. +-commutativeN/A

                                                                                                                          \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
                                                                                                                        3. lift-neg.f64N/A

                                                                                                                          \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \color{blue}{\left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)} \]
                                                                                                                        4. sub-flip-reverseN/A

                                                                                                                          \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - x \cdot \frac{1}{\tan B}} \]
                                                                                                                        5. lift-*.f64N/A

                                                                                                                          \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \color{blue}{x \cdot \frac{1}{\tan B}} \]
                                                                                                                        6. lift-/.f64N/A

                                                                                                                          \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - x \cdot \color{blue}{\frac{1}{\tan B}} \]
                                                                                                                        7. mult-flip-revN/A

                                                                                                                          \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \color{blue}{\frac{x}{\tan B}} \]
                                                                                                                        8. sub-to-fractionN/A

                                                                                                                          \[\leadsto \color{blue}{\frac{\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                                        9. lower-/.f64N/A

                                                                                                                          \[\leadsto \color{blue}{\frac{\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                                      3. Applied rewrites76.4%

                                                                                                                        \[\leadsto \color{blue}{\frac{\left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \frac{F}{\sin B}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                                      4. Taylor expanded in B around inf

                                                                                                                        \[\leadsto \frac{\color{blue}{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}}}{\cos B}} - x}{\tan B} \]
                                                                                                                      5. Step-by-step derivation
                                                                                                                        1. metadata-evalN/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        2. metadata-evalN/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        3. lower-/.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\color{blue}{\cos B}} - x}{\tan B} \]
                                                                                                                        4. lower-*.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos \color{blue}{B}} - x}{\tan B} \]
                                                                                                                        5. lower-pow.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        6. lower-+.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        7. lower-fma.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        8. lower-pow.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        9. metadata-evalN/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        10. metadata-evalN/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\frac{-1}{2}}}{\cos B} - x}{\tan B} \]
                                                                                                                        11. lower-cos.f6484.7

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5}}{\cos B} - x}{\tan B} \]
                                                                                                                      6. Applied rewrites84.7%

                                                                                                                        \[\leadsto \frac{\color{blue}{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5}}{\cos B}} - x}{\tan B} \]
                                                                                                                      7. 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}} \]
                                                                                                                      8. Step-by-step derivation
                                                                                                                        1. lower-/.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{\color{blue}{B}} \]
                                                                                                                        2. lower--.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                        3. lower-*.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                        4. lower-pow.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                        5. lower-+.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                        6. lower-fma.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                        7. lower-pow.f6444.1

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5} - x}{B} \]
                                                                                                                      9. Applied rewrites44.1%

                                                                                                                        \[\leadsto \color{blue}{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5} - x}{B}} \]
                                                                                                                      10. Taylor expanded in F around 0

                                                                                                                        \[\leadsto -1 \cdot \color{blue}{\frac{x}{B}} \]
                                                                                                                      11. Step-by-step derivation
                                                                                                                        1. lower-*.f64N/A

                                                                                                                          \[\leadsto -1 \cdot \frac{x}{\color{blue}{B}} \]
                                                                                                                        2. lower-/.f6429.4

                                                                                                                          \[\leadsto -1 \cdot \frac{x}{B} \]
                                                                                                                      12. Applied rewrites29.4%

                                                                                                                        \[\leadsto -1 \cdot \color{blue}{\frac{x}{B}} \]

                                                                                                                      if 1.45e-18 < F

                                                                                                                      1. Initial program 76.3%

                                                                                                                        \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                                                      2. Step-by-step derivation
                                                                                                                        1. lift-+.f64N/A

                                                                                                                          \[\leadsto \color{blue}{\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
                                                                                                                        2. +-commutativeN/A

                                                                                                                          \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
                                                                                                                        3. lift-neg.f64N/A

                                                                                                                          \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \color{blue}{\left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)} \]
                                                                                                                        4. sub-flip-reverseN/A

                                                                                                                          \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - x \cdot \frac{1}{\tan B}} \]
                                                                                                                        5. lift-*.f64N/A

                                                                                                                          \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \color{blue}{x \cdot \frac{1}{\tan B}} \]
                                                                                                                        6. lift-/.f64N/A

                                                                                                                          \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - x \cdot \color{blue}{\frac{1}{\tan B}} \]
                                                                                                                        7. mult-flip-revN/A

                                                                                                                          \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \color{blue}{\frac{x}{\tan B}} \]
                                                                                                                        8. sub-to-fractionN/A

                                                                                                                          \[\leadsto \color{blue}{\frac{\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                                        9. lower-/.f64N/A

                                                                                                                          \[\leadsto \color{blue}{\frac{\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                                      3. Applied rewrites76.4%

                                                                                                                        \[\leadsto \color{blue}{\frac{\left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \frac{F}{\sin B}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                                      4. Taylor expanded in B around inf

                                                                                                                        \[\leadsto \frac{\color{blue}{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}}}{\cos B}} - x}{\tan B} \]
                                                                                                                      5. Step-by-step derivation
                                                                                                                        1. metadata-evalN/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        2. metadata-evalN/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        3. lower-/.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\color{blue}{\cos B}} - x}{\tan B} \]
                                                                                                                        4. lower-*.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos \color{blue}{B}} - x}{\tan B} \]
                                                                                                                        5. lower-pow.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        6. lower-+.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        7. lower-fma.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        8. lower-pow.f64N/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        9. metadata-evalN/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                        10. metadata-evalN/A

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\frac{-1}{2}}}{\cos B} - x}{\tan B} \]
                                                                                                                        11. lower-cos.f6484.7

                                                                                                                          \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5}}{\cos B} - x}{\tan B} \]
                                                                                                                      6. Applied rewrites84.7%

                                                                                                                        \[\leadsto \frac{\color{blue}{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5}}{\cos B}} - x}{\tan B} \]
                                                                                                                      7. 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}} \]
                                                                                                                      8. Step-by-step derivation
                                                                                                                        1. lower-/.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{\color{blue}{B}} \]
                                                                                                                        2. lower--.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                        3. lower-*.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                        4. lower-pow.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                        5. lower-+.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                        6. lower-fma.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                        7. lower-pow.f6444.1

                                                                                                                          \[\leadsto \frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5} - x}{B} \]
                                                                                                                      9. Applied rewrites44.1%

                                                                                                                        \[\leadsto \color{blue}{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5} - x}{B}} \]
                                                                                                                      10. Taylor expanded in F around inf

                                                                                                                        \[\leadsto \frac{F \cdot \left(-1 \cdot \frac{x}{F} + \frac{1}{F}\right)}{B} \]
                                                                                                                      11. Step-by-step derivation
                                                                                                                        1. lower-*.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot \left(-1 \cdot \frac{x}{F} + \frac{1}{F}\right)}{B} \]
                                                                                                                        2. lower-fma.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B} \]
                                                                                                                        3. lower-/.f64N/A

                                                                                                                          \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B} \]
                                                                                                                        4. lower-/.f6428.4

                                                                                                                          \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B} \]
                                                                                                                      12. Applied rewrites28.4%

                                                                                                                        \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B} \]
                                                                                                                    3. Recombined 3 regimes into one program.
                                                                                                                    4. Add Preprocessing

                                                                                                                    Alternative 29: 37.9% accurate, 4.3× speedup?

                                                                                                                    \[\begin{array}{l} \mathbf{if}\;F \leq -1.45 \cdot 10^{-9}:\\ \;\;\;\;\frac{-1}{B}\\ \mathbf{elif}\;F \leq 1.45 \cdot 10^{-18}:\\ \;\;\;\;-1 \cdot \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B}\\ \end{array} \]
                                                                                                                    (FPCore (F B x)
                                                                                                                     :precision binary64
                                                                                                                     (if (<= F -1.45e-9)
                                                                                                                       (/ -1.0 B)
                                                                                                                       (if (<= F 1.45e-18)
                                                                                                                         (* -1.0 (/ x B))
                                                                                                                         (/ (* F (fma -1.0 (/ x F) (/ 1.0 F))) B))))
                                                                                                                    double code(double F, double B, double x) {
                                                                                                                    	double tmp;
                                                                                                                    	if (F <= -1.45e-9) {
                                                                                                                    		tmp = -1.0 / B;
                                                                                                                    	} else if (F <= 1.45e-18) {
                                                                                                                    		tmp = -1.0 * (x / B);
                                                                                                                    	} else {
                                                                                                                    		tmp = (F * fma(-1.0, (x / F), (1.0 / F))) / B;
                                                                                                                    	}
                                                                                                                    	return tmp;
                                                                                                                    }
                                                                                                                    
                                                                                                                    function code(F, B, x)
                                                                                                                    	tmp = 0.0
                                                                                                                    	if (F <= -1.45e-9)
                                                                                                                    		tmp = Float64(-1.0 / B);
                                                                                                                    	elseif (F <= 1.45e-18)
                                                                                                                    		tmp = Float64(-1.0 * Float64(x / B));
                                                                                                                    	else
                                                                                                                    		tmp = Float64(Float64(F * fma(-1.0, Float64(x / F), Float64(1.0 / F))) / B);
                                                                                                                    	end
                                                                                                                    	return tmp
                                                                                                                    end
                                                                                                                    
                                                                                                                    code[F_, B_, x_] := If[LessEqual[F, -1.45e-9], N[(-1.0 / B), $MachinePrecision], If[LessEqual[F, 1.45e-18], N[(-1.0 * N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(F * N[(-1.0 * N[(x / F), $MachinePrecision] + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]]]
                                                                                                                    
                                                                                                                    \begin{array}{l}
                                                                                                                    \mathbf{if}\;F \leq -1.45 \cdot 10^{-9}:\\
                                                                                                                    \;\;\;\;\frac{-1}{B}\\
                                                                                                                    
                                                                                                                    \mathbf{elif}\;F \leq 1.45 \cdot 10^{-18}:\\
                                                                                                                    \;\;\;\;-1 \cdot \frac{x}{B}\\
                                                                                                                    
                                                                                                                    \mathbf{else}:\\
                                                                                                                    \;\;\;\;\frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B}\\
                                                                                                                    
                                                                                                                    
                                                                                                                    \end{array}
                                                                                                                    
                                                                                                                    Derivation
                                                                                                                    1. Split input into 3 regimes
                                                                                                                    2. if F < -1.44999999999999996e-9

                                                                                                                      1. Initial program 76.3%

                                                                                                                        \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                                                      2. Taylor expanded in F around -inf

                                                                                                                        \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                                                                                                      3. Step-by-step derivation
                                                                                                                        1. lower-/.f64N/A

                                                                                                                          \[\leadsto \frac{-1}{\color{blue}{\sin B}} \]
                                                                                                                        2. lower-sin.f6417.7

                                                                                                                          \[\leadsto \frac{-1}{\sin B} \]
                                                                                                                      4. Applied rewrites17.7%

                                                                                                                        \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                                                                                                      5. Taylor expanded in B around 0

                                                                                                                        \[\leadsto \frac{-1}{B} \]
                                                                                                                      6. Step-by-step derivation
                                                                                                                        1. Applied rewrites10.6%

                                                                                                                          \[\leadsto \frac{-1}{B} \]

                                                                                                                        if -1.44999999999999996e-9 < F < 1.45e-18

                                                                                                                        1. Initial program 76.3%

                                                                                                                          \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                                                        2. Step-by-step derivation
                                                                                                                          1. lift-+.f64N/A

                                                                                                                            \[\leadsto \color{blue}{\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
                                                                                                                          2. +-commutativeN/A

                                                                                                                            \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
                                                                                                                          3. lift-neg.f64N/A

                                                                                                                            \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \color{blue}{\left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)} \]
                                                                                                                          4. sub-flip-reverseN/A

                                                                                                                            \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - x \cdot \frac{1}{\tan B}} \]
                                                                                                                          5. lift-*.f64N/A

                                                                                                                            \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \color{blue}{x \cdot \frac{1}{\tan B}} \]
                                                                                                                          6. lift-/.f64N/A

                                                                                                                            \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - x \cdot \color{blue}{\frac{1}{\tan B}} \]
                                                                                                                          7. mult-flip-revN/A

                                                                                                                            \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \color{blue}{\frac{x}{\tan B}} \]
                                                                                                                          8. sub-to-fractionN/A

                                                                                                                            \[\leadsto \color{blue}{\frac{\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                                          9. lower-/.f64N/A

                                                                                                                            \[\leadsto \color{blue}{\frac{\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                                        3. Applied rewrites76.4%

                                                                                                                          \[\leadsto \color{blue}{\frac{\left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \frac{F}{\sin B}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                                        4. Taylor expanded in B around inf

                                                                                                                          \[\leadsto \frac{\color{blue}{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}}}{\cos B}} - x}{\tan B} \]
                                                                                                                        5. Step-by-step derivation
                                                                                                                          1. metadata-evalN/A

                                                                                                                            \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                          2. metadata-evalN/A

                                                                                                                            \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                          3. lower-/.f64N/A

                                                                                                                            \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\color{blue}{\cos B}} - x}{\tan B} \]
                                                                                                                          4. lower-*.f64N/A

                                                                                                                            \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos \color{blue}{B}} - x}{\tan B} \]
                                                                                                                          5. lower-pow.f64N/A

                                                                                                                            \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                          6. lower-+.f64N/A

                                                                                                                            \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                          7. lower-fma.f64N/A

                                                                                                                            \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                          8. lower-pow.f64N/A

                                                                                                                            \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                          9. metadata-evalN/A

                                                                                                                            \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                          10. metadata-evalN/A

                                                                                                                            \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\frac{-1}{2}}}{\cos B} - x}{\tan B} \]
                                                                                                                          11. lower-cos.f6484.7

                                                                                                                            \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5}}{\cos B} - x}{\tan B} \]
                                                                                                                        6. Applied rewrites84.7%

                                                                                                                          \[\leadsto \frac{\color{blue}{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5}}{\cos B}} - x}{\tan B} \]
                                                                                                                        7. 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}} \]
                                                                                                                        8. Step-by-step derivation
                                                                                                                          1. lower-/.f64N/A

                                                                                                                            \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{\color{blue}{B}} \]
                                                                                                                          2. lower--.f64N/A

                                                                                                                            \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                          3. lower-*.f64N/A

                                                                                                                            \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                          4. lower-pow.f64N/A

                                                                                                                            \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                          5. lower-+.f64N/A

                                                                                                                            \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                          6. lower-fma.f64N/A

                                                                                                                            \[\leadsto \frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                          7. lower-pow.f6444.1

                                                                                                                            \[\leadsto \frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5} - x}{B} \]
                                                                                                                        9. Applied rewrites44.1%

                                                                                                                          \[\leadsto \color{blue}{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5} - x}{B}} \]
                                                                                                                        10. Taylor expanded in F around 0

                                                                                                                          \[\leadsto -1 \cdot \color{blue}{\frac{x}{B}} \]
                                                                                                                        11. Step-by-step derivation
                                                                                                                          1. lower-*.f64N/A

                                                                                                                            \[\leadsto -1 \cdot \frac{x}{\color{blue}{B}} \]
                                                                                                                          2. lower-/.f6429.4

                                                                                                                            \[\leadsto -1 \cdot \frac{x}{B} \]
                                                                                                                        12. Applied rewrites29.4%

                                                                                                                          \[\leadsto -1 \cdot \color{blue}{\frac{x}{B}} \]

                                                                                                                        if 1.45e-18 < F

                                                                                                                        1. Initial program 76.3%

                                                                                                                          \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                                                        2. Step-by-step derivation
                                                                                                                          1. lift-+.f64N/A

                                                                                                                            \[\leadsto \color{blue}{\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
                                                                                                                          2. +-commutativeN/A

                                                                                                                            \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
                                                                                                                          3. lift-neg.f64N/A

                                                                                                                            \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \color{blue}{\left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)} \]
                                                                                                                          4. sub-flip-reverseN/A

                                                                                                                            \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - x \cdot \frac{1}{\tan B}} \]
                                                                                                                          5. lift-*.f64N/A

                                                                                                                            \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \color{blue}{x \cdot \frac{1}{\tan B}} \]
                                                                                                                          6. lift-/.f64N/A

                                                                                                                            \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - x \cdot \color{blue}{\frac{1}{\tan B}} \]
                                                                                                                          7. mult-flip-revN/A

                                                                                                                            \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \color{blue}{\frac{x}{\tan B}} \]
                                                                                                                          8. sub-to-fractionN/A

                                                                                                                            \[\leadsto \color{blue}{\frac{\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                                          9. lower-/.f64N/A

                                                                                                                            \[\leadsto \color{blue}{\frac{\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                                        3. Applied rewrites76.4%

                                                                                                                          \[\leadsto \color{blue}{\frac{\left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \frac{F}{\sin B}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                                        4. Taylor expanded in B around inf

                                                                                                                          \[\leadsto \frac{\color{blue}{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}}}{\cos B}} - x}{\tan B} \]
                                                                                                                        5. Step-by-step derivation
                                                                                                                          1. metadata-evalN/A

                                                                                                                            \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                          2. metadata-evalN/A

                                                                                                                            \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                          3. lower-/.f64N/A

                                                                                                                            \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\color{blue}{\cos B}} - x}{\tan B} \]
                                                                                                                          4. lower-*.f64N/A

                                                                                                                            \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos \color{blue}{B}} - x}{\tan B} \]
                                                                                                                          5. lower-pow.f64N/A

                                                                                                                            \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                          6. lower-+.f64N/A

                                                                                                                            \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                          7. lower-fma.f64N/A

                                                                                                                            \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                          8. lower-pow.f64N/A

                                                                                                                            \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                          9. metadata-evalN/A

                                                                                                                            \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                          10. metadata-evalN/A

                                                                                                                            \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\frac{-1}{2}}}{\cos B} - x}{\tan B} \]
                                                                                                                          11. lower-cos.f6484.7

                                                                                                                            \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5}}{\cos B} - x}{\tan B} \]
                                                                                                                        6. Applied rewrites84.7%

                                                                                                                          \[\leadsto \frac{\color{blue}{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5}}{\cos B}} - x}{\tan B} \]
                                                                                                                        7. 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}} \]
                                                                                                                        8. Step-by-step derivation
                                                                                                                          1. lower-/.f64N/A

                                                                                                                            \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{\color{blue}{B}} \]
                                                                                                                          2. lower--.f64N/A

                                                                                                                            \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                          3. lower-*.f64N/A

                                                                                                                            \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                          4. lower-pow.f64N/A

                                                                                                                            \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                          5. lower-+.f64N/A

                                                                                                                            \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                          6. lower-fma.f64N/A

                                                                                                                            \[\leadsto \frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                          7. lower-pow.f6444.1

                                                                                                                            \[\leadsto \frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5} - x}{B} \]
                                                                                                                        9. Applied rewrites44.1%

                                                                                                                          \[\leadsto \color{blue}{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5} - x}{B}} \]
                                                                                                                        10. Taylor expanded in F around inf

                                                                                                                          \[\leadsto \frac{F \cdot \left(-1 \cdot \frac{x}{F} + \frac{1}{F}\right)}{B} \]
                                                                                                                        11. Step-by-step derivation
                                                                                                                          1. lower-*.f64N/A

                                                                                                                            \[\leadsto \frac{F \cdot \left(-1 \cdot \frac{x}{F} + \frac{1}{F}\right)}{B} \]
                                                                                                                          2. lower-fma.f64N/A

                                                                                                                            \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B} \]
                                                                                                                          3. lower-/.f64N/A

                                                                                                                            \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B} \]
                                                                                                                          4. lower-/.f6428.4

                                                                                                                            \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B} \]
                                                                                                                        12. Applied rewrites28.4%

                                                                                                                          \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B} \]
                                                                                                                      7. Recombined 3 regimes into one program.
                                                                                                                      8. Add Preprocessing

                                                                                                                      Alternative 30: 30.5% accurate, 10.4× speedup?

                                                                                                                      \[\begin{array}{l} \mathbf{if}\;F \leq -1.45 \cdot 10^{-9}:\\ \;\;\;\;\frac{-1}{B}\\ \mathbf{else}:\\ \;\;\;\;-1 \cdot \frac{x}{B}\\ \end{array} \]
                                                                                                                      (FPCore (F B x)
                                                                                                                       :precision binary64
                                                                                                                       (if (<= F -1.45e-9) (/ -1.0 B) (* -1.0 (/ x B))))
                                                                                                                      double code(double F, double B, double x) {
                                                                                                                      	double tmp;
                                                                                                                      	if (F <= -1.45e-9) {
                                                                                                                      		tmp = -1.0 / B;
                                                                                                                      	} else {
                                                                                                                      		tmp = -1.0 * (x / B);
                                                                                                                      	}
                                                                                                                      	return tmp;
                                                                                                                      }
                                                                                                                      
                                                                                                                      module fmin_fmax_functions
                                                                                                                          implicit none
                                                                                                                          private
                                                                                                                          public fmax
                                                                                                                          public fmin
                                                                                                                      
                                                                                                                          interface fmax
                                                                                                                              module procedure fmax88
                                                                                                                              module procedure fmax44
                                                                                                                              module procedure fmax84
                                                                                                                              module procedure fmax48
                                                                                                                          end interface
                                                                                                                          interface fmin
                                                                                                                              module procedure fmin88
                                                                                                                              module procedure fmin44
                                                                                                                              module procedure fmin84
                                                                                                                              module procedure fmin48
                                                                                                                          end interface
                                                                                                                      contains
                                                                                                                          real(8) function fmax88(x, y) result (res)
                                                                                                                              real(8), intent (in) :: x
                                                                                                                              real(8), intent (in) :: y
                                                                                                                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                                          end function
                                                                                                                          real(4) function fmax44(x, y) result (res)
                                                                                                                              real(4), intent (in) :: x
                                                                                                                              real(4), intent (in) :: y
                                                                                                                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                                          end function
                                                                                                                          real(8) function fmax84(x, y) result(res)
                                                                                                                              real(8), intent (in) :: x
                                                                                                                              real(4), intent (in) :: y
                                                                                                                              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                                                                                          end function
                                                                                                                          real(8) function fmax48(x, y) result(res)
                                                                                                                              real(4), intent (in) :: x
                                                                                                                              real(8), intent (in) :: y
                                                                                                                              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                                                                                          end function
                                                                                                                          real(8) function fmin88(x, y) result (res)
                                                                                                                              real(8), intent (in) :: x
                                                                                                                              real(8), intent (in) :: y
                                                                                                                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                                          end function
                                                                                                                          real(4) function fmin44(x, y) result (res)
                                                                                                                              real(4), intent (in) :: x
                                                                                                                              real(4), intent (in) :: y
                                                                                                                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                                          end function
                                                                                                                          real(8) function fmin84(x, y) result(res)
                                                                                                                              real(8), intent (in) :: x
                                                                                                                              real(4), intent (in) :: y
                                                                                                                              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                                                                                          end function
                                                                                                                          real(8) function fmin48(x, y) result(res)
                                                                                                                              real(4), intent (in) :: x
                                                                                                                              real(8), intent (in) :: y
                                                                                                                              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                                                                                          end function
                                                                                                                      end module
                                                                                                                      
                                                                                                                      real(8) function code(f, b, x)
                                                                                                                      use fmin_fmax_functions
                                                                                                                          real(8), intent (in) :: f
                                                                                                                          real(8), intent (in) :: b
                                                                                                                          real(8), intent (in) :: x
                                                                                                                          real(8) :: tmp
                                                                                                                          if (f <= (-1.45d-9)) then
                                                                                                                              tmp = (-1.0d0) / b
                                                                                                                          else
                                                                                                                              tmp = (-1.0d0) * (x / b)
                                                                                                                          end if
                                                                                                                          code = tmp
                                                                                                                      end function
                                                                                                                      
                                                                                                                      public static double code(double F, double B, double x) {
                                                                                                                      	double tmp;
                                                                                                                      	if (F <= -1.45e-9) {
                                                                                                                      		tmp = -1.0 / B;
                                                                                                                      	} else {
                                                                                                                      		tmp = -1.0 * (x / B);
                                                                                                                      	}
                                                                                                                      	return tmp;
                                                                                                                      }
                                                                                                                      
                                                                                                                      def code(F, B, x):
                                                                                                                      	tmp = 0
                                                                                                                      	if F <= -1.45e-9:
                                                                                                                      		tmp = -1.0 / B
                                                                                                                      	else:
                                                                                                                      		tmp = -1.0 * (x / B)
                                                                                                                      	return tmp
                                                                                                                      
                                                                                                                      function code(F, B, x)
                                                                                                                      	tmp = 0.0
                                                                                                                      	if (F <= -1.45e-9)
                                                                                                                      		tmp = Float64(-1.0 / B);
                                                                                                                      	else
                                                                                                                      		tmp = Float64(-1.0 * Float64(x / B));
                                                                                                                      	end
                                                                                                                      	return tmp
                                                                                                                      end
                                                                                                                      
                                                                                                                      function tmp_2 = code(F, B, x)
                                                                                                                      	tmp = 0.0;
                                                                                                                      	if (F <= -1.45e-9)
                                                                                                                      		tmp = -1.0 / B;
                                                                                                                      	else
                                                                                                                      		tmp = -1.0 * (x / B);
                                                                                                                      	end
                                                                                                                      	tmp_2 = tmp;
                                                                                                                      end
                                                                                                                      
                                                                                                                      code[F_, B_, x_] := If[LessEqual[F, -1.45e-9], N[(-1.0 / B), $MachinePrecision], N[(-1.0 * N[(x / B), $MachinePrecision]), $MachinePrecision]]
                                                                                                                      
                                                                                                                      \begin{array}{l}
                                                                                                                      \mathbf{if}\;F \leq -1.45 \cdot 10^{-9}:\\
                                                                                                                      \;\;\;\;\frac{-1}{B}\\
                                                                                                                      
                                                                                                                      \mathbf{else}:\\
                                                                                                                      \;\;\;\;-1 \cdot \frac{x}{B}\\
                                                                                                                      
                                                                                                                      
                                                                                                                      \end{array}
                                                                                                                      
                                                                                                                      Derivation
                                                                                                                      1. Split input into 2 regimes
                                                                                                                      2. if F < -1.44999999999999996e-9

                                                                                                                        1. Initial program 76.3%

                                                                                                                          \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                                                        2. Taylor expanded in F around -inf

                                                                                                                          \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                                                                                                        3. Step-by-step derivation
                                                                                                                          1. lower-/.f64N/A

                                                                                                                            \[\leadsto \frac{-1}{\color{blue}{\sin B}} \]
                                                                                                                          2. lower-sin.f6417.7

                                                                                                                            \[\leadsto \frac{-1}{\sin B} \]
                                                                                                                        4. Applied rewrites17.7%

                                                                                                                          \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                                                                                                        5. Taylor expanded in B around 0

                                                                                                                          \[\leadsto \frac{-1}{B} \]
                                                                                                                        6. Step-by-step derivation
                                                                                                                          1. Applied rewrites10.6%

                                                                                                                            \[\leadsto \frac{-1}{B} \]

                                                                                                                          if -1.44999999999999996e-9 < F

                                                                                                                          1. Initial program 76.3%

                                                                                                                            \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                                                          2. Step-by-step derivation
                                                                                                                            1. lift-+.f64N/A

                                                                                                                              \[\leadsto \color{blue}{\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
                                                                                                                            2. +-commutativeN/A

                                                                                                                              \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
                                                                                                                            3. lift-neg.f64N/A

                                                                                                                              \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \color{blue}{\left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)} \]
                                                                                                                            4. sub-flip-reverseN/A

                                                                                                                              \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - x \cdot \frac{1}{\tan B}} \]
                                                                                                                            5. lift-*.f64N/A

                                                                                                                              \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \color{blue}{x \cdot \frac{1}{\tan B}} \]
                                                                                                                            6. lift-/.f64N/A

                                                                                                                              \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - x \cdot \color{blue}{\frac{1}{\tan B}} \]
                                                                                                                            7. mult-flip-revN/A

                                                                                                                              \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \color{blue}{\frac{x}{\tan B}} \]
                                                                                                                            8. sub-to-fractionN/A

                                                                                                                              \[\leadsto \color{blue}{\frac{\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                                            9. lower-/.f64N/A

                                                                                                                              \[\leadsto \color{blue}{\frac{\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                                          3. Applied rewrites76.4%

                                                                                                                            \[\leadsto \color{blue}{\frac{\left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \frac{F}{\sin B}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                                          4. Taylor expanded in B around inf

                                                                                                                            \[\leadsto \frac{\color{blue}{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}}}{\cos B}} - x}{\tan B} \]
                                                                                                                          5. Step-by-step derivation
                                                                                                                            1. metadata-evalN/A

                                                                                                                              \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                            2. metadata-evalN/A

                                                                                                                              \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                            3. lower-/.f64N/A

                                                                                                                              \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\color{blue}{\cos B}} - x}{\tan B} \]
                                                                                                                            4. lower-*.f64N/A

                                                                                                                              \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos \color{blue}{B}} - x}{\tan B} \]
                                                                                                                            5. lower-pow.f64N/A

                                                                                                                              \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                            6. lower-+.f64N/A

                                                                                                                              \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                            7. lower-fma.f64N/A

                                                                                                                              \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                            8. lower-pow.f64N/A

                                                                                                                              \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                            9. metadata-evalN/A

                                                                                                                              \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                            10. metadata-evalN/A

                                                                                                                              \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\frac{-1}{2}}}{\cos B} - x}{\tan B} \]
                                                                                                                            11. lower-cos.f6484.7

                                                                                                                              \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5}}{\cos B} - x}{\tan B} \]
                                                                                                                          6. Applied rewrites84.7%

                                                                                                                            \[\leadsto \frac{\color{blue}{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5}}{\cos B}} - x}{\tan B} \]
                                                                                                                          7. 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}} \]
                                                                                                                          8. Step-by-step derivation
                                                                                                                            1. lower-/.f64N/A

                                                                                                                              \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{\color{blue}{B}} \]
                                                                                                                            2. lower--.f64N/A

                                                                                                                              \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                            3. lower-*.f64N/A

                                                                                                                              \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                            4. lower-pow.f64N/A

                                                                                                                              \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                            5. lower-+.f64N/A

                                                                                                                              \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                            6. lower-fma.f64N/A

                                                                                                                              \[\leadsto \frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                            7. lower-pow.f6444.1

                                                                                                                              \[\leadsto \frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5} - x}{B} \]
                                                                                                                          9. Applied rewrites44.1%

                                                                                                                            \[\leadsto \color{blue}{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5} - x}{B}} \]
                                                                                                                          10. Taylor expanded in F around 0

                                                                                                                            \[\leadsto -1 \cdot \color{blue}{\frac{x}{B}} \]
                                                                                                                          11. Step-by-step derivation
                                                                                                                            1. lower-*.f64N/A

                                                                                                                              \[\leadsto -1 \cdot \frac{x}{\color{blue}{B}} \]
                                                                                                                            2. lower-/.f6429.4

                                                                                                                              \[\leadsto -1 \cdot \frac{x}{B} \]
                                                                                                                          12. Applied rewrites29.4%

                                                                                                                            \[\leadsto -1 \cdot \color{blue}{\frac{x}{B}} \]
                                                                                                                        7. Recombined 2 regimes into one program.
                                                                                                                        8. Add Preprocessing

                                                                                                                        Alternative 31: 18.0% accurate, 14.2× speedup?

                                                                                                                        \[\begin{array}{l} \mathbf{if}\;F \leq 2 \cdot 10^{-134}:\\ \;\;\;\;\frac{-1}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B}\\ \end{array} \]
                                                                                                                        (FPCore (F B x) :precision binary64 (if (<= F 2e-134) (/ -1.0 B) (/ 1.0 B)))
                                                                                                                        double code(double F, double B, double x) {
                                                                                                                        	double tmp;
                                                                                                                        	if (F <= 2e-134) {
                                                                                                                        		tmp = -1.0 / B;
                                                                                                                        	} else {
                                                                                                                        		tmp = 1.0 / 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 <= 2d-134) then
                                                                                                                                tmp = (-1.0d0) / b
                                                                                                                            else
                                                                                                                                tmp = 1.0d0 / b
                                                                                                                            end if
                                                                                                                            code = tmp
                                                                                                                        end function
                                                                                                                        
                                                                                                                        public static double code(double F, double B, double x) {
                                                                                                                        	double tmp;
                                                                                                                        	if (F <= 2e-134) {
                                                                                                                        		tmp = -1.0 / B;
                                                                                                                        	} else {
                                                                                                                        		tmp = 1.0 / B;
                                                                                                                        	}
                                                                                                                        	return tmp;
                                                                                                                        }
                                                                                                                        
                                                                                                                        def code(F, B, x):
                                                                                                                        	tmp = 0
                                                                                                                        	if F <= 2e-134:
                                                                                                                        		tmp = -1.0 / B
                                                                                                                        	else:
                                                                                                                        		tmp = 1.0 / B
                                                                                                                        	return tmp
                                                                                                                        
                                                                                                                        function code(F, B, x)
                                                                                                                        	tmp = 0.0
                                                                                                                        	if (F <= 2e-134)
                                                                                                                        		tmp = Float64(-1.0 / B);
                                                                                                                        	else
                                                                                                                        		tmp = Float64(1.0 / B);
                                                                                                                        	end
                                                                                                                        	return tmp
                                                                                                                        end
                                                                                                                        
                                                                                                                        function tmp_2 = code(F, B, x)
                                                                                                                        	tmp = 0.0;
                                                                                                                        	if (F <= 2e-134)
                                                                                                                        		tmp = -1.0 / B;
                                                                                                                        	else
                                                                                                                        		tmp = 1.0 / B;
                                                                                                                        	end
                                                                                                                        	tmp_2 = tmp;
                                                                                                                        end
                                                                                                                        
                                                                                                                        code[F_, B_, x_] := If[LessEqual[F, 2e-134], N[(-1.0 / B), $MachinePrecision], N[(1.0 / B), $MachinePrecision]]
                                                                                                                        
                                                                                                                        \begin{array}{l}
                                                                                                                        \mathbf{if}\;F \leq 2 \cdot 10^{-134}:\\
                                                                                                                        \;\;\;\;\frac{-1}{B}\\
                                                                                                                        
                                                                                                                        \mathbf{else}:\\
                                                                                                                        \;\;\;\;\frac{1}{B}\\
                                                                                                                        
                                                                                                                        
                                                                                                                        \end{array}
                                                                                                                        
                                                                                                                        Derivation
                                                                                                                        1. Split input into 2 regimes
                                                                                                                        2. if F < 2.00000000000000008e-134

                                                                                                                          1. Initial program 76.3%

                                                                                                                            \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                                                          2. Taylor expanded in F around -inf

                                                                                                                            \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                                                                                                          3. Step-by-step derivation
                                                                                                                            1. lower-/.f64N/A

                                                                                                                              \[\leadsto \frac{-1}{\color{blue}{\sin B}} \]
                                                                                                                            2. lower-sin.f6417.7

                                                                                                                              \[\leadsto \frac{-1}{\sin B} \]
                                                                                                                          4. Applied rewrites17.7%

                                                                                                                            \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                                                                                                          5. Taylor expanded in B around 0

                                                                                                                            \[\leadsto \frac{-1}{B} \]
                                                                                                                          6. Step-by-step derivation
                                                                                                                            1. Applied rewrites10.6%

                                                                                                                              \[\leadsto \frac{-1}{B} \]

                                                                                                                            if 2.00000000000000008e-134 < F

                                                                                                                            1. Initial program 76.3%

                                                                                                                              \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                                                            2. Step-by-step derivation
                                                                                                                              1. lift-+.f64N/A

                                                                                                                                \[\leadsto \color{blue}{\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
                                                                                                                              2. +-commutativeN/A

                                                                                                                                \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
                                                                                                                              3. lift-neg.f64N/A

                                                                                                                                \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \color{blue}{\left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)} \]
                                                                                                                              4. sub-flip-reverseN/A

                                                                                                                                \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - x \cdot \frac{1}{\tan B}} \]
                                                                                                                              5. lift-*.f64N/A

                                                                                                                                \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \color{blue}{x \cdot \frac{1}{\tan B}} \]
                                                                                                                              6. lift-/.f64N/A

                                                                                                                                \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - x \cdot \color{blue}{\frac{1}{\tan B}} \]
                                                                                                                              7. mult-flip-revN/A

                                                                                                                                \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \color{blue}{\frac{x}{\tan B}} \]
                                                                                                                              8. sub-to-fractionN/A

                                                                                                                                \[\leadsto \color{blue}{\frac{\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                                              9. lower-/.f64N/A

                                                                                                                                \[\leadsto \color{blue}{\frac{\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                                            3. Applied rewrites76.4%

                                                                                                                              \[\leadsto \color{blue}{\frac{\left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \frac{F}{\sin B}\right) \cdot \tan B - x}{\tan B}} \]
                                                                                                                            4. Taylor expanded in B around inf

                                                                                                                              \[\leadsto \frac{\color{blue}{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}}}{\cos B}} - x}{\tan B} \]
                                                                                                                            5. Step-by-step derivation
                                                                                                                              1. metadata-evalN/A

                                                                                                                                \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                              2. metadata-evalN/A

                                                                                                                                \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                              3. lower-/.f64N/A

                                                                                                                                \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\color{blue}{\cos B}} - x}{\tan B} \]
                                                                                                                              4. lower-*.f64N/A

                                                                                                                                \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos \color{blue}{B}} - x}{\tan B} \]
                                                                                                                              5. lower-pow.f64N/A

                                                                                                                                \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                              6. lower-+.f64N/A

                                                                                                                                \[\leadsto \frac{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                              7. lower-fma.f64N/A

                                                                                                                                \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                              8. lower-pow.f64N/A

                                                                                                                                \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                              9. metadata-evalN/A

                                                                                                                                \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\cos B} - x}{\tan B} \]
                                                                                                                              10. metadata-evalN/A

                                                                                                                                \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\frac{-1}{2}}}{\cos B} - x}{\tan B} \]
                                                                                                                              11. lower-cos.f6484.7

                                                                                                                                \[\leadsto \frac{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5}}{\cos B} - x}{\tan B} \]
                                                                                                                            6. Applied rewrites84.7%

                                                                                                                              \[\leadsto \frac{\color{blue}{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5}}{\cos B}} - x}{\tan B} \]
                                                                                                                            7. 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}} \]
                                                                                                                            8. Step-by-step derivation
                                                                                                                              1. lower-/.f64N/A

                                                                                                                                \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{\color{blue}{B}} \]
                                                                                                                              2. lower--.f64N/A

                                                                                                                                \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                              3. lower-*.f64N/A

                                                                                                                                \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                              4. lower-pow.f64N/A

                                                                                                                                \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                              5. lower-+.f64N/A

                                                                                                                                \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                              6. lower-fma.f64N/A

                                                                                                                                \[\leadsto \frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B} \]
                                                                                                                              7. lower-pow.f6444.1

                                                                                                                                \[\leadsto \frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5} - x}{B} \]
                                                                                                                            9. Applied rewrites44.1%

                                                                                                                              \[\leadsto \color{blue}{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5} - x}{B}} \]
                                                                                                                            10. Taylor expanded in F around inf

                                                                                                                              \[\leadsto \frac{1}{\color{blue}{B}} \]
                                                                                                                            11. Step-by-step derivation
                                                                                                                              1. lower-/.f6410.1

                                                                                                                                \[\leadsto \frac{1}{B} \]
                                                                                                                            12. Applied rewrites10.1%

                                                                                                                              \[\leadsto \frac{1}{\color{blue}{B}} \]
                                                                                                                          7. Recombined 2 regimes into one program.
                                                                                                                          8. Add Preprocessing

                                                                                                                          Alternative 32: 10.6% accurate, 26.5× speedup?

                                                                                                                          \[\frac{-1}{B} \]
                                                                                                                          (FPCore (F B x) :precision binary64 (/ -1.0 B))
                                                                                                                          double code(double F, double B, double x) {
                                                                                                                          	return -1.0 / B;
                                                                                                                          }
                                                                                                                          
                                                                                                                          module fmin_fmax_functions
                                                                                                                              implicit none
                                                                                                                              private
                                                                                                                              public fmax
                                                                                                                              public fmin
                                                                                                                          
                                                                                                                              interface fmax
                                                                                                                                  module procedure fmax88
                                                                                                                                  module procedure fmax44
                                                                                                                                  module procedure fmax84
                                                                                                                                  module procedure fmax48
                                                                                                                              end interface
                                                                                                                              interface fmin
                                                                                                                                  module procedure fmin88
                                                                                                                                  module procedure fmin44
                                                                                                                                  module procedure fmin84
                                                                                                                                  module procedure fmin48
                                                                                                                              end interface
                                                                                                                          contains
                                                                                                                              real(8) function fmax88(x, y) result (res)
                                                                                                                                  real(8), intent (in) :: x
                                                                                                                                  real(8), intent (in) :: y
                                                                                                                                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                                              end function
                                                                                                                              real(4) function fmax44(x, y) result (res)
                                                                                                                                  real(4), intent (in) :: x
                                                                                                                                  real(4), intent (in) :: y
                                                                                                                                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                                              end function
                                                                                                                              real(8) function fmax84(x, y) result(res)
                                                                                                                                  real(8), intent (in) :: x
                                                                                                                                  real(4), intent (in) :: y
                                                                                                                                  res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                                                                                              end function
                                                                                                                              real(8) function fmax48(x, y) result(res)
                                                                                                                                  real(4), intent (in) :: x
                                                                                                                                  real(8), intent (in) :: y
                                                                                                                                  res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                                                                                              end function
                                                                                                                              real(8) function fmin88(x, y) result (res)
                                                                                                                                  real(8), intent (in) :: x
                                                                                                                                  real(8), intent (in) :: y
                                                                                                                                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                                              end function
                                                                                                                              real(4) function fmin44(x, y) result (res)
                                                                                                                                  real(4), intent (in) :: x
                                                                                                                                  real(4), intent (in) :: y
                                                                                                                                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                                              end function
                                                                                                                              real(8) function fmin84(x, y) result(res)
                                                                                                                                  real(8), intent (in) :: x
                                                                                                                                  real(4), intent (in) :: y
                                                                                                                                  res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                                                                                              end function
                                                                                                                              real(8) function fmin48(x, y) result(res)
                                                                                                                                  real(4), intent (in) :: x
                                                                                                                                  real(8), intent (in) :: y
                                                                                                                                  res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                                                                                              end function
                                                                                                                          end module
                                                                                                                          
                                                                                                                          real(8) function code(f, b, x)
                                                                                                                          use fmin_fmax_functions
                                                                                                                              real(8), intent (in) :: f
                                                                                                                              real(8), intent (in) :: b
                                                                                                                              real(8), intent (in) :: x
                                                                                                                              code = (-1.0d0) / b
                                                                                                                          end function
                                                                                                                          
                                                                                                                          public static double code(double F, double B, double x) {
                                                                                                                          	return -1.0 / B;
                                                                                                                          }
                                                                                                                          
                                                                                                                          def code(F, B, x):
                                                                                                                          	return -1.0 / B
                                                                                                                          
                                                                                                                          function code(F, B, x)
                                                                                                                          	return Float64(-1.0 / B)
                                                                                                                          end
                                                                                                                          
                                                                                                                          function tmp = code(F, B, x)
                                                                                                                          	tmp = -1.0 / B;
                                                                                                                          end
                                                                                                                          
                                                                                                                          code[F_, B_, x_] := N[(-1.0 / B), $MachinePrecision]
                                                                                                                          
                                                                                                                          \frac{-1}{B}
                                                                                                                          
                                                                                                                          Derivation
                                                                                                                          1. Initial program 76.3%

                                                                                                                            \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                                                                          2. Taylor expanded in F around -inf

                                                                                                                            \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                                                                                                          3. Step-by-step derivation
                                                                                                                            1. lower-/.f64N/A

                                                                                                                              \[\leadsto \frac{-1}{\color{blue}{\sin B}} \]
                                                                                                                            2. lower-sin.f6417.7

                                                                                                                              \[\leadsto \frac{-1}{\sin B} \]
                                                                                                                          4. Applied rewrites17.7%

                                                                                                                            \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                                                                                                          5. Taylor expanded in B around 0

                                                                                                                            \[\leadsto \frac{-1}{B} \]
                                                                                                                          6. Step-by-step derivation
                                                                                                                            1. Applied rewrites10.6%

                                                                                                                              \[\leadsto \frac{-1}{B} \]
                                                                                                                            2. Add Preprocessing

                                                                                                                            Reproduce

                                                                                                                            ?
                                                                                                                            herbie shell --seed 2025174 
                                                                                                                            (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))))))