VandenBroeck and Keller, Equation (23)

Percentage Accurate: 76.6% → 99.7%
Time: 8.3s
Alternatives: 21
Speedup: 2.1×

Specification

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

\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}

Sampling outcomes in binary64 precision:

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 21 alternatives:

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

Initial Program: 76.6% accurate, 1.0× speedup?

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

\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}

Alternative 1: 99.7% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
t_0 := \cos B \cdot x\\
\mathbf{if}\;F \leq -2 \cdot 10^{+26}:\\
\;\;\;\;\frac{-1 - t\_0}{\sin B}\\

\mathbf{elif}\;F \leq 60000:\\
\;\;\;\;\frac{-x}{\tan B} + \frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)} \cdot \sin B}\\

\mathbf{else}:\\
\;\;\;\;\frac{1 - t\_0}{\sin B}\\


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

    1. Initial program 45.8%

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

      \[\leadsto \color{blue}{-1 \cdot \left(\frac{1}{\sin B} + \frac{x \cdot \cos B}{\sin B}\right)} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

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

        \[\leadsto -\left(\frac{1}{\sin B} + \frac{x \cdot \cos B}{\sin B}\right) \]
      3. div-add-revN/A

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

        \[\leadsto -\frac{1 + x \cdot \cos B}{\sin B} \]
      5. lower-+.f64N/A

        \[\leadsto -\frac{1 + x \cdot \cos B}{\sin B} \]
      6. *-commutativeN/A

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

        \[\leadsto -\frac{1 + \cos B \cdot x}{\sin B} \]
      8. lower-cos.f64N/A

        \[\leadsto -\frac{1 + \cos B \cdot x}{\sin B} \]
      9. lift-sin.f6499.8

        \[\leadsto -\frac{1 + \cos B \cdot x}{\sin B} \]
    5. Applied rewrites99.8%

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

    if -2.0000000000000001e26 < F < 6e4

    1. Initial program 99.3%

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

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

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

        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\color{blue}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
      4. 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)}} \]
      5. lift-+.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)} \]
      6. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(-\frac{x \cdot 1}{\tan B}\right) + \frac{F}{\color{blue}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} \cdot \sin B} \]
      15. lift-sin.f6499.6

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

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

    if 6e4 < F

    1. Initial program 55.7%

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

      \[\leadsto \color{blue}{\frac{1}{\sin B} - \frac{x \cdot \cos B}{\sin B}} \]
    4. Step-by-step derivation
      1. sub-divN/A

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

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

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

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

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

        \[\leadsto \frac{1 - \cos B \cdot x}{\sin B} \]
      7. lift-sin.f6499.6

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

      \[\leadsto \color{blue}{\frac{1 - \cos B \cdot x}{\sin B}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification99.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -2 \cdot 10^{+26}:\\ \;\;\;\;\frac{-1 - \cos B \cdot x}{\sin B}\\ \mathbf{elif}\;F \leq 60000:\\ \;\;\;\;\frac{-x}{\tan B} + \frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)} \cdot \sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - \cos B \cdot x}{\sin B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 92.1% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
t_0 := \frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}\\
t_1 := \cos B \cdot x\\
\mathbf{if}\;F \leq -7000000:\\
\;\;\;\;\frac{-1 - t\_1}{\sin B}\\

\mathbf{elif}\;F \leq 7.5 \cdot 10^{-58}:\\
\;\;\;\;\frac{-x}{\tan B} + \frac{t\_0}{B}\\

\mathbf{elif}\;F \leq 39000:\\
\;\;\;\;\frac{-x}{B} + \frac{t\_0}{\sin B}\\

