VandenBroeck and Keller, Equation (23)

Percentage Accurate: 77.0% → 99.7%
Time: 7.8s
Alternatives: 27
Speedup: 2.0×

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 27 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.0% accurate, 1.0× speedup?

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

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

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

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

Alternative 1: 99.7% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;F \leq -450000000:\\
\;\;\;\;-\frac{1 + \cos B \cdot x}{\sin B}\\

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

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


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

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

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

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

    if -4.5e8 < F < 1.6e8

    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. 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}} \]
    3. 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}} \]
    4. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{x \cdot 1}{\tan B}\right)\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-*.f64N/A

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

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

        \[\leadsto \left(\mathsf{neg}\left(\frac{x \cdot 1}{\color{blue}{\tan B}}\right)\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. associate-*r/N/A

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

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

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\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} \]
      9. lift-pow.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\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} \]
      10. lift-fma.f64N/A

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

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

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

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

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

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

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

    if 1.6e8 < F

    1. Initial program 58.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. 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}} \]
    3. Applied rewrites73.7%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(-\frac{x \cdot 1}{\tan B}\right) + \frac{\color{blue}{1}}{\sin B} \]
    8. Recombined 3 regimes into one program.
    9. Add Preprocessing

    Alternative 2: 99.7% accurate, 1.3× speedup?

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

      1. Initial program 44.0%

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

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

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

      if -8.0000000000000002e110 < F < 1.00000000000000004e62

      1. Initial program 98.0%

        \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
      2. 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}} \]
      3. 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}} \]
      4. Step-by-step derivation
        1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 1.00000000000000004e62 < F

      1. Initial program 51.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. 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}} \]
      3. Applied rewrites68.8%

        \[\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}} \]
      4. Step-by-step derivation
        1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 3: 99.7% accurate, 1.3× speedup?

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

        1. Initial program 44.0%

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

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

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

        if -6.00000000000000014e110 < F < 1e8

        1. Initial program 98.3%

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

            \[\leadsto \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}} \]
        3. 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}} \]
        4. Step-by-step derivation
          1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 1e8 < F

        1. Initial program 58.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. 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}} \]
        3. Applied rewrites73.7%

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(-\frac{x \cdot 1}{\tan B}\right) + \frac{\color{blue}{1}}{\sin B} \]
        8. Recombined 3 regimes into one program.
        9. Add Preprocessing

        Alternative 4: 99.6% accurate, 1.3× speedup?

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

          1. Initial program 59.0%

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

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

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

          if -7.5e7 < F < 1e8

          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. 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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if 1e8 < F

          1. Initial program 58.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. 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}} \]
          3. Applied rewrites73.7%

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left(-\frac{x \cdot 1}{\tan B}\right) + \frac{\color{blue}{1}}{\sin B} \]
          8. Recombined 3 regimes into one program.
          9. Add Preprocessing

          Alternative 5: 98.8% accurate, 1.3× speedup?

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

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

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

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

            if -3.8e8 < F < 1.44999999999999996

            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. 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}} \]
            3. 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}} \]
            4. Step-by-step derivation
              1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if 1.44999999999999996 < F

              1. Initial program 59.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. 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}} \]
              3. Applied rewrites74.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}} \]
              4. Step-by-step derivation
                1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

                  \[\leadsto \left(-\frac{x \cdot 1}{\tan B}\right) + \frac{\color{blue}{1}}{\sin B} \]
              8. Recombined 3 regimes into one program.
              9. Add Preprocessing

              Alternative 6: 91.9% accurate, 1.3× speedup?

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

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

                  \[\leadsto \color{blue}{-1 \cdot \left(\frac{1}{\sin B} + \frac{x \cdot \cos B}{\sin B}\right)} \]
                3. 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.5

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

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

                if -2900 < F < 0.0018600000000000001

                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. 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)}}} \]
                3. 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. lower-sqrt.f64N/A

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

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

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

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

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

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

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

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

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

                if 0.0018600000000000001 < F

                1. Initial program 59.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. 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}} \]
                3. Applied rewrites74.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}} \]
                4. Step-by-step derivation
                  1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

                    \[\leadsto \left(-\frac{x \cdot 1}{\tan B}\right) + \frac{\color{blue}{1}}{\sin B} \]
                8. Recombined 3 regimes into one program.
                9. Add Preprocessing

                Alternative 7: 91.9% accurate, 1.4× speedup?

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

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

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

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

                  if -3.8e8 < F < 0.0018600000000000001

                  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. 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}} \]
                  3. 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}} \]
                  4. Step-by-step derivation
                    1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

                    if 0.0018600000000000001 < F

                    1. Initial program 59.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. 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}} \]
                    3. Applied rewrites74.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}} \]
                    4. Step-by-step derivation
                      1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

                        \[\leadsto \left(-\frac{x \cdot 1}{\tan B}\right) + \frac{\color{blue}{1}}{\sin B} \]
                    8. Recombined 3 regimes into one program.
                    9. Add Preprocessing

                    Alternative 8: 91.9% accurate, 1.4× speedup?

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

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

                        \[\leadsto \color{blue}{-1 \cdot \left(\frac{1}{\sin B} + \frac{x \cdot \cos B}{\sin B}\right)} \]
                      3. 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.5

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

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

                      if -2900 < F < 0.0018600000000000001

                      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. 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}} \]
                      3. 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}} \]
                      4. Taylor expanded in B around 0

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

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

                        if 0.0018600000000000001 < F

                        1. Initial program 59.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. 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}} \]
                        3. Applied rewrites74.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}} \]
                        4. Step-by-step derivation
                          1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

                            \[\leadsto \left(-\frac{x \cdot 1}{\tan B}\right) + \frac{\color{blue}{1}}{\sin B} \]
                        8. Recombined 3 regimes into one program.
                        9. Add Preprocessing

                        Alternative 9: 91.9% accurate, 1.5× speedup?

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

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

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

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

                          if -3.8e8 < F < 0.0018600000000000001

                          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. 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}} \]
                          3. 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}} \]
                          4. Step-by-step derivation
                            1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            if 0.0018600000000000001 < F

                            1. Initial program 59.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. 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}} \]
                            3. Applied rewrites74.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}} \]
                            4. Step-by-step derivation
                              1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

                                \[\leadsto \left(-\frac{x \cdot 1}{\tan B}\right) + \frac{\color{blue}{1}}{\sin B} \]
                            8. Recombined 3 regimes into one program.
                            9. Add Preprocessing

                            Alternative 10: 91.9% accurate, 1.6× speedup?

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

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

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

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

                              if -3.8e8 < F < 0.0018600000000000001

                              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. 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}} \]
                              3. 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}} \]
                              4. Step-by-step derivation
                                1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                if 0.0018600000000000001 < F

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

                                  \[\leadsto \color{blue}{\frac{1}{\sin B} - \frac{x \cdot \cos B}{\sin B}} \]
                                3. 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.f6498.8

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

                                  \[\leadsto \color{blue}{\frac{1 - \cos B \cdot x}{\sin B}} \]
                              10. Recombined 3 regimes into one program.
                              11. Add Preprocessing

                              Alternative 11: 85.6% accurate, 1.6× speedup?

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

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

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

                                  \[\leadsto \color{blue}{-\frac{1 + \cos B \cdot x}{\sin B}} \]
                                5. Taylor expanded in B around 0

                                  \[\leadsto -\frac{1 + x}{\sin B} \]
                                6. Step-by-step derivation
                                  1. Applied rewrites77.6%

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

                                  if -4.6e8 < F < 0.0018600000000000001

                                  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. 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}} \]
                                  3. 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}} \]
                                  4. Step-by-step derivation
                                    1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    if 0.0018600000000000001 < F

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

                                      \[\leadsto \color{blue}{\frac{1}{\sin B} - \frac{x \cdot \cos B}{\sin B}} \]
                                    3. 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.f6498.8

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

                                      \[\leadsto \color{blue}{\frac{1 - \cos B \cdot x}{\sin B}} \]
                                  10. Recombined 3 regimes into one program.
                                  11. Add Preprocessing

                                  Alternative 12: 71.9% accurate, 1.9× speedup?

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

                                    1. Initial program 59.0%

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

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

                                      \[\leadsto \color{blue}{-\frac{1 + \cos B \cdot x}{\sin B}} \]
                                    5. Taylor expanded in B around 0

                                      \[\leadsto -\frac{1 + x}{\sin B} \]
                                    6. Step-by-step derivation
                                      1. Applied rewrites77.6%

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

                                      if -7e7 < F < -8.59999999999999975e-233 or 2.50000000000000017e-139 < F < 4.5e7

                                      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. 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}} \]
                                      3. 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}} \]
                                      4. Step-by-step derivation
                                        1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      if -8.59999999999999975e-233 < F < 2.50000000000000017e-139

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

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

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

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

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

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

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

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

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

                                          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\mathsf{fma}\left(\frac{-1}{6}, B \cdot B, 1\right) \cdot B} \cdot \frac{-1}{F} \]
                                        6. lower-*.f6456.5

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

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

                                      if 4.5e7 < F

                                      1. Initial program 58.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. 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}} \]
                                      3. Applied rewrites73.8%

                                        \[\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}} \]
                                      4. Taylor expanded in F around inf

                                        \[\leadsto \color{blue}{\frac{1}{\sin B} - \frac{x \cdot \cos B}{\sin B}} \]
                                      5. 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. *-commutativeN/A

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

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

                                          \[\leadsto \frac{1 - \cos B \cdot x}{\sin B} \]
                                        6. lift-*.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} \]
                                      6. Applied rewrites99.7%

                                        \[\leadsto \color{blue}{\frac{1 - \cos B \cdot x}{\sin B}} \]
                                      7. Taylor expanded in B around 0

                                        \[\leadsto \frac{1 - x}{\sin B} \]
                                      8. Step-by-step derivation
                                        1. Applied rewrites76.5%

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

                                      Alternative 13: 79.2% accurate, 2.0× speedup?

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

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

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

                                          \[\leadsto \color{blue}{-\frac{1 + \cos B \cdot x}{\sin B}} \]
                                        5. Taylor expanded in B around 0

                                          \[\leadsto -\frac{1 + x}{\sin B} \]
                                        6. Step-by-step derivation
                                          1. Applied rewrites77.6%

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

                                          if -4.6e8 < F < 0.0018600000000000001

                                          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. 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}} \]
                                          3. 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}} \]
                                          4. Step-by-step derivation
                                            1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                            if 0.0018600000000000001 < F

                                            1. Initial program 59.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. 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}} \]
                                            3. Applied rewrites74.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}} \]
                                            4. Taylor expanded in F around inf

                                              \[\leadsto \color{blue}{\frac{1}{\sin B} - \frac{x \cdot \cos B}{\sin B}} \]
                                            5. 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. *-commutativeN/A

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

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

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

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

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

                                              \[\leadsto \color{blue}{\frac{1 - \cos B \cdot x}{\sin B}} \]
                                            7. Taylor expanded in B around 0

                                              \[\leadsto \frac{1 - x}{\sin B} \]
                                            8. Step-by-step derivation
                                              1. Applied rewrites75.7%

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

                                            Alternative 14: 56.7% accurate, 2.2× speedup?

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

                                              1. Initial program 73.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. 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}} \]
                                              3. 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}} \]
                                              4. Applied rewrites57.0%

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

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

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

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

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

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

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

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

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

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

                                                  \[\leadsto \frac{\sqrt{\frac{1}{2 \cdot x + \mathsf{fma}\left(F, F, 2\right)}} \cdot F - x}{B} \]
                                                11. lift-fma.f6457.0

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

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

                                              if 0.00339999999999999981 < B

                                              1. Initial program 85.7%

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

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

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

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

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

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

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

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

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

                                                  \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\mathsf{fma}\left(\frac{-1}{6}, B \cdot B, 1\right) \cdot B} \cdot \frac{-1}{F} \]
                                                6. lower-*.f6455.8

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

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

                                            Alternative 15: 65.1% accurate, 2.4× speedup?

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

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

                                                \[\leadsto \color{blue}{-1 \cdot \left(\frac{1}{\sin B} + \frac{x \cdot \cos B}{\sin B}\right)} \]
                                              3. 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.4

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

                                                \[\leadsto \color{blue}{-\frac{1 + \cos B \cdot x}{\sin B}} \]
                                              5. Taylor expanded in B around 0

                                                \[\leadsto -\frac{1 + x}{\sin B} \]
                                              6. Step-by-step derivation
                                                1. Applied rewrites77.5%

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

                                                if -2020 < F < 0.0018600000000000001

                                                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. 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}} \]
                                                3. 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}} \]
                                                4. Applied rewrites50.1%

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

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

                                                if 0.0018600000000000001 < F

                                                1. Initial program 59.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. 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}} \]
                                                3. Applied rewrites74.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}} \]
                                                4. Taylor expanded in F around inf

                                                  \[\leadsto \color{blue}{\frac{1}{\sin B} - \frac{x \cdot \cos B}{\sin B}} \]
                                                5. 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. *-commutativeN/A

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

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

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

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

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

                                                  \[\leadsto \color{blue}{\frac{1 - \cos B \cdot x}{\sin B}} \]
                                                7. Taylor expanded in B around 0

                                                  \[\leadsto \frac{1 - x}{\sin B} \]
                                                8. Step-by-step derivation
                                                  1. Applied rewrites75.7%

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

                                                Alternative 16: 56.2% accurate, 2.4× speedup?

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

                                                  1. Initial program 73.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. 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}} \]
                                                  3. 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}} \]
                                                  4. Applied rewrites57.0%

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

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

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

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

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

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

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

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

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

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

                                                      \[\leadsto \frac{\sqrt{\frac{1}{2 \cdot x + \mathsf{fma}\left(F, F, 2\right)}} \cdot F - x}{B} \]
                                                    11. lift-fma.f6457.0

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

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

                                                  if 0.00339999999999999981 < B

                                                  1. Initial program 85.7%

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

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

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

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

                                                    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\color{blue}{B}} \cdot \frac{-1}{F} \]
                                                  6. Step-by-step derivation
                                                    1. Applied rewrites54.1%

                                                      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\color{blue}{B}} \cdot \frac{-1}{F} \]
                                                  7. Recombined 2 regimes into one program.
                                                  8. Add Preprocessing

                                                  Alternative 17: 65.1% accurate, 2.9× speedup?

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

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

                                                      \[\leadsto \color{blue}{-1 \cdot \left(\frac{1}{\sin B} + \frac{x \cdot \cos B}{\sin B}\right)} \]
                                                    3. 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.4

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

                                                      \[\leadsto \color{blue}{-\frac{1 + \cos B \cdot x}{\sin B}} \]
                                                    5. Taylor expanded in B around 0

                                                      \[\leadsto -\frac{1 + x}{\sin B} \]
                                                    6. Step-by-step derivation
                                                      1. Applied rewrites77.5%

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

                                                      if -2020 < F < 0.0018600000000000001

                                                      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. 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}} \]
                                                      3. 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}} \]
                                                      4. Applied rewrites50.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                      if 0.0018600000000000001 < F

                                                      1. Initial program 59.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. 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}} \]
                                                      3. Applied rewrites74.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}} \]
                                                      4. Taylor expanded in F around inf

                                                        \[\leadsto \color{blue}{\frac{1}{\sin B} - \frac{x \cdot \cos B}{\sin B}} \]
                                                      5. 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. *-commutativeN/A

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

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

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

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

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

                                                        \[\leadsto \color{blue}{\frac{1 - \cos B \cdot x}{\sin B}} \]
                                                      7. Taylor expanded in B around 0

                                                        \[\leadsto \frac{1 - x}{\sin B} \]
                                                      8. Step-by-step derivation
                                                        1. Applied rewrites75.7%

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

                                                      Alternative 18: 56.0% accurate, 2.9× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

                                                          \[\leadsto \color{blue}{-\frac{1 + \cos B \cdot x}{\sin B}} \]
                                                        5. Taylor expanded in x around 0

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

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

                                                            \[\leadsto \frac{-1}{\sin B} \]
                                                        7. Applied rewrites49.3%

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

                                                        if -3.0999999999999999e215 < F < 0.0018600000000000001

                                                        1. Initial program 91.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. 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}} \]
                                                        3. 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}} \]
                                                        4. Applied rewrites48.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                        if 0.0018600000000000001 < F

                                                        1. Initial program 59.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. 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}} \]
                                                        3. Applied rewrites74.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}} \]
                                                        4. Taylor expanded in F around inf

                                                          \[\leadsto \color{blue}{\frac{1}{\sin B} - \frac{x \cdot \cos B}{\sin B}} \]
                                                        5. 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. *-commutativeN/A

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

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

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

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

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

                                                          \[\leadsto \color{blue}{\frac{1 - \cos B \cdot x}{\sin B}} \]
                                                        7. Taylor expanded in B around 0

                                                          \[\leadsto \frac{1 - x}{\sin B} \]
                                                        8. Step-by-step derivation
                                                          1. Applied rewrites75.7%

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

                                                        Alternative 19: 49.5% accurate, 3.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

                                                            \[\leadsto \color{blue}{-\frac{1 + \cos B \cdot x}{\sin B}} \]
                                                          5. Taylor expanded in x around 0

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

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

                                                              \[\leadsto \frac{-1}{\sin B} \]
                                                          7. Applied rewrites49.3%

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

                                                          if -3.0999999999999999e215 < F < 5.5e8

                                                          1. Initial program 91.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. 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}} \]
                                                          3. 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}} \]
                                                          4. Applied rewrites48.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                          if 5.5e8 < F

                                                          1. Initial program 58.7%

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

                                                              \[\leadsto \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}} \]
                                                          3. Applied rewrites73.7%

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

                                                            \[\leadsto \color{blue}{\frac{1}{\sin B} - \frac{x \cdot \cos B}{\sin B}} \]
                                                          5. 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. *-commutativeN/A

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

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

                                                              \[\leadsto \frac{1 - \cos B \cdot x}{\sin B} \]
                                                            6. lift-*.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} \]
                                                          6. Applied rewrites99.7%

                                                            \[\leadsto \color{blue}{\frac{1 - \cos B \cdot x}{\sin B}} \]
                                                          7. Taylor expanded in x around 0

                                                            \[\leadsto \frac{1}{\sin \color{blue}{B}} \]
                                                          8. Step-by-step derivation
                                                            1. Applied rewrites52.4%

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

                                                          Alternative 20: 48.9% accurate, 3.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

                                                              \[\leadsto \color{blue}{-\frac{1 + \cos B \cdot x}{\sin B}} \]
                                                            5. Taylor expanded in x around 0

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

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

                                                                \[\leadsto \frac{-1}{\sin B} \]
                                                            7. Applied rewrites49.3%

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

                                                            if -3.0999999999999999e215 < F < 1.05999999999999992e79

                                                            1. Initial program 91.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. 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}} \]
                                                            3. 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}} \]
                                                            4. Applied rewrites48.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                            if 1.05999999999999992e79 < F

                                                            1. Initial program 49.2%

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

                                                                \[\leadsto \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}} \]
                                                            3. Applied rewrites66.6%

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

                                                              \[\leadsto \color{blue}{\frac{1}{\sin B} - \frac{x \cdot \cos B}{\sin B}} \]
                                                            5. 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. *-commutativeN/A

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

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

                                                                \[\leadsto \frac{1 - \cos B \cdot x}{\sin B} \]
                                                              6. lift-*.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} \]
                                                            6. Applied rewrites99.7%

                                                              \[\leadsto \color{blue}{\frac{1 - \cos B \cdot x}{\sin B}} \]
                                                            7. Taylor expanded in B around 0

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

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

                                                                \[\leadsto \frac{\left(1 + {B}^{2} \cdot \left(\frac{1}{2} \cdot x - \frac{-1}{6} \cdot \left(1 - x\right)\right)\right) - x}{B} \]
                                                            9. Applied rewrites50.7%

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

                                                          Alternative 21: 50.5% accurate, 5.7× speedup?

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

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

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

                                                              \[\leadsto \color{blue}{-\frac{1 + \cos B \cdot x}{\sin B}} \]
                                                            5. Taylor expanded in B around 0

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

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

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

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

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

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

                                                                \[\leadsto -\frac{\mathsf{fma}\left(\frac{-1}{2} \cdot x - \frac{-1}{6} \cdot \left(1 + x\right), {B}^{2}, x\right) + 1}{B} \]
                                                              7. fp-cancel-sub-sign-invN/A

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

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

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

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

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

                                                                \[\leadsto -\frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{2}, x, \frac{1}{6} \cdot \left(1 + x\right)\right), B \cdot B, x\right) + 1}{B} \]
                                                              13. lower-*.f6451.6

                                                                \[\leadsto -\frac{\mathsf{fma}\left(\mathsf{fma}\left(-0.5, x, 0.16666666666666666 \cdot \left(1 + x\right)\right), B \cdot B, x\right) + 1}{B} \]
                                                            7. Applied rewrites51.6%

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

                                                            if -6.2e153 < F < 1.05999999999999992e79

                                                            1. Initial program 96.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. 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}} \]
                                                            3. 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}} \]
                                                            4. Applied rewrites50.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                            if 1.05999999999999992e79 < F

                                                            1. Initial program 49.2%

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

                                                                \[\leadsto \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}} \]
                                                            3. Applied rewrites66.6%

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

                                                              \[\leadsto \color{blue}{\frac{1}{\sin B} - \frac{x \cdot \cos B}{\sin B}} \]
                                                            5. 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. *-commutativeN/A

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

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

                                                                \[\leadsto \frac{1 - \cos B \cdot x}{\sin B} \]
                                                              6. lift-*.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} \]
                                                            6. Applied rewrites99.7%

                                                              \[\leadsto \color{blue}{\frac{1 - \cos B \cdot x}{\sin B}} \]
                                                            7. Taylor expanded in B around 0

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

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

                                                                \[\leadsto \frac{\left(1 + {B}^{2} \cdot \left(\frac{1}{2} \cdot x - \frac{-1}{6} \cdot \left(1 - x\right)\right)\right) - x}{B} \]
                                                            9. Applied rewrites50.7%

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

                                                          Alternative 22: 43.5% accurate, 7.1× speedup?

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

                                                            1. Initial program 59.7%

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

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

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

                                                              \[\leadsto \color{blue}{-\frac{1 + \cos B \cdot x}{\sin B}} \]
                                                            5. Taylor expanded in B around 0

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

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

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

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

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

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

                                                                \[\leadsto -\frac{\mathsf{fma}\left(\frac{-1}{2} \cdot x - \frac{-1}{6} \cdot \left(1 + x\right), {B}^{2}, x\right) + 1}{B} \]
                                                              7. fp-cancel-sub-sign-invN/A

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

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

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

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

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

                                                                \[\leadsto -\frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{2}, x, \frac{1}{6} \cdot \left(1 + x\right)\right), B \cdot B, x\right) + 1}{B} \]
                                                              13. lower-*.f6451.2

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

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

                                                            if -95 < F < 3.90000000000000019e-59

                                                            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. 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}} \]
                                                            3. 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}} \]
                                                            4. Applied rewrites50.1%

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

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

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

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

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

                                                            if 3.90000000000000019e-59 < F

                                                            1. Initial program 64.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. 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}} \]
                                                            3. Applied rewrites77.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}} \]
                                                            4. Taylor expanded in F around inf

                                                              \[\leadsto \color{blue}{\frac{1}{\sin B} - \frac{x \cdot \cos B}{\sin B}} \]
                                                            5. 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. *-commutativeN/A

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

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

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

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

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

                                                              \[\leadsto \color{blue}{\frac{1 - \cos B \cdot x}{\sin B}} \]
                                                            7. Taylor expanded in B around 0

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

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

                                                                \[\leadsto \frac{\left(1 + {B}^{2} \cdot \left(\frac{1}{2} \cdot x - \frac{-1}{6} \cdot \left(1 - x\right)\right)\right) - x}{B} \]
                                                            9. Applied rewrites46.5%

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

                                                          Alternative 23: 43.3% accurate, 7.1× speedup?

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

                                                            1. Initial program 58.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. 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}} \]
                                                            3. 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}} \]
                                                            4. Applied rewrites38.2%

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

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

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

                                                                \[\leadsto \frac{-\left(1 + x\right)}{B} \]
                                                              3. lower-+.f6451.2

                                                                \[\leadsto \frac{-\left(1 + x\right)}{B} \]
                                                            7. Applied rewrites51.2%

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

                                                            if -3.8e8 < F < 3.90000000000000019e-59

                                                            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. 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}} \]
                                                            3. 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}} \]
                                                            4. Applied rewrites50.0%

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

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

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

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

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

                                                            if 3.90000000000000019e-59 < F

                                                            1. Initial program 64.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. 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}} \]
                                                            3. Applied rewrites77.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}} \]
                                                            4. Taylor expanded in F around inf

                                                              \[\leadsto \color{blue}{\frac{1}{\sin B} - \frac{x \cdot \cos B}{\sin B}} \]
                                                            5. 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. *-commutativeN/A

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

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

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

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

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

                                                              \[\leadsto \color{blue}{\frac{1 - \cos B \cdot x}{\sin B}} \]
                                                            7. Taylor expanded in B around 0

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

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

                                                                \[\leadsto \frac{\left(1 + {B}^{2} \cdot \left(\frac{1}{2} \cdot x - \frac{-1}{6} \cdot \left(1 - x\right)\right)\right) - x}{B} \]
                                                            9. Applied rewrites46.5%

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

                                                          Alternative 24: 43.5% accurate, 13.6× speedup?

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

                                                            1. Initial program 59.7%

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

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

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

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

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

                                                                \[\leadsto \frac{-\left(1 + x\right)}{B} \]
                                                              3. lower-+.f6451.0

                                                                \[\leadsto \frac{-\left(1 + x\right)}{B} \]
                                                            7. Applied rewrites51.0%

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

                                                            if -95 < F < 5.49999999999999967e-28

                                                            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. 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}} \]
                                                            3. 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}} \]
                                                            4. Applied rewrites50.3%

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

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

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

                                                                \[\leadsto \frac{-x}{B} \]
                                                            7. Applied rewrites35.0%

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

                                                            if 5.49999999999999967e-28 < F

                                                            1. Initial program 62.2%

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

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

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

                                                              \[\leadsto \frac{1 - x}{B} \]
                                                            6. Step-by-step derivation
                                                              1. lower--.f6448.1

                                                                \[\leadsto \frac{1 - x}{B} \]
                                                            7. Applied rewrites48.1%

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

                                                          Alternative 25: 30.4% accurate, 14.1× speedup?

                                                          \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{-x}{B}\\ \mathbf{if}\;x \leq -1 \cdot 10^{-48}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq 2.3 \cdot 10^{-100}:\\ \;\;\;\;\frac{1}{B}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
                                                          (FPCore (F B x)
                                                           :precision binary64
                                                           (let* ((t_0 (/ (- x) B)))
                                                             (if (<= x -1e-48) t_0 (if (<= x 2.3e-100) (/ 1.0 B) t_0))))
                                                          double code(double F, double B, double x) {
                                                          	double t_0 = -x / B;
                                                          	double tmp;
                                                          	if (x <= -1e-48) {
                                                          		tmp = t_0;
                                                          	} else if (x <= 2.3e-100) {
                                                          		tmp = 1.0 / B;
                                                          	} else {
                                                          		tmp = t_0;
                                                          	}
                                                          	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) :: t_0
                                                              real(8) :: tmp
                                                              t_0 = -x / b
                                                              if (x <= (-1d-48)) then
                                                                  tmp = t_0
                                                              else if (x <= 2.3d-100) then
                                                                  tmp = 1.0d0 / b
                                                              else
                                                                  tmp = t_0
                                                              end if
                                                              code = tmp
                                                          end function
                                                          
                                                          public static double code(double F, double B, double x) {
                                                          	double t_0 = -x / B;
                                                          	double tmp;
                                                          	if (x <= -1e-48) {
                                                          		tmp = t_0;
                                                          	} else if (x <= 2.3e-100) {
                                                          		tmp = 1.0 / B;
                                                          	} else {
                                                          		tmp = t_0;
                                                          	}
                                                          	return tmp;
                                                          }
                                                          
                                                          def code(F, B, x):
                                                          	t_0 = -x / B
                                                          	tmp = 0
                                                          	if x <= -1e-48:
                                                          		tmp = t_0
                                                          	elif x <= 2.3e-100:
                                                          		tmp = 1.0 / B
                                                          	else:
                                                          		tmp = t_0
                                                          	return tmp
                                                          
                                                          function code(F, B, x)
                                                          	t_0 = Float64(Float64(-x) / B)
                                                          	tmp = 0.0
                                                          	if (x <= -1e-48)
                                                          		tmp = t_0;
                                                          	elseif (x <= 2.3e-100)
                                                          		tmp = Float64(1.0 / B);
                                                          	else
                                                          		tmp = t_0;
                                                          	end
                                                          	return tmp
                                                          end
                                                          
                                                          function tmp_2 = code(F, B, x)
                                                          	t_0 = -x / B;
                                                          	tmp = 0.0;
                                                          	if (x <= -1e-48)
                                                          		tmp = t_0;
                                                          	elseif (x <= 2.3e-100)
                                                          		tmp = 1.0 / B;
                                                          	else
                                                          		tmp = t_0;
                                                          	end
                                                          	tmp_2 = tmp;
                                                          end
                                                          
                                                          code[F_, B_, x_] := Block[{t$95$0 = N[((-x) / B), $MachinePrecision]}, If[LessEqual[x, -1e-48], t$95$0, If[LessEqual[x, 2.3e-100], N[(1.0 / B), $MachinePrecision], t$95$0]]]
                                                          
                                                          \begin{array}{l}
                                                          
                                                          \\
                                                          \begin{array}{l}
                                                          t_0 := \frac{-x}{B}\\
                                                          \mathbf{if}\;x \leq -1 \cdot 10^{-48}:\\
                                                          \;\;\;\;t\_0\\
                                                          
                                                          \mathbf{elif}\;x \leq 2.3 \cdot 10^{-100}:\\
                                                          \;\;\;\;\frac{1}{B}\\
                                                          
                                                          \mathbf{else}:\\
                                                          \;\;\;\;t\_0\\
                                                          
                                                          
                                                          \end{array}
                                                          \end{array}
                                                          
                                                          Derivation
                                                          1. Split input into 2 regimes
                                                          2. if x < -9.9999999999999997e-49 or 2.29999999999999994e-100 < x

                                                            1. Initial program 80.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. 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}} \]
                                                            3. 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}} \]
                                                            4. Applied rewrites46.4%

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

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

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

                                                                \[\leadsto \frac{-x}{B} \]
                                                            7. Applied rewrites42.1%

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

                                                            if -9.9999999999999997e-49 < x < 2.29999999999999994e-100

                                                            1. Initial program 72.2%

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

                                                                \[\leadsto \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}} \]
                                                            3. Applied rewrites75.7%

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

                                                              \[\leadsto \color{blue}{\frac{1}{\sin B} - \frac{x \cdot \cos B}{\sin B}} \]
                                                            5. 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. *-commutativeN/A

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

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

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

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

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

                                                              \[\leadsto \color{blue}{\frac{1 - \cos B \cdot x}{\sin B}} \]
                                                            7. Taylor expanded in x around 0

                                                              \[\leadsto \frac{1}{\sin \color{blue}{B}} \]
                                                            8. Step-by-step derivation
                                                              1. Applied rewrites26.8%

                                                                \[\leadsto \frac{1}{\sin \color{blue}{B}} \]
                                                              2. Taylor expanded in B around 0

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

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

                                                              Alternative 26: 36.2% accurate, 17.5× speedup?

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

                                                                1. Initial program 83.2%

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

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

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

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

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

                                                                    \[\leadsto \frac{-x}{B} \]
                                                                7. Applied rewrites31.1%

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

                                                                if 5.49999999999999967e-28 < F

                                                                1. Initial program 62.2%

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

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

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

                                                                  \[\leadsto \frac{1 - x}{B} \]
                                                                6. Step-by-step derivation
                                                                  1. lower--.f6448.1

                                                                    \[\leadsto \frac{1 - x}{B} \]
                                                                7. Applied rewrites48.1%

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

                                                              Alternative 27: 9.9% accurate, 30.7× speedup?

                                                              \[\begin{array}{l} \\ \frac{1}{B} \end{array} \]
                                                              (FPCore (F B x) :precision binary64 (/ 1.0 B))
                                                              double code(double F, double B, double x) {
                                                              	return 1.0 / B;
                                                              }
                                                              
                                                              module fmin_fmax_functions
                                                                  implicit none
                                                                  private
                                                                  public fmax
                                                                  public fmin
                                                              
                                                                  interface fmax
                                                                      module procedure fmax88
                                                                      module procedure fmax44
                                                                      module procedure fmax84
                                                                      module procedure fmax48
                                                                  end interface
                                                                  interface fmin
                                                                      module procedure fmin88
                                                                      module procedure fmin44
                                                                      module procedure fmin84
                                                                      module procedure fmin48
                                                                  end interface
                                                              contains
                                                                  real(8) function fmax88(x, y) result (res)
                                                                      real(8), intent (in) :: x
                                                                      real(8), intent (in) :: y
                                                                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                  end function
                                                                  real(4) function fmax44(x, y) result (res)
                                                                      real(4), intent (in) :: x
                                                                      real(4), intent (in) :: y
                                                                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                  end function
                                                                  real(8) function fmax84(x, y) result(res)
                                                                      real(8), intent (in) :: x
                                                                      real(4), intent (in) :: y
                                                                      res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                                  end function
                                                                  real(8) function fmax48(x, y) result(res)
                                                                      real(4), intent (in) :: x
                                                                      real(8), intent (in) :: y
                                                                      res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                                  end function
                                                                  real(8) function fmin88(x, y) result (res)
                                                                      real(8), intent (in) :: x
                                                                      real(8), intent (in) :: y
                                                                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                  end function
                                                                  real(4) function fmin44(x, y) result (res)
                                                                      real(4), intent (in) :: x
                                                                      real(4), intent (in) :: y
                                                                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                  end function
                                                                  real(8) function fmin84(x, y) result(res)
                                                                      real(8), intent (in) :: x
                                                                      real(4), intent (in) :: y
                                                                      res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                                  end function
                                                                  real(8) function fmin48(x, y) result(res)
                                                                      real(4), intent (in) :: x
                                                                      real(8), intent (in) :: y
                                                                      res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                                  end function
                                                              end module
                                                              
                                                              real(8) function code(f, b, x)
                                                              use fmin_fmax_functions
                                                                  real(8), intent (in) :: f
                                                                  real(8), intent (in) :: b
                                                                  real(8), intent (in) :: x
                                                                  code = 1.0d0 / b
                                                              end function
                                                              
                                                              public static double code(double F, double B, double x) {
                                                              	return 1.0 / B;
                                                              }
                                                              
                                                              def code(F, B, x):
                                                              	return 1.0 / B
                                                              
                                                              function code(F, B, x)
                                                              	return Float64(1.0 / B)
                                                              end
                                                              
                                                              function tmp = code(F, B, x)
                                                              	tmp = 1.0 / B;
                                                              end
                                                              
                                                              code[F_, B_, x_] := N[(1.0 / B), $MachinePrecision]
                                                              
                                                              \begin{array}{l}
                                                              
                                                              \\
                                                              \frac{1}{B}
                                                              \end{array}
                                                              
                                                              Derivation
                                                              1. Initial program 77.0%

                                                                \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                              2. 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}} \]
                                                              3. Applied rewrites85.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}} \]
                                                              4. Taylor expanded in F around inf

                                                                \[\leadsto \color{blue}{\frac{1}{\sin B} - \frac{x \cdot \cos B}{\sin B}} \]
                                                              5. 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. *-commutativeN/A

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

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

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

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

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

                                                                \[\leadsto \color{blue}{\frac{1 - \cos B \cdot x}{\sin B}} \]
                                                              7. Taylor expanded in x around 0

                                                                \[\leadsto \frac{1}{\sin \color{blue}{B}} \]
                                                              8. Step-by-step derivation
                                                                1. Applied rewrites16.5%

                                                                  \[\leadsto \frac{1}{\sin \color{blue}{B}} \]
                                                                2. Taylor expanded in B around 0

                                                                  \[\leadsto \frac{1}{B} \]
                                                                3. Step-by-step derivation
                                                                  1. Applied rewrites9.9%

                                                                    \[\leadsto \frac{1}{B} \]
                                                                  2. Add Preprocessing

                                                                  Reproduce

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