VandenBroeck and Keller, Equation (23)

Percentage Accurate: 77.2% → 99.6%
Time: 7.4s
Alternatives: 23
Speedup: 1.4×

Specification

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

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

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

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 23 alternatives:

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

Initial Program: 77.2% 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.6% accurate, 1.0× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\frac{1}{F}, \frac{F}{\cos B}, \left(-x\right) \cdot 1\right)}{\tan B}\\


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

    1. Initial program 77.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(F, \frac{\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{3}} - \frac{1}{F}}{\sin B}, \frac{-x}{\tan B}\right) \]
      9. lower-/.f6441.0

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

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

    if -245000 < F < 1.1500000000000001e22

    1. Initial program 77.2%

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

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

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

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

    if 1.1500000000000001e22 < F

    1. Initial program 77.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\frac{1}{F}}, \frac{F}{\cos B}, \left(-x\right) \cdot 1\right)}{\tan B} \]
    10. Step-by-step derivation
      1. lower-/.f6455.9

        \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{\color{blue}{F}}, \frac{F}{\cos B}, \left(-x\right) \cdot 1\right)}{\tan B} \]
    11. Applied rewrites55.9%

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

Alternative 2: 99.5% accurate, 1.0× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\frac{1}{F}, \frac{F}{\cos B}, \left(-x\right) \cdot 1\right)}{\tan B}\\


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

    1. Initial program 77.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.00000000000000004e64 < F < 1.1500000000000001e22

    1. Initial program 77.2%

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

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

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

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

    if 1.1500000000000001e22 < F

    1. Initial program 77.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\frac{1}{F}}, \frac{F}{\cos B}, \left(-x\right) \cdot 1\right)}{\tan B} \]
    10. Step-by-step derivation
      1. lower-/.f6455.9

        \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{\color{blue}{F}}, \frac{F}{\cos B}, \left(-x\right) \cdot 1\right)}{\tan B} \]
    11. Applied rewrites55.9%

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

Alternative 3: 99.5% accurate, 1.0× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\frac{1}{F}, \frac{F}{\cos B}, \left(-x\right) \cdot 1\right)}{\tan B}\\


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

    1. Initial program 77.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.00000000000000005e144 < F < 3.7e5

    1. Initial program 77.2%

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

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

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

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

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

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

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

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

      \[\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 3.7e5 < F

    1. Initial program 77.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\frac{1}{F}}, \frac{F}{\cos B}, \left(-x\right) \cdot 1\right)}{\tan B} \]
    10. Step-by-step derivation
      1. lower-/.f6455.9

        \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{\color{blue}{F}}, \frac{F}{\cos B}, \left(-x\right) \cdot 1\right)}{\tan B} \]
    11. Applied rewrites55.9%

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

Alternative 4: 99.3% accurate, 1.0× speedup?

\[\begin{array}{l} \mathbf{if}\;F \leq -2 \cdot 10^{+64}:\\ \;\;\;\;\mathsf{fma}\left(F, \frac{-1}{F \cdot \sin B}, \frac{-x}{\tan B}\right)\\ \mathbf{elif}\;F \leq 1.15 \cdot 10^{+22}:\\ \;\;\;\;{\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}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{1}{F}, \frac{F}{\cos B}, \left(-x\right) \cdot 1\right)}{\tan B}\\ \end{array} \]
(FPCore (F B x)
 :precision binary64
 (if (<= F -2e+64)
   (fma F (/ -1.0 (* F (sin B))) (/ (- x) (tan B)))
   (if (<= F 1.15e+22)
     (- (* (pow (fma 2.0 x (fma F F 2.0)) -0.5) (/ F (sin B))) (/ x (tan B)))
     (/ (fma (/ 1.0 F) (/ F (cos B)) (* (- x) 1.0)) (tan B)))))
double code(double F, double B, double x) {
	double tmp;
	if (F <= -2e+64) {
		tmp = fma(F, (-1.0 / (F * sin(B))), (-x / tan(B)));
	} else if (F <= 1.15e+22) {
		tmp = (pow(fma(2.0, x, fma(F, F, 2.0)), -0.5) * (F / sin(B))) - (x / tan(B));
	} else {
		tmp = fma((1.0 / F), (F / cos(B)), (-x * 1.0)) / tan(B);
	}
	return tmp;
}
function code(F, B, x)
	tmp = 0.0
	if (F <= -2e+64)
		tmp = fma(F, Float64(-1.0 / Float64(F * sin(B))), Float64(Float64(-x) / tan(B)));
	elseif (F <= 1.15e+22)
		tmp = Float64(Float64((fma(2.0, x, fma(F, F, 2.0)) ^ -0.5) * Float64(F / sin(B))) - Float64(x / tan(B)));
	else
		tmp = Float64(fma(Float64(1.0 / F), Float64(F / cos(B)), Float64(Float64(-x) * 1.0)) / tan(B));
	end
	return tmp
end
code[F_, B_, x_] := If[LessEqual[F, -2e+64], N[(F * N[(-1.0 / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.15e+22], 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[(N[(N[(1.0 / F), $MachinePrecision] * N[(F / N[Cos[B], $MachinePrecision]), $MachinePrecision] + N[((-x) * 1.0), $MachinePrecision]), $MachinePrecision] / N[Tan[B], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;F \leq -2 \cdot 10^{+64}:\\
\;\;\;\;\mathsf{fma}\left(F, \frac{-1}{F \cdot \sin B}, \frac{-x}{\tan B}\right)\\

\mathbf{elif}\;F \leq 1.15 \cdot 10^{+22}:\\
\;\;\;\;{\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}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\frac{1}{F}, \frac{F}{\cos B}, \left(-x\right) \cdot 1\right)}{\tan B}\\


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

    1. Initial program 77.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.00000000000000004e64 < F < 1.1500000000000001e22

    1. Initial program 77.2%

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

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

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

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

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

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

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

    if 1.1500000000000001e22 < F

    1. Initial program 77.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\frac{1}{F}}, \frac{F}{\cos B}, \left(-x\right) \cdot 1\right)}{\tan B} \]
    10. Step-by-step derivation
      1. lower-/.f6455.9

        \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{\color{blue}{F}}, \frac{F}{\cos B}, \left(-x\right) \cdot 1\right)}{\tan B} \]
    11. Applied rewrites55.9%

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

