VandenBroeck and Keller, Equation (23)

Percentage Accurate: 76.6% → 99.5%
Time: 6.7s
Alternatives: 18
Speedup: 1.3×

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

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

Initial Program: 76.6% accurate, 1.0× speedup?

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

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

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

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

Alternative 1: 99.5% accurate, 0.9× speedup?

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

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

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

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


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

    1. Initial program 76.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. 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(-\frac{1}{2}\right)}}{\sin B}} \]
      4. div-flipN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-1}{\color{blue}{\sin B}} - \frac{x}{\tan B} \]
      2. lower-sin.f6455.5

        \[\leadsto \frac{-1}{\sin B} - \frac{x}{\tan B} \]
    10. Applied rewrites55.5%

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

    if -5.99999999999999953e27 < F < 2.8999999999999998e30

    1. Initial program 76.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 \color{blue}{\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
      2. +-commutativeN/A

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

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

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

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

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

    if 2.8999999999999998e30 < F

    1. Initial program 76.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}{F \cdot \left(-1 \cdot \frac{x \cdot \cos B}{F \cdot \sin B} + \frac{1}{F \cdot \sin B}\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

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

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

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

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

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

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

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

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

        \[\leadsto F \cdot \mathsf{fma}\left(-1, \frac{x \cdot \cos B}{F \cdot \sin B}, \frac{1}{F \cdot \sin B}\right) \]
      10. lower-sin.f6447.7

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

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

Alternative 2: 92.1% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_0 := \frac{-1}{\sin B}\\
\mathbf{if}\;F \leq -2000000000000:\\
\;\;\;\;t\_0 - \frac{x}{\tan B}\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-F, t\_0 \cdot {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \frac{-x}{\tan B}\right)\\


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

    1. Initial program 76.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. 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(-\frac{1}{2}\right)}}{\sin B}} \]
      4. div-flipN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-1}{\color{blue}{\sin B}} - \frac{x}{\tan B} \]
      2. lower-sin.f6455.5

        \[\leadsto \frac{-1}{\sin B} - \frac{x}{\tan B} \]
    10. Applied rewrites55.5%

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

    if -2e12 < F

    1. Initial program 76.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 \color{blue}{\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
      2. +-commutativeN/A

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

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

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

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

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

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

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

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

Alternative 3: 92.1% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;F \leq -1 \cdot 10^{+14}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\

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


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

    1. Initial program 76.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. 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(-\frac{1}{2}\right)}}{\sin B}} \]
      4. div-flipN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-1}{\color{blue}{\sin B}} - \frac{x}{\tan B} \]
      2. lower-sin.f6455.5

        \[\leadsto \frac{-1}{\sin B} - \frac{x}{\tan B} \]
    10. Applied rewrites55.5%

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

    if -1e14 < F

    1. Initial program 76.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 \color{blue}{\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
      2. +-commutativeN/A

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

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

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

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

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

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

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

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

Alternative 4: 92.1% accurate, 1.3× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(F, F, 2\right)}} - t\_0\\


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

    1. Initial program 76.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. 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(-\frac{1}{2}\right)}}{\sin B}} \]
      4. div-flipN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-1}{\color{blue}{\sin B}} - \frac{x}{\tan B} \]
      2. lower-sin.f6455.5

        \[\leadsto \frac{-1}{\sin B} - \frac{x}{\tan B} \]
    10. Applied rewrites55.5%

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

    if -4.99999999999999963e74 < F

    1. Initial program 76.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. 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(-\frac{1}{2}\right)}}{\sin B}} \]
      4. div-flipN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 5: 81.4% accurate, 1.2× speedup?

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

      1. Initial program 76.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. 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(-\frac{1}{2}\right)}}{\sin B}} \]
        4. div-flipN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{-1}{\color{blue}{\sin B}} - \frac{x}{\tan B} \]
        2. lower-sin.f6455.5

          \[\leadsto \frac{-1}{\sin B} - \frac{x}{\tan B} \]
      10. Applied rewrites55.5%

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

      if -2.4e7 < F < -1.15e-206

      1. Initial program 76.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 \color{blue}{\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
        2. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

      if -1.15e-206 < F < 1.65e-31

      1. Initial program 76.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 \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{F}{B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
      3. Step-by-step derivation
        1. lower-/.f6462.5

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

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

      if 1.65e-31 < F < 4.79999999999999995e141

      1. Initial program 76.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. 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(-\frac{1}{2}\right)}}{\sin B}} \]
        4. div-flipN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 4.79999999999999995e141 < F

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{neg}\left(\frac{x \cdot \cos B}{\sin B}\right) \]
        3. lift-/.f64N/A

          \[\leadsto \mathsf{neg}\left(\frac{x \cdot \cos B}{\sin B}\right) \]
        4. mult-flipN/A

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

          \[\leadsto \mathsf{neg}\left(\left(x \cdot \cos B\right) \cdot \frac{1}{\sin B}\right) \]
        6. associate-*l*N/A

          \[\leadsto \mathsf{neg}\left(x \cdot \left(\cos B \cdot \frac{1}{\sin B}\right)\right) \]
        7. mult-flipN/A

          \[\leadsto \mathsf{neg}\left(x \cdot \frac{\cos B}{\sin B}\right) \]
        8. div-flip-revN/A

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

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

          \[\leadsto \mathsf{neg}\left(x \cdot \frac{1}{\frac{\sin B}{\cos B}}\right) \]
        11. tan-quotN/A

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

          \[\leadsto \mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right) \]
        13. mult-flip-revN/A

          \[\leadsto \mathsf{neg}\left(\frac{x}{\tan B}\right) \]
        14. distribute-frac-negN/A

          \[\leadsto \frac{\mathsf{neg}\left(x\right)}{\color{blue}{\tan B}} \]
        15. lift-neg.f64N/A

          \[\leadsto \frac{-x}{\tan \color{blue}{B}} \]
        16. lift-/.f6455.6

          \[\leadsto \frac{-x}{\color{blue}{\tan B}} \]
      6. Applied rewrites55.6%

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

    Alternative 6: 79.5% accurate, 1.3× speedup?

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

      1. Initial program 76.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. 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(-\frac{1}{2}\right)}}{\sin B}} \]
        4. div-flipN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{-1}{\color{blue}{\sin B}} - \frac{x}{\tan B} \]
        2. lower-sin.f6455.5

          \[\leadsto \frac{-1}{\sin B} - \frac{x}{\tan B} \]
      10. Applied rewrites55.5%

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

      if -2.4e7 < F < -1.15e-206

      1. Initial program 76.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 \color{blue}{\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
        2. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

      if -1.15e-206 < F < 6.9000000000000001e-183 or 4.79999999999999995e141 < F

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{neg}\left(\frac{x \cdot \cos B}{\sin B}\right) \]
        3. lift-/.f64N/A

          \[\leadsto \mathsf{neg}\left(\frac{x \cdot \cos B}{\sin B}\right) \]
        4. mult-flipN/A

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

          \[\leadsto \mathsf{neg}\left(\left(x \cdot \cos B\right) \cdot \frac{1}{\sin B}\right) \]
        6. associate-*l*N/A

          \[\leadsto \mathsf{neg}\left(x \cdot \left(\cos B \cdot \frac{1}{\sin B}\right)\right) \]
        7. mult-flipN/A

          \[\leadsto \mathsf{neg}\left(x \cdot \frac{\cos B}{\sin B}\right) \]
        8. div-flip-revN/A

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

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

          \[\leadsto \mathsf{neg}\left(x \cdot \frac{1}{\frac{\sin B}{\cos B}}\right) \]
        11. tan-quotN/A

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

          \[\leadsto \mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right) \]
        13. mult-flip-revN/A

          \[\leadsto \mathsf{neg}\left(\frac{x}{\tan B}\right) \]
        14. distribute-frac-negN/A

          \[\leadsto \frac{\mathsf{neg}\left(x\right)}{\color{blue}{\tan B}} \]
        15. lift-neg.f64N/A

          \[\leadsto \frac{-x}{\tan \color{blue}{B}} \]
        16. lift-/.f6455.6

          \[\leadsto \frac{-x}{\color{blue}{\tan B}} \]
      6. Applied rewrites55.6%

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

      if 6.9000000000000001e-183 < F < 4.79999999999999995e141

      1. Initial program 76.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. 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(-\frac{1}{2}\right)}}{\sin B}} \]
        4. div-flipN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 7: 76.4% accurate, 1.4× speedup?

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{neg}\left(\frac{x \cdot \cos B}{\sin B}\right) \]
        3. lift-/.f64N/A

          \[\leadsto \mathsf{neg}\left(\frac{x \cdot \cos B}{\sin B}\right) \]
        4. mult-flipN/A

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

          \[\leadsto \mathsf{neg}\left(\left(x \cdot \cos B\right) \cdot \frac{1}{\sin B}\right) \]
        6. associate-*l*N/A

          \[\leadsto \mathsf{neg}\left(x \cdot \left(\cos B \cdot \frac{1}{\sin B}\right)\right) \]
        7. mult-flipN/A

          \[\leadsto \mathsf{neg}\left(x \cdot \frac{\cos B}{\sin B}\right) \]
        8. div-flip-revN/A

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

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

          \[\leadsto \mathsf{neg}\left(x \cdot \frac{1}{\frac{\sin B}{\cos B}}\right) \]
        11. tan-quotN/A

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

          \[\leadsto \mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right) \]
        13. mult-flip-revN/A

          \[\leadsto \mathsf{neg}\left(\frac{x}{\tan B}\right) \]
        14. distribute-frac-negN/A

          \[\leadsto \frac{\mathsf{neg}\left(x\right)}{\color{blue}{\tan B}} \]
        15. lift-neg.f64N/A

          \[\leadsto \frac{-x}{\tan \color{blue}{B}} \]
        16. lift-/.f6455.6

          \[\leadsto \frac{-x}{\color{blue}{\tan B}} \]
      6. Applied rewrites55.6%

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

      if -2.4500000000000001e-20 < x < 3.85e12

      1. Initial program 76.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. 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(-\frac{1}{2}\right)}}{\sin B}} \]
        4. div-flipN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 8: 76.4% accurate, 1.8× speedup?

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{neg}\left(\frac{x \cdot \cos B}{\sin B}\right) \]
        3. lift-/.f64N/A

          \[\leadsto \mathsf{neg}\left(\frac{x \cdot \cos B}{\sin B}\right) \]
        4. mult-flipN/A

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

          \[\leadsto \mathsf{neg}\left(\left(x \cdot \cos B\right) \cdot \frac{1}{\sin B}\right) \]
        6. associate-*l*N/A

          \[\leadsto \mathsf{neg}\left(x \cdot \left(\cos B \cdot \frac{1}{\sin B}\right)\right) \]
        7. mult-flipN/A

          \[\leadsto \mathsf{neg}\left(x \cdot \frac{\cos B}{\sin B}\right) \]
        8. div-flip-revN/A

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

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

          \[\leadsto \mathsf{neg}\left(x \cdot \frac{1}{\frac{\sin B}{\cos B}}\right) \]
        11. tan-quotN/A

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

          \[\leadsto \mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right) \]
        13. mult-flip-revN/A

          \[\leadsto \mathsf{neg}\left(\frac{x}{\tan B}\right) \]
        14. distribute-frac-negN/A

          \[\leadsto \frac{\mathsf{neg}\left(x\right)}{\color{blue}{\tan B}} \]
        15. lift-neg.f64N/A

          \[\leadsto \frac{-x}{\tan \color{blue}{B}} \]
        16. lift-/.f6455.6

          \[\leadsto \frac{-x}{\color{blue}{\tan B}} \]
      6. Applied rewrites55.6%

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

      if -2.4500000000000001e-20 < x < 3.85e12

      1. Initial program 76.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. 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(-\frac{1}{2}\right)}}{\sin B}} \]
        4. div-flipN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 9: 57.6% accurate, 2.2× speedup?

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

      1. Initial program 76.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 {\left(2 + \left(2 \cdot x + {F}^{2}\right)\right)}^{\frac{-1}{2}} - x}{B}} \]
      3. Step-by-step derivation
        1. metadata-evalN/A

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

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

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

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

      if 2.49999999999999989e-7 < B

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{neg}\left(\frac{x \cdot \cos B}{\sin B}\right) \]
        3. lift-/.f64N/A

          \[\leadsto \mathsf{neg}\left(\frac{x \cdot \cos B}{\sin B}\right) \]
        4. mult-flipN/A

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

          \[\leadsto \mathsf{neg}\left(\left(x \cdot \cos B\right) \cdot \frac{1}{\sin B}\right) \]
        6. associate-*l*N/A

          \[\leadsto \mathsf{neg}\left(x \cdot \left(\cos B \cdot \frac{1}{\sin B}\right)\right) \]
        7. mult-flipN/A

          \[\leadsto \mathsf{neg}\left(x \cdot \frac{\cos B}{\sin B}\right) \]
        8. div-flip-revN/A

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

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

          \[\leadsto \mathsf{neg}\left(x \cdot \frac{1}{\frac{\sin B}{\cos B}}\right) \]
        11. tan-quotN/A

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

          \[\leadsto \mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right) \]
        13. mult-flip-revN/A

          \[\leadsto \mathsf{neg}\left(\frac{x}{\tan B}\right) \]
        14. distribute-frac-negN/A

          \[\leadsto \frac{\mathsf{neg}\left(x\right)}{\color{blue}{\tan B}} \]
        15. lift-neg.f64N/A

          \[\leadsto \frac{-x}{\tan \color{blue}{B}} \]
        16. lift-/.f6455.6

          \[\leadsto \frac{-x}{\color{blue}{\tan B}} \]
      6. Applied rewrites55.6%

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

    Alternative 10: 57.5% accurate, 2.6× speedup?

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

      1. Initial program 76.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. 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(-\frac{1}{2}\right)}}{\sin B}} \]
        4. div-flipN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\frac{F}{\sqrt{2 + \mathsf{fma}\left(2, x, {F}^{2}\right)}} - x}{B} \]
        7. lower-pow.f6444.2

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

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

      if 2.49999999999999989e-7 < B

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{neg}\left(\frac{x \cdot \cos B}{\sin B}\right) \]
        3. lift-/.f64N/A

          \[\leadsto \mathsf{neg}\left(\frac{x \cdot \cos B}{\sin B}\right) \]
        4. mult-flipN/A

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

          \[\leadsto \mathsf{neg}\left(\left(x \cdot \cos B\right) \cdot \frac{1}{\sin B}\right) \]
        6. associate-*l*N/A

          \[\leadsto \mathsf{neg}\left(x \cdot \left(\cos B \cdot \frac{1}{\sin B}\right)\right) \]
        7. mult-flipN/A

          \[\leadsto \mathsf{neg}\left(x \cdot \frac{\cos B}{\sin B}\right) \]
        8. div-flip-revN/A

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

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

          \[\leadsto \mathsf{neg}\left(x \cdot \frac{1}{\frac{\sin B}{\cos B}}\right) \]
        11. tan-quotN/A

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

          \[\leadsto \mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right) \]
        13. mult-flip-revN/A

          \[\leadsto \mathsf{neg}\left(\frac{x}{\tan B}\right) \]
        14. distribute-frac-negN/A

          \[\leadsto \frac{\mathsf{neg}\left(x\right)}{\color{blue}{\tan B}} \]
        15. lift-neg.f64N/A

          \[\leadsto \frac{-x}{\tan \color{blue}{B}} \]
        16. lift-/.f6455.6

          \[\leadsto \frac{-x}{\color{blue}{\tan B}} \]
      6. Applied rewrites55.6%

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

    Alternative 11: 54.0% accurate, 2.6× speedup?

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

      1. Initial program 76.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}{\frac{-1}{\sin B}} \]
      3. Step-by-step derivation
        1. lower-/.f64N/A

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

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

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

      if -2.2e14 < F < 0.00899999999999999932

      1. Initial program 76.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. 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(-\frac{1}{2}\right)}}{\sin B}} \]
        4. div-flipN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\frac{F}{\sqrt{2 + \mathsf{fma}\left(2, x, {F}^{2}\right)}} - x}{B} \]
        7. lower-pow.f6444.2

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

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

      if 0.00899999999999999932 < F

      1. Initial program 76.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}{\frac{1}{\sin B}} \]
      3. Step-by-step derivation
        1. lower-/.f64N/A

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

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

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

    Alternative 12: 47.3% accurate, 2.9× speedup?

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

      1. Initial program 76.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. 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(-\frac{1}{2}\right)}}{\sin B}} \]
        4. div-flipN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\frac{F}{\sqrt{2 + \mathsf{fma}\left(2, x, {F}^{2}\right)}} - x}{B} \]
        7. lower-pow.f6444.2

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

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

      if 7.8e6 < B

      1. Initial program 76.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}{\frac{-1}{\sin B}} \]
      3. Step-by-step derivation
        1. lower-/.f64N/A

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

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

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

    Alternative 13: 44.2% accurate, 3.2× speedup?

    \[\begin{array}{l} \\ \frac{\frac{F}{\sqrt{2 + \mathsf{fma}\left(2, x, {F}^{2}\right)}} - x}{B} \end{array} \]
    (FPCore (F B x)
     :precision binary64
     (/ (- (/ F (sqrt (+ 2.0 (fma 2.0 x (pow F 2.0))))) x) B))
    double code(double F, double B, double x) {
    	return ((F / sqrt((2.0 + fma(2.0, x, pow(F, 2.0))))) - x) / B;
    }
    
    function code(F, B, x)
    	return Float64(Float64(Float64(F / sqrt(Float64(2.0 + fma(2.0, x, (F ^ 2.0))))) - x) / B)
    end
    
    code[F_, B_, x_] := N[(N[(N[(F / N[Sqrt[N[(2.0 + N[(2.0 * x + N[Power[F, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]
    
    \begin{array}{l}
    
    \\
    \frac{\frac{F}{\sqrt{2 + \mathsf{fma}\left(2, x, {F}^{2}\right)}} - x}{B}
    \end{array}
    
    Derivation
    1. Initial program 76.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. 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(-\frac{1}{2}\right)}}{\sin B}} \]
      4. div-flipN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{F}{\sqrt{2 + \mathsf{fma}\left(2, x, {F}^{2}\right)}} - x}{B} \]
      7. lower-pow.f6444.2

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

      \[\leadsto \color{blue}{\frac{\frac{F}{\sqrt{2 + \mathsf{fma}\left(2, x, {F}^{2}\right)}} - x}{B}} \]
    9. Add Preprocessing

    Alternative 14: 30.7% accurate, 3.9× speedup?

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

      1. Initial program 76.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}{\frac{-1}{\sin B}} \]
      3. Step-by-step derivation
        1. lower-/.f64N/A

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

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

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

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

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

          \[\leadsto \frac{\frac{-1}{6} \cdot {B}^{2} - 1}{B} \]
        3. lower-*.f64N/A

          \[\leadsto \frac{\frac{-1}{6} \cdot {B}^{2} - 1}{B} \]
        4. lower-pow.f6410.5

          \[\leadsto \frac{-0.16666666666666666 \cdot {B}^{2} - 1}{B} \]
      7. Applied rewrites10.5%

        \[\leadsto \frac{-0.16666666666666666 \cdot {B}^{2} - 1}{\color{blue}{B}} \]

      if -6.5000000000000003e-10 < F

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto -1 \cdot \frac{\left(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot x - \frac{-1}{6} \cdot x\right) \cdot \left(B \cdot B\right) + x}{B} \]
        9. associate-*r*N/A

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

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

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

    Alternative 15: 30.6% accurate, 5.3× speedup?

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

      1. Initial program 76.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}{\frac{-1}{\sin B}} \]
      3. Step-by-step derivation
        1. lower-/.f64N/A

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

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

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

        \[\leadsto \frac{-1}{B} \]
      6. Step-by-step derivation
        1. Applied rewrites10.7%

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

        if -6.5000000000000003e-10 < F

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto -1 \cdot \frac{\left(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot x - \frac{-1}{6} \cdot x\right) \cdot \left(B \cdot B\right) + x}{B} \]
          9. associate-*r*N/A

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

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

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

      Alternative 16: 30.5% accurate, 5.8× speedup?

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

        1. Initial program 76.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}{\frac{-1}{\sin B}} \]
        3. Step-by-step derivation
          1. lower-/.f64N/A

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

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

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

          \[\leadsto \frac{-1}{B} \]
        6. Step-by-step derivation
          1. Applied rewrites10.7%

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

          if -6.5000000000000003e-10 < F

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 17: 30.5% accurate, 12.7× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -6.5 \cdot 10^{-10}:\\ \;\;\;\;\frac{-1}{B}\\ \mathbf{else}:\\ \;\;\;\;-\frac{x}{B}\\ \end{array} \end{array} \]
        (FPCore (F B x)
         :precision binary64
         (if (<= F -6.5e-10) (/ -1.0 B) (- (/ x B))))
        double code(double F, double B, double x) {
        	double tmp;
        	if (F <= -6.5e-10) {
        		tmp = -1.0 / B;
        	} else {
        		tmp = -(x / B);
        	}
        	return tmp;
        }
        
        module fmin_fmax_functions
            implicit none
            private
            public fmax
            public fmin
        
            interface fmax
                module procedure fmax88
                module procedure fmax44
                module procedure fmax84
                module procedure fmax48
            end interface
            interface fmin
                module procedure fmin88
                module procedure fmin44
                module procedure fmin84
                module procedure fmin48
            end interface
        contains
            real(8) function fmax88(x, y) result (res)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
            end function
            real(4) function fmax44(x, y) result (res)
                real(4), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
            end function
            real(8) function fmax84(x, y) result(res)
                real(8), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
            end function
            real(8) function fmax48(x, y) result(res)
                real(4), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
            end function
            real(8) function fmin88(x, y) result (res)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
            end function
            real(4) function fmin44(x, y) result (res)
                real(4), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
            end function
            real(8) function fmin84(x, y) result(res)
                real(8), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
            end function
            real(8) function fmin48(x, y) result(res)
                real(4), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
            end function
        end module
        
        real(8) function code(f, b, x)
        use fmin_fmax_functions
            real(8), intent (in) :: f
            real(8), intent (in) :: b
            real(8), intent (in) :: x
            real(8) :: tmp
            if (f <= (-6.5d-10)) then
                tmp = (-1.0d0) / b
            else
                tmp = -(x / b)
            end if
            code = tmp
        end function
        
        public static double code(double F, double B, double x) {
        	double tmp;
        	if (F <= -6.5e-10) {
        		tmp = -1.0 / B;
        	} else {
        		tmp = -(x / B);
        	}
        	return tmp;
        }
        
        def code(F, B, x):
        	tmp = 0
        	if F <= -6.5e-10:
        		tmp = -1.0 / B
        	else:
        		tmp = -(x / B)
        	return tmp
        
        function code(F, B, x)
        	tmp = 0.0
        	if (F <= -6.5e-10)
        		tmp = Float64(-1.0 / B);
        	else
        		tmp = Float64(-Float64(x / B));
        	end
        	return tmp
        end
        
        function tmp_2 = code(F, B, x)
        	tmp = 0.0;
        	if (F <= -6.5e-10)
        		tmp = -1.0 / B;
        	else
        		tmp = -(x / B);
        	end
        	tmp_2 = tmp;
        end
        
        code[F_, B_, x_] := If[LessEqual[F, -6.5e-10], N[(-1.0 / B), $MachinePrecision], (-N[(x / B), $MachinePrecision])]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;F \leq -6.5 \cdot 10^{-10}:\\
        \;\;\;\;\frac{-1}{B}\\
        
        \mathbf{else}:\\
        \;\;\;\;-\frac{x}{B}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if F < -6.5000000000000003e-10

          1. Initial program 76.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}{\frac{-1}{\sin B}} \]
          3. Step-by-step derivation
            1. lower-/.f64N/A

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

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

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

            \[\leadsto \frac{-1}{B} \]
          6. Step-by-step derivation
            1. Applied rewrites10.7%

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

            if -6.5000000000000003e-10 < F

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

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

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

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

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

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

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

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

              \[\leadsto -1 \cdot \frac{x}{\color{blue}{B}} \]
            6. Step-by-step derivation
              1. lower-/.f6429.3

                \[\leadsto -1 \cdot \frac{x}{B} \]
            7. Applied rewrites29.3%

              \[\leadsto -1 \cdot \frac{x}{\color{blue}{B}} \]
            8. Step-by-step derivation
              1. lift-*.f64N/A

                \[\leadsto -1 \cdot \color{blue}{\frac{x}{B}} \]
              2. mul-1-negN/A

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

                \[\leadsto -\frac{x}{B} \]
            9. Applied rewrites29.3%

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

          Alternative 18: 10.7% accurate, 26.5× 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 76.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}{\frac{-1}{\sin B}} \]
          3. Step-by-step derivation
            1. lower-/.f64N/A

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

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

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

            \[\leadsto \frac{-1}{B} \]
          6. Step-by-step derivation
            1. Applied rewrites10.7%

              \[\leadsto \frac{-1}{B} \]
            2. Add Preprocessing

            Reproduce

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