\mathbf{else}:\\
\;\;\;\;\frac{1 - t\_1}{\sin B}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if F < -7e6

    1. Initial program 49.7%

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

      \[\leadsto \color{blue}{-1 \cdot \left(\frac{1}{\sin B} + \frac{x \cdot \cos B}{\sin B}\right)} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

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

        \[\leadsto -\left(\frac{1}{\sin B} + \frac{x \cdot \cos B}{\sin B}\right) \]
      3. div-add-revN/A

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

        \[\leadsto -\frac{1 + x \cdot \cos B}{\sin B} \]
      5. lower-+.f64N/A

        \[\leadsto -\frac{1 + x \cdot \cos B}{\sin B} \]
      6. *-commutativeN/A

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

        \[\leadsto -\frac{1 + \cos B \cdot x}{\sin B} \]
      8. lower-cos.f64N/A

        \[\leadsto -\frac{1 + \cos B \cdot x}{\sin B} \]
      9. lift-sin.f6499.8

        \[\leadsto -\frac{1 + \cos B \cdot x}{\sin B} \]
    5. Applied rewrites99.8%

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

    if -7e6 < F < 7.50000000000000002e-58

    1. Initial program 99.3%

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

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

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

        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\color{blue}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
      4. 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)}} \]
      5. lift-+.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)} \]
      6. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(-\frac{x \cdot 1}{\tan B}\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
    10. Step-by-step derivation
      1. Applied rewrites85.4%

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

      if 7.50000000000000002e-58 < F < 39000

      1. Initial program 99.1%

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

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

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

          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\color{blue}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
        4. 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)}} \]
        5. lift-+.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)} \]
        6. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-1 \cdot \frac{x}{B}} + \frac{\frac{F \cdot 1}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B} \]
      10. Step-by-step derivation
        1. associate-*r/N/A

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

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

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

          \[\leadsto \frac{\mathsf{neg}\left(x\right)}{\color{blue}{B}} + \frac{\frac{F \cdot 1}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B} \]
        5. lower-neg.f6486.2

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

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

      if 39000 < F

      1. Initial program 55.7%

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

        \[\leadsto \color{blue}{\frac{1}{\sin B} - \frac{x \cdot \cos B}{\sin B}} \]
      4. Step-by-step derivation
        1. sub-divN/A

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

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

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

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

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

          \[\leadsto \frac{1 - \cos B \cdot x}{\sin B} \]
        7. lift-sin.f6499.6

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

        \[\leadsto \color{blue}{\frac{1 - \cos B \cdot x}{\sin B}} \]
    11. Recombined 4 regimes into one program.
    12. Final simplification92.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -7000000:\\ \;\;\;\;\frac{-1 - \cos B \cdot x}{\sin B}\\ \mathbf{elif}\;F \leq 7.5 \cdot 10^{-58}:\\ \;\;\;\;\frac{-x}{\tan B} + \frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}{B}\\ \mathbf{elif}\;F \leq 39000:\\ \;\;\;\;\frac{-x}{B} + \frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - \cos B \cdot x}{\sin B}\\ \end{array} \]
    13. Add Preprocessing

    Alternative 3: 85.3% accurate, 1.5× speedup?

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

      1. Initial program 13.0%

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

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

          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{\color{blue}{\sin B}} \]
        2. lift-sin.f6499.7

          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{\sin B} \]
      5. Applied rewrites99.7%

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

        \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{-1}{\sin B} \]
      7. Step-by-step derivation
        1. lower-/.f6492.8

          \[\leadsto \left(-\frac{x}{\color{blue}{B}}\right) + \frac{-1}{\sin B} \]
      8. Applied rewrites92.8%

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

      if -6.00000000000000025e150 < F < 7.50000000000000002e-58

      1. Initial program 99.3%

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

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

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

          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\color{blue}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
        4. 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)}} \]
        5. lift-+.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)} \]
        6. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(-\frac{x \cdot 1}{\tan B}\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      10. Step-by-step derivation
        1. Applied rewrites84.0%

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

        if 7.50000000000000002e-58 < F < 39000

        1. Initial program 99.1%

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

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

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

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\color{blue}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
          4. 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)}} \]
          5. lift-+.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)} \]
          6. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{-1 \cdot \frac{x}{B}} + \frac{\frac{F \cdot 1}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B} \]
        10. Step-by-step derivation
          1. associate-*r/N/A

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

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

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

            \[\leadsto \frac{\mathsf{neg}\left(x\right)}{\color{blue}{B}} + \frac{\frac{F \cdot 1}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B} \]
          5. lower-neg.f6486.2

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

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

        if 39000 < F

        1. Initial program 55.7%

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

          \[\leadsto \color{blue}{\frac{1}{\sin B} - \frac{x \cdot \cos B}{\sin B}} \]
        4. Step-by-step derivation
          1. sub-divN/A

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

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

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

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

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

            \[\leadsto \frac{1 - \cos B \cdot x}{\sin B} \]
          7. lift-sin.f6499.6

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

          \[\leadsto \color{blue}{\frac{1 - \cos B \cdot x}{\sin B}} \]
      11. Recombined 4 regimes into one program.
      12. Final simplification89.7%

        \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -6 \cdot 10^{+150}:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 7.5 \cdot 10^{-58}:\\ \;\;\;\;\frac{-x}{\tan B} + \frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}{B}\\ \mathbf{elif}\;F \leq 39000:\\ \;\;\;\;\frac{-x}{B} + \frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - \cos B \cdot x}{\sin B}\\ \end{array} \]
      13. Add Preprocessing

      Alternative 4: 78.0% accurate, 1.9× speedup?

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

        1. Initial program 13.0%

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

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

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{\color{blue}{\sin B}} \]
          2. lift-sin.f6499.7

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{\sin B} \]
        5. Applied rewrites99.7%

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

          \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{-1}{\sin B} \]
        7. Step-by-step derivation
          1. lower-/.f6492.8

            \[\leadsto \left(-\frac{x}{\color{blue}{B}}\right) + \frac{-1}{\sin B} \]
        8. Applied rewrites92.8%

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

        if -6.00000000000000025e150 < F < 4.2000000000000001e120

        1. Initial program 98.8%

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

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

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

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\color{blue}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
          4. 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)}} \]
          5. lift-+.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)} \]
          6. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(-\frac{x \cdot 1}{\tan B}\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
        10. Step-by-step derivation
          1. Applied rewrites80.0%

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

          if 4.2000000000000001e120 < F

          1. Initial program 39.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(-\frac{x}{B}\right) + \color{blue}{\frac{F \cdot \frac{\mathsf{fma}\left(\frac{\frac{\mathsf{fma}\left(2, x, 2\right)}{F}}{F}, -0.5, 1\right)}{F}}{\sin B}} \]
        11. Recombined 3 regimes into one program.
        12. Final simplification81.3%

          \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -6 \cdot 10^{+150}:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 4.2 \cdot 10^{+120}:\\ \;\;\;\;\frac{-x}{\tan B} + \frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}{B}\\ \mathbf{else}:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \frac{F \cdot \frac{\mathsf{fma}\left(\frac{\frac{\mathsf{fma}\left(2, x, 2\right)}{F}}{F}, -0.5, 1\right)}{F}}{\sin B}\\ \end{array} \]
        13. Add Preprocessing

        Alternative 5: 77.0% accurate, 2.1× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -2.9 \cdot 10^{-9} \lor \neg \left(x \leq 2.75 \cdot 10^{-14}\right):\\ \;\;\;\;\frac{-x}{\tan B} + \frac{-1}{\mathsf{fma}\left(B \cdot B, -0.16666666666666666, 1\right) \cdot B}\\ \mathbf{else}:\\ \;\;\;\;\frac{-x}{B} + \frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B}\\ \end{array} \end{array} \]
        (FPCore (F B x)
         :precision binary64
         (if (or (<= x -2.9e-9) (not (<= x 2.75e-14)))
           (+ (/ (- x) (tan B)) (/ -1.0 (* (fma (* B B) -0.16666666666666666 1.0) B)))
           (+ (/ (- x) B) (/ (/ F (sqrt (fma 2.0 x (fma F F 2.0)))) (sin B)))))
        double code(double F, double B, double x) {
        	double tmp;
        	if ((x <= -2.9e-9) || !(x <= 2.75e-14)) {
        		tmp = (-x / tan(B)) + (-1.0 / (fma((B * B), -0.16666666666666666, 1.0) * B));
        	} else {
        		tmp = (-x / B) + ((F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) / sin(B));
        	}
        	return tmp;
        }
        
        function code(F, B, x)
        	tmp = 0.0
        	if ((x <= -2.9e-9) || !(x <= 2.75e-14))
        		tmp = Float64(Float64(Float64(-x) / tan(B)) + Float64(-1.0 / Float64(fma(Float64(B * B), -0.16666666666666666, 1.0) * B)));
        	else
        		tmp = Float64(Float64(Float64(-x) / B) + Float64(Float64(F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) / sin(B)));
        	end
        	return tmp
        end
        
        code[F_, B_, x_] := If[Or[LessEqual[x, -2.9e-9], N[Not[LessEqual[x, 2.75e-14]], $MachinePrecision]], N[(N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[(N[(N[(B * B), $MachinePrecision] * -0.16666666666666666 + 1.0), $MachinePrecision] * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[((-x) / B), $MachinePrecision] + N[(N[(F / N[Sqrt[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;x \leq -2.9 \cdot 10^{-9} \lor \neg \left(x \leq 2.75 \cdot 10^{-14}\right):\\
        \;\;\;\;\frac{-x}{\tan B} + \frac{-1}{\mathsf{fma}\left(B \cdot B, -0.16666666666666666, 1\right) \cdot B}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{-x}{B} + \frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if x < -2.89999999999999991e-9 or 2.74999999999999996e-14 < x

          1. Initial program 83.3%

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

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

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{\color{blue}{\sin B}} \]
            2. lift-sin.f6494.0

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{\sin B} \]
          5. Applied rewrites94.0%

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

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

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

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

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

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{B \cdot \left(1 + \frac{-1}{6} \cdot \left(B \cdot B\right)\right)} \]
            5. lower-*.f6495.3

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{B \cdot \left(1 + -0.16666666666666666 \cdot \left(B \cdot B\right)\right)} \]
          8. Applied rewrites95.3%

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{B \cdot \color{blue}{\left(1 + -0.16666666666666666 \cdot \left(B \cdot B\right)\right)}} \]
          9. Applied rewrites95.5%

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

          if -2.89999999999999991e-9 < x < 2.74999999999999996e-14

          1. Initial program 70.7%

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

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

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

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\color{blue}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
            4. 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)}} \]
            5. lift-+.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)} \]
            6. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{-1 \cdot \frac{x}{B}} + \frac{\frac{F \cdot 1}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B} \]
          10. Step-by-step derivation
            1. associate-*r/N/A

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

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

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

              \[\leadsto \frac{\mathsf{neg}\left(x\right)}{\color{blue}{B}} + \frac{\frac{F \cdot 1}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B} \]
            5. lower-neg.f6461.1

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

            \[\leadsto \color{blue}{\frac{-x}{B}} + \frac{\frac{F \cdot 1}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B} \]
        3. Recombined 2 regimes into one program.
        4. Final simplification76.3%

          \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.9 \cdot 10^{-9} \lor \neg \left(x \leq 2.75 \cdot 10^{-14}\right):\\ \;\;\;\;\frac{-x}{\tan B} + \frac{-1}{\mathsf{fma}\left(B \cdot B, -0.16666666666666666, 1\right) \cdot B}\\ \mathbf{else}:\\ \;\;\;\;\frac{-x}{B} + \frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B}\\ \end{array} \]
        5. Add Preprocessing

        Alternative 6: 74.2% accurate, 2.1× speedup?

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

          1. Initial program 13.0%

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

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

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{\color{blue}{\sin B}} \]
            2. lift-sin.f6499.7

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{\sin B} \]
          5. Applied rewrites99.7%

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

            \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{-1}{\sin B} \]
          7. Step-by-step derivation
            1. lower-/.f6492.8

              \[\leadsto \left(-\frac{x}{\color{blue}{B}}\right) + \frac{-1}{\sin B} \]
          8. Applied rewrites92.8%

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

          if -6.00000000000000025e150 < F < 4.8e238

          1. Initial program 90.9%

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

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

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

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\color{blue}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
            4. 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)}} \]
            5. lift-+.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)} \]
            6. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(-\frac{x \cdot 1}{\tan B}\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
          10. Step-by-step derivation
            1. Applied rewrites76.5%

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

            if 4.8e238 < F < 4.6000000000000001e255

            1. Initial program 2.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. Add Preprocessing
            3. Taylor expanded in F around inf

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

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

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

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

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

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

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

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

              \[\leadsto \left(-\frac{x}{B}\right) + \frac{F}{\sin B} \cdot \frac{1}{F} \]
            10. Step-by-step derivation
              1. Applied rewrites85.9%

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

              if 4.6000000000000001e255 < F

              1. Initial program 20.0%

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

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

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

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

                \[\leadsto \frac{1 - x}{B} \]
              7. Step-by-step derivation
                1. Applied rewrites79.4%

                  \[\leadsto \frac{1 - x}{B} \]
              8. Recombined 4 regimes into one program.
              9. Final simplification78.9%

                \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -6 \cdot 10^{+150}:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 4.8 \cdot 10^{+238}:\\ \;\;\;\;\frac{-x}{\tan B} + \frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}{B}\\ \mathbf{elif}\;F \leq 4.6 \cdot 10^{+255}:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \frac{F}{\sin B} \cdot \frac{1}{F}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
              10. Add Preprocessing

              Alternative 7: 56.9% accurate, 2.2× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}\\ \mathbf{if}\;B \leq 4800:\\ \;\;\;\;\frac{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(0.3333333333333333, x, 0.16666666666666666 \cdot t\_0\right), t\_0\right) - x}{B}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B \cdot \left(1 + \left(B \cdot B\right) \cdot \left(0.008333333333333333 \cdot \left(B \cdot B\right) - 0.16666666666666666\right)\right)}\\ \end{array} \end{array} \]
              (FPCore (F B x)
               :precision binary64
               (let* ((t_0 (/ F (sqrt (fma 2.0 x (fma F F 2.0))))))
                 (if (<= B 4800.0)
                   (/
                    (-
                     (fma (* B B) (fma 0.3333333333333333 x (* 0.16666666666666666 t_0)) t_0)
                     x)
                    B)
                   (+
                    (* x (/ -1.0 (tan B)))
                    (/
                     -1.0
                     (*
                      B
                      (+
                       1.0
                       (*
                        (* B B)
                        (- (* 0.008333333333333333 (* B B)) 0.16666666666666666)))))))))
              double code(double F, double B, double x) {
              	double t_0 = F / sqrt(fma(2.0, x, fma(F, F, 2.0)));
              	double tmp;
              	if (B <= 4800.0) {
              		tmp = (fma((B * B), fma(0.3333333333333333, x, (0.16666666666666666 * t_0)), t_0) - x) / B;
              	} else {
              		tmp = (x * (-1.0 / tan(B))) + (-1.0 / (B * (1.0 + ((B * B) * ((0.008333333333333333 * (B * B)) - 0.16666666666666666)))));
              	}
              	return tmp;
              }
              
              function code(F, B, x)
              	t_0 = Float64(F / sqrt(fma(2.0, x, fma(F, F, 2.0))))
              	tmp = 0.0
              	if (B <= 4800.0)
              		tmp = Float64(Float64(fma(Float64(B * B), fma(0.3333333333333333, x, Float64(0.16666666666666666 * t_0)), t_0) - x) / B);
              	else
              		tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / Float64(B * Float64(1.0 + Float64(Float64(B * B) * Float64(Float64(0.008333333333333333 * Float64(B * B)) - 0.16666666666666666))))));
              	end
              	return tmp
              end
              
              code[F_, B_, x_] := Block[{t$95$0 = N[(F / N[Sqrt[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, 4800.0], N[(N[(N[(N[(B * B), $MachinePrecision] * N[(0.3333333333333333 * x + N[(0.16666666666666666 * t$95$0), $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[(B * N[(1.0 + N[(N[(B * B), $MachinePrecision] * N[(N[(0.008333333333333333 * N[(B * B), $MachinePrecision]), $MachinePrecision] - 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              t_0 := \frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}\\
              \mathbf{if}\;B \leq 4800:\\
              \;\;\;\;\frac{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(0.3333333333333333, x, 0.16666666666666666 \cdot t\_0\right), t\_0\right) - x}{B}\\
              
              \mathbf{else}:\\
              \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B \cdot \left(1 + \left(B \cdot B\right) \cdot \left(0.008333333333333333 \cdot \left(B \cdot B\right) - 0.16666666666666666\right)\right)}\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if B < 4800

                1. Initial program 76.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. Add Preprocessing
                3. Step-by-step derivation
                  1. lift-*.f64N/A

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

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

                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\color{blue}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                  4. 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)}} \]
                  5. lift-+.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)} \]
                  6. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if 4800 < B

                1. Initial program 76.4%

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

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

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

                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{\sin B} \]
                5. Applied rewrites53.6%

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

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

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

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

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

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

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

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

                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{B \cdot \left(1 + \left(B \cdot B\right) \cdot \left(\frac{1}{120} \cdot {B}^{2} - \frac{1}{6}\right)\right)} \]
                  8. unpow2N/A

                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{B \cdot \left(1 + \left(B \cdot B\right) \cdot \left(\frac{1}{120} \cdot \left(B \cdot B\right) - \frac{1}{6}\right)\right)} \]
                  9. lower-*.f6447.0

                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{B \cdot \left(1 + \left(B \cdot B\right) \cdot \left(0.008333333333333333 \cdot \left(B \cdot B\right) - 0.16666666666666666\right)\right)} \]
                8. Applied rewrites47.0%

                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{B \cdot \color{blue}{\left(1 + \left(B \cdot B\right) \cdot \left(0.008333333333333333 \cdot \left(B \cdot B\right) - 0.16666666666666666\right)\right)}} \]
              3. Recombined 2 regimes into one program.
              4. Final simplification52.6%

                \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 4800:\\ \;\;\;\;\frac{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(0.3333333333333333, x, 0.16666666666666666 \cdot \frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}\right), \frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}\right) - x}{B}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B \cdot \left(1 + \left(B \cdot B\right) \cdot \left(0.008333333333333333 \cdot \left(B \cdot B\right) - 0.16666666666666666\right)\right)}\\ \end{array} \]
              5. Add Preprocessing

              Alternative 8: 56.7% accurate, 2.5× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}\\ \mathbf{if}\;B \leq 4800:\\ \;\;\;\;\frac{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(0.3333333333333333, x, 0.16666666666666666 \cdot t\_0\right), t\_0\right) - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{-x}{\tan B} + \frac{-1}{\mathsf{fma}\left(B \cdot B, -0.16666666666666666, 1\right) \cdot B}\\ \end{array} \end{array} \]
              (FPCore (F B x)
               :precision binary64
               (let* ((t_0 (/ F (sqrt (fma 2.0 x (fma F F 2.0))))))
                 (if (<= B 4800.0)
                   (/
                    (-
                     (fma (* B B) (fma 0.3333333333333333 x (* 0.16666666666666666 t_0)) t_0)
                     x)
                    B)
                   (+
                    (/ (- x) (tan B))
                    (/ -1.0 (* (fma (* B B) -0.16666666666666666 1.0) B))))))
              double code(double F, double B, double x) {
              	double t_0 = F / sqrt(fma(2.0, x, fma(F, F, 2.0)));
              	double tmp;
              	if (B <= 4800.0) {
              		tmp = (fma((B * B), fma(0.3333333333333333, x, (0.16666666666666666 * t_0)), t_0) - x) / B;
              	} else {
              		tmp = (-x / tan(B)) + (-1.0 / (fma((B * B), -0.16666666666666666, 1.0) * B));
              	}
              	return tmp;
              }
              
              function code(F, B, x)
              	t_0 = Float64(F / sqrt(fma(2.0, x, fma(F, F, 2.0))))
              	tmp = 0.0
              	if (B <= 4800.0)
              		tmp = Float64(Float64(fma(Float64(B * B), fma(0.3333333333333333, x, Float64(0.16666666666666666 * t_0)), t_0) - x) / B);
              	else
              		tmp = Float64(Float64(Float64(-x) / tan(B)) + Float64(-1.0 / Float64(fma(Float64(B * B), -0.16666666666666666, 1.0) * B)));
              	end
              	return tmp
              end
              
              code[F_, B_, x_] := Block[{t$95$0 = N[(F / N[Sqrt[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, 4800.0], N[(N[(N[(N[(B * B), $MachinePrecision] * N[(0.3333333333333333 * x + N[(0.16666666666666666 * t$95$0), $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[(N[(N[(B * B), $MachinePrecision] * -0.16666666666666666 + 1.0), $MachinePrecision] * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              t_0 := \frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}\\
              \mathbf{if}\;B \leq 4800:\\
              \;\;\;\;\frac{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(0.3333333333333333, x, 0.16666666666666666 \cdot t\_0\right), t\_0\right) - x}{B}\\
              
              \mathbf{else}:\\
              \;\;\;\;\frac{-x}{\tan B} + \frac{-1}{\mathsf{fma}\left(B \cdot B, -0.16666666666666666, 1\right) \cdot B}\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if B < 4800

                1. Initial program 76.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. Add Preprocessing
                3. Step-by-step derivation
                  1. lift-*.f64N/A

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

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

                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\color{blue}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                  4. 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)}} \]
                  5. lift-+.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)} \]
                  6. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if 4800 < B

                1. Initial program 76.4%

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

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

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

                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{\sin B} \]
                5. Applied rewrites53.6%

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

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

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

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

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

                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{B \cdot \left(1 + \frac{-1}{6} \cdot \left(B \cdot B\right)\right)} \]
                  5. lower-*.f6446.4

                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{B \cdot \left(1 + -0.16666666666666666 \cdot \left(B \cdot B\right)\right)} \]
                8. Applied rewrites46.4%

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

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

              Alternative 9: 56.0% accurate, 2.7× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}\\ \mathbf{if}\;B \leq 4800:\\ \;\;\;\;\frac{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(0.3333333333333333, x, 0.16666666666666666 \cdot t\_0\right), t\_0\right) - x}{B}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\ \end{array} \end{array} \]
              (FPCore (F B x)
               :precision binary64
               (let* ((t_0 (/ F (sqrt (fma 2.0 x (fma F F 2.0))))))
                 (if (<= B 4800.0)
                   (/
                    (-
                     (fma (* B B) (fma 0.3333333333333333 x (* 0.16666666666666666 t_0)) t_0)
                     x)
                    B)
                   (+ (* x (/ -1.0 (tan B))) (/ -1.0 B)))))
              double code(double F, double B, double x) {
              	double t_0 = F / sqrt(fma(2.0, x, fma(F, F, 2.0)));
              	double tmp;
              	if (B <= 4800.0) {
              		tmp = (fma((B * B), fma(0.3333333333333333, x, (0.16666666666666666 * t_0)), t_0) - x) / B;
              	} else {
              		tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
              	}
              	return tmp;
              }
              
              function code(F, B, x)
              	t_0 = Float64(F / sqrt(fma(2.0, x, fma(F, F, 2.0))))
              	tmp = 0.0
              	if (B <= 4800.0)
              		tmp = Float64(Float64(fma(Float64(B * B), fma(0.3333333333333333, x, Float64(0.16666666666666666 * t_0)), t_0) - x) / B);
              	else
              		tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B));
              	end
              	return tmp
              end
              
              code[F_, B_, x_] := Block[{t$95$0 = N[(F / N[Sqrt[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, 4800.0], N[(N[(N[(N[(B * B), $MachinePrecision] * N[(0.3333333333333333 * x + N[(0.16666666666666666 * t$95$0), $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              t_0 := \frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}\\
              \mathbf{if}\;B \leq 4800:\\
              \;\;\;\;\frac{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(0.3333333333333333, x, 0.16666666666666666 \cdot t\_0\right), t\_0\right) - x}{B}\\
              
              \mathbf{else}:\\
              \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if B < 4800

                1. Initial program 76.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. Add Preprocessing
                3. Step-by-step derivation
                  1. lift-*.f64N/A

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

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

                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\color{blue}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                  4. 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)}} \]
                  5. lift-+.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)} \]
                  6. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if 4800 < B

                1. Initial program 76.4%

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

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

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

                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{\sin B} \]
                5. Applied rewrites53.6%

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

                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{B} \]
                7. Step-by-step derivation
                  1. Applied rewrites44.9%

                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{B} \]
                8. Recombined 2 regimes into one program.
                9. Final simplification52.1%

                  \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 4800:\\ \;\;\;\;\frac{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(0.3333333333333333, x, 0.16666666666666666 \cdot \frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}\right), \frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}\right) - x}{B}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\ \end{array} \]
                10. Add Preprocessing

                Alternative 10: 58.2% accurate, 2.7× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}\\ \mathbf{if}\;F \leq -7000000:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 280000000000:\\ \;\;\;\;\frac{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(0.3333333333333333, x, 0.16666666666666666 \cdot t\_0\right), t\_0\right) - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
                (FPCore (F B x)
                 :precision binary64
                 (let* ((t_0 (/ F (sqrt (fma 2.0 x (fma F F 2.0))))))
                   (if (<= F -7000000.0)
                     (+ (- (/ x B)) (/ -1.0 (sin B)))
                     (if (<= F 280000000000.0)
                       (/
                        (-
                         (fma
                          (* B B)
                          (fma 0.3333333333333333 x (* 0.16666666666666666 t_0))
                          t_0)
                         x)
                        B)
                       (/ (- 1.0 x) B)))))
                double code(double F, double B, double x) {
                	double t_0 = F / sqrt(fma(2.0, x, fma(F, F, 2.0)));
                	double tmp;
                	if (F <= -7000000.0) {
                		tmp = -(x / B) + (-1.0 / sin(B));
                	} else if (F <= 280000000000.0) {
                		tmp = (fma((B * B), fma(0.3333333333333333, x, (0.16666666666666666 * t_0)), t_0) - x) / B;
                	} else {
                		tmp = (1.0 - x) / B;
                	}
                	return tmp;
                }
                
                function code(F, B, x)
                	t_0 = Float64(F / sqrt(fma(2.0, x, fma(F, F, 2.0))))
                	tmp = 0.0
                	if (F <= -7000000.0)
                		tmp = Float64(Float64(-Float64(x / B)) + Float64(-1.0 / sin(B)));
                	elseif (F <= 280000000000.0)
                		tmp = Float64(Float64(fma(Float64(B * B), fma(0.3333333333333333, x, Float64(0.16666666666666666 * t_0)), t_0) - x) / B);
                	else
                		tmp = Float64(Float64(1.0 - x) / B);
                	end
                	return tmp
                end
                
                code[F_, B_, x_] := Block[{t$95$0 = N[(F / N[Sqrt[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -7000000.0], N[((-N[(x / B), $MachinePrecision]) + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 280000000000.0], N[(N[(N[(N[(B * B), $MachinePrecision] * N[(0.3333333333333333 * x + N[(0.16666666666666666 * t$95$0), $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                t_0 := \frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}\\
                \mathbf{if}\;F \leq -7000000:\\
                \;\;\;\;\left(-\frac{x}{B}\right) + \frac{-1}{\sin B}\\
                
                \mathbf{elif}\;F \leq 280000000000:\\
                \;\;\;\;\frac{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(0.3333333333333333, x, 0.16666666666666666 \cdot t\_0\right), t\_0\right) - x}{B}\\
                
                \mathbf{else}:\\
                \;\;\;\;\frac{1 - x}{B}\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 3 regimes
                2. if F < -7e6

                  1. Initial program 49.7%

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

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

                      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{\color{blue}{\sin B}} \]
                    2. lift-sin.f6499.8

                      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{\sin B} \]
                  5. Applied rewrites99.8%

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

                    \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{-1}{\sin B} \]
                  7. Step-by-step derivation
                    1. lower-/.f6485.8

                      \[\leadsto \left(-\frac{x}{\color{blue}{B}}\right) + \frac{-1}{\sin B} \]
                  8. Applied rewrites85.8%

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

                  if -7e6 < F < 2.8e11

                  1. Initial program 99.3%

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

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

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

                      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\color{blue}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                    4. 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)}} \]
                    5. lift-+.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)} \]
                    6. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  if 2.8e11 < F

                  1. Initial program 53.9%

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

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

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

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

                    \[\leadsto \frac{1 - x}{B} \]
                  7. Step-by-step derivation
                    1. Applied rewrites45.4%

                      \[\leadsto \frac{1 - x}{B} \]
                  8. Recombined 3 regimes into one program.
                  9. Final simplification56.2%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -7000000:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 280000000000:\\ \;\;\;\;\frac{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(0.3333333333333333, x, 0.16666666666666666 \cdot \frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}\right), \frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}\right) - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
                  10. Add Preprocessing

                  Alternative 11: 51.9% accurate, 3.2× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}\\ \mathbf{if}\;F \leq -115000000:\\ \;\;\;\;\left(-x\right) \cdot \frac{\mathsf{fma}\left(-0.3333333333333333, B \cdot B, 1\right)}{B} + \frac{-1}{B \cdot \left(1 + -0.16666666666666666 \cdot \left(B \cdot B\right)\right)}\\ \mathbf{elif}\;F \leq 280000000000:\\ \;\;\;\;\frac{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(0.3333333333333333, x, 0.16666666666666666 \cdot t\_0\right), t\_0\right) - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
                  (FPCore (F B x)
                   :precision binary64
                   (let* ((t_0 (/ F (sqrt (fma 2.0 x (fma F F 2.0))))))
                     (if (<= F -115000000.0)
                       (+
                        (* (- x) (/ (fma -0.3333333333333333 (* B B) 1.0) B))
                        (/ -1.0 (* B (+ 1.0 (* -0.16666666666666666 (* B B))))))
                       (if (<= F 280000000000.0)
                         (/
                          (-
                           (fma
                            (* B B)
                            (fma 0.3333333333333333 x (* 0.16666666666666666 t_0))
                            t_0)
                           x)
                          B)
                         (/ (- 1.0 x) B)))))
                  double code(double F, double B, double x) {
                  	double t_0 = F / sqrt(fma(2.0, x, fma(F, F, 2.0)));
                  	double tmp;
                  	if (F <= -115000000.0) {
                  		tmp = (-x * (fma(-0.3333333333333333, (B * B), 1.0) / B)) + (-1.0 / (B * (1.0 + (-0.16666666666666666 * (B * B)))));
                  	} else if (F <= 280000000000.0) {
                  		tmp = (fma((B * B), fma(0.3333333333333333, x, (0.16666666666666666 * t_0)), t_0) - x) / B;
                  	} else {
                  		tmp = (1.0 - x) / B;
                  	}
                  	return tmp;
                  }
                  
                  function code(F, B, x)
                  	t_0 = Float64(F / sqrt(fma(2.0, x, fma(F, F, 2.0))))
                  	tmp = 0.0
                  	if (F <= -115000000.0)
                  		tmp = Float64(Float64(Float64(-x) * Float64(fma(-0.3333333333333333, Float64(B * B), 1.0) / B)) + Float64(-1.0 / Float64(B * Float64(1.0 + Float64(-0.16666666666666666 * Float64(B * B))))));
                  	elseif (F <= 280000000000.0)
                  		tmp = Float64(Float64(fma(Float64(B * B), fma(0.3333333333333333, x, Float64(0.16666666666666666 * t_0)), t_0) - x) / B);
                  	else
                  		tmp = Float64(Float64(1.0 - x) / B);
                  	end
                  	return tmp
                  end
                  
                  code[F_, B_, x_] := Block[{t$95$0 = N[(F / N[Sqrt[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -115000000.0], N[(N[((-x) * N[(N[(-0.3333333333333333 * N[(B * B), $MachinePrecision] + 1.0), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[(B * N[(1.0 + N[(-0.16666666666666666 * N[(B * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 280000000000.0], N[(N[(N[(N[(B * B), $MachinePrecision] * N[(0.3333333333333333 * x + N[(0.16666666666666666 * t$95$0), $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  t_0 := \frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}\\
                  \mathbf{if}\;F \leq -115000000:\\
                  \;\;\;\;\left(-x\right) \cdot \frac{\mathsf{fma}\left(-0.3333333333333333, B \cdot B, 1\right)}{B} + \frac{-1}{B \cdot \left(1 + -0.16666666666666666 \cdot \left(B \cdot B\right)\right)}\\
                  
                  \mathbf{elif}\;F \leq 280000000000:\\
                  \;\;\;\;\frac{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(0.3333333333333333, x, 0.16666666666666666 \cdot t\_0\right), t\_0\right) - x}{B}\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\frac{1 - x}{B}\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 3 regimes
                  2. if F < -1.15e8

                    1. Initial program 49.7%

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

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

                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{\color{blue}{\sin B}} \]
                      2. lift-sin.f6499.8

                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{\sin B} \]
                    5. Applied rewrites99.8%

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

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

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

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

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

                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{B \cdot \left(1 + \frac{-1}{6} \cdot \left(B \cdot B\right)\right)} \]
                      5. lower-*.f6473.8

                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{B \cdot \left(1 + -0.16666666666666666 \cdot \left(B \cdot B\right)\right)} \]
                    8. Applied rewrites73.8%

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

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

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

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

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

                        \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\frac{-1}{3}, B \cdot B, 1\right)}{B}\right) + \frac{-1}{B \cdot \left(1 + \frac{-1}{6} \cdot \left(B \cdot B\right)\right)} \]
                      5. lift-*.f6462.5

                        \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(-0.3333333333333333, B \cdot B, 1\right)}{B}\right) + \frac{-1}{B \cdot \left(1 + -0.16666666666666666 \cdot \left(B \cdot B\right)\right)} \]
                    11. Applied rewrites62.5%

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

                    if -1.15e8 < F < 2.8e11

                    1. Initial program 99.3%

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

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

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

                        \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\color{blue}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                      4. 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)}} \]
                      5. lift-+.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)} \]
                      6. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if 2.8e11 < F

                    1. Initial program 53.9%

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

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

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

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

                      \[\leadsto \frac{1 - x}{B} \]
                    7. Step-by-step derivation
                      1. Applied rewrites45.4%

                        \[\leadsto \frac{1 - x}{B} \]
                    8. Recombined 3 regimes into one program.
                    9. Final simplification51.3%

                      \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -115000000:\\ \;\;\;\;\left(-x\right) \cdot \frac{\mathsf{fma}\left(-0.3333333333333333, B \cdot B, 1\right)}{B} + \frac{-1}{B \cdot \left(1 + -0.16666666666666666 \cdot \left(B \cdot B\right)\right)}\\ \mathbf{elif}\;F \leq 280000000000:\\ \;\;\;\;\frac{\mathsf{fma}\left(B \cdot B, \mathsf{fma}\left(0.3333333333333333, x, 0.16666666666666666 \cdot \frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}\right), \frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}\right) - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
                    10. Add Preprocessing

                    Alternative 12: 51.8% accurate, 5.4× speedup?

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

                      1. Initial program 34.0%

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

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

                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{\color{blue}{\sin B}} \]
                        2. lift-sin.f6499.7

                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{\sin B} \]
                      5. Applied rewrites99.7%

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

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

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

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

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

                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{B \cdot \left(1 + \frac{-1}{6} \cdot \left(B \cdot B\right)\right)} \]
                        5. lower-*.f6467.8

                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{B \cdot \left(1 + -0.16666666666666666 \cdot \left(B \cdot B\right)\right)} \]
                      8. Applied rewrites67.8%

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

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

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

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

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

                          \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(\frac{-1}{3}, B \cdot B, 1\right)}{B}\right) + \frac{-1}{B \cdot \left(1 + \frac{-1}{6} \cdot \left(B \cdot B\right)\right)} \]
                        5. lift-*.f6455.4

                          \[\leadsto \left(-x \cdot \frac{\mathsf{fma}\left(-0.3333333333333333, B \cdot B, 1\right)}{B}\right) + \frac{-1}{B \cdot \left(1 + -0.16666666666666666 \cdot \left(B \cdot B\right)\right)} \]
                      11. Applied rewrites55.4%

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

                      if -5.80000000000000032e118 < F < 3.2499999999999998e-6

                      1. Initial program 99.3%

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

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

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

                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\color{blue}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                        4. 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)}} \]
                        5. lift-+.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)} \]
                        6. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      if 3.2499999999999998e-6 < F

                      1. Initial program 56.3%

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

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

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

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

                        \[\leadsto \frac{-1 \cdot x}{B} \]
                      7. Step-by-step derivation
                        1. mul-1-negN/A

                          \[\leadsto \frac{\mathsf{neg}\left(x\right)}{B} \]
                        2. lower-neg.f6428.0

                          \[\leadsto \frac{-x}{B} \]
                      8. Applied rewrites28.0%

                        \[\leadsto \frac{-x}{B} \]
                      9. Taylor expanded in F around inf

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

                          \[\leadsto \frac{\left(1 + \frac{-1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}}\right) - x}{B} \]
                      11. Applied rewrites45.7%

                        \[\leadsto \frac{\mathsf{fma}\left(\frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, -0.5, 1\right) - x}{B} \]
                    3. Recombined 3 regimes into one program.
                    4. Final simplification50.6%

                      \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -5.8 \cdot 10^{+118}:\\ \;\;\;\;\left(-x\right) \cdot \frac{\mathsf{fma}\left(-0.3333333333333333, B \cdot B, 1\right)}{B} + \frac{-1}{B \cdot \left(1 + -0.16666666666666666 \cdot \left(B \cdot B\right)\right)}\\ \mathbf{elif}\;F \leq 3.25 \cdot 10^{-6}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, -0.5, 1\right) - x}{B}\\ \end{array} \]
                    5. Add Preprocessing

                    Alternative 13: 51.8% accurate, 6.1× speedup?

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

                      1. Initial program 30.7%

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

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

                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{\color{blue}{\sin B}} \]
                        2. lift-sin.f6499.7

                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{\sin B} \]
                      5. Applied rewrites99.7%

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

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

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

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

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

                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{B \cdot \left(1 + \frac{-1}{6} \cdot \left(B \cdot B\right)\right)} \]
                        5. lower-*.f6468.8

                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{B \cdot \left(1 + -0.16666666666666666 \cdot \left(B \cdot B\right)\right)} \]
                      8. Applied rewrites68.8%

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

                        \[\leadsto \left(-x \cdot \frac{1}{\color{blue}{B}}\right) + \frac{-1}{B \cdot \left(1 + \frac{-1}{6} \cdot \left(B \cdot B\right)\right)} \]
                      10. Step-by-step derivation
                        1. Applied rewrites54.6%

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

                        if -7.39999999999999959e127 < F < 3.2499999999999998e-6

                        1. Initial program 99.3%

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

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

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

                            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\color{blue}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                          4. 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)}} \]
                          5. lift-+.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)} \]
                          6. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        if 3.2499999999999998e-6 < F

                        1. Initial program 56.3%

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

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

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

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

                          \[\leadsto \frac{-1 \cdot x}{B} \]
                        7. Step-by-step derivation
                          1. mul-1-negN/A

                            \[\leadsto \frac{\mathsf{neg}\left(x\right)}{B} \]
                          2. lower-neg.f6428.0

                            \[\leadsto \frac{-x}{B} \]
                        8. Applied rewrites28.0%

                          \[\leadsto \frac{-x}{B} \]
                        9. Taylor expanded in F around inf

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

                            \[\leadsto \frac{\left(1 + \frac{-1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}}\right) - x}{B} \]
                        11. Applied rewrites45.7%

                          \[\leadsto \frac{\mathsf{fma}\left(\frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, -0.5, 1\right) - x}{B} \]
                      11. Recombined 3 regimes into one program.
                      12. Final simplification50.4%

                        \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -7.4 \cdot 10^{+127}:\\ \;\;\;\;x \cdot \frac{-1}{B} + \frac{-1}{B \cdot \left(1 + -0.16666666666666666 \cdot \left(B \cdot B\right)\right)}\\ \mathbf{elif}\;F \leq 3.25 \cdot 10^{-6}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, -0.5, 1\right) - x}{B}\\ \end{array} \]
                      13. Add Preprocessing

                      Alternative 14: 51.8% accurate, 6.1× speedup?

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

                        1. Initial program 13.0%

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

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

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

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

                          \[\leadsto \frac{-1 - x}{B} \]
                        7. Step-by-step derivation
                          1. Applied rewrites64.7%

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

                          if -1.00000000000000004e154 < F < 3.2499999999999998e-6

                          1. Initial program 99.3%

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

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

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

                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\color{blue}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                            4. 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)}} \]
                            5. lift-+.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)} \]
                            6. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \color{blue}{\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}} \]

                          if 3.2499999999999998e-6 < F

                          1. Initial program 56.3%

                            \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                          2. Add Preprocessing
                          3. Taylor expanded in B around 0

                            \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                          4. Step-by-step derivation
                            1. lower-/.f64N/A

                              \[\leadsto \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{\color{blue}{B}} \]
                          5. Applied rewrites31.7%

                            \[\leadsto \color{blue}{\frac{\sqrt{{\left(\mathsf{fma}\left(2, x, F \cdot F\right) + 2\right)}^{-1}} \cdot F - x}{B}} \]
                          6. Taylor expanded in F around 0

                            \[\leadsto \frac{-1 \cdot x}{B} \]
                          7. Step-by-step derivation
                            1. mul-1-negN/A

                              \[\leadsto \frac{\mathsf{neg}\left(x\right)}{B} \]
                            2. lower-neg.f6428.0

                              \[\leadsto \frac{-x}{B} \]
                          8. Applied rewrites28.0%

                            \[\leadsto \frac{-x}{B} \]
                          9. Taylor expanded in F around inf

                            \[\leadsto \frac{\left(1 + \frac{-1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}}\right) - x}{B} \]
                          10. Step-by-step derivation
                            1. lower--.f64N/A

                              \[\leadsto \frac{\left(1 + \frac{-1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}}\right) - x}{B} \]
                          11. Applied rewrites45.7%

                            \[\leadsto \frac{\mathsf{fma}\left(\frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, -0.5, 1\right) - x}{B} \]
                        8. Recombined 3 regimes into one program.
                        9. Final simplification50.4%

                          \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1 \cdot 10^{+154}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 3.25 \cdot 10^{-6}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, -0.5, 1\right) - x}{B}\\ \end{array} \]
                        10. Add Preprocessing

                        Alternative 15: 51.7% accurate, 6.2× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -2 \cdot 10^{+64}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 3.25 \cdot 10^{-6}:\\ \;\;\;\;\frac{F \cdot \frac{1}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, -0.5, 1\right) - x}{B}\\ \end{array} \end{array} \]
                        (FPCore (F B x)
                         :precision binary64
                         (if (<= F -2e+64)
                           (/ (- -1.0 x) B)
                           (if (<= F 3.25e-6)
                             (/ (- (* F (/ 1.0 (sqrt (fma F F 2.0)))) x) B)
                             (/ (- (fma (/ (fma 2.0 x 2.0) (* F F)) -0.5 1.0) x) B))))
                        double code(double F, double B, double x) {
                        	double tmp;
                        	if (F <= -2e+64) {
                        		tmp = (-1.0 - x) / B;
                        	} else if (F <= 3.25e-6) {
                        		tmp = ((F * (1.0 / sqrt(fma(F, F, 2.0)))) - x) / B;
                        	} else {
                        		tmp = (fma((fma(2.0, x, 2.0) / (F * F)), -0.5, 1.0) - x) / B;
                        	}
                        	return tmp;
                        }
                        
                        function code(F, B, x)
                        	tmp = 0.0
                        	if (F <= -2e+64)
                        		tmp = Float64(Float64(-1.0 - x) / B);
                        	elseif (F <= 3.25e-6)
                        		tmp = Float64(Float64(Float64(F * Float64(1.0 / sqrt(fma(F, F, 2.0)))) - x) / B);
                        	else
                        		tmp = Float64(Float64(fma(Float64(fma(2.0, x, 2.0) / Float64(F * F)), -0.5, 1.0) - x) / B);
                        	end
                        	return tmp
                        end
                        
                        code[F_, B_, x_] := If[LessEqual[F, -2e+64], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 3.25e-6], N[(N[(N[(F * N[(1.0 / N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(N[(N[(N[(2.0 * x + 2.0), $MachinePrecision] / N[(F * F), $MachinePrecision]), $MachinePrecision] * -0.5 + 1.0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]]]
                        
                        \begin{array}{l}
                        
                        \\
                        \begin{array}{l}
                        \mathbf{if}\;F \leq -2 \cdot 10^{+64}:\\
                        \;\;\;\;\frac{-1 - x}{B}\\
                        
                        \mathbf{elif}\;F \leq 3.25 \cdot 10^{-6}:\\
                        \;\;\;\;\frac{F \cdot \frac{1}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}} - x}{B}\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;\frac{\mathsf{fma}\left(\frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, -0.5, 1\right) - x}{B}\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 3 regimes
                        2. if F < -2.00000000000000004e64

                          1. Initial program 43.6%

                            \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                          2. Add Preprocessing
                          3. Taylor expanded in B around 0

                            \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                          4. Step-by-step derivation
                            1. lower-/.f64N/A

                              \[\leadsto \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{\color{blue}{B}} \]
                          5. Applied rewrites33.5%

                            \[\leadsto \color{blue}{\frac{\sqrt{{\left(\mathsf{fma}\left(2, x, F \cdot F\right) + 2\right)}^{-1}} \cdot F - x}{B}} \]
                          6. Taylor expanded in F around -inf

                            \[\leadsto \frac{-1 - x}{B} \]
                          7. Step-by-step derivation
                            1. Applied rewrites59.0%

                              \[\leadsto \frac{-1 - x}{B} \]

                            if -2.00000000000000004e64 < F < 3.2499999999999998e-6

                            1. Initial program 99.3%

                              \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                            2. Add Preprocessing
                            3. Step-by-step derivation
                              1. lift-*.f64N/A

                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
                              2. lift-/.f64N/A

                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                              3. lift-sin.f64N/A

                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\color{blue}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                              4. 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)}} \]
                              5. lift-+.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)} \]
                              6. lift-+.f64N/A

                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\color{blue}{\left(F \cdot F + 2\right)} + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                              7. lift-*.f64N/A

                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(\color{blue}{F \cdot F} + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                              8. lift-*.f64N/A

                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + \color{blue}{2 \cdot x}\right)}^{\left(-\frac{1}{2}\right)} \]
                              9. lift-neg.f64N/A

                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}} \]
                              10. lift-/.f64N/A

                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)\right)} \]
                              11. associate-*l/N/A

                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B}} \]
                              12. lower-/.f64N/A

                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B}} \]
                            4. Applied rewrites99.3%

                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F \cdot {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B}} \]
                            5. Taylor expanded in B around 0

                              \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                            6. Step-by-step derivation
                              1. lower-/.f64N/A

                                \[\leadsto \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{\color{blue}{B}} \]
                            7. Applied rewrites49.9%

                              \[\leadsto \color{blue}{\frac{F \cdot \frac{1}{\sqrt{2 + \mathsf{fma}\left(2, x, F \cdot F\right)}} - x}{B}} \]
                            8. Taylor expanded in x around 0

                              \[\leadsto \frac{F \cdot \frac{1}{\sqrt{2 + {F}^{2}}} - x}{B} \]
                            9. Step-by-step derivation
                              1. lower-sqrt.f64N/A

                                \[\leadsto \frac{F \cdot \frac{1}{\sqrt{2 + {F}^{2}}} - x}{B} \]
                              2. +-commutativeN/A

                                \[\leadsto \frac{F \cdot \frac{1}{\sqrt{{F}^{2} + 2}} - x}{B} \]
                              3. pow2N/A

                                \[\leadsto \frac{F \cdot \frac{1}{\sqrt{F \cdot F + 2}} - x}{B} \]
                              4. lift-fma.f6449.9

                                \[\leadsto \frac{F \cdot \frac{1}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}} - x}{B} \]
                            10. Applied rewrites49.9%

                              \[\leadsto \frac{F \cdot \frac{1}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}} - x}{B} \]

                            if 3.2499999999999998e-6 < F

                            1. Initial program 56.3%

                              \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                            2. Add Preprocessing
                            3. Taylor expanded in B around 0

                              \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                            4. Step-by-step derivation
                              1. lower-/.f64N/A

                                \[\leadsto \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{\color{blue}{B}} \]
                            5. Applied rewrites31.7%

                              \[\leadsto \color{blue}{\frac{\sqrt{{\left(\mathsf{fma}\left(2, x, F \cdot F\right) + 2\right)}^{-1}} \cdot F - x}{B}} \]
                            6. Taylor expanded in F around 0

                              \[\leadsto \frac{-1 \cdot x}{B} \]
                            7. Step-by-step derivation
                              1. mul-1-negN/A

                                \[\leadsto \frac{\mathsf{neg}\left(x\right)}{B} \]
                              2. lower-neg.f6428.0

                                \[\leadsto \frac{-x}{B} \]
                            8. Applied rewrites28.0%

                              \[\leadsto \frac{-x}{B} \]
                            9. Taylor expanded in F around inf

                              \[\leadsto \frac{\left(1 + \frac{-1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}}\right) - x}{B} \]
                            10. Step-by-step derivation
                              1. lower--.f64N/A

                                \[\leadsto \frac{\left(1 + \frac{-1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}}\right) - x}{B} \]
                            11. Applied rewrites45.7%

                              \[\leadsto \frac{\mathsf{fma}\left(\frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, -0.5, 1\right) - x}{B} \]
                          8. Recombined 3 regimes into one program.
                          9. Final simplification50.4%

                            \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -2 \cdot 10^{+64}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 3.25 \cdot 10^{-6}:\\ \;\;\;\;\frac{F \cdot \frac{1}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, -0.5, 1\right) - x}{B}\\ \end{array} \]
                          10. Add Preprocessing

                          Alternative 16: 51.7% accurate, 6.2× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}\\ \mathbf{if}\;F \leq -38:\\ \;\;\;\;\frac{\left(t\_0 \cdot 0.5 - 1\right) - x}{B}\\ \mathbf{elif}\;F \leq 3.25 \cdot 10^{-6}:\\ \;\;\;\;\frac{F \cdot \frac{1}{\sqrt{\mathsf{fma}\left(2, x, 2\right)}} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(t\_0, -0.5, 1\right) - x}{B}\\ \end{array} \end{array} \]
                          (FPCore (F B x)
                           :precision binary64
                           (let* ((t_0 (/ (fma 2.0 x 2.0) (* F F))))
                             (if (<= F -38.0)
                               (/ (- (- (* t_0 0.5) 1.0) x) B)
                               (if (<= F 3.25e-6)
                                 (/ (- (* F (/ 1.0 (sqrt (fma 2.0 x 2.0)))) x) B)
                                 (/ (- (fma t_0 -0.5 1.0) x) B)))))
                          double code(double F, double B, double x) {
                          	double t_0 = fma(2.0, x, 2.0) / (F * F);
                          	double tmp;
                          	if (F <= -38.0) {
                          		tmp = (((t_0 * 0.5) - 1.0) - x) / B;
                          	} else if (F <= 3.25e-6) {
                          		tmp = ((F * (1.0 / sqrt(fma(2.0, x, 2.0)))) - x) / B;
                          	} else {
                          		tmp = (fma(t_0, -0.5, 1.0) - x) / B;
                          	}
                          	return tmp;
                          }
                          
                          function code(F, B, x)
                          	t_0 = Float64(fma(2.0, x, 2.0) / Float64(F * F))
                          	tmp = 0.0
                          	if (F <= -38.0)
                          		tmp = Float64(Float64(Float64(Float64(t_0 * 0.5) - 1.0) - x) / B);
                          	elseif (F <= 3.25e-6)
                          		tmp = Float64(Float64(Float64(F * Float64(1.0 / sqrt(fma(2.0, x, 2.0)))) - x) / B);
                          	else
                          		tmp = Float64(Float64(fma(t_0, -0.5, 1.0) - x) / B);
                          	end
                          	return tmp
                          end
                          
                          code[F_, B_, x_] := Block[{t$95$0 = N[(N[(2.0 * x + 2.0), $MachinePrecision] / N[(F * F), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -38.0], N[(N[(N[(N[(t$95$0 * 0.5), $MachinePrecision] - 1.0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 3.25e-6], N[(N[(N[(F * N[(1.0 / N[Sqrt[N[(2.0 * x + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(N[(t$95$0 * -0.5 + 1.0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]]]]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          t_0 := \frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}\\
                          \mathbf{if}\;F \leq -38:\\
                          \;\;\;\;\frac{\left(t\_0 \cdot 0.5 - 1\right) - x}{B}\\
                          
                          \mathbf{elif}\;F \leq 3.25 \cdot 10^{-6}:\\
                          \;\;\;\;\frac{F \cdot \frac{1}{\sqrt{\mathsf{fma}\left(2, x, 2\right)}} - x}{B}\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;\frac{\mathsf{fma}\left(t\_0, -0.5, 1\right) - x}{B}\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 3 regimes
                          2. if F < -38

                            1. Initial program 51.5%

                              \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                            2. Add Preprocessing
                            3. Taylor expanded in B around 0

                              \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                            4. Step-by-step derivation
                              1. lower-/.f64N/A

                                \[\leadsto \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{\color{blue}{B}} \]
                            5. Applied rewrites41.3%

                              \[\leadsto \color{blue}{\frac{\sqrt{{\left(\mathsf{fma}\left(2, x, F \cdot F\right) + 2\right)}^{-1}} \cdot F - x}{B}} \]
                            6. Taylor expanded in F around 0

                              \[\leadsto \frac{-1 \cdot x}{B} \]
                            7. Step-by-step derivation
                              1. mul-1-negN/A

                                \[\leadsto \frac{\mathsf{neg}\left(x\right)}{B} \]
                              2. lower-neg.f6425.8

                                \[\leadsto \frac{-x}{B} \]
                            8. Applied rewrites25.8%

                              \[\leadsto \frac{-x}{B} \]
                            9. Taylor expanded in F around -inf

                              \[\leadsto \frac{\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}} - \left(1 + x\right)}{B} \]
                            10. Step-by-step derivation
                              1. metadata-evalN/A

                                \[\leadsto \frac{\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}} - \left(1 + x\right)}{B} \]
                              2. associate--r+N/A

                                \[\leadsto \frac{\left(\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}} - 1\right) - x}{B} \]
                              3. lower--.f64N/A

                                \[\leadsto \frac{\left(\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}} - 1\right) - x}{B} \]
                            11. Applied rewrites62.5%

                              \[\leadsto \frac{\left(\frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F} \cdot 0.5 - 1\right) - x}{B} \]

                            if -38 < F < 3.2499999999999998e-6

                            1. Initial program 99.3%

                              \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                            2. Add Preprocessing
                            3. Step-by-step derivation
                              1. lift-*.f64N/A

                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
                              2. lift-/.f64N/A

                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                              3. lift-sin.f64N/A

                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\color{blue}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                              4. 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)}} \]
                              5. lift-+.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)} \]
                              6. lift-+.f64N/A

                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\color{blue}{\left(F \cdot F + 2\right)} + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                              7. lift-*.f64N/A

                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(\color{blue}{F \cdot F} + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                              8. lift-*.f64N/A

                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + \color{blue}{2 \cdot x}\right)}^{\left(-\frac{1}{2}\right)} \]
                              9. lift-neg.f64N/A

                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}} \]
                              10. lift-/.f64N/A

                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)\right)} \]
                              11. associate-*l/N/A

                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B}} \]
                              12. lower-/.f64N/A

                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B}} \]
                            4. Applied rewrites99.3%

                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F \cdot {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B}} \]
                            5. Taylor expanded in B around 0

                              \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                            6. Step-by-step derivation
                              1. lower-/.f64N/A

                                \[\leadsto \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{\color{blue}{B}} \]
                            7. Applied rewrites47.5%

                              \[\leadsto \color{blue}{\frac{F \cdot \frac{1}{\sqrt{2 + \mathsf{fma}\left(2, x, F \cdot F\right)}} - x}{B}} \]
                            8. Taylor expanded in F around 0

                              \[\leadsto \frac{F \cdot \frac{1}{\sqrt{2 + 2 \cdot x}} - x}{B} \]
                            9. Step-by-step derivation
                              1. lower-sqrt.f64N/A

                                \[\leadsto \frac{F \cdot \frac{1}{\sqrt{2 + 2 \cdot x}} - x}{B} \]
                              2. +-commutativeN/A

                                \[\leadsto \frac{F \cdot \frac{1}{\sqrt{2 \cdot x + 2}} - x}{B} \]
                              3. lower-fma.f6447.5

                                \[\leadsto \frac{F \cdot \frac{1}{\sqrt{\mathsf{fma}\left(2, x, 2\right)}} - x}{B} \]
                            10. Applied rewrites47.5%

                              \[\leadsto \frac{F \cdot \frac{1}{\sqrt{\mathsf{fma}\left(2, x, 2\right)}} - x}{B} \]

                            if 3.2499999999999998e-6 < F

                            1. Initial program 56.3%

                              \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                            2. Add Preprocessing
                            3. Taylor expanded in B around 0

                              \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                            4. Step-by-step derivation
                              1. lower-/.f64N/A

                                \[\leadsto \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{\color{blue}{B}} \]
                            5. Applied rewrites31.7%

                              \[\leadsto \color{blue}{\frac{\sqrt{{\left(\mathsf{fma}\left(2, x, F \cdot F\right) + 2\right)}^{-1}} \cdot F - x}{B}} \]
                            6. Taylor expanded in F around 0

                              \[\leadsto \frac{-1 \cdot x}{B} \]
                            7. Step-by-step derivation
                              1. mul-1-negN/A

                                \[\leadsto \frac{\mathsf{neg}\left(x\right)}{B} \]
                              2. lower-neg.f6428.0

                                \[\leadsto \frac{-x}{B} \]
                            8. Applied rewrites28.0%

                              \[\leadsto \frac{-x}{B} \]
                            9. Taylor expanded in F around inf

                              \[\leadsto \frac{\left(1 + \frac{-1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}}\right) - x}{B} \]
                            10. Step-by-step derivation
                              1. lower--.f64N/A

                                \[\leadsto \frac{\left(1 + \frac{-1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}}\right) - x}{B} \]
                            11. Applied rewrites45.7%

                              \[\leadsto \frac{\mathsf{fma}\left(\frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, -0.5, 1\right) - x}{B} \]
                          3. Recombined 3 regimes into one program.
                          4. Final simplification50.2%

                            \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -38:\\ \;\;\;\;\frac{\left(\frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F} \cdot 0.5 - 1\right) - x}{B}\\ \mathbf{elif}\;F \leq 3.25 \cdot 10^{-6}:\\ \;\;\;\;\frac{F \cdot \frac{1}{\sqrt{\mathsf{fma}\left(2, x, 2\right)}} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F}, -0.5, 1\right) - x}{B}\\ \end{array} \]
                          5. Add Preprocessing

                          Alternative 17: 44.5% accurate, 7.2× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -4.7:\\ \;\;\;\;\frac{\left(\frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F} \cdot 0.5 - 1\right) - x}{B}\\ \mathbf{elif}\;F \leq 10^{-66}:\\ \;\;\;\;-\frac{\mathsf{fma}\left(x \cdot -0.3333333333333333, B \cdot B, x\right)}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
                          (FPCore (F B x)
                           :precision binary64
                           (if (<= F -4.7)
                             (/ (- (- (* (/ (fma 2.0 x 2.0) (* F F)) 0.5) 1.0) x) B)
                             (if (<= F 1e-66)
                               (- (/ (fma (* x -0.3333333333333333) (* B B) x) B))
                               (/ (- 1.0 x) B))))
                          double code(double F, double B, double x) {
                          	double tmp;
                          	if (F <= -4.7) {
                          		tmp = ((((fma(2.0, x, 2.0) / (F * F)) * 0.5) - 1.0) - x) / B;
                          	} else if (F <= 1e-66) {
                          		tmp = -(fma((x * -0.3333333333333333), (B * B), x) / B);
                          	} else {
                          		tmp = (1.0 - x) / B;
                          	}
                          	return tmp;
                          }
                          
                          function code(F, B, x)
                          	tmp = 0.0
                          	if (F <= -4.7)
                          		tmp = Float64(Float64(Float64(Float64(Float64(fma(2.0, x, 2.0) / Float64(F * F)) * 0.5) - 1.0) - x) / B);
                          	elseif (F <= 1e-66)
                          		tmp = Float64(-Float64(fma(Float64(x * -0.3333333333333333), Float64(B * B), x) / B));
                          	else
                          		tmp = Float64(Float64(1.0 - x) / B);
                          	end
                          	return tmp
                          end
                          
                          code[F_, B_, x_] := If[LessEqual[F, -4.7], N[(N[(N[(N[(N[(N[(2.0 * x + 2.0), $MachinePrecision] / N[(F * F), $MachinePrecision]), $MachinePrecision] * 0.5), $MachinePrecision] - 1.0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1e-66], (-N[(N[(N[(x * -0.3333333333333333), $MachinePrecision] * N[(B * B), $MachinePrecision] + x), $MachinePrecision] / B), $MachinePrecision]), N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          \mathbf{if}\;F \leq -4.7:\\
                          \;\;\;\;\frac{\left(\frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F} \cdot 0.5 - 1\right) - x}{B}\\
                          
                          \mathbf{elif}\;F \leq 10^{-66}:\\
                          \;\;\;\;-\frac{\mathsf{fma}\left(x \cdot -0.3333333333333333, B \cdot B, x\right)}{B}\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;\frac{1 - x}{B}\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 3 regimes
                          2. if F < -4.70000000000000018

                            1. Initial program 51.5%

                              \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                            2. Add Preprocessing
                            3. Taylor expanded in B around 0

                              \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                            4. Step-by-step derivation
                              1. lower-/.f64N/A

                                \[\leadsto \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{\color{blue}{B}} \]
                            5. Applied rewrites41.3%

                              \[\leadsto \color{blue}{\frac{\sqrt{{\left(\mathsf{fma}\left(2, x, F \cdot F\right) + 2\right)}^{-1}} \cdot F - x}{B}} \]
                            6. Taylor expanded in F around 0

                              \[\leadsto \frac{-1 \cdot x}{B} \]
                            7. Step-by-step derivation
                              1. mul-1-negN/A

                                \[\leadsto \frac{\mathsf{neg}\left(x\right)}{B} \]
                              2. lower-neg.f6425.8

                                \[\leadsto \frac{-x}{B} \]
                            8. Applied rewrites25.8%

                              \[\leadsto \frac{-x}{B} \]
                            9. Taylor expanded in F around -inf

                              \[\leadsto \frac{\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}} - \left(1 + x\right)}{B} \]
                            10. Step-by-step derivation
                              1. metadata-evalN/A

                                \[\leadsto \frac{\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}} - \left(1 + x\right)}{B} \]
                              2. associate--r+N/A

                                \[\leadsto \frac{\left(\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}} - 1\right) - x}{B} \]
                              3. lower--.f64N/A

                                \[\leadsto \frac{\left(\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}} - 1\right) - x}{B} \]
                            11. Applied rewrites62.5%

                              \[\leadsto \frac{\left(\frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F} \cdot 0.5 - 1\right) - x}{B} \]

                            if -4.70000000000000018 < F < 9.9999999999999998e-67

                            1. Initial program 99.3%

                              \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                            2. Add Preprocessing
                            3. Step-by-step derivation
                              1. lift-*.f64N/A

                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
                              2. lift-/.f64N/A

                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                              3. lift-sin.f64N/A

                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\color{blue}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                              4. 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)}} \]
                              5. lift-+.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)} \]
                              6. lift-+.f64N/A

                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\color{blue}{\left(F \cdot F + 2\right)} + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                              7. lift-*.f64N/A

                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(\color{blue}{F \cdot F} + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                              8. lift-*.f64N/A

                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + \color{blue}{2 \cdot x}\right)}^{\left(-\frac{1}{2}\right)} \]
                              9. lift-neg.f64N/A

                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}} \]
                              10. lift-/.f64N/A

                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)\right)} \]
                              11. associate-*l/N/A

                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B}} \]
                              12. lower-/.f64N/A

                                \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B}} \]
                            4. Applied rewrites99.3%

                              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F \cdot {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B}} \]
                            5. Taylor expanded in F around 0

                              \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
                            6. Step-by-step derivation
                              1. mul-1-negN/A

                                \[\leadsto \mathsf{neg}\left(\frac{x \cdot \cos B}{\sin B}\right) \]
                              2. lower-neg.f64N/A

                                \[\leadsto -\frac{x \cdot \cos B}{\sin B} \]
                              3. lower-/.f64N/A

                                \[\leadsto -\frac{x \cdot \cos B}{\sin B} \]
                              4. lower-*.f64N/A

                                \[\leadsto -\frac{x \cdot \cos B}{\sin B} \]
                              5. lower-cos.f64N/A

                                \[\leadsto -\frac{x \cdot \cos B}{\sin B} \]
                              6. lift-sin.f6470.2

                                \[\leadsto -\frac{x \cdot \cos B}{\sin B} \]
                            7. Applied rewrites70.2%

                              \[\leadsto \color{blue}{-\frac{x \cdot \cos B}{\sin B}} \]
                            8. Taylor expanded in B around 0

                              \[\leadsto -\frac{x + {B}^{2} \cdot \left(\frac{-1}{2} \cdot x - \frac{-1}{6} \cdot x\right)}{B} \]
                            9. Step-by-step derivation
                              1. lower-/.f64N/A

                                \[\leadsto -\frac{x + {B}^{2} \cdot \left(\frac{-1}{2} \cdot x - \frac{-1}{6} \cdot x\right)}{B} \]
                              2. +-commutativeN/A

                                \[\leadsto -\frac{{B}^{2} \cdot \left(\frac{-1}{2} \cdot x - \frac{-1}{6} \cdot x\right) + x}{B} \]
                              3. *-commutativeN/A

                                \[\leadsto -\frac{\left(\frac{-1}{2} \cdot x - \frac{-1}{6} \cdot x\right) \cdot {B}^{2} + x}{B} \]
                              4. lower-fma.f64N/A

                                \[\leadsto -\frac{\mathsf{fma}\left(\frac{-1}{2} \cdot x - \frac{-1}{6} \cdot x, {B}^{2}, x\right)}{B} \]
                              5. distribute-rgt-out--N/A

                                \[\leadsto -\frac{\mathsf{fma}\left(x \cdot \left(\frac{-1}{2} - \frac{-1}{6}\right), {B}^{2}, x\right)}{B} \]
                              6. metadata-evalN/A

                                \[\leadsto -\frac{\mathsf{fma}\left(x \cdot \frac{-1}{3}, {B}^{2}, x\right)}{B} \]
                              7. lower-*.f64N/A

                                \[\leadsto -\frac{\mathsf{fma}\left(x \cdot \frac{-1}{3}, {B}^{2}, x\right)}{B} \]
                              8. pow2N/A

                                \[\leadsto -\frac{\mathsf{fma}\left(x \cdot \frac{-1}{3}, B \cdot B, x\right)}{B} \]
                              9. lift-*.f6436.9

                                \[\leadsto -\frac{\mathsf{fma}\left(x \cdot -0.3333333333333333, B \cdot B, x\right)}{B} \]
                            10. Applied rewrites36.9%

                              \[\leadsto -\frac{\mathsf{fma}\left(x \cdot -0.3333333333333333, B \cdot B, x\right)}{B} \]

                            if 9.9999999999999998e-67 < F

                            1. Initial program 63.1%

                              \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                            2. Add Preprocessing
                            3. Taylor expanded in B around 0

                              \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                            4. Step-by-step derivation
                              1. lower-/.f64N/A

                                \[\leadsto \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{\color{blue}{B}} \]
                            5. Applied rewrites31.7%

                              \[\leadsto \color{blue}{\frac{\sqrt{{\left(\mathsf{fma}\left(2, x, F \cdot F\right) + 2\right)}^{-1}} \cdot F - x}{B}} \]
                            6. Taylor expanded in F around inf

                              \[\leadsto \frac{1 - x}{B} \]
                            7. Step-by-step derivation
                              1. Applied rewrites39.5%

                                \[\leadsto \frac{1 - x}{B} \]
                            8. Recombined 3 regimes into one program.
                            9. Final simplification43.4%

                              \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -4.7:\\ \;\;\;\;\frac{\left(\frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F} \cdot 0.5 - 1\right) - x}{B}\\ \mathbf{elif}\;F \leq 10^{-66}:\\ \;\;\;\;-\frac{\mathsf{fma}\left(x \cdot -0.3333333333333333, B \cdot B, x\right)}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
                            10. Add Preprocessing

                            Alternative 18: 44.5% accurate, 8.8× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -2.4 \cdot 10^{-12}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 10^{-66}:\\ \;\;\;\;-\frac{\mathsf{fma}\left(x \cdot -0.3333333333333333, B \cdot B, x\right)}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
                            (FPCore (F B x)
                             :precision binary64
                             (if (<= F -2.4e-12)
                               (/ (- -1.0 x) B)
                               (if (<= F 1e-66)
                                 (- (/ (fma (* x -0.3333333333333333) (* B B) x) B))
                                 (/ (- 1.0 x) B))))
                            double code(double F, double B, double x) {
                            	double tmp;
                            	if (F <= -2.4e-12) {
                            		tmp = (-1.0 - x) / B;
                            	} else if (F <= 1e-66) {
                            		tmp = -(fma((x * -0.3333333333333333), (B * B), x) / B);
                            	} else {
                            		tmp = (1.0 - x) / B;
                            	}
                            	return tmp;
                            }
                            
                            function code(F, B, x)
                            	tmp = 0.0
                            	if (F <= -2.4e-12)
                            		tmp = Float64(Float64(-1.0 - x) / B);
                            	elseif (F <= 1e-66)
                            		tmp = Float64(-Float64(fma(Float64(x * -0.3333333333333333), Float64(B * B), x) / B));
                            	else
                            		tmp = Float64(Float64(1.0 - x) / B);
                            	end
                            	return tmp
                            end
                            
                            code[F_, B_, x_] := If[LessEqual[F, -2.4e-12], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1e-66], (-N[(N[(N[(x * -0.3333333333333333), $MachinePrecision] * N[(B * B), $MachinePrecision] + x), $MachinePrecision] / B), $MachinePrecision]), N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            \mathbf{if}\;F \leq -2.4 \cdot 10^{-12}:\\
                            \;\;\;\;\frac{-1 - x}{B}\\
                            
                            \mathbf{elif}\;F \leq 10^{-66}:\\
                            \;\;\;\;-\frac{\mathsf{fma}\left(x \cdot -0.3333333333333333, B \cdot B, x\right)}{B}\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\frac{1 - x}{B}\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 3 regimes
                            2. if F < -2.39999999999999987e-12

                              1. Initial program 54.0%

                                \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                              2. Add Preprocessing
                              3. Taylor expanded in B around 0

                                \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                              4. Step-by-step derivation
                                1. lower-/.f64N/A

                                  \[\leadsto \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{\color{blue}{B}} \]
                              5. Applied rewrites42.7%

                                \[\leadsto \color{blue}{\frac{\sqrt{{\left(\mathsf{fma}\left(2, x, F \cdot F\right) + 2\right)}^{-1}} \cdot F - x}{B}} \]
                              6. Taylor expanded in F around -inf

                                \[\leadsto \frac{-1 - x}{B} \]
                              7. Step-by-step derivation
                                1. Applied rewrites62.3%

                                  \[\leadsto \frac{-1 - x}{B} \]

                                if -2.39999999999999987e-12 < F < 9.9999999999999998e-67

                                1. Initial program 99.3%

                                  \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                2. Add Preprocessing
                                3. Step-by-step derivation
                                  1. lift-*.f64N/A

                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
                                  2. lift-/.f64N/A

                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                  3. lift-sin.f64N/A

                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\color{blue}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                  4. 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)}} \]
                                  5. lift-+.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)} \]
                                  6. lift-+.f64N/A

                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\color{blue}{\left(F \cdot F + 2\right)} + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                  7. lift-*.f64N/A

                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(\color{blue}{F \cdot F} + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                  8. lift-*.f64N/A

                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + \color{blue}{2 \cdot x}\right)}^{\left(-\frac{1}{2}\right)} \]
                                  9. lift-neg.f64N/A

                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}} \]
                                  10. lift-/.f64N/A

                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)\right)} \]
                                  11. associate-*l/N/A

                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B}} \]
                                  12. lower-/.f64N/A

                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B}} \]
                                4. Applied rewrites99.3%

                                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F \cdot {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B}} \]
                                5. Taylor expanded in F around 0

                                  \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
                                6. Step-by-step derivation
                                  1. mul-1-negN/A

                                    \[\leadsto \mathsf{neg}\left(\frac{x \cdot \cos B}{\sin B}\right) \]
                                  2. lower-neg.f64N/A

                                    \[\leadsto -\frac{x \cdot \cos B}{\sin B} \]
                                  3. lower-/.f64N/A

                                    \[\leadsto -\frac{x \cdot \cos B}{\sin B} \]
                                  4. lower-*.f64N/A

                                    \[\leadsto -\frac{x \cdot \cos B}{\sin B} \]
                                  5. lower-cos.f64N/A

                                    \[\leadsto -\frac{x \cdot \cos B}{\sin B} \]
                                  6. lift-sin.f6469.7

                                    \[\leadsto -\frac{x \cdot \cos B}{\sin B} \]
                                7. Applied rewrites69.7%

                                  \[\leadsto \color{blue}{-\frac{x \cdot \cos B}{\sin B}} \]
                                8. Taylor expanded in B around 0

                                  \[\leadsto -\frac{x + {B}^{2} \cdot \left(\frac{-1}{2} \cdot x - \frac{-1}{6} \cdot x\right)}{B} \]
                                9. Step-by-step derivation
                                  1. lower-/.f64N/A

                                    \[\leadsto -\frac{x + {B}^{2} \cdot \left(\frac{-1}{2} \cdot x - \frac{-1}{6} \cdot x\right)}{B} \]
                                  2. +-commutativeN/A

                                    \[\leadsto -\frac{{B}^{2} \cdot \left(\frac{-1}{2} \cdot x - \frac{-1}{6} \cdot x\right) + x}{B} \]
                                  3. *-commutativeN/A

                                    \[\leadsto -\frac{\left(\frac{-1}{2} \cdot x - \frac{-1}{6} \cdot x\right) \cdot {B}^{2} + x}{B} \]
                                  4. lower-fma.f64N/A

                                    \[\leadsto -\frac{\mathsf{fma}\left(\frac{-1}{2} \cdot x - \frac{-1}{6} \cdot x, {B}^{2}, x\right)}{B} \]
                                  5. distribute-rgt-out--N/A

                                    \[\leadsto -\frac{\mathsf{fma}\left(x \cdot \left(\frac{-1}{2} - \frac{-1}{6}\right), {B}^{2}, x\right)}{B} \]
                                  6. metadata-evalN/A

                                    \[\leadsto -\frac{\mathsf{fma}\left(x \cdot \frac{-1}{3}, {B}^{2}, x\right)}{B} \]
                                  7. lower-*.f64N/A

                                    \[\leadsto -\frac{\mathsf{fma}\left(x \cdot \frac{-1}{3}, {B}^{2}, x\right)}{B} \]
                                  8. pow2N/A

                                    \[\leadsto -\frac{\mathsf{fma}\left(x \cdot \frac{-1}{3}, B \cdot B, x\right)}{B} \]
                                  9. lift-*.f6436.1

                                    \[\leadsto -\frac{\mathsf{fma}\left(x \cdot -0.3333333333333333, B \cdot B, x\right)}{B} \]
                                10. Applied rewrites36.1%

                                  \[\leadsto -\frac{\mathsf{fma}\left(x \cdot -0.3333333333333333, B \cdot B, x\right)}{B} \]

                                if 9.9999999999999998e-67 < F

                                1. Initial program 63.1%

                                  \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                2. Add Preprocessing
                                3. Taylor expanded in B around 0

                                  \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                4. Step-by-step derivation
                                  1. lower-/.f64N/A

                                    \[\leadsto \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{\color{blue}{B}} \]
                                5. Applied rewrites31.7%

                                  \[\leadsto \color{blue}{\frac{\sqrt{{\left(\mathsf{fma}\left(2, x, F \cdot F\right) + 2\right)}^{-1}} \cdot F - x}{B}} \]
                                6. Taylor expanded in F around inf

                                  \[\leadsto \frac{1 - x}{B} \]
                                7. Step-by-step derivation
                                  1. Applied rewrites39.5%

                                    \[\leadsto \frac{1 - x}{B} \]
                                8. Recombined 3 regimes into one program.
                                9. Final simplification43.3%

                                  \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -2.4 \cdot 10^{-12}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 10^{-66}:\\ \;\;\;\;-\frac{\mathsf{fma}\left(x \cdot -0.3333333333333333, B \cdot B, x\right)}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
                                10. Add Preprocessing

                                Alternative 19: 44.5% accurate, 13.6× speedup?

                                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -3.9 \cdot 10^{-77}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 3.2 \cdot 10^{-56}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
                                (FPCore (F B x)
                                 :precision binary64
                                 (if (<= F -3.9e-77)
                                   (/ (- -1.0 x) B)
                                   (if (<= F 3.2e-56) (/ (- x) B) (/ (- 1.0 x) B))))
                                double code(double F, double B, double x) {
                                	double tmp;
                                	if (F <= -3.9e-77) {
                                		tmp = (-1.0 - x) / B;
                                	} else if (F <= 3.2e-56) {
                                		tmp = -x / B;
                                	} else {
                                		tmp = (1.0 - x) / B;
                                	}
                                	return tmp;
                                }
                                
                                module fmin_fmax_functions
                                    implicit none
                                    private
                                    public fmax
                                    public fmin
                                
                                    interface fmax
                                        module procedure fmax88
                                        module procedure fmax44
                                        module procedure fmax84
                                        module procedure fmax48
                                    end interface
                                    interface fmin
                                        module procedure fmin88
                                        module procedure fmin44
                                        module procedure fmin84
                                        module procedure fmin48
                                    end interface
                                contains
                                    real(8) function fmax88(x, y) result (res)
                                        real(8), intent (in) :: x
                                        real(8), intent (in) :: y
                                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                    end function
                                    real(4) function fmax44(x, y) result (res)
                                        real(4), intent (in) :: x
                                        real(4), intent (in) :: y
                                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                    end function
                                    real(8) function fmax84(x, y) result(res)
                                        real(8), intent (in) :: x
                                        real(4), intent (in) :: y
                                        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                    end function
                                    real(8) function fmax48(x, y) result(res)
                                        real(4), intent (in) :: x
                                        real(8), intent (in) :: y
                                        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                    end function
                                    real(8) function fmin88(x, y) result (res)
                                        real(8), intent (in) :: x
                                        real(8), intent (in) :: y
                                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                    end function
                                    real(4) function fmin44(x, y) result (res)
                                        real(4), intent (in) :: x
                                        real(4), intent (in) :: y
                                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                    end function
                                    real(8) function fmin84(x, y) result(res)
                                        real(8), intent (in) :: x
                                        real(4), intent (in) :: y
                                        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                    end function
                                    real(8) function fmin48(x, y) result(res)
                                        real(4), intent (in) :: x
                                        real(8), intent (in) :: y
                                        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                    end function
                                end module
                                
                                real(8) function code(f, b, x)
                                use fmin_fmax_functions
                                    real(8), intent (in) :: f
                                    real(8), intent (in) :: b
                                    real(8), intent (in) :: x
                                    real(8) :: tmp
                                    if (f <= (-3.9d-77)) then
                                        tmp = ((-1.0d0) - x) / b
                                    else if (f <= 3.2d-56) then
                                        tmp = -x / b
                                    else
                                        tmp = (1.0d0 - x) / b
                                    end if
                                    code = tmp
                                end function
                                
                                public static double code(double F, double B, double x) {
                                	double tmp;
                                	if (F <= -3.9e-77) {
                                		tmp = (-1.0 - x) / B;
                                	} else if (F <= 3.2e-56) {
                                		tmp = -x / B;
                                	} else {
                                		tmp = (1.0 - x) / B;
                                	}
                                	return tmp;
                                }
                                
                                def code(F, B, x):
                                	tmp = 0
                                	if F <= -3.9e-77:
                                		tmp = (-1.0 - x) / B
                                	elif F <= 3.2e-56:
                                		tmp = -x / B
                                	else:
                                		tmp = (1.0 - x) / B
                                	return tmp
                                
                                function code(F, B, x)
                                	tmp = 0.0
                                	if (F <= -3.9e-77)
                                		tmp = Float64(Float64(-1.0 - x) / B);
                                	elseif (F <= 3.2e-56)
                                		tmp = Float64(Float64(-x) / B);
                                	else
                                		tmp = Float64(Float64(1.0 - x) / B);
                                	end
                                	return tmp
                                end
                                
                                function tmp_2 = code(F, B, x)
                                	tmp = 0.0;
                                	if (F <= -3.9e-77)
                                		tmp = (-1.0 - x) / B;
                                	elseif (F <= 3.2e-56)
                                		tmp = -x / B;
                                	else
                                		tmp = (1.0 - x) / B;
                                	end
                                	tmp_2 = tmp;
                                end
                                
                                code[F_, B_, x_] := If[LessEqual[F, -3.9e-77], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 3.2e-56], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
                                
                                \begin{array}{l}
                                
                                \\
                                \begin{array}{l}
                                \mathbf{if}\;F \leq -3.9 \cdot 10^{-77}:\\
                                \;\;\;\;\frac{-1 - x}{B}\\
                                
                                \mathbf{elif}\;F \leq 3.2 \cdot 10^{-56}:\\
                                \;\;\;\;\frac{-x}{B}\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;\frac{1 - x}{B}\\
                                
                                
                                \end{array}
                                \end{array}
                                
                                Derivation
                                1. Split input into 3 regimes
                                2. if F < -3.89999999999999979e-77

                                  1. Initial program 65.9%

                                    \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                  2. Add Preprocessing
                                  3. Taylor expanded in B around 0

                                    \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                  4. Step-by-step derivation
                                    1. lower-/.f64N/A

                                      \[\leadsto \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{\color{blue}{B}} \]
                                  5. Applied rewrites43.1%

                                    \[\leadsto \color{blue}{\frac{\sqrt{{\left(\mathsf{fma}\left(2, x, F \cdot F\right) + 2\right)}^{-1}} \cdot F - x}{B}} \]
                                  6. Taylor expanded in F around -inf

                                    \[\leadsto \frac{-1 - x}{B} \]
                                  7. Step-by-step derivation
                                    1. Applied rewrites52.9%

                                      \[\leadsto \frac{-1 - x}{B} \]

                                    if -3.89999999999999979e-77 < F < 3.19999999999999986e-56

                                    1. Initial program 99.3%

                                      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                    2. Add Preprocessing
                                    3. Taylor expanded in B around 0

                                      \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                    4. Step-by-step derivation
                                      1. lower-/.f64N/A

                                        \[\leadsto \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{\color{blue}{B}} \]
                                    5. Applied rewrites48.6%

                                      \[\leadsto \color{blue}{\frac{\sqrt{{\left(\mathsf{fma}\left(2, x, F \cdot F\right) + 2\right)}^{-1}} \cdot F - x}{B}} \]
                                    6. Taylor expanded in F around 0

                                      \[\leadsto \frac{-1 \cdot x}{B} \]
                                    7. Step-by-step derivation
                                      1. mul-1-negN/A

                                        \[\leadsto \frac{\mathsf{neg}\left(x\right)}{B} \]
                                      2. lower-neg.f6434.6

                                        \[\leadsto \frac{-x}{B} \]
                                    8. Applied rewrites34.6%

                                      \[\leadsto \frac{-x}{B} \]

                                    if 3.19999999999999986e-56 < F

                                    1. Initial program 60.9%

                                      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                    2. Add Preprocessing
                                    3. Taylor expanded in B around 0

                                      \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                    4. Step-by-step derivation
                                      1. lower-/.f64N/A

                                        \[\leadsto \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{\color{blue}{B}} \]
                                    5. Applied rewrites32.2%

                                      \[\leadsto \color{blue}{\frac{\sqrt{{\left(\mathsf{fma}\left(2, x, F \cdot F\right) + 2\right)}^{-1}} \cdot F - x}{B}} \]
                                    6. Taylor expanded in F around inf

                                      \[\leadsto \frac{1 - x}{B} \]
                                    7. Step-by-step derivation
                                      1. Applied rewrites41.5%

                                        \[\leadsto \frac{1 - x}{B} \]
                                    8. Recombined 3 regimes into one program.
                                    9. Final simplification42.6%

                                      \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -3.9 \cdot 10^{-77}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 3.2 \cdot 10^{-56}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
                                    10. Add Preprocessing

                                    Alternative 20: 37.2% accurate, 17.5× speedup?

                                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -3.9 \cdot 10^{-77}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{-x}{B}\\ \end{array} \end{array} \]
                                    (FPCore (F B x)
                                     :precision binary64
                                     (if (<= F -3.9e-77) (/ (- -1.0 x) B) (/ (- x) B)))
                                    double code(double F, double B, double x) {
                                    	double tmp;
                                    	if (F <= -3.9e-77) {
                                    		tmp = (-1.0 - x) / B;
                                    	} else {
                                    		tmp = -x / B;
                                    	}
                                    	return tmp;
                                    }
                                    
                                    module fmin_fmax_functions
                                        implicit none
                                        private
                                        public fmax
                                        public fmin
                                    
                                        interface fmax
                                            module procedure fmax88
                                            module procedure fmax44
                                            module procedure fmax84
                                            module procedure fmax48
                                        end interface
                                        interface fmin
                                            module procedure fmin88
                                            module procedure fmin44
                                            module procedure fmin84
                                            module procedure fmin48
                                        end interface
                                    contains
                                        real(8) function fmax88(x, y) result (res)
                                            real(8), intent (in) :: x
                                            real(8), intent (in) :: y
                                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                        end function
                                        real(4) function fmax44(x, y) result (res)
                                            real(4), intent (in) :: x
                                            real(4), intent (in) :: y
                                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                        end function
                                        real(8) function fmax84(x, y) result(res)
                                            real(8), intent (in) :: x
                                            real(4), intent (in) :: y
                                            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                        end function
                                        real(8) function fmax48(x, y) result(res)
                                            real(4), intent (in) :: x
                                            real(8), intent (in) :: y
                                            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                        end function
                                        real(8) function fmin88(x, y) result (res)
                                            real(8), intent (in) :: x
                                            real(8), intent (in) :: y
                                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                        end function
                                        real(4) function fmin44(x, y) result (res)
                                            real(4), intent (in) :: x
                                            real(4), intent (in) :: y
                                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                        end function
                                        real(8) function fmin84(x, y) result(res)
                                            real(8), intent (in) :: x
                                            real(4), intent (in) :: y
                                            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                        end function
                                        real(8) function fmin48(x, y) result(res)
                                            real(4), intent (in) :: x
                                            real(8), intent (in) :: y
                                            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                        end function
                                    end module
                                    
                                    real(8) function code(f, b, x)
                                    use fmin_fmax_functions
                                        real(8), intent (in) :: f
                                        real(8), intent (in) :: b
                                        real(8), intent (in) :: x
                                        real(8) :: tmp
                                        if (f <= (-3.9d-77)) then
                                            tmp = ((-1.0d0) - x) / b
                                        else
                                            tmp = -x / b
                                        end if
                                        code = tmp
                                    end function
                                    
                                    public static double code(double F, double B, double x) {
                                    	double tmp;
                                    	if (F <= -3.9e-77) {
                                    		tmp = (-1.0 - x) / B;
                                    	} else {
                                    		tmp = -x / B;
                                    	}
                                    	return tmp;
                                    }
                                    
                                    def code(F, B, x):
                                    	tmp = 0
                                    	if F <= -3.9e-77:
                                    		tmp = (-1.0 - x) / B
                                    	else:
                                    		tmp = -x / B
                                    	return tmp
                                    
                                    function code(F, B, x)
                                    	tmp = 0.0
                                    	if (F <= -3.9e-77)
                                    		tmp = Float64(Float64(-1.0 - x) / B);
                                    	else
                                    		tmp = Float64(Float64(-x) / B);
                                    	end
                                    	return tmp
                                    end
                                    
                                    function tmp_2 = code(F, B, x)
                                    	tmp = 0.0;
                                    	if (F <= -3.9e-77)
                                    		tmp = (-1.0 - x) / B;
                                    	else
                                    		tmp = -x / B;
                                    	end
                                    	tmp_2 = tmp;
                                    end
                                    
                                    code[F_, B_, x_] := If[LessEqual[F, -3.9e-77], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[((-x) / B), $MachinePrecision]]
                                    
                                    \begin{array}{l}
                                    
                                    \\
                                    \begin{array}{l}
                                    \mathbf{if}\;F \leq -3.9 \cdot 10^{-77}:\\
                                    \;\;\;\;\frac{-1 - x}{B}\\
                                    
                                    \mathbf{else}:\\
                                    \;\;\;\;\frac{-x}{B}\\
                                    
                                    
                                    \end{array}
                                    \end{array}
                                    
                                    Derivation
                                    1. Split input into 2 regimes
                                    2. if F < -3.89999999999999979e-77

                                      1. Initial program 65.9%

                                        \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                      2. Add Preprocessing
                                      3. Taylor expanded in B around 0

                                        \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                      4. Step-by-step derivation
                                        1. lower-/.f64N/A

                                          \[\leadsto \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{\color{blue}{B}} \]
                                      5. Applied rewrites43.1%

                                        \[\leadsto \color{blue}{\frac{\sqrt{{\left(\mathsf{fma}\left(2, x, F \cdot F\right) + 2\right)}^{-1}} \cdot F - x}{B}} \]
                                      6. Taylor expanded in F around -inf

                                        \[\leadsto \frac{-1 - x}{B} \]
                                      7. Step-by-step derivation
                                        1. Applied rewrites52.9%

                                          \[\leadsto \frac{-1 - x}{B} \]

                                        if -3.89999999999999979e-77 < F

                                        1. Initial program 81.0%

                                          \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                        2. Add Preprocessing
                                        3. Taylor expanded in B around 0

                                          \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                        4. Step-by-step derivation
                                          1. lower-/.f64N/A

                                            \[\leadsto \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{\color{blue}{B}} \]
                                        5. Applied rewrites40.8%

                                          \[\leadsto \color{blue}{\frac{\sqrt{{\left(\mathsf{fma}\left(2, x, F \cdot F\right) + 2\right)}^{-1}} \cdot F - x}{B}} \]
                                        6. Taylor expanded in F around 0

                                          \[\leadsto \frac{-1 \cdot x}{B} \]
                                        7. Step-by-step derivation
                                          1. mul-1-negN/A

                                            \[\leadsto \frac{\mathsf{neg}\left(x\right)}{B} \]
                                          2. lower-neg.f6430.2

                                            \[\leadsto \frac{-x}{B} \]
                                        8. Applied rewrites30.2%

                                          \[\leadsto \frac{-x}{B} \]
                                      8. Recombined 2 regimes into one program.
                                      9. Final simplification37.3%

                                        \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -3.9 \cdot 10^{-77}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{-x}{B}\\ \end{array} \]
                                      10. Add Preprocessing

                                      Alternative 21: 29.9% accurate, 26.3× speedup?

                                      \[\begin{array}{l} \\ \frac{-x}{B} \end{array} \]
                                      (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]
                                      
                                      \begin{array}{l}
                                      
                                      \\
                                      \frac{-x}{B}
                                      \end{array}
                                      
                                      Derivation
                                      1. Initial program 76.3%

                                        \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                      2. Add Preprocessing
                                      3. Taylor expanded in B around 0

                                        \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
                                      4. Step-by-step derivation
                                        1. lower-/.f64N/A

                                          \[\leadsto \frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{\color{blue}{B}} \]
                                      5. Applied rewrites41.5%

                                        \[\leadsto \color{blue}{\frac{\sqrt{{\left(\mathsf{fma}\left(2, x, F \cdot F\right) + 2\right)}^{-1}} \cdot F - x}{B}} \]
                                      6. Taylor expanded in F around 0

                                        \[\leadsto \frac{-1 \cdot x}{B} \]
                                      7. Step-by-step derivation
                                        1. mul-1-negN/A

                                          \[\leadsto \frac{\mathsf{neg}\left(x\right)}{B} \]
                                        2. lower-neg.f6429.3

                                          \[\leadsto \frac{-x}{B} \]
                                      8. Applied rewrites29.3%

                                        \[\leadsto \frac{-x}{B} \]
                                      9. Final simplification29.3%

                                        \[\leadsto \frac{-x}{B} \]
                                      10. Add Preprocessing

                                      Reproduce

                                      ?
                                      herbie shell --seed 2025061 
                                      (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))))))