VandenBroeck and Keller, Equation (23)

Percentage Accurate: 76.3% → 99.7%
Time: 22.3s
Alternatives: 21
Speedup: 1.5×

Specification

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

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

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

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 21 alternatives:

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

Initial Program: 76.3% accurate, 1.0× speedup?

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

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

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

Alternative 1: 99.7% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \color{blue}{\sin B}}\right)\right) \]
      11. lower-sin.f6449.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -1 \cdot \left(F \cdot \frac{\frac{\cos B \cdot x + 1}{\sin B}}{F}\right) \]
      13. lower-fma.f6449.2%

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

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

    if -1e16 < F < 1.9e6

    1. Initial program 76.3%

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

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

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

    if 1.9e6 < F

    1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(F, \frac{\frac{1}{\sin B}}{\color{blue}{F}}, \frac{-x}{\tan B}\right) \]
        6. rgt-mult-inverseN/A

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(F, \frac{\frac{F \cdot \frac{1}{F}}{\sin B}}{F}, \frac{-x}{\tan B}\right) \]
        18. rgt-mult-inverseN/A

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

          \[\leadsto \mathsf{fma}\left(F, \frac{\frac{1}{\sin B}}{F}, \frac{-x}{\tan B}\right) \]
        20. lift-sin.f6452.5%

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

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

    Alternative 2: 99.0% accurate, 1.1× speedup?

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

      1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \color{blue}{\sin B}}\right)\right) \]
        11. lower-sin.f6449.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto -1 \cdot \left(F \cdot \frac{\frac{\cos B \cdot x + 1}{\sin B}}{F}\right) \]
        13. lower-fma.f6449.2%

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

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

      if -0.0105000000000000007 < F < 5.4999999999999999e-6

      1. Initial program 76.3%

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

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

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

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

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

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

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

          \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(2 + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
        7. metadata-eval54.5%

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

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

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

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

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

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

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

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

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

      if 5.4999999999999999e-6 < F

      1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(F, \frac{\frac{1}{\sin B}}{\color{blue}{F}}, \frac{-x}{\tan B}\right) \]
          6. rgt-mult-inverseN/A

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(F, \frac{\frac{F \cdot \frac{1}{F}}{\sin B}}{F}, \frac{-x}{\tan B}\right) \]
          18. rgt-mult-inverseN/A

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

            \[\leadsto \mathsf{fma}\left(F, \frac{\frac{1}{\sin B}}{F}, \frac{-x}{\tan B}\right) \]
          20. lift-sin.f6452.5%

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

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

      Alternative 3: 99.0% accurate, 1.0× speedup?

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

        1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \color{blue}{\sin B}}\right)\right) \]
          11. lower-sin.f6449.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto -1 \cdot \left(F \cdot \frac{\frac{\cos B \cdot x + 1}{\sin B}}{F}\right) \]
          13. lower-fma.f6449.2%

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

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

        if -7.20000000000000045e-4 < F < 5.4999999999999999e-6

        1. Initial program 76.3%

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

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

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

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

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

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

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

            \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(2 + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \]
          7. metadata-eval54.5%

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

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

        if 5.4999999999999999e-6 < F

        1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(F, \frac{\frac{1}{\sin B}}{\color{blue}{F}}, \frac{-x}{\tan B}\right) \]
            6. rgt-mult-inverseN/A

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(F, \frac{\frac{F \cdot \frac{1}{F}}{\sin B}}{F}, \frac{-x}{\tan B}\right) \]
            18. rgt-mult-inverseN/A

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

              \[\leadsto \mathsf{fma}\left(F, \frac{\frac{1}{\sin B}}{F}, \frac{-x}{\tan B}\right) \]
            20. lift-sin.f6452.5%

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

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

        Alternative 4: 91.7% accurate, 1.3× speedup?

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

          1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \color{blue}{\sin B}}\right)\right) \]
            11. lower-sin.f6449.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto -1 \cdot \left(F \cdot \frac{\frac{\cos B \cdot x + 1}{\sin B}}{F}\right) \]
            13. lower-fma.f6449.2%

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

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

          if -24000 < F < 5.4999999999999999e-6

          1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

            if 5.4999999999999999e-6 < F

            1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{fma}\left(F, \frac{\frac{1}{\sin B}}{\color{blue}{F}}, \frac{-x}{\tan B}\right) \]
                6. rgt-mult-inverseN/A

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{fma}\left(F, \frac{\frac{F \cdot \frac{1}{F}}{\sin B}}{F}, \frac{-x}{\tan B}\right) \]
                18. rgt-mult-inverseN/A

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

                  \[\leadsto \mathsf{fma}\left(F, \frac{\frac{1}{\sin B}}{F}, \frac{-x}{\tan B}\right) \]
                20. lift-sin.f6452.5%

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

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

            Alternative 5: 91.7% accurate, 1.3× speedup?

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

              1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \color{blue}{\sin B}}\right)\right) \]
                11. lower-sin.f6449.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto -1 \cdot \left(F \cdot \frac{\frac{\cos B \cdot x + 1}{\sin B}}{F}\right) \]
                13. lower-fma.f6449.2%

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

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

              if -24000 < F < 5.4999999999999999e-6

              1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

                if 5.4999999999999999e-6 < F

                1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \color{blue}{F \cdot \frac{1}{F \cdot \sin B} + \frac{-x}{\tan B}} \]
                    2. add-flipN/A

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

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

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

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

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

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

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

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

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

                      \[\leadsto \frac{1}{\sin B \cdot F} \cdot F - \left(\mathsf{neg}\left(\mathsf{Rewrite=>}\left(lift-/.f64, \left(\frac{-x}{\tan B}\right)\right)\right)\right) \]
                  6. Applied rewrites52.4%

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

                Alternative 6: 85.3% accurate, 1.3× speedup?

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

                  1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \color{blue}{\sin B}}\right)\right) \]
                    11. lower-sin.f6449.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto -1 \cdot \left(F \cdot \frac{\frac{\cos B \cdot x + 1}{\sin B}}{F}\right) \]
                    13. lower-fma.f6449.2%

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

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

                  if -24000 < F < 1.49999999999999999e26

                  1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

                    if 1.49999999999999999e26 < F < 5.7999999999999997e227

                    1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      if 5.7999999999999997e227 < F

                      1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \mathsf{fma}\left(F, \frac{1}{B \cdot \color{blue}{F}}, \frac{-x}{\tan B}\right) \]
                        6. Step-by-step derivation
                          1. lower-*.f6450.0%

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

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

                      Alternative 7: 85.3% accurate, 1.4× speedup?

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

                        1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \color{blue}{\sin B}}\right)\right) \]
                          11. lower-sin.f6449.1%

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

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

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

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

                            \[\leadsto \mathsf{neg}\left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right) \]
                          4. *-commutativeN/A

                            \[\leadsto \mathsf{neg}\left(\left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right) \cdot F\right) \]
                          5. distribute-rgt-neg-inN/A

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

                            \[\leadsto \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right) \cdot \color{blue}{\left(\mathsf{neg}\left(F\right)\right)} \]
                        6. Applied rewrites49.1%

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

                        if -24000 < F < 1.49999999999999999e26

                        1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

                          if 1.49999999999999999e26 < F < 5.7999999999999997e227

                          1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            if 5.7999999999999997e227 < F

                            1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \mathsf{fma}\left(F, \frac{1}{B \cdot \color{blue}{F}}, \frac{-x}{\tan B}\right) \]
                              6. Step-by-step derivation
                                1. lower-*.f6450.0%

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

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

                            Alternative 8: 78.9% accurate, 1.4× speedup?

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

                              1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \color{blue}{\sin B}}\right)\right) \]
                                11. lower-sin.f6449.1%

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

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

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

                                  \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x}{B \cdot \color{blue}{F}}\right)\right) \]
                                2. lower-*.f6432.9%

                                  \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x}{B \cdot F}\right)\right) \]
                              7. Applied rewrites32.9%

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

                              if -1.4500000000000001e189 < F < -6.0999999999999998e29

                              1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \mathsf{fma}\left(F, \frac{\color{blue}{\frac{-1}{F}}}{B}, \frac{-x}{\tan B}\right) \]
                                3. Step-by-step derivation
                                  1. lower-/.f6452.1%

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

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

                                if -6.0999999999999998e29 < F < -1.27999999999999995e-101

                                1. Initial program 76.3%

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

                                  \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin 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-/.f6449.0%

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

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

                                    \[\leadsto \color{blue}{\left(-\frac{x}{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(-\frac{x}{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(\frac{x}{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)} - \frac{x}{B}} \]
                                  5. lower--.f6449.0%

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

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

                                if -1.27999999999999995e-101 < F < 4.2e19

                                1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    if 4.2e19 < F < 5.7999999999999997e227

                                    1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      if 5.7999999999999997e227 < F

                                      1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                          \[\leadsto \mathsf{fma}\left(F, \frac{1}{B \cdot \color{blue}{F}}, \frac{-x}{\tan B}\right) \]
                                        6. Step-by-step derivation
                                          1. lower-*.f6450.0%

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

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

                                      Alternative 9: 78.5% accurate, 1.4× speedup?

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

                                        1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \color{blue}{\sin B}}\right)\right) \]
                                          11. lower-sin.f6449.1%

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

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

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

                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x}{B \cdot \color{blue}{F}}\right)\right) \]
                                          2. lower-*.f6432.9%

                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x}{B \cdot F}\right)\right) \]
                                        7. Applied rewrites32.9%

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

                                        if -1.90000000000000012e156 < F < 1.49999999999999999e26

                                        1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

                                          if 1.49999999999999999e26 < F < 5.7999999999999997e227

                                          1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                            if 5.7999999999999997e227 < F

                                            1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                \[\leadsto \mathsf{fma}\left(F, \frac{1}{B \cdot \color{blue}{F}}, \frac{-x}{\tan B}\right) \]
                                              6. Step-by-step derivation
                                                1. lower-*.f6450.0%

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

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

                                            Alternative 10: 78.3% accurate, 1.5× speedup?

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

                                              1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

                                                  \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \color{blue}{\sin B}}\right)\right) \]
                                                11. lower-sin.f6449.1%

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

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

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

                                                  \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x}{B \cdot \color{blue}{F}}\right)\right) \]
                                                2. lower-*.f6432.9%

                                                  \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x}{B \cdot F}\right)\right) \]
                                              7. Applied rewrites32.9%

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

                                              if -0.0105000000000000007 < F < 4.2e19

                                              1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                  if 4.2e19 < F < 5.7999999999999997e227

                                                  1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                    if 5.7999999999999997e227 < F

                                                    1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                        \[\leadsto \mathsf{fma}\left(F, \frac{1}{B \cdot \color{blue}{F}}, \frac{-x}{\tan B}\right) \]
                                                      6. Step-by-step derivation
                                                        1. lower-*.f6450.0%

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

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

                                                    Alternative 11: 68.4% accurate, 1.7× speedup?

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

                                                      1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                        if 1.08000000000000002e-10 < B

                                                        1. Initial program 76.3%

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

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

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

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

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

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

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

                                                      Alternative 12: 66.8% accurate, 1.8× speedup?

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

                                                        1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                          if 9.99999999999999924e-25 < B

                                                          1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                              \[\leadsto \mathsf{fma}\left(F, \frac{1}{B \cdot \color{blue}{F}}, \frac{-x}{\tan B}\right) \]
                                                            6. Step-by-step derivation
                                                              1. lower-*.f6450.0%

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

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

                                                          Alternative 13: 58.5% accurate, 2.0× speedup?

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

                                                            1. Initial program 76.3%

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

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

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

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

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

                                                            if -7.6e12 < F < 5.4999999999999999e-6

                                                            1. Initial program 76.3%

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

                                                              \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin 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-/.f6449.0%

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

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

                                                                \[\leadsto \color{blue}{\left(-\frac{x}{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(-\frac{x}{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(\frac{x}{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)} - \frac{x}{B}} \]
                                                              5. lower--.f6449.0%

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

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

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

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

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

                                                            if 5.4999999999999999e-6 < F

                                                            1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

                                                                \[\leadsto \mathsf{fma}\left(F, \color{blue}{\frac{1}{F \cdot \sin B}}, \frac{-x}{\tan B}\right) \]
                                                              3. Step-by-step derivation
                                                                1. lower-/.f64N/A

                                                                  \[\leadsto \mathsf{fma}\left(F, \frac{1}{\color{blue}{F \cdot \sin B}}, \frac{-x}{\tan B}\right) \]
                                                                2. lower-*.f64N/A

                                                                  \[\leadsto \mathsf{fma}\left(F, \frac{1}{F \cdot \color{blue}{\sin B}}, \frac{-x}{\tan B}\right) \]
                                                                3. lower-sin.f6452.4%

                                                                  \[\leadsto \mathsf{fma}\left(F, \frac{1}{F \cdot \sin B}, \frac{-x}{\tan B}\right) \]
                                                              4. Applied rewrites52.4%

                                                                \[\leadsto \mathsf{fma}\left(F, \color{blue}{\frac{1}{F \cdot \sin B}}, \frac{-x}{\tan B}\right) \]
                                                              5. Taylor expanded in B around 0

                                                                \[\leadsto \mathsf{fma}\left(F, \frac{1}{F \cdot \sin B}, \color{blue}{-1 \cdot \frac{x}{B}}\right) \]
                                                              6. Step-by-step derivation
                                                                1. lower-*.f64N/A

                                                                  \[\leadsto \mathsf{fma}\left(F, \frac{1}{F \cdot \sin B}, -1 \cdot \color{blue}{\frac{x}{B}}\right) \]
                                                                2. lower-/.f6432.6%

                                                                  \[\leadsto \mathsf{fma}\left(F, \frac{1}{F \cdot \sin B}, -1 \cdot \frac{x}{\color{blue}{B}}\right) \]
                                                              7. Applied rewrites32.6%

                                                                \[\leadsto \mathsf{fma}\left(F, \frac{1}{F \cdot \sin B}, \color{blue}{-1 \cdot \frac{x}{B}}\right) \]
                                                            6. Recombined 3 regimes into one program.
                                                            7. Add Preprocessing

                                                            Alternative 14: 51.2% accurate, 1.9× speedup?

                                                            \[\begin{array}{l} \mathbf{if}\;F \leq -7600000000000:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 5.2 \cdot 10^{+174}:\\ \;\;\;\;\mathsf{fma}\left(F, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{B}, -1 \cdot \frac{x}{B}\right)\\ \mathbf{elif}\;F \leq 1.02 \cdot 10^{+260}:\\ \;\;\;\;\frac{1}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{-1}{F} \cdot \frac{F}{\sin B} - \frac{x}{B}\\ \end{array} \]
                                                            (FPCore (F B x)
                                                             :precision binary64
                                                             (if (<= F -7600000000000.0)
                                                               (/ -1.0 (sin B))
                                                               (if (<= F 5.2e+174)
                                                                 (fma F (/ (pow (fma 2.0 x (fma F F 2.0)) -0.5) B) (* -1.0 (/ x B)))
                                                                 (if (<= F 1.02e+260)
                                                                   (/ 1.0 (sin B))
                                                                   (- (* (/ -1.0 F) (/ F (sin B))) (/ x B))))))
                                                            double code(double F, double B, double x) {
                                                            	double tmp;
                                                            	if (F <= -7600000000000.0) {
                                                            		tmp = -1.0 / sin(B);
                                                            	} else if (F <= 5.2e+174) {
                                                            		tmp = fma(F, (pow(fma(2.0, x, fma(F, F, 2.0)), -0.5) / B), (-1.0 * (x / B)));
                                                            	} else if (F <= 1.02e+260) {
                                                            		tmp = 1.0 / sin(B);
                                                            	} else {
                                                            		tmp = ((-1.0 / F) * (F / sin(B))) - (x / B);
                                                            	}
                                                            	return tmp;
                                                            }
                                                            
                                                            function code(F, B, x)
                                                            	tmp = 0.0
                                                            	if (F <= -7600000000000.0)
                                                            		tmp = Float64(-1.0 / sin(B));
                                                            	elseif (F <= 5.2e+174)
                                                            		tmp = fma(F, Float64((fma(2.0, x, fma(F, F, 2.0)) ^ -0.5) / B), Float64(-1.0 * Float64(x / B)));
                                                            	elseif (F <= 1.02e+260)
                                                            		tmp = Float64(1.0 / sin(B));
                                                            	else
                                                            		tmp = Float64(Float64(Float64(-1.0 / F) * Float64(F / sin(B))) - Float64(x / B));
                                                            	end
                                                            	return tmp
                                                            end
                                                            
                                                            code[F_, B_, x_] := If[LessEqual[F, -7600000000000.0], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.2e+174], N[(F * N[(N[Power[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] / B), $MachinePrecision] + N[(-1.0 * N[(x / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.02e+260], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(N[(-1.0 / F), $MachinePrecision] * N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]
                                                            
                                                            \begin{array}{l}
                                                            \mathbf{if}\;F \leq -7600000000000:\\
                                                            \;\;\;\;\frac{-1}{\sin B}\\
                                                            
                                                            \mathbf{elif}\;F \leq 5.2 \cdot 10^{+174}:\\
                                                            \;\;\;\;\mathsf{fma}\left(F, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{B}, -1 \cdot \frac{x}{B}\right)\\
                                                            
                                                            \mathbf{elif}\;F \leq 1.02 \cdot 10^{+260}:\\
                                                            \;\;\;\;\frac{1}{\sin B}\\
                                                            
                                                            \mathbf{else}:\\
                                                            \;\;\;\;\frac{-1}{F} \cdot \frac{F}{\sin B} - \frac{x}{B}\\
                                                            
                                                            
                                                            \end{array}
                                                            
                                                            Derivation
                                                            1. Split input into 4 regimes
                                                            2. if F < -7.6e12

                                                              1. Initial program 76.3%

                                                                \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                              2. Taylor expanded in F around -inf

                                                                \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                                              3. Step-by-step derivation
                                                                1. lower-/.f64N/A

                                                                  \[\leadsto \frac{-1}{\color{blue}{\sin B}} \]
                                                                2. lower-sin.f6417.0%

                                                                  \[\leadsto \frac{-1}{\sin B} \]
                                                              4. Applied rewrites17.0%

                                                                \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]

                                                              if -7.6e12 < F < 5.1999999999999997e174

                                                              1. Initial program 76.3%

                                                                \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                              2. Step-by-step derivation
                                                                1. lift-+.f64N/A

                                                                  \[\leadsto \color{blue}{\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
                                                                2. +-commutativeN/A

                                                                  \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
                                                                3. lift-*.f64N/A

                                                                  \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                                                                4. lift-/.f64N/A

                                                                  \[\leadsto \color{blue}{\frac{F}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                                                                5. mult-flipN/A

                                                                  \[\leadsto \color{blue}{\left(F \cdot \frac{1}{\sin B}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                                                                6. associate-*l*N/A

                                                                  \[\leadsto \color{blue}{F \cdot \left(\frac{1}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right)} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                                                                7. lower-fma.f64N/A

                                                                  \[\leadsto \color{blue}{\mathsf{fma}\left(F, \frac{1}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}, -x \cdot \frac{1}{\tan B}\right)} \]
                                                              3. Applied rewrites84.7%

                                                                \[\leadsto \color{blue}{\mathsf{fma}\left(F, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B}, \frac{-x}{\tan B}\right)} \]
                                                              4. Taylor expanded in B around 0

                                                                \[\leadsto \mathsf{fma}\left(F, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\color{blue}{B}}, \frac{-x}{\tan B}\right) \]
                                                              5. Step-by-step derivation
                                                                1. Applied rewrites70.3%

                                                                  \[\leadsto \mathsf{fma}\left(F, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\color{blue}{B}}, \frac{-x}{\tan B}\right) \]
                                                                2. Taylor expanded in B around 0

                                                                  \[\leadsto \mathsf{fma}\left(F, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{B}, \color{blue}{-1 \cdot \frac{x}{B}}\right) \]
                                                                3. Step-by-step derivation
                                                                  1. lower-*.f64N/A

                                                                    \[\leadsto \mathsf{fma}\left(F, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}}}{B}, -1 \cdot \color{blue}{\frac{x}{B}}\right) \]
                                                                  2. lower-/.f6443.4%

                                                                    \[\leadsto \mathsf{fma}\left(F, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{B}, -1 \cdot \frac{x}{\color{blue}{B}}\right) \]
                                                                4. Applied rewrites43.4%

                                                                  \[\leadsto \mathsf{fma}\left(F, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{B}, \color{blue}{-1 \cdot \frac{x}{B}}\right) \]

                                                                if 5.1999999999999997e174 < F < 1.02e260

                                                                1. Initial program 76.3%

                                                                  \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                2. 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.5%

                                                                    \[\leadsto \frac{1}{\sin B} \]
                                                                4. Applied rewrites17.5%

                                                                  \[\leadsto \color{blue}{\frac{1}{\sin B}} \]

                                                                if 1.02e260 < F

                                                                1. Initial program 76.3%

                                                                  \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                2. Taylor expanded in B around 0

                                                                  \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin 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-/.f6449.0%

                                                                    \[\leadsto \left(-\frac{x}{\color{blue}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                4. Applied rewrites49.0%

                                                                  \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                5. Step-by-step derivation
                                                                  1. lift-+.f64N/A

                                                                    \[\leadsto \color{blue}{\left(-\frac{x}{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(-\frac{x}{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(\frac{x}{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)} - \frac{x}{B}} \]
                                                                  5. lower--.f6449.0%

                                                                    \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \frac{x}{B}} \]
                                                                6. Applied rewrites49.0%

                                                                  \[\leadsto \color{blue}{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \frac{F}{\sin B} - \frac{x}{B}} \]
                                                                7. Taylor expanded in F around 0

                                                                  \[\leadsto {\left(\mathsf{fma}\left(x, 2, \color{blue}{2}\right)\right)}^{-0.5} \cdot \frac{F}{\sin B} - \frac{x}{B} \]
                                                                8. Step-by-step derivation
                                                                  1. Applied rewrites35.3%

                                                                    \[\leadsto {\left(\mathsf{fma}\left(x, 2, \color{blue}{2}\right)\right)}^{-0.5} \cdot \frac{F}{\sin B} - \frac{x}{B} \]
                                                                  2. Taylor expanded in F around -inf

                                                                    \[\leadsto \color{blue}{\frac{-1}{F}} \cdot \frac{F}{\sin B} - \frac{x}{B} \]
                                                                  3. Step-by-step derivation
                                                                    1. lower-/.f6427.3%

                                                                      \[\leadsto \frac{-1}{\color{blue}{F}} \cdot \frac{F}{\sin B} - \frac{x}{B} \]
                                                                  4. Applied rewrites27.3%

                                                                    \[\leadsto \color{blue}{\frac{-1}{F}} \cdot \frac{F}{\sin B} - \frac{x}{B} \]
                                                                9. Recombined 4 regimes into one program.
                                                                10. Add Preprocessing

                                                                Alternative 15: 50.9% accurate, 2.4× speedup?

                                                                \[\begin{array}{l} \mathbf{if}\;F \leq -7600000000000:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 5.2 \cdot 10^{+174}:\\ \;\;\;\;\mathsf{fma}\left(F, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{B}, -1 \cdot \frac{x}{B}\right)\\ \mathbf{elif}\;F \leq 1.85 \cdot 10^{+256}:\\ \;\;\;\;\frac{1}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;-1 \cdot \left(\frac{1 + x}{F \cdot B} \cdot F\right)\\ \end{array} \]
                                                                (FPCore (F B x)
                                                                 :precision binary64
                                                                 (if (<= F -7600000000000.0)
                                                                   (/ -1.0 (sin B))
                                                                   (if (<= F 5.2e+174)
                                                                     (fma F (/ (pow (fma 2.0 x (fma F F 2.0)) -0.5) B) (* -1.0 (/ x B)))
                                                                     (if (<= F 1.85e+256)
                                                                       (/ 1.0 (sin B))
                                                                       (* -1.0 (* (/ (+ 1.0 x) (* F B)) F))))))
                                                                double code(double F, double B, double x) {
                                                                	double tmp;
                                                                	if (F <= -7600000000000.0) {
                                                                		tmp = -1.0 / sin(B);
                                                                	} else if (F <= 5.2e+174) {
                                                                		tmp = fma(F, (pow(fma(2.0, x, fma(F, F, 2.0)), -0.5) / B), (-1.0 * (x / B)));
                                                                	} else if (F <= 1.85e+256) {
                                                                		tmp = 1.0 / sin(B);
                                                                	} else {
                                                                		tmp = -1.0 * (((1.0 + x) / (F * B)) * F);
                                                                	}
                                                                	return tmp;
                                                                }
                                                                
                                                                function code(F, B, x)
                                                                	tmp = 0.0
                                                                	if (F <= -7600000000000.0)
                                                                		tmp = Float64(-1.0 / sin(B));
                                                                	elseif (F <= 5.2e+174)
                                                                		tmp = fma(F, Float64((fma(2.0, x, fma(F, F, 2.0)) ^ -0.5) / B), Float64(-1.0 * Float64(x / B)));
                                                                	elseif (F <= 1.85e+256)
                                                                		tmp = Float64(1.0 / sin(B));
                                                                	else
                                                                		tmp = Float64(-1.0 * Float64(Float64(Float64(1.0 + x) / Float64(F * B)) * F));
                                                                	end
                                                                	return tmp
                                                                end
                                                                
                                                                code[F_, B_, x_] := If[LessEqual[F, -7600000000000.0], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.2e+174], N[(F * N[(N[Power[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] / B), $MachinePrecision] + N[(-1.0 * N[(x / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.85e+256], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(-1.0 * N[(N[(N[(1.0 + x), $MachinePrecision] / N[(F * B), $MachinePrecision]), $MachinePrecision] * F), $MachinePrecision]), $MachinePrecision]]]]
                                                                
                                                                \begin{array}{l}
                                                                \mathbf{if}\;F \leq -7600000000000:\\
                                                                \;\;\;\;\frac{-1}{\sin B}\\
                                                                
                                                                \mathbf{elif}\;F \leq 5.2 \cdot 10^{+174}:\\
                                                                \;\;\;\;\mathsf{fma}\left(F, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{B}, -1 \cdot \frac{x}{B}\right)\\
                                                                
                                                                \mathbf{elif}\;F \leq 1.85 \cdot 10^{+256}:\\
                                                                \;\;\;\;\frac{1}{\sin B}\\
                                                                
                                                                \mathbf{else}:\\
                                                                \;\;\;\;-1 \cdot \left(\frac{1 + x}{F \cdot B} \cdot F\right)\\
                                                                
                                                                
                                                                \end{array}
                                                                
                                                                Derivation
                                                                1. Split input into 4 regimes
                                                                2. if F < -7.6e12

                                                                  1. Initial program 76.3%

                                                                    \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                  2. Taylor expanded in F around -inf

                                                                    \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                                                  3. Step-by-step derivation
                                                                    1. lower-/.f64N/A

                                                                      \[\leadsto \frac{-1}{\color{blue}{\sin B}} \]
                                                                    2. lower-sin.f6417.0%

                                                                      \[\leadsto \frac{-1}{\sin B} \]
                                                                  4. Applied rewrites17.0%

                                                                    \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]

                                                                  if -7.6e12 < F < 5.1999999999999997e174

                                                                  1. Initial program 76.3%

                                                                    \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                  2. Step-by-step derivation
                                                                    1. lift-+.f64N/A

                                                                      \[\leadsto \color{blue}{\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
                                                                    2. +-commutativeN/A

                                                                      \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
                                                                    3. lift-*.f64N/A

                                                                      \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                                                                    4. lift-/.f64N/A

                                                                      \[\leadsto \color{blue}{\frac{F}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                                                                    5. mult-flipN/A

                                                                      \[\leadsto \color{blue}{\left(F \cdot \frac{1}{\sin B}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                                                                    6. associate-*l*N/A

                                                                      \[\leadsto \color{blue}{F \cdot \left(\frac{1}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right)} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                                                                    7. lower-fma.f64N/A

                                                                      \[\leadsto \color{blue}{\mathsf{fma}\left(F, \frac{1}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}, -x \cdot \frac{1}{\tan B}\right)} \]
                                                                  3. Applied rewrites84.7%

                                                                    \[\leadsto \color{blue}{\mathsf{fma}\left(F, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B}, \frac{-x}{\tan B}\right)} \]
                                                                  4. Taylor expanded in B around 0

                                                                    \[\leadsto \mathsf{fma}\left(F, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\color{blue}{B}}, \frac{-x}{\tan B}\right) \]
                                                                  5. Step-by-step derivation
                                                                    1. Applied rewrites70.3%

                                                                      \[\leadsto \mathsf{fma}\left(F, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\color{blue}{B}}, \frac{-x}{\tan B}\right) \]
                                                                    2. Taylor expanded in B around 0

                                                                      \[\leadsto \mathsf{fma}\left(F, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{B}, \color{blue}{-1 \cdot \frac{x}{B}}\right) \]
                                                                    3. Step-by-step derivation
                                                                      1. lower-*.f64N/A

                                                                        \[\leadsto \mathsf{fma}\left(F, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}}}{B}, -1 \cdot \color{blue}{\frac{x}{B}}\right) \]
                                                                      2. lower-/.f6443.4%

                                                                        \[\leadsto \mathsf{fma}\left(F, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{B}, -1 \cdot \frac{x}{\color{blue}{B}}\right) \]
                                                                    4. Applied rewrites43.4%

                                                                      \[\leadsto \mathsf{fma}\left(F, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{B}, \color{blue}{-1 \cdot \frac{x}{B}}\right) \]

                                                                    if 5.1999999999999997e174 < F < 1.85000000000000016e256

                                                                    1. Initial program 76.3%

                                                                      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                    2. 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.5%

                                                                        \[\leadsto \frac{1}{\sin B} \]
                                                                    4. Applied rewrites17.5%

                                                                      \[\leadsto \color{blue}{\frac{1}{\sin B}} \]

                                                                    if 1.85000000000000016e256 < F

                                                                    1. Initial program 76.3%

                                                                      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                    2. Taylor expanded in F around -inf

                                                                      \[\leadsto \color{blue}{-1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right)} \]
                                                                    3. Step-by-step derivation
                                                                      1. lower-*.f64N/A

                                                                        \[\leadsto -1 \cdot \color{blue}{\left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right)} \]
                                                                      2. lower-*.f64N/A

                                                                        \[\leadsto -1 \cdot \left(F \cdot \color{blue}{\left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)}\right) \]
                                                                      3. lower-+.f64N/A

                                                                        \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \color{blue}{\frac{x \cdot \cos B}{F \cdot \sin B}}\right)\right) \]
                                                                      4. lower-/.f64N/A

                                                                        \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{\color{blue}{x \cdot \cos B}}{F \cdot \sin B}\right)\right) \]
                                                                      5. lower-*.f64N/A

                                                                        \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \color{blue}{\cos B}}{F \cdot \sin B}\right)\right) \]
                                                                      6. lower-sin.f64N/A

                                                                        \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right) \]
                                                                      7. lower-/.f64N/A

                                                                        \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{\color{blue}{F \cdot \sin B}}\right)\right) \]
                                                                      8. lower-*.f64N/A

                                                                        \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{\color{blue}{F} \cdot \sin B}\right)\right) \]
                                                                      9. lower-cos.f64N/A

                                                                        \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right) \]
                                                                      10. lower-*.f64N/A

                                                                        \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \color{blue}{\sin B}}\right)\right) \]
                                                                      11. lower-sin.f6449.1%

                                                                        \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right) \]
                                                                    4. Applied rewrites49.1%

                                                                      \[\leadsto \color{blue}{-1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right)} \]
                                                                    5. Taylor expanded in B around 0

                                                                      \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{\color{blue}{B}} \]
                                                                    6. Step-by-step derivation
                                                                      1. lower-/.f64N/A

                                                                        \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                                                      2. lower-*.f64N/A

                                                                        \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                                                      3. lower-+.f64N/A

                                                                        \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                                                      4. lower-/.f64N/A

                                                                        \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                                                      5. lower-/.f6427.9%

                                                                        \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                                                    7. Applied rewrites27.9%

                                                                      \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{\color{blue}{B}} \]
                                                                    8. Step-by-step derivation
                                                                      1. lift-/.f64N/A

                                                                        \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                                                      2. lift-*.f64N/A

                                                                        \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                                                      3. associate-/l*N/A

                                                                        \[\leadsto -1 \cdot \left(F \cdot \frac{\frac{1}{F} + \frac{x}{F}}{\color{blue}{B}}\right) \]
                                                                      4. *-commutativeN/A

                                                                        \[\leadsto -1 \cdot \left(\frac{\frac{1}{F} + \frac{x}{F}}{B} \cdot F\right) \]
                                                                      5. lower-*.f64N/A

                                                                        \[\leadsto -1 \cdot \left(\frac{\frac{1}{F} + \frac{x}{F}}{B} \cdot F\right) \]
                                                                      6. lift-+.f64N/A

                                                                        \[\leadsto -1 \cdot \left(\frac{\frac{1}{F} + \frac{x}{F}}{B} \cdot F\right) \]
                                                                      7. lift-/.f64N/A

                                                                        \[\leadsto -1 \cdot \left(\frac{\frac{1}{F} + \frac{x}{F}}{B} \cdot F\right) \]
                                                                      8. lift-/.f64N/A

                                                                        \[\leadsto -1 \cdot \left(\frac{\frac{1}{F} + \frac{x}{F}}{B} \cdot F\right) \]
                                                                      9. div-add-revN/A

                                                                        \[\leadsto -1 \cdot \left(\frac{\frac{1 + x}{F}}{B} \cdot F\right) \]
                                                                      10. associate-/l/N/A

                                                                        \[\leadsto -1 \cdot \left(\frac{1 + x}{F \cdot B} \cdot F\right) \]
                                                                      11. lower-/.f64N/A

                                                                        \[\leadsto -1 \cdot \left(\frac{1 + x}{F \cdot B} \cdot F\right) \]
                                                                      12. lower-+.f64N/A

                                                                        \[\leadsto -1 \cdot \left(\frac{1 + x}{F \cdot B} \cdot F\right) \]
                                                                      13. lower-*.f6426.6%

                                                                        \[\leadsto -1 \cdot \left(\frac{1 + x}{F \cdot B} \cdot F\right) \]
                                                                    9. Applied rewrites26.6%

                                                                      \[\leadsto -1 \cdot \left(\frac{1 + x}{F \cdot B} \cdot F\right) \]
                                                                  6. Recombined 4 regimes into one program.
                                                                  7. Add Preprocessing

                                                                  Alternative 16: 49.9% accurate, 2.4× speedup?

                                                                  \[\begin{array}{l} \mathbf{if}\;F \leq -7600000000000:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 1420:\\ \;\;\;\;{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 1.85 \cdot 10^{+256}:\\ \;\;\;\;\frac{1}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;-1 \cdot \left(\frac{1 + x}{F \cdot B} \cdot F\right)\\ \end{array} \]
                                                                  (FPCore (F B x)
                                                                   :precision binary64
                                                                   (if (<= F -7600000000000.0)
                                                                     (/ -1.0 (sin B))
                                                                     (if (<= F 1420.0)
                                                                       (- (* (pow (fma x 2.0 (fma F F 2.0)) -0.5) (/ F B)) (/ x B))
                                                                       (if (<= F 1.85e+256)
                                                                         (/ 1.0 (sin B))
                                                                         (* -1.0 (* (/ (+ 1.0 x) (* F B)) F))))))
                                                                  double code(double F, double B, double x) {
                                                                  	double tmp;
                                                                  	if (F <= -7600000000000.0) {
                                                                  		tmp = -1.0 / sin(B);
                                                                  	} else if (F <= 1420.0) {
                                                                  		tmp = (pow(fma(x, 2.0, fma(F, F, 2.0)), -0.5) * (F / B)) - (x / B);
                                                                  	} else if (F <= 1.85e+256) {
                                                                  		tmp = 1.0 / sin(B);
                                                                  	} else {
                                                                  		tmp = -1.0 * (((1.0 + x) / (F * B)) * F);
                                                                  	}
                                                                  	return tmp;
                                                                  }
                                                                  
                                                                  function code(F, B, x)
                                                                  	tmp = 0.0
                                                                  	if (F <= -7600000000000.0)
                                                                  		tmp = Float64(-1.0 / sin(B));
                                                                  	elseif (F <= 1420.0)
                                                                  		tmp = Float64(Float64((fma(x, 2.0, fma(F, F, 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B));
                                                                  	elseif (F <= 1.85e+256)
                                                                  		tmp = Float64(1.0 / sin(B));
                                                                  	else
                                                                  		tmp = Float64(-1.0 * Float64(Float64(Float64(1.0 + x) / Float64(F * B)) * F));
                                                                  	end
                                                                  	return tmp
                                                                  end
                                                                  
                                                                  code[F_, B_, x_] := If[LessEqual[F, -7600000000000.0], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1420.0], N[(N[(N[Power[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.85e+256], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(-1.0 * N[(N[(N[(1.0 + x), $MachinePrecision] / N[(F * B), $MachinePrecision]), $MachinePrecision] * F), $MachinePrecision]), $MachinePrecision]]]]
                                                                  
                                                                  \begin{array}{l}
                                                                  \mathbf{if}\;F \leq -7600000000000:\\
                                                                  \;\;\;\;\frac{-1}{\sin B}\\
                                                                  
                                                                  \mathbf{elif}\;F \leq 1420:\\
                                                                  \;\;\;\;{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
                                                                  
                                                                  \mathbf{elif}\;F \leq 1.85 \cdot 10^{+256}:\\
                                                                  \;\;\;\;\frac{1}{\sin B}\\
                                                                  
                                                                  \mathbf{else}:\\
                                                                  \;\;\;\;-1 \cdot \left(\frac{1 + x}{F \cdot B} \cdot F\right)\\
                                                                  
                                                                  
                                                                  \end{array}
                                                                  
                                                                  Derivation
                                                                  1. Split input into 4 regimes
                                                                  2. if F < -7.6e12

                                                                    1. Initial program 76.3%

                                                                      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                    2. Taylor expanded in F around -inf

                                                                      \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                                                    3. Step-by-step derivation
                                                                      1. lower-/.f64N/A

                                                                        \[\leadsto \frac{-1}{\color{blue}{\sin B}} \]
                                                                      2. lower-sin.f6417.0%

                                                                        \[\leadsto \frac{-1}{\sin B} \]
                                                                    4. Applied rewrites17.0%

                                                                      \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]

                                                                    if -7.6e12 < F < 1420

                                                                    1. Initial program 76.3%

                                                                      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                    2. Taylor expanded in B around 0

                                                                      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin 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-/.f6449.0%

                                                                        \[\leadsto \left(-\frac{x}{\color{blue}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                    4. Applied rewrites49.0%

                                                                      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                    5. Step-by-step derivation
                                                                      1. lift-+.f64N/A

                                                                        \[\leadsto \color{blue}{\left(-\frac{x}{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(-\frac{x}{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(\frac{x}{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)} - \frac{x}{B}} \]
                                                                      5. lower--.f6449.0%

                                                                        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \frac{x}{B}} \]
                                                                    6. Applied rewrites49.0%

                                                                      \[\leadsto \color{blue}{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \frac{F}{\sin B} - \frac{x}{B}} \]
                                                                    7. Taylor expanded in B around 0

                                                                      \[\leadsto {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \color{blue}{\frac{F}{B}} - \frac{x}{B} \]
                                                                    8. Step-by-step derivation
                                                                      1. lower-/.f6435.2%

                                                                        \[\leadsto {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \frac{F}{\color{blue}{B}} - \frac{x}{B} \]
                                                                    9. Applied rewrites35.2%

                                                                      \[\leadsto {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \color{blue}{\frac{F}{B}} - \frac{x}{B} \]

                                                                    if 1420 < F < 1.85000000000000016e256

                                                                    1. Initial program 76.3%

                                                                      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                    2. 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.5%

                                                                        \[\leadsto \frac{1}{\sin B} \]
                                                                    4. Applied rewrites17.5%

                                                                      \[\leadsto \color{blue}{\frac{1}{\sin B}} \]

                                                                    if 1.85000000000000016e256 < F

                                                                    1. Initial program 76.3%

                                                                      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                    2. Taylor expanded in F around -inf

                                                                      \[\leadsto \color{blue}{-1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right)} \]
                                                                    3. Step-by-step derivation
                                                                      1. lower-*.f64N/A

                                                                        \[\leadsto -1 \cdot \color{blue}{\left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right)} \]
                                                                      2. lower-*.f64N/A

                                                                        \[\leadsto -1 \cdot \left(F \cdot \color{blue}{\left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)}\right) \]
                                                                      3. lower-+.f64N/A

                                                                        \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \color{blue}{\frac{x \cdot \cos B}{F \cdot \sin B}}\right)\right) \]
                                                                      4. lower-/.f64N/A

                                                                        \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{\color{blue}{x \cdot \cos B}}{F \cdot \sin B}\right)\right) \]
                                                                      5. lower-*.f64N/A

                                                                        \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \color{blue}{\cos B}}{F \cdot \sin B}\right)\right) \]
                                                                      6. lower-sin.f64N/A

                                                                        \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right) \]
                                                                      7. lower-/.f64N/A

                                                                        \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{\color{blue}{F \cdot \sin B}}\right)\right) \]
                                                                      8. lower-*.f64N/A

                                                                        \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{\color{blue}{F} \cdot \sin B}\right)\right) \]
                                                                      9. lower-cos.f64N/A

                                                                        \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right) \]
                                                                      10. lower-*.f64N/A

                                                                        \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \color{blue}{\sin B}}\right)\right) \]
                                                                      11. lower-sin.f6449.1%

                                                                        \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right) \]
                                                                    4. Applied rewrites49.1%

                                                                      \[\leadsto \color{blue}{-1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right)} \]
                                                                    5. Taylor expanded in B around 0

                                                                      \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{\color{blue}{B}} \]
                                                                    6. Step-by-step derivation
                                                                      1. lower-/.f64N/A

                                                                        \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                                                      2. lower-*.f64N/A

                                                                        \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                                                      3. lower-+.f64N/A

                                                                        \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                                                      4. lower-/.f64N/A

                                                                        \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                                                      5. lower-/.f6427.9%

                                                                        \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                                                    7. Applied rewrites27.9%

                                                                      \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{\color{blue}{B}} \]
                                                                    8. Step-by-step derivation
                                                                      1. lift-/.f64N/A

                                                                        \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                                                      2. lift-*.f64N/A

                                                                        \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                                                      3. associate-/l*N/A

                                                                        \[\leadsto -1 \cdot \left(F \cdot \frac{\frac{1}{F} + \frac{x}{F}}{\color{blue}{B}}\right) \]
                                                                      4. *-commutativeN/A

                                                                        \[\leadsto -1 \cdot \left(\frac{\frac{1}{F} + \frac{x}{F}}{B} \cdot F\right) \]
                                                                      5. lower-*.f64N/A

                                                                        \[\leadsto -1 \cdot \left(\frac{\frac{1}{F} + \frac{x}{F}}{B} \cdot F\right) \]
                                                                      6. lift-+.f64N/A

                                                                        \[\leadsto -1 \cdot \left(\frac{\frac{1}{F} + \frac{x}{F}}{B} \cdot F\right) \]
                                                                      7. lift-/.f64N/A

                                                                        \[\leadsto -1 \cdot \left(\frac{\frac{1}{F} + \frac{x}{F}}{B} \cdot F\right) \]
                                                                      8. lift-/.f64N/A

                                                                        \[\leadsto -1 \cdot \left(\frac{\frac{1}{F} + \frac{x}{F}}{B} \cdot F\right) \]
                                                                      9. div-add-revN/A

                                                                        \[\leadsto -1 \cdot \left(\frac{\frac{1 + x}{F}}{B} \cdot F\right) \]
                                                                      10. associate-/l/N/A

                                                                        \[\leadsto -1 \cdot \left(\frac{1 + x}{F \cdot B} \cdot F\right) \]
                                                                      11. lower-/.f64N/A

                                                                        \[\leadsto -1 \cdot \left(\frac{1 + x}{F \cdot B} \cdot F\right) \]
                                                                      12. lower-+.f64N/A

                                                                        \[\leadsto -1 \cdot \left(\frac{1 + x}{F \cdot B} \cdot F\right) \]
                                                                      13. lower-*.f6426.6%

                                                                        \[\leadsto -1 \cdot \left(\frac{1 + x}{F \cdot B} \cdot F\right) \]
                                                                    9. Applied rewrites26.6%

                                                                      \[\leadsto -1 \cdot \left(\frac{1 + x}{F \cdot B} \cdot F\right) \]
                                                                  3. Recombined 4 regimes into one program.
                                                                  4. Add Preprocessing

                                                                  Alternative 17: 49.1% accurate, 2.4× speedup?

                                                                  \[\begin{array}{l} \mathbf{if}\;F \leq -0.0105:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 1350:\\ \;\;\;\;{\left(\mathsf{fma}\left(x, 2, 2\right)\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 1.85 \cdot 10^{+256}:\\ \;\;\;\;\frac{1}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;-1 \cdot \left(\frac{1 + x}{F \cdot B} \cdot F\right)\\ \end{array} \]
                                                                  (FPCore (F B x)
                                                                   :precision binary64
                                                                   (if (<= F -0.0105)
                                                                     (/ -1.0 (sin B))
                                                                     (if (<= F 1350.0)
                                                                       (- (* (pow (fma x 2.0 2.0) -0.5) (/ F B)) (/ x B))
                                                                       (if (<= F 1.85e+256)
                                                                         (/ 1.0 (sin B))
                                                                         (* -1.0 (* (/ (+ 1.0 x) (* F B)) F))))))
                                                                  double code(double F, double B, double x) {
                                                                  	double tmp;
                                                                  	if (F <= -0.0105) {
                                                                  		tmp = -1.0 / sin(B);
                                                                  	} else if (F <= 1350.0) {
                                                                  		tmp = (pow(fma(x, 2.0, 2.0), -0.5) * (F / B)) - (x / B);
                                                                  	} else if (F <= 1.85e+256) {
                                                                  		tmp = 1.0 / sin(B);
                                                                  	} else {
                                                                  		tmp = -1.0 * (((1.0 + x) / (F * B)) * F);
                                                                  	}
                                                                  	return tmp;
                                                                  }
                                                                  
                                                                  function code(F, B, x)
                                                                  	tmp = 0.0
                                                                  	if (F <= -0.0105)
                                                                  		tmp = Float64(-1.0 / sin(B));
                                                                  	elseif (F <= 1350.0)
                                                                  		tmp = Float64(Float64((fma(x, 2.0, 2.0) ^ -0.5) * Float64(F / B)) - Float64(x / B));
                                                                  	elseif (F <= 1.85e+256)
                                                                  		tmp = Float64(1.0 / sin(B));
                                                                  	else
                                                                  		tmp = Float64(-1.0 * Float64(Float64(Float64(1.0 + x) / Float64(F * B)) * F));
                                                                  	end
                                                                  	return tmp
                                                                  end
                                                                  
                                                                  code[F_, B_, x_] := If[LessEqual[F, -0.0105], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1350.0], N[(N[(N[Power[N[(x * 2.0 + 2.0), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.85e+256], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(-1.0 * N[(N[(N[(1.0 + x), $MachinePrecision] / N[(F * B), $MachinePrecision]), $MachinePrecision] * F), $MachinePrecision]), $MachinePrecision]]]]
                                                                  
                                                                  \begin{array}{l}
                                                                  \mathbf{if}\;F \leq -0.0105:\\
                                                                  \;\;\;\;\frac{-1}{\sin B}\\
                                                                  
                                                                  \mathbf{elif}\;F \leq 1350:\\
                                                                  \;\;\;\;{\left(\mathsf{fma}\left(x, 2, 2\right)\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
                                                                  
                                                                  \mathbf{elif}\;F \leq 1.85 \cdot 10^{+256}:\\
                                                                  \;\;\;\;\frac{1}{\sin B}\\
                                                                  
                                                                  \mathbf{else}:\\
                                                                  \;\;\;\;-1 \cdot \left(\frac{1 + x}{F \cdot B} \cdot F\right)\\
                                                                  
                                                                  
                                                                  \end{array}
                                                                  
                                                                  Derivation
                                                                  1. Split input into 4 regimes
                                                                  2. if F < -0.0105000000000000007

                                                                    1. Initial program 76.3%

                                                                      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                    2. Taylor expanded in F around -inf

                                                                      \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                                                    3. Step-by-step derivation
                                                                      1. lower-/.f64N/A

                                                                        \[\leadsto \frac{-1}{\color{blue}{\sin B}} \]
                                                                      2. lower-sin.f6417.0%

                                                                        \[\leadsto \frac{-1}{\sin B} \]
                                                                    4. Applied rewrites17.0%

                                                                      \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]

                                                                    if -0.0105000000000000007 < F < 1350

                                                                    1. Initial program 76.3%

                                                                      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                    2. Taylor expanded in B around 0

                                                                      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin 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-/.f6449.0%

                                                                        \[\leadsto \left(-\frac{x}{\color{blue}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                    4. Applied rewrites49.0%

                                                                      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                    5. Step-by-step derivation
                                                                      1. lift-+.f64N/A

                                                                        \[\leadsto \color{blue}{\left(-\frac{x}{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(-\frac{x}{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(\frac{x}{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)} - \frac{x}{B}} \]
                                                                      5. lower--.f6449.0%

                                                                        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \frac{x}{B}} \]
                                                                    6. Applied rewrites49.0%

                                                                      \[\leadsto \color{blue}{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \frac{F}{\sin B} - \frac{x}{B}} \]
                                                                    7. Taylor expanded in F around 0

                                                                      \[\leadsto {\left(\mathsf{fma}\left(x, 2, \color{blue}{2}\right)\right)}^{-0.5} \cdot \frac{F}{\sin B} - \frac{x}{B} \]
                                                                    8. Step-by-step derivation
                                                                      1. Applied rewrites35.3%

                                                                        \[\leadsto {\left(\mathsf{fma}\left(x, 2, \color{blue}{2}\right)\right)}^{-0.5} \cdot \frac{F}{\sin B} - \frac{x}{B} \]
                                                                      2. Taylor expanded in B around 0

                                                                        \[\leadsto {\left(\mathsf{fma}\left(x, 2, 2\right)\right)}^{-0.5} \cdot \color{blue}{\frac{F}{B}} - \frac{x}{B} \]
                                                                      3. Step-by-step derivation
                                                                        1. lower-/.f6428.1%

                                                                          \[\leadsto {\left(\mathsf{fma}\left(x, 2, 2\right)\right)}^{-0.5} \cdot \frac{F}{\color{blue}{B}} - \frac{x}{B} \]
                                                                      4. Applied rewrites28.1%

                                                                        \[\leadsto {\left(\mathsf{fma}\left(x, 2, 2\right)\right)}^{-0.5} \cdot \color{blue}{\frac{F}{B}} - \frac{x}{B} \]

                                                                      if 1350 < F < 1.85000000000000016e256

                                                                      1. Initial program 76.3%

                                                                        \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                      2. 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.5%

                                                                          \[\leadsto \frac{1}{\sin B} \]
                                                                      4. Applied rewrites17.5%

                                                                        \[\leadsto \color{blue}{\frac{1}{\sin B}} \]

                                                                      if 1.85000000000000016e256 < F

                                                                      1. Initial program 76.3%

                                                                        \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                      2. Taylor expanded in F around -inf

                                                                        \[\leadsto \color{blue}{-1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right)} \]
                                                                      3. Step-by-step derivation
                                                                        1. lower-*.f64N/A

                                                                          \[\leadsto -1 \cdot \color{blue}{\left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right)} \]
                                                                        2. lower-*.f64N/A

                                                                          \[\leadsto -1 \cdot \left(F \cdot \color{blue}{\left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)}\right) \]
                                                                        3. lower-+.f64N/A

                                                                          \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \color{blue}{\frac{x \cdot \cos B}{F \cdot \sin B}}\right)\right) \]
                                                                        4. lower-/.f64N/A

                                                                          \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{\color{blue}{x \cdot \cos B}}{F \cdot \sin B}\right)\right) \]
                                                                        5. lower-*.f64N/A

                                                                          \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \color{blue}{\cos B}}{F \cdot \sin B}\right)\right) \]
                                                                        6. lower-sin.f64N/A

                                                                          \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right) \]
                                                                        7. lower-/.f64N/A

                                                                          \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{\color{blue}{F \cdot \sin B}}\right)\right) \]
                                                                        8. lower-*.f64N/A

                                                                          \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{\color{blue}{F} \cdot \sin B}\right)\right) \]
                                                                        9. lower-cos.f64N/A

                                                                          \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right) \]
                                                                        10. lower-*.f64N/A

                                                                          \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \color{blue}{\sin B}}\right)\right) \]
                                                                        11. lower-sin.f6449.1%

                                                                          \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right) \]
                                                                      4. Applied rewrites49.1%

                                                                        \[\leadsto \color{blue}{-1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right)} \]
                                                                      5. Taylor expanded in B around 0

                                                                        \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{\color{blue}{B}} \]
                                                                      6. Step-by-step derivation
                                                                        1. lower-/.f64N/A

                                                                          \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                                                        2. lower-*.f64N/A

                                                                          \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                                                        3. lower-+.f64N/A

                                                                          \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                                                        4. lower-/.f64N/A

                                                                          \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                                                        5. lower-/.f6427.9%

                                                                          \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                                                      7. Applied rewrites27.9%

                                                                        \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{\color{blue}{B}} \]
                                                                      8. Step-by-step derivation
                                                                        1. lift-/.f64N/A

                                                                          \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                                                        2. lift-*.f64N/A

                                                                          \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                                                        3. associate-/l*N/A

                                                                          \[\leadsto -1 \cdot \left(F \cdot \frac{\frac{1}{F} + \frac{x}{F}}{\color{blue}{B}}\right) \]
                                                                        4. *-commutativeN/A

                                                                          \[\leadsto -1 \cdot \left(\frac{\frac{1}{F} + \frac{x}{F}}{B} \cdot F\right) \]
                                                                        5. lower-*.f64N/A

                                                                          \[\leadsto -1 \cdot \left(\frac{\frac{1}{F} + \frac{x}{F}}{B} \cdot F\right) \]
                                                                        6. lift-+.f64N/A

                                                                          \[\leadsto -1 \cdot \left(\frac{\frac{1}{F} + \frac{x}{F}}{B} \cdot F\right) \]
                                                                        7. lift-/.f64N/A

                                                                          \[\leadsto -1 \cdot \left(\frac{\frac{1}{F} + \frac{x}{F}}{B} \cdot F\right) \]
                                                                        8. lift-/.f64N/A

                                                                          \[\leadsto -1 \cdot \left(\frac{\frac{1}{F} + \frac{x}{F}}{B} \cdot F\right) \]
                                                                        9. div-add-revN/A

                                                                          \[\leadsto -1 \cdot \left(\frac{\frac{1 + x}{F}}{B} \cdot F\right) \]
                                                                        10. associate-/l/N/A

                                                                          \[\leadsto -1 \cdot \left(\frac{1 + x}{F \cdot B} \cdot F\right) \]
                                                                        11. lower-/.f64N/A

                                                                          \[\leadsto -1 \cdot \left(\frac{1 + x}{F \cdot B} \cdot F\right) \]
                                                                        12. lower-+.f64N/A

                                                                          \[\leadsto -1 \cdot \left(\frac{1 + x}{F \cdot B} \cdot F\right) \]
                                                                        13. lower-*.f6426.6%

                                                                          \[\leadsto -1 \cdot \left(\frac{1 + x}{F \cdot B} \cdot F\right) \]
                                                                      9. Applied rewrites26.6%

                                                                        \[\leadsto -1 \cdot \left(\frac{1 + x}{F \cdot B} \cdot F\right) \]
                                                                    9. Recombined 4 regimes into one program.
                                                                    10. Add Preprocessing

                                                                    Alternative 18: 43.6% accurate, 2.8× speedup?

                                                                    \[\begin{array}{l} \mathbf{if}\;F \leq -0.0105:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 6.3 \cdot 10^{+38}:\\ \;\;\;\;{\left(\mathsf{fma}\left(x, 2, 2\right)\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;-1 \cdot \frac{F \cdot \left(\frac{F}{F \cdot F} + \frac{x}{F}\right)}{B}\\ \end{array} \]
                                                                    (FPCore (F B x)
                                                                     :precision binary64
                                                                     (if (<= F -0.0105)
                                                                       (/ -1.0 (sin B))
                                                                       (if (<= F 6.3e+38)
                                                                         (- (* (pow (fma x 2.0 2.0) -0.5) (/ F B)) (/ x B))
                                                                         (* -1.0 (/ (* F (+ (/ F (* F F)) (/ x F))) B)))))
                                                                    double code(double F, double B, double x) {
                                                                    	double tmp;
                                                                    	if (F <= -0.0105) {
                                                                    		tmp = -1.0 / sin(B);
                                                                    	} else if (F <= 6.3e+38) {
                                                                    		tmp = (pow(fma(x, 2.0, 2.0), -0.5) * (F / B)) - (x / B);
                                                                    	} else {
                                                                    		tmp = -1.0 * ((F * ((F / (F * F)) + (x / F))) / B);
                                                                    	}
                                                                    	return tmp;
                                                                    }
                                                                    
                                                                    function code(F, B, x)
                                                                    	tmp = 0.0
                                                                    	if (F <= -0.0105)
                                                                    		tmp = Float64(-1.0 / sin(B));
                                                                    	elseif (F <= 6.3e+38)
                                                                    		tmp = Float64(Float64((fma(x, 2.0, 2.0) ^ -0.5) * Float64(F / B)) - Float64(x / B));
                                                                    	else
                                                                    		tmp = Float64(-1.0 * Float64(Float64(F * Float64(Float64(F / Float64(F * F)) + Float64(x / F))) / B));
                                                                    	end
                                                                    	return tmp
                                                                    end
                                                                    
                                                                    code[F_, B_, x_] := If[LessEqual[F, -0.0105], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6.3e+38], N[(N[(N[Power[N[(x * 2.0 + 2.0), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(-1.0 * N[(N[(F * N[(N[(F / N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]
                                                                    
                                                                    \begin{array}{l}
                                                                    \mathbf{if}\;F \leq -0.0105:\\
                                                                    \;\;\;\;\frac{-1}{\sin B}\\
                                                                    
                                                                    \mathbf{elif}\;F \leq 6.3 \cdot 10^{+38}:\\
                                                                    \;\;\;\;{\left(\mathsf{fma}\left(x, 2, 2\right)\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
                                                                    
                                                                    \mathbf{else}:\\
                                                                    \;\;\;\;-1 \cdot \frac{F \cdot \left(\frac{F}{F \cdot F} + \frac{x}{F}\right)}{B}\\
                                                                    
                                                                    
                                                                    \end{array}
                                                                    
                                                                    Derivation
                                                                    1. Split input into 3 regimes
                                                                    2. if F < -0.0105000000000000007

                                                                      1. Initial program 76.3%

                                                                        \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                      2. Taylor expanded in F around -inf

                                                                        \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                                                      3. Step-by-step derivation
                                                                        1. lower-/.f64N/A

                                                                          \[\leadsto \frac{-1}{\color{blue}{\sin B}} \]
                                                                        2. lower-sin.f6417.0%

                                                                          \[\leadsto \frac{-1}{\sin B} \]
                                                                      4. Applied rewrites17.0%

                                                                        \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]

                                                                      if -0.0105000000000000007 < F < 6.30000000000000003e38

                                                                      1. Initial program 76.3%

                                                                        \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                      2. Taylor expanded in B around 0

                                                                        \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin 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-/.f6449.0%

                                                                          \[\leadsto \left(-\frac{x}{\color{blue}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                      4. Applied rewrites49.0%

                                                                        \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                      5. Step-by-step derivation
                                                                        1. lift-+.f64N/A

                                                                          \[\leadsto \color{blue}{\left(-\frac{x}{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(-\frac{x}{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(\frac{x}{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)} - \frac{x}{B}} \]
                                                                        5. lower--.f6449.0%

                                                                          \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \frac{x}{B}} \]
                                                                      6. Applied rewrites49.0%

                                                                        \[\leadsto \color{blue}{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \frac{F}{\sin B} - \frac{x}{B}} \]
                                                                      7. Taylor expanded in F around 0

                                                                        \[\leadsto {\left(\mathsf{fma}\left(x, 2, \color{blue}{2}\right)\right)}^{-0.5} \cdot \frac{F}{\sin B} - \frac{x}{B} \]
                                                                      8. Step-by-step derivation
                                                                        1. Applied rewrites35.3%

                                                                          \[\leadsto {\left(\mathsf{fma}\left(x, 2, \color{blue}{2}\right)\right)}^{-0.5} \cdot \frac{F}{\sin B} - \frac{x}{B} \]
                                                                        2. Taylor expanded in B around 0

                                                                          \[\leadsto {\left(\mathsf{fma}\left(x, 2, 2\right)\right)}^{-0.5} \cdot \color{blue}{\frac{F}{B}} - \frac{x}{B} \]
                                                                        3. Step-by-step derivation
                                                                          1. lower-/.f6428.1%

                                                                            \[\leadsto {\left(\mathsf{fma}\left(x, 2, 2\right)\right)}^{-0.5} \cdot \frac{F}{\color{blue}{B}} - \frac{x}{B} \]
                                                                        4. Applied rewrites28.1%

                                                                          \[\leadsto {\left(\mathsf{fma}\left(x, 2, 2\right)\right)}^{-0.5} \cdot \color{blue}{\frac{F}{B}} - \frac{x}{B} \]

                                                                        if 6.30000000000000003e38 < F

                                                                        1. Initial program 76.3%

                                                                          \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                        2. Taylor expanded in F around -inf

                                                                          \[\leadsto \color{blue}{-1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right)} \]
                                                                        3. Step-by-step derivation
                                                                          1. lower-*.f64N/A

                                                                            \[\leadsto -1 \cdot \color{blue}{\left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right)} \]
                                                                          2. lower-*.f64N/A

                                                                            \[\leadsto -1 \cdot \left(F \cdot \color{blue}{\left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)}\right) \]
                                                                          3. lower-+.f64N/A

                                                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \color{blue}{\frac{x \cdot \cos B}{F \cdot \sin B}}\right)\right) \]
                                                                          4. lower-/.f64N/A

                                                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{\color{blue}{x \cdot \cos B}}{F \cdot \sin B}\right)\right) \]
                                                                          5. lower-*.f64N/A

                                                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \color{blue}{\cos B}}{F \cdot \sin B}\right)\right) \]
                                                                          6. lower-sin.f64N/A

                                                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right) \]
                                                                          7. lower-/.f64N/A

                                                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{\color{blue}{F \cdot \sin B}}\right)\right) \]
                                                                          8. lower-*.f64N/A

                                                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{\color{blue}{F} \cdot \sin B}\right)\right) \]
                                                                          9. lower-cos.f64N/A

                                                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right) \]
                                                                          10. lower-*.f64N/A

                                                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \color{blue}{\sin B}}\right)\right) \]
                                                                          11. lower-sin.f6449.1%

                                                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right) \]
                                                                        4. Applied rewrites49.1%

                                                                          \[\leadsto \color{blue}{-1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right)} \]
                                                                        5. Taylor expanded in B around 0

                                                                          \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{\color{blue}{B}} \]
                                                                        6. Step-by-step derivation
                                                                          1. lower-/.f64N/A

                                                                            \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                                                          2. lower-*.f64N/A

                                                                            \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                                                          3. lower-+.f64N/A

                                                                            \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                                                          4. lower-/.f64N/A

                                                                            \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                                                          5. lower-/.f6427.9%

                                                                            \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                                                        7. Applied rewrites27.9%

                                                                          \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{\color{blue}{B}} \]
                                                                        8. Step-by-step derivation
                                                                          1. lift-/.f64N/A

                                                                            \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                                                          2. mult-flipN/A

                                                                            \[\leadsto -1 \cdot \frac{F \cdot \left(1 \cdot \frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                                                          3. rgt-mult-inverseN/A

                                                                            \[\leadsto -1 \cdot \frac{F \cdot \left(\left(F \cdot \frac{1}{F}\right) \cdot \frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                                                          4. mult-flip-revN/A

                                                                            \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{F}{F} \cdot \frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                                                          5. frac-timesN/A

                                                                            \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{F \cdot 1}{F \cdot F} + \frac{x}{F}\right)}{B} \]
                                                                          6. *-commutativeN/A

                                                                            \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1 \cdot F}{F \cdot F} + \frac{x}{F}\right)}{B} \]
                                                                          7. *-lft-identityN/A

                                                                            \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{F}{F \cdot F} + \frac{x}{F}\right)}{B} \]
                                                                          8. lower-/.f64N/A

                                                                            \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{F}{F \cdot F} + \frac{x}{F}\right)}{B} \]
                                                                          9. lower-*.f6423.2%

                                                                            \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{F}{F \cdot F} + \frac{x}{F}\right)}{B} \]
                                                                        9. Applied rewrites23.2%

                                                                          \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{F}{F \cdot F} + \frac{x}{F}\right)}{B} \]
                                                                      9. Recombined 3 regimes into one program.
                                                                      10. Add Preprocessing

                                                                      Alternative 19: 43.2% accurate, 2.8× speedup?

                                                                      \[\begin{array}{l} \mathbf{if}\;F \leq -0.00072:\\ \;\;\;\;-\frac{1 + x}{B}\\ \mathbf{elif}\;F \leq 6.3 \cdot 10^{+38}:\\ \;\;\;\;{\left(\mathsf{fma}\left(x, 2, 2\right)\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;-1 \cdot \frac{F \cdot \left(\frac{F}{F \cdot F} + \frac{x}{F}\right)}{B}\\ \end{array} \]
                                                                      (FPCore (F B x)
                                                                       :precision binary64
                                                                       (if (<= F -0.00072)
                                                                         (- (/ (+ 1.0 x) B))
                                                                         (if (<= F 6.3e+38)
                                                                           (- (* (pow (fma x 2.0 2.0) -0.5) (/ F B)) (/ x B))
                                                                           (* -1.0 (/ (* F (+ (/ F (* F F)) (/ x F))) B)))))
                                                                      double code(double F, double B, double x) {
                                                                      	double tmp;
                                                                      	if (F <= -0.00072) {
                                                                      		tmp = -((1.0 + x) / B);
                                                                      	} else if (F <= 6.3e+38) {
                                                                      		tmp = (pow(fma(x, 2.0, 2.0), -0.5) * (F / B)) - (x / B);
                                                                      	} else {
                                                                      		tmp = -1.0 * ((F * ((F / (F * F)) + (x / F))) / B);
                                                                      	}
                                                                      	return tmp;
                                                                      }
                                                                      
                                                                      function code(F, B, x)
                                                                      	tmp = 0.0
                                                                      	if (F <= -0.00072)
                                                                      		tmp = Float64(-Float64(Float64(1.0 + x) / B));
                                                                      	elseif (F <= 6.3e+38)
                                                                      		tmp = Float64(Float64((fma(x, 2.0, 2.0) ^ -0.5) * Float64(F / B)) - Float64(x / B));
                                                                      	else
                                                                      		tmp = Float64(-1.0 * Float64(Float64(F * Float64(Float64(F / Float64(F * F)) + Float64(x / F))) / B));
                                                                      	end
                                                                      	return tmp
                                                                      end
                                                                      
                                                                      code[F_, B_, x_] := If[LessEqual[F, -0.00072], (-N[(N[(1.0 + x), $MachinePrecision] / B), $MachinePrecision]), If[LessEqual[F, 6.3e+38], N[(N[(N[Power[N[(x * 2.0 + 2.0), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(-1.0 * N[(N[(F * N[(N[(F / N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]
                                                                      
                                                                      \begin{array}{l}
                                                                      \mathbf{if}\;F \leq -0.00072:\\
                                                                      \;\;\;\;-\frac{1 + x}{B}\\
                                                                      
                                                                      \mathbf{elif}\;F \leq 6.3 \cdot 10^{+38}:\\
                                                                      \;\;\;\;{\left(\mathsf{fma}\left(x, 2, 2\right)\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
                                                                      
                                                                      \mathbf{else}:\\
                                                                      \;\;\;\;-1 \cdot \frac{F \cdot \left(\frac{F}{F \cdot F} + \frac{x}{F}\right)}{B}\\
                                                                      
                                                                      
                                                                      \end{array}
                                                                      
                                                                      Derivation
                                                                      1. Split input into 3 regimes
                                                                      2. if F < -7.20000000000000045e-4

                                                                        1. Initial program 76.3%

                                                                          \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                        2. Taylor expanded in F around -inf

                                                                          \[\leadsto \color{blue}{-1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right)} \]
                                                                        3. Step-by-step derivation
                                                                          1. lower-*.f64N/A

                                                                            \[\leadsto -1 \cdot \color{blue}{\left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right)} \]
                                                                          2. lower-*.f64N/A

                                                                            \[\leadsto -1 \cdot \left(F \cdot \color{blue}{\left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)}\right) \]
                                                                          3. lower-+.f64N/A

                                                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \color{blue}{\frac{x \cdot \cos B}{F \cdot \sin B}}\right)\right) \]
                                                                          4. lower-/.f64N/A

                                                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{\color{blue}{x \cdot \cos B}}{F \cdot \sin B}\right)\right) \]
                                                                          5. lower-*.f64N/A

                                                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \color{blue}{\cos B}}{F \cdot \sin B}\right)\right) \]
                                                                          6. lower-sin.f64N/A

                                                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right) \]
                                                                          7. lower-/.f64N/A

                                                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{\color{blue}{F \cdot \sin B}}\right)\right) \]
                                                                          8. lower-*.f64N/A

                                                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{\color{blue}{F} \cdot \sin B}\right)\right) \]
                                                                          9. lower-cos.f64N/A

                                                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right) \]
                                                                          10. lower-*.f64N/A

                                                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \color{blue}{\sin B}}\right)\right) \]
                                                                          11. lower-sin.f6449.1%

                                                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right) \]
                                                                        4. Applied rewrites49.1%

                                                                          \[\leadsto \color{blue}{-1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right)} \]
                                                                        5. Taylor expanded in B around 0

                                                                          \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{\color{blue}{B}} \]
                                                                        6. Step-by-step derivation
                                                                          1. lower-/.f64N/A

                                                                            \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                                                          2. lower-*.f64N/A

                                                                            \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                                                          3. lower-+.f64N/A

                                                                            \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                                                          4. lower-/.f64N/A

                                                                            \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                                                          5. lower-/.f6427.9%

                                                                            \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                                                        7. Applied rewrites27.9%

                                                                          \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{\color{blue}{B}} \]
                                                                        8. Step-by-step derivation
                                                                          1. lift-*.f64N/A

                                                                            \[\leadsto -1 \cdot \color{blue}{\frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B}} \]
                                                                          2. mul-1-negN/A

                                                                            \[\leadsto \mathsf{neg}\left(\frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B}\right) \]
                                                                          3. lower-neg.f6427.9%

                                                                            \[\leadsto -\frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                                                        9. Applied rewrites29.0%

                                                                          \[\leadsto -\frac{1 + x}{B} \]

                                                                        if -7.20000000000000045e-4 < F < 6.30000000000000003e38

                                                                        1. Initial program 76.3%

                                                                          \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                        2. Taylor expanded in B around 0

                                                                          \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin 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-/.f6449.0%

                                                                            \[\leadsto \left(-\frac{x}{\color{blue}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                        4. Applied rewrites49.0%

                                                                          \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                        5. Step-by-step derivation
                                                                          1. lift-+.f64N/A

                                                                            \[\leadsto \color{blue}{\left(-\frac{x}{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(-\frac{x}{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(\frac{x}{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)} - \frac{x}{B}} \]
                                                                          5. lower--.f6449.0%

                                                                            \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \frac{x}{B}} \]
                                                                        6. Applied rewrites49.0%

                                                                          \[\leadsto \color{blue}{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot \frac{F}{\sin B} - \frac{x}{B}} \]
                                                                        7. Taylor expanded in F around 0

                                                                          \[\leadsto {\left(\mathsf{fma}\left(x, 2, \color{blue}{2}\right)\right)}^{-0.5} \cdot \frac{F}{\sin B} - \frac{x}{B} \]
                                                                        8. Step-by-step derivation
                                                                          1. Applied rewrites35.3%

                                                                            \[\leadsto {\left(\mathsf{fma}\left(x, 2, \color{blue}{2}\right)\right)}^{-0.5} \cdot \frac{F}{\sin B} - \frac{x}{B} \]
                                                                          2. Taylor expanded in B around 0

                                                                            \[\leadsto {\left(\mathsf{fma}\left(x, 2, 2\right)\right)}^{-0.5} \cdot \color{blue}{\frac{F}{B}} - \frac{x}{B} \]
                                                                          3. Step-by-step derivation
                                                                            1. lower-/.f6428.1%

                                                                              \[\leadsto {\left(\mathsf{fma}\left(x, 2, 2\right)\right)}^{-0.5} \cdot \frac{F}{\color{blue}{B}} - \frac{x}{B} \]
                                                                          4. Applied rewrites28.1%

                                                                            \[\leadsto {\left(\mathsf{fma}\left(x, 2, 2\right)\right)}^{-0.5} \cdot \color{blue}{\frac{F}{B}} - \frac{x}{B} \]

                                                                          if 6.30000000000000003e38 < F

                                                                          1. Initial program 76.3%

                                                                            \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                          2. Taylor expanded in F around -inf

                                                                            \[\leadsto \color{blue}{-1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right)} \]
                                                                          3. Step-by-step derivation
                                                                            1. lower-*.f64N/A

                                                                              \[\leadsto -1 \cdot \color{blue}{\left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right)} \]
                                                                            2. lower-*.f64N/A

                                                                              \[\leadsto -1 \cdot \left(F \cdot \color{blue}{\left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)}\right) \]
                                                                            3. lower-+.f64N/A

                                                                              \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \color{blue}{\frac{x \cdot \cos B}{F \cdot \sin B}}\right)\right) \]
                                                                            4. lower-/.f64N/A

                                                                              \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{\color{blue}{x \cdot \cos B}}{F \cdot \sin B}\right)\right) \]
                                                                            5. lower-*.f64N/A

                                                                              \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \color{blue}{\cos B}}{F \cdot \sin B}\right)\right) \]
                                                                            6. lower-sin.f64N/A

                                                                              \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right) \]
                                                                            7. lower-/.f64N/A

                                                                              \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{\color{blue}{F \cdot \sin B}}\right)\right) \]
                                                                            8. lower-*.f64N/A

                                                                              \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{\color{blue}{F} \cdot \sin B}\right)\right) \]
                                                                            9. lower-cos.f64N/A

                                                                              \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right) \]
                                                                            10. lower-*.f64N/A

                                                                              \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \color{blue}{\sin B}}\right)\right) \]
                                                                            11. lower-sin.f6449.1%

                                                                              \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right) \]
                                                                          4. Applied rewrites49.1%

                                                                            \[\leadsto \color{blue}{-1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right)} \]
                                                                          5. Taylor expanded in B around 0

                                                                            \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{\color{blue}{B}} \]
                                                                          6. Step-by-step derivation
                                                                            1. lower-/.f64N/A

                                                                              \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                                                            2. lower-*.f64N/A

                                                                              \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                                                            3. lower-+.f64N/A

                                                                              \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                                                            4. lower-/.f64N/A

                                                                              \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                                                            5. lower-/.f6427.9%

                                                                              \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                                                          7. Applied rewrites27.9%

                                                                            \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{\color{blue}{B}} \]
                                                                          8. Step-by-step derivation
                                                                            1. lift-/.f64N/A

                                                                              \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                                                            2. mult-flipN/A

                                                                              \[\leadsto -1 \cdot \frac{F \cdot \left(1 \cdot \frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                                                            3. rgt-mult-inverseN/A

                                                                              \[\leadsto -1 \cdot \frac{F \cdot \left(\left(F \cdot \frac{1}{F}\right) \cdot \frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                                                            4. mult-flip-revN/A

                                                                              \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{F}{F} \cdot \frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                                                            5. frac-timesN/A

                                                                              \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{F \cdot 1}{F \cdot F} + \frac{x}{F}\right)}{B} \]
                                                                            6. *-commutativeN/A

                                                                              \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1 \cdot F}{F \cdot F} + \frac{x}{F}\right)}{B} \]
                                                                            7. *-lft-identityN/A

                                                                              \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{F}{F \cdot F} + \frac{x}{F}\right)}{B} \]
                                                                            8. lower-/.f64N/A

                                                                              \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{F}{F \cdot F} + \frac{x}{F}\right)}{B} \]
                                                                            9. lower-*.f6423.2%

                                                                              \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{F}{F \cdot F} + \frac{x}{F}\right)}{B} \]
                                                                          9. Applied rewrites23.2%

                                                                            \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{F}{F \cdot F} + \frac{x}{F}\right)}{B} \]
                                                                        9. Recombined 3 regimes into one program.
                                                                        10. Add Preprocessing

                                                                        Alternative 20: 29.0% accurate, 14.3× speedup?

                                                                        \[-\frac{1 + x}{B} \]
                                                                        (FPCore (F B x) :precision binary64 (- (/ (+ 1.0 x) B)))
                                                                        double code(double F, double B, double x) {
                                                                        	return -((1.0 + x) / B);
                                                                        }
                                                                        
                                                                        module fmin_fmax_functions
                                                                            implicit none
                                                                            private
                                                                            public fmax
                                                                            public fmin
                                                                        
                                                                            interface fmax
                                                                                module procedure fmax88
                                                                                module procedure fmax44
                                                                                module procedure fmax84
                                                                                module procedure fmax48
                                                                            end interface
                                                                            interface fmin
                                                                                module procedure fmin88
                                                                                module procedure fmin44
                                                                                module procedure fmin84
                                                                                module procedure fmin48
                                                                            end interface
                                                                        contains
                                                                            real(8) function fmax88(x, y) result (res)
                                                                                real(8), intent (in) :: x
                                                                                real(8), intent (in) :: y
                                                                                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                            end function
                                                                            real(4) function fmax44(x, y) result (res)
                                                                                real(4), intent (in) :: x
                                                                                real(4), intent (in) :: y
                                                                                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                            end function
                                                                            real(8) function fmax84(x, y) result(res)
                                                                                real(8), intent (in) :: x
                                                                                real(4), intent (in) :: y
                                                                                res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                                            end function
                                                                            real(8) function fmax48(x, y) result(res)
                                                                                real(4), intent (in) :: x
                                                                                real(8), intent (in) :: y
                                                                                res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                                            end function
                                                                            real(8) function fmin88(x, y) result (res)
                                                                                real(8), intent (in) :: x
                                                                                real(8), intent (in) :: y
                                                                                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                            end function
                                                                            real(4) function fmin44(x, y) result (res)
                                                                                real(4), intent (in) :: x
                                                                                real(4), intent (in) :: y
                                                                                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                            end function
                                                                            real(8) function fmin84(x, y) result(res)
                                                                                real(8), intent (in) :: x
                                                                                real(4), intent (in) :: y
                                                                                res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                                            end function
                                                                            real(8) function fmin48(x, y) result(res)
                                                                                real(4), intent (in) :: x
                                                                                real(8), intent (in) :: y
                                                                                res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                                            end function
                                                                        end module
                                                                        
                                                                        real(8) function code(f, b, x)
                                                                        use fmin_fmax_functions
                                                                            real(8), intent (in) :: f
                                                                            real(8), intent (in) :: b
                                                                            real(8), intent (in) :: x
                                                                            code = -((1.0d0 + x) / b)
                                                                        end function
                                                                        
                                                                        public static double code(double F, double B, double x) {
                                                                        	return -((1.0 + x) / B);
                                                                        }
                                                                        
                                                                        def code(F, B, x):
                                                                        	return -((1.0 + x) / B)
                                                                        
                                                                        function code(F, B, x)
                                                                        	return Float64(-Float64(Float64(1.0 + x) / B))
                                                                        end
                                                                        
                                                                        function tmp = code(F, B, x)
                                                                        	tmp = -((1.0 + x) / B);
                                                                        end
                                                                        
                                                                        code[F_, B_, x_] := (-N[(N[(1.0 + x), $MachinePrecision] / B), $MachinePrecision])
                                                                        
                                                                        -\frac{1 + x}{B}
                                                                        
                                                                        Derivation
                                                                        1. Initial program 76.3%

                                                                          \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                        2. Taylor expanded in F around -inf

                                                                          \[\leadsto \color{blue}{-1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right)} \]
                                                                        3. Step-by-step derivation
                                                                          1. lower-*.f64N/A

                                                                            \[\leadsto -1 \cdot \color{blue}{\left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right)} \]
                                                                          2. lower-*.f64N/A

                                                                            \[\leadsto -1 \cdot \left(F \cdot \color{blue}{\left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)}\right) \]
                                                                          3. lower-+.f64N/A

                                                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \color{blue}{\frac{x \cdot \cos B}{F \cdot \sin B}}\right)\right) \]
                                                                          4. lower-/.f64N/A

                                                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{\color{blue}{x \cdot \cos B}}{F \cdot \sin B}\right)\right) \]
                                                                          5. lower-*.f64N/A

                                                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \color{blue}{\cos B}}{F \cdot \sin B}\right)\right) \]
                                                                          6. lower-sin.f64N/A

                                                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right) \]
                                                                          7. lower-/.f64N/A

                                                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{\color{blue}{F \cdot \sin B}}\right)\right) \]
                                                                          8. lower-*.f64N/A

                                                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{\color{blue}{F} \cdot \sin B}\right)\right) \]
                                                                          9. lower-cos.f64N/A

                                                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right) \]
                                                                          10. lower-*.f64N/A

                                                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \color{blue}{\sin B}}\right)\right) \]
                                                                          11. lower-sin.f6449.1%

                                                                            \[\leadsto -1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right) \]
                                                                        4. Applied rewrites49.1%

                                                                          \[\leadsto \color{blue}{-1 \cdot \left(F \cdot \left(\frac{1}{F \cdot \sin B} + \frac{x \cdot \cos B}{F \cdot \sin B}\right)\right)} \]
                                                                        5. Taylor expanded in B around 0

                                                                          \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{\color{blue}{B}} \]
                                                                        6. Step-by-step derivation
                                                                          1. lower-/.f64N/A

                                                                            \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                                                          2. lower-*.f64N/A

                                                                            \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                                                          3. lower-+.f64N/A

                                                                            \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                                                          4. lower-/.f64N/A

                                                                            \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                                                          5. lower-/.f6427.9%

                                                                            \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                                                        7. Applied rewrites27.9%

                                                                          \[\leadsto -1 \cdot \frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{\color{blue}{B}} \]
                                                                        8. Step-by-step derivation
                                                                          1. lift-*.f64N/A

                                                                            \[\leadsto -1 \cdot \color{blue}{\frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B}} \]
                                                                          2. mul-1-negN/A

                                                                            \[\leadsto \mathsf{neg}\left(\frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B}\right) \]
                                                                          3. lower-neg.f6427.9%

                                                                            \[\leadsto -\frac{F \cdot \left(\frac{1}{F} + \frac{x}{F}\right)}{B} \]
                                                                        9. Applied rewrites29.0%

                                                                          \[\leadsto -\frac{1 + x}{B} \]
                                                                        10. Add Preprocessing

                                                                        Alternative 21: 10.7% accurate, 26.5× speedup?

                                                                        \[\frac{-1}{B} \]
                                                                        (FPCore (F B x) :precision binary64 (/ -1.0 B))
                                                                        double code(double F, double B, double x) {
                                                                        	return -1.0 / B;
                                                                        }
                                                                        
                                                                        module fmin_fmax_functions
                                                                            implicit none
                                                                            private
                                                                            public fmax
                                                                            public fmin
                                                                        
                                                                            interface fmax
                                                                                module procedure fmax88
                                                                                module procedure fmax44
                                                                                module procedure fmax84
                                                                                module procedure fmax48
                                                                            end interface
                                                                            interface fmin
                                                                                module procedure fmin88
                                                                                module procedure fmin44
                                                                                module procedure fmin84
                                                                                module procedure fmin48
                                                                            end interface
                                                                        contains
                                                                            real(8) function fmax88(x, y) result (res)
                                                                                real(8), intent (in) :: x
                                                                                real(8), intent (in) :: y
                                                                                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                            end function
                                                                            real(4) function fmax44(x, y) result (res)
                                                                                real(4), intent (in) :: x
                                                                                real(4), intent (in) :: y
                                                                                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                            end function
                                                                            real(8) function fmax84(x, y) result(res)
                                                                                real(8), intent (in) :: x
                                                                                real(4), intent (in) :: y
                                                                                res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                                            end function
                                                                            real(8) function fmax48(x, y) result(res)
                                                                                real(4), intent (in) :: x
                                                                                real(8), intent (in) :: y
                                                                                res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                                            end function
                                                                            real(8) function fmin88(x, y) result (res)
                                                                                real(8), intent (in) :: x
                                                                                real(8), intent (in) :: y
                                                                                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                            end function
                                                                            real(4) function fmin44(x, y) result (res)
                                                                                real(4), intent (in) :: x
                                                                                real(4), intent (in) :: y
                                                                                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                            end function
                                                                            real(8) function fmin84(x, y) result(res)
                                                                                real(8), intent (in) :: x
                                                                                real(4), intent (in) :: y
                                                                                res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                                            end function
                                                                            real(8) function fmin48(x, y) result(res)
                                                                                real(4), intent (in) :: x
                                                                                real(8), intent (in) :: y
                                                                                res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                                            end function
                                                                        end module
                                                                        
                                                                        real(8) function code(f, b, x)
                                                                        use fmin_fmax_functions
                                                                            real(8), intent (in) :: f
                                                                            real(8), intent (in) :: b
                                                                            real(8), intent (in) :: x
                                                                            code = (-1.0d0) / b
                                                                        end function
                                                                        
                                                                        public static double code(double F, double B, double x) {
                                                                        	return -1.0 / B;
                                                                        }
                                                                        
                                                                        def code(F, B, x):
                                                                        	return -1.0 / B
                                                                        
                                                                        function code(F, B, x)
                                                                        	return Float64(-1.0 / B)
                                                                        end
                                                                        
                                                                        function tmp = code(F, B, x)
                                                                        	tmp = -1.0 / B;
                                                                        end
                                                                        
                                                                        code[F_, B_, x_] := N[(-1.0 / B), $MachinePrecision]
                                                                        
                                                                        \frac{-1}{B}
                                                                        
                                                                        Derivation
                                                                        1. Initial program 76.3%

                                                                          \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                                                        2. Taylor expanded in F around -inf

                                                                          \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                                                        3. Step-by-step derivation
                                                                          1. lower-/.f64N/A

                                                                            \[\leadsto \frac{-1}{\color{blue}{\sin B}} \]
                                                                          2. lower-sin.f6417.0%

                                                                            \[\leadsto \frac{-1}{\sin B} \]
                                                                        4. Applied rewrites17.0%

                                                                          \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                                                                        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 2025189 
                                                                          (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))))))