Alternative 5: 96.8% accurate, 1.1× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\frac{1}{F}, \frac{F}{\cos B}, \left(-x\right) \cdot 1\right)}{\tan B}\\


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if F < -6.4999999999999997e-4

    1. Initial program 77.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.4999999999999997e-4 < F < 7.0000000000000001e-52

    1. Initial program 77.2%

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

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

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

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

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

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

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

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

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

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

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

      if 7.0000000000000001e-52 < F

      1. Initial program 77.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\frac{1}{F}}, \frac{F}{\cos B}, \left(-x\right) \cdot 1\right)}{\tan B} \]
      10. Step-by-step derivation
        1. lower-/.f6455.9

          \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{\color{blue}{F}}, \frac{F}{\cos B}, \left(-x\right) \cdot 1\right)}{\tan B} \]
      11. Applied rewrites55.9%

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

    Alternative 6: 91.7% accurate, 1.1× speedup?

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

      1. Initial program 77.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -0.0060000000000000001 < F < 3.7e5

      1. Initial program 77.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 3.7e5 < F

      1. Initial program 77.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\frac{1}{F}}, \frac{F}{\cos B}, \left(-x\right) \cdot 1\right)}{\tan B} \]
      10. Step-by-step derivation
        1. lower-/.f6455.9

          \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{\color{blue}{F}}, \frac{F}{\cos B}, \left(-x\right) \cdot 1\right)}{\tan B} \]
      11. Applied rewrites55.9%

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

    Alternative 7: 91.7% accurate, 1.2× speedup?

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

      1. Initial program 77.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -0.0060000000000000001 < F < 3.7e5

      1. Initial program 77.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 3.7e5 < F

      1. Initial program 77.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\frac{1}{F}}, \frac{F}{\cos B}, \left(-x\right) \cdot 1\right)}{\tan B} \]
      10. Step-by-step derivation
        1. lower-/.f6455.9

          \[\leadsto \frac{\mathsf{fma}\left(\frac{1}{\color{blue}{F}}, \frac{F}{\cos B}, \left(-x\right) \cdot 1\right)}{\tan B} \]
      11. Applied rewrites55.9%

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

    Alternative 8: 91.7% accurate, 1.2× speedup?

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

      1. Initial program 77.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -0.0060000000000000001 < F < 3.7e5

      1. Initial program 77.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 3.7e5 < F

      1. Initial program 77.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 9: 91.7% accurate, 1.3× speedup?

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

      1. Initial program 77.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -6.4999999999999997e-4 < F < 3.7e5

      1. Initial program 77.2%

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

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

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

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

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

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

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

      if 3.7e5 < F

      1. Initial program 77.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 10: 85.4% accurate, 1.3× speedup?

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

      1. Initial program 77.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -6.4999999999999997e-4 < F < 1.55e9

      1. Initial program 77.2%

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

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

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

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

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

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

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

      if 1.55e9 < F

      1. Initial program 77.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 11: 77.8% accurate, 1.4× speedup?

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

      1. Initial program 77.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -4.5e227 < F < -1.4e146

      1. Initial program 77.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-1 \cdot x}}{\tan B} \]
      7. Step-by-step derivation
        1. lower-*.f6456.0

          \[\leadsto \frac{-1 \cdot \color{blue}{x}}{\tan B} \]
      8. Applied rewrites56.0%

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

      if -0.0152 < F < 1.30000000000000002e-15

      1. Initial program 77.2%

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

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

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

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

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

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

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

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

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

        if 1.30000000000000002e-15 < F

        1. Initial program 77.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 12: 76.9% accurate, 1.4× speedup?

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

        1. Initial program 77.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\color{blue}{-1 \cdot x}}{\tan B} \]
        7. Step-by-step derivation
          1. lower-*.f6456.0

            \[\leadsto \frac{-1 \cdot \color{blue}{x}}{\tan B} \]
        8. Applied rewrites56.0%

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

        if -4.4999999999999998e-29 < x < 3.50000000000000005e-22

        1. Initial program 77.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 13: 70.4% accurate, 1.4× speedup?

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

        1. Initial program 77.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 0.0379999999999999991 < B

        1. Initial program 77.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\color{blue}{-1 \cdot x}}{\tan B} \]
        7. Step-by-step derivation
          1. lower-*.f6456.0

            \[\leadsto \frac{-1 \cdot \color{blue}{x}}{\tan B} \]
        8. Applied rewrites56.0%

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

      Alternative 14: 70.4% accurate, 2.1× speedup?

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

        1. Initial program 77.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 0.0379999999999999991 < B

        1. Initial program 77.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\color{blue}{-1 \cdot x}}{\tan B} \]
        7. Step-by-step derivation
          1. lower-*.f6456.0

            \[\leadsto \frac{-1 \cdot \color{blue}{x}}{\tan B} \]
        8. Applied rewrites56.0%

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

      Alternative 15: 51.1% accurate, 2.2× speedup?

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

        1. Initial program 77.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 1.49999999999999999e-9 < B < 8.60000000000000001e74

        1. Initial program 77.2%

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

        if 8.60000000000000001e74 < B

        1. Initial program 77.2%

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

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

            \[\leadsto \frac{1}{\color{blue}{\sin B}} \]
          2. lower-sin.f6417.0

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

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

      Alternative 16: 50.4% accurate, 2.4× speedup?

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

        1. Initial program 77.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 1.49999999999999999e-9 < B

        1. Initial program 77.2%

          \[\left(-x \cdot \frac{1}{\tan 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 2 regimes into one program.
      4. Add Preprocessing

      Alternative 17: 50.2% accurate, 2.7× speedup?

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

        1. Initial program 77.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{B \cdot F} + \frac{x}{B \cdot F}\right)\right) \]
        10. Applied rewrites27.4%

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

        if -2.50000000000000002e154 < F < 1.2e152

        1. Initial program 77.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 1.2e152 < F

        1. Initial program 77.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{-0.5}{2}\right)} \cdot {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{-0.5}{2}\right)}\right)} \]
        4. Taylor expanded in B around 0

          \[\leadsto \color{blue}{\frac{F \cdot {\left({\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{4}}\right)}^{2} - x}{B}} \]
        5. Step-by-step derivation
          1. metadata-evalN/A

            \[\leadsto \frac{F \cdot {\left({\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\frac{\frac{-1}{2}}{2}\right)}\right)}^{2} - x}{B} \]
          2. metadata-evalN/A

            \[\leadsto \frac{F \cdot {\left({\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\frac{\mathsf{neg}\left(\frac{1}{2}\right)}{2}\right)}\right)}^{2} - x}{B} \]
          3. metadata-evalN/A

            \[\leadsto \frac{F \cdot {\left({\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\frac{\mathsf{neg}\left(\frac{1}{2}\right)}{2}\right)}\right)}^{2} - x}{B} \]
          4. lower-/.f64N/A

            \[\leadsto \frac{F \cdot {\left({\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\frac{\mathsf{neg}\left(\frac{1}{2}\right)}{2}\right)}\right)}^{2} - x}{\color{blue}{B}} \]
        6. Applied rewrites44.3%

          \[\leadsto \color{blue}{\frac{F \cdot {\left({\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.25}\right)}^{2} - x}{B}} \]
        7. Applied rewrites36.1%

          \[\leadsto \mathsf{fma}\left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \color{blue}{\frac{F}{B}}, \frac{-x}{B}\right) \]
        8. Taylor expanded in F around inf

          \[\leadsto F \cdot \color{blue}{\left(-1 \cdot \frac{x}{B \cdot F} + \frac{1}{B \cdot F}\right)} \]
        9. Step-by-step derivation
          1. lower-*.f64N/A

            \[\leadsto F \cdot \left(-1 \cdot \frac{x}{B \cdot F} + \color{blue}{\frac{1}{B \cdot F}}\right) \]
          2. lower-fma.f64N/A

            \[\leadsto F \cdot \mathsf{fma}\left(-1, \frac{x}{\color{blue}{B \cdot F}}, \frac{1}{B \cdot F}\right) \]
          3. lower-/.f64N/A

            \[\leadsto F \cdot \mathsf{fma}\left(-1, \frac{x}{B \cdot \color{blue}{F}}, \frac{1}{B \cdot F}\right) \]
          4. lower-*.f64N/A

            \[\leadsto F \cdot \mathsf{fma}\left(-1, \frac{x}{B \cdot F}, \frac{1}{B \cdot F}\right) \]
          5. lower-/.f64N/A

            \[\leadsto F \cdot \mathsf{fma}\left(-1, \frac{x}{B \cdot F}, \frac{1}{B \cdot F}\right) \]
          6. lower-*.f6425.0

            \[\leadsto F \cdot \mathsf{fma}\left(-1, \frac{x}{B \cdot F}, \frac{1}{B \cdot F}\right) \]
        10. Applied rewrites25.0%

          \[\leadsto F \cdot \color{blue}{\mathsf{fma}\left(-1, \frac{x}{B \cdot F}, \frac{1}{B \cdot F}\right)} \]
      3. Recombined 3 regimes into one program.
      4. Add Preprocessing

      Alternative 18: 50.0% accurate, 2.8× speedup?

      \[\begin{array}{l} t_0 := \frac{1}{B \cdot F}\\ t_1 := \frac{x}{B \cdot F}\\ \mathbf{if}\;F \leq -1900000:\\ \;\;\;\;-1 \cdot \left(F \cdot \left(t\_0 + t\_1\right)\right)\\ \mathbf{elif}\;F \leq 2.3 \cdot 10^{-26}:\\ \;\;\;\;\mathsf{fma}\left({\left(\mathsf{fma}\left(2, x, 2\right)\right)}^{-0.5}, \frac{F}{B}, \frac{-x}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;F \cdot \mathsf{fma}\left(-1, t\_1, t\_0\right)\\ \end{array} \]
      (FPCore (F B x)
       :precision binary64
       (let* ((t_0 (/ 1.0 (* B F))) (t_1 (/ x (* B F))))
         (if (<= F -1900000.0)
           (* -1.0 (* F (+ t_0 t_1)))
           (if (<= F 2.3e-26)
             (fma (pow (fma 2.0 x 2.0) -0.5) (/ F B) (/ (- x) B))
             (* F (fma -1.0 t_1 t_0))))))
      double code(double F, double B, double x) {
      	double t_0 = 1.0 / (B * F);
      	double t_1 = x / (B * F);
      	double tmp;
      	if (F <= -1900000.0) {
      		tmp = -1.0 * (F * (t_0 + t_1));
      	} else if (F <= 2.3e-26) {
      		tmp = fma(pow(fma(2.0, x, 2.0), -0.5), (F / B), (-x / B));
      	} else {
      		tmp = F * fma(-1.0, t_1, t_0);
      	}
      	return tmp;
      }
      
      function code(F, B, x)
      	t_0 = Float64(1.0 / Float64(B * F))
      	t_1 = Float64(x / Float64(B * F))
      	tmp = 0.0
      	if (F <= -1900000.0)
      		tmp = Float64(-1.0 * Float64(F * Float64(t_0 + t_1)));
      	elseif (F <= 2.3e-26)
      		tmp = fma((fma(2.0, x, 2.0) ^ -0.5), Float64(F / B), Float64(Float64(-x) / B));
      	else
      		tmp = Float64(F * fma(-1.0, t_1, t_0));
      	end
      	return tmp
      end
      
      code[F_, B_, x_] := Block[{t$95$0 = N[(1.0 / N[(B * F), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[(B * F), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1900000.0], N[(-1.0 * N[(F * N[(t$95$0 + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.3e-26], N[(N[Power[N[(2.0 * x + 2.0), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision] + N[((-x) / B), $MachinePrecision]), $MachinePrecision], N[(F * N[(-1.0 * t$95$1 + t$95$0), $MachinePrecision]), $MachinePrecision]]]]]
      
      \begin{array}{l}
      t_0 := \frac{1}{B \cdot F}\\
      t_1 := \frac{x}{B \cdot F}\\
      \mathbf{if}\;F \leq -1900000:\\
      \;\;\;\;-1 \cdot \left(F \cdot \left(t\_0 + t\_1\right)\right)\\
      
      \mathbf{elif}\;F \leq 2.3 \cdot 10^{-26}:\\
      \;\;\;\;\mathsf{fma}\left({\left(\mathsf{fma}\left(2, x, 2\right)\right)}^{-0.5}, \frac{F}{B}, \frac{-x}{B}\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;F \cdot \mathsf{fma}\left(-1, t\_1, t\_0\right)\\
      
      
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if F < -1.9e6

        1. Initial program 77.2%

          \[\left(-x \cdot \frac{1}{\tan 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-pow.f64N/A

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \color{blue}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
          2. sqr-powN/A

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\left({\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right)} \]
          3. lower-unsound-*.f64N/A

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\left({\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right)} \]
          4. lower-unsound-pow.f64N/A

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left(\color{blue}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
          5. lift-+.f64N/A

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\color{blue}{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
          6. +-commutativeN/A

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\color{blue}{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
          7. lift-*.f64N/A

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\color{blue}{2 \cdot x} + \left(F \cdot F + 2\right)\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
          8. lower-fma.f64N/A

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\color{blue}{\left(\mathsf{fma}\left(2, x, F \cdot F + 2\right)\right)}}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
          9. lift-+.f64N/A

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \color{blue}{F \cdot F + 2}\right)\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
          10. lift-*.f64N/A

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \color{blue}{F \cdot F} + 2\right)\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
          11. lower-fma.f64N/A

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
          12. lower-unsound-/.f64N/A

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\color{blue}{\left(\frac{-\frac{1}{2}}{2}\right)}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
          13. lift-neg.f64N/A

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{\color{blue}{\mathsf{neg}\left(\frac{1}{2}\right)}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
          14. lift-/.f64N/A

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
          15. metadata-evalN/A

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
          16. metadata-evalN/A

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{\color{blue}{\frac{-1}{2}}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
          17. lower-unsound-pow.f64N/A

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{\frac{-1}{2}}{2}\right)} \cdot \color{blue}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}}\right) \]
        3. Applied rewrites77.2%

          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{-0.5}{2}\right)} \cdot {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{-0.5}{2}\right)}\right)} \]
        4. Taylor expanded in B around 0

          \[\leadsto \color{blue}{\frac{F \cdot {\left({\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{4}}\right)}^{2} - x}{B}} \]
        5. Step-by-step derivation
          1. metadata-evalN/A

            \[\leadsto \frac{F \cdot {\left({\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\frac{\frac{-1}{2}}{2}\right)}\right)}^{2} - x}{B} \]
          2. metadata-evalN/A

            \[\leadsto \frac{F \cdot {\left({\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\frac{\mathsf{neg}\left(\frac{1}{2}\right)}{2}\right)}\right)}^{2} - x}{B} \]
          3. metadata-evalN/A

            \[\leadsto \frac{F \cdot {\left({\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\frac{\mathsf{neg}\left(\frac{1}{2}\right)}{2}\right)}\right)}^{2} - x}{B} \]
          4. lower-/.f64N/A

            \[\leadsto \frac{F \cdot {\left({\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\frac{\mathsf{neg}\left(\frac{1}{2}\right)}{2}\right)}\right)}^{2} - x}{\color{blue}{B}} \]
        6. Applied rewrites44.3%

          \[\leadsto \color{blue}{\frac{F \cdot {\left({\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.25}\right)}^{2} - x}{B}} \]
        7. Applied rewrites36.1%

          \[\leadsto \mathsf{fma}\left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \color{blue}{\frac{F}{B}}, \frac{-x}{B}\right) \]
        8. Taylor expanded in F around -inf

          \[\leadsto -1 \cdot \color{blue}{\left(F \cdot \left(\frac{1}{B \cdot F} + \frac{x}{B \cdot F}\right)\right)} \]
        9. Step-by-step derivation
          1. lower-*.f64N/A

            \[\leadsto -1 \cdot \left(F \cdot \color{blue}{\left(\frac{1}{B \cdot F} + \frac{x}{B \cdot F}\right)}\right) \]
          2. lower-*.f64N/A

            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{B \cdot F} + \color{blue}{\frac{x}{B \cdot F}}\right)\right) \]
          3. lower-+.f64N/A

            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{B \cdot F} + \frac{x}{\color{blue}{B \cdot F}}\right)\right) \]
          4. lower-/.f64N/A

            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{B \cdot F} + \frac{x}{\color{blue}{B} \cdot F}\right)\right) \]
          5. lower-*.f64N/A

            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{B \cdot F} + \frac{x}{B \cdot F}\right)\right) \]
          6. lower-/.f64N/A

            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{B \cdot F} + \frac{x}{B \cdot \color{blue}{F}}\right)\right) \]
          7. lower-*.f6427.4

            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{B \cdot F} + \frac{x}{B \cdot F}\right)\right) \]
        10. Applied rewrites27.4%

          \[\leadsto -1 \cdot \color{blue}{\left(F \cdot \left(\frac{1}{B \cdot F} + \frac{x}{B \cdot F}\right)\right)} \]

        if -1.9e6 < F < 2.30000000000000009e-26

        1. Initial program 77.2%

          \[\left(-x \cdot \frac{1}{\tan 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-pow.f64N/A

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \color{blue}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
          2. sqr-powN/A

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\left({\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right)} \]
          3. lower-unsound-*.f64N/A

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\left({\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right)} \]
          4. lower-unsound-pow.f64N/A

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left(\color{blue}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
          5. lift-+.f64N/A

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\color{blue}{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
          6. +-commutativeN/A

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\color{blue}{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
          7. lift-*.f64N/A

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\color{blue}{2 \cdot x} + \left(F \cdot F + 2\right)\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
          8. lower-fma.f64N/A

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\color{blue}{\left(\mathsf{fma}\left(2, x, F \cdot F + 2\right)\right)}}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
          9. lift-+.f64N/A

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \color{blue}{F \cdot F + 2}\right)\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
          10. lift-*.f64N/A

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \color{blue}{F \cdot F} + 2\right)\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
          11. lower-fma.f64N/A

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
          12. lower-unsound-/.f64N/A

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\color{blue}{\left(\frac{-\frac{1}{2}}{2}\right)}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
          13. lift-neg.f64N/A

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{\color{blue}{\mathsf{neg}\left(\frac{1}{2}\right)}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
          14. lift-/.f64N/A

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
          15. metadata-evalN/A

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
          16. metadata-evalN/A

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{\color{blue}{\frac{-1}{2}}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
          17. lower-unsound-pow.f64N/A

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{\frac{-1}{2}}{2}\right)} \cdot \color{blue}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}}\right) \]
        3. Applied rewrites77.2%

          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{-0.5}{2}\right)} \cdot {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{-0.5}{2}\right)}\right)} \]
        4. Taylor expanded in B around 0

          \[\leadsto \color{blue}{\frac{F \cdot {\left({\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{4}}\right)}^{2} - x}{B}} \]
        5. Step-by-step derivation
          1. metadata-evalN/A

            \[\leadsto \frac{F \cdot {\left({\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\frac{\frac{-1}{2}}{2}\right)}\right)}^{2} - x}{B} \]
          2. metadata-evalN/A

            \[\leadsto \frac{F \cdot {\left({\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\frac{\mathsf{neg}\left(\frac{1}{2}\right)}{2}\right)}\right)}^{2} - x}{B} \]
          3. metadata-evalN/A

            \[\leadsto \frac{F \cdot {\left({\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\frac{\mathsf{neg}\left(\frac{1}{2}\right)}{2}\right)}\right)}^{2} - x}{B} \]
          4. lower-/.f64N/A

            \[\leadsto \frac{F \cdot {\left({\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\frac{\mathsf{neg}\left(\frac{1}{2}\right)}{2}\right)}\right)}^{2} - x}{\color{blue}{B}} \]
        6. Applied rewrites44.3%

          \[\leadsto \color{blue}{\frac{F \cdot {\left({\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.25}\right)}^{2} - x}{B}} \]
        7. Applied rewrites36.1%

          \[\leadsto \mathsf{fma}\left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \color{blue}{\frac{F}{B}}, \frac{-x}{B}\right) \]
        8. Taylor expanded in F around 0

          \[\leadsto \mathsf{fma}\left({\left(\mathsf{fma}\left(2, x, 2\right)\right)}^{\frac{-1}{2}}, \frac{F}{B}, \frac{-x}{B}\right) \]
        9. Step-by-step derivation
          1. Applied rewrites28.5%

            \[\leadsto \mathsf{fma}\left({\left(\mathsf{fma}\left(2, x, 2\right)\right)}^{-0.5}, \frac{F}{B}, \frac{-x}{B}\right) \]

          if 2.30000000000000009e-26 < F

          1. Initial program 77.2%

            \[\left(-x \cdot \frac{1}{\tan 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-pow.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \color{blue}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
            2. sqr-powN/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\left({\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right)} \]
            3. lower-unsound-*.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\left({\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right)} \]
            4. lower-unsound-pow.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left(\color{blue}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            5. lift-+.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\color{blue}{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            6. +-commutativeN/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\color{blue}{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            7. lift-*.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\color{blue}{2 \cdot x} + \left(F \cdot F + 2\right)\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            8. lower-fma.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\color{blue}{\left(\mathsf{fma}\left(2, x, F \cdot F + 2\right)\right)}}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            9. lift-+.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \color{blue}{F \cdot F + 2}\right)\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            10. lift-*.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \color{blue}{F \cdot F} + 2\right)\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            11. lower-fma.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            12. lower-unsound-/.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\color{blue}{\left(\frac{-\frac{1}{2}}{2}\right)}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            13. lift-neg.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{\color{blue}{\mathsf{neg}\left(\frac{1}{2}\right)}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            14. lift-/.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            15. metadata-evalN/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            16. metadata-evalN/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{\color{blue}{\frac{-1}{2}}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            17. lower-unsound-pow.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{\frac{-1}{2}}{2}\right)} \cdot \color{blue}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}}\right) \]
          3. Applied rewrites77.2%

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{-0.5}{2}\right)} \cdot {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{-0.5}{2}\right)}\right)} \]
          4. Taylor expanded in B around 0

            \[\leadsto \color{blue}{\frac{F \cdot {\left({\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{4}}\right)}^{2} - x}{B}} \]
          5. Step-by-step derivation
            1. metadata-evalN/A

              \[\leadsto \frac{F \cdot {\left({\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\frac{\frac{-1}{2}}{2}\right)}\right)}^{2} - x}{B} \]
            2. metadata-evalN/A

              \[\leadsto \frac{F \cdot {\left({\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\frac{\mathsf{neg}\left(\frac{1}{2}\right)}{2}\right)}\right)}^{2} - x}{B} \]
            3. metadata-evalN/A

              \[\leadsto \frac{F \cdot {\left({\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\frac{\mathsf{neg}\left(\frac{1}{2}\right)}{2}\right)}\right)}^{2} - x}{B} \]
            4. lower-/.f64N/A

              \[\leadsto \frac{F \cdot {\left({\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\frac{\mathsf{neg}\left(\frac{1}{2}\right)}{2}\right)}\right)}^{2} - x}{\color{blue}{B}} \]
          6. Applied rewrites44.3%

            \[\leadsto \color{blue}{\frac{F \cdot {\left({\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.25}\right)}^{2} - x}{B}} \]
          7. Applied rewrites36.1%

            \[\leadsto \mathsf{fma}\left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \color{blue}{\frac{F}{B}}, \frac{-x}{B}\right) \]
          8. Taylor expanded in F around inf

            \[\leadsto F \cdot \color{blue}{\left(-1 \cdot \frac{x}{B \cdot F} + \frac{1}{B \cdot F}\right)} \]
          9. Step-by-step derivation
            1. lower-*.f64N/A

              \[\leadsto F \cdot \left(-1 \cdot \frac{x}{B \cdot F} + \color{blue}{\frac{1}{B \cdot F}}\right) \]
            2. lower-fma.f64N/A

              \[\leadsto F \cdot \mathsf{fma}\left(-1, \frac{x}{\color{blue}{B \cdot F}}, \frac{1}{B \cdot F}\right) \]
            3. lower-/.f64N/A

              \[\leadsto F \cdot \mathsf{fma}\left(-1, \frac{x}{B \cdot \color{blue}{F}}, \frac{1}{B \cdot F}\right) \]
            4. lower-*.f64N/A

              \[\leadsto F \cdot \mathsf{fma}\left(-1, \frac{x}{B \cdot F}, \frac{1}{B \cdot F}\right) \]
            5. lower-/.f64N/A

              \[\leadsto F \cdot \mathsf{fma}\left(-1, \frac{x}{B \cdot F}, \frac{1}{B \cdot F}\right) \]
            6. lower-*.f6425.0

              \[\leadsto F \cdot \mathsf{fma}\left(-1, \frac{x}{B \cdot F}, \frac{1}{B \cdot F}\right) \]
          10. Applied rewrites25.0%

            \[\leadsto F \cdot \color{blue}{\mathsf{fma}\left(-1, \frac{x}{B \cdot F}, \frac{1}{B \cdot F}\right)} \]
        10. Recombined 3 regimes into one program.
        11. Add Preprocessing

        Alternative 19: 43.9% accurate, 4.0× speedup?

        \[\begin{array}{l} t_0 := \frac{1}{B \cdot F}\\ t_1 := \frac{x}{B \cdot F}\\ \mathbf{if}\;F \leq -0.017:\\ \;\;\;\;-1 \cdot \left(F \cdot \left(t\_0 + t\_1\right)\right)\\ \mathbf{elif}\;F \leq 1.3 \cdot 10^{-23}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;F \cdot \mathsf{fma}\left(-1, t\_1, t\_0\right)\\ \end{array} \]
        (FPCore (F B x)
         :precision binary64
         (let* ((t_0 (/ 1.0 (* B F))) (t_1 (/ x (* B F))))
           (if (<= F -0.017)
             (* -1.0 (* F (+ t_0 t_1)))
             (if (<= F 1.3e-23) (/ (- x) B) (* F (fma -1.0 t_1 t_0))))))
        double code(double F, double B, double x) {
        	double t_0 = 1.0 / (B * F);
        	double t_1 = x / (B * F);
        	double tmp;
        	if (F <= -0.017) {
        		tmp = -1.0 * (F * (t_0 + t_1));
        	} else if (F <= 1.3e-23) {
        		tmp = -x / B;
        	} else {
        		tmp = F * fma(-1.0, t_1, t_0);
        	}
        	return tmp;
        }
        
        function code(F, B, x)
        	t_0 = Float64(1.0 / Float64(B * F))
        	t_1 = Float64(x / Float64(B * F))
        	tmp = 0.0
        	if (F <= -0.017)
        		tmp = Float64(-1.0 * Float64(F * Float64(t_0 + t_1)));
        	elseif (F <= 1.3e-23)
        		tmp = Float64(Float64(-x) / B);
        	else
        		tmp = Float64(F * fma(-1.0, t_1, t_0));
        	end
        	return tmp
        end
        
        code[F_, B_, x_] := Block[{t$95$0 = N[(1.0 / N[(B * F), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[(B * F), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.017], N[(-1.0 * N[(F * N[(t$95$0 + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.3e-23], N[((-x) / B), $MachinePrecision], N[(F * N[(-1.0 * t$95$1 + t$95$0), $MachinePrecision]), $MachinePrecision]]]]]
        
        \begin{array}{l}
        t_0 := \frac{1}{B \cdot F}\\
        t_1 := \frac{x}{B \cdot F}\\
        \mathbf{if}\;F \leq -0.017:\\
        \;\;\;\;-1 \cdot \left(F \cdot \left(t\_0 + t\_1\right)\right)\\
        
        \mathbf{elif}\;F \leq 1.3 \cdot 10^{-23}:\\
        \;\;\;\;\frac{-x}{B}\\
        
        \mathbf{else}:\\
        \;\;\;\;F \cdot \mathsf{fma}\left(-1, t\_1, t\_0\right)\\
        
        
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if F < -0.017000000000000001

          1. Initial program 77.2%

            \[\left(-x \cdot \frac{1}{\tan 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-pow.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \color{blue}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
            2. sqr-powN/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\left({\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right)} \]
            3. lower-unsound-*.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\left({\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right)} \]
            4. lower-unsound-pow.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left(\color{blue}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            5. lift-+.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\color{blue}{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            6. +-commutativeN/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\color{blue}{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            7. lift-*.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\color{blue}{2 \cdot x} + \left(F \cdot F + 2\right)\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            8. lower-fma.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\color{blue}{\left(\mathsf{fma}\left(2, x, F \cdot F + 2\right)\right)}}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            9. lift-+.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \color{blue}{F \cdot F + 2}\right)\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            10. lift-*.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \color{blue}{F \cdot F} + 2\right)\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            11. lower-fma.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            12. lower-unsound-/.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\color{blue}{\left(\frac{-\frac{1}{2}}{2}\right)}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            13. lift-neg.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{\color{blue}{\mathsf{neg}\left(\frac{1}{2}\right)}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            14. lift-/.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            15. metadata-evalN/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            16. metadata-evalN/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{\color{blue}{\frac{-1}{2}}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            17. lower-unsound-pow.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{\frac{-1}{2}}{2}\right)} \cdot \color{blue}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}}\right) \]
          3. Applied rewrites77.2%

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{-0.5}{2}\right)} \cdot {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{-0.5}{2}\right)}\right)} \]
          4. Taylor expanded in B around 0

            \[\leadsto \color{blue}{\frac{F \cdot {\left({\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{4}}\right)}^{2} - x}{B}} \]
          5. Step-by-step derivation
            1. metadata-evalN/A

              \[\leadsto \frac{F \cdot {\left({\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\frac{\frac{-1}{2}}{2}\right)}\right)}^{2} - x}{B} \]
            2. metadata-evalN/A

              \[\leadsto \frac{F \cdot {\left({\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\frac{\mathsf{neg}\left(\frac{1}{2}\right)}{2}\right)}\right)}^{2} - x}{B} \]
            3. metadata-evalN/A

              \[\leadsto \frac{F \cdot {\left({\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\frac{\mathsf{neg}\left(\frac{1}{2}\right)}{2}\right)}\right)}^{2} - x}{B} \]
            4. lower-/.f64N/A

              \[\leadsto \frac{F \cdot {\left({\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\frac{\mathsf{neg}\left(\frac{1}{2}\right)}{2}\right)}\right)}^{2} - x}{\color{blue}{B}} \]
          6. Applied rewrites44.3%

            \[\leadsto \color{blue}{\frac{F \cdot {\left({\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.25}\right)}^{2} - x}{B}} \]
          7. Applied rewrites36.1%

            \[\leadsto \mathsf{fma}\left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \color{blue}{\frac{F}{B}}, \frac{-x}{B}\right) \]
          8. Taylor expanded in F around -inf

            \[\leadsto -1 \cdot \color{blue}{\left(F \cdot \left(\frac{1}{B \cdot F} + \frac{x}{B \cdot F}\right)\right)} \]
          9. Step-by-step derivation
            1. lower-*.f64N/A

              \[\leadsto -1 \cdot \left(F \cdot \color{blue}{\left(\frac{1}{B \cdot F} + \frac{x}{B \cdot F}\right)}\right) \]
            2. lower-*.f64N/A

              \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{B \cdot F} + \color{blue}{\frac{x}{B \cdot F}}\right)\right) \]
            3. lower-+.f64N/A

              \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{B \cdot F} + \frac{x}{\color{blue}{B \cdot F}}\right)\right) \]
            4. lower-/.f64N/A

              \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{B \cdot F} + \frac{x}{\color{blue}{B} \cdot F}\right)\right) \]
            5. lower-*.f64N/A

              \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{B \cdot F} + \frac{x}{B \cdot F}\right)\right) \]
            6. lower-/.f64N/A

              \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{B \cdot F} + \frac{x}{B \cdot \color{blue}{F}}\right)\right) \]
            7. lower-*.f6427.4

              \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{B \cdot F} + \frac{x}{B \cdot F}\right)\right) \]
          10. Applied rewrites27.4%

            \[\leadsto -1 \cdot \color{blue}{\left(F \cdot \left(\frac{1}{B \cdot F} + \frac{x}{B \cdot F}\right)\right)} \]

          if -0.017000000000000001 < F < 1.3e-23

          1. Initial program 77.2%

            \[\left(-x \cdot \frac{1}{\tan 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-pow.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \color{blue}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
            2. sqr-powN/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\left({\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right)} \]
            3. lower-unsound-*.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\left({\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right)} \]
            4. lower-unsound-pow.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left(\color{blue}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            5. lift-+.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\color{blue}{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            6. +-commutativeN/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\color{blue}{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            7. lift-*.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\color{blue}{2 \cdot x} + \left(F \cdot F + 2\right)\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            8. lower-fma.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\color{blue}{\left(\mathsf{fma}\left(2, x, F \cdot F + 2\right)\right)}}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            9. lift-+.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \color{blue}{F \cdot F + 2}\right)\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            10. lift-*.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \color{blue}{F \cdot F} + 2\right)\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            11. lower-fma.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            12. lower-unsound-/.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\color{blue}{\left(\frac{-\frac{1}{2}}{2}\right)}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            13. lift-neg.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{\color{blue}{\mathsf{neg}\left(\frac{1}{2}\right)}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            14. lift-/.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            15. metadata-evalN/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            16. metadata-evalN/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{\color{blue}{\frac{-1}{2}}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            17. lower-unsound-pow.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{\frac{-1}{2}}{2}\right)} \cdot \color{blue}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}}\right) \]
          3. Applied rewrites77.2%

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{-0.5}{2}\right)} \cdot {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{-0.5}{2}\right)}\right)} \]
          4. Taylor expanded in B around 0

            \[\leadsto \color{blue}{\frac{F \cdot {\left({\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{4}}\right)}^{2} - x}{B}} \]
          5. Step-by-step derivation
            1. metadata-evalN/A

              \[\leadsto \frac{F \cdot {\left({\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\frac{\frac{-1}{2}}{2}\right)}\right)}^{2} - x}{B} \]
            2. metadata-evalN/A

              \[\leadsto \frac{F \cdot {\left({\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\frac{\mathsf{neg}\left(\frac{1}{2}\right)}{2}\right)}\right)}^{2} - x}{B} \]
            3. metadata-evalN/A

              \[\leadsto \frac{F \cdot {\left({\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\frac{\mathsf{neg}\left(\frac{1}{2}\right)}{2}\right)}\right)}^{2} - x}{B} \]
            4. lower-/.f64N/A

              \[\leadsto \frac{F \cdot {\left({\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\frac{\mathsf{neg}\left(\frac{1}{2}\right)}{2}\right)}\right)}^{2} - x}{\color{blue}{B}} \]
          6. Applied rewrites44.3%

            \[\leadsto \color{blue}{\frac{F \cdot {\left({\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.25}\right)}^{2} - x}{B}} \]
          7. Taylor expanded in F around 0

            \[\leadsto -1 \cdot \color{blue}{\frac{x}{B}} \]
          8. Step-by-step derivation
            1. lower-*.f64N/A

              \[\leadsto -1 \cdot \frac{x}{\color{blue}{B}} \]
            2. lower-/.f6429.7

              \[\leadsto -1 \cdot \frac{x}{B} \]
          9. Applied rewrites29.7%

            \[\leadsto -1 \cdot \color{blue}{\frac{x}{B}} \]
          10. Step-by-step derivation
            1. lift-*.f64N/A

              \[\leadsto -1 \cdot \frac{x}{\color{blue}{B}} \]
            2. mul-1-negN/A

              \[\leadsto \mathsf{neg}\left(\frac{x}{B}\right) \]
            3. lift-/.f64N/A

              \[\leadsto \mathsf{neg}\left(\frac{x}{B}\right) \]
            4. distribute-frac-negN/A

              \[\leadsto \frac{\mathsf{neg}\left(x\right)}{B} \]
            5. lift-neg.f64N/A

              \[\leadsto \frac{-x}{B} \]
            6. lift-/.f6429.7

              \[\leadsto \frac{-x}{B} \]
          11. Applied rewrites29.7%

            \[\leadsto \frac{-x}{\color{blue}{B}} \]

          if 1.3e-23 < F

          1. Initial program 77.2%

            \[\left(-x \cdot \frac{1}{\tan 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-pow.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \color{blue}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
            2. sqr-powN/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\left({\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right)} \]
            3. lower-unsound-*.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\left({\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right)} \]
            4. lower-unsound-pow.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left(\color{blue}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            5. lift-+.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\color{blue}{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            6. +-commutativeN/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\color{blue}{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            7. lift-*.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\color{blue}{2 \cdot x} + \left(F \cdot F + 2\right)\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            8. lower-fma.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\color{blue}{\left(\mathsf{fma}\left(2, x, F \cdot F + 2\right)\right)}}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            9. lift-+.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \color{blue}{F \cdot F + 2}\right)\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            10. lift-*.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \color{blue}{F \cdot F} + 2\right)\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            11. lower-fma.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            12. lower-unsound-/.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\color{blue}{\left(\frac{-\frac{1}{2}}{2}\right)}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            13. lift-neg.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{\color{blue}{\mathsf{neg}\left(\frac{1}{2}\right)}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            14. lift-/.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            15. metadata-evalN/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            16. metadata-evalN/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{\color{blue}{\frac{-1}{2}}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            17. lower-unsound-pow.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{\frac{-1}{2}}{2}\right)} \cdot \color{blue}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}}\right) \]
          3. Applied rewrites77.2%

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{-0.5}{2}\right)} \cdot {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{-0.5}{2}\right)}\right)} \]
          4. Taylor expanded in B around 0

            \[\leadsto \color{blue}{\frac{F \cdot {\left({\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{4}}\right)}^{2} - x}{B}} \]
          5. Step-by-step derivation
            1. metadata-evalN/A

              \[\leadsto \frac{F \cdot {\left({\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\frac{\frac{-1}{2}}{2}\right)}\right)}^{2} - x}{B} \]
            2. metadata-evalN/A

              \[\leadsto \frac{F \cdot {\left({\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\frac{\mathsf{neg}\left(\frac{1}{2}\right)}{2}\right)}\right)}^{2} - x}{B} \]
            3. metadata-evalN/A

              \[\leadsto \frac{F \cdot {\left({\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\frac{\mathsf{neg}\left(\frac{1}{2}\right)}{2}\right)}\right)}^{2} - x}{B} \]
            4. lower-/.f64N/A

              \[\leadsto \frac{F \cdot {\left({\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\frac{\mathsf{neg}\left(\frac{1}{2}\right)}{2}\right)}\right)}^{2} - x}{\color{blue}{B}} \]
          6. Applied rewrites44.3%

            \[\leadsto \color{blue}{\frac{F \cdot {\left({\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.25}\right)}^{2} - x}{B}} \]
          7. Applied rewrites36.1%

            \[\leadsto \mathsf{fma}\left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \color{blue}{\frac{F}{B}}, \frac{-x}{B}\right) \]
          8. Taylor expanded in F around inf

            \[\leadsto F \cdot \color{blue}{\left(-1 \cdot \frac{x}{B \cdot F} + \frac{1}{B \cdot F}\right)} \]
          9. Step-by-step derivation
            1. lower-*.f64N/A

              \[\leadsto F \cdot \left(-1 \cdot \frac{x}{B \cdot F} + \color{blue}{\frac{1}{B \cdot F}}\right) \]
            2. lower-fma.f64N/A

              \[\leadsto F \cdot \mathsf{fma}\left(-1, \frac{x}{\color{blue}{B \cdot F}}, \frac{1}{B \cdot F}\right) \]
            3. lower-/.f64N/A

              \[\leadsto F \cdot \mathsf{fma}\left(-1, \frac{x}{B \cdot \color{blue}{F}}, \frac{1}{B \cdot F}\right) \]
            4. lower-*.f64N/A

              \[\leadsto F \cdot \mathsf{fma}\left(-1, \frac{x}{B \cdot F}, \frac{1}{B \cdot F}\right) \]
            5. lower-/.f64N/A

              \[\leadsto F \cdot \mathsf{fma}\left(-1, \frac{x}{B \cdot F}, \frac{1}{B \cdot F}\right) \]
            6. lower-*.f6425.0

              \[\leadsto F \cdot \mathsf{fma}\left(-1, \frac{x}{B \cdot F}, \frac{1}{B \cdot F}\right) \]
          10. Applied rewrites25.0%

            \[\leadsto F \cdot \color{blue}{\mathsf{fma}\left(-1, \frac{x}{B \cdot F}, \frac{1}{B \cdot F}\right)} \]
        3. Recombined 3 regimes into one program.
        4. Add Preprocessing

        Alternative 20: 36.9% accurate, 4.6× speedup?

        \[\begin{array}{l} \mathbf{if}\;F \leq 1.3 \cdot 10^{-23}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;F \cdot \mathsf{fma}\left(-1, \frac{x}{B \cdot F}, \frac{1}{B \cdot F}\right)\\ \end{array} \]
        (FPCore (F B x)
         :precision binary64
         (if (<= F 1.3e-23)
           (/ (- x) B)
           (* F (fma -1.0 (/ x (* B F)) (/ 1.0 (* B F))))))
        double code(double F, double B, double x) {
        	double tmp;
        	if (F <= 1.3e-23) {
        		tmp = -x / B;
        	} else {
        		tmp = F * fma(-1.0, (x / (B * F)), (1.0 / (B * F)));
        	}
        	return tmp;
        }
        
        function code(F, B, x)
        	tmp = 0.0
        	if (F <= 1.3e-23)
        		tmp = Float64(Float64(-x) / B);
        	else
        		tmp = Float64(F * fma(-1.0, Float64(x / Float64(B * F)), Float64(1.0 / Float64(B * F))));
        	end
        	return tmp
        end
        
        code[F_, B_, x_] := If[LessEqual[F, 1.3e-23], N[((-x) / B), $MachinePrecision], N[(F * N[(-1.0 * N[(x / N[(B * F), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(B * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
        
        \begin{array}{l}
        \mathbf{if}\;F \leq 1.3 \cdot 10^{-23}:\\
        \;\;\;\;\frac{-x}{B}\\
        
        \mathbf{else}:\\
        \;\;\;\;F \cdot \mathsf{fma}\left(-1, \frac{x}{B \cdot F}, \frac{1}{B \cdot F}\right)\\
        
        
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if F < 1.3e-23

          1. Initial program 77.2%

            \[\left(-x \cdot \frac{1}{\tan 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-pow.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \color{blue}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
            2. sqr-powN/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\left({\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right)} \]
            3. lower-unsound-*.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\left({\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right)} \]
            4. lower-unsound-pow.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left(\color{blue}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            5. lift-+.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\color{blue}{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            6. +-commutativeN/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\color{blue}{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            7. lift-*.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\color{blue}{2 \cdot x} + \left(F \cdot F + 2\right)\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            8. lower-fma.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\color{blue}{\left(\mathsf{fma}\left(2, x, F \cdot F + 2\right)\right)}}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            9. lift-+.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \color{blue}{F \cdot F + 2}\right)\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            10. lift-*.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \color{blue}{F \cdot F} + 2\right)\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            11. lower-fma.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            12. lower-unsound-/.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\color{blue}{\left(\frac{-\frac{1}{2}}{2}\right)}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            13. lift-neg.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{\color{blue}{\mathsf{neg}\left(\frac{1}{2}\right)}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            14. lift-/.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            15. metadata-evalN/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            16. metadata-evalN/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{\color{blue}{\frac{-1}{2}}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            17. lower-unsound-pow.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{\frac{-1}{2}}{2}\right)} \cdot \color{blue}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}}\right) \]
          3. Applied rewrites77.2%

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{-0.5}{2}\right)} \cdot {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{-0.5}{2}\right)}\right)} \]
          4. Taylor expanded in B around 0

            \[\leadsto \color{blue}{\frac{F \cdot {\left({\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{4}}\right)}^{2} - x}{B}} \]
          5. Step-by-step derivation
            1. metadata-evalN/A

              \[\leadsto \frac{F \cdot {\left({\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\frac{\frac{-1}{2}}{2}\right)}\right)}^{2} - x}{B} \]
            2. metadata-evalN/A

              \[\leadsto \frac{F \cdot {\left({\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\frac{\mathsf{neg}\left(\frac{1}{2}\right)}{2}\right)}\right)}^{2} - x}{B} \]
            3. metadata-evalN/A

              \[\leadsto \frac{F \cdot {\left({\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\frac{\mathsf{neg}\left(\frac{1}{2}\right)}{2}\right)}\right)}^{2} - x}{B} \]
            4. lower-/.f64N/A

              \[\leadsto \frac{F \cdot {\left({\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\frac{\mathsf{neg}\left(\frac{1}{2}\right)}{2}\right)}\right)}^{2} - x}{\color{blue}{B}} \]
          6. Applied rewrites44.3%

            \[\leadsto \color{blue}{\frac{F \cdot {\left({\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.25}\right)}^{2} - x}{B}} \]
          7. Taylor expanded in F around 0

            \[\leadsto -1 \cdot \color{blue}{\frac{x}{B}} \]
          8. Step-by-step derivation
            1. lower-*.f64N/A

              \[\leadsto -1 \cdot \frac{x}{\color{blue}{B}} \]
            2. lower-/.f6429.7

              \[\leadsto -1 \cdot \frac{x}{B} \]
          9. Applied rewrites29.7%

            \[\leadsto -1 \cdot \color{blue}{\frac{x}{B}} \]
          10. Step-by-step derivation
            1. lift-*.f64N/A

              \[\leadsto -1 \cdot \frac{x}{\color{blue}{B}} \]
            2. mul-1-negN/A

              \[\leadsto \mathsf{neg}\left(\frac{x}{B}\right) \]
            3. lift-/.f64N/A

              \[\leadsto \mathsf{neg}\left(\frac{x}{B}\right) \]
            4. distribute-frac-negN/A

              \[\leadsto \frac{\mathsf{neg}\left(x\right)}{B} \]
            5. lift-neg.f64N/A

              \[\leadsto \frac{-x}{B} \]
            6. lift-/.f6429.7

              \[\leadsto \frac{-x}{B} \]
          11. Applied rewrites29.7%

            \[\leadsto \frac{-x}{\color{blue}{B}} \]

          if 1.3e-23 < F

          1. Initial program 77.2%

            \[\left(-x \cdot \frac{1}{\tan 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-pow.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \color{blue}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
            2. sqr-powN/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\left({\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right)} \]
            3. lower-unsound-*.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\left({\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right)} \]
            4. lower-unsound-pow.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left(\color{blue}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            5. lift-+.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\color{blue}{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            6. +-commutativeN/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\color{blue}{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            7. lift-*.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\color{blue}{2 \cdot x} + \left(F \cdot F + 2\right)\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            8. lower-fma.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\color{blue}{\left(\mathsf{fma}\left(2, x, F \cdot F + 2\right)\right)}}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            9. lift-+.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \color{blue}{F \cdot F + 2}\right)\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            10. lift-*.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \color{blue}{F \cdot F} + 2\right)\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            11. lower-fma.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            12. lower-unsound-/.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\color{blue}{\left(\frac{-\frac{1}{2}}{2}\right)}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            13. lift-neg.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{\color{blue}{\mathsf{neg}\left(\frac{1}{2}\right)}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            14. lift-/.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            15. metadata-evalN/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            16. metadata-evalN/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{\color{blue}{\frac{-1}{2}}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            17. lower-unsound-pow.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{\frac{-1}{2}}{2}\right)} \cdot \color{blue}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}}\right) \]
          3. Applied rewrites77.2%

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{-0.5}{2}\right)} \cdot {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{-0.5}{2}\right)}\right)} \]
          4. Taylor expanded in B around 0

            \[\leadsto \color{blue}{\frac{F \cdot {\left({\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{4}}\right)}^{2} - x}{B}} \]
          5. Step-by-step derivation
            1. metadata-evalN/A

              \[\leadsto \frac{F \cdot {\left({\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\frac{\frac{-1}{2}}{2}\right)}\right)}^{2} - x}{B} \]
            2. metadata-evalN/A

              \[\leadsto \frac{F \cdot {\left({\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\frac{\mathsf{neg}\left(\frac{1}{2}\right)}{2}\right)}\right)}^{2} - x}{B} \]
            3. metadata-evalN/A

              \[\leadsto \frac{F \cdot {\left({\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\frac{\mathsf{neg}\left(\frac{1}{2}\right)}{2}\right)}\right)}^{2} - x}{B} \]
            4. lower-/.f64N/A

              \[\leadsto \frac{F \cdot {\left({\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\frac{\mathsf{neg}\left(\frac{1}{2}\right)}{2}\right)}\right)}^{2} - x}{\color{blue}{B}} \]
          6. Applied rewrites44.3%

            \[\leadsto \color{blue}{\frac{F \cdot {\left({\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.25}\right)}^{2} - x}{B}} \]
          7. Applied rewrites36.1%

            \[\leadsto \mathsf{fma}\left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \color{blue}{\frac{F}{B}}, \frac{-x}{B}\right) \]
          8. Taylor expanded in F around inf

            \[\leadsto F \cdot \color{blue}{\left(-1 \cdot \frac{x}{B \cdot F} + \frac{1}{B \cdot F}\right)} \]
          9. Step-by-step derivation
            1. lower-*.f64N/A

              \[\leadsto F \cdot \left(-1 \cdot \frac{x}{B \cdot F} + \color{blue}{\frac{1}{B \cdot F}}\right) \]
            2. lower-fma.f64N/A

              \[\leadsto F \cdot \mathsf{fma}\left(-1, \frac{x}{\color{blue}{B \cdot F}}, \frac{1}{B \cdot F}\right) \]
            3. lower-/.f64N/A

              \[\leadsto F \cdot \mathsf{fma}\left(-1, \frac{x}{B \cdot \color{blue}{F}}, \frac{1}{B \cdot F}\right) \]
            4. lower-*.f64N/A

              \[\leadsto F \cdot \mathsf{fma}\left(-1, \frac{x}{B \cdot F}, \frac{1}{B \cdot F}\right) \]
            5. lower-/.f64N/A

              \[\leadsto F \cdot \mathsf{fma}\left(-1, \frac{x}{B \cdot F}, \frac{1}{B \cdot F}\right) \]
            6. lower-*.f6425.0

              \[\leadsto F \cdot \mathsf{fma}\left(-1, \frac{x}{B \cdot F}, \frac{1}{B \cdot F}\right) \]
          10. Applied rewrites25.0%

            \[\leadsto F \cdot \color{blue}{\mathsf{fma}\left(-1, \frac{x}{B \cdot F}, \frac{1}{B \cdot F}\right)} \]
        3. Recombined 2 regimes into one program.
        4. Add Preprocessing

        Alternative 21: 29.7% accurate, 21.7× speedup?

        \[\frac{-x}{B} \]
        (FPCore (F B x) :precision binary64 (/ (- x) B))
        double code(double F, double B, double x) {
        	return -x / 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 = -x / b
        end function
        
        public static double code(double F, double B, double x) {
        	return -x / B;
        }
        
        def code(F, B, x):
        	return -x / B
        
        function code(F, B, x)
        	return Float64(Float64(-x) / B)
        end
        
        function tmp = code(F, B, x)
        	tmp = -x / B;
        end
        
        code[F_, B_, x_] := N[((-x) / B), $MachinePrecision]
        
        \frac{-x}{B}
        
        Derivation
        1. Initial program 77.2%

          \[\left(-x \cdot \frac{1}{\tan 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-pow.f64N/A

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \color{blue}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
          2. sqr-powN/A

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\left({\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right)} \]
          3. lower-unsound-*.f64N/A

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\left({\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right)} \]
          4. lower-unsound-pow.f64N/A

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left(\color{blue}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
          5. lift-+.f64N/A

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\color{blue}{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
          6. +-commutativeN/A

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\color{blue}{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
          7. lift-*.f64N/A

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\color{blue}{2 \cdot x} + \left(F \cdot F + 2\right)\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
          8. lower-fma.f64N/A

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\color{blue}{\left(\mathsf{fma}\left(2, x, F \cdot F + 2\right)\right)}}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
          9. lift-+.f64N/A

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \color{blue}{F \cdot F + 2}\right)\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
          10. lift-*.f64N/A

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \color{blue}{F \cdot F} + 2\right)\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
          11. lower-fma.f64N/A

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
          12. lower-unsound-/.f64N/A

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\color{blue}{\left(\frac{-\frac{1}{2}}{2}\right)}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
          13. lift-neg.f64N/A

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{\color{blue}{\mathsf{neg}\left(\frac{1}{2}\right)}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
          14. lift-/.f64N/A

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
          15. metadata-evalN/A

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
          16. metadata-evalN/A

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{\color{blue}{\frac{-1}{2}}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
          17. lower-unsound-pow.f64N/A

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{\frac{-1}{2}}{2}\right)} \cdot \color{blue}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}}\right) \]
        3. Applied rewrites77.2%

          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{-0.5}{2}\right)} \cdot {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{-0.5}{2}\right)}\right)} \]
        4. Taylor expanded in B around 0

          \[\leadsto \color{blue}{\frac{F \cdot {\left({\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{4}}\right)}^{2} - x}{B}} \]
        5. Step-by-step derivation
          1. metadata-evalN/A

            \[\leadsto \frac{F \cdot {\left({\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\frac{\frac{-1}{2}}{2}\right)}\right)}^{2} - x}{B} \]
          2. metadata-evalN/A

            \[\leadsto \frac{F \cdot {\left({\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\frac{\mathsf{neg}\left(\frac{1}{2}\right)}{2}\right)}\right)}^{2} - x}{B} \]
          3. metadata-evalN/A

            \[\leadsto \frac{F \cdot {\left({\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\frac{\mathsf{neg}\left(\frac{1}{2}\right)}{2}\right)}\right)}^{2} - x}{B} \]
          4. lower-/.f64N/A

            \[\leadsto \frac{F \cdot {\left({\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\frac{\mathsf{neg}\left(\frac{1}{2}\right)}{2}\right)}\right)}^{2} - x}{\color{blue}{B}} \]
        6. Applied rewrites44.3%

          \[\leadsto \color{blue}{\frac{F \cdot {\left({\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.25}\right)}^{2} - x}{B}} \]
        7. Taylor expanded in F around 0

          \[\leadsto -1 \cdot \color{blue}{\frac{x}{B}} \]
        8. Step-by-step derivation
          1. lower-*.f64N/A

            \[\leadsto -1 \cdot \frac{x}{\color{blue}{B}} \]
          2. lower-/.f6429.7

            \[\leadsto -1 \cdot \frac{x}{B} \]
        9. Applied rewrites29.7%

          \[\leadsto -1 \cdot \color{blue}{\frac{x}{B}} \]
        10. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto -1 \cdot \frac{x}{\color{blue}{B}} \]
          2. mul-1-negN/A

            \[\leadsto \mathsf{neg}\left(\frac{x}{B}\right) \]
          3. lift-/.f64N/A

            \[\leadsto \mathsf{neg}\left(\frac{x}{B}\right) \]
          4. distribute-frac-negN/A

            \[\leadsto \frac{\mathsf{neg}\left(x\right)}{B} \]
          5. lift-neg.f64N/A

            \[\leadsto \frac{-x}{B} \]
          6. lift-/.f6429.7

            \[\leadsto \frac{-x}{B} \]
        11. Applied rewrites29.7%

          \[\leadsto \frac{-x}{\color{blue}{B}} \]
        12. Add Preprocessing

        Alternative 22: 17.5% accurate, 14.2× speedup?

        \[\begin{array}{l} \mathbf{if}\;F \leq 1100:\\ \;\;\;\;\frac{-1}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B}\\ \end{array} \]
        (FPCore (F B x) :precision binary64 (if (<= F 1100.0) (/ -1.0 B) (/ 1.0 B)))
        double code(double F, double B, double x) {
        	double tmp;
        	if (F <= 1100.0) {
        		tmp = -1.0 / B;
        	} else {
        		tmp = 1.0 / B;
        	}
        	return tmp;
        }
        
        module fmin_fmax_functions
            implicit none
            private
            public fmax
            public fmin
        
            interface fmax
                module procedure fmax88
                module procedure fmax44
                module procedure fmax84
                module procedure fmax48
            end interface
            interface fmin
                module procedure fmin88
                module procedure fmin44
                module procedure fmin84
                module procedure fmin48
            end interface
        contains
            real(8) function fmax88(x, y) result (res)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
            end function
            real(4) function fmax44(x, y) result (res)
                real(4), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
            end function
            real(8) function fmax84(x, y) result(res)
                real(8), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
            end function
            real(8) function fmax48(x, y) result(res)
                real(4), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
            end function
            real(8) function fmin88(x, y) result (res)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
            end function
            real(4) function fmin44(x, y) result (res)
                real(4), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
            end function
            real(8) function fmin84(x, y) result(res)
                real(8), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
            end function
            real(8) function fmin48(x, y) result(res)
                real(4), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
            end function
        end module
        
        real(8) function code(f, b, x)
        use fmin_fmax_functions
            real(8), intent (in) :: f
            real(8), intent (in) :: b
            real(8), intent (in) :: x
            real(8) :: tmp
            if (f <= 1100.0d0) then
                tmp = (-1.0d0) / b
            else
                tmp = 1.0d0 / b
            end if
            code = tmp
        end function
        
        public static double code(double F, double B, double x) {
        	double tmp;
        	if (F <= 1100.0) {
        		tmp = -1.0 / B;
        	} else {
        		tmp = 1.0 / B;
        	}
        	return tmp;
        }
        
        def code(F, B, x):
        	tmp = 0
        	if F <= 1100.0:
        		tmp = -1.0 / B
        	else:
        		tmp = 1.0 / B
        	return tmp
        
        function code(F, B, x)
        	tmp = 0.0
        	if (F <= 1100.0)
        		tmp = Float64(-1.0 / B);
        	else
        		tmp = Float64(1.0 / B);
        	end
        	return tmp
        end
        
        function tmp_2 = code(F, B, x)
        	tmp = 0.0;
        	if (F <= 1100.0)
        		tmp = -1.0 / B;
        	else
        		tmp = 1.0 / B;
        	end
        	tmp_2 = tmp;
        end
        
        code[F_, B_, x_] := If[LessEqual[F, 1100.0], N[(-1.0 / B), $MachinePrecision], N[(1.0 / B), $MachinePrecision]]
        
        \begin{array}{l}
        \mathbf{if}\;F \leq 1100:\\
        \;\;\;\;\frac{-1}{B}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{1}{B}\\
        
        
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if F < 1100

          1. Initial program 77.2%

            \[\left(-x \cdot \frac{1}{\tan 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}} \]
          5. Taylor expanded in B around 0

            \[\leadsto \frac{-1}{B} \]
          6. Step-by-step derivation
            1. Applied rewrites10.4%

              \[\leadsto \frac{-1}{B} \]

            if 1100 < F

            1. Initial program 77.2%

              \[\left(-x \cdot \frac{1}{\tan 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-pow.f64N/A

                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \color{blue}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
              2. sqr-powN/A

                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\left({\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right)} \]
              3. lower-unsound-*.f64N/A

                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\left({\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right)} \]
              4. lower-unsound-pow.f64N/A

                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left(\color{blue}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
              5. lift-+.f64N/A

                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\color{blue}{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
              6. +-commutativeN/A

                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\color{blue}{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
              7. lift-*.f64N/A

                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\color{blue}{2 \cdot x} + \left(F \cdot F + 2\right)\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
              8. lower-fma.f64N/A

                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\color{blue}{\left(\mathsf{fma}\left(2, x, F \cdot F + 2\right)\right)}}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
              9. lift-+.f64N/A

                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \color{blue}{F \cdot F + 2}\right)\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
              10. lift-*.f64N/A

                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \color{blue}{F \cdot F} + 2\right)\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
              11. lower-fma.f64N/A

                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
              12. lower-unsound-/.f64N/A

                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\color{blue}{\left(\frac{-\frac{1}{2}}{2}\right)}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
              13. lift-neg.f64N/A

                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{\color{blue}{\mathsf{neg}\left(\frac{1}{2}\right)}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
              14. lift-/.f64N/A

                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
              15. metadata-evalN/A

                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
              16. metadata-evalN/A

                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{\color{blue}{\frac{-1}{2}}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
              17. lower-unsound-pow.f64N/A

                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{\frac{-1}{2}}{2}\right)} \cdot \color{blue}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}}\right) \]
            3. Applied rewrites77.2%

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{-0.5}{2}\right)} \cdot {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{-0.5}{2}\right)}\right)} \]
            4. Taylor expanded in B around 0

              \[\leadsto \color{blue}{\frac{F \cdot {\left({\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{4}}\right)}^{2} - x}{B}} \]
            5. Step-by-step derivation
              1. metadata-evalN/A

                \[\leadsto \frac{F \cdot {\left({\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\frac{\frac{-1}{2}}{2}\right)}\right)}^{2} - x}{B} \]
              2. metadata-evalN/A

                \[\leadsto \frac{F \cdot {\left({\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\frac{\mathsf{neg}\left(\frac{1}{2}\right)}{2}\right)}\right)}^{2} - x}{B} \]
              3. metadata-evalN/A

                \[\leadsto \frac{F \cdot {\left({\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\frac{\mathsf{neg}\left(\frac{1}{2}\right)}{2}\right)}\right)}^{2} - x}{B} \]
              4. lower-/.f64N/A

                \[\leadsto \frac{F \cdot {\left({\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\frac{\mathsf{neg}\left(\frac{1}{2}\right)}{2}\right)}\right)}^{2} - x}{\color{blue}{B}} \]
            6. Applied rewrites44.3%

              \[\leadsto \color{blue}{\frac{F \cdot {\left({\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.25}\right)}^{2} - x}{B}} \]
            7. Applied rewrites36.1%

              \[\leadsto \mathsf{fma}\left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \color{blue}{\frac{F}{B}}, \frac{-x}{B}\right) \]
            8. Taylor expanded in F around inf

              \[\leadsto \frac{1}{\color{blue}{B}} \]
            9. Step-by-step derivation
              1. lower-/.f6410.0

                \[\leadsto \frac{1}{B} \]
            10. Applied rewrites10.0%

              \[\leadsto \frac{1}{\color{blue}{B}} \]
          7. Recombined 2 regimes into one program.
          8. Add Preprocessing

          Alternative 23: 10.0% accurate, 26.5× speedup?

          \[\frac{1}{B} \]
          (FPCore (F B x) :precision binary64 (/ 1.0 B))
          double code(double F, double B, double x) {
          	return 1.0 / B;
          }
          
          module fmin_fmax_functions
              implicit none
              private
              public fmax
              public fmin
          
              interface fmax
                  module procedure fmax88
                  module procedure fmax44
                  module procedure fmax84
                  module procedure fmax48
              end interface
              interface fmin
                  module procedure fmin88
                  module procedure fmin44
                  module procedure fmin84
                  module procedure fmin48
              end interface
          contains
              real(8) function fmax88(x, y) result (res)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
              end function
              real(4) function fmax44(x, y) result (res)
                  real(4), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
              end function
              real(8) function fmax84(x, y) result(res)
                  real(8), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
              end function
              real(8) function fmax48(x, y) result(res)
                  real(4), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
              end function
              real(8) function fmin88(x, y) result (res)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
              end function
              real(4) function fmin44(x, y) result (res)
                  real(4), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
              end function
              real(8) function fmin84(x, y) result(res)
                  real(8), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
              end function
              real(8) function fmin48(x, y) result(res)
                  real(4), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
              end function
          end module
          
          real(8) function code(f, b, x)
          use fmin_fmax_functions
              real(8), intent (in) :: f
              real(8), intent (in) :: b
              real(8), intent (in) :: x
              code = 1.0d0 / b
          end function
          
          public static double code(double F, double B, double x) {
          	return 1.0 / B;
          }
          
          def code(F, B, x):
          	return 1.0 / B
          
          function code(F, B, x)
          	return Float64(1.0 / B)
          end
          
          function tmp = code(F, B, x)
          	tmp = 1.0 / B;
          end
          
          code[F_, B_, x_] := N[(1.0 / B), $MachinePrecision]
          
          \frac{1}{B}
          
          Derivation
          1. Initial program 77.2%

            \[\left(-x \cdot \frac{1}{\tan 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-pow.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \color{blue}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
            2. sqr-powN/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\left({\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right)} \]
            3. lower-unsound-*.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\left({\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right)} \]
            4. lower-unsound-pow.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left(\color{blue}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            5. lift-+.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\color{blue}{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            6. +-commutativeN/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\color{blue}{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            7. lift-*.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\color{blue}{2 \cdot x} + \left(F \cdot F + 2\right)\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            8. lower-fma.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\color{blue}{\left(\mathsf{fma}\left(2, x, F \cdot F + 2\right)\right)}}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            9. lift-+.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \color{blue}{F \cdot F + 2}\right)\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            10. lift-*.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \color{blue}{F \cdot F} + 2\right)\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            11. lower-fma.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            12. lower-unsound-/.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\color{blue}{\left(\frac{-\frac{1}{2}}{2}\right)}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            13. lift-neg.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{\color{blue}{\mathsf{neg}\left(\frac{1}{2}\right)}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            14. lift-/.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            15. metadata-evalN/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            16. metadata-evalN/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{\color{blue}{\frac{-1}{2}}}{2}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}\right) \]
            17. lower-unsound-pow.f64N/A

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{\frac{-1}{2}}{2}\right)} \cdot \color{blue}{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-\frac{1}{2}}{2}\right)}}\right) \]
          3. Applied rewrites77.2%

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{-0.5}{2}\right)} \cdot {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(\frac{-0.5}{2}\right)}\right)} \]
          4. Taylor expanded in B around 0

            \[\leadsto \color{blue}{\frac{F \cdot {\left({\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{4}}\right)}^{2} - x}{B}} \]
          5. Step-by-step derivation
            1. metadata-evalN/A

              \[\leadsto \frac{F \cdot {\left({\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\frac{\frac{-1}{2}}{2}\right)}\right)}^{2} - x}{B} \]
            2. metadata-evalN/A

              \[\leadsto \frac{F \cdot {\left({\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\frac{\mathsf{neg}\left(\frac{1}{2}\right)}{2}\right)}\right)}^{2} - x}{B} \]
            3. metadata-evalN/A

              \[\leadsto \frac{F \cdot {\left({\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\frac{\mathsf{neg}\left(\frac{1}{2}\right)}{2}\right)}\right)}^{2} - x}{B} \]
            4. lower-/.f64N/A

              \[\leadsto \frac{F \cdot {\left({\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\left(\frac{\mathsf{neg}\left(\frac{1}{2}\right)}{2}\right)}\right)}^{2} - x}{\color{blue}{B}} \]
          6. Applied rewrites44.3%

            \[\leadsto \color{blue}{\frac{F \cdot {\left({\left(2 + \mathsf{fma}\left(2, x, {F}^{2}\right)\right)}^{-0.25}\right)}^{2} - x}{B}} \]
          7. Applied rewrites36.1%

            \[\leadsto \mathsf{fma}\left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \color{blue}{\frac{F}{B}}, \frac{-x}{B}\right) \]
          8. Taylor expanded in F around inf

            \[\leadsto \frac{1}{\color{blue}{B}} \]
          9. Step-by-step derivation
            1. lower-/.f6410.0

              \[\leadsto \frac{1}{B} \]
          10. Applied rewrites10.0%

            \[\leadsto \frac{1}{\color{blue}{B}} \]
          11. Add Preprocessing

          Reproduce

          ?
          herbie shell --seed 2025175 
          (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))))))