VandenBroeck and Keller, Equation (23)

Percentage Accurate: 75.7% → 99.7%
Time: 7.5s
Alternatives: 29
Speedup: 1.3×

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 29 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: 75.7% accurate, 1.0× speedup?

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

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

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

Alternative 1: 99.7% accurate, 0.9× speedup?

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

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

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


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

    1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

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

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

      if -3.99999999999999993e67 < F < 6.8e6

      1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 6.8e6 < F

      1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 2: 99.7% accurate, 1.0× speedup?

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

        1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

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

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

          if -3.99999999999999993e67 < F < 6.8e6

          1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

          if 6.8e6 < F

          1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 3: 99.7% accurate, 1.0× speedup?

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

            1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

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

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

              if -1.25e93 < F < 6.8e6

              1. Initial program 75.7%

                \[\left(-x \cdot \frac{1}{\tan 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 6.8e6 < F

              1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

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

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

              Alternative 4: 99.7% accurate, 1.0× speedup?

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

                1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

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

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

                  if -1e15 < F < 6.8e6

                  1. Initial program 75.7%

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

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

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

                  if 6.8e6 < F

                  1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

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

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

                  Alternative 5: 99.0% accurate, 1.0× speedup?

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

                    1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

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

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

                      if -0.5 < F < 6.49999999999999943e-5

                      1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

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

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

                        if 6.49999999999999943e-5 < F

                        1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

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

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

                        Alternative 6: 99.0% accurate, 1.1× speedup?

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

                          1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

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

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

                            if -0.5 < F < 6.49999999999999943e-5

                            1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

                              \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sin B}, {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot F, \frac{-x}{\tan B}\right)} \]
                            4. Applied rewrites84.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}{\tan B}\right)} \]
                            5. Taylor expanded in F around 0

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

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

                              if 6.49999999999999943e-5 < F

                              1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

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

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

                              Alternative 7: 91.4% accurate, 1.0× speedup?

                              \[\begin{array}{l} t_0 := \frac{-x}{\tan B}\\ t_1 := -1 \cdot \frac{x}{B}\\ t_2 := \frac{1}{\sin B}\\ t_3 := {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot F\\ \mathbf{if}\;F \leq -5.2 \cdot 10^{+66}:\\ \;\;\;\;\mathsf{fma}\left(t\_2, -1, t\_0\right)\\ \mathbf{elif}\;F \leq -1.3 \cdot 10^{-161}:\\ \;\;\;\;\mathsf{fma}\left(\frac{F \cdot \frac{1}{F}}{\sin B}, t\_3, t\_1\right)\\ \mathbf{elif}\;F \leq 3.8 \cdot 10^{-98}:\\ \;\;\;\;{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 6800000:\\ \;\;\;\;\mathsf{fma}\left(\frac{F \cdot \left(\frac{1}{F \cdot F} \cdot \frac{1}{\frac{1}{F}}\right)}{\sin B}, t\_3, t\_1\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(t\_2, 1, t\_0\right)\\ \end{array} \]
                              (FPCore (F B x)
                               :precision binary64
                               (let* ((t_0 (/ (- x) (tan B)))
                                      (t_1 (* -1.0 (/ x B)))
                                      (t_2 (/ 1.0 (sin B)))
                                      (t_3 (* (pow (fma 2.0 x (fma F F 2.0)) -0.5) F)))
                                 (if (<= F -5.2e+66)
                                   (fma t_2 -1.0 t_0)
                                   (if (<= F -1.3e-161)
                                     (fma (/ (* F (/ 1.0 F)) (sin B)) t_3 t_1)
                                     (if (<= F 3.8e-98)
                                       (- (* (pow (fma x 2.0 (fma F F 2.0)) -0.5) (/ F B)) (/ x (tan B)))
                                       (if (<= F 6800000.0)
                                         (fma
                                          (/ (* F (* (/ 1.0 (* F F)) (/ 1.0 (/ 1.0 F)))) (sin B))
                                          t_3
                                          t_1)
                                         (fma t_2 1.0 t_0)))))))
                              double code(double F, double B, double x) {
                              	double t_0 = -x / tan(B);
                              	double t_1 = -1.0 * (x / B);
                              	double t_2 = 1.0 / sin(B);
                              	double t_3 = pow(fma(2.0, x, fma(F, F, 2.0)), -0.5) * F;
                              	double tmp;
                              	if (F <= -5.2e+66) {
                              		tmp = fma(t_2, -1.0, t_0);
                              	} else if (F <= -1.3e-161) {
                              		tmp = fma(((F * (1.0 / F)) / sin(B)), t_3, t_1);
                              	} else if (F <= 3.8e-98) {
                              		tmp = (pow(fma(x, 2.0, fma(F, F, 2.0)), -0.5) * (F / B)) - (x / tan(B));
                              	} else if (F <= 6800000.0) {
                              		tmp = fma(((F * ((1.0 / (F * F)) * (1.0 / (1.0 / F)))) / sin(B)), t_3, t_1);
                              	} else {
                              		tmp = fma(t_2, 1.0, t_0);
                              	}
                              	return tmp;
                              }
                              
                              function code(F, B, x)
                              	t_0 = Float64(Float64(-x) / tan(B))
                              	t_1 = Float64(-1.0 * Float64(x / B))
                              	t_2 = Float64(1.0 / sin(B))
                              	t_3 = Float64((fma(2.0, x, fma(F, F, 2.0)) ^ -0.5) * F)
                              	tmp = 0.0
                              	if (F <= -5.2e+66)
                              		tmp = fma(t_2, -1.0, t_0);
                              	elseif (F <= -1.3e-161)
                              		tmp = fma(Float64(Float64(F * Float64(1.0 / F)) / sin(B)), t_3, t_1);
                              	elseif (F <= 3.8e-98)
                              		tmp = Float64(Float64((fma(x, 2.0, fma(F, F, 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / tan(B)));
                              	elseif (F <= 6800000.0)
                              		tmp = fma(Float64(Float64(F * Float64(Float64(1.0 / Float64(F * F)) * Float64(1.0 / Float64(1.0 / F)))) / sin(B)), t_3, t_1);
                              	else
                              		tmp = fma(t_2, 1.0, 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[(-1.0 * N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[Power[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * F), $MachinePrecision]}, If[LessEqual[F, -5.2e+66], N[(t$95$2 * -1.0 + t$95$0), $MachinePrecision], If[LessEqual[F, -1.3e-161], N[(N[(N[(F * N[(1.0 / F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] * t$95$3 + t$95$1), $MachinePrecision], If[LessEqual[F, 3.8e-98], N[(N[(N[Power[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6800000.0], N[(N[(N[(F * N[(N[(1.0 / N[(F * F), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] * t$95$3 + t$95$1), $MachinePrecision], N[(t$95$2 * 1.0 + t$95$0), $MachinePrecision]]]]]]]]]
                              
                              \begin{array}{l}
                              t_0 := \frac{-x}{\tan B}\\
                              t_1 := -1 \cdot \frac{x}{B}\\
                              t_2 := \frac{1}{\sin B}\\
                              t_3 := {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot F\\
                              \mathbf{if}\;F \leq -5.2 \cdot 10^{+66}:\\
                              \;\;\;\;\mathsf{fma}\left(t\_2, -1, t\_0\right)\\
                              
                              \mathbf{elif}\;F \leq -1.3 \cdot 10^{-161}:\\
                              \;\;\;\;\mathsf{fma}\left(\frac{F \cdot \frac{1}{F}}{\sin B}, t\_3, t\_1\right)\\
                              
                              \mathbf{elif}\;F \leq 3.8 \cdot 10^{-98}:\\
                              \;\;\;\;{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{\tan B}\\
                              
                              \mathbf{elif}\;F \leq 6800000:\\
                              \;\;\;\;\mathsf{fma}\left(\frac{F \cdot \left(\frac{1}{F \cdot F} \cdot \frac{1}{\frac{1}{F}}\right)}{\sin B}, t\_3, t\_1\right)\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;\mathsf{fma}\left(t\_2, 1, t\_0\right)\\
                              
                              
                              \end{array}
                              
                              Derivation
                              1. Split input into 5 regimes
                              2. if F < -5.20000000000000024e66

                                1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

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

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

                                  if -5.20000000000000024e66 < F < -1.29999999999999998e-161

                                  1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  if -1.29999999999999998e-161 < F < 3.8000000000000003e-98

                                  1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  if 3.8000000000000003e-98 < F < 6.8e6

                                  1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  if 6.8e6 < F

                                  1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

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

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

                                  Alternative 8: 91.4% accurate, 1.2× speedup?

                                  \[\begin{array}{l} t_0 := \frac{-x}{\tan B}\\ t_1 := \frac{1}{\sin B}\\ t_2 := {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot F\\ \mathbf{if}\;F \leq -5.2 \cdot 10^{+66}:\\ \;\;\;\;\mathsf{fma}\left(t\_1, -1, t\_0\right)\\ \mathbf{elif}\;F \leq -1.3 \cdot 10^{-161}:\\ \;\;\;\;\mathsf{fma}\left(\frac{F \cdot \frac{1}{F}}{\sin B}, t\_2, -1 \cdot \frac{x}{B}\right)\\ \mathbf{elif}\;F \leq 3.8 \cdot 10^{-98}:\\ \;\;\;\;{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 6800000:\\ \;\;\;\;\frac{1}{\frac{\sin B}{t\_2}} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(t\_1, 1, t\_0\right)\\ \end{array} \]
                                  (FPCore (F B x)
                                   :precision binary64
                                   (let* ((t_0 (/ (- x) (tan B)))
                                          (t_1 (/ 1.0 (sin B)))
                                          (t_2 (* (pow (fma 2.0 x (fma F F 2.0)) -0.5) F)))
                                     (if (<= F -5.2e+66)
                                       (fma t_1 -1.0 t_0)
                                       (if (<= F -1.3e-161)
                                         (fma (/ (* F (/ 1.0 F)) (sin B)) t_2 (* -1.0 (/ x B)))
                                         (if (<= F 3.8e-98)
                                           (- (* (pow (fma x 2.0 (fma F F 2.0)) -0.5) (/ F B)) (/ x (tan B)))
                                           (if (<= F 6800000.0)
                                             (- (/ 1.0 (/ (sin B) t_2)) (/ x B))
                                             (fma t_1 1.0 t_0)))))))
                                  double code(double F, double B, double x) {
                                  	double t_0 = -x / tan(B);
                                  	double t_1 = 1.0 / sin(B);
                                  	double t_2 = pow(fma(2.0, x, fma(F, F, 2.0)), -0.5) * F;
                                  	double tmp;
                                  	if (F <= -5.2e+66) {
                                  		tmp = fma(t_1, -1.0, t_0);
                                  	} else if (F <= -1.3e-161) {
                                  		tmp = fma(((F * (1.0 / F)) / sin(B)), t_2, (-1.0 * (x / B)));
                                  	} else if (F <= 3.8e-98) {
                                  		tmp = (pow(fma(x, 2.0, fma(F, F, 2.0)), -0.5) * (F / B)) - (x / tan(B));
                                  	} else if (F <= 6800000.0) {
                                  		tmp = (1.0 / (sin(B) / t_2)) - (x / B);
                                  	} else {
                                  		tmp = fma(t_1, 1.0, t_0);
                                  	}
                                  	return tmp;
                                  }
                                  
                                  function code(F, B, x)
                                  	t_0 = Float64(Float64(-x) / tan(B))
                                  	t_1 = Float64(1.0 / sin(B))
                                  	t_2 = Float64((fma(2.0, x, fma(F, F, 2.0)) ^ -0.5) * F)
                                  	tmp = 0.0
                                  	if (F <= -5.2e+66)
                                  		tmp = fma(t_1, -1.0, t_0);
                                  	elseif (F <= -1.3e-161)
                                  		tmp = fma(Float64(Float64(F * Float64(1.0 / F)) / sin(B)), t_2, Float64(-1.0 * Float64(x / B)));
                                  	elseif (F <= 3.8e-98)
                                  		tmp = Float64(Float64((fma(x, 2.0, fma(F, F, 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / tan(B)));
                                  	elseif (F <= 6800000.0)
                                  		tmp = Float64(Float64(1.0 / Float64(sin(B) / t_2)) - Float64(x / B));
                                  	else
                                  		tmp = fma(t_1, 1.0, 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[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Power[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * F), $MachinePrecision]}, If[LessEqual[F, -5.2e+66], N[(t$95$1 * -1.0 + t$95$0), $MachinePrecision], If[LessEqual[F, -1.3e-161], N[(N[(N[(F * N[(1.0 / F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] * t$95$2 + N[(-1.0 * N[(x / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.8e-98], N[(N[(N[Power[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6800000.0], N[(N[(1.0 / N[(N[Sin[B], $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * 1.0 + t$95$0), $MachinePrecision]]]]]]]]
                                  
                                  \begin{array}{l}
                                  t_0 := \frac{-x}{\tan B}\\
                                  t_1 := \frac{1}{\sin B}\\
                                  t_2 := {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot F\\
                                  \mathbf{if}\;F \leq -5.2 \cdot 10^{+66}:\\
                                  \;\;\;\;\mathsf{fma}\left(t\_1, -1, t\_0\right)\\
                                  
                                  \mathbf{elif}\;F \leq -1.3 \cdot 10^{-161}:\\
                                  \;\;\;\;\mathsf{fma}\left(\frac{F \cdot \frac{1}{F}}{\sin B}, t\_2, -1 \cdot \frac{x}{B}\right)\\
                                  
                                  \mathbf{elif}\;F \leq 3.8 \cdot 10^{-98}:\\
                                  \;\;\;\;{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{\tan B}\\
                                  
                                  \mathbf{elif}\;F \leq 6800000:\\
                                  \;\;\;\;\frac{1}{\frac{\sin B}{t\_2}} - \frac{x}{B}\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;\mathsf{fma}\left(t\_1, 1, t\_0\right)\\
                                  
                                  
                                  \end{array}
                                  
                                  Derivation
                                  1. Split input into 5 regimes
                                  2. if F < -5.20000000000000024e66

                                    1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

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

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

                                      if -5.20000000000000024e66 < F < -1.29999999999999998e-161

                                      1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      if -1.29999999999999998e-161 < F < 3.8000000000000003e-98

                                      1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      if 3.8000000000000003e-98 < F < 6.8e6

                                      1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

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

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

                                      if 6.8e6 < F

                                      1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

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

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

                                      Alternative 9: 91.4% accurate, 1.2× speedup?

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

                                        1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

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

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

                                          if -5.20000000000000024e66 < F < -1.29999999999999998e-161

                                          1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

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

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

                                          if -1.29999999999999998e-161 < F < 3.8000000000000003e-98

                                          1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                          if 3.8000000000000003e-98 < F < 6.8e6

                                          1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

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

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

                                          if 6.8e6 < F

                                          1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

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

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

                                          Alternative 10: 80.5% accurate, 1.3× speedup?

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

                                            1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

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

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

                                              if -5.20000000000000024e66 < F < -1.29999999999999998e-161

                                              1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

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

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

                                              if -1.29999999999999998e-161 < F < 3.8000000000000003e-98

                                              1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                              if 3.8000000000000003e-98 < F < 7.00000000000000016e181

                                              1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

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

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

                                              if 7.00000000000000016e181 < F

                                              1. Initial program 75.7%

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

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

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

                                            Alternative 11: 74.0% accurate, 1.4× speedup?

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

                                              1. Initial program 75.7%

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

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

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

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

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

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

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

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

                                              if -1.39999999999999992e-152 < x < 4.65e11

                                              1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

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

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

                                            Alternative 12: 67.2% accurate, 1.4× speedup?

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

                                              1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                if -3.99999999999999983e111 < F < 7.00000000000000016e181

                                                1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

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

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

                                                if 7.00000000000000016e181 < F

                                                1. Initial program 75.7%

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

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

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

                                              Alternative 13: 67.2% accurate, 1.5× speedup?

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

                                                1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                  if -1.25e93 < F < 7.00000000000000016e181

                                                  1. Initial program 75.7%

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

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

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

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

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

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

                                                    \[\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.00000000000000016e181 < F

                                                  1. Initial program 75.7%

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

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

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

                                                Alternative 14: 67.2% accurate, 1.5× speedup?

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

                                                  1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                    if -3.99999999999999983e111 < F < 7.00000000000000016e181

                                                    1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

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

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

                                                    if 7.00000000000000016e181 < F

                                                    1. Initial program 75.7%

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

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

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

                                                  Alternative 15: 66.2% accurate, 1.5× speedup?

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

                                                    1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                      if -9.5e5 < F < 5.1999999999999998e144

                                                      1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

                                                      if 5.1999999999999998e144 < F

                                                      1. Initial program 75.7%

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

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

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

                                                    Alternative 16: 64.5% accurate, 1.6× speedup?

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

                                                      1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                        if -0.5 < F < 0.20000000000000001

                                                        1. Initial program 75.7%

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

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

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

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

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

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

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

                                                            \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \frac{x}{B}} \]
                                                          5. lower--.f6448.5%

                                                            \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \frac{x}{B}} \]
                                                        6. Applied rewrites48.5%

                                                          \[\leadsto \color{blue}{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \frac{F}{\sin B} - \frac{x}{B}} \]
                                                        7. Taylor expanded in F around 0

                                                          \[\leadsto {\left(\mathsf{fma}\left(x, 2, \color{blue}{2}\right)\right)}^{-0.5} \cdot \frac{F}{\sin B} - \frac{x}{B} \]
                                                        8. Step-by-step derivation
                                                          1. Applied rewrites34.6%

                                                            \[\leadsto {\left(\mathsf{fma}\left(x, 2, \color{blue}{2}\right)\right)}^{-0.5} \cdot \frac{F}{\sin B} - \frac{x}{B} \]

                                                          if 0.20000000000000001 < F

                                                          1. Initial program 75.7%

                                                            \[\left(-x \cdot \frac{1}{\tan 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.3%

                                                              \[\leadsto \frac{1}{\sin B} \]
                                                          4. Applied rewrites17.3%

                                                            \[\leadsto \color{blue}{\frac{1}{\sin B}} \]
                                                        9. Recombined 3 regimes into one program.
                                                        10. Add Preprocessing

                                                        Alternative 17: 58.1% accurate, 2.0× speedup?

                                                        \[\begin{array}{l} \mathbf{if}\;F \leq -20:\\ \;\;\;\;\mathsf{fma}\left(\frac{F \cdot \frac{1}{F}}{\sin B}, -1, -1 \cdot \frac{x}{B}\right)\\ \mathbf{elif}\;F \leq 53000000:\\ \;\;\;\;{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
                                                        (FPCore (F B x)
                                                         :precision binary64
                                                         (if (<= F -20.0)
                                                           (fma (/ (* F (/ 1.0 F)) (sin B)) -1.0 (* -1.0 (/ x B)))
                                                           (if (<= F 53000000.0)
                                                             (- (* (pow (fma x 2.0 (fma F F 2.0)) -0.5) (/ F B)) (/ x B))
                                                             (/ 1.0 (sin B)))))
                                                        double code(double F, double B, double x) {
                                                        	double tmp;
                                                        	if (F <= -20.0) {
                                                        		tmp = fma(((F * (1.0 / F)) / sin(B)), -1.0, (-1.0 * (x / B)));
                                                        	} else if (F <= 53000000.0) {
                                                        		tmp = (pow(fma(x, 2.0, fma(F, F, 2.0)), -0.5) * (F / B)) - (x / B);
                                                        	} else {
                                                        		tmp = 1.0 / sin(B);
                                                        	}
                                                        	return tmp;
                                                        }
                                                        
                                                        function code(F, B, x)
                                                        	tmp = 0.0
                                                        	if (F <= -20.0)
                                                        		tmp = fma(Float64(Float64(F * Float64(1.0 / F)) / sin(B)), -1.0, Float64(-1.0 * Float64(x / B)));
                                                        	elseif (F <= 53000000.0)
                                                        		tmp = Float64(Float64((fma(x, 2.0, fma(F, F, 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B));
                                                        	else
                                                        		tmp = Float64(1.0 / sin(B));
                                                        	end
                                                        	return tmp
                                                        end
                                                        
                                                        code[F_, B_, x_] := If[LessEqual[F, -20.0], N[(N[(N[(F * N[(1.0 / F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] * -1.0 + N[(-1.0 * N[(x / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 53000000.0], N[(N[(N[Power[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]
                                                        
                                                        \begin{array}{l}
                                                        \mathbf{if}\;F \leq -20:\\
                                                        \;\;\;\;\mathsf{fma}\left(\frac{F \cdot \frac{1}{F}}{\sin B}, -1, -1 \cdot \frac{x}{B}\right)\\
                                                        
                                                        \mathbf{elif}\;F \leq 53000000:\\
                                                        \;\;\;\;{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
                                                        
                                                        \mathbf{else}:\\
                                                        \;\;\;\;\frac{1}{\sin B}\\
                                                        
                                                        
                                                        \end{array}
                                                        
                                                        Derivation
                                                        1. Split input into 3 regimes
                                                        2. if F < -20

                                                          1. Initial program 75.7%

                                                            \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                          2. Step-by-step derivation
                                                            1. lift-+.f64N/A

                                                              \[\leadsto \color{blue}{\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
                                                            2. +-commutativeN/A

                                                              \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
                                                            3. lift-*.f64N/A

                                                              \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                                                            4. lift-/.f64N/A

                                                              \[\leadsto \color{blue}{\frac{F}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                                                            5. associate-*l/N/A

                                                              \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                                                            6. mult-flipN/A

                                                              \[\leadsto \color{blue}{\left(F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right) \cdot \frac{1}{\sin B}} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                                                            7. *-commutativeN/A

                                                              \[\leadsto \color{blue}{\frac{1}{\sin B} \cdot \left(F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right)} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                                                            8. lower-fma.f64N/A

                                                              \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sin B}, F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}, -x \cdot \frac{1}{\tan B}\right)} \]
                                                          3. Applied rewrites84.7%

                                                            \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sin B}, {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot F, \frac{-x}{\tan B}\right)} \]
                                                          4. Step-by-step derivation
                                                            1. lift-/.f64N/A

                                                              \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{1}{\sin B}}, {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}} \cdot F, \frac{-x}{\tan B}\right) \]
                                                            2. metadata-evalN/A

                                                              \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{{F}^{0}}}{\sin B}, {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}} \cdot F, \frac{-x}{\tan B}\right) \]
                                                            3. metadata-evalN/A

                                                              \[\leadsto \mathsf{fma}\left(\frac{{F}^{\color{blue}{\left(-1 + 1\right)}}}{\sin B}, {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}} \cdot F, \frac{-x}{\tan B}\right) \]
                                                            4. pow-plusN/A

                                                              \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{{F}^{-1} \cdot F}}{\sin B}, {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}} \cdot F, \frac{-x}{\tan B}\right) \]
                                                            5. inv-powN/A

                                                              \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\frac{1}{F}} \cdot F}{\sin B}, {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}} \cdot F, \frac{-x}{\tan B}\right) \]
                                                            6. associate-*l/N/A

                                                              \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{\frac{1}{F}}{\sin B} \cdot F}, {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}} \cdot F, \frac{-x}{\tan B}\right) \]
                                                            7. associate-/r*N/A

                                                              \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{1}{F \cdot \sin B}} \cdot F, {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}} \cdot F, \frac{-x}{\tan B}\right) \]
                                                            8. lift-*.f64N/A

                                                              \[\leadsto \mathsf{fma}\left(\frac{1}{\color{blue}{F \cdot \sin B}} \cdot F, {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}} \cdot F, \frac{-x}{\tan B}\right) \]
                                                            9. lift-/.f64N/A

                                                              \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{1}{F \cdot \sin B}} \cdot F, {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}} \cdot F, \frac{-x}{\tan B}\right) \]
                                                            10. *-commutativeN/A

                                                              \[\leadsto \mathsf{fma}\left(\color{blue}{F \cdot \frac{1}{F \cdot \sin B}}, {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}} \cdot F, \frac{-x}{\tan B}\right) \]
                                                            11. lift-/.f64N/A

                                                              \[\leadsto \mathsf{fma}\left(F \cdot \color{blue}{\frac{1}{F \cdot \sin B}}, {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}} \cdot F, \frac{-x}{\tan B}\right) \]
                                                            12. lift-*.f64N/A

                                                              \[\leadsto \mathsf{fma}\left(F \cdot \frac{1}{\color{blue}{F \cdot \sin B}}, {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}} \cdot F, \frac{-x}{\tan B}\right) \]
                                                            13. associate-/r*N/A

                                                              \[\leadsto \mathsf{fma}\left(F \cdot \color{blue}{\frac{\frac{1}{F}}{\sin B}}, {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}} \cdot F, \frac{-x}{\tan B}\right) \]
                                                            14. associate-*r/N/A

                                                              \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{F \cdot \frac{1}{F}}{\sin B}}, {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}} \cdot F, \frac{-x}{\tan B}\right) \]
                                                            15. lower-/.f64N/A

                                                              \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{F \cdot \frac{1}{F}}{\sin B}}, {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}} \cdot F, \frac{-x}{\tan B}\right) \]
                                                            16. lower-*.f64N/A

                                                              \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{F \cdot \frac{1}{F}}}{\sin B}, {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}} \cdot F, \frac{-x}{\tan B}\right) \]
                                                            17. lower-/.f6484.7%

                                                              \[\leadsto \mathsf{fma}\left(\frac{F \cdot \color{blue}{\frac{1}{F}}}{\sin B}, {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot F, \frac{-x}{\tan B}\right) \]
                                                          5. Applied rewrites84.7%

                                                            \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{F \cdot \frac{1}{F}}{\sin B}}, {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot F, \frac{-x}{\tan B}\right) \]
                                                          6. Taylor expanded in B around 0

                                                            \[\leadsto \mathsf{fma}\left(\frac{F \cdot \frac{1}{F}}{\sin B}, {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot F, \color{blue}{-1 \cdot \frac{x}{B}}\right) \]
                                                          7. Step-by-step derivation
                                                            1. lower-*.f64N/A

                                                              \[\leadsto \mathsf{fma}\left(\frac{F \cdot \frac{1}{F}}{\sin B}, {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}} \cdot F, -1 \cdot \color{blue}{\frac{x}{B}}\right) \]
                                                            2. lower-/.f6457.3%

                                                              \[\leadsto \mathsf{fma}\left(\frac{F \cdot \frac{1}{F}}{\sin B}, {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot F, -1 \cdot \frac{x}{\color{blue}{B}}\right) \]
                                                          8. Applied rewrites57.3%

                                                            \[\leadsto \mathsf{fma}\left(\frac{F \cdot \frac{1}{F}}{\sin B}, {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot F, \color{blue}{-1 \cdot \frac{x}{B}}\right) \]
                                                          9. Taylor expanded in F around -inf

                                                            \[\leadsto \mathsf{fma}\left(\frac{F \cdot \frac{1}{F}}{\sin B}, \color{blue}{-1}, -1 \cdot \frac{x}{B}\right) \]
                                                          10. Step-by-step derivation
                                                            1. Applied rewrites36.1%

                                                              \[\leadsto \mathsf{fma}\left(\frac{F \cdot \frac{1}{F}}{\sin B}, \color{blue}{-1}, -1 \cdot \frac{x}{B}\right) \]

                                                            if -20 < F < 5.3e7

                                                            1. Initial program 75.7%

                                                              \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                            2. Taylor expanded in B around 0

                                                              \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                            3. Step-by-step derivation
                                                              1. lower-/.f6448.5%

                                                                \[\leadsto \left(-\frac{x}{\color{blue}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                            4. Applied rewrites48.5%

                                                              \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                            5. Step-by-step derivation
                                                              1. lift-+.f64N/A

                                                                \[\leadsto \color{blue}{\left(-\frac{x}{B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
                                                              2. +-commutativeN/A

                                                                \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-\frac{x}{B}\right)} \]
                                                              3. lift-neg.f64N/A

                                                                \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \color{blue}{\left(\mathsf{neg}\left(\frac{x}{B}\right)\right)} \]
                                                              4. sub-flip-reverseN/A

                                                                \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \frac{x}{B}} \]
                                                              5. lower--.f6448.5%

                                                                \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \frac{x}{B}} \]
                                                            6. Applied rewrites48.5%

                                                              \[\leadsto \color{blue}{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \frac{F}{\sin B} - \frac{x}{B}} \]
                                                            7. Taylor expanded in B around 0

                                                              \[\leadsto {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \color{blue}{\frac{F}{B}} - \frac{x}{B} \]
                                                            8. Step-by-step derivation
                                                              1. lower-/.f6435.0%

                                                                \[\leadsto {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \frac{F}{\color{blue}{B}} - \frac{x}{B} \]
                                                            9. Applied rewrites35.0%

                                                              \[\leadsto {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \color{blue}{\frac{F}{B}} - \frac{x}{B} \]

                                                            if 5.3e7 < F

                                                            1. Initial program 75.7%

                                                              \[\left(-x \cdot \frac{1}{\tan 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.3%

                                                                \[\leadsto \frac{1}{\sin B} \]
                                                            4. Applied rewrites17.3%

                                                              \[\leadsto \color{blue}{\frac{1}{\sin B}} \]
                                                          11. Recombined 3 regimes into one program.
                                                          12. Add Preprocessing

                                                          Alternative 18: 52.4% accurate, 2.0× speedup?

                                                          \[\begin{array}{l} \mathbf{if}\;F \leq -5.8 \cdot 10^{+53}:\\ \;\;\;\;\frac{-1}{F} \cdot \frac{F}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 53000000:\\ \;\;\;\;\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
                                                          (FPCore (F B x)
                                                           :precision binary64
                                                           (if (<= F -5.8e+53)
                                                             (- (* (/ -1.0 F) (/ F (sin B))) (/ x B))
                                                             (if (<= F 53000000.0)
                                                               (/ (- (* F (pow (+ 2.0 (fma 2.0 x (pow F 2.0))) -0.5)) x) B)
                                                               (/ 1.0 (sin B)))))
                                                          double code(double F, double B, double x) {
                                                          	double tmp;
                                                          	if (F <= -5.8e+53) {
                                                          		tmp = ((-1.0 / F) * (F / sin(B))) - (x / B);
                                                          	} else if (F <= 53000000.0) {
                                                          		tmp = ((F * pow((2.0 + fma(2.0, x, pow(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 <= -5.8e+53)
                                                          		tmp = Float64(Float64(Float64(-1.0 / F) * Float64(F / sin(B))) - Float64(x / B));
                                                          	elseif (F <= 53000000.0)
                                                          		tmp = Float64(Float64(Float64(F * (Float64(2.0 + fma(2.0, x, (F ^ 2.0))) ^ -0.5)) - x) / B);
                                                          	else
                                                          		tmp = Float64(1.0 / sin(B));
                                                          	end
                                                          	return tmp
                                                          end
                                                          
                                                          code[F_, B_, x_] := If[LessEqual[F, -5.8e+53], N[(N[(N[(-1.0 / F), $MachinePrecision] * N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 53000000.0], N[(N[(N[(F * N[Power[N[(2.0 + N[(2.0 * x + N[Power[F, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]
                                                          
                                                          \begin{array}{l}
                                                          \mathbf{if}\;F \leq -5.8 \cdot 10^{+53}:\\
                                                          \;\;\;\;\frac{-1}{F} \cdot \frac{F}{\sin B} - \frac{x}{B}\\
                                                          
                                                          \mathbf{elif}\;F \leq 53000000:\\
                                                          \;\;\;\;\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5} - x}{B}\\
                                                          
                                                          \mathbf{else}:\\
                                                          \;\;\;\;\frac{1}{\sin B}\\
                                                          
                                                          
                                                          \end{array}
                                                          
                                                          Derivation
                                                          1. Split input into 3 regimes
                                                          2. if F < -5.8000000000000004e53

                                                            1. Initial program 75.7%

                                                              \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                            2. Taylor expanded in B around 0

                                                              \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                            3. Step-by-step derivation
                                                              1. lower-/.f6448.5%

                                                                \[\leadsto \left(-\frac{x}{\color{blue}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                            4. Applied rewrites48.5%

                                                              \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                            5. Step-by-step derivation
                                                              1. lift-+.f64N/A

                                                                \[\leadsto \color{blue}{\left(-\frac{x}{B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
                                                              2. +-commutativeN/A

                                                                \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-\frac{x}{B}\right)} \]
                                                              3. lift-neg.f64N/A

                                                                \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \color{blue}{\left(\mathsf{neg}\left(\frac{x}{B}\right)\right)} \]
                                                              4. sub-flip-reverseN/A

                                                                \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \frac{x}{B}} \]
                                                              5. lower--.f6448.5%

                                                                \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \frac{x}{B}} \]
                                                            6. Applied rewrites48.5%

                                                              \[\leadsto \color{blue}{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \frac{F}{\sin B} - \frac{x}{B}} \]
                                                            7. Taylor expanded in F around -inf

                                                              \[\leadsto \color{blue}{\frac{-1}{F}} \cdot \frac{F}{\sin B} - \frac{x}{B} \]
                                                            8. Step-by-step derivation
                                                              1. lower-/.f6427.7%

                                                                \[\leadsto \frac{-1}{\color{blue}{F}} \cdot \frac{F}{\sin B} - \frac{x}{B} \]
                                                            9. Applied rewrites27.7%

                                                              \[\leadsto \color{blue}{\frac{-1}{F}} \cdot \frac{F}{\sin B} - \frac{x}{B} \]

                                                            if -5.8000000000000004e53 < F < 5.3e7

                                                            1. Initial program 75.7%

                                                              \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                            2. Taylor expanded in B around 0

                                                              \[\leadsto \color{blue}{\frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B}} \]
                                                            3. Step-by-step derivation
                                                              1. metadata-evalN/A

                                                                \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} - x}{B} \]
                                                              2. metadata-evalN/A

                                                                \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} - x}{B} \]
                                                              3. lower-/.f64N/A

                                                                \[\leadsto \frac{F \cdot {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} - x}{\color{blue}{B}} \]
                                                            4. Applied rewrites43.8%

                                                              \[\leadsto \color{blue}{\frac{F \cdot {\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.5} - x}{B}} \]

                                                            if 5.3e7 < F

                                                            1. Initial program 75.7%

                                                              \[\left(-x \cdot \frac{1}{\tan 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.3%

                                                                \[\leadsto \frac{1}{\sin B} \]
                                                            4. Applied rewrites17.3%

                                                              \[\leadsto \color{blue}{\frac{1}{\sin B}} \]
                                                          3. Recombined 3 regimes into one program.
                                                          4. Add Preprocessing

                                                          Alternative 19: 51.6% accurate, 2.2× speedup?

                                                          \[\begin{array}{l} \mathbf{if}\;F \leq -20:\\ \;\;\;\;\frac{-1}{F} \cdot \frac{F}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 53000000:\\ \;\;\;\;{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
                                                          (FPCore (F B x)
                                                           :precision binary64
                                                           (if (<= F -20.0)
                                                             (- (* (/ -1.0 F) (/ F (sin B))) (/ x B))
                                                             (if (<= F 53000000.0)
                                                               (- (* (pow (fma x 2.0 (fma F F 2.0)) -0.5) (/ F B)) (/ x B))
                                                               (/ 1.0 (sin B)))))
                                                          double code(double F, double B, double x) {
                                                          	double tmp;
                                                          	if (F <= -20.0) {
                                                          		tmp = ((-1.0 / F) * (F / sin(B))) - (x / B);
                                                          	} else if (F <= 53000000.0) {
                                                          		tmp = (pow(fma(x, 2.0, fma(F, F, 2.0)), -0.5) * (F / B)) - (x / B);
                                                          	} else {
                                                          		tmp = 1.0 / sin(B);
                                                          	}
                                                          	return tmp;
                                                          }
                                                          
                                                          function code(F, B, x)
                                                          	tmp = 0.0
                                                          	if (F <= -20.0)
                                                          		tmp = Float64(Float64(Float64(-1.0 / F) * Float64(F / sin(B))) - Float64(x / B));
                                                          	elseif (F <= 53000000.0)
                                                          		tmp = Float64(Float64((fma(x, 2.0, fma(F, F, 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B));
                                                          	else
                                                          		tmp = Float64(1.0 / sin(B));
                                                          	end
                                                          	return tmp
                                                          end
                                                          
                                                          code[F_, B_, x_] := If[LessEqual[F, -20.0], N[(N[(N[(-1.0 / F), $MachinePrecision] * N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 53000000.0], N[(N[(N[Power[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]
                                                          
                                                          \begin{array}{l}
                                                          \mathbf{if}\;F \leq -20:\\
                                                          \;\;\;\;\frac{-1}{F} \cdot \frac{F}{\sin B} - \frac{x}{B}\\
                                                          
                                                          \mathbf{elif}\;F \leq 53000000:\\
                                                          \;\;\;\;{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
                                                          
                                                          \mathbf{else}:\\
                                                          \;\;\;\;\frac{1}{\sin B}\\
                                                          
                                                          
                                                          \end{array}
                                                          
                                                          Derivation
                                                          1. Split input into 3 regimes
                                                          2. if F < -20

                                                            1. Initial program 75.7%

                                                              \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                            2. Taylor expanded in B around 0

                                                              \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                            3. Step-by-step derivation
                                                              1. lower-/.f6448.5%

                                                                \[\leadsto \left(-\frac{x}{\color{blue}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                            4. Applied rewrites48.5%

                                                              \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                            5. Step-by-step derivation
                                                              1. lift-+.f64N/A

                                                                \[\leadsto \color{blue}{\left(-\frac{x}{B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
                                                              2. +-commutativeN/A

                                                                \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-\frac{x}{B}\right)} \]
                                                              3. lift-neg.f64N/A

                                                                \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \color{blue}{\left(\mathsf{neg}\left(\frac{x}{B}\right)\right)} \]
                                                              4. sub-flip-reverseN/A

                                                                \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \frac{x}{B}} \]
                                                              5. lower--.f6448.5%

                                                                \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \frac{x}{B}} \]
                                                            6. Applied rewrites48.5%

                                                              \[\leadsto \color{blue}{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \frac{F}{\sin B} - \frac{x}{B}} \]
                                                            7. Taylor expanded in F around -inf

                                                              \[\leadsto \color{blue}{\frac{-1}{F}} \cdot \frac{F}{\sin B} - \frac{x}{B} \]
                                                            8. Step-by-step derivation
                                                              1. lower-/.f6427.7%

                                                                \[\leadsto \frac{-1}{\color{blue}{F}} \cdot \frac{F}{\sin B} - \frac{x}{B} \]
                                                            9. Applied rewrites27.7%

                                                              \[\leadsto \color{blue}{\frac{-1}{F}} \cdot \frac{F}{\sin B} - \frac{x}{B} \]

                                                            if -20 < F < 5.3e7

                                                            1. Initial program 75.7%

                                                              \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                            2. Taylor expanded in B around 0

                                                              \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                            3. Step-by-step derivation
                                                              1. lower-/.f6448.5%

                                                                \[\leadsto \left(-\frac{x}{\color{blue}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                            4. Applied rewrites48.5%

                                                              \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                            5. Step-by-step derivation
                                                              1. lift-+.f64N/A

                                                                \[\leadsto \color{blue}{\left(-\frac{x}{B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
                                                              2. +-commutativeN/A

                                                                \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-\frac{x}{B}\right)} \]
                                                              3. lift-neg.f64N/A

                                                                \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \color{blue}{\left(\mathsf{neg}\left(\frac{x}{B}\right)\right)} \]
                                                              4. sub-flip-reverseN/A

                                                                \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \frac{x}{B}} \]
                                                              5. lower--.f6448.5%

                                                                \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \frac{x}{B}} \]
                                                            6. Applied rewrites48.5%

                                                              \[\leadsto \color{blue}{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \frac{F}{\sin B} - \frac{x}{B}} \]
                                                            7. Taylor expanded in B around 0

                                                              \[\leadsto {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \color{blue}{\frac{F}{B}} - \frac{x}{B} \]
                                                            8. Step-by-step derivation
                                                              1. lower-/.f6435.0%

                                                                \[\leadsto {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \frac{F}{\color{blue}{B}} - \frac{x}{B} \]
                                                            9. Applied rewrites35.0%

                                                              \[\leadsto {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \color{blue}{\frac{F}{B}} - \frac{x}{B} \]

                                                            if 5.3e7 < F

                                                            1. Initial program 75.7%

                                                              \[\left(-x \cdot \frac{1}{\tan 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.3%

                                                                \[\leadsto \frac{1}{\sin B} \]
                                                            4. Applied rewrites17.3%

                                                              \[\leadsto \color{blue}{\frac{1}{\sin B}} \]
                                                          3. Recombined 3 regimes into one program.
                                                          4. Add Preprocessing

                                                          Alternative 20: 51.4% accurate, 2.5× speedup?

                                                          \[\begin{array}{l} \mathbf{if}\;F \leq -9.8 \cdot 10^{+58}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 53000000:\\ \;\;\;\;{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
                                                          (FPCore (F B x)
                                                           :precision binary64
                                                           (if (<= F -9.8e+58)
                                                             (/ -1.0 (sin B))
                                                             (if (<= F 53000000.0)
                                                               (- (* (pow (fma x 2.0 (fma F F 2.0)) -0.5) (/ F B)) (/ x B))
                                                               (/ 1.0 (sin B)))))
                                                          double code(double F, double B, double x) {
                                                          	double tmp;
                                                          	if (F <= -9.8e+58) {
                                                          		tmp = -1.0 / sin(B);
                                                          	} else if (F <= 53000000.0) {
                                                          		tmp = (pow(fma(x, 2.0, fma(F, F, 2.0)), -0.5) * (F / B)) - (x / B);
                                                          	} else {
                                                          		tmp = 1.0 / sin(B);
                                                          	}
                                                          	return tmp;
                                                          }
                                                          
                                                          function code(F, B, x)
                                                          	tmp = 0.0
                                                          	if (F <= -9.8e+58)
                                                          		tmp = Float64(-1.0 / sin(B));
                                                          	elseif (F <= 53000000.0)
                                                          		tmp = Float64(Float64((fma(x, 2.0, fma(F, F, 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B));
                                                          	else
                                                          		tmp = Float64(1.0 / sin(B));
                                                          	end
                                                          	return tmp
                                                          end
                                                          
                                                          code[F_, B_, x_] := If[LessEqual[F, -9.8e+58], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 53000000.0], N[(N[(N[Power[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]
                                                          
                                                          \begin{array}{l}
                                                          \mathbf{if}\;F \leq -9.8 \cdot 10^{+58}:\\
                                                          \;\;\;\;\frac{-1}{\sin B}\\
                                                          
                                                          \mathbf{elif}\;F \leq 53000000:\\
                                                          \;\;\;\;{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
                                                          
                                                          \mathbf{else}:\\
                                                          \;\;\;\;\frac{1}{\sin B}\\
                                                          
                                                          
                                                          \end{array}
                                                          
                                                          Derivation
                                                          1. Split input into 3 regimes
                                                          2. if F < -9.80000000000000037e58

                                                            1. Initial program 75.7%

                                                              \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                            2. Taylor expanded in F around -inf

                                                              \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                                            3. Step-by-step derivation
                                                              1. lower-/.f64N/A

                                                                \[\leadsto \frac{-1}{\color{blue}{\sin B}} \]
                                                              2. lower-sin.f6416.9%

                                                                \[\leadsto \frac{-1}{\sin B} \]
                                                            4. Applied rewrites16.9%

                                                              \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]

                                                            if -9.80000000000000037e58 < F < 5.3e7

                                                            1. Initial program 75.7%

                                                              \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                            2. Taylor expanded in B around 0

                                                              \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                            3. Step-by-step derivation
                                                              1. lower-/.f6448.5%

                                                                \[\leadsto \left(-\frac{x}{\color{blue}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                            4. Applied rewrites48.5%

                                                              \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                            5. Step-by-step derivation
                                                              1. lift-+.f64N/A

                                                                \[\leadsto \color{blue}{\left(-\frac{x}{B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
                                                              2. +-commutativeN/A

                                                                \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-\frac{x}{B}\right)} \]
                                                              3. lift-neg.f64N/A

                                                                \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \color{blue}{\left(\mathsf{neg}\left(\frac{x}{B}\right)\right)} \]
                                                              4. sub-flip-reverseN/A

                                                                \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \frac{x}{B}} \]
                                                              5. lower--.f6448.5%

                                                                \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \frac{x}{B}} \]
                                                            6. Applied rewrites48.5%

                                                              \[\leadsto \color{blue}{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \frac{F}{\sin B} - \frac{x}{B}} \]
                                                            7. Taylor expanded in B around 0

                                                              \[\leadsto {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \color{blue}{\frac{F}{B}} - \frac{x}{B} \]
                                                            8. Step-by-step derivation
                                                              1. lower-/.f6435.0%

                                                                \[\leadsto {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \frac{F}{\color{blue}{B}} - \frac{x}{B} \]
                                                            9. Applied rewrites35.0%

                                                              \[\leadsto {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \color{blue}{\frac{F}{B}} - \frac{x}{B} \]

                                                            if 5.3e7 < F

                                                            1. Initial program 75.7%

                                                              \[\left(-x \cdot \frac{1}{\tan 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.3%

                                                                \[\leadsto \frac{1}{\sin B} \]
                                                            4. Applied rewrites17.3%

                                                              \[\leadsto \color{blue}{\frac{1}{\sin B}} \]
                                                          3. Recombined 3 regimes into one program.
                                                          4. Add Preprocessing

                                                          Alternative 21: 33.8% accurate, 2.6× speedup?

                                                          \[\begin{array}{l} \mathbf{if}\;F \leq -4.5 \cdot 10^{-45}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 2.1 \cdot 10^{-90}:\\ \;\;\;\;\frac{-1}{B \cdot F} \cdot F\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
                                                          (FPCore (F B x)
                                                           :precision binary64
                                                           (if (<= F -4.5e-45)
                                                             (/ -1.0 (sin B))
                                                             (if (<= F 2.1e-90) (* (/ -1.0 (* B F)) F) (/ 1.0 (sin B)))))
                                                          double code(double F, double B, double x) {
                                                          	double tmp;
                                                          	if (F <= -4.5e-45) {
                                                          		tmp = -1.0 / sin(B);
                                                          	} else if (F <= 2.1e-90) {
                                                          		tmp = (-1.0 / (B * F)) * F;
                                                          	} else {
                                                          		tmp = 1.0 / sin(B);
                                                          	}
                                                          	return tmp;
                                                          }
                                                          
                                                          module fmin_fmax_functions
                                                              implicit none
                                                              private
                                                              public fmax
                                                              public fmin
                                                          
                                                              interface fmax
                                                                  module procedure fmax88
                                                                  module procedure fmax44
                                                                  module procedure fmax84
                                                                  module procedure fmax48
                                                              end interface
                                                              interface fmin
                                                                  module procedure fmin88
                                                                  module procedure fmin44
                                                                  module procedure fmin84
                                                                  module procedure fmin48
                                                              end interface
                                                          contains
                                                              real(8) function fmax88(x, y) result (res)
                                                                  real(8), intent (in) :: x
                                                                  real(8), intent (in) :: y
                                                                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                              end function
                                                              real(4) function fmax44(x, y) result (res)
                                                                  real(4), intent (in) :: x
                                                                  real(4), intent (in) :: y
                                                                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                              end function
                                                              real(8) function fmax84(x, y) result(res)
                                                                  real(8), intent (in) :: x
                                                                  real(4), intent (in) :: y
                                                                  res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                              end function
                                                              real(8) function fmax48(x, y) result(res)
                                                                  real(4), intent (in) :: x
                                                                  real(8), intent (in) :: y
                                                                  res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                              end function
                                                              real(8) function fmin88(x, y) result (res)
                                                                  real(8), intent (in) :: x
                                                                  real(8), intent (in) :: y
                                                                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                              end function
                                                              real(4) function fmin44(x, y) result (res)
                                                                  real(4), intent (in) :: x
                                                                  real(4), intent (in) :: y
                                                                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                              end function
                                                              real(8) function fmin84(x, y) result(res)
                                                                  real(8), intent (in) :: x
                                                                  real(4), intent (in) :: y
                                                                  res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                              end function
                                                              real(8) function fmin48(x, y) result(res)
                                                                  real(4), intent (in) :: x
                                                                  real(8), intent (in) :: y
                                                                  res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                              end function
                                                          end module
                                                          
                                                          real(8) function code(f, b, x)
                                                          use fmin_fmax_functions
                                                              real(8), intent (in) :: f
                                                              real(8), intent (in) :: b
                                                              real(8), intent (in) :: x
                                                              real(8) :: tmp
                                                              if (f <= (-4.5d-45)) then
                                                                  tmp = (-1.0d0) / sin(b)
                                                              else if (f <= 2.1d-90) then
                                                                  tmp = ((-1.0d0) / (b * f)) * f
                                                              else
                                                                  tmp = 1.0d0 / sin(b)
                                                              end if
                                                              code = tmp
                                                          end function
                                                          
                                                          public static double code(double F, double B, double x) {
                                                          	double tmp;
                                                          	if (F <= -4.5e-45) {
                                                          		tmp = -1.0 / Math.sin(B);
                                                          	} else if (F <= 2.1e-90) {
                                                          		tmp = (-1.0 / (B * F)) * F;
                                                          	} else {
                                                          		tmp = 1.0 / Math.sin(B);
                                                          	}
                                                          	return tmp;
                                                          }
                                                          
                                                          def code(F, B, x):
                                                          	tmp = 0
                                                          	if F <= -4.5e-45:
                                                          		tmp = -1.0 / math.sin(B)
                                                          	elif F <= 2.1e-90:
                                                          		tmp = (-1.0 / (B * F)) * F
                                                          	else:
                                                          		tmp = 1.0 / math.sin(B)
                                                          	return tmp
                                                          
                                                          function code(F, B, x)
                                                          	tmp = 0.0
                                                          	if (F <= -4.5e-45)
                                                          		tmp = Float64(-1.0 / sin(B));
                                                          	elseif (F <= 2.1e-90)
                                                          		tmp = Float64(Float64(-1.0 / Float64(B * F)) * F);
                                                          	else
                                                          		tmp = Float64(1.0 / sin(B));
                                                          	end
                                                          	return tmp
                                                          end
                                                          
                                                          function tmp_2 = code(F, B, x)
                                                          	tmp = 0.0;
                                                          	if (F <= -4.5e-45)
                                                          		tmp = -1.0 / sin(B);
                                                          	elseif (F <= 2.1e-90)
                                                          		tmp = (-1.0 / (B * F)) * F;
                                                          	else
                                                          		tmp = 1.0 / sin(B);
                                                          	end
                                                          	tmp_2 = tmp;
                                                          end
                                                          
                                                          code[F_, B_, x_] := If[LessEqual[F, -4.5e-45], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.1e-90], N[(N[(-1.0 / N[(B * F), $MachinePrecision]), $MachinePrecision] * F), $MachinePrecision], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]
                                                          
                                                          \begin{array}{l}
                                                          \mathbf{if}\;F \leq -4.5 \cdot 10^{-45}:\\
                                                          \;\;\;\;\frac{-1}{\sin B}\\
                                                          
                                                          \mathbf{elif}\;F \leq 2.1 \cdot 10^{-90}:\\
                                                          \;\;\;\;\frac{-1}{B \cdot F} \cdot F\\
                                                          
                                                          \mathbf{else}:\\
                                                          \;\;\;\;\frac{1}{\sin B}\\
                                                          
                                                          
                                                          \end{array}
                                                          
                                                          Derivation
                                                          1. Split input into 3 regimes
                                                          2. if F < -4.4999999999999999e-45

                                                            1. Initial program 75.7%

                                                              \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                            2. Taylor expanded in F around -inf

                                                              \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                                            3. Step-by-step derivation
                                                              1. lower-/.f64N/A

                                                                \[\leadsto \frac{-1}{\color{blue}{\sin B}} \]
                                                              2. lower-sin.f6416.9%

                                                                \[\leadsto \frac{-1}{\sin B} \]
                                                            4. Applied rewrites16.9%

                                                              \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]

                                                            if -4.4999999999999999e-45 < F < 2.0999999999999999e-90

                                                            1. Initial program 75.7%

                                                              \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                            2. Taylor expanded in F around -inf

                                                              \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                                            3. Step-by-step derivation
                                                              1. lower-/.f64N/A

                                                                \[\leadsto \frac{-1}{\color{blue}{\sin B}} \]
                                                              2. lower-sin.f6416.9%

                                                                \[\leadsto \frac{-1}{\sin B} \]
                                                            4. Applied rewrites16.9%

                                                              \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                                            5. Taylor expanded in B around 0

                                                              \[\leadsto \frac{-1}{B} \]
                                                            6. Step-by-step derivation
                                                              1. Applied rewrites10.5%

                                                                \[\leadsto \frac{-1}{B} \]
                                                              2. Step-by-step derivation
                                                                1. lift-/.f64N/A

                                                                  \[\leadsto \frac{-1}{\color{blue}{B}} \]
                                                                2. frac-2negN/A

                                                                  \[\leadsto \frac{\mathsf{neg}\left(-1\right)}{\color{blue}{\mathsf{neg}\left(B\right)}} \]
                                                                3. metadata-evalN/A

                                                                  \[\leadsto \frac{1}{\mathsf{neg}\left(\color{blue}{B}\right)} \]
                                                                4. *-inversesN/A

                                                                  \[\leadsto \frac{\frac{F}{F}}{\mathsf{neg}\left(\color{blue}{B}\right)} \]
                                                                5. associate-/l/N/A

                                                                  \[\leadsto \frac{F}{\color{blue}{F \cdot \left(\mathsf{neg}\left(B\right)\right)}} \]
                                                                6. lower-/.f64N/A

                                                                  \[\leadsto \frac{F}{\color{blue}{F \cdot \left(\mathsf{neg}\left(B\right)\right)}} \]
                                                                7. lower-*.f64N/A

                                                                  \[\leadsto \frac{F}{F \cdot \color{blue}{\left(\mathsf{neg}\left(B\right)\right)}} \]
                                                                8. lower-neg.f6412.4%

                                                                  \[\leadsto \frac{F}{F \cdot \left(-B\right)} \]
                                                              3. Applied rewrites12.4%

                                                                \[\leadsto \frac{F}{\color{blue}{F \cdot \left(-B\right)}} \]
                                                              4. Step-by-step derivation
                                                                1. lift-/.f64N/A

                                                                  \[\leadsto \frac{F}{\color{blue}{F \cdot \left(-B\right)}} \]
                                                                2. mult-flipN/A

                                                                  \[\leadsto F \cdot \color{blue}{\frac{1}{F \cdot \left(-B\right)}} \]
                                                                3. lift-*.f64N/A

                                                                  \[\leadsto F \cdot \frac{1}{F \cdot \color{blue}{\left(-B\right)}} \]
                                                                4. associate-/r*N/A

                                                                  \[\leadsto F \cdot \frac{\frac{1}{F}}{\color{blue}{-B}} \]
                                                                5. lift-/.f64N/A

                                                                  \[\leadsto F \cdot \frac{\frac{1}{F}}{-\color{blue}{B}} \]
                                                                6. *-commutativeN/A

                                                                  \[\leadsto \frac{\frac{1}{F}}{-B} \cdot \color{blue}{F} \]
                                                                7. lower-*.f64N/A

                                                                  \[\leadsto \frac{\frac{1}{F}}{-B} \cdot \color{blue}{F} \]
                                                              5. Applied rewrites12.5%

                                                                \[\leadsto \frac{-1}{B \cdot F} \cdot \color{blue}{F} \]

                                                              if 2.0999999999999999e-90 < F

                                                              1. Initial program 75.7%

                                                                \[\left(-x \cdot \frac{1}{\tan 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.3%

                                                                  \[\leadsto \frac{1}{\sin B} \]
                                                              4. Applied rewrites17.3%

                                                                \[\leadsto \color{blue}{\frac{1}{\sin B}} \]
                                                            7. Recombined 3 regimes into one program.
                                                            8. Add Preprocessing

                                                            Alternative 22: 21.5% accurate, 2.9× speedup?

                                                            \[\begin{array}{l} \mathbf{if}\;x \leq 7.2 \cdot 10^{+75}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(B \cdot B, -0.00205026455026455, -0.019444444444444445\right), B \cdot B, -0.16666666666666666\right) \cdot B - \frac{B}{B \cdot B}\\ \end{array} \]
                                                            (FPCore (F B x)
                                                             :precision binary64
                                                             (if (<= x 7.2e+75)
                                                               (/ -1.0 (sin B))
                                                               (-
                                                                (*
                                                                 (fma
                                                                  (fma (* B B) -0.00205026455026455 -0.019444444444444445)
                                                                  (* B B)
                                                                  -0.16666666666666666)
                                                                 B)
                                                                (/ B (* B B)))))
                                                            double code(double F, double B, double x) {
                                                            	double tmp;
                                                            	if (x <= 7.2e+75) {
                                                            		tmp = -1.0 / sin(B);
                                                            	} else {
                                                            		tmp = (fma(fma((B * B), -0.00205026455026455, -0.019444444444444445), (B * B), -0.16666666666666666) * B) - (B / (B * B));
                                                            	}
                                                            	return tmp;
                                                            }
                                                            
                                                            function code(F, B, x)
                                                            	tmp = 0.0
                                                            	if (x <= 7.2e+75)
                                                            		tmp = Float64(-1.0 / sin(B));
                                                            	else
                                                            		tmp = Float64(Float64(fma(fma(Float64(B * B), -0.00205026455026455, -0.019444444444444445), Float64(B * B), -0.16666666666666666) * B) - Float64(B / Float64(B * B)));
                                                            	end
                                                            	return tmp
                                                            end
                                                            
                                                            code[F_, B_, x_] := If[LessEqual[x, 7.2e+75], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(B * B), $MachinePrecision] * -0.00205026455026455 + -0.019444444444444445), $MachinePrecision] * N[(B * B), $MachinePrecision] + -0.16666666666666666), $MachinePrecision] * B), $MachinePrecision] - N[(B / N[(B * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                                                            
                                                            \begin{array}{l}
                                                            \mathbf{if}\;x \leq 7.2 \cdot 10^{+75}:\\
                                                            \;\;\;\;\frac{-1}{\sin B}\\
                                                            
                                                            \mathbf{else}:\\
                                                            \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(B \cdot B, -0.00205026455026455, -0.019444444444444445\right), B \cdot B, -0.16666666666666666\right) \cdot B - \frac{B}{B \cdot B}\\
                                                            
                                                            
                                                            \end{array}
                                                            
                                                            Derivation
                                                            1. Split input into 2 regimes
                                                            2. if x < 7.2e75

                                                              1. Initial program 75.7%

                                                                \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                              2. Taylor expanded in F around -inf

                                                                \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                                              3. Step-by-step derivation
                                                                1. lower-/.f64N/A

                                                                  \[\leadsto \frac{-1}{\color{blue}{\sin B}} \]
                                                                2. lower-sin.f6416.9%

                                                                  \[\leadsto \frac{-1}{\sin B} \]
                                                              4. Applied rewrites16.9%

                                                                \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]

                                                              if 7.2e75 < x

                                                              1. Initial program 75.7%

                                                                \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                              2. Taylor expanded in F around -inf

                                                                \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                                              3. Step-by-step derivation
                                                                1. lower-/.f64N/A

                                                                  \[\leadsto \frac{-1}{\color{blue}{\sin B}} \]
                                                                2. lower-sin.f6416.9%

                                                                  \[\leadsto \frac{-1}{\sin B} \]
                                                              4. Applied rewrites16.9%

                                                                \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                                              5. Taylor expanded in B around 0

                                                                \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right) - 1}{\color{blue}{B}} \]
                                                              6. Step-by-step derivation
                                                                1. lower-/.f64N/A

                                                                  \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right) - 1}{B} \]
                                                                2. lower--.f64N/A

                                                                  \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right) - 1}{B} \]
                                                                3. lower-*.f64N/A

                                                                  \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right) - 1}{B} \]
                                                                4. lower-pow.f64N/A

                                                                  \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right) - 1}{B} \]
                                                                5. lower--.f64N/A

                                                                  \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right) - 1}{B} \]
                                                                6. lower-*.f64N/A

                                                                  \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right) - 1}{B} \]
                                                                7. lower-pow.f64N/A

                                                                  \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right) - 1}{B} \]
                                                                8. lower--.f64N/A

                                                                  \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right) - 1}{B} \]
                                                                9. lower-*.f64N/A

                                                                  \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right) - 1}{B} \]
                                                                10. lower-pow.f649.9%

                                                                  \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(-0.00205026455026455 \cdot {B}^{2} - 0.019444444444444445\right) - 0.16666666666666666\right) - 1}{B} \]
                                                              7. Applied rewrites9.9%

                                                                \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(-0.00205026455026455 \cdot {B}^{2} - 0.019444444444444445\right) - 0.16666666666666666\right) - 1}{\color{blue}{B}} \]
                                                              8. Step-by-step derivation
                                                                1. lift-/.f64N/A

                                                                  \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right) - 1}{B} \]
                                                                2. lift--.f64N/A

                                                                  \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right) - 1}{B} \]
                                                                3. sub-flipN/A

                                                                  \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right) + \left(\mathsf{neg}\left(1\right)\right)}{B} \]
                                                                4. metadata-evalN/A

                                                                  \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right) + -1}{B} \]
                                                                5. div-add-revN/A

                                                                  \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right)}{B} + \frac{-1}{\color{blue}{B}} \]
                                                                6. frac-addN/A

                                                                  \[\leadsto \frac{\left({B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right)\right) \cdot B + B \cdot -1}{B \cdot \color{blue}{B}} \]
                                                                7. unpow2N/A

                                                                  \[\leadsto \frac{\left({B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right)\right) \cdot B + B \cdot -1}{{B}^{2}} \]
                                                                8. lift-pow.f64N/A

                                                                  \[\leadsto \frac{\left({B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right)\right) \cdot B + B \cdot -1}{{B}^{2}} \]
                                                                9. lower-/.f64N/A

                                                                  \[\leadsto \frac{\left({B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right)\right) \cdot B + B \cdot -1}{{B}^{\color{blue}{2}}} \]
                                                              9. Applied rewrites10.9%

                                                                \[\leadsto \frac{\mathsf{fma}\left(\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.00205026455026455, B \cdot B, -0.019444444444444445\right), B \cdot B, -0.16666666666666666\right) \cdot B\right) \cdot B, B, B \cdot -1\right)}{B \cdot \color{blue}{B}} \]
                                                              10. Applied rewrites11.4%

                                                                \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(B \cdot B, -0.00205026455026455, -0.019444444444444445\right), B \cdot B, -0.16666666666666666\right) \cdot B - \frac{B}{B \cdot B}} \]
                                                            3. Recombined 2 regimes into one program.
                                                            4. Add Preprocessing

                                                            Alternative 23: 15.2% accurate, 3.5× speedup?

                                                            \[\begin{array}{l} \mathbf{if}\;x \leq 8.5 \cdot 10^{+78}:\\ \;\;\;\;\frac{-1}{B \cdot \left(1 + -0.16666666666666666 \cdot {B}^{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(B \cdot B, -0.00205026455026455, -0.019444444444444445\right), B \cdot B, -0.16666666666666666\right) \cdot B - \frac{B}{B \cdot B}\\ \end{array} \]
                                                            (FPCore (F B x)
                                                             :precision binary64
                                                             (if (<= x 8.5e+78)
                                                               (/ -1.0 (* B (+ 1.0 (* -0.16666666666666666 (pow B 2.0)))))
                                                               (-
                                                                (*
                                                                 (fma
                                                                  (fma (* B B) -0.00205026455026455 -0.019444444444444445)
                                                                  (* B B)
                                                                  -0.16666666666666666)
                                                                 B)
                                                                (/ B (* B B)))))
                                                            double code(double F, double B, double x) {
                                                            	double tmp;
                                                            	if (x <= 8.5e+78) {
                                                            		tmp = -1.0 / (B * (1.0 + (-0.16666666666666666 * pow(B, 2.0))));
                                                            	} else {
                                                            		tmp = (fma(fma((B * B), -0.00205026455026455, -0.019444444444444445), (B * B), -0.16666666666666666) * B) - (B / (B * B));
                                                            	}
                                                            	return tmp;
                                                            }
                                                            
                                                            function code(F, B, x)
                                                            	tmp = 0.0
                                                            	if (x <= 8.5e+78)
                                                            		tmp = Float64(-1.0 / Float64(B * Float64(1.0 + Float64(-0.16666666666666666 * (B ^ 2.0)))));
                                                            	else
                                                            		tmp = Float64(Float64(fma(fma(Float64(B * B), -0.00205026455026455, -0.019444444444444445), Float64(B * B), -0.16666666666666666) * B) - Float64(B / Float64(B * B)));
                                                            	end
                                                            	return tmp
                                                            end
                                                            
                                                            code[F_, B_, x_] := If[LessEqual[x, 8.5e+78], N[(-1.0 / N[(B * N[(1.0 + N[(-0.16666666666666666 * N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(B * B), $MachinePrecision] * -0.00205026455026455 + -0.019444444444444445), $MachinePrecision] * N[(B * B), $MachinePrecision] + -0.16666666666666666), $MachinePrecision] * B), $MachinePrecision] - N[(B / N[(B * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                                                            
                                                            \begin{array}{l}
                                                            \mathbf{if}\;x \leq 8.5 \cdot 10^{+78}:\\
                                                            \;\;\;\;\frac{-1}{B \cdot \left(1 + -0.16666666666666666 \cdot {B}^{2}\right)}\\
                                                            
                                                            \mathbf{else}:\\
                                                            \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(B \cdot B, -0.00205026455026455, -0.019444444444444445\right), B \cdot B, -0.16666666666666666\right) \cdot B - \frac{B}{B \cdot B}\\
                                                            
                                                            
                                                            \end{array}
                                                            
                                                            Derivation
                                                            1. Split input into 2 regimes
                                                            2. if x < 8.50000000000000079e78

                                                              1. Initial program 75.7%

                                                                \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                              2. Taylor expanded in F around -inf

                                                                \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                                              3. Step-by-step derivation
                                                                1. lower-/.f64N/A

                                                                  \[\leadsto \frac{-1}{\color{blue}{\sin B}} \]
                                                                2. lower-sin.f6416.9%

                                                                  \[\leadsto \frac{-1}{\sin B} \]
                                                              4. Applied rewrites16.9%

                                                                \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                                              5. Taylor expanded in B around 0

                                                                \[\leadsto \frac{-1}{B \cdot \color{blue}{\left(1 + \frac{-1}{6} \cdot {B}^{2}\right)}} \]
                                                              6. Step-by-step derivation
                                                                1. lower-*.f64N/A

                                                                  \[\leadsto \frac{-1}{B \cdot \left(1 + \color{blue}{\frac{-1}{6} \cdot {B}^{2}}\right)} \]
                                                                2. lower-+.f64N/A

                                                                  \[\leadsto \frac{-1}{B \cdot \left(1 + \frac{-1}{6} \cdot \color{blue}{{B}^{2}}\right)} \]
                                                                3. lower-*.f64N/A

                                                                  \[\leadsto \frac{-1}{B \cdot \left(1 + \frac{-1}{6} \cdot {B}^{\color{blue}{2}}\right)} \]
                                                                4. lower-pow.f6410.3%

                                                                  \[\leadsto \frac{-1}{B \cdot \left(1 + -0.16666666666666666 \cdot {B}^{2}\right)} \]
                                                              7. Applied rewrites10.3%

                                                                \[\leadsto \frac{-1}{B \cdot \color{blue}{\left(1 + -0.16666666666666666 \cdot {B}^{2}\right)}} \]

                                                              if 8.50000000000000079e78 < x

                                                              1. Initial program 75.7%

                                                                \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                              2. Taylor expanded in F around -inf

                                                                \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                                              3. Step-by-step derivation
                                                                1. lower-/.f64N/A

                                                                  \[\leadsto \frac{-1}{\color{blue}{\sin B}} \]
                                                                2. lower-sin.f6416.9%

                                                                  \[\leadsto \frac{-1}{\sin B} \]
                                                              4. Applied rewrites16.9%

                                                                \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                                              5. Taylor expanded in B around 0

                                                                \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right) - 1}{\color{blue}{B}} \]
                                                              6. Step-by-step derivation
                                                                1. lower-/.f64N/A

                                                                  \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right) - 1}{B} \]
                                                                2. lower--.f64N/A

                                                                  \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right) - 1}{B} \]
                                                                3. lower-*.f64N/A

                                                                  \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right) - 1}{B} \]
                                                                4. lower-pow.f64N/A

                                                                  \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right) - 1}{B} \]
                                                                5. lower--.f64N/A

                                                                  \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right) - 1}{B} \]
                                                                6. lower-*.f64N/A

                                                                  \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right) - 1}{B} \]
                                                                7. lower-pow.f64N/A

                                                                  \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right) - 1}{B} \]
                                                                8. lower--.f64N/A

                                                                  \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right) - 1}{B} \]
                                                                9. lower-*.f64N/A

                                                                  \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right) - 1}{B} \]
                                                                10. lower-pow.f649.9%

                                                                  \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(-0.00205026455026455 \cdot {B}^{2} - 0.019444444444444445\right) - 0.16666666666666666\right) - 1}{B} \]
                                                              7. Applied rewrites9.9%

                                                                \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(-0.00205026455026455 \cdot {B}^{2} - 0.019444444444444445\right) - 0.16666666666666666\right) - 1}{\color{blue}{B}} \]
                                                              8. Step-by-step derivation
                                                                1. lift-/.f64N/A

                                                                  \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right) - 1}{B} \]
                                                                2. lift--.f64N/A

                                                                  \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right) - 1}{B} \]
                                                                3. sub-flipN/A

                                                                  \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right) + \left(\mathsf{neg}\left(1\right)\right)}{B} \]
                                                                4. metadata-evalN/A

                                                                  \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right) + -1}{B} \]
                                                                5. div-add-revN/A

                                                                  \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right)}{B} + \frac{-1}{\color{blue}{B}} \]
                                                                6. frac-addN/A

                                                                  \[\leadsto \frac{\left({B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right)\right) \cdot B + B \cdot -1}{B \cdot \color{blue}{B}} \]
                                                                7. unpow2N/A

                                                                  \[\leadsto \frac{\left({B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right)\right) \cdot B + B \cdot -1}{{B}^{2}} \]
                                                                8. lift-pow.f64N/A

                                                                  \[\leadsto \frac{\left({B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right)\right) \cdot B + B \cdot -1}{{B}^{2}} \]
                                                                9. lower-/.f64N/A

                                                                  \[\leadsto \frac{\left({B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right)\right) \cdot B + B \cdot -1}{{B}^{\color{blue}{2}}} \]
                                                              9. Applied rewrites10.9%

                                                                \[\leadsto \frac{\mathsf{fma}\left(\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.00205026455026455, B \cdot B, -0.019444444444444445\right), B \cdot B, -0.16666666666666666\right) \cdot B\right) \cdot B, B, B \cdot -1\right)}{B \cdot \color{blue}{B}} \]
                                                              10. Applied rewrites11.4%

                                                                \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(B \cdot B, -0.00205026455026455, -0.019444444444444445\right), B \cdot B, -0.16666666666666666\right) \cdot B - \frac{B}{B \cdot B}} \]
                                                            3. Recombined 2 regimes into one program.
                                                            4. Add Preprocessing

                                                            Alternative 24: 15.1% accurate, 3.6× speedup?

                                                            \[\begin{array}{l} \mathbf{if}\;x \leq 7.5 \cdot 10^{+78}:\\ \;\;\;\;\frac{-1}{B}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(B \cdot B, -0.00205026455026455, -0.019444444444444445\right), B \cdot B, -0.16666666666666666\right) \cdot B - \frac{B}{B \cdot B}\\ \end{array} \]
                                                            (FPCore (F B x)
                                                             :precision binary64
                                                             (if (<= x 7.5e+78)
                                                               (/ -1.0 B)
                                                               (-
                                                                (*
                                                                 (fma
                                                                  (fma (* B B) -0.00205026455026455 -0.019444444444444445)
                                                                  (* B B)
                                                                  -0.16666666666666666)
                                                                 B)
                                                                (/ B (* B B)))))
                                                            double code(double F, double B, double x) {
                                                            	double tmp;
                                                            	if (x <= 7.5e+78) {
                                                            		tmp = -1.0 / B;
                                                            	} else {
                                                            		tmp = (fma(fma((B * B), -0.00205026455026455, -0.019444444444444445), (B * B), -0.16666666666666666) * B) - (B / (B * B));
                                                            	}
                                                            	return tmp;
                                                            }
                                                            
                                                            function code(F, B, x)
                                                            	tmp = 0.0
                                                            	if (x <= 7.5e+78)
                                                            		tmp = Float64(-1.0 / B);
                                                            	else
                                                            		tmp = Float64(Float64(fma(fma(Float64(B * B), -0.00205026455026455, -0.019444444444444445), Float64(B * B), -0.16666666666666666) * B) - Float64(B / Float64(B * B)));
                                                            	end
                                                            	return tmp
                                                            end
                                                            
                                                            code[F_, B_, x_] := If[LessEqual[x, 7.5e+78], N[(-1.0 / B), $MachinePrecision], N[(N[(N[(N[(N[(B * B), $MachinePrecision] * -0.00205026455026455 + -0.019444444444444445), $MachinePrecision] * N[(B * B), $MachinePrecision] + -0.16666666666666666), $MachinePrecision] * B), $MachinePrecision] - N[(B / N[(B * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                                                            
                                                            \begin{array}{l}
                                                            \mathbf{if}\;x \leq 7.5 \cdot 10^{+78}:\\
                                                            \;\;\;\;\frac{-1}{B}\\
                                                            
                                                            \mathbf{else}:\\
                                                            \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(B \cdot B, -0.00205026455026455, -0.019444444444444445\right), B \cdot B, -0.16666666666666666\right) \cdot B - \frac{B}{B \cdot B}\\
                                                            
                                                            
                                                            \end{array}
                                                            
                                                            Derivation
                                                            1. Split input into 2 regimes
                                                            2. if x < 7.49999999999999934e78

                                                              1. Initial program 75.7%

                                                                \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                              2. Taylor expanded in F around -inf

                                                                \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                                              3. Step-by-step derivation
                                                                1. lower-/.f64N/A

                                                                  \[\leadsto \frac{-1}{\color{blue}{\sin B}} \]
                                                                2. lower-sin.f6416.9%

                                                                  \[\leadsto \frac{-1}{\sin B} \]
                                                              4. Applied rewrites16.9%

                                                                \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                                              5. Taylor expanded in B around 0

                                                                \[\leadsto \frac{-1}{B} \]
                                                              6. Step-by-step derivation
                                                                1. Applied rewrites10.5%

                                                                  \[\leadsto \frac{-1}{B} \]

                                                                if 7.49999999999999934e78 < x

                                                                1. Initial program 75.7%

                                                                  \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                2. Taylor expanded in F around -inf

                                                                  \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                                                3. Step-by-step derivation
                                                                  1. lower-/.f64N/A

                                                                    \[\leadsto \frac{-1}{\color{blue}{\sin B}} \]
                                                                  2. lower-sin.f6416.9%

                                                                    \[\leadsto \frac{-1}{\sin B} \]
                                                                4. Applied rewrites16.9%

                                                                  \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                                                5. Taylor expanded in B around 0

                                                                  \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right) - 1}{\color{blue}{B}} \]
                                                                6. Step-by-step derivation
                                                                  1. lower-/.f64N/A

                                                                    \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right) - 1}{B} \]
                                                                  2. lower--.f64N/A

                                                                    \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right) - 1}{B} \]
                                                                  3. lower-*.f64N/A

                                                                    \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right) - 1}{B} \]
                                                                  4. lower-pow.f64N/A

                                                                    \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right) - 1}{B} \]
                                                                  5. lower--.f64N/A

                                                                    \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right) - 1}{B} \]
                                                                  6. lower-*.f64N/A

                                                                    \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right) - 1}{B} \]
                                                                  7. lower-pow.f64N/A

                                                                    \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right) - 1}{B} \]
                                                                  8. lower--.f64N/A

                                                                    \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right) - 1}{B} \]
                                                                  9. lower-*.f64N/A

                                                                    \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right) - 1}{B} \]
                                                                  10. lower-pow.f649.9%

                                                                    \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(-0.00205026455026455 \cdot {B}^{2} - 0.019444444444444445\right) - 0.16666666666666666\right) - 1}{B} \]
                                                                7. Applied rewrites9.9%

                                                                  \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(-0.00205026455026455 \cdot {B}^{2} - 0.019444444444444445\right) - 0.16666666666666666\right) - 1}{\color{blue}{B}} \]
                                                                8. Step-by-step derivation
                                                                  1. lift-/.f64N/A

                                                                    \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right) - 1}{B} \]
                                                                  2. lift--.f64N/A

                                                                    \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right) - 1}{B} \]
                                                                  3. sub-flipN/A

                                                                    \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right) + \left(\mathsf{neg}\left(1\right)\right)}{B} \]
                                                                  4. metadata-evalN/A

                                                                    \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right) + -1}{B} \]
                                                                  5. div-add-revN/A

                                                                    \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right)}{B} + \frac{-1}{\color{blue}{B}} \]
                                                                  6. frac-addN/A

                                                                    \[\leadsto \frac{\left({B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right)\right) \cdot B + B \cdot -1}{B \cdot \color{blue}{B}} \]
                                                                  7. unpow2N/A

                                                                    \[\leadsto \frac{\left({B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right)\right) \cdot B + B \cdot -1}{{B}^{2}} \]
                                                                  8. lift-pow.f64N/A

                                                                    \[\leadsto \frac{\left({B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right)\right) \cdot B + B \cdot -1}{{B}^{2}} \]
                                                                  9. lower-/.f64N/A

                                                                    \[\leadsto \frac{\left({B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right)\right) \cdot B + B \cdot -1}{{B}^{\color{blue}{2}}} \]
                                                                9. Applied rewrites10.9%

                                                                  \[\leadsto \frac{\mathsf{fma}\left(\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.00205026455026455, B \cdot B, -0.019444444444444445\right), B \cdot B, -0.16666666666666666\right) \cdot B\right) \cdot B, B, B \cdot -1\right)}{B \cdot \color{blue}{B}} \]
                                                                10. Applied rewrites11.4%

                                                                  \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(B \cdot B, -0.00205026455026455, -0.019444444444444445\right), B \cdot B, -0.16666666666666666\right) \cdot B - \frac{B}{B \cdot B}} \]
                                                              7. Recombined 2 regimes into one program.
                                                              8. Add Preprocessing

                                                              Alternative 25: 15.0% accurate, 4.6× speedup?

                                                              \[\begin{array}{l} \mathbf{if}\;x \leq 2.4 \cdot 10^{+33}:\\ \;\;\;\;\frac{-1}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\left(-0.16666666666666666 \cdot B\right) \cdot B, B, B \cdot -1\right)}{B \cdot B}\\ \end{array} \]
                                                              (FPCore (F B x)
                                                               :precision binary64
                                                               (if (<= x 2.4e+33)
                                                                 (/ -1.0 B)
                                                                 (/ (fma (* (* -0.16666666666666666 B) B) B (* B -1.0)) (* B B))))
                                                              double code(double F, double B, double x) {
                                                              	double tmp;
                                                              	if (x <= 2.4e+33) {
                                                              		tmp = -1.0 / B;
                                                              	} else {
                                                              		tmp = fma(((-0.16666666666666666 * B) * B), B, (B * -1.0)) / (B * B);
                                                              	}
                                                              	return tmp;
                                                              }
                                                              
                                                              function code(F, B, x)
                                                              	tmp = 0.0
                                                              	if (x <= 2.4e+33)
                                                              		tmp = Float64(-1.0 / B);
                                                              	else
                                                              		tmp = Float64(fma(Float64(Float64(-0.16666666666666666 * B) * B), B, Float64(B * -1.0)) / Float64(B * B));
                                                              	end
                                                              	return tmp
                                                              end
                                                              
                                                              code[F_, B_, x_] := If[LessEqual[x, 2.4e+33], N[(-1.0 / B), $MachinePrecision], N[(N[(N[(N[(-0.16666666666666666 * B), $MachinePrecision] * B), $MachinePrecision] * B + N[(B * -1.0), $MachinePrecision]), $MachinePrecision] / N[(B * B), $MachinePrecision]), $MachinePrecision]]
                                                              
                                                              \begin{array}{l}
                                                              \mathbf{if}\;x \leq 2.4 \cdot 10^{+33}:\\
                                                              \;\;\;\;\frac{-1}{B}\\
                                                              
                                                              \mathbf{else}:\\
                                                              \;\;\;\;\frac{\mathsf{fma}\left(\left(-0.16666666666666666 \cdot B\right) \cdot B, B, B \cdot -1\right)}{B \cdot B}\\
                                                              
                                                              
                                                              \end{array}
                                                              
                                                              Derivation
                                                              1. Split input into 2 regimes
                                                              2. if x < 2.4e33

                                                                1. Initial program 75.7%

                                                                  \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                2. Taylor expanded in F around -inf

                                                                  \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                                                3. Step-by-step derivation
                                                                  1. lower-/.f64N/A

                                                                    \[\leadsto \frac{-1}{\color{blue}{\sin B}} \]
                                                                  2. lower-sin.f6416.9%

                                                                    \[\leadsto \frac{-1}{\sin B} \]
                                                                4. Applied rewrites16.9%

                                                                  \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                                                5. Taylor expanded in B around 0

                                                                  \[\leadsto \frac{-1}{B} \]
                                                                6. Step-by-step derivation
                                                                  1. Applied rewrites10.5%

                                                                    \[\leadsto \frac{-1}{B} \]

                                                                  if 2.4e33 < x

                                                                  1. Initial program 75.7%

                                                                    \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                  2. Taylor expanded in F around -inf

                                                                    \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                                                  3. Step-by-step derivation
                                                                    1. lower-/.f64N/A

                                                                      \[\leadsto \frac{-1}{\color{blue}{\sin B}} \]
                                                                    2. lower-sin.f6416.9%

                                                                      \[\leadsto \frac{-1}{\sin B} \]
                                                                  4. Applied rewrites16.9%

                                                                    \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                                                  5. Taylor expanded in B around 0

                                                                    \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right) - 1}{\color{blue}{B}} \]
                                                                  6. Step-by-step derivation
                                                                    1. lower-/.f64N/A

                                                                      \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right) - 1}{B} \]
                                                                    2. lower--.f64N/A

                                                                      \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right) - 1}{B} \]
                                                                    3. lower-*.f64N/A

                                                                      \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right) - 1}{B} \]
                                                                    4. lower-pow.f64N/A

                                                                      \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right) - 1}{B} \]
                                                                    5. lower--.f64N/A

                                                                      \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right) - 1}{B} \]
                                                                    6. lower-*.f64N/A

                                                                      \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right) - 1}{B} \]
                                                                    7. lower-pow.f64N/A

                                                                      \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right) - 1}{B} \]
                                                                    8. lower--.f64N/A

                                                                      \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right) - 1}{B} \]
                                                                    9. lower-*.f64N/A

                                                                      \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right) - 1}{B} \]
                                                                    10. lower-pow.f649.9%

                                                                      \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(-0.00205026455026455 \cdot {B}^{2} - 0.019444444444444445\right) - 0.16666666666666666\right) - 1}{B} \]
                                                                  7. Applied rewrites9.9%

                                                                    \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(-0.00205026455026455 \cdot {B}^{2} - 0.019444444444444445\right) - 0.16666666666666666\right) - 1}{\color{blue}{B}} \]
                                                                  8. Step-by-step derivation
                                                                    1. lift-/.f64N/A

                                                                      \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right) - 1}{B} \]
                                                                    2. lift--.f64N/A

                                                                      \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right) - 1}{B} \]
                                                                    3. sub-flipN/A

                                                                      \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right) + \left(\mathsf{neg}\left(1\right)\right)}{B} \]
                                                                    4. metadata-evalN/A

                                                                      \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right) + -1}{B} \]
                                                                    5. div-add-revN/A

                                                                      \[\leadsto \frac{{B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right)}{B} + \frac{-1}{\color{blue}{B}} \]
                                                                    6. frac-addN/A

                                                                      \[\leadsto \frac{\left({B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right)\right) \cdot B + B \cdot -1}{B \cdot \color{blue}{B}} \]
                                                                    7. unpow2N/A

                                                                      \[\leadsto \frac{\left({B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right)\right) \cdot B + B \cdot -1}{{B}^{2}} \]
                                                                    8. lift-pow.f64N/A

                                                                      \[\leadsto \frac{\left({B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right)\right) \cdot B + B \cdot -1}{{B}^{2}} \]
                                                                    9. lower-/.f64N/A

                                                                      \[\leadsto \frac{\left({B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{-31}{15120} \cdot {B}^{2} - \frac{7}{360}\right) - \frac{1}{6}\right)\right) \cdot B + B \cdot -1}{{B}^{\color{blue}{2}}} \]
                                                                  9. Applied rewrites10.9%

                                                                    \[\leadsto \frac{\mathsf{fma}\left(\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.00205026455026455, B \cdot B, -0.019444444444444445\right), B \cdot B, -0.16666666666666666\right) \cdot B\right) \cdot B, B, B \cdot -1\right)}{B \cdot \color{blue}{B}} \]
                                                                  10. Taylor expanded in B around 0

                                                                    \[\leadsto \frac{\mathsf{fma}\left(\left(\frac{-1}{6} \cdot B\right) \cdot B, B, B \cdot -1\right)}{B \cdot B} \]
                                                                  11. Step-by-step derivation
                                                                    1. Applied rewrites11.1%

                                                                      \[\leadsto \frac{\mathsf{fma}\left(\left(-0.16666666666666666 \cdot B\right) \cdot B, B, B \cdot -1\right)}{B \cdot B} \]
                                                                  12. Recombined 2 regimes into one program.
                                                                  13. Add Preprocessing

                                                                  Alternative 26: 12.5% accurate, 10.8× speedup?

                                                                  \[F \cdot \frac{\frac{-1}{F}}{B} \]
                                                                  (FPCore (F B x) :precision binary64 (* F (/ (/ -1.0 F) B)))
                                                                  double code(double F, double B, double x) {
                                                                  	return F * ((-1.0 / F) / 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 = f * (((-1.0d0) / f) / b)
                                                                  end function
                                                                  
                                                                  public static double code(double F, double B, double x) {
                                                                  	return F * ((-1.0 / F) / B);
                                                                  }
                                                                  
                                                                  def code(F, B, x):
                                                                  	return F * ((-1.0 / F) / B)
                                                                  
                                                                  function code(F, B, x)
                                                                  	return Float64(F * Float64(Float64(-1.0 / F) / B))
                                                                  end
                                                                  
                                                                  function tmp = code(F, B, x)
                                                                  	tmp = F * ((-1.0 / F) / B);
                                                                  end
                                                                  
                                                                  code[F_, B_, x_] := N[(F * N[(N[(-1.0 / F), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]
                                                                  
                                                                  F \cdot \frac{\frac{-1}{F}}{B}
                                                                  
                                                                  Derivation
                                                                  1. Initial program 75.7%

                                                                    \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                  2. Taylor expanded in F around -inf

                                                                    \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                                                  3. Step-by-step derivation
                                                                    1. lower-/.f64N/A

                                                                      \[\leadsto \frac{-1}{\color{blue}{\sin B}} \]
                                                                    2. lower-sin.f6416.9%

                                                                      \[\leadsto \frac{-1}{\sin B} \]
                                                                  4. Applied rewrites16.9%

                                                                    \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                                                  5. Taylor expanded in B around 0

                                                                    \[\leadsto \frac{-1}{B} \]
                                                                  6. Step-by-step derivation
                                                                    1. Applied rewrites10.5%

                                                                      \[\leadsto \frac{-1}{B} \]
                                                                    2. Step-by-step derivation
                                                                      1. lift-/.f64N/A

                                                                        \[\leadsto \frac{-1}{\color{blue}{B}} \]
                                                                      2. frac-2negN/A

                                                                        \[\leadsto \frac{\mathsf{neg}\left(-1\right)}{\color{blue}{\mathsf{neg}\left(B\right)}} \]
                                                                      3. metadata-evalN/A

                                                                        \[\leadsto \frac{1}{\mathsf{neg}\left(\color{blue}{B}\right)} \]
                                                                      4. rgt-mult-inverseN/A

                                                                        \[\leadsto \frac{F \cdot \frac{1}{F}}{\mathsf{neg}\left(\color{blue}{B}\right)} \]
                                                                      5. lift-/.f64N/A

                                                                        \[\leadsto \frac{F \cdot \frac{1}{F}}{\mathsf{neg}\left(B\right)} \]
                                                                      6. associate-/l*N/A

                                                                        \[\leadsto F \cdot \color{blue}{\frac{\frac{1}{F}}{\mathsf{neg}\left(B\right)}} \]
                                                                      7. lower-*.f64N/A

                                                                        \[\leadsto F \cdot \color{blue}{\frac{\frac{1}{F}}{\mathsf{neg}\left(B\right)}} \]
                                                                      8. lift-/.f64N/A

                                                                        \[\leadsto F \cdot \frac{\frac{1}{F}}{\mathsf{neg}\left(\color{blue}{B}\right)} \]
                                                                      9. frac-2negN/A

                                                                        \[\leadsto F \cdot \frac{\frac{\mathsf{neg}\left(1\right)}{\mathsf{neg}\left(F\right)}}{\mathsf{neg}\left(\color{blue}{B}\right)} \]
                                                                      10. distribute-frac-negN/A

                                                                        \[\leadsto F \cdot \frac{\mathsf{neg}\left(\frac{1}{\mathsf{neg}\left(F\right)}\right)}{\mathsf{neg}\left(\color{blue}{B}\right)} \]
                                                                      11. frac-2neg-revN/A

                                                                        \[\leadsto F \cdot \frac{\frac{1}{\mathsf{neg}\left(F\right)}}{\color{blue}{B}} \]
                                                                      12. lower-/.f64N/A

                                                                        \[\leadsto F \cdot \frac{\frac{1}{\mathsf{neg}\left(F\right)}}{\color{blue}{B}} \]
                                                                      13. metadata-evalN/A

                                                                        \[\leadsto F \cdot \frac{\frac{\mathsf{neg}\left(-1\right)}{\mathsf{neg}\left(F\right)}}{B} \]
                                                                      14. frac-2neg-revN/A

                                                                        \[\leadsto F \cdot \frac{\frac{-1}{F}}{B} \]
                                                                      15. lower-/.f6412.5%

                                                                        \[\leadsto F \cdot \frac{\frac{-1}{F}}{B} \]
                                                                    3. Applied rewrites12.5%

                                                                      \[\leadsto F \cdot \color{blue}{\frac{\frac{-1}{F}}{B}} \]
                                                                    4. Add Preprocessing

                                                                    Alternative 27: 12.5% accurate, 11.3× speedup?

                                                                    \[\frac{-1}{B \cdot F} \cdot F \]
                                                                    (FPCore (F B x) :precision binary64 (* (/ -1.0 (* B F)) F))
                                                                    double code(double F, double B, double x) {
                                                                    	return (-1.0 / (B * F)) * F;
                                                                    }
                                                                    
                                                                    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 * f)) * f
                                                                    end function
                                                                    
                                                                    public static double code(double F, double B, double x) {
                                                                    	return (-1.0 / (B * F)) * F;
                                                                    }
                                                                    
                                                                    def code(F, B, x):
                                                                    	return (-1.0 / (B * F)) * F
                                                                    
                                                                    function code(F, B, x)
                                                                    	return Float64(Float64(-1.0 / Float64(B * F)) * F)
                                                                    end
                                                                    
                                                                    function tmp = code(F, B, x)
                                                                    	tmp = (-1.0 / (B * F)) * F;
                                                                    end
                                                                    
                                                                    code[F_, B_, x_] := N[(N[(-1.0 / N[(B * F), $MachinePrecision]), $MachinePrecision] * F), $MachinePrecision]
                                                                    
                                                                    \frac{-1}{B \cdot F} \cdot F
                                                                    
                                                                    Derivation
                                                                    1. Initial program 75.7%

                                                                      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                    2. Taylor expanded in F around -inf

                                                                      \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                                                    3. Step-by-step derivation
                                                                      1. lower-/.f64N/A

                                                                        \[\leadsto \frac{-1}{\color{blue}{\sin B}} \]
                                                                      2. lower-sin.f6416.9%

                                                                        \[\leadsto \frac{-1}{\sin B} \]
                                                                    4. Applied rewrites16.9%

                                                                      \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                                                    5. Taylor expanded in B around 0

                                                                      \[\leadsto \frac{-1}{B} \]
                                                                    6. Step-by-step derivation
                                                                      1. Applied rewrites10.5%

                                                                        \[\leadsto \frac{-1}{B} \]
                                                                      2. Step-by-step derivation
                                                                        1. lift-/.f64N/A

                                                                          \[\leadsto \frac{-1}{\color{blue}{B}} \]
                                                                        2. frac-2negN/A

                                                                          \[\leadsto \frac{\mathsf{neg}\left(-1\right)}{\color{blue}{\mathsf{neg}\left(B\right)}} \]
                                                                        3. metadata-evalN/A

                                                                          \[\leadsto \frac{1}{\mathsf{neg}\left(\color{blue}{B}\right)} \]
                                                                        4. *-inversesN/A

                                                                          \[\leadsto \frac{\frac{F}{F}}{\mathsf{neg}\left(\color{blue}{B}\right)} \]
                                                                        5. associate-/l/N/A

                                                                          \[\leadsto \frac{F}{\color{blue}{F \cdot \left(\mathsf{neg}\left(B\right)\right)}} \]
                                                                        6. lower-/.f64N/A

                                                                          \[\leadsto \frac{F}{\color{blue}{F \cdot \left(\mathsf{neg}\left(B\right)\right)}} \]
                                                                        7. lower-*.f64N/A

                                                                          \[\leadsto \frac{F}{F \cdot \color{blue}{\left(\mathsf{neg}\left(B\right)\right)}} \]
                                                                        8. lower-neg.f6412.4%

                                                                          \[\leadsto \frac{F}{F \cdot \left(-B\right)} \]
                                                                      3. Applied rewrites12.4%

                                                                        \[\leadsto \frac{F}{\color{blue}{F \cdot \left(-B\right)}} \]
                                                                      4. Step-by-step derivation
                                                                        1. lift-/.f64N/A

                                                                          \[\leadsto \frac{F}{\color{blue}{F \cdot \left(-B\right)}} \]
                                                                        2. mult-flipN/A

                                                                          \[\leadsto F \cdot \color{blue}{\frac{1}{F \cdot \left(-B\right)}} \]
                                                                        3. lift-*.f64N/A

                                                                          \[\leadsto F \cdot \frac{1}{F \cdot \color{blue}{\left(-B\right)}} \]
                                                                        4. associate-/r*N/A

                                                                          \[\leadsto F \cdot \frac{\frac{1}{F}}{\color{blue}{-B}} \]
                                                                        5. lift-/.f64N/A

                                                                          \[\leadsto F \cdot \frac{\frac{1}{F}}{-\color{blue}{B}} \]
                                                                        6. *-commutativeN/A

                                                                          \[\leadsto \frac{\frac{1}{F}}{-B} \cdot \color{blue}{F} \]
                                                                        7. lower-*.f64N/A

                                                                          \[\leadsto \frac{\frac{1}{F}}{-B} \cdot \color{blue}{F} \]
                                                                      5. Applied rewrites12.5%

                                                                        \[\leadsto \frac{-1}{B \cdot F} \cdot \color{blue}{F} \]
                                                                      6. Add Preprocessing

                                                                      Alternative 28: 12.4% accurate, 14.0× speedup?

                                                                      \[\frac{F}{F \cdot \left(-B\right)} \]
                                                                      (FPCore (F B x) :precision binary64 (/ F (* F (- B))))
                                                                      double code(double F, double B, double x) {
                                                                      	return F / (F * -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 = f / (f * -b)
                                                                      end function
                                                                      
                                                                      public static double code(double F, double B, double x) {
                                                                      	return F / (F * -B);
                                                                      }
                                                                      
                                                                      def code(F, B, x):
                                                                      	return F / (F * -B)
                                                                      
                                                                      function code(F, B, x)
                                                                      	return Float64(F / Float64(F * Float64(-B)))
                                                                      end
                                                                      
                                                                      function tmp = code(F, B, x)
                                                                      	tmp = F / (F * -B);
                                                                      end
                                                                      
                                                                      code[F_, B_, x_] := N[(F / N[(F * (-B)), $MachinePrecision]), $MachinePrecision]
                                                                      
                                                                      \frac{F}{F \cdot \left(-B\right)}
                                                                      
                                                                      Derivation
                                                                      1. Initial program 75.7%

                                                                        \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                      2. Taylor expanded in F around -inf

                                                                        \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                                                      3. Step-by-step derivation
                                                                        1. lower-/.f64N/A

                                                                          \[\leadsto \frac{-1}{\color{blue}{\sin B}} \]
                                                                        2. lower-sin.f6416.9%

                                                                          \[\leadsto \frac{-1}{\sin B} \]
                                                                      4. Applied rewrites16.9%

                                                                        \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                                                      5. Taylor expanded in B around 0

                                                                        \[\leadsto \frac{-1}{B} \]
                                                                      6. Step-by-step derivation
                                                                        1. Applied rewrites10.5%

                                                                          \[\leadsto \frac{-1}{B} \]
                                                                        2. Step-by-step derivation
                                                                          1. lift-/.f64N/A

                                                                            \[\leadsto \frac{-1}{\color{blue}{B}} \]
                                                                          2. frac-2negN/A

                                                                            \[\leadsto \frac{\mathsf{neg}\left(-1\right)}{\color{blue}{\mathsf{neg}\left(B\right)}} \]
                                                                          3. metadata-evalN/A

                                                                            \[\leadsto \frac{1}{\mathsf{neg}\left(\color{blue}{B}\right)} \]
                                                                          4. *-inversesN/A

                                                                            \[\leadsto \frac{\frac{F}{F}}{\mathsf{neg}\left(\color{blue}{B}\right)} \]
                                                                          5. associate-/l/N/A

                                                                            \[\leadsto \frac{F}{\color{blue}{F \cdot \left(\mathsf{neg}\left(B\right)\right)}} \]
                                                                          6. lower-/.f64N/A

                                                                            \[\leadsto \frac{F}{\color{blue}{F \cdot \left(\mathsf{neg}\left(B\right)\right)}} \]
                                                                          7. lower-*.f64N/A

                                                                            \[\leadsto \frac{F}{F \cdot \color{blue}{\left(\mathsf{neg}\left(B\right)\right)}} \]
                                                                          8. lower-neg.f6412.4%

                                                                            \[\leadsto \frac{F}{F \cdot \left(-B\right)} \]
                                                                        3. Applied rewrites12.4%

                                                                          \[\leadsto \frac{F}{\color{blue}{F \cdot \left(-B\right)}} \]
                                                                        4. Add Preprocessing

                                                                        Alternative 29: 10.5% 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 75.7%

                                                                          \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                        2. Taylor expanded in F around -inf

                                                                          \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                                                        3. Step-by-step derivation
                                                                          1. lower-/.f64N/A

                                                                            \[\leadsto \frac{-1}{\color{blue}{\sin B}} \]
                                                                          2. lower-sin.f6416.9%

                                                                            \[\leadsto \frac{-1}{\sin B} \]
                                                                        4. Applied rewrites16.9%

                                                                          \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                                                        5. Taylor expanded in B around 0

                                                                          \[\leadsto \frac{-1}{B} \]
                                                                        6. Step-by-step derivation
                                                                          1. Applied rewrites10.5%

                                                                            \[\leadsto \frac{-1}{B} \]
                                                                          2. Add Preprocessing

                                                                          Reproduce

                                                                          ?
                                                                          herbie shell --seed 2025185 
                                                                          (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))))))