VandenBroeck and Keller, Equation (23)

Percentage Accurate: 76.7% → 99.7%
Time: 7.1s
Alternatives: 21
Speedup: 1.4×

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

\mathbf{elif}\;F \leq 200000:\\
\;\;\;\;{\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(t\_0, 1, t\_1\right)\\


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

    1. Initial program 76.7%

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

        \[\leadsto \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. associate-*l/N/A

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

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

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

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

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

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

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

      if -2e24 < F < 2e5

      1. Initial program 76.7%

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

          \[\leadsto \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.7

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

        \[\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 2e5 < F

      1. Initial program 76.7%

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

          \[\leadsto \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. associate-*l/N/A

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{1}{\sin B}, \color{blue}{1}, \frac{-x}{\tan B}\right) \]
      5. Step-by-step derivation
        1. Applied rewrites56.6%

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

        1. Initial program 76.7%

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

            \[\leadsto \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. associate-*l/N/A

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

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

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

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

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

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

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

          if -0.419999999999999984 < F < 7.99999999999999964e-6

          1. Initial program 76.7%

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

              \[\leadsto \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.7

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

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

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

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

            if 7.99999999999999964e-6 < F

            1. Initial program 76.7%

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

                \[\leadsto \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. associate-*l/N/A

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(\frac{1}{\sin B}, \color{blue}{1}, \frac{-x}{\tan B}\right) \]
            5. Step-by-step derivation
              1. Applied rewrites56.6%

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

            Alternative 3: 99.0% accurate, 1.2× speedup?

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

              1. Initial program 76.7%

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

                  \[\leadsto \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. associate-*l/N/A

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

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

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

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

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

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

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

                if -0.419999999999999984 < F < 7.99999999999999964e-6

                1. Initial program 76.7%

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

                    \[\leadsto \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. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

                if 7.99999999999999964e-6 < F

                1. Initial program 76.7%

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

                    \[\leadsto \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. associate-*l/N/A

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

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

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

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

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

                  \[\leadsto \mathsf{fma}\left(\frac{1}{\sin B}, \color{blue}{1}, \frac{-x}{\tan B}\right) \]
                5. Step-by-step derivation
                  1. Applied rewrites56.6%

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

                Alternative 4: 91.8% accurate, 1.3× speedup?

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

                  1. Initial program 76.7%

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

                      \[\leadsto \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. associate-*l/N/A

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

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

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

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

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

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

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

                    if -5.2e22 < F < 3.4e-155

                    1. Initial program 76.7%

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

                        \[\leadsto \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.7

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

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

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

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

                      if 3.4e-155 < F < 7.99999999999999964e-6

                      1. Initial program 76.7%

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

                          \[\leadsto \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. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

                      if 7.99999999999999964e-6 < F

                      1. Initial program 76.7%

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

                          \[\leadsto \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. associate-*l/N/A

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

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

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

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

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

                        \[\leadsto \mathsf{fma}\left(\frac{1}{\sin B}, \color{blue}{1}, \frac{-x}{\tan B}\right) \]
                      5. Step-by-step derivation
                        1. Applied rewrites56.6%

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

                      Alternative 5: 86.0% accurate, 1.3× speedup?

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

                        1. Initial program 76.7%

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

                            \[\leadsto \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. associate-*l/N/A

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

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

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

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

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

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

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

                          if -5.2e22 < F < 3.4e-155

                          1. Initial program 76.7%

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

                              \[\leadsto \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.7

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

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

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

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

                            if 3.4e-155 < F < 2.69999999999999989e146

                            1. Initial program 76.7%

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

                                \[\leadsto \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. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

                            if 2.69999999999999989e146 < F

                            1. Initial program 76.7%

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

                              \[\leadsto \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-/.f6450.1

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          Alternative 6: 81.9% accurate, 1.3× speedup?

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

                            1. Initial program 76.7%

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

                              \[\leadsto \color{blue}{-1 \cdot \left(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. distribute-lft-neg-inN/A

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

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

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

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

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

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

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

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

                            if -5.2e22 < F < 3.4e-155

                            1. Initial program 76.7%

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

                                \[\leadsto \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.7

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

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

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

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

                              if 3.4e-155 < F < 2.69999999999999989e146

                              1. Initial program 76.7%

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

                                  \[\leadsto \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. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

                              if 2.69999999999999989e146 < F

                              1. Initial program 76.7%

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

                                \[\leadsto \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-/.f6450.1

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            Alternative 7: 79.8% accurate, 1.3× speedup?

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

                              1. Initial program 76.7%

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

                                \[\leadsto \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-/.f6450.1

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

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

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

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

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

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

                              if -1.0999999999999999e27 < F < 3.4e-155

                              1. Initial program 76.7%

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

                                  \[\leadsto \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.7

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

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

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

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

                                if 3.4e-155 < F < 2.69999999999999989e146

                                1. Initial program 76.7%

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

                                    \[\leadsto \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. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

                                if 2.69999999999999989e146 < F

                                1. Initial program 76.7%

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

                                  \[\leadsto \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-/.f6450.1

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              Alternative 8: 79.8% accurate, 1.4× speedup?

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

                                1. Initial program 76.7%

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

                                  \[\leadsto \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-/.f6450.1

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

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

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

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

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

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

                                if -1.0999999999999999e27 < F < 3.4e-155

                                1. Initial program 76.7%

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

                                    \[\leadsto \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.7

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

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

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

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

                                  if 3.4e-155 < F < 1.7999999999999999e146

                                  1. Initial program 76.7%

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

                                      \[\leadsto \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. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

                                  if 1.7999999999999999e146 < F

                                  1. Initial program 76.7%

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

                                    \[\leadsto \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-/.f6450.1

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                Alternative 9: 78.0% accurate, 1.4× speedup?

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

                                  1. Initial program 76.7%

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

                                    \[\leadsto \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-/.f6450.1

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

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

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

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

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

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

                                  if -1.85000000000000008e30 < F < -4.50000000000000025e-126 or 5.2000000000000003e-192 < F < 1.7999999999999999e146

                                  1. Initial program 76.7%

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

                                      \[\leadsto \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. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

                                  if -4.50000000000000025e-126 < F < 5.2000000000000003e-192

                                  1. Initial program 76.7%

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

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

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

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

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

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

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

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

                                  if 1.7999999999999999e146 < F

                                  1. Initial program 76.7%

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

                                    \[\leadsto \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-/.f6450.1

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                Alternative 10: 73.9% accurate, 1.5× speedup?

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

                                  1. Initial program 76.7%

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

                                    \[\leadsto \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-/.f6450.1

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

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

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

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

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

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

                                  if -1.85000000000000008e30 < F < 1.7999999999999999e146

                                  1. Initial program 76.7%

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

                                      \[\leadsto \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. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

                                  if 1.7999999999999999e146 < F

                                  1. Initial program 76.7%

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

                                    \[\leadsto \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-/.f6450.1

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                Alternative 11: 72.7% accurate, 1.7× speedup?

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

                                  1. Initial program 76.7%

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

                                    \[\leadsto \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-/.f6450.1

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

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

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

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

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

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

                                  if -2e101 < F < 2e5

                                  1. Initial program 76.7%

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

                                    \[\leadsto \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-/.f6450.1

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  if 2e5 < F

                                  1. Initial program 76.7%

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

                                    \[\leadsto \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-/.f6450.1

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                Alternative 12: 72.7% accurate, 1.8× speedup?

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

                                  1. Initial program 76.7%

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

                                    \[\leadsto \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-/.f6450.1

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

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

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

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

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

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

                                  if -2e101 < F < 2e5

                                  1. Initial program 76.7%

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

                                    \[\leadsto \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-/.f6450.1

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

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

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

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

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

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

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

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

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

                                  if 2e5 < F

                                  1. Initial program 76.7%

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

                                    \[\leadsto \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-/.f6450.1

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                Alternative 13: 65.1% accurate, 2.2× speedup?

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

                                  1. Initial program 76.7%

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

                                    \[\leadsto \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-/.f6450.1

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

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

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

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

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

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

                                  if -5.2e22 < F < 190

                                  1. Initial program 76.7%

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

                                    \[\leadsto \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-/.f6450.1

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

                                    \[\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. Taylor expanded in B around 0

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

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

                                    if 190 < F

                                    1. Initial program 76.7%

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

                                      \[\leadsto \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-/.f6450.1

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  Alternative 14: 59.1% accurate, 2.2× speedup?

                                  \[\begin{array}{l} t_0 := -\frac{x}{B}\\ \mathbf{if}\;F \leq -4.9 \cdot 10^{+27}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 190:\\ \;\;\;\;t\_0 + \frac{F}{B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;t\_0 + \frac{1}{\sin B}\\ \end{array} \]
                                  (FPCore (F B x)
                                   :precision binary64
                                   (let* ((t_0 (- (/ x B))))
                                     (if (<= F -4.9e+27)
                                       (/ -1.0 (sin B))
                                       (if (<= F 190.0)
                                         (+ t_0 (* (/ F B) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0)))))
                                         (+ t_0 (/ 1.0 (sin B)))))))
                                  double code(double F, double B, double x) {
                                  	double t_0 = -(x / B);
                                  	double tmp;
                                  	if (F <= -4.9e+27) {
                                  		tmp = -1.0 / sin(B);
                                  	} else if (F <= 190.0) {
                                  		tmp = t_0 + ((F / B) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
                                  	} else {
                                  		tmp = t_0 + (1.0 / sin(B));
                                  	}
                                  	return tmp;
                                  }
                                  
                                  module fmin_fmax_functions
                                      implicit none
                                      private
                                      public fmax
                                      public fmin
                                  
                                      interface fmax
                                          module procedure fmax88
                                          module procedure fmax44
                                          module procedure fmax84
                                          module procedure fmax48
                                      end interface
                                      interface fmin
                                          module procedure fmin88
                                          module procedure fmin44
                                          module procedure fmin84
                                          module procedure fmin48
                                      end interface
                                  contains
                                      real(8) function fmax88(x, y) result (res)
                                          real(8), intent (in) :: x
                                          real(8), intent (in) :: y
                                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                      end function
                                      real(4) function fmax44(x, y) result (res)
                                          real(4), intent (in) :: x
                                          real(4), intent (in) :: y
                                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                      end function
                                      real(8) function fmax84(x, y) result(res)
                                          real(8), intent (in) :: x
                                          real(4), intent (in) :: y
                                          res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                      end function
                                      real(8) function fmax48(x, y) result(res)
                                          real(4), intent (in) :: x
                                          real(8), intent (in) :: y
                                          res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                      end function
                                      real(8) function fmin88(x, y) result (res)
                                          real(8), intent (in) :: x
                                          real(8), intent (in) :: y
                                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                      end function
                                      real(4) function fmin44(x, y) result (res)
                                          real(4), intent (in) :: x
                                          real(4), intent (in) :: y
                                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                      end function
                                      real(8) function fmin84(x, y) result(res)
                                          real(8), intent (in) :: x
                                          real(4), intent (in) :: y
                                          res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                      end function
                                      real(8) function fmin48(x, y) result(res)
                                          real(4), intent (in) :: x
                                          real(8), intent (in) :: y
                                          res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                      end function
                                  end module
                                  
                                  real(8) function code(f, b, x)
                                  use fmin_fmax_functions
                                      real(8), intent (in) :: f
                                      real(8), intent (in) :: b
                                      real(8), intent (in) :: x
                                      real(8) :: t_0
                                      real(8) :: tmp
                                      t_0 = -(x / b)
                                      if (f <= (-4.9d+27)) then
                                          tmp = (-1.0d0) / sin(b)
                                      else if (f <= 190.0d0) then
                                          tmp = t_0 + ((f / b) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
                                      else
                                          tmp = t_0 + (1.0d0 / sin(b))
                                      end if
                                      code = tmp
                                  end function
                                  
                                  public static double code(double F, double B, double x) {
                                  	double t_0 = -(x / B);
                                  	double tmp;
                                  	if (F <= -4.9e+27) {
                                  		tmp = -1.0 / Math.sin(B);
                                  	} else if (F <= 190.0) {
                                  		tmp = t_0 + ((F / B) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
                                  	} else {
                                  		tmp = t_0 + (1.0 / Math.sin(B));
                                  	}
                                  	return tmp;
                                  }
                                  
                                  def code(F, B, x):
                                  	t_0 = -(x / B)
                                  	tmp = 0
                                  	if F <= -4.9e+27:
                                  		tmp = -1.0 / math.sin(B)
                                  	elif F <= 190.0:
                                  		tmp = t_0 + ((F / B) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
                                  	else:
                                  		tmp = t_0 + (1.0 / math.sin(B))
                                  	return tmp
                                  
                                  function code(F, B, x)
                                  	t_0 = Float64(-Float64(x / B))
                                  	tmp = 0.0
                                  	if (F <= -4.9e+27)
                                  		tmp = Float64(-1.0 / sin(B));
                                  	elseif (F <= 190.0)
                                  		tmp = Float64(t_0 + Float64(Float64(F / B) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0)))));
                                  	else
                                  		tmp = Float64(t_0 + Float64(1.0 / sin(B)));
                                  	end
                                  	return tmp
                                  end
                                  
                                  function tmp_2 = code(F, B, x)
                                  	t_0 = -(x / B);
                                  	tmp = 0.0;
                                  	if (F <= -4.9e+27)
                                  		tmp = -1.0 / sin(B);
                                  	elseif (F <= 190.0)
                                  		tmp = t_0 + ((F / B) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0)));
                                  	else
                                  		tmp = t_0 + (1.0 / sin(B));
                                  	end
                                  	tmp_2 = tmp;
                                  end
                                  
                                  code[F_, B_, x_] := Block[{t$95$0 = (-N[(x / B), $MachinePrecision])}, If[LessEqual[F, -4.9e+27], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 190.0], N[(t$95$0 + N[(N[(F / B), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
                                  
                                  \begin{array}{l}
                                  t_0 := -\frac{x}{B}\\
                                  \mathbf{if}\;F \leq -4.9 \cdot 10^{+27}:\\
                                  \;\;\;\;\frac{-1}{\sin B}\\
                                  
                                  \mathbf{elif}\;F \leq 190:\\
                                  \;\;\;\;t\_0 + \frac{F}{B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;t\_0 + \frac{1}{\sin B}\\
                                  
                                  
                                  \end{array}
                                  
                                  Derivation
                                  1. Split input into 3 regimes
                                  2. if F < -4.90000000000000015e27

                                    1. Initial program 76.7%

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

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

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

                                        \[\leadsto \frac{-1}{\sin B} \]
                                    4. Applied rewrites16.6%

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

                                    if -4.90000000000000015e27 < F < 190

                                    1. Initial program 76.7%

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

                                      \[\leadsto \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-/.f6450.1

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

                                      \[\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. Taylor expanded in B around 0

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

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

                                      if 190 < F

                                      1. Initial program 76.7%

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

                                        \[\leadsto \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-/.f6450.1

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    Alternative 15: 59.1% accurate, 2.3× speedup?

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

                                      1. Initial program 76.7%

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

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

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

                                          \[\leadsto \frac{-1}{\sin B} \]
                                      4. Applied rewrites16.6%

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

                                      if -4.90000000000000015e27 < F < 190

                                      1. Initial program 76.7%

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

                                          \[\leadsto \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. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      if 190 < F

                                      1. Initial program 76.7%

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

                                        \[\leadsto \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-/.f6450.1

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    Alternative 16: 52.3% accurate, 2.5× speedup?

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

                                      1. Initial program 76.7%

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

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

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

                                          \[\leadsto \frac{-1}{\sin B} \]
                                      4. Applied rewrites16.6%

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

                                      if -4.90000000000000015e27 < F < 1.14999999999999997e116

                                      1. Initial program 76.7%

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

                                          \[\leadsto \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. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      if 1.14999999999999997e116 < F

                                      1. Initial program 76.7%

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

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

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

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

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

                                    Alternative 17: 52.1% accurate, 2.6× speedup?

                                    \[\begin{array}{l} \mathbf{if}\;F \leq -6200000000000:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 0.092:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \frac{F \cdot {\left(2 + 2 \cdot x\right)}^{-0.5}}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
                                    (FPCore (F B x)
                                     :precision binary64
                                     (if (<= F -6200000000000.0)
                                       (/ -1.0 (sin B))
                                       (if (<= F 0.092)
                                         (+ (- (/ x B)) (/ (* F (pow (+ 2.0 (* 2.0 x)) -0.5)) B))
                                         (/ 1.0 (sin B)))))
                                    double code(double F, double B, double x) {
                                    	double tmp;
                                    	if (F <= -6200000000000.0) {
                                    		tmp = -1.0 / sin(B);
                                    	} else if (F <= 0.092) {
                                    		tmp = -(x / B) + ((F * pow((2.0 + (2.0 * x)), -0.5)) / B);
                                    	} else {
                                    		tmp = 1.0 / sin(B);
                                    	}
                                    	return tmp;
                                    }
                                    
                                    module fmin_fmax_functions
                                        implicit none
                                        private
                                        public fmax
                                        public fmin
                                    
                                        interface fmax
                                            module procedure fmax88
                                            module procedure fmax44
                                            module procedure fmax84
                                            module procedure fmax48
                                        end interface
                                        interface fmin
                                            module procedure fmin88
                                            module procedure fmin44
                                            module procedure fmin84
                                            module procedure fmin48
                                        end interface
                                    contains
                                        real(8) function fmax88(x, y) result (res)
                                            real(8), intent (in) :: x
                                            real(8), intent (in) :: y
                                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                        end function
                                        real(4) function fmax44(x, y) result (res)
                                            real(4), intent (in) :: x
                                            real(4), intent (in) :: y
                                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                        end function
                                        real(8) function fmax84(x, y) result(res)
                                            real(8), intent (in) :: x
                                            real(4), intent (in) :: y
                                            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                        end function
                                        real(8) function fmax48(x, y) result(res)
                                            real(4), intent (in) :: x
                                            real(8), intent (in) :: y
                                            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                        end function
                                        real(8) function fmin88(x, y) result (res)
                                            real(8), intent (in) :: x
                                            real(8), intent (in) :: y
                                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                        end function
                                        real(4) function fmin44(x, y) result (res)
                                            real(4), intent (in) :: x
                                            real(4), intent (in) :: y
                                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                        end function
                                        real(8) function fmin84(x, y) result(res)
                                            real(8), intent (in) :: x
                                            real(4), intent (in) :: y
                                            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                        end function
                                        real(8) function fmin48(x, y) result(res)
                                            real(4), intent (in) :: x
                                            real(8), intent (in) :: y
                                            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                        end function
                                    end module
                                    
                                    real(8) function code(f, b, x)
                                    use fmin_fmax_functions
                                        real(8), intent (in) :: f
                                        real(8), intent (in) :: b
                                        real(8), intent (in) :: x
                                        real(8) :: tmp
                                        if (f <= (-6200000000000.0d0)) then
                                            tmp = (-1.0d0) / sin(b)
                                        else if (f <= 0.092d0) then
                                            tmp = -(x / b) + ((f * ((2.0d0 + (2.0d0 * x)) ** (-0.5d0))) / b)
                                        else
                                            tmp = 1.0d0 / sin(b)
                                        end if
                                        code = tmp
                                    end function
                                    
                                    public static double code(double F, double B, double x) {
                                    	double tmp;
                                    	if (F <= -6200000000000.0) {
                                    		tmp = -1.0 / Math.sin(B);
                                    	} else if (F <= 0.092) {
                                    		tmp = -(x / B) + ((F * Math.pow((2.0 + (2.0 * x)), -0.5)) / B);
                                    	} else {
                                    		tmp = 1.0 / Math.sin(B);
                                    	}
                                    	return tmp;
                                    }
                                    
                                    def code(F, B, x):
                                    	tmp = 0
                                    	if F <= -6200000000000.0:
                                    		tmp = -1.0 / math.sin(B)
                                    	elif F <= 0.092:
                                    		tmp = -(x / B) + ((F * math.pow((2.0 + (2.0 * x)), -0.5)) / B)
                                    	else:
                                    		tmp = 1.0 / math.sin(B)
                                    	return tmp
                                    
                                    function code(F, B, x)
                                    	tmp = 0.0
                                    	if (F <= -6200000000000.0)
                                    		tmp = Float64(-1.0 / sin(B));
                                    	elseif (F <= 0.092)
                                    		tmp = Float64(Float64(-Float64(x / B)) + Float64(Float64(F * (Float64(2.0 + Float64(2.0 * x)) ^ -0.5)) / B));
                                    	else
                                    		tmp = Float64(1.0 / sin(B));
                                    	end
                                    	return tmp
                                    end
                                    
                                    function tmp_2 = code(F, B, x)
                                    	tmp = 0.0;
                                    	if (F <= -6200000000000.0)
                                    		tmp = -1.0 / sin(B);
                                    	elseif (F <= 0.092)
                                    		tmp = -(x / B) + ((F * ((2.0 + (2.0 * x)) ^ -0.5)) / B);
                                    	else
                                    		tmp = 1.0 / sin(B);
                                    	end
                                    	tmp_2 = tmp;
                                    end
                                    
                                    code[F_, B_, x_] := If[LessEqual[F, -6200000000000.0], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.092], N[((-N[(x / B), $MachinePrecision]) + N[(N[(F * N[Power[N[(2.0 + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]
                                    
                                    \begin{array}{l}
                                    \mathbf{if}\;F \leq -6200000000000:\\
                                    \;\;\;\;\frac{-1}{\sin B}\\
                                    
                                    \mathbf{elif}\;F \leq 0.092:\\
                                    \;\;\;\;\left(-\frac{x}{B}\right) + \frac{F \cdot {\left(2 + 2 \cdot x\right)}^{-0.5}}{B}\\
                                    
                                    \mathbf{else}:\\
                                    \;\;\;\;\frac{1}{\sin B}\\
                                    
                                    
                                    \end{array}
                                    
                                    Derivation
                                    1. Split input into 3 regimes
                                    2. if F < -6.2e12

                                      1. Initial program 76.7%

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

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

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

                                          \[\leadsto \frac{-1}{\sin B} \]
                                      4. Applied rewrites16.6%

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

                                      if -6.2e12 < F < 0.091999999999999998

                                      1. Initial program 76.7%

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

                                        \[\leadsto \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-/.f6450.1

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

                                        \[\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. Taylor expanded in F around 0

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

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

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

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

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

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

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

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

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

                                          \[\leadsto \left(-\frac{x}{B}\right) + \frac{F \cdot {\left(2 + 2 \cdot x\right)}^{\frac{-1}{2}}}{\sin B} \]
                                        10. lower-sin.f6437.0

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

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

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

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

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

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

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

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

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

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

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

                                          \[\leadsto \left(-\frac{x}{B}\right) + \frac{F \cdot {\left(2 + 2 \cdot x\right)}^{-0.5}}{B} \]
                                      10. Applied rewrites29.9%

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

                                      if 0.091999999999999998 < F

                                      1. Initial program 76.7%

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

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

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

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

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

                                    Alternative 18: 43.7% accurate, 2.7× speedup?

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

                                      1. Initial program 76.7%

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

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

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

                                          \[\leadsto \frac{-1}{\sin B} \]
                                      4. Applied rewrites16.6%

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

                                      if -6.2e12 < F < 1.7000000000000001e89

                                      1. Initial program 76.7%

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

                                        \[\leadsto \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-/.f6450.1

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

                                        \[\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. Taylor expanded in F around 0

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

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

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

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

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

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

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

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

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

                                          \[\leadsto \left(-\frac{x}{B}\right) + \frac{F \cdot {\left(2 + 2 \cdot x\right)}^{\frac{-1}{2}}}{\sin B} \]
                                        10. lower-sin.f6437.0

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

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

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

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

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

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

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

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

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

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

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

                                          \[\leadsto \left(-\frac{x}{B}\right) + \frac{F \cdot {\left(2 + 2 \cdot x\right)}^{-0.5}}{B} \]
                                      10. Applied rewrites29.9%

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

                                      if 1.7000000000000001e89 < F

                                      1. Initial program 76.7%

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

                                        \[\leadsto \color{blue}{-1 \cdot \left(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-/.f6428.2

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

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

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

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

                                          \[\leadsto -1 \cdot \frac{x \cdot \left(1 + \frac{1}{x}\right)}{B} \]
                                        3. lower-/.f6429.4

                                          \[\leadsto -1 \cdot \frac{x \cdot \left(1 + \frac{1}{x}\right)}{B} \]
                                      10. Applied rewrites29.4%

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

                                    Alternative 19: 43.6% accurate, 2.7× speedup?

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

                                      1. Initial program 76.7%

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

                                        \[\leadsto \color{blue}{-1 \cdot \left(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-/.f6428.2

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

                                        \[\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.f6428.2

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

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

                                      if -0.419999999999999984 < F < 1.7000000000000001e89

                                      1. Initial program 76.7%

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

                                        \[\leadsto \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-/.f6450.1

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

                                        \[\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. Taylor expanded in F around 0

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

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

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

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

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

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

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

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

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

                                          \[\leadsto \left(-\frac{x}{B}\right) + \frac{F \cdot {\left(2 + 2 \cdot x\right)}^{\frac{-1}{2}}}{\sin B} \]
                                        10. lower-sin.f6437.0

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

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

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

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

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

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

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

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

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

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

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

                                          \[\leadsto \left(-\frac{x}{B}\right) + \frac{F \cdot {\left(2 + 2 \cdot x\right)}^{-0.5}}{B} \]
                                      10. Applied rewrites29.9%

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

                                      if 1.7000000000000001e89 < F

                                      1. Initial program 76.7%

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

                                        \[\leadsto \color{blue}{-1 \cdot \left(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-/.f6428.2

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

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

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

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

                                          \[\leadsto -1 \cdot \frac{x \cdot \left(1 + \frac{1}{x}\right)}{B} \]
                                        3. lower-/.f6429.4

                                          \[\leadsto -1 \cdot \frac{x \cdot \left(1 + \frac{1}{x}\right)}{B} \]
                                      10. Applied rewrites29.4%

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

                                    Alternative 20: 29.4% accurate, 14.3× speedup?

                                    \[-\frac{x + 1}{B} \]
                                    (FPCore (F B x) :precision binary64 (- (/ (+ x 1.0) B)))
                                    double code(double F, double B, double x) {
                                    	return -((x + 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 = -((x + 1.0d0) / b)
                                    end function
                                    
                                    public static double code(double F, double B, double x) {
                                    	return -((x + 1.0) / B);
                                    }
                                    
                                    def code(F, B, x):
                                    	return -((x + 1.0) / B)
                                    
                                    function code(F, B, x)
                                    	return Float64(-Float64(Float64(x + 1.0) / B))
                                    end
                                    
                                    function tmp = code(F, B, x)
                                    	tmp = -((x + 1.0) / B);
                                    end
                                    
                                    code[F_, B_, x_] := (-N[(N[(x + 1.0), $MachinePrecision] / B), $MachinePrecision])
                                    
                                    -\frac{x + 1}{B}
                                    
                                    Derivation
                                    1. Initial program 76.7%

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

                                      \[\leadsto \color{blue}{-1 \cdot \left(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-/.f6428.2

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

                                      \[\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.f6428.2

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

                                      \[\leadsto -\frac{x + 1}{B} \]
                                    10. Add Preprocessing

                                    Alternative 21: 10.2% 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.7%

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

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

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

                                        \[\leadsto \frac{-1}{\sin B} \]
                                    4. Applied rewrites16.6%

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

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

                                      Reproduce

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