VandenBroeck and Keller, Equation (23)

Percentage Accurate: 77.2% → 99.5%
Time: 7.5s
Alternatives: 23
Speedup: 1.5×

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}

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 23 alternatives:

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

Initial Program: 77.2% accurate, 1.0× speedup?

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

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

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

\mathbf{elif}\;F \leq 8 \cdot 10^{+25}:\\
\;\;\;\;t\_0 + \frac{F}{\sin B} \cdot \frac{1}{\sqrt{2 + \mathsf{fma}\left(2, x, F \cdot F\right)}}\\

\mathbf{else}:\\
\;\;\;\;\left(-x\right) \cdot \frac{\cos B}{\sin B} + \frac{1}{\sin B}\\


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

    1. Initial program 54.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}} \]

    if -3.6e45 < F < 8.00000000000000072e25

    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.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. Taylor expanded in B around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.00000000000000072e25 < F

    1. Initial program 53.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 rewrites70.2%

      \[\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 inf

      \[\leadsto \left(-x \cdot \color{blue}{\frac{\cos B}{\sin 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. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \left(-x \cdot \frac{\cos B}{\color{blue}{\sin 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-cos.f64N/A

        \[\leadsto \left(-x \cdot \frac{\cos B}{\sin \color{blue}{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-sin.f6470.2

        \[\leadsto \left(-x \cdot \frac{\cos B}{\sin 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. Applied rewrites70.2%

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

      \[\leadsto \left(-x \cdot \frac{\cos B}{\sin B}\right) + \frac{\color{blue}{1}}{\sin B} \]
    9. Step-by-step derivation
      1. Applied rewrites99.7%

        \[\leadsto \left(-x \cdot \frac{\cos B}{\sin B}\right) + \frac{\color{blue}{1}}{\sin B} \]
    10. Recombined 3 regimes into one program.
    11. Final simplification99.5%

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

    Alternative 2: 77.5% accurate, 0.2× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := x \cdot \frac{-1}{\tan B}\\ t_1 := t\_0 + \frac{F}{B} \cdot \frac{1}{\sqrt{2 + \mathsf{fma}\left(2, x, F \cdot F\right)}}\\ t_2 := \frac{F}{\sin B}\\ t_3 := \frac{1}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}} \cdot t\_2\\ t_4 := t\_0 + t\_2 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-1}{2}\right)}\\ \mathbf{if}\;t\_4 \leq -10:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_4 \leq -5 \cdot 10^{-52}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_4 \leq 2 \cdot 10^{-66}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_4 \leq 10:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_4 \leq 5 \cdot 10^{+302}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
    (FPCore (F B x)
     :precision binary64
     (let* ((t_0 (* x (/ -1.0 (tan B))))
            (t_1 (+ t_0 (* (/ F B) (/ 1.0 (sqrt (+ 2.0 (fma 2.0 x (* F F))))))))
            (t_2 (/ F (sin B)))
            (t_3 (* (/ 1.0 (sqrt (fma F F 2.0))) t_2))
            (t_4 (+ t_0 (* t_2 (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (/ -1.0 2.0))))))
       (if (<= t_4 -10.0)
         t_1
         (if (<= t_4 -5e-52)
           t_3
           (if (<= t_4 2e-66)
             t_1
             (if (<= t_4 10.0) t_3 (if (<= t_4 5e+302) t_1 (/ (- 1.0 x) B))))))))
    double code(double F, double B, double x) {
    	double t_0 = x * (-1.0 / tan(B));
    	double t_1 = t_0 + ((F / B) * (1.0 / sqrt((2.0 + fma(2.0, x, (F * F))))));
    	double t_2 = F / sin(B);
    	double t_3 = (1.0 / sqrt(fma(F, F, 2.0))) * t_2;
    	double t_4 = t_0 + (t_2 * pow((((F * F) + 2.0) + (2.0 * x)), (-1.0 / 2.0)));
    	double tmp;
    	if (t_4 <= -10.0) {
    		tmp = t_1;
    	} else if (t_4 <= -5e-52) {
    		tmp = t_3;
    	} else if (t_4 <= 2e-66) {
    		tmp = t_1;
    	} else if (t_4 <= 10.0) {
    		tmp = t_3;
    	} else if (t_4 <= 5e+302) {
    		tmp = t_1;
    	} else {
    		tmp = (1.0 - x) / B;
    	}
    	return tmp;
    }
    
    function code(F, B, x)
    	t_0 = Float64(x * Float64(-1.0 / tan(B)))
    	t_1 = Float64(t_0 + Float64(Float64(F / B) * Float64(1.0 / sqrt(Float64(2.0 + fma(2.0, x, Float64(F * F)))))))
    	t_2 = Float64(F / sin(B))
    	t_3 = Float64(Float64(1.0 / sqrt(fma(F, F, 2.0))) * t_2)
    	t_4 = Float64(t_0 + Float64(t_2 * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-1.0 / 2.0))))
    	tmp = 0.0
    	if (t_4 <= -10.0)
    		tmp = t_1;
    	elseif (t_4 <= -5e-52)
    		tmp = t_3;
    	elseif (t_4 <= 2e-66)
    		tmp = t_1;
    	elseif (t_4 <= 10.0)
    		tmp = t_3;
    	elseif (t_4 <= 5e+302)
    		tmp = t_1;
    	else
    		tmp = Float64(Float64(1.0 - x) / B);
    	end
    	return tmp
    end
    
    code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 + N[(N[(F / B), $MachinePrecision] * N[(1.0 / N[Sqrt[N[(2.0 + N[(2.0 * x + N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(1.0 / N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$0 + N[(t$95$2 * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], N[(-1.0 / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$4, -10.0], t$95$1, If[LessEqual[t$95$4, -5e-52], t$95$3, If[LessEqual[t$95$4, 2e-66], t$95$1, If[LessEqual[t$95$4, 10.0], t$95$3, If[LessEqual[t$95$4, 5e+302], t$95$1, N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]]]]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := x \cdot \frac{-1}{\tan B}\\
    t_1 := t\_0 + \frac{F}{B} \cdot \frac{1}{\sqrt{2 + \mathsf{fma}\left(2, x, F \cdot F\right)}}\\
    t_2 := \frac{F}{\sin B}\\
    t_3 := \frac{1}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}} \cdot t\_2\\
    t_4 := t\_0 + t\_2 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\frac{-1}{2}\right)}\\
    \mathbf{if}\;t\_4 \leq -10:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;t\_4 \leq -5 \cdot 10^{-52}:\\
    \;\;\;\;t\_3\\
    
    \mathbf{elif}\;t\_4 \leq 2 \cdot 10^{-66}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;t\_4 \leq 10:\\
    \;\;\;\;t\_3\\
    
    \mathbf{elif}\;t\_4 \leq 5 \cdot 10^{+302}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{1 - x}{B}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))))) < -10 or -5e-52 < (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))))) < 2e-66 or 10 < (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))))) < 5e302

      1. Initial program 87.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 rewrites89.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 \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}} \]
      6. Step-by-step derivation
        1. lower-*.f64N/A

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

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

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

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

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

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

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

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

          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{B} \cdot \frac{1}{\sqrt{2 + \mathsf{fma}\left(2, x, F \cdot F\right)}} \]
        10. lift-*.f6479.9

          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{B} \cdot \frac{1}{\sqrt{2 + \mathsf{fma}\left(2, x, F \cdot F\right)}} \]
      7. Applied rewrites79.9%

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

      if -10 < (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))))) < -5e-52 or 2e-66 < (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))))) < 10

      1. Initial program 88.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 x around 0

        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + {F}^{2}}}} \]
      4. Step-by-step derivation
        1. *-commutativeN/A

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

          \[\leadsto \sqrt{\frac{1}{2 + {F}^{2}}} \cdot \color{blue}{\frac{F}{\sin B}} \]
        3. lower-sqrt.f64N/A

          \[\leadsto \sqrt{\frac{1}{2 + {F}^{2}}} \cdot \frac{\color{blue}{F}}{\sin B} \]
        4. inv-powN/A

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

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

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

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

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

          \[\leadsto \sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \frac{F}{\sin B} \]
        10. lift-/.f6465.8

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

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

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

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

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

          \[\leadsto \sqrt{\frac{1}{F \cdot F + 2}} \cdot \frac{F}{\sin B} \]
        5. pow2N/A

          \[\leadsto \sqrt{\frac{1}{{F}^{2} + 2}} \cdot \frac{F}{\sin B} \]
        6. +-commutativeN/A

          \[\leadsto \sqrt{\frac{1}{2 + {F}^{2}}} \cdot \frac{F}{\sin B} \]
        7. sqrt-divN/A

          \[\leadsto \frac{\sqrt{1}}{\sqrt{2 + {F}^{2}}} \cdot \frac{\color{blue}{F}}{\sin B} \]
        8. metadata-evalN/A

          \[\leadsto \frac{1}{\sqrt{2 + {F}^{2}}} \cdot \frac{F}{\sin B} \]
        9. lower-/.f64N/A

          \[\leadsto \frac{1}{\sqrt{2 + {F}^{2}}} \cdot \frac{\color{blue}{F}}{\sin B} \]
        10. lower-sqrt.f64N/A

          \[\leadsto \frac{1}{\sqrt{2 + {F}^{2}}} \cdot \frac{F}{\sin B} \]
        11. +-commutativeN/A

          \[\leadsto \frac{1}{\sqrt{{F}^{2} + 2}} \cdot \frac{F}{\sin B} \]
        12. pow2N/A

          \[\leadsto \frac{1}{\sqrt{F \cdot F + 2}} \cdot \frac{F}{\sin B} \]
        13. lift-fma.f6465.8

          \[\leadsto \frac{1}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}} \cdot \frac{F}{\sin B} \]
      7. Applied rewrites65.8%

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

      if 5e302 < (+.f64 (neg.f64 (*.f64 x (/.f64 #s(literal 1 binary64) (tan.f64 B)))) (*.f64 (/.f64 F (sin.f64 B)) (pow.f64 (+.f64 (+.f64 (*.f64 F F) #s(literal 2 binary64)) (*.f64 #s(literal 2 binary64) x)) (neg.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))))))

      1. Initial program 21.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 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 rewrites66.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 rewrites78.8%

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

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

      Alternative 3: 92.4% accurate, 1.3× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := x \cdot \frac{-1}{\tan B}\\ \mathbf{if}\;F \leq -2450000:\\ \;\;\;\;t\_0 + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 5.5 \cdot 10^{-54}:\\ \;\;\;\;t\_0 + \frac{F}{B} \cdot \frac{1}{\sqrt{2 + \mathsf{fma}\left(2, x, F \cdot F\right)}}\\ \mathbf{elif}\;F \leq 250000:\\ \;\;\;\;\left(-x\right) \cdot \frac{1}{\sin 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} \end{array} \]
      (FPCore (F B x)
       :precision binary64
       (let* ((t_0 (* x (/ -1.0 (tan B)))))
         (if (<= F -2450000.0)
           (+ t_0 (/ -1.0 (sin B)))
           (if (<= F 5.5e-54)
             (+ t_0 (* (/ F B) (/ 1.0 (sqrt (+ 2.0 (fma 2.0 x (* F F)))))))
             (if (<= F 250000.0)
               (+
                (* (- x) (/ 1.0 (sin B)))
                (/ (/ F (sqrt (fma 2.0 x (fma F F 2.0)))) (sin B)))
               (/ (- 1.0 (* (cos B) x)) (sin B)))))))
      double code(double F, double B, double x) {
      	double t_0 = x * (-1.0 / tan(B));
      	double tmp;
      	if (F <= -2450000.0) {
      		tmp = t_0 + (-1.0 / sin(B));
      	} else if (F <= 5.5e-54) {
      		tmp = t_0 + ((F / B) * (1.0 / sqrt((2.0 + fma(2.0, x, (F * F))))));
      	} else if (F <= 250000.0) {
      		tmp = (-x * (1.0 / sin(B))) + ((F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) / sin(B));
      	} else {
      		tmp = (1.0 - (cos(B) * x)) / sin(B);
      	}
      	return tmp;
      }
      
      function code(F, B, x)
      	t_0 = Float64(x * Float64(-1.0 / tan(B)))
      	tmp = 0.0
      	if (F <= -2450000.0)
      		tmp = Float64(t_0 + Float64(-1.0 / sin(B)));
      	elseif (F <= 5.5e-54)
      		tmp = Float64(t_0 + Float64(Float64(F / B) * Float64(1.0 / sqrt(Float64(2.0 + fma(2.0, x, Float64(F * F)))))));
      	elseif (F <= 250000.0)
      		tmp = Float64(Float64(Float64(-x) * Float64(1.0 / sin(B))) + Float64(Float64(F / sqrt(fma(2.0, x, fma(F, F, 2.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[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2450000.0], N[(t$95$0 + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.5e-54], N[(t$95$0 + N[(N[(F / B), $MachinePrecision] * N[(1.0 / N[Sqrt[N[(2.0 + N[(2.0 * x + N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 250000.0], N[(N[((-x) * N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $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], 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 := x \cdot \frac{-1}{\tan B}\\
      \mathbf{if}\;F \leq -2450000:\\
      \;\;\;\;t\_0 + \frac{-1}{\sin B}\\
      
      \mathbf{elif}\;F \leq 5.5 \cdot 10^{-54}:\\
      \;\;\;\;t\_0 + \frac{F}{B} \cdot \frac{1}{\sqrt{2 + \mathsf{fma}\left(2, x, F \cdot F\right)}}\\
      
      \mathbf{elif}\;F \leq 250000:\\
      \;\;\;\;\left(-x\right) \cdot \frac{1}{\sin 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}
      \end{array}
      
      Derivation
      1. Split input into 4 regimes
      2. if F < -2.45e6

        1. Initial program 59.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.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}} \]

        if -2.45e6 < F < 5.50000000000000046e-54

        1. Initial program 99.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. 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.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. Taylor expanded in B around 0

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{B} \cdot \frac{1}{\sqrt{2 + \mathsf{fma}\left(2, x, F \cdot F\right)}} \]
          10. lift-*.f6484.3

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

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

        if 5.50000000000000046e-54 < F < 2.5e5

        1. Initial program 99.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. 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. Taylor expanded in B around inf

          \[\leadsto \left(-x \cdot \color{blue}{\frac{\cos B}{\sin 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. Step-by-step derivation
          1. lower-/.f64N/A

            \[\leadsto \left(-x \cdot \frac{\cos B}{\color{blue}{\sin 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-cos.f64N/A

            \[\leadsto \left(-x \cdot \frac{\cos B}{\sin \color{blue}{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-sin.f6499.4

            \[\leadsto \left(-x \cdot \frac{\cos B}{\sin 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. Applied rewrites99.4%

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

            \[\leadsto \left(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin B}\right) + \frac{F \cdot \frac{\color{blue}{1}}{\sqrt{2 + \left(2 \cdot x + {F}^{2}\right)}}}{\sin B} \]
        9. Applied rewrites99.4%

          \[\leadsto \left(-x \cdot \frac{\cos B}{\sin 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} \]
        10. Taylor expanded in B around 0

          \[\leadsto \left(-x \cdot \frac{1}{\sin \color{blue}{B}}\right) + \frac{\frac{F \cdot 1}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}}{\sin B} \]
        11. Step-by-step derivation
          1. Applied rewrites81.3%

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

          if 2.5e5 < F

          1. Initial program 56.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 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.7

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

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -2450000:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 5.5 \cdot 10^{-54}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{B} \cdot \frac{1}{\sqrt{2 + \mathsf{fma}\left(2, x, F \cdot F\right)}}\\ \mathbf{elif}\;F \leq 250000:\\ \;\;\;\;\left(-x\right) \cdot \frac{1}{\sin 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} \]
        14. Add Preprocessing

        Alternative 4: 99.5% accurate, 1.3× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_0 := x \cdot \frac{-1}{\tan B}\\ \mathbf{if}\;F \leq -3.6 \cdot 10^{+45}:\\ \;\;\;\;t\_0 + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 8 \cdot 10^{+25}:\\ \;\;\;\;t\_0 + \frac{F}{\sin B} \cdot \frac{1}{\sqrt{2 + \mathsf{fma}\left(2, x, F \cdot F\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - \cos B \cdot x}{\sin B}\\ \end{array} \end{array} \]
        (FPCore (F B x)
         :precision binary64
         (let* ((t_0 (* x (/ -1.0 (tan B)))))
           (if (<= F -3.6e+45)
             (+ t_0 (/ -1.0 (sin B)))
             (if (<= F 8e+25)
               (+ t_0 (* (/ F (sin B)) (/ 1.0 (sqrt (+ 2.0 (fma 2.0 x (* F F)))))))
               (/ (- 1.0 (* (cos B) x)) (sin B))))))
        double code(double F, double B, double x) {
        	double t_0 = x * (-1.0 / tan(B));
        	double tmp;
        	if (F <= -3.6e+45) {
        		tmp = t_0 + (-1.0 / sin(B));
        	} else if (F <= 8e+25) {
        		tmp = t_0 + ((F / sin(B)) * (1.0 / sqrt((2.0 + fma(2.0, x, (F * F))))));
        	} else {
        		tmp = (1.0 - (cos(B) * x)) / sin(B);
        	}
        	return tmp;
        }
        
        function code(F, B, x)
        	t_0 = Float64(x * Float64(-1.0 / tan(B)))
        	tmp = 0.0
        	if (F <= -3.6e+45)
        		tmp = Float64(t_0 + Float64(-1.0 / sin(B)));
        	elseif (F <= 8e+25)
        		tmp = Float64(t_0 + Float64(Float64(F / sin(B)) * Float64(1.0 / sqrt(Float64(2.0 + fma(2.0, x, Float64(F * F)))))));
        	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[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3.6e+45], N[(t$95$0 + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8e+25], N[(t$95$0 + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[Sqrt[N[(2.0 + N[(2.0 * x + N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $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 := x \cdot \frac{-1}{\tan B}\\
        \mathbf{if}\;F \leq -3.6 \cdot 10^{+45}:\\
        \;\;\;\;t\_0 + \frac{-1}{\sin B}\\
        
        \mathbf{elif}\;F \leq 8 \cdot 10^{+25}:\\
        \;\;\;\;t\_0 + \frac{F}{\sin B} \cdot \frac{1}{\sqrt{2 + \mathsf{fma}\left(2, x, F \cdot F\right)}}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{1 - \cos B \cdot x}{\sin B}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if F < -3.6e45

          1. Initial program 54.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}} \]

          if -3.6e45 < F < 8.00000000000000072e25

          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.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. Taylor expanded in B around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

          if 8.00000000000000072e25 < F

          1. Initial program 53.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}{\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.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}} \]
        3. Recombined 3 regimes into one program.
        4. Final simplification99.5%

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

        Alternative 5: 91.7% accurate, 1.5× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_0 := x \cdot \frac{-1}{\tan B}\\ \mathbf{if}\;F \leq -2450000:\\ \;\;\;\;t\_0 + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 4 \cdot 10^{-26}:\\ \;\;\;\;t\_0 + \frac{F}{B} \cdot \frac{1}{\sqrt{2 + \mathsf{fma}\left(2, x, F \cdot F\right)}}\\ \mathbf{elif}\;F \leq 230000000:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}} \cdot \frac{F}{\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 (* x (/ -1.0 (tan B)))))
           (if (<= F -2450000.0)
             (+ t_0 (/ -1.0 (sin B)))
             (if (<= F 4e-26)
               (+ t_0 (* (/ F B) (/ 1.0 (sqrt (+ 2.0 (fma 2.0 x (* F F)))))))
               (if (<= F 230000000.0)
                 (* (/ 1.0 (sqrt (fma F F 2.0))) (/ F (sin B)))
                 (/ (- 1.0 (* (cos B) x)) (sin B)))))))
        double code(double F, double B, double x) {
        	double t_0 = x * (-1.0 / tan(B));
        	double tmp;
        	if (F <= -2450000.0) {
        		tmp = t_0 + (-1.0 / sin(B));
        	} else if (F <= 4e-26) {
        		tmp = t_0 + ((F / B) * (1.0 / sqrt((2.0 + fma(2.0, x, (F * F))))));
        	} else if (F <= 230000000.0) {
        		tmp = (1.0 / sqrt(fma(F, F, 2.0))) * (F / sin(B));
        	} else {
        		tmp = (1.0 - (cos(B) * x)) / sin(B);
        	}
        	return tmp;
        }
        
        function code(F, B, x)
        	t_0 = Float64(x * Float64(-1.0 / tan(B)))
        	tmp = 0.0
        	if (F <= -2450000.0)
        		tmp = Float64(t_0 + Float64(-1.0 / sin(B)));
        	elseif (F <= 4e-26)
        		tmp = Float64(t_0 + Float64(Float64(F / B) * Float64(1.0 / sqrt(Float64(2.0 + fma(2.0, x, Float64(F * F)))))));
        	elseif (F <= 230000000.0)
        		tmp = Float64(Float64(1.0 / sqrt(fma(F, F, 2.0))) * Float64(F / 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[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2450000.0], N[(t$95$0 + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4e-26], N[(t$95$0 + N[(N[(F / B), $MachinePrecision] * N[(1.0 / N[Sqrt[N[(2.0 + N[(2.0 * x + N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 230000000.0], N[(N[(1.0 / N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(F / 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 := x \cdot \frac{-1}{\tan B}\\
        \mathbf{if}\;F \leq -2450000:\\
        \;\;\;\;t\_0 + \frac{-1}{\sin B}\\
        
        \mathbf{elif}\;F \leq 4 \cdot 10^{-26}:\\
        \;\;\;\;t\_0 + \frac{F}{B} \cdot \frac{1}{\sqrt{2 + \mathsf{fma}\left(2, x, F \cdot F\right)}}\\
        
        \mathbf{elif}\;F \leq 230000000:\\
        \;\;\;\;\frac{1}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}} \cdot \frac{F}{\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 < -2.45e6

          1. Initial program 59.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.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}} \]

          if -2.45e6 < F < 4.0000000000000002e-26

          1. Initial program 99.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. 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.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. Taylor expanded in B around 0

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

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

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

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

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

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

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

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

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

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{B} \cdot \frac{1}{\sqrt{2 + \mathsf{fma}\left(2, x, F \cdot F\right)}} \]
            10. lift-*.f6483.7

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

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

          if 4.0000000000000002e-26 < F < 2.3e8

          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 x around 0

            \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + {F}^{2}}}} \]
          4. Step-by-step derivation
            1. *-commutativeN/A

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

              \[\leadsto \sqrt{\frac{1}{2 + {F}^{2}}} \cdot \color{blue}{\frac{F}{\sin B}} \]
            3. lower-sqrt.f64N/A

              \[\leadsto \sqrt{\frac{1}{2 + {F}^{2}}} \cdot \frac{\color{blue}{F}}{\sin B} \]
            4. inv-powN/A

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

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

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

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

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

              \[\leadsto \sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \frac{F}{\sin B} \]
            10. lift-/.f6464.8

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

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

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

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

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

              \[\leadsto \sqrt{\frac{1}{F \cdot F + 2}} \cdot \frac{F}{\sin B} \]
            5. pow2N/A

              \[\leadsto \sqrt{\frac{1}{{F}^{2} + 2}} \cdot \frac{F}{\sin B} \]
            6. +-commutativeN/A

              \[\leadsto \sqrt{\frac{1}{2 + {F}^{2}}} \cdot \frac{F}{\sin B} \]
            7. sqrt-divN/A

              \[\leadsto \frac{\sqrt{1}}{\sqrt{2 + {F}^{2}}} \cdot \frac{\color{blue}{F}}{\sin B} \]
            8. metadata-evalN/A

              \[\leadsto \frac{1}{\sqrt{2 + {F}^{2}}} \cdot \frac{F}{\sin B} \]
            9. lower-/.f64N/A

              \[\leadsto \frac{1}{\sqrt{2 + {F}^{2}}} \cdot \frac{\color{blue}{F}}{\sin B} \]
            10. lower-sqrt.f64N/A

              \[\leadsto \frac{1}{\sqrt{2 + {F}^{2}}} \cdot \frac{F}{\sin B} \]
            11. +-commutativeN/A

              \[\leadsto \frac{1}{\sqrt{{F}^{2} + 2}} \cdot \frac{F}{\sin B} \]
            12. pow2N/A

              \[\leadsto \frac{1}{\sqrt{F \cdot F + 2}} \cdot \frac{F}{\sin B} \]
            13. lift-fma.f6464.7

              \[\leadsto \frac{1}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}} \cdot \frac{F}{\sin B} \]
          7. Applied rewrites64.7%

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

          if 2.3e8 < F

          1. Initial program 56.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 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.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}} \]
        3. Recombined 4 regimes into one program.
        4. Final simplification91.7%

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

        Alternative 6: 91.8% accurate, 1.5× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_0 := \cos B \cdot x\\ \mathbf{if}\;F \leq -2450000:\\ \;\;\;\;\frac{-1 - t\_0}{\sin B}\\ \mathbf{elif}\;F \leq 4 \cdot 10^{-26}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{B} \cdot \frac{1}{\sqrt{2 + \mathsf{fma}\left(2, x, F \cdot F\right)}}\\ \mathbf{elif}\;F \leq 230000000:\\ \;\;\;\;\frac{1}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}} \cdot \frac{F}{\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 -2450000.0)
             (/ (- -1.0 t_0) (sin B))
             (if (<= F 4e-26)
               (+
                (* x (/ -1.0 (tan B)))
                (* (/ F B) (/ 1.0 (sqrt (+ 2.0 (fma 2.0 x (* F F)))))))
               (if (<= F 230000000.0)
                 (* (/ 1.0 (sqrt (fma F F 2.0))) (/ F (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 <= -2450000.0) {
        		tmp = (-1.0 - t_0) / sin(B);
        	} else if (F <= 4e-26) {
        		tmp = (x * (-1.0 / tan(B))) + ((F / B) * (1.0 / sqrt((2.0 + fma(2.0, x, (F * F))))));
        	} else if (F <= 230000000.0) {
        		tmp = (1.0 / sqrt(fma(F, F, 2.0))) * (F / 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 <= -2450000.0)
        		tmp = Float64(Float64(-1.0 - t_0) / sin(B));
        	elseif (F <= 4e-26)
        		tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(Float64(F / B) * Float64(1.0 / sqrt(Float64(2.0 + fma(2.0, x, Float64(F * F)))))));
        	elseif (F <= 230000000.0)
        		tmp = Float64(Float64(1.0 / sqrt(fma(F, F, 2.0))) * Float64(F / 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, -2450000.0], N[(N[(-1.0 - t$95$0), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4e-26], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(F / B), $MachinePrecision] * N[(1.0 / N[Sqrt[N[(2.0 + N[(2.0 * x + N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 230000000.0], N[(N[(1.0 / N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(F / N[Sin[B], $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 -2450000:\\
        \;\;\;\;\frac{-1 - t\_0}{\sin B}\\
        
        \mathbf{elif}\;F \leq 4 \cdot 10^{-26}:\\
        \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{B} \cdot \frac{1}{\sqrt{2 + \mathsf{fma}\left(2, x, F \cdot F\right)}}\\
        
        \mathbf{elif}\;F \leq 230000000:\\
        \;\;\;\;\frac{1}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}} \cdot \frac{F}{\sin B}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{1 - t\_0}{\sin B}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 4 regimes
        2. if F < -2.45e6

          1. Initial program 59.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 \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.7

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

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

          if -2.45e6 < F < 4.0000000000000002e-26

          1. Initial program 99.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. 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.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. Taylor expanded in B around 0

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

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

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

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

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

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

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

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

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

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{B} \cdot \frac{1}{\sqrt{2 + \mathsf{fma}\left(2, x, F \cdot F\right)}} \]
            10. lift-*.f6483.7

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

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

          if 4.0000000000000002e-26 < F < 2.3e8

          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 x around 0

            \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + {F}^{2}}}} \]
          4. Step-by-step derivation
            1. *-commutativeN/A

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

              \[\leadsto \sqrt{\frac{1}{2 + {F}^{2}}} \cdot \color{blue}{\frac{F}{\sin B}} \]
            3. lower-sqrt.f64N/A

              \[\leadsto \sqrt{\frac{1}{2 + {F}^{2}}} \cdot \frac{\color{blue}{F}}{\sin B} \]
            4. inv-powN/A

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

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

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

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

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

              \[\leadsto \sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \frac{F}{\sin B} \]
            10. lift-/.f6464.8

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

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

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

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

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

              \[\leadsto \sqrt{\frac{1}{F \cdot F + 2}} \cdot \frac{F}{\sin B} \]
            5. pow2N/A

              \[\leadsto \sqrt{\frac{1}{{F}^{2} + 2}} \cdot \frac{F}{\sin B} \]
            6. +-commutativeN/A

              \[\leadsto \sqrt{\frac{1}{2 + {F}^{2}}} \cdot \frac{F}{\sin B} \]
            7. sqrt-divN/A

              \[\leadsto \frac{\sqrt{1}}{\sqrt{2 + {F}^{2}}} \cdot \frac{\color{blue}{F}}{\sin B} \]
            8. metadata-evalN/A

              \[\leadsto \frac{1}{\sqrt{2 + {F}^{2}}} \cdot \frac{F}{\sin B} \]
            9. lower-/.f64N/A

              \[\leadsto \frac{1}{\sqrt{2 + {F}^{2}}} \cdot \frac{\color{blue}{F}}{\sin B} \]
            10. lower-sqrt.f64N/A

              \[\leadsto \frac{1}{\sqrt{2 + {F}^{2}}} \cdot \frac{F}{\sin B} \]
            11. +-commutativeN/A

              \[\leadsto \frac{1}{\sqrt{{F}^{2} + 2}} \cdot \frac{F}{\sin B} \]
            12. pow2N/A

              \[\leadsto \frac{1}{\sqrt{F \cdot F + 2}} \cdot \frac{F}{\sin B} \]
            13. lift-fma.f6464.7

              \[\leadsto \frac{1}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}} \cdot \frac{F}{\sin B} \]
          7. Applied rewrites64.7%

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

          if 2.3e8 < F

          1. Initial program 56.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 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.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}} \]
        3. Recombined 4 regimes into one program.
        4. Final simplification91.8%

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

        Alternative 7: 84.8% accurate, 1.5× speedup?

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

          1. Initial program 51.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 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-/.f6475.6

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

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

          if -1.84999999999999999e68 < F < 4.0000000000000002e-26

          1. Initial program 99.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 rewrites99.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. Taylor expanded in B around 0

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

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

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

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

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

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

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

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

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

              \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{B} \cdot \frac{1}{\sqrt{2 + \mathsf{fma}\left(2, x, F \cdot F\right)}} \]
            10. lift-*.f6482.2

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

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

          if 4.0000000000000002e-26 < F < 2.3e8

          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 x around 0

            \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + {F}^{2}}}} \]
          4. Step-by-step derivation
            1. *-commutativeN/A

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

              \[\leadsto \sqrt{\frac{1}{2 + {F}^{2}}} \cdot \color{blue}{\frac{F}{\sin B}} \]
            3. lower-sqrt.f64N/A

              \[\leadsto \sqrt{\frac{1}{2 + {F}^{2}}} \cdot \frac{\color{blue}{F}}{\sin B} \]
            4. inv-powN/A

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

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

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

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

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

              \[\leadsto \sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \frac{F}{\sin B} \]
            10. lift-/.f6464.8

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

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

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

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

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

              \[\leadsto \sqrt{\frac{1}{F \cdot F + 2}} \cdot \frac{F}{\sin B} \]
            5. pow2N/A

              \[\leadsto \sqrt{\frac{1}{{F}^{2} + 2}} \cdot \frac{F}{\sin B} \]
            6. +-commutativeN/A

              \[\leadsto \sqrt{\frac{1}{2 + {F}^{2}}} \cdot \frac{F}{\sin B} \]
            7. sqrt-divN/A

              \[\leadsto \frac{\sqrt{1}}{\sqrt{2 + {F}^{2}}} \cdot \frac{\color{blue}{F}}{\sin B} \]
            8. metadata-evalN/A

              \[\leadsto \frac{1}{\sqrt{2 + {F}^{2}}} \cdot \frac{F}{\sin B} \]
            9. lower-/.f64N/A

              \[\leadsto \frac{1}{\sqrt{2 + {F}^{2}}} \cdot \frac{\color{blue}{F}}{\sin B} \]
            10. lower-sqrt.f64N/A

              \[\leadsto \frac{1}{\sqrt{2 + {F}^{2}}} \cdot \frac{F}{\sin B} \]
            11. +-commutativeN/A

              \[\leadsto \frac{1}{\sqrt{{F}^{2} + 2}} \cdot \frac{F}{\sin B} \]
            12. pow2N/A

              \[\leadsto \frac{1}{\sqrt{F \cdot F + 2}} \cdot \frac{F}{\sin B} \]
            13. lift-fma.f6464.7

              \[\leadsto \frac{1}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}} \cdot \frac{F}{\sin B} \]
          7. Applied rewrites64.7%

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

          if 2.3e8 < F

          1. Initial program 56.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 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.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}} \]
        3. Recombined 4 regimes into one program.
        4. Final simplification84.8%

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

        Alternative 8: 57.6% accurate, 2.4× 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 0.00045:\\ \;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(0.3333333333333333, x, 0.16666666666666666 \cdot t\_0\right), B \cdot B, t\_0\right) - x}{B}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B \cdot \left(1 + -0.16666666666666666 \cdot \left(B \cdot B\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 0.00045)
             (/
              (-
               (fma (fma 0.3333333333333333 x (* 0.16666666666666666 t_0)) (* B B) t_0)
               x)
              B)
             (+
              (* x (/ -1.0 (tan B)))
              (/ -1.0 (* B (+ 1.0 (* -0.16666666666666666 (* B 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 <= 0.00045) {
        		tmp = (fma(fma(0.3333333333333333, x, (0.16666666666666666 * t_0)), (B * B), t_0) - x) / B;
        	} else {
        		tmp = (x * (-1.0 / tan(B))) + (-1.0 / (B * (1.0 + (-0.16666666666666666 * (B * 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 <= 0.00045)
        		tmp = Float64(Float64(fma(fma(0.3333333333333333, x, Float64(0.16666666666666666 * t_0)), Float64(B * B), t_0) - x) / B);
        	else
        		tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / Float64(B * Float64(1.0 + Float64(-0.16666666666666666 * Float64(B * 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, 0.00045], N[(N[(N[(N[(0.3333333333333333 * x + N[(0.16666666666666666 * t$95$0), $MachinePrecision]), $MachinePrecision] * N[(B * B), $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[(-0.16666666666666666 * N[(B * B), $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 0.00045:\\
        \;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(0.3333333333333333, x, 0.16666666666666666 \cdot t\_0\right), B \cdot B, t\_0\right) - x}{B}\\
        
        \mathbf{else}:\\
        \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B \cdot \left(1 + -0.16666666666666666 \cdot \left(B \cdot B\right)\right)}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if B < 4.4999999999999999e-4

          1. Initial program 74.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 rewrites85.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 inf

            \[\leadsto \left(-x \cdot \color{blue}{\frac{\cos B}{\sin 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. Step-by-step derivation
            1. lower-/.f64N/A

              \[\leadsto \left(-x \cdot \frac{\cos B}{\color{blue}{\sin 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-cos.f64N/A

              \[\leadsto \left(-x \cdot \frac{\cos B}{\sin \color{blue}{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-sin.f6485.3

              \[\leadsto \left(-x \cdot \frac{\cos B}{\sin 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. Applied rewrites85.3%

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

              \[\leadsto \left(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin B}\right) + \frac{F \cdot \frac{\color{blue}{1}}{\sqrt{2 + \left(2 \cdot x + {F}^{2}\right)}}}{\sin B} \]
          9. Applied rewrites85.4%

            \[\leadsto \left(-x \cdot \frac{\cos B}{\sin 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} \]
          10. 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}} \]
          11. Applied rewrites58.8%

            \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\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), B \cdot B, \frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}\right) - x}{B}} \]

          if 4.4999999999999999e-4 < B

          1. Initial program 86.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.f6455.5

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

            \[\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-*.f6453.9

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

            \[\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)}} \]
        3. Recombined 2 regimes into one program.
        4. Final simplification57.6%

          \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 0.00045:\\ \;\;\;\;\frac{\mathsf{fma}\left(\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), B \cdot B, \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 + -0.16666666666666666 \cdot \left(B \cdot B\right)\right)}\\ \end{array} \]
        5. Add Preprocessing

        Alternative 9: 59.3% 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}\;F \leq -2450000:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 7.5 \cdot 10^{-29}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(0.3333333333333333, x, 0.16666666666666666 \cdot t\_0\right), B \cdot B, t\_0\right) - x}{B}\\ \mathbf{elif}\;F \leq 1.42:\\ \;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{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))))))
           (if (<= F -2450000.0)
             (+ (- (/ x B)) (/ -1.0 (sin B)))
             (if (<= F 7.5e-29)
               (/
                (-
                 (fma
                  (fma 0.3333333333333333 x (* 0.16666666666666666 t_0))
                  (* B B)
                  t_0)
                 x)
                B)
               (if (<= F 1.42) (/ (* F (sqrt 0.5)) (sin B)) (/ 1.0 (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 <= -2450000.0) {
        		tmp = -(x / B) + (-1.0 / sin(B));
        	} else if (F <= 7.5e-29) {
        		tmp = (fma(fma(0.3333333333333333, x, (0.16666666666666666 * t_0)), (B * B), t_0) - x) / B;
        	} else if (F <= 1.42) {
        		tmp = (F * sqrt(0.5)) / sin(B);
        	} else {
        		tmp = 1.0 / 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 <= -2450000.0)
        		tmp = Float64(Float64(-Float64(x / B)) + Float64(-1.0 / sin(B)));
        	elseif (F <= 7.5e-29)
        		tmp = Float64(Float64(fma(fma(0.3333333333333333, x, Float64(0.16666666666666666 * t_0)), Float64(B * B), t_0) - x) / B);
        	elseif (F <= 1.42)
        		tmp = Float64(Float64(F * sqrt(0.5)) / sin(B));
        	else
        		tmp = Float64(1.0 / 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, -2450000.0], N[((-N[(x / B), $MachinePrecision]) + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7.5e-29], N[(N[(N[(N[(0.3333333333333333 * x + N[(0.16666666666666666 * t$95$0), $MachinePrecision]), $MachinePrecision] * N[(B * B), $MachinePrecision] + t$95$0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.42], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(1.0 / 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 -2450000:\\
        \;\;\;\;\left(-\frac{x}{B}\right) + \frac{-1}{\sin B}\\
        
        \mathbf{elif}\;F \leq 7.5 \cdot 10^{-29}:\\
        \;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(0.3333333333333333, x, 0.16666666666666666 \cdot t\_0\right), B \cdot B, t\_0\right) - x}{B}\\
        
        \mathbf{elif}\;F \leq 1.42:\\
        \;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{1}{\sin B}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 4 regimes
        2. if F < -2.45e6

          1. Initial program 59.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.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-/.f6476.5

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

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

          if -2.45e6 < F < 7.50000000000000006e-29

          1. Initial program 99.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. 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.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. Taylor expanded in B around inf

            \[\leadsto \left(-x \cdot \color{blue}{\frac{\cos B}{\sin 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. Step-by-step derivation
            1. lower-/.f64N/A

              \[\leadsto \left(-x \cdot \frac{\cos B}{\color{blue}{\sin 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-cos.f64N/A

              \[\leadsto \left(-x \cdot \frac{\cos B}{\sin \color{blue}{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-sin.f6499.5

              \[\leadsto \left(-x \cdot \frac{\cos B}{\sin 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. Applied rewrites99.5%

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

              \[\leadsto \left(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin B}\right) + \frac{F \cdot \frac{\color{blue}{1}}{\sqrt{2 + \left(2 \cdot x + {F}^{2}\right)}}}{\sin B} \]
          9. Applied rewrites99.4%

            \[\leadsto \left(-x \cdot \frac{\cos B}{\sin 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} \]
          10. 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}} \]
          11. Applied rewrites52.2%

            \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\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), B \cdot B, \frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}\right) - x}{B}} \]

          if 7.50000000000000006e-29 < F < 1.4199999999999999

          1. Initial program 99.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 0

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

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

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

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

              \[\leadsto \sqrt{\frac{1}{2 + 2 \cdot x}} \cdot \frac{F}{\sin B} - \frac{\color{blue}{x} \cdot \cos B}{\sin B} \]
            5. inv-powN/A

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

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

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

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

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

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

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

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

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

              \[\leadsto \sqrt{{\left(\mathsf{fma}\left(2, x, 2\right)\right)}^{-1}} \cdot \frac{F}{\sin B} - \frac{\cos B \cdot x}{\sin B} \]
            15. lift-sin.f6491.0

              \[\leadsto \sqrt{{\left(\mathsf{fma}\left(2, x, 2\right)\right)}^{-1}} \cdot \frac{F}{\sin B} - \frac{\cos B \cdot x}{\sin B} \]
          5. Applied rewrites91.0%

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

            \[\leadsto \frac{F \cdot \sqrt{\frac{1}{2}}}{\color{blue}{\sin B}} \]
          7. Step-by-step derivation
            1. metadata-evalN/A

              \[\leadsto \frac{F \cdot \sqrt{-1 \cdot \frac{-1}{2}}}{\sin B} \]
            2. sqrt-unprodN/A

              \[\leadsto \frac{F \cdot \left(\sqrt{-1} \cdot \sqrt{\frac{-1}{2}}\right)}{\sin B} \]
            3. sqrt-unprodN/A

              \[\leadsto \frac{F \cdot \sqrt{-1 \cdot \frac{-1}{2}}}{\sin B} \]
            4. metadata-evalN/A

              \[\leadsto \frac{F \cdot \sqrt{\frac{1}{2}}}{\sin B} \]
            5. metadata-evalN/A

              \[\leadsto \frac{F \cdot \sqrt{\frac{1}{2}}}{\sin B} \]
            6. lower-/.f64N/A

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

              \[\leadsto \frac{F \cdot \sqrt{\frac{1}{2}}}{\sin B} \]
            8. lower-sqrt.f64N/A

              \[\leadsto \frac{F \cdot \sqrt{\frac{1}{2}}}{\sin B} \]
            9. metadata-evalN/A

              \[\leadsto \frac{F \cdot \sqrt{\frac{1}{2}}}{\sin B} \]
            10. lift-sin.f6458.0

              \[\leadsto \frac{F \cdot \sqrt{0.5}}{\sin B} \]
          8. Applied rewrites58.0%

            \[\leadsto \frac{F \cdot \sqrt{0.5}}{\color{blue}{\sin B}} \]

          if 1.4199999999999999 < F

          1. Initial program 57.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 x around 0

            \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + {F}^{2}}}} \]
          4. Step-by-step derivation
            1. *-commutativeN/A

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

              \[\leadsto \sqrt{\frac{1}{2 + {F}^{2}}} \cdot \color{blue}{\frac{F}{\sin B}} \]
            3. lower-sqrt.f64N/A

              \[\leadsto \sqrt{\frac{1}{2 + {F}^{2}}} \cdot \frac{\color{blue}{F}}{\sin B} \]
            4. inv-powN/A

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

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

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

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

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

              \[\leadsto \sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \frac{F}{\sin B} \]
            10. lift-/.f6424.8

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

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

            \[\leadsto \frac{1}{\color{blue}{\sin B}} \]
          7. Step-by-step derivation
            1. inv-powN/A

              \[\leadsto {\sin B}^{-1} \]
            2. lower-pow.f64N/A

              \[\leadsto {\sin B}^{-1} \]
            3. lift-sin.f6453.6

              \[\leadsto {\sin B}^{-1} \]
          8. Applied rewrites53.6%

            \[\leadsto {\sin B}^{\color{blue}{-1}} \]
          9. Step-by-step derivation
            1. lift-pow.f64N/A

              \[\leadsto {\sin B}^{-1} \]
            2. lift-sin.f64N/A

              \[\leadsto {\sin B}^{-1} \]
            3. inv-powN/A

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

              \[\leadsto \frac{1}{\sin B} \]
            5. lift-sin.f6453.6

              \[\leadsto \frac{1}{\sin B} \]
          10. Applied rewrites53.6%

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

        Alternative 10: 52.1% 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}\;F \leq -8 \cdot 10^{+151}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 7.5 \cdot 10^{-29}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(0.3333333333333333, x, 0.16666666666666666 \cdot t\_0\right), B \cdot B, t\_0\right) - x}{B}\\ \mathbf{elif}\;F \leq 1.42:\\ \;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{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))))))
           (if (<= F -8e+151)
             (/ -1.0 (sin B))
             (if (<= F 7.5e-29)
               (/
                (-
                 (fma
                  (fma 0.3333333333333333 x (* 0.16666666666666666 t_0))
                  (* B B)
                  t_0)
                 x)
                B)
               (if (<= F 1.42) (/ (* F (sqrt 0.5)) (sin B)) (/ 1.0 (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 <= -8e+151) {
        		tmp = -1.0 / sin(B);
        	} else if (F <= 7.5e-29) {
        		tmp = (fma(fma(0.3333333333333333, x, (0.16666666666666666 * t_0)), (B * B), t_0) - x) / B;
        	} else if (F <= 1.42) {
        		tmp = (F * sqrt(0.5)) / sin(B);
        	} else {
        		tmp = 1.0 / 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 <= -8e+151)
        		tmp = Float64(-1.0 / sin(B));
        	elseif (F <= 7.5e-29)
        		tmp = Float64(Float64(fma(fma(0.3333333333333333, x, Float64(0.16666666666666666 * t_0)), Float64(B * B), t_0) - x) / B);
        	elseif (F <= 1.42)
        		tmp = Float64(Float64(F * sqrt(0.5)) / sin(B));
        	else
        		tmp = Float64(1.0 / 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, -8e+151], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7.5e-29], N[(N[(N[(N[(0.3333333333333333 * x + N[(0.16666666666666666 * t$95$0), $MachinePrecision]), $MachinePrecision] * N[(B * B), $MachinePrecision] + t$95$0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.42], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(1.0 / 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 -8 \cdot 10^{+151}:\\
        \;\;\;\;\frac{-1}{\sin B}\\
        
        \mathbf{elif}\;F \leq 7.5 \cdot 10^{-29}:\\
        \;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(0.3333333333333333, x, 0.16666666666666666 \cdot t\_0\right), B \cdot B, t\_0\right) - x}{B}\\
        
        \mathbf{elif}\;F \leq 1.42:\\
        \;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{1}{\sin B}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 4 regimes
        2. if F < -8.00000000000000014e151

          1. Initial program 33.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 x around 0

            \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + {F}^{2}}}} \]
          4. Step-by-step derivation
            1. *-commutativeN/A

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

              \[\leadsto \sqrt{\frac{1}{2 + {F}^{2}}} \cdot \color{blue}{\frac{F}{\sin B}} \]
            3. lower-sqrt.f64N/A

              \[\leadsto \sqrt{\frac{1}{2 + {F}^{2}}} \cdot \frac{\color{blue}{F}}{\sin B} \]
            4. inv-powN/A

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

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

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

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

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

              \[\leadsto \sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \frac{F}{\sin B} \]
            10. lift-/.f642.3

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

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

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

              \[\leadsto \frac{-1}{\sin B} \]
            2. lift-sin.f6447.2

              \[\leadsto \frac{-1}{\sin B} \]
          8. Applied rewrites47.2%

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

          if -8.00000000000000014e151 < F < 7.50000000000000006e-29

          1. Initial program 97.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. 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.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. Taylor expanded in B around inf

            \[\leadsto \left(-x \cdot \color{blue}{\frac{\cos B}{\sin 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. Step-by-step derivation
            1. lower-/.f64N/A

              \[\leadsto \left(-x \cdot \frac{\cos B}{\color{blue}{\sin 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-cos.f64N/A

              \[\leadsto \left(-x \cdot \frac{\cos B}{\sin \color{blue}{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-sin.f6499.5

              \[\leadsto \left(-x \cdot \frac{\cos B}{\sin 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. Applied rewrites99.5%

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

              \[\leadsto \left(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin B}\right) + \frac{F \cdot \frac{\color{blue}{1}}{\sqrt{2 + \left(2 \cdot x + {F}^{2}\right)}}}{\sin B} \]
          9. Applied rewrites99.5%

            \[\leadsto \left(-x \cdot \frac{\cos B}{\sin 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} \]
          10. 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}} \]
          11. Applied rewrites52.5%

            \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\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), B \cdot B, \frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}\right) - x}{B}} \]

          if 7.50000000000000006e-29 < F < 1.4199999999999999

          1. Initial program 99.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 0

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

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

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

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

              \[\leadsto \sqrt{\frac{1}{2 + 2 \cdot x}} \cdot \frac{F}{\sin B} - \frac{\color{blue}{x} \cdot \cos B}{\sin B} \]
            5. inv-powN/A

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

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

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

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

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

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

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

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

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

              \[\leadsto \sqrt{{\left(\mathsf{fma}\left(2, x, 2\right)\right)}^{-1}} \cdot \frac{F}{\sin B} - \frac{\cos B \cdot x}{\sin B} \]
            15. lift-sin.f6491.0

              \[\leadsto \sqrt{{\left(\mathsf{fma}\left(2, x, 2\right)\right)}^{-1}} \cdot \frac{F}{\sin B} - \frac{\cos B \cdot x}{\sin B} \]
          5. Applied rewrites91.0%

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

            \[\leadsto \frac{F \cdot \sqrt{\frac{1}{2}}}{\color{blue}{\sin B}} \]
          7. Step-by-step derivation
            1. metadata-evalN/A

              \[\leadsto \frac{F \cdot \sqrt{-1 \cdot \frac{-1}{2}}}{\sin B} \]
            2. sqrt-unprodN/A

              \[\leadsto \frac{F \cdot \left(\sqrt{-1} \cdot \sqrt{\frac{-1}{2}}\right)}{\sin B} \]
            3. sqrt-unprodN/A

              \[\leadsto \frac{F \cdot \sqrt{-1 \cdot \frac{-1}{2}}}{\sin B} \]
            4. metadata-evalN/A

              \[\leadsto \frac{F \cdot \sqrt{\frac{1}{2}}}{\sin B} \]
            5. metadata-evalN/A

              \[\leadsto \frac{F \cdot \sqrt{\frac{1}{2}}}{\sin B} \]
            6. lower-/.f64N/A

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

              \[\leadsto \frac{F \cdot \sqrt{\frac{1}{2}}}{\sin B} \]
            8. lower-sqrt.f64N/A

              \[\leadsto \frac{F \cdot \sqrt{\frac{1}{2}}}{\sin B} \]
            9. metadata-evalN/A

              \[\leadsto \frac{F \cdot \sqrt{\frac{1}{2}}}{\sin B} \]
            10. lift-sin.f6458.0

              \[\leadsto \frac{F \cdot \sqrt{0.5}}{\sin B} \]
          8. Applied rewrites58.0%

            \[\leadsto \frac{F \cdot \sqrt{0.5}}{\color{blue}{\sin B}} \]

          if 1.4199999999999999 < F

          1. Initial program 57.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 x around 0

            \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + {F}^{2}}}} \]
          4. Step-by-step derivation
            1. *-commutativeN/A

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

              \[\leadsto \sqrt{\frac{1}{2 + {F}^{2}}} \cdot \color{blue}{\frac{F}{\sin B}} \]
            3. lower-sqrt.f64N/A

              \[\leadsto \sqrt{\frac{1}{2 + {F}^{2}}} \cdot \frac{\color{blue}{F}}{\sin B} \]
            4. inv-powN/A

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

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

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

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

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

              \[\leadsto \sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \frac{F}{\sin B} \]
            10. lift-/.f6424.8

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

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

            \[\leadsto \frac{1}{\color{blue}{\sin B}} \]
          7. Step-by-step derivation
            1. inv-powN/A

              \[\leadsto {\sin B}^{-1} \]
            2. lower-pow.f64N/A

              \[\leadsto {\sin B}^{-1} \]
            3. lift-sin.f6453.6

              \[\leadsto {\sin B}^{-1} \]
          8. Applied rewrites53.6%

            \[\leadsto {\sin B}^{\color{blue}{-1}} \]
          9. Step-by-step derivation
            1. lift-pow.f64N/A

              \[\leadsto {\sin B}^{-1} \]
            2. lift-sin.f64N/A

              \[\leadsto {\sin B}^{-1} \]
            3. inv-powN/A

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

              \[\leadsto \frac{1}{\sin B} \]
            5. lift-sin.f6453.6

              \[\leadsto \frac{1}{\sin B} \]
          10. Applied rewrites53.6%

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

        Alternative 11: 56.8% 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 0.00045:\\ \;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(0.3333333333333333, x, 0.16666666666666666 \cdot t\_0\right), B \cdot B, 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 0.00045)
             (/
              (-
               (fma (fma 0.3333333333333333 x (* 0.16666666666666666 t_0)) (* B B) 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 <= 0.00045) {
        		tmp = (fma(fma(0.3333333333333333, x, (0.16666666666666666 * t_0)), (B * B), 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 <= 0.00045)
        		tmp = Float64(Float64(fma(fma(0.3333333333333333, x, Float64(0.16666666666666666 * t_0)), Float64(B * B), 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, 0.00045], N[(N[(N[(N[(0.3333333333333333 * x + N[(0.16666666666666666 * t$95$0), $MachinePrecision]), $MachinePrecision] * N[(B * B), $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 0.00045:\\
        \;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(0.3333333333333333, x, 0.16666666666666666 \cdot t\_0\right), B \cdot B, 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 < 4.4999999999999999e-4

          1. Initial program 74.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 rewrites85.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 inf

            \[\leadsto \left(-x \cdot \color{blue}{\frac{\cos B}{\sin 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. Step-by-step derivation
            1. lower-/.f64N/A

              \[\leadsto \left(-x \cdot \frac{\cos B}{\color{blue}{\sin 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-cos.f64N/A

              \[\leadsto \left(-x \cdot \frac{\cos B}{\sin \color{blue}{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-sin.f6485.3

              \[\leadsto \left(-x \cdot \frac{\cos B}{\sin 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. Applied rewrites85.3%

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

              \[\leadsto \left(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin B}\right) + \frac{F \cdot \frac{\color{blue}{1}}{\sqrt{2 + \left(2 \cdot x + {F}^{2}\right)}}}{\sin B} \]
          9. Applied rewrites85.4%

            \[\leadsto \left(-x \cdot \frac{\cos B}{\sin 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} \]
          10. 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}} \]
          11. Applied rewrites58.8%

            \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\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), B \cdot B, \frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}\right) - x}{B}} \]

          if 4.4999999999999999e-4 < B

          1. Initial program 86.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.f6455.5

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

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

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 0.00045:\\ \;\;\;\;\frac{\mathsf{fma}\left(\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), B \cdot B, \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 12: 52.0% accurate, 3.0× 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 -8 \cdot 10^{+151}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 5.2 \cdot 10^{+16}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(0.3333333333333333, x, 0.16666666666666666 \cdot t\_0\right), B \cdot B, t\_0\right) - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{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))))))
             (if (<= F -8e+151)
               (/ -1.0 (sin B))
               (if (<= F 5.2e+16)
                 (/
                  (-
                   (fma
                    (fma 0.3333333333333333 x (* 0.16666666666666666 t_0))
                    (* B B)
                    t_0)
                   x)
                  B)
                 (/ 1.0 (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 <= -8e+151) {
          		tmp = -1.0 / sin(B);
          	} else if (F <= 5.2e+16) {
          		tmp = (fma(fma(0.3333333333333333, x, (0.16666666666666666 * t_0)), (B * B), t_0) - x) / B;
          	} else {
          		tmp = 1.0 / 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 <= -8e+151)
          		tmp = Float64(-1.0 / sin(B));
          	elseif (F <= 5.2e+16)
          		tmp = Float64(Float64(fma(fma(0.3333333333333333, x, Float64(0.16666666666666666 * t_0)), Float64(B * B), t_0) - x) / B);
          	else
          		tmp = Float64(1.0 / 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, -8e+151], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.2e+16], N[(N[(N[(N[(0.3333333333333333 * x + N[(0.16666666666666666 * t$95$0), $MachinePrecision]), $MachinePrecision] * N[(B * B), $MachinePrecision] + t$95$0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(1.0 / 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 -8 \cdot 10^{+151}:\\
          \;\;\;\;\frac{-1}{\sin B}\\
          
          \mathbf{elif}\;F \leq 5.2 \cdot 10^{+16}:\\
          \;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(0.3333333333333333, x, 0.16666666666666666 \cdot t\_0\right), B \cdot B, t\_0\right) - x}{B}\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{1}{\sin B}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if F < -8.00000000000000014e151

            1. Initial program 33.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 x around 0

              \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + {F}^{2}}}} \]
            4. Step-by-step derivation
              1. *-commutativeN/A

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

                \[\leadsto \sqrt{\frac{1}{2 + {F}^{2}}} \cdot \color{blue}{\frac{F}{\sin B}} \]
              3. lower-sqrt.f64N/A

                \[\leadsto \sqrt{\frac{1}{2 + {F}^{2}}} \cdot \frac{\color{blue}{F}}{\sin B} \]
              4. inv-powN/A

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

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

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

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

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

                \[\leadsto \sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \frac{F}{\sin B} \]
              10. lift-/.f642.3

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

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

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

                \[\leadsto \frac{-1}{\sin B} \]
              2. lift-sin.f6447.2

                \[\leadsto \frac{-1}{\sin B} \]
            8. Applied rewrites47.2%

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

            if -8.00000000000000014e151 < F < 5.2e16

            1. Initial program 97.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 rewrites99.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. Taylor expanded in B around inf

              \[\leadsto \left(-x \cdot \color{blue}{\frac{\cos B}{\sin 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. Step-by-step derivation
              1. lower-/.f64N/A

                \[\leadsto \left(-x \cdot \frac{\cos B}{\color{blue}{\sin 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-cos.f64N/A

                \[\leadsto \left(-x \cdot \frac{\cos B}{\sin \color{blue}{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-sin.f6499.5

                \[\leadsto \left(-x \cdot \frac{\cos B}{\sin 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. Applied rewrites99.5%

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

                \[\leadsto \left(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin B}\right) + \frac{F \cdot \frac{\color{blue}{1}}{\sqrt{2 + \left(2 \cdot x + {F}^{2}\right)}}}{\sin B} \]
            9. Applied rewrites99.5%

              \[\leadsto \left(-x \cdot \frac{\cos B}{\sin 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} \]
            10. 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}} \]
            11. Applied rewrites52.5%

              \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\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), B \cdot B, \frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}\right) - x}{B}} \]

            if 5.2e16 < F

            1. Initial program 54.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 x around 0

              \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + {F}^{2}}}} \]
            4. Step-by-step derivation
              1. *-commutativeN/A

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

                \[\leadsto \sqrt{\frac{1}{2 + {F}^{2}}} \cdot \color{blue}{\frac{F}{\sin B}} \]
              3. lower-sqrt.f64N/A

                \[\leadsto \sqrt{\frac{1}{2 + {F}^{2}}} \cdot \frac{\color{blue}{F}}{\sin B} \]
              4. inv-powN/A

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

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

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

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

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

                \[\leadsto \sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \frac{F}{\sin B} \]
              10. lift-/.f6422.9

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

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

              \[\leadsto \frac{1}{\color{blue}{\sin B}} \]
            7. Step-by-step derivation
              1. inv-powN/A

                \[\leadsto {\sin B}^{-1} \]
              2. lower-pow.f64N/A

                \[\leadsto {\sin B}^{-1} \]
              3. lift-sin.f6453.7

                \[\leadsto {\sin B}^{-1} \]
            8. Applied rewrites53.7%

              \[\leadsto {\sin B}^{\color{blue}{-1}} \]
            9. Step-by-step derivation
              1. lift-pow.f64N/A

                \[\leadsto {\sin B}^{-1} \]
              2. lift-sin.f64N/A

                \[\leadsto {\sin B}^{-1} \]
              3. inv-powN/A

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

                \[\leadsto \frac{1}{\sin B} \]
              5. lift-sin.f6453.7

                \[\leadsto \frac{1}{\sin B} \]
            10. Applied rewrites53.7%

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

          Alternative 13: 51.3% accurate, 3.1× 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 -8 \cdot 10^{+151}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 0.027:\\ \;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(0.3333333333333333, x, 0.16666666666666666 \cdot t\_0\right), B \cdot B, t\_0\right) - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{\frac{\frac{\mathsf{fma}\left(2, x, 2\right)}{B}}{F}}{F}, -0.5, \frac{1 - x}{B}\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 (<= F -8e+151)
               (/ -1.0 (sin B))
               (if (<= F 0.027)
                 (/
                  (-
                   (fma
                    (fma 0.3333333333333333 x (* 0.16666666666666666 t_0))
                    (* B B)
                    t_0)
                   x)
                  B)
                 (fma (/ (/ (/ (fma 2.0 x 2.0) B) F) F) -0.5 (/ (- 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 <= -8e+151) {
          		tmp = -1.0 / sin(B);
          	} else if (F <= 0.027) {
          		tmp = (fma(fma(0.3333333333333333, x, (0.16666666666666666 * t_0)), (B * B), t_0) - x) / B;
          	} else {
          		tmp = fma((((fma(2.0, x, 2.0) / B) / F) / F), -0.5, ((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 <= -8e+151)
          		tmp = Float64(-1.0 / sin(B));
          	elseif (F <= 0.027)
          		tmp = Float64(Float64(fma(fma(0.3333333333333333, x, Float64(0.16666666666666666 * t_0)), Float64(B * B), t_0) - x) / B);
          	else
          		tmp = fma(Float64(Float64(Float64(fma(2.0, x, 2.0) / B) / F) / F), -0.5, 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, -8e+151], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.027], N[(N[(N[(N[(0.3333333333333333 * x + N[(0.16666666666666666 * t$95$0), $MachinePrecision]), $MachinePrecision] * N[(B * B), $MachinePrecision] + t$95$0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(N[(N[(N[(2.0 * x + 2.0), $MachinePrecision] / B), $MachinePrecision] / F), $MachinePrecision] / F), $MachinePrecision] * -0.5 + N[(N[(1.0 - x), $MachinePrecision] / 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 -8 \cdot 10^{+151}:\\
          \;\;\;\;\frac{-1}{\sin B}\\
          
          \mathbf{elif}\;F \leq 0.027:\\
          \;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(0.3333333333333333, x, 0.16666666666666666 \cdot t\_0\right), B \cdot B, t\_0\right) - x}{B}\\
          
          \mathbf{else}:\\
          \;\;\;\;\mathsf{fma}\left(\frac{\frac{\frac{\mathsf{fma}\left(2, x, 2\right)}{B}}{F}}{F}, -0.5, \frac{1 - x}{B}\right)\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if F < -8.00000000000000014e151

            1. Initial program 33.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 x around 0

              \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + {F}^{2}}}} \]
            4. Step-by-step derivation
              1. *-commutativeN/A

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

                \[\leadsto \sqrt{\frac{1}{2 + {F}^{2}}} \cdot \color{blue}{\frac{F}{\sin B}} \]
              3. lower-sqrt.f64N/A

                \[\leadsto \sqrt{\frac{1}{2 + {F}^{2}}} \cdot \frac{\color{blue}{F}}{\sin B} \]
              4. inv-powN/A

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

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

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

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

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

                \[\leadsto \sqrt{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-1}} \cdot \frac{F}{\sin B} \]
              10. lift-/.f642.3

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

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

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

                \[\leadsto \frac{-1}{\sin B} \]
              2. lift-sin.f6447.2

                \[\leadsto \frac{-1}{\sin B} \]
            8. Applied rewrites47.2%

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

            if -8.00000000000000014e151 < F < 0.0269999999999999997

            1. Initial program 97.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. 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.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. Taylor expanded in B around inf

              \[\leadsto \left(-x \cdot \color{blue}{\frac{\cos B}{\sin 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. Step-by-step derivation
              1. lower-/.f64N/A

                \[\leadsto \left(-x \cdot \frac{\cos B}{\color{blue}{\sin 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-cos.f64N/A

                \[\leadsto \left(-x \cdot \frac{\cos B}{\sin \color{blue}{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-sin.f6499.5

                \[\leadsto \left(-x \cdot \frac{\cos B}{\sin 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. Applied rewrites99.5%

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

                \[\leadsto \left(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin B}\right) + \frac{F \cdot \frac{\color{blue}{1}}{\sqrt{2 + \left(2 \cdot x + {F}^{2}\right)}}}{\sin B} \]
            9. Applied rewrites99.5%

              \[\leadsto \left(-x \cdot \frac{\cos B}{\sin 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} \]
            10. 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}} \]
            11. Applied rewrites52.5%

              \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\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), B \cdot B, \frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}\right) - x}{B}} \]

            if 0.0269999999999999997 < F

            1. Initial program 57.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 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 rewrites38.0%

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

                \[\leadsto \frac{-1 - x}{B} \]
              2. Taylor expanded in F around inf

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

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

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

                  \[\leadsto \frac{2 + 2 \cdot x}{B \cdot {F}^{2}} \cdot \frac{-1}{2} + \frac{1 - x}{B} \]
                4. lower-fma.f64N/A

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

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

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

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

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

                  \[\leadsto \mathsf{fma}\left(\frac{\frac{\mathsf{fma}\left(2, x, 2\right)}{B}}{{F}^{2}}, \frac{-1}{2}, \frac{1 - x}{B}\right) \]
                10. pow2N/A

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

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

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

                  \[\leadsto \mathsf{fma}\left(\frac{\frac{\mathsf{fma}\left(2, x, 2\right)}{B}}{F \cdot F}, -0.5, \frac{1 - x}{B}\right) \]
              4. Applied rewrites43.3%

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

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

                  \[\leadsto \mathsf{fma}\left(\frac{\frac{\mathsf{fma}\left(2, x, 2\right)}{B}}{F \cdot F}, \mathsf{neg}\left(\frac{1}{2}\right), \frac{1 - x}{B}\right) \]
              6. Applied rewrites50.8%

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

            Alternative 14: 52.1% 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 -9.2 \cdot 10^{+60}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 0.027:\\ \;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(0.3333333333333333, x, 0.16666666666666666 \cdot t\_0\right), B \cdot B, t\_0\right) - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{\frac{\frac{\mathsf{fma}\left(2, x, 2\right)}{B}}{F}}{F}, -0.5, \frac{1 - x}{B}\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 (<= F -9.2e+60)
                 (/ (- -1.0 x) B)
                 (if (<= F 0.027)
                   (/
                    (-
                     (fma
                      (fma 0.3333333333333333 x (* 0.16666666666666666 t_0))
                      (* B B)
                      t_0)
                     x)
                    B)
                   (fma (/ (/ (/ (fma 2.0 x 2.0) B) F) F) -0.5 (/ (- 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 <= -9.2e+60) {
            		tmp = (-1.0 - x) / B;
            	} else if (F <= 0.027) {
            		tmp = (fma(fma(0.3333333333333333, x, (0.16666666666666666 * t_0)), (B * B), t_0) - x) / B;
            	} else {
            		tmp = fma((((fma(2.0, x, 2.0) / B) / F) / F), -0.5, ((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 <= -9.2e+60)
            		tmp = Float64(Float64(-1.0 - x) / B);
            	elseif (F <= 0.027)
            		tmp = Float64(Float64(fma(fma(0.3333333333333333, x, Float64(0.16666666666666666 * t_0)), Float64(B * B), t_0) - x) / B);
            	else
            		tmp = fma(Float64(Float64(Float64(fma(2.0, x, 2.0) / B) / F) / F), -0.5, 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, -9.2e+60], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 0.027], N[(N[(N[(N[(0.3333333333333333 * x + N[(0.16666666666666666 * t$95$0), $MachinePrecision]), $MachinePrecision] * N[(B * B), $MachinePrecision] + t$95$0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(N[(N[(N[(2.0 * x + 2.0), $MachinePrecision] / B), $MachinePrecision] / F), $MachinePrecision] / F), $MachinePrecision] * -0.5 + N[(N[(1.0 - x), $MachinePrecision] / 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 -9.2 \cdot 10^{+60}:\\
            \;\;\;\;\frac{-1 - x}{B}\\
            
            \mathbf{elif}\;F \leq 0.027:\\
            \;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(0.3333333333333333, x, 0.16666666666666666 \cdot t\_0\right), B \cdot B, t\_0\right) - x}{B}\\
            
            \mathbf{else}:\\
            \;\;\;\;\mathsf{fma}\left(\frac{\frac{\frac{\mathsf{fma}\left(2, x, 2\right)}{B}}{F}}{F}, -0.5, \frac{1 - x}{B}\right)\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if F < -9.20000000000000068e60

              1. Initial program 52.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 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 rewrites37.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 rewrites52.9%

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

                if -9.20000000000000068e60 < F < 0.0269999999999999997

                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.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. Taylor expanded in B around inf

                  \[\leadsto \left(-x \cdot \color{blue}{\frac{\cos B}{\sin 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. Step-by-step derivation
                  1. lower-/.f64N/A

                    \[\leadsto \left(-x \cdot \frac{\cos B}{\color{blue}{\sin 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-cos.f64N/A

                    \[\leadsto \left(-x \cdot \frac{\cos B}{\sin \color{blue}{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-sin.f6499.5

                    \[\leadsto \left(-x \cdot \frac{\cos B}{\sin 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. Applied rewrites99.5%

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

                    \[\leadsto \left(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin B}\right) + \frac{F \cdot \frac{\color{blue}{1}}{\sqrt{2 + \left(2 \cdot x + {F}^{2}\right)}}}{\sin B} \]
                9. Applied rewrites99.5%

                  \[\leadsto \left(-x \cdot \frac{\cos B}{\sin 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} \]
                10. 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}} \]
                11. Applied rewrites52.4%

                  \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\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), B \cdot B, \frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}\right) - x}{B}} \]

                if 0.0269999999999999997 < F

                1. Initial program 57.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 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 rewrites38.0%

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

                    \[\leadsto \frac{-1 - x}{B} \]
                  2. Taylor expanded in F around inf

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

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

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

                      \[\leadsto \frac{2 + 2 \cdot x}{B \cdot {F}^{2}} \cdot \frac{-1}{2} + \frac{1 - x}{B} \]
                    4. lower-fma.f64N/A

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

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

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

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

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

                      \[\leadsto \mathsf{fma}\left(\frac{\frac{\mathsf{fma}\left(2, x, 2\right)}{B}}{{F}^{2}}, \frac{-1}{2}, \frac{1 - x}{B}\right) \]
                    10. pow2N/A

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

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

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

                      \[\leadsto \mathsf{fma}\left(\frac{\frac{\mathsf{fma}\left(2, x, 2\right)}{B}}{F \cdot F}, -0.5, \frac{1 - x}{B}\right) \]
                  4. Applied rewrites43.3%

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

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

                      \[\leadsto \mathsf{fma}\left(\frac{\frac{\mathsf{fma}\left(2, x, 2\right)}{B}}{F \cdot F}, \mathsf{neg}\left(\frac{1}{2}\right), \frac{1 - x}{B}\right) \]
                  6. Applied rewrites50.8%

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

                Alternative 15: 51.9% accurate, 6.1× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -5 \cdot 10^{+99}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 2.05 \cdot 10^{+170}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
                (FPCore (F B x)
                 :precision binary64
                 (if (<= F -5e+99)
                   (/ (- -1.0 x) B)
                   (if (<= F 2.05e+170)
                     (/ (- (/ F (sqrt (fma 2.0 x (fma F F 2.0)))) x) B)
                     (/ (- 1.0 x) B))))
                double code(double F, double B, double x) {
                	double tmp;
                	if (F <= -5e+99) {
                		tmp = (-1.0 - x) / B;
                	} else if (F <= 2.05e+170) {
                		tmp = ((F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - x) / B;
                	} else {
                		tmp = (1.0 - x) / B;
                	}
                	return tmp;
                }
                
                function code(F, B, x)
                	tmp = 0.0
                	if (F <= -5e+99)
                		tmp = Float64(Float64(-1.0 - x) / B);
                	elseif (F <= 2.05e+170)
                		tmp = Float64(Float64(Float64(F / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - x) / B);
                	else
                		tmp = Float64(Float64(1.0 - x) / B);
                	end
                	return tmp
                end
                
                code[F_, B_, x_] := If[LessEqual[F, -5e+99], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2.05e+170], 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[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;F \leq -5 \cdot 10^{+99}:\\
                \;\;\;\;\frac{-1 - x}{B}\\
                
                \mathbf{elif}\;F \leq 2.05 \cdot 10^{+170}:\\
                \;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - x}{B}\\
                
                \mathbf{else}:\\
                \;\;\;\;\frac{1 - x}{B}\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 3 regimes
                2. if F < -5.00000000000000008e99

                  1. Initial program 46.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 rewrites34.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 rewrites52.7%

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

                    if -5.00000000000000008e99 < F < 2.05e170

                    1. Initial program 95.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. 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.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. Taylor expanded in B around inf

                      \[\leadsto \left(-x \cdot \color{blue}{\frac{\cos B}{\sin 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. Step-by-step derivation
                      1. lower-/.f64N/A

                        \[\leadsto \left(-x \cdot \frac{\cos B}{\color{blue}{\sin 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-cos.f64N/A

                        \[\leadsto \left(-x \cdot \frac{\cos B}{\sin \color{blue}{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-sin.f6498.4

                        \[\leadsto \left(-x \cdot \frac{\cos B}{\sin 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. Applied rewrites98.4%

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

                        \[\leadsto \left(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin 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(-x \cdot \frac{\cos B}{\sin B}\right) + \frac{F \cdot \frac{\color{blue}{1}}{\sqrt{2 + \left(2 \cdot x + {F}^{2}\right)}}}{\sin B} \]
                    9. Applied rewrites98.5%

                      \[\leadsto \left(-x \cdot \frac{\cos B}{\sin 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} \]
                    10. 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}} \]
                    11. 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 2.05e170 < F

                    1. Initial program 29.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 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 rewrites26.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 inf

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

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

                    Alternative 16: 52.1% accurate, 6.2× speedup?

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

                      1. Initial program 57.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 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 rewrites38.9%

                        \[\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 -1e27 < F < 0.0269999999999999997

                        1. Initial program 99.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. 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.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. 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 rewrites52.4%

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

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

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

                        if 0.0269999999999999997 < F

                        1. Initial program 57.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 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 rewrites38.0%

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

                            \[\leadsto \frac{-1 - x}{B} \]
                          2. Taylor expanded in F around inf

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

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

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

                              \[\leadsto \frac{2 + 2 \cdot x}{B \cdot {F}^{2}} \cdot \frac{-1}{2} + \frac{1 - x}{B} \]
                            4. lower-fma.f64N/A

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

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

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

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

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

                              \[\leadsto \mathsf{fma}\left(\frac{\frac{\mathsf{fma}\left(2, x, 2\right)}{B}}{{F}^{2}}, \frac{-1}{2}, \frac{1 - x}{B}\right) \]
                            10. pow2N/A

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

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

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

                              \[\leadsto \mathsf{fma}\left(\frac{\frac{\mathsf{fma}\left(2, x, 2\right)}{B}}{F \cdot F}, -0.5, \frac{1 - x}{B}\right) \]
                          4. Applied rewrites43.3%

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

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

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

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

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

                              \[\leadsto \mathsf{fma}\left(\frac{2}{\left(F \cdot F\right) \cdot B}, \frac{-1}{2}, \frac{1 - x}{B}\right) \]
                            5. lift-*.f6450.9

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

                            \[\leadsto \mathsf{fma}\left(\frac{2}{\left(F \cdot F\right) \cdot B}, -0.5, \frac{1 - x}{B}\right) \]
                        8. Recombined 3 regimes into one program.
                        9. Final simplification52.1%

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

                        Alternative 17: 51.8% accurate, 6.2× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -0.00011:\\ \;\;\;\;\frac{\left(\frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F} \cdot 0.5 - 1\right) - x}{B}\\ \mathbf{elif}\;F \leq 0.027:\\ \;\;\;\;\frac{F \cdot \frac{1}{\sqrt{\mathsf{fma}\left(2, x, 2\right)}} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{2}{\left(F \cdot F\right) \cdot B}, -0.5, \frac{1 - x}{B}\right)\\ \end{array} \end{array} \]
                        (FPCore (F B x)
                         :precision binary64
                         (if (<= F -0.00011)
                           (/ (- (- (* (/ (fma 2.0 x 2.0) (* F F)) 0.5) 1.0) x) B)
                           (if (<= F 0.027)
                             (/ (- (* F (/ 1.0 (sqrt (fma 2.0 x 2.0)))) x) B)
                             (fma (/ 2.0 (* (* F F) B)) -0.5 (/ (- 1.0 x) B)))))
                        double code(double F, double B, double x) {
                        	double tmp;
                        	if (F <= -0.00011) {
                        		tmp = ((((fma(2.0, x, 2.0) / (F * F)) * 0.5) - 1.0) - x) / B;
                        	} else if (F <= 0.027) {
                        		tmp = ((F * (1.0 / sqrt(fma(2.0, x, 2.0)))) - x) / B;
                        	} else {
                        		tmp = fma((2.0 / ((F * F) * B)), -0.5, ((1.0 - x) / B));
                        	}
                        	return tmp;
                        }
                        
                        function code(F, B, x)
                        	tmp = 0.0
                        	if (F <= -0.00011)
                        		tmp = Float64(Float64(Float64(Float64(Float64(fma(2.0, x, 2.0) / Float64(F * F)) * 0.5) - 1.0) - x) / B);
                        	elseif (F <= 0.027)
                        		tmp = Float64(Float64(Float64(F * Float64(1.0 / sqrt(fma(2.0, x, 2.0)))) - x) / B);
                        	else
                        		tmp = fma(Float64(2.0 / Float64(Float64(F * F) * B)), -0.5, Float64(Float64(1.0 - x) / B));
                        	end
                        	return tmp
                        end
                        
                        code[F_, B_, x_] := If[LessEqual[F, -0.00011], 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, 0.027], 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[(2.0 / N[(N[(F * F), $MachinePrecision] * B), $MachinePrecision]), $MachinePrecision] * -0.5 + N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]
                        
                        \begin{array}{l}
                        
                        \\
                        \begin{array}{l}
                        \mathbf{if}\;F \leq -0.00011:\\
                        \;\;\;\;\frac{\left(\frac{\mathsf{fma}\left(2, x, 2\right)}{F \cdot F} \cdot 0.5 - 1\right) - x}{B}\\
                        
                        \mathbf{elif}\;F \leq 0.027:\\
                        \;\;\;\;\frac{F \cdot \frac{1}{\sqrt{\mathsf{fma}\left(2, x, 2\right)}} - x}{B}\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;\mathsf{fma}\left(\frac{2}{\left(F \cdot F\right) \cdot B}, -0.5, \frac{1 - x}{B}\right)\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 3 regimes
                        2. if F < -1.10000000000000004e-4

                          1. Initial program 60.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 rewrites40.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.5%

                              \[\leadsto \frac{-1 - x}{B} \]
                            2. Taylor expanded in F around -inf

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

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

                            if -1.10000000000000004e-4 < F < 0.0269999999999999997

                            1. Initial program 99.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. 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.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. 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 rewrites52.3%

                              \[\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.f6452.1

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

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

                            if 0.0269999999999999997 < F

                            1. Initial program 57.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 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 rewrites38.0%

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

                                \[\leadsto \frac{-1 - x}{B} \]
                              2. Taylor expanded in F around inf

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

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

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

                                  \[\leadsto \frac{2 + 2 \cdot x}{B \cdot {F}^{2}} \cdot \frac{-1}{2} + \frac{1 - x}{B} \]
                                4. lower-fma.f64N/A

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

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

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

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

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

                                  \[\leadsto \mathsf{fma}\left(\frac{\frac{\mathsf{fma}\left(2, x, 2\right)}{B}}{{F}^{2}}, \frac{-1}{2}, \frac{1 - x}{B}\right) \]
                                10. pow2N/A

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

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

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

                                  \[\leadsto \mathsf{fma}\left(\frac{\frac{\mathsf{fma}\left(2, x, 2\right)}{B}}{F \cdot F}, -0.5, \frac{1 - x}{B}\right) \]
                              4. Applied rewrites43.3%

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

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

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

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

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

                                  \[\leadsto \mathsf{fma}\left(\frac{2}{\left(F \cdot F\right) \cdot B}, \frac{-1}{2}, \frac{1 - x}{B}\right) \]
                                5. lift-*.f6450.9

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

                                \[\leadsto \mathsf{fma}\left(\frac{2}{\left(F \cdot F\right) \cdot B}, -0.5, \frac{1 - x}{B}\right) \]
                            8. Recombined 3 regimes into one program.
                            9. Final simplification51.8%

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

                            Alternative 18: 44.6% accurate, 6.8× speedup?

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

                              1. Initial program 60.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 rewrites40.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 -inf

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

                                  \[\leadsto \frac{-1 - x}{B} \]
                                2. Taylor expanded in F around -inf

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

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

                                if -8.4e-7 < F < 0.012

                                1. Initial program 99.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 rewrites52.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 -inf

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

                                    \[\leadsto \frac{-1 - x}{B} \]
                                  2. Taylor expanded in F around 0

                                    \[\leadsto \frac{-1 \cdot x}{B} \]
                                  3. Step-by-step derivation
                                    1. mul-1-negN/A

                                      \[\leadsto \frac{\mathsf{neg}\left(x\right)}{B} \]
                                    2. lower-neg.f6436.1

                                      \[\leadsto \frac{-x}{B} \]
                                  4. Applied rewrites36.1%

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

                                  if 0.012 < F

                                  1. Initial program 57.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 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 rewrites38.0%

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

                                      \[\leadsto \frac{-1 - x}{B} \]
                                    2. Taylor expanded in F around inf

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

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

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

                                        \[\leadsto \frac{2 + 2 \cdot x}{B \cdot {F}^{2}} \cdot \frac{-1}{2} + \frac{1 - x}{B} \]
                                      4. lower-fma.f64N/A

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

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

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

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

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

                                        \[\leadsto \mathsf{fma}\left(\frac{\frac{\mathsf{fma}\left(2, x, 2\right)}{B}}{{F}^{2}}, \frac{-1}{2}, \frac{1 - x}{B}\right) \]
                                      10. pow2N/A

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

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

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

                                        \[\leadsto \mathsf{fma}\left(\frac{\frac{\mathsf{fma}\left(2, x, 2\right)}{B}}{F \cdot F}, -0.5, \frac{1 - x}{B}\right) \]
                                    4. Applied rewrites43.3%

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

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

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

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

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

                                        \[\leadsto \mathsf{fma}\left(\frac{2}{\left(F \cdot F\right) \cdot B}, \frac{-1}{2}, \frac{1 - x}{B}\right) \]
                                      5. lift-*.f6450.9

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

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

                                  Alternative 19: 44.6% accurate, 6.8× speedup?

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

                                    1. Initial program 62.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 rewrites41.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{\frac{-1}{F} \cdot F - x}{B} \]
                                    7. Step-by-step derivation
                                      1. lower-/.f6450.4

                                        \[\leadsto \frac{\frac{-1}{F} \cdot F - x}{B} \]
                                    8. Applied rewrites50.4%

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

                                    if -1.2999999999999999e-32 < F < 0.012

                                    1. Initial program 99.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 rewrites52.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 rewrites20.4%

                                        \[\leadsto \frac{-1 - x}{B} \]
                                      2. Taylor expanded in F around 0

                                        \[\leadsto \frac{-1 \cdot x}{B} \]
                                      3. Step-by-step derivation
                                        1. mul-1-negN/A

                                          \[\leadsto \frac{\mathsf{neg}\left(x\right)}{B} \]
                                        2. lower-neg.f6436.8

                                          \[\leadsto \frac{-x}{B} \]
                                      4. Applied rewrites36.8%

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

                                      if 0.012 < F

                                      1. Initial program 57.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 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 rewrites38.0%

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

                                          \[\leadsto \frac{-1 - x}{B} \]
                                        2. Taylor expanded in F around inf

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

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

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

                                            \[\leadsto \frac{2 + 2 \cdot x}{B \cdot {F}^{2}} \cdot \frac{-1}{2} + \frac{1 - x}{B} \]
                                          4. lower-fma.f64N/A

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

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

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

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

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

                                            \[\leadsto \mathsf{fma}\left(\frac{\frac{\mathsf{fma}\left(2, x, 2\right)}{B}}{{F}^{2}}, \frac{-1}{2}, \frac{1 - x}{B}\right) \]
                                          10. pow2N/A

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

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

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

                                            \[\leadsto \mathsf{fma}\left(\frac{\frac{\mathsf{fma}\left(2, x, 2\right)}{B}}{F \cdot F}, -0.5, \frac{1 - x}{B}\right) \]
                                        4. Applied rewrites43.3%

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

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

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

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

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

                                            \[\leadsto \mathsf{fma}\left(\frac{2}{\left(F \cdot F\right) \cdot B}, \frac{-1}{2}, \frac{1 - x}{B}\right) \]
                                          5. lift-*.f6450.9

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

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

                                      Alternative 20: 44.7% accurate, 9.9× speedup?

                                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -1.3 \cdot 10^{-32}:\\ \;\;\;\;\frac{\frac{-1}{F} \cdot F - x}{B}\\ \mathbf{elif}\;F \leq 10^{-19}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
                                      (FPCore (F B x)
                                       :precision binary64
                                       (if (<= F -1.3e-32)
                                         (/ (- (* (/ -1.0 F) F) x) B)
                                         (if (<= F 1e-19) (/ (- x) B) (/ (- 1.0 x) B))))
                                      double code(double F, double B, double x) {
                                      	double tmp;
                                      	if (F <= -1.3e-32) {
                                      		tmp = (((-1.0 / F) * F) - x) / B;
                                      	} else if (F <= 1e-19) {
                                      		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 <= (-1.3d-32)) then
                                              tmp = ((((-1.0d0) / f) * f) - x) / b
                                          else if (f <= 1d-19) 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 <= -1.3e-32) {
                                      		tmp = (((-1.0 / F) * F) - x) / B;
                                      	} else if (F <= 1e-19) {
                                      		tmp = -x / B;
                                      	} else {
                                      		tmp = (1.0 - x) / B;
                                      	}
                                      	return tmp;
                                      }
                                      
                                      def code(F, B, x):
                                      	tmp = 0
                                      	if F <= -1.3e-32:
                                      		tmp = (((-1.0 / F) * F) - x) / B
                                      	elif F <= 1e-19:
                                      		tmp = -x / B
                                      	else:
                                      		tmp = (1.0 - x) / B
                                      	return tmp
                                      
                                      function code(F, B, x)
                                      	tmp = 0.0
                                      	if (F <= -1.3e-32)
                                      		tmp = Float64(Float64(Float64(Float64(-1.0 / F) * F) - x) / B);
                                      	elseif (F <= 1e-19)
                                      		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 <= -1.3e-32)
                                      		tmp = (((-1.0 / F) * F) - x) / B;
                                      	elseif (F <= 1e-19)
                                      		tmp = -x / B;
                                      	else
                                      		tmp = (1.0 - x) / B;
                                      	end
                                      	tmp_2 = tmp;
                                      end
                                      
                                      code[F_, B_, x_] := If[LessEqual[F, -1.3e-32], N[(N[(N[(N[(-1.0 / F), $MachinePrecision] * F), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1e-19], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
                                      
                                      \begin{array}{l}
                                      
                                      \\
                                      \begin{array}{l}
                                      \mathbf{if}\;F \leq -1.3 \cdot 10^{-32}:\\
                                      \;\;\;\;\frac{\frac{-1}{F} \cdot F - x}{B}\\
                                      
                                      \mathbf{elif}\;F \leq 10^{-19}:\\
                                      \;\;\;\;\frac{-x}{B}\\
                                      
                                      \mathbf{else}:\\
                                      \;\;\;\;\frac{1 - x}{B}\\
                                      
                                      
                                      \end{array}
                                      \end{array}
                                      
                                      Derivation
                                      1. Split input into 3 regimes
                                      2. if F < -1.2999999999999999e-32

                                        1. Initial program 62.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 rewrites41.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{\frac{-1}{F} \cdot F - x}{B} \]
                                        7. Step-by-step derivation
                                          1. lower-/.f6450.4

                                            \[\leadsto \frac{\frac{-1}{F} \cdot F - x}{B} \]
                                        8. Applied rewrites50.4%

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

                                        if -1.2999999999999999e-32 < F < 9.9999999999999998e-20

                                        1. Initial program 99.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 rewrites52.0%

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

                                            \[\leadsto \frac{-1 - x}{B} \]
                                          2. Taylor expanded in F around 0

                                            \[\leadsto \frac{-1 \cdot x}{B} \]
                                          3. Step-by-step derivation
                                            1. mul-1-negN/A

                                              \[\leadsto \frac{\mathsf{neg}\left(x\right)}{B} \]
                                            2. lower-neg.f6437.4

                                              \[\leadsto \frac{-x}{B} \]
                                          4. Applied rewrites37.4%

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

                                          if 9.9999999999999998e-20 < F

                                          1. Initial program 59.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 rewrites38.9%

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

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

                                          Alternative 21: 44.7% accurate, 13.6× speedup?

                                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -1.3 \cdot 10^{-32}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 10^{-19}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
                                          (FPCore (F B x)
                                           :precision binary64
                                           (if (<= F -1.3e-32)
                                             (/ (- -1.0 x) B)
                                             (if (<= F 1e-19) (/ (- x) B) (/ (- 1.0 x) B))))
                                          double code(double F, double B, double x) {
                                          	double tmp;
                                          	if (F <= -1.3e-32) {
                                          		tmp = (-1.0 - x) / B;
                                          	} else if (F <= 1e-19) {
                                          		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 <= (-1.3d-32)) then
                                                  tmp = ((-1.0d0) - x) / b
                                              else if (f <= 1d-19) 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 <= -1.3e-32) {
                                          		tmp = (-1.0 - x) / B;
                                          	} else if (F <= 1e-19) {
                                          		tmp = -x / B;
                                          	} else {
                                          		tmp = (1.0 - x) / B;
                                          	}
                                          	return tmp;
                                          }
                                          
                                          def code(F, B, x):
                                          	tmp = 0
                                          	if F <= -1.3e-32:
                                          		tmp = (-1.0 - x) / B
                                          	elif F <= 1e-19:
                                          		tmp = -x / B
                                          	else:
                                          		tmp = (1.0 - x) / B
                                          	return tmp
                                          
                                          function code(F, B, x)
                                          	tmp = 0.0
                                          	if (F <= -1.3e-32)
                                          		tmp = Float64(Float64(-1.0 - x) / B);
                                          	elseif (F <= 1e-19)
                                          		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 <= -1.3e-32)
                                          		tmp = (-1.0 - x) / B;
                                          	elseif (F <= 1e-19)
                                          		tmp = -x / B;
                                          	else
                                          		tmp = (1.0 - x) / B;
                                          	end
                                          	tmp_2 = tmp;
                                          end
                                          
                                          code[F_, B_, x_] := If[LessEqual[F, -1.3e-32], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1e-19], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
                                          
                                          \begin{array}{l}
                                          
                                          \\
                                          \begin{array}{l}
                                          \mathbf{if}\;F \leq -1.3 \cdot 10^{-32}:\\
                                          \;\;\;\;\frac{-1 - x}{B}\\
                                          
                                          \mathbf{elif}\;F \leq 10^{-19}:\\
                                          \;\;\;\;\frac{-x}{B}\\
                                          
                                          \mathbf{else}:\\
                                          \;\;\;\;\frac{1 - x}{B}\\
                                          
                                          
                                          \end{array}
                                          \end{array}
                                          
                                          Derivation
                                          1. Split input into 3 regimes
                                          2. if F < -1.2999999999999999e-32

                                            1. Initial program 62.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 rewrites41.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 rewrites50.5%

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

                                              if -1.2999999999999999e-32 < F < 9.9999999999999998e-20

                                              1. Initial program 99.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 rewrites52.0%

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

                                                  \[\leadsto \frac{-1 - x}{B} \]
                                                2. Taylor expanded in F around 0

                                                  \[\leadsto \frac{-1 \cdot x}{B} \]
                                                3. Step-by-step derivation
                                                  1. mul-1-negN/A

                                                    \[\leadsto \frac{\mathsf{neg}\left(x\right)}{B} \]
                                                  2. lower-neg.f6437.4

                                                    \[\leadsto \frac{-x}{B} \]
                                                4. Applied rewrites37.4%

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

                                                if 9.9999999999999998e-20 < F

                                                1. Initial program 59.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 rewrites38.9%

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

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

                                                Alternative 22: 37.7% accurate, 17.5× speedup?

                                                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -1.3 \cdot 10^{-32}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{-x}{B}\\ \end{array} \end{array} \]
                                                (FPCore (F B x)
                                                 :precision binary64
                                                 (if (<= F -1.3e-32) (/ (- -1.0 x) B) (/ (- x) B)))
                                                double code(double F, double B, double x) {
                                                	double tmp;
                                                	if (F <= -1.3e-32) {
                                                		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 <= (-1.3d-32)) 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 <= -1.3e-32) {
                                                		tmp = (-1.0 - x) / B;
                                                	} else {
                                                		tmp = -x / B;
                                                	}
                                                	return tmp;
                                                }
                                                
                                                def code(F, B, x):
                                                	tmp = 0
                                                	if F <= -1.3e-32:
                                                		tmp = (-1.0 - x) / B
                                                	else:
                                                		tmp = -x / B
                                                	return tmp
                                                
                                                function code(F, B, x)
                                                	tmp = 0.0
                                                	if (F <= -1.3e-32)
                                                		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 <= -1.3e-32)
                                                		tmp = (-1.0 - x) / B;
                                                	else
                                                		tmp = -x / B;
                                                	end
                                                	tmp_2 = tmp;
                                                end
                                                
                                                code[F_, B_, x_] := If[LessEqual[F, -1.3e-32], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[((-x) / B), $MachinePrecision]]
                                                
                                                \begin{array}{l}
                                                
                                                \\
                                                \begin{array}{l}
                                                \mathbf{if}\;F \leq -1.3 \cdot 10^{-32}:\\
                                                \;\;\;\;\frac{-1 - x}{B}\\
                                                
                                                \mathbf{else}:\\
                                                \;\;\;\;\frac{-x}{B}\\
                                                
                                                
                                                \end{array}
                                                \end{array}
                                                
                                                Derivation
                                                1. Split input into 2 regimes
                                                2. if F < -1.2999999999999999e-32

                                                  1. Initial program 62.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 rewrites41.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 rewrites50.5%

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

                                                    if -1.2999999999999999e-32 < F

                                                    1. Initial program 83.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 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 rewrites46.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 -inf

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

                                                        \[\leadsto \frac{-1 - x}{B} \]
                                                      2. Taylor expanded in F around 0

                                                        \[\leadsto \frac{-1 \cdot x}{B} \]
                                                      3. Step-by-step derivation
                                                        1. mul-1-negN/A

                                                          \[\leadsto \frac{\mathsf{neg}\left(x\right)}{B} \]
                                                        2. lower-neg.f6432.3

                                                          \[\leadsto \frac{-x}{B} \]
                                                      4. Applied rewrites32.3%

                                                        \[\leadsto \frac{-x}{B} \]
                                                    8. Recombined 2 regimes into one program.
                                                    9. Add Preprocessing

                                                    Alternative 23: 30.5% 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 77.2%

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

                                                        \[\leadsto \frac{-1 - x}{B} \]
                                                      2. Taylor expanded in F around 0

                                                        \[\leadsto \frac{-1 \cdot x}{B} \]
                                                      3. Step-by-step derivation
                                                        1. mul-1-negN/A

                                                          \[\leadsto \frac{\mathsf{neg}\left(x\right)}{B} \]
                                                        2. lower-neg.f6430.5

                                                          \[\leadsto \frac{-x}{B} \]
                                                      4. Applied rewrites30.5%

                                                        \[\leadsto \frac{-x}{B} \]
                                                      5. Add Preprocessing

                                                      Reproduce

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