VandenBroeck and Keller, Equation (23)

Percentage Accurate: 77.5% → 99.6%
Time: 6.9s
Alternatives: 22
Speedup: 1.3×

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

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

Initial Program: 77.5% 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.6% accurate, 0.9× speedup?

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

\mathbf{elif}\;F \leq 2 \cdot 10^{+117}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot F, t\_2\right)\\

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


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

    1. Initial program 77.5%

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

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

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

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

      if -1.1e70 < F < 2.0000000000000001e117

      1. Initial program 77.5%

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

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

        \[\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)} \]

      if 2.0000000000000001e117 < F

      1. Initial program 77.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 2: 92.3% accurate, 1.0× speedup?

    \[\begin{array}{l} t_0 := \frac{1}{\sin B}\\ t_1 := \frac{-x}{\tan B}\\ \mathbf{if}\;F \leq -1.1 \cdot 10^{+70}:\\ \;\;\;\;\mathsf{fma}\left(t\_0, -1, t\_1\right)\\ \mathbf{elif}\;F \leq 1.5 \cdot 10^{+236}:\\ \;\;\;\;\mathsf{fma}\left(t\_0, {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot F, t\_1\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \]
    (FPCore (F B x)
     :precision binary64
     (let* ((t_0 (/ 1.0 (sin B))) (t_1 (/ (- x) (tan B))))
       (if (<= F -1.1e+70)
         (fma t_0 -1.0 t_1)
         (if (<= F 1.5e+236)
           (fma t_0 (* (pow (fma 2.0 x (fma F F 2.0)) -0.5) F) t_1)
           t_0))))
    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 <= -1.1e+70) {
    		tmp = fma(t_0, -1.0, t_1);
    	} else if (F <= 1.5e+236) {
    		tmp = fma(t_0, (pow(fma(2.0, x, fma(F, F, 2.0)), -0.5) * F), t_1);
    	} else {
    		tmp = t_0;
    	}
    	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 <= -1.1e+70)
    		tmp = fma(t_0, -1.0, t_1);
    	elseif (F <= 1.5e+236)
    		tmp = fma(t_0, Float64((fma(2.0, x, fma(F, F, 2.0)) ^ -0.5) * F), t_1);
    	else
    		tmp = t_0;
    	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, -1.1e+70], N[(t$95$0 * -1.0 + t$95$1), $MachinePrecision], If[LessEqual[F, 1.5e+236], N[(t$95$0 * N[(N[Power[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * F), $MachinePrecision] + t$95$1), $MachinePrecision], t$95$0]]]]
    
    \begin{array}{l}
    t_0 := \frac{1}{\sin B}\\
    t_1 := \frac{-x}{\tan B}\\
    \mathbf{if}\;F \leq -1.1 \cdot 10^{+70}:\\
    \;\;\;\;\mathsf{fma}\left(t\_0, -1, t\_1\right)\\
    
    \mathbf{elif}\;F \leq 1.5 \cdot 10^{+236}:\\
    \;\;\;\;\mathsf{fma}\left(t\_0, {\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot F, t\_1\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_0\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if F < -1.1e70

      1. Initial program 77.5%

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

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

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

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

        if -1.1e70 < F < 1.4999999999999999e236

        1. Initial program 77.5%

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

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

          \[\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)} \]

        if 1.4999999999999999e236 < F

        1. Initial program 77.5%

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

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

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

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

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

      Alternative 3: 92.3% accurate, 1.0× speedup?

      \[\begin{array}{l} t_0 := \frac{1}{\sin B}\\ t_1 := \frac{-x}{\tan B}\\ \mathbf{if}\;F \leq -2.2 \cdot 10^{+20}:\\ \;\;\;\;\mathsf{fma}\left(t\_0, -1, t\_1\right)\\ \mathbf{elif}\;F \leq 1.5 \cdot 10^{+236}:\\ \;\;\;\;\mathsf{fma}\left(F, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B}, t\_1\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \]
      (FPCore (F B x)
       :precision binary64
       (let* ((t_0 (/ 1.0 (sin B))) (t_1 (/ (- x) (tan B))))
         (if (<= F -2.2e+20)
           (fma t_0 -1.0 t_1)
           (if (<= F 1.5e+236)
             (fma F (/ (pow (fma 2.0 x (fma F F 2.0)) -0.5) (sin B)) t_1)
             t_0))))
      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 <= -2.2e+20) {
      		tmp = fma(t_0, -1.0, t_1);
      	} else if (F <= 1.5e+236) {
      		tmp = fma(F, (pow(fma(2.0, x, fma(F, F, 2.0)), -0.5) / sin(B)), t_1);
      	} else {
      		tmp = t_0;
      	}
      	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 <= -2.2e+20)
      		tmp = fma(t_0, -1.0, t_1);
      	elseif (F <= 1.5e+236)
      		tmp = fma(F, Float64((fma(2.0, x, fma(F, F, 2.0)) ^ -0.5) / sin(B)), t_1);
      	else
      		tmp = t_0;
      	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, -2.2e+20], N[(t$95$0 * -1.0 + t$95$1), $MachinePrecision], If[LessEqual[F, 1.5e+236], N[(F * N[(N[Power[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], t$95$0]]]]
      
      \begin{array}{l}
      t_0 := \frac{1}{\sin B}\\
      t_1 := \frac{-x}{\tan B}\\
      \mathbf{if}\;F \leq -2.2 \cdot 10^{+20}:\\
      \;\;\;\;\mathsf{fma}\left(t\_0, -1, t\_1\right)\\
      
      \mathbf{elif}\;F \leq 1.5 \cdot 10^{+236}:\\
      \;\;\;\;\mathsf{fma}\left(F, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B}, t\_1\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_0\\
      
      
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if F < -2.2e20

        1. Initial program 77.5%

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

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

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

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

          if -2.2e20 < F < 1.4999999999999999e236

          1. Initial program 77.5%

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

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

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

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

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

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

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

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

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

          if 1.4999999999999999e236 < F

          1. Initial program 77.5%

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

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

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

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

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

        Alternative 4: 90.4% accurate, 1.0× speedup?

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

          1. Initial program 77.5%

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

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

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

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

            if -3.20000000000000005e101 < F < 2.9000000000000002e149

            1. Initial program 77.5%

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

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

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

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

            if 2.9000000000000002e149 < F < 1.4999999999999999e236

            1. Initial program 77.5%

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

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

              \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
            5. Applied rewrites57.0%

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

                \[\leadsto \frac{-x}{\tan B} \]
              2. lift-/.f64N/A

                \[\leadsto \frac{-x}{\color{blue}{\tan B}} \]
              3. tan-quotN/A

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

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

                \[\leadsto \frac{-x}{\frac{\sin B}{\cos B}} \]
              6. associate-/r/N/A

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

                \[\leadsto \frac{-x}{\sin B} \cdot \color{blue}{\cos B} \]
              8. lower-/.f6457.0%

                \[\leadsto \frac{-x}{\sin B} \cdot \cos \color{blue}{B} \]
            7. Applied rewrites57.0%

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

            if 1.4999999999999999e236 < F

            1. Initial program 77.5%

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

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

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

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

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

          Alternative 5: 87.4% accurate, 1.1× speedup?

          \[\begin{array}{l} t_0 := \frac{1}{\sin B}\\ t_1 := \frac{-x}{\tan B}\\ \mathbf{if}\;F \leq -2.05 \cdot 10^{-22}:\\ \;\;\;\;\mathsf{fma}\left(t\_0, -1, t\_1\right)\\ \mathbf{elif}\;F \leq 3 \cdot 10^{-10}:\\ \;\;\;\;\mathsf{fma}\left(F, \frac{{\left(\mathsf{fma}\left(x, 2, 2\right)\right)}^{-0.5}}{\sin B}, t\_1\right)\\ \mathbf{elif}\;F \leq 1.8 \cdot 10^{+112}:\\ \;\;\;\;\frac{1}{\frac{1}{\mathsf{fma}\left({\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, F, -x\right)}} \cdot t\_0\\ \mathbf{elif}\;F \leq 1.5 \cdot 10^{+236}:\\ \;\;\;\;\frac{-x}{\sin B} \cdot \cos B\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \]
          (FPCore (F B x)
           :precision binary64
           (let* ((t_0 (/ 1.0 (sin B))) (t_1 (/ (- x) (tan B))))
             (if (<= F -2.05e-22)
               (fma t_0 -1.0 t_1)
               (if (<= F 3e-10)
                 (fma F (/ (pow (fma x 2.0 2.0) -0.5) (sin B)) t_1)
                 (if (<= F 1.8e+112)
                   (*
                    (/ 1.0 (/ 1.0 (fma (pow (fma x 2.0 (fma F F 2.0)) -0.5) F (- x))))
                    t_0)
                   (if (<= F 1.5e+236) (* (/ (- x) (sin B)) (cos B)) t_0))))))
          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 <= -2.05e-22) {
          		tmp = fma(t_0, -1.0, t_1);
          	} else if (F <= 3e-10) {
          		tmp = fma(F, (pow(fma(x, 2.0, 2.0), -0.5) / sin(B)), t_1);
          	} else if (F <= 1.8e+112) {
          		tmp = (1.0 / (1.0 / fma(pow(fma(x, 2.0, fma(F, F, 2.0)), -0.5), F, -x))) * t_0;
          	} else if (F <= 1.5e+236) {
          		tmp = (-x / sin(B)) * cos(B);
          	} else {
          		tmp = t_0;
          	}
          	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 <= -2.05e-22)
          		tmp = fma(t_0, -1.0, t_1);
          	elseif (F <= 3e-10)
          		tmp = fma(F, Float64((fma(x, 2.0, 2.0) ^ -0.5) / sin(B)), t_1);
          	elseif (F <= 1.8e+112)
          		tmp = Float64(Float64(1.0 / Float64(1.0 / fma((fma(x, 2.0, fma(F, F, 2.0)) ^ -0.5), F, Float64(-x)))) * t_0);
          	elseif (F <= 1.5e+236)
          		tmp = Float64(Float64(Float64(-x) / sin(B)) * cos(B));
          	else
          		tmp = t_0;
          	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, -2.05e-22], N[(t$95$0 * -1.0 + t$95$1), $MachinePrecision], If[LessEqual[F, 3e-10], N[(F * N[(N[Power[N[(x * 2.0 + 2.0), $MachinePrecision], -0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[F, 1.8e+112], N[(N[(1.0 / N[(1.0 / N[(N[Power[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * F + (-x)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[F, 1.5e+236], N[(N[((-x) / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Cos[B], $MachinePrecision]), $MachinePrecision], t$95$0]]]]]]
          
          \begin{array}{l}
          t_0 := \frac{1}{\sin B}\\
          t_1 := \frac{-x}{\tan B}\\
          \mathbf{if}\;F \leq -2.05 \cdot 10^{-22}:\\
          \;\;\;\;\mathsf{fma}\left(t\_0, -1, t\_1\right)\\
          
          \mathbf{elif}\;F \leq 3 \cdot 10^{-10}:\\
          \;\;\;\;\mathsf{fma}\left(F, \frac{{\left(\mathsf{fma}\left(x, 2, 2\right)\right)}^{-0.5}}{\sin B}, t\_1\right)\\
          
          \mathbf{elif}\;F \leq 1.8 \cdot 10^{+112}:\\
          \;\;\;\;\frac{1}{\frac{1}{\mathsf{fma}\left({\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, F, -x\right)}} \cdot t\_0\\
          
          \mathbf{elif}\;F \leq 1.5 \cdot 10^{+236}:\\
          \;\;\;\;\frac{-x}{\sin B} \cdot \cos B\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_0\\
          
          
          \end{array}
          
          Derivation
          1. Split input into 5 regimes
          2. if F < -2.05e-22

            1. Initial program 77.5%

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

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

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

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

              if -2.05e-22 < F < 3e-10

              1. Initial program 77.5%

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

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

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

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

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

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

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

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

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

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

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

              if 3e-10 < F < 1.8e112

              1. Initial program 77.5%

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

                  \[\leadsto \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. div-flipN/A

                  \[\leadsto \color{blue}{\frac{1}{\frac{\sin B}{\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)}}}} \]
                7. lower-unsound-/.f64N/A

                  \[\leadsto \color{blue}{\frac{1}{\frac{\sin B}{\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)}}}} \]
                8. lower-unsound-/.f64N/A

                  \[\leadsto \frac{1}{\color{blue}{\frac{\sin B}{\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)}}}} \]
              3. Applied rewrites85.6%

                \[\leadsto \color{blue}{\frac{1}{\frac{\sin B}{\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)}}} \]
              4. Taylor expanded in B around 0

                \[\leadsto \frac{1}{\frac{\sin B}{\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)}} \]
              5. Step-by-step derivation
                1. lower-*.f6460.0%

                  \[\leadsto \frac{1}{\frac{\sin B}{\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)}} \]
              6. Applied rewrites60.0%

                \[\leadsto \frac{1}{\frac{\sin B}{\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)}} \]
              7. Step-by-step derivation
                1. lift-/.f64N/A

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

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

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

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

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

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

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

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

              if 1.8e112 < F < 1.4999999999999999e236

              1. Initial program 77.5%

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

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

                \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
              5. Applied rewrites57.0%

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

                  \[\leadsto \frac{-x}{\tan B} \]
                2. lift-/.f64N/A

                  \[\leadsto \frac{-x}{\color{blue}{\tan B}} \]
                3. tan-quotN/A

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

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

                  \[\leadsto \frac{-x}{\frac{\sin B}{\cos B}} \]
                6. associate-/r/N/A

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

                  \[\leadsto \frac{-x}{\sin B} \cdot \color{blue}{\cos B} \]
                8. lower-/.f6457.0%

                  \[\leadsto \frac{-x}{\sin B} \cdot \cos \color{blue}{B} \]
              7. Applied rewrites57.0%

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

              if 1.4999999999999999e236 < F

              1. Initial program 77.5%

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

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

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

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

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

            Alternative 6: 87.4% accurate, 1.1× speedup?

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

              1. Initial program 77.5%

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

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

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

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

                if -2.05e-22 < F < 3e-10

                1. Initial program 77.5%

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

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

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

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

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

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

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

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

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

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

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

                if 3e-10 < F < 1.8e112

                1. Initial program 77.5%

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

                    \[\leadsto \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. div-flipN/A

                    \[\leadsto \color{blue}{\frac{1}{\frac{\sin B}{\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)}}}} \]
                  7. lower-unsound-/.f64N/A

                    \[\leadsto \color{blue}{\frac{1}{\frac{\sin B}{\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)}}}} \]
                  8. lower-unsound-/.f64N/A

                    \[\leadsto \frac{1}{\color{blue}{\frac{\sin B}{\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)}}}} \]
                3. Applied rewrites85.6%

                  \[\leadsto \color{blue}{\frac{1}{\frac{\sin B}{\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)}}} \]
                4. Taylor expanded in B around 0

                  \[\leadsto \frac{1}{\frac{\sin B}{\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)}} \]
                5. Step-by-step derivation
                  1. lower-*.f6460.0%

                    \[\leadsto \frac{1}{\frac{\sin B}{\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)}} \]
                6. Applied rewrites60.0%

                  \[\leadsto \frac{1}{\frac{\sin B}{\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)}} \]
                7. Step-by-step derivation
                  1. lift-/.f64N/A

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

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

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

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

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

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

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

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

                if 1.8e112 < F < 1.4999999999999999e236

                1. Initial program 77.5%

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

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

                  \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
                5. Applied rewrites57.0%

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

                    \[\leadsto \frac{-x}{\tan B} \]
                  2. lift-/.f64N/A

                    \[\leadsto \frac{-x}{\color{blue}{\tan B}} \]
                  3. tan-quotN/A

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

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

                    \[\leadsto \frac{-x}{\frac{\sin B}{\cos B}} \]
                  6. associate-/r/N/A

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

                    \[\leadsto \frac{-x}{\sin B} \cdot \color{blue}{\cos B} \]
                  8. lower-/.f6457.0%

                    \[\leadsto \frac{-x}{\sin B} \cdot \cos \color{blue}{B} \]
                7. Applied rewrites57.0%

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

                if 1.4999999999999999e236 < F

                1. Initial program 77.5%

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

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

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

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

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

              Alternative 7: 80.9% accurate, 1.3× speedup?

              \[\begin{array}{l} t_0 := \frac{1}{\sin B}\\ \mathbf{if}\;F \leq -7.2 \cdot 10^{+19}:\\ \;\;\;\;\mathsf{fma}\left(t\_0, -1, \frac{-x}{\tan B}\right)\\ \mathbf{elif}\;F \leq -3.4 \cdot 10^{-100}:\\ \;\;\;\;\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)}\\ \mathbf{elif}\;F \leq 1.3 \cdot 10^{-192}:\\ \;\;\;\;\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{B} \cdot {\left(2 + 2 \cdot x\right)}^{-0.5}\\ \mathbf{elif}\;F \leq 1.8 \cdot 10^{+112}:\\ \;\;\;\;\frac{1}{\frac{\sin B}{\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)}}\\ \mathbf{elif}\;F \leq 1.5 \cdot 10^{+236}:\\ \;\;\;\;\frac{-x}{\sin B} \cdot \cos B\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \]
              (FPCore (F B x)
               :precision binary64
               (let* ((t_0 (/ 1.0 (sin B))))
                 (if (<= F -7.2e+19)
                   (fma t_0 -1.0 (/ (- x) (tan B)))
                   (if (<= F -3.4e-100)
                     (+
                      (- (/ x B))
                      (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0)))))
                     (if (<= F 1.3e-192)
                       (+ (- (* x (/ 1.0 (tan B)))) (* (/ F B) (pow (+ 2.0 (* 2.0 x)) -0.5)))
                       (if (<= F 1.8e+112)
                         (/
                          1.0
                          (/
                           (sin B)
                           (fma (pow (fma 2.0 x (fma F F 2.0)) -0.5) F (* -1.0 x))))
                         (if (<= F 1.5e+236) (* (/ (- x) (sin B)) (cos B)) t_0)))))))
              double code(double F, double B, double x) {
              	double t_0 = 1.0 / sin(B);
              	double tmp;
              	if (F <= -7.2e+19) {
              		tmp = fma(t_0, -1.0, (-x / tan(B)));
              	} else if (F <= -3.4e-100) {
              		tmp = -(x / B) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
              	} else if (F <= 1.3e-192) {
              		tmp = -(x * (1.0 / tan(B))) + ((F / B) * pow((2.0 + (2.0 * x)), -0.5));
              	} else if (F <= 1.8e+112) {
              		tmp = 1.0 / (sin(B) / fma(pow(fma(2.0, x, fma(F, F, 2.0)), -0.5), F, (-1.0 * x)));
              	} else if (F <= 1.5e+236) {
              		tmp = (-x / sin(B)) * cos(B);
              	} else {
              		tmp = t_0;
              	}
              	return tmp;
              }
              
              function code(F, B, x)
              	t_0 = Float64(1.0 / sin(B))
              	tmp = 0.0
              	if (F <= -7.2e+19)
              		tmp = fma(t_0, -1.0, Float64(Float64(-x) / tan(B)));
              	elseif (F <= -3.4e-100)
              		tmp = Float64(Float64(-Float64(x / B)) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0)))));
              	elseif (F <= 1.3e-192)
              		tmp = Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / B) * (Float64(2.0 + Float64(2.0 * x)) ^ -0.5)));
              	elseif (F <= 1.8e+112)
              		tmp = Float64(1.0 / Float64(sin(B) / fma((fma(2.0, x, fma(F, F, 2.0)) ^ -0.5), F, Float64(-1.0 * x))));
              	elseif (F <= 1.5e+236)
              		tmp = Float64(Float64(Float64(-x) / sin(B)) * cos(B));
              	else
              		tmp = t_0;
              	end
              	return tmp
              end
              
              code[F_, B_, x_] := Block[{t$95$0 = N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -7.2e+19], N[(t$95$0 * -1.0 + N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -3.4e-100], N[((-N[(x / B), $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], If[LessEqual[F, 1.3e-192], N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / B), $MachinePrecision] * N[Power[N[(2.0 + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.8e+112], N[(1.0 / N[(N[Sin[B], $MachinePrecision] / N[(N[Power[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * F + N[(-1.0 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.5e+236], N[(N[((-x) / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Cos[B], $MachinePrecision]), $MachinePrecision], t$95$0]]]]]]
              
              \begin{array}{l}
              t_0 := \frac{1}{\sin B}\\
              \mathbf{if}\;F \leq -7.2 \cdot 10^{+19}:\\
              \;\;\;\;\mathsf{fma}\left(t\_0, -1, \frac{-x}{\tan B}\right)\\
              
              \mathbf{elif}\;F \leq -3.4 \cdot 10^{-100}:\\
              \;\;\;\;\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)}\\
              
              \mathbf{elif}\;F \leq 1.3 \cdot 10^{-192}:\\
              \;\;\;\;\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{B} \cdot {\left(2 + 2 \cdot x\right)}^{-0.5}\\
              
              \mathbf{elif}\;F \leq 1.8 \cdot 10^{+112}:\\
              \;\;\;\;\frac{1}{\frac{\sin B}{\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)}}\\
              
              \mathbf{elif}\;F \leq 1.5 \cdot 10^{+236}:\\
              \;\;\;\;\frac{-x}{\sin B} \cdot \cos B\\
              
              \mathbf{else}:\\
              \;\;\;\;t\_0\\
              
              
              \end{array}
              
              Derivation
              1. Split input into 6 regimes
              2. if F < -7.2e19

                1. Initial program 77.5%

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

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

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

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

                  if -7.2e19 < F < -3.39999999999999976e-100

                  1. Initial program 77.5%

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

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

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

                    \[\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)} \]

                  if -3.39999999999999976e-100 < F < 1.3000000000000001e-192

                  1. Initial program 77.5%

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

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

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

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

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

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

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

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

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

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

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

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

                    if 1.3000000000000001e-192 < F < 1.8e112

                    1. Initial program 77.5%

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

                        \[\leadsto \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. div-flipN/A

                        \[\leadsto \color{blue}{\frac{1}{\frac{\sin B}{\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)}}}} \]
                      7. lower-unsound-/.f64N/A

                        \[\leadsto \color{blue}{\frac{1}{\frac{\sin B}{\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)}}}} \]
                      8. lower-unsound-/.f64N/A

                        \[\leadsto \frac{1}{\color{blue}{\frac{\sin B}{\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)}}}} \]
                    3. Applied rewrites85.6%

                      \[\leadsto \color{blue}{\frac{1}{\frac{\sin B}{\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)}}} \]
                    4. Taylor expanded in B around 0

                      \[\leadsto \frac{1}{\frac{\sin B}{\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)}} \]
                    5. Step-by-step derivation
                      1. lower-*.f6460.0%

                        \[\leadsto \frac{1}{\frac{\sin B}{\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)}} \]
                    6. Applied rewrites60.0%

                      \[\leadsto \frac{1}{\frac{\sin B}{\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)}} \]

                    if 1.8e112 < F < 1.4999999999999999e236

                    1. Initial program 77.5%

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

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

                      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
                    5. Applied rewrites57.0%

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

                        \[\leadsto \frac{-x}{\tan B} \]
                      2. lift-/.f64N/A

                        \[\leadsto \frac{-x}{\color{blue}{\tan B}} \]
                      3. tan-quotN/A

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

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

                        \[\leadsto \frac{-x}{\frac{\sin B}{\cos B}} \]
                      6. associate-/r/N/A

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

                        \[\leadsto \frac{-x}{\sin B} \cdot \color{blue}{\cos B} \]
                      8. lower-/.f6457.0%

                        \[\leadsto \frac{-x}{\sin B} \cdot \cos \color{blue}{B} \]
                    7. Applied rewrites57.0%

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

                    if 1.4999999999999999e236 < F

                    1. Initial program 77.5%

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

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

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

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

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

                  Alternative 8: 80.9% accurate, 1.2× speedup?

                  \[\begin{array}{l} t_0 := \frac{1}{\sin B}\\ t_1 := {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\\ \mathbf{if}\;F \leq -7.2 \cdot 10^{+19}:\\ \;\;\;\;\mathsf{fma}\left(t\_0, -1, \frac{-x}{\tan B}\right)\\ \mathbf{elif}\;F \leq -3.4 \cdot 10^{-100}:\\ \;\;\;\;\left(-\frac{x}{B}\right) + \frac{F}{\sin B} \cdot t\_1\\ \mathbf{elif}\;F \leq 1.3 \cdot 10^{-192}:\\ \;\;\;\;\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{B} \cdot t\_1\\ \mathbf{elif}\;F \leq 1.8 \cdot 10^{+112}:\\ \;\;\;\;\frac{1}{\frac{\sin B}{\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)}}\\ \mathbf{elif}\;F \leq 1.5 \cdot 10^{+236}:\\ \;\;\;\;\frac{-x}{\sin B} \cdot \cos B\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \]
                  (FPCore (F B x)
                   :precision binary64
                   (let* ((t_0 (/ 1.0 (sin B)))
                          (t_1 (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0)))))
                     (if (<= F -7.2e+19)
                       (fma t_0 -1.0 (/ (- x) (tan B)))
                       (if (<= F -3.4e-100)
                         (+ (- (/ x B)) (* (/ F (sin B)) t_1))
                         (if (<= F 1.3e-192)
                           (+ (- (* x (/ 1.0 (tan B)))) (* (/ F B) t_1))
                           (if (<= F 1.8e+112)
                             (/
                              1.0
                              (/
                               (sin B)
                               (fma (pow (fma 2.0 x (fma F F 2.0)) -0.5) F (* -1.0 x))))
                             (if (<= F 1.5e+236) (* (/ (- x) (sin B)) (cos B)) t_0)))))))
                  double code(double F, double B, double x) {
                  	double t_0 = 1.0 / sin(B);
                  	double t_1 = pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0));
                  	double tmp;
                  	if (F <= -7.2e+19) {
                  		tmp = fma(t_0, -1.0, (-x / tan(B)));
                  	} else if (F <= -3.4e-100) {
                  		tmp = -(x / B) + ((F / sin(B)) * t_1);
                  	} else if (F <= 1.3e-192) {
                  		tmp = -(x * (1.0 / tan(B))) + ((F / B) * t_1);
                  	} else if (F <= 1.8e+112) {
                  		tmp = 1.0 / (sin(B) / fma(pow(fma(2.0, x, fma(F, F, 2.0)), -0.5), F, (-1.0 * x)));
                  	} else if (F <= 1.5e+236) {
                  		tmp = (-x / sin(B)) * cos(B);
                  	} else {
                  		tmp = t_0;
                  	}
                  	return tmp;
                  }
                  
                  function code(F, B, x)
                  	t_0 = Float64(1.0 / sin(B))
                  	t_1 = Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0))
                  	tmp = 0.0
                  	if (F <= -7.2e+19)
                  		tmp = fma(t_0, -1.0, Float64(Float64(-x) / tan(B)));
                  	elseif (F <= -3.4e-100)
                  		tmp = Float64(Float64(-Float64(x / B)) + Float64(Float64(F / sin(B)) * t_1));
                  	elseif (F <= 1.3e-192)
                  		tmp = Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / B) * t_1));
                  	elseif (F <= 1.8e+112)
                  		tmp = Float64(1.0 / Float64(sin(B) / fma((fma(2.0, x, fma(F, F, 2.0)) ^ -0.5), F, Float64(-1.0 * x))));
                  	elseif (F <= 1.5e+236)
                  		tmp = Float64(Float64(Float64(-x) / sin(B)) * cos(B));
                  	else
                  		tmp = t_0;
                  	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[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]}, If[LessEqual[F, -7.2e+19], N[(t$95$0 * -1.0 + N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -3.4e-100], N[((-N[(x / B), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.3e-192], N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / B), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.8e+112], N[(1.0 / N[(N[Sin[B], $MachinePrecision] / N[(N[Power[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * F + N[(-1.0 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.5e+236], N[(N[((-x) / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Cos[B], $MachinePrecision]), $MachinePrecision], t$95$0]]]]]]]
                  
                  \begin{array}{l}
                  t_0 := \frac{1}{\sin B}\\
                  t_1 := {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\\
                  \mathbf{if}\;F \leq -7.2 \cdot 10^{+19}:\\
                  \;\;\;\;\mathsf{fma}\left(t\_0, -1, \frac{-x}{\tan B}\right)\\
                  
                  \mathbf{elif}\;F \leq -3.4 \cdot 10^{-100}:\\
                  \;\;\;\;\left(-\frac{x}{B}\right) + \frac{F}{\sin B} \cdot t\_1\\
                  
                  \mathbf{elif}\;F \leq 1.3 \cdot 10^{-192}:\\
                  \;\;\;\;\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{B} \cdot t\_1\\
                  
                  \mathbf{elif}\;F \leq 1.8 \cdot 10^{+112}:\\
                  \;\;\;\;\frac{1}{\frac{\sin B}{\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)}}\\
                  
                  \mathbf{elif}\;F \leq 1.5 \cdot 10^{+236}:\\
                  \;\;\;\;\frac{-x}{\sin B} \cdot \cos B\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;t\_0\\
                  
                  
                  \end{array}
                  
                  Derivation
                  1. Split input into 6 regimes
                  2. if F < -7.2e19

                    1. Initial program 77.5%

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

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

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

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

                      if -7.2e19 < F < -3.39999999999999976e-100

                      1. Initial program 77.5%

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

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

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

                        \[\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)} \]

                      if -3.39999999999999976e-100 < F < 1.3000000000000001e-192

                      1. Initial program 77.5%

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

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

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

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

                      if 1.3000000000000001e-192 < F < 1.8e112

                      1. Initial program 77.5%

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

                          \[\leadsto \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. div-flipN/A

                          \[\leadsto \color{blue}{\frac{1}{\frac{\sin B}{\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)}}}} \]
                        7. lower-unsound-/.f64N/A

                          \[\leadsto \color{blue}{\frac{1}{\frac{\sin B}{\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)}}}} \]
                        8. lower-unsound-/.f64N/A

                          \[\leadsto \frac{1}{\color{blue}{\frac{\sin B}{\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)}}}} \]
                      3. Applied rewrites85.6%

                        \[\leadsto \color{blue}{\frac{1}{\frac{\sin B}{\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)}}} \]
                      4. Taylor expanded in B around 0

                        \[\leadsto \frac{1}{\frac{\sin B}{\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)}} \]
                      5. Step-by-step derivation
                        1. lower-*.f6460.0%

                          \[\leadsto \frac{1}{\frac{\sin B}{\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)}} \]
                      6. Applied rewrites60.0%

                        \[\leadsto \frac{1}{\frac{\sin B}{\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)}} \]

                      if 1.8e112 < F < 1.4999999999999999e236

                      1. Initial program 77.5%

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

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

                        \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
                      5. Applied rewrites57.0%

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

                          \[\leadsto \frac{-x}{\tan B} \]
                        2. lift-/.f64N/A

                          \[\leadsto \frac{-x}{\color{blue}{\tan B}} \]
                        3. tan-quotN/A

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

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

                          \[\leadsto \frac{-x}{\frac{\sin B}{\cos B}} \]
                        6. associate-/r/N/A

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

                          \[\leadsto \frac{-x}{\sin B} \cdot \color{blue}{\cos B} \]
                        8. lower-/.f6457.0%

                          \[\leadsto \frac{-x}{\sin B} \cdot \cos \color{blue}{B} \]
                      7. Applied rewrites57.0%

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

                      if 1.4999999999999999e236 < F

                      1. Initial program 77.5%

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

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

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

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

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

                    Alternative 9: 77.1% accurate, 1.4× speedup?

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

                      1. Initial program 77.5%

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

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

                        \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
                      5. Applied rewrites57.0%

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

                          \[\leadsto \frac{-x}{\tan B} \]
                        2. lift-/.f64N/A

                          \[\leadsto \frac{-x}{\color{blue}{\tan B}} \]
                        3. tan-quotN/A

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

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

                          \[\leadsto \frac{-x}{\frac{\sin B}{\cos B}} \]
                        6. associate-/r/N/A

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

                          \[\leadsto \frac{-x}{\sin B} \cdot \color{blue}{\cos B} \]
                        8. lower-/.f6457.0%

                          \[\leadsto \frac{-x}{\sin B} \cdot \cos \color{blue}{B} \]
                      7. Applied rewrites57.0%

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

                      if -1.6999999999999999e-61 < x < 4.9999999999999996e-78

                      1. Initial program 77.5%

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

                          \[\leadsto \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. div-flipN/A

                          \[\leadsto \color{blue}{\frac{1}{\frac{\sin B}{\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)}}}} \]
                        7. lower-unsound-/.f64N/A

                          \[\leadsto \color{blue}{\frac{1}{\frac{\sin B}{\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)}}}} \]
                        8. lower-unsound-/.f64N/A

                          \[\leadsto \frac{1}{\color{blue}{\frac{\sin B}{\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)}}}} \]
                      3. Applied rewrites85.6%

                        \[\leadsto \color{blue}{\frac{1}{\frac{\sin B}{\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)}}} \]
                      4. Taylor expanded in B around 0

                        \[\leadsto \frac{1}{\frac{\sin B}{\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)}} \]
                      5. Step-by-step derivation
                        1. lower-*.f6460.0%

                          \[\leadsto \frac{1}{\frac{\sin B}{\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)}} \]
                      6. Applied rewrites60.0%

                        \[\leadsto \frac{1}{\frac{\sin B}{\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)}} \]
                      7. Step-by-step derivation
                        1. lift-/.f64N/A

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

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

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

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

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

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

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

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

                      if 4.9999999999999996e-78 < x

                      1. Initial program 77.5%

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

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

                        \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
                      5. Applied rewrites57.0%

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

                    Alternative 10: 77.1% accurate, 1.4× speedup?

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

                      1. Initial program 77.5%

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

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

                        \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
                      5. Applied rewrites57.0%

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

                          \[\leadsto \frac{-x}{\tan B} \]
                        2. lift-/.f64N/A

                          \[\leadsto \frac{-x}{\color{blue}{\tan B}} \]
                        3. tan-quotN/A

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

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

                          \[\leadsto \frac{-x}{\frac{\sin B}{\cos B}} \]
                        6. associate-/r/N/A

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

                          \[\leadsto \frac{-x}{\sin B} \cdot \color{blue}{\cos B} \]
                        8. lower-/.f6457.0%

                          \[\leadsto \frac{-x}{\sin B} \cdot \cos \color{blue}{B} \]
                      7. Applied rewrites57.0%

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

                      if -1.6999999999999999e-61 < x < 4.9999999999999996e-78

                      1. Initial program 77.5%

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

                          \[\leadsto \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. div-flipN/A

                          \[\leadsto \color{blue}{\frac{1}{\frac{\sin B}{\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)}}}} \]
                        7. lower-unsound-/.f64N/A

                          \[\leadsto \color{blue}{\frac{1}{\frac{\sin B}{\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)}}}} \]
                        8. lower-unsound-/.f64N/A

                          \[\leadsto \frac{1}{\color{blue}{\frac{\sin B}{\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)}}}} \]
                      3. Applied rewrites85.6%

                        \[\leadsto \color{blue}{\frac{1}{\frac{\sin B}{\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)}}} \]
                      4. Taylor expanded in B around 0

                        \[\leadsto \frac{1}{\frac{\sin B}{\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)}} \]
                      5. Step-by-step derivation
                        1. lower-*.f6460.0%

                          \[\leadsto \frac{1}{\frac{\sin B}{\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)}} \]
                      6. Applied rewrites60.0%

                        \[\leadsto \frac{1}{\frac{\sin B}{\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)}} \]

                      if 4.9999999999999996e-78 < x

                      1. Initial program 77.5%

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

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

                        \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
                      5. Applied rewrites57.0%

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

                    Alternative 11: 72.6% accurate, 1.5× speedup?

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

                      1. Initial program 77.5%

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

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

                        \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
                      5. Applied rewrites57.0%

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

                          \[\leadsto \frac{-x}{\tan B} \]
                        2. lift-/.f64N/A

                          \[\leadsto \frac{-x}{\color{blue}{\tan B}} \]
                        3. tan-quotN/A

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

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

                          \[\leadsto \frac{-x}{\frac{\sin B}{\cos B}} \]
                        6. associate-/r/N/A

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

                          \[\leadsto \frac{-x}{\sin B} \cdot \color{blue}{\cos B} \]
                        8. lower-/.f6457.0%

                          \[\leadsto \frac{-x}{\sin B} \cdot \cos \color{blue}{B} \]
                      7. Applied rewrites57.0%

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

                      if -1.6999999999999999e-61 < x < 4.9999999999999996e-78

                      1. Initial program 77.5%

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \frac{F \cdot {\left(2 + {F}^{2}\right)}^{\frac{-1}{2}}}{\sin B} \]
                        10. lower-sin.f6430.3%

                          \[\leadsto \frac{F \cdot {\left(2 + {F}^{2}\right)}^{-0.5}}{\sin B} \]
                      6. Applied rewrites30.3%

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

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

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

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

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

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

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

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

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

                          \[\leadsto \frac{1}{\sin B} \cdot \left({\left(2 + {F}^{2}\right)}^{\frac{-1}{2}} \cdot \color{blue}{F}\right) \]
                        10. lower-*.f6430.3%

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

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

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

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

                          \[\leadsto \frac{1}{\sin B} \cdot \left({\left(F \cdot F + 2\right)}^{\frac{-1}{2}} \cdot F\right) \]
                        15. lift-fma.f6430.3%

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

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

                      if 4.9999999999999996e-78 < x

                      1. Initial program 77.5%

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

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

                        \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
                      5. Applied rewrites57.0%

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

                    Alternative 12: 72.6% accurate, 1.6× speedup?

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

                      1. Initial program 77.5%

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

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

                        \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
                      5. Applied rewrites57.0%

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

                      if -1.6999999999999999e-61 < x < 4.9999999999999996e-78

                      1. Initial program 77.5%

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \frac{F \cdot {\left(2 + {F}^{2}\right)}^{\frac{-1}{2}}}{\sin B} \]
                        10. lower-sin.f6430.3%

                          \[\leadsto \frac{F \cdot {\left(2 + {F}^{2}\right)}^{-0.5}}{\sin B} \]
                      6. Applied rewrites30.3%

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

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

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

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

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

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

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

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

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

                          \[\leadsto \frac{1}{\sin B} \cdot \left({\left(2 + {F}^{2}\right)}^{\frac{-1}{2}} \cdot \color{blue}{F}\right) \]
                        10. lower-*.f6430.3%

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

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

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

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

                          \[\leadsto \frac{1}{\sin B} \cdot \left({\left(F \cdot F + 2\right)}^{\frac{-1}{2}} \cdot F\right) \]
                        15. lift-fma.f6430.3%

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

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

                    Alternative 13: 72.6% accurate, 1.7× speedup?

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

                      1. Initial program 77.5%

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

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

                        \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
                      5. Applied rewrites57.0%

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

                      if -1.6999999999999999e-61 < x < 4.9999999999999996e-78

                      1. Initial program 77.5%

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \frac{F \cdot {\left(2 + {F}^{2}\right)}^{\frac{-1}{2}}}{\sin B} \]
                        10. lower-sin.f6430.3%

                          \[\leadsto \frac{F \cdot {\left(2 + {F}^{2}\right)}^{-0.5}}{\sin B} \]
                      6. Applied rewrites30.3%

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

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

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

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

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

                          \[\leadsto \frac{{\left(2 + {F}^{2}\right)}^{\frac{-1}{2}}}{\sin B} \cdot \color{blue}{F} \]
                        6. lower-/.f6430.3%

                          \[\leadsto \frac{{\left(2 + {F}^{2}\right)}^{-0.5}}{\sin B} \cdot F \]
                        7. lift-+.f64N/A

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

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

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

                          \[\leadsto \frac{{\left(F \cdot F + 2\right)}^{\frac{-1}{2}}}{\sin B} \cdot F \]
                        11. lift-fma.f6430.3%

                          \[\leadsto \frac{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-0.5}}{\sin B} \cdot F \]
                      8. Applied rewrites30.3%

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

                    Alternative 14: 71.2% accurate, 1.9× speedup?

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

                      1. Initial program 77.5%

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

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

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

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

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

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

                      if 1.4e-11 < B

                      1. Initial program 77.5%

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

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

                        \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
                      5. Applied rewrites57.0%

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

                    Alternative 15: 71.1% accurate, 2.2× speedup?

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

                      1. Initial program 77.5%

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

                          \[\leadsto \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. div-flipN/A

                          \[\leadsto \color{blue}{\frac{1}{\frac{\sin B}{\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)}}}} \]
                        7. lower-unsound-/.f64N/A

                          \[\leadsto \color{blue}{\frac{1}{\frac{\sin B}{\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)}}}} \]
                        8. lower-unsound-/.f64N/A

                          \[\leadsto \frac{1}{\color{blue}{\frac{\sin B}{\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)}}}} \]
                      3. Applied rewrites85.6%

                        \[\leadsto \color{blue}{\frac{1}{\frac{\sin B}{\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)}}} \]
                      4. Taylor expanded in B around 0

                        \[\leadsto \frac{1}{\frac{\sin B}{\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)}} \]
                      5. Step-by-step derivation
                        1. lower-*.f6460.0%

                          \[\leadsto \frac{1}{\frac{\sin B}{\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)}} \]
                      6. Applied rewrites60.0%

                        \[\leadsto \frac{1}{\frac{\sin B}{\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)}} \]
                      7. Taylor expanded in B around 0

                        \[\leadsto \frac{1}{\frac{\color{blue}{B}}{\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)}} \]
                      8. Step-by-step derivation
                        1. Applied rewrites44.6%

                          \[\leadsto \frac{1}{\frac{\color{blue}{B}}{\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)}} \]

                        if 1.4e-11 < B

                        1. Initial program 77.5%

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

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

                          \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
                        5. Applied rewrites57.0%

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

                      Alternative 16: 59.1% accurate, 2.2× speedup?

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

                        1. Initial program 77.5%

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

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

                          \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
                        5. Applied rewrites57.0%

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

                        if -9.9999999999999993e-246 < x < 5.20000000000000023e-227

                        1. Initial program 77.5%

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

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

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

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

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

                        if 5.20000000000000023e-227 < x < 6.80000000000000023e-78

                        1. Initial program 77.5%

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

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

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

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

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

                      Alternative 17: 44.5% accurate, 2.5× speedup?

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

                        1. Initial program 77.5%

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

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

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

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

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

                        if -1.75e22 < F < 3.0999999999999999e-43

                        1. Initial program 77.5%

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

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

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

                          \[\leadsto -1 \cdot \frac{x}{\sin \color{blue}{B}} \]
                        6. Step-by-step derivation
                          1. Applied rewrites32.3%

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

                          if 3.0999999999999999e-43 < F

                          1. Initial program 77.5%

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

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

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

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

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

                        Alternative 18: 43.4% accurate, 2.6× speedup?

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

                          1. Initial program 77.5%

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

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

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

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

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

                          if -1.75e22 < F < 3.0999999999999999e-43

                          1. Initial program 77.5%

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

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

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

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

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

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

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

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

                              \[\leadsto -\frac{x}{B} \]
                          9. Applied rewrites30.0%

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

                          if 3.0999999999999999e-43 < F

                          1. Initial program 77.5%

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

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

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

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

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

                        Alternative 19: 36.6% accurate, 2.6× speedup?

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

                          1. Initial program 77.5%

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

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

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

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

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

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

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

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

                              \[\leadsto -\frac{x}{B} \]
                          9. Applied rewrites30.0%

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

                          if -3.89999999999999985e-81 < x < 3.8000000000000002e-15

                          1. Initial program 77.5%

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

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

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

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

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

                        Alternative 20: 32.1% accurate, 3.2× speedup?

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

                          1. Initial program 77.5%

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

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

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

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

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

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

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

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

                              \[\leadsto -\frac{x}{B} \]
                          9. Applied rewrites30.0%

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

                          if -1.10000000000000008e-142 < x < 1.39999999999999999e-75

                          1. Initial program 77.5%

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

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

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

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

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

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

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

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

                              \[\leadsto \frac{-1}{B \cdot \left(1 + \frac{-1}{6} \cdot {B}^{\color{blue}{2}}\right)} \]
                            4. lower-pow.f6410.6%

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

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

                        Alternative 21: 31.9% accurate, 8.9× speedup?

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

                          1. Initial program 77.5%

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

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

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

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

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

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

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

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

                              \[\leadsto -\frac{x}{B} \]
                          9. Applied rewrites30.0%

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

                          if -3.5999999999999999e-81 < x < 6.80000000000000023e-78

                          1. Initial program 77.5%

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

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

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

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

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

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

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

                          Alternative 22: 10.7% accurate, 26.5× speedup?

                          \[\frac{-1}{B} \]
                          (FPCore (F B x) :precision binary64 (/ -1.0 B))
                          double code(double F, double B, double x) {
                          	return -1.0 / B;
                          }
                          
                          module fmin_fmax_functions
                              implicit none
                              private
                              public fmax
                              public fmin
                          
                              interface fmax
                                  module procedure fmax88
                                  module procedure fmax44
                                  module procedure fmax84
                                  module procedure fmax48
                              end interface
                              interface fmin
                                  module procedure fmin88
                                  module procedure fmin44
                                  module procedure fmin84
                                  module procedure fmin48
                              end interface
                          contains
                              real(8) function fmax88(x, y) result (res)
                                  real(8), intent (in) :: x
                                  real(8), intent (in) :: y
                                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                              end function
                              real(4) function fmax44(x, y) result (res)
                                  real(4), intent (in) :: x
                                  real(4), intent (in) :: y
                                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                              end function
                              real(8) function fmax84(x, y) result(res)
                                  real(8), intent (in) :: x
                                  real(4), intent (in) :: y
                                  res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                              end function
                              real(8) function fmax48(x, y) result(res)
                                  real(4), intent (in) :: x
                                  real(8), intent (in) :: y
                                  res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                              end function
                              real(8) function fmin88(x, y) result (res)
                                  real(8), intent (in) :: x
                                  real(8), intent (in) :: y
                                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                              end function
                              real(4) function fmin44(x, y) result (res)
                                  real(4), intent (in) :: x
                                  real(4), intent (in) :: y
                                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                              end function
                              real(8) function fmin84(x, y) result(res)
                                  real(8), intent (in) :: x
                                  real(4), intent (in) :: y
                                  res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                              end function
                              real(8) function fmin48(x, y) result(res)
                                  real(4), intent (in) :: x
                                  real(8), intent (in) :: y
                                  res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                              end function
                          end module
                          
                          real(8) function code(f, b, x)
                          use fmin_fmax_functions
                              real(8), intent (in) :: f
                              real(8), intent (in) :: b
                              real(8), intent (in) :: x
                              code = (-1.0d0) / b
                          end function
                          
                          public static double code(double F, double B, double x) {
                          	return -1.0 / B;
                          }
                          
                          def code(F, B, x):
                          	return -1.0 / B
                          
                          function code(F, B, x)
                          	return Float64(-1.0 / B)
                          end
                          
                          function tmp = code(F, B, x)
                          	tmp = -1.0 / B;
                          end
                          
                          code[F_, B_, x_] := N[(-1.0 / B), $MachinePrecision]
                          
                          \frac{-1}{B}
                          
                          Derivation
                          1. Initial program 77.5%

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

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

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

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

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

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

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

                            Reproduce

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