VandenBroeck and Keller, Equation (23)

Percentage Accurate: 76.3% → 99.6%
Time: 7.9s
Alternatives: 26
Speedup: 1.4×

Specification

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

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

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

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 26 alternatives:

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

Initial Program: 76.3% accurate, 1.0× speedup?

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

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

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

Alternative 1: 99.6% accurate, 0.9× speedup?

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

\mathbf{elif}\;F \leq 3.9 \cdot 10^{+142}:\\
\;\;\;\;\mathsf{fma}\left(F, \frac{\frac{1}{\sin B}}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}, \frac{-x}{\tan B}\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{1 - \cos B \cdot x}{t\_0} \cdot F\\


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

    1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.0000000000000002e151 < F < 3.9e142

    1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.9e142 < F

    1. Initial program 76.3%

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

      \[\leadsto \color{blue}{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.64N/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.64N/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.6447.0%

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

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

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

        \[\leadsto \mathsf{fma}\left(-1, \frac{x \cdot \cos B}{F \cdot \sin B}, \frac{1}{F \cdot \sin B}\right) \cdot \color{blue}{F} \]
      3. lower-*.f6447.0%

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

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

Alternative 2: 99.6% accurate, 1.1× speedup?

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

\mathbf{elif}\;F \leq 3.9 \cdot 10^{+142}:\\
\;\;\;\;\mathsf{fma}\left(F, \frac{\frac{1}{\sin B}}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}}, \frac{-x}{\tan B}\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{1 - \cos B \cdot x}{t\_0} \cdot F\\


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

    1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4e153 < F < 3.9e142

    1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.9e142 < F

    1. Initial program 76.3%

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

      \[\leadsto \color{blue}{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.64N/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.64N/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.6447.0%

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

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

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

        \[\leadsto \mathsf{fma}\left(-1, \frac{x \cdot \cos B}{F \cdot \sin B}, \frac{1}{F \cdot \sin B}\right) \cdot \color{blue}{F} \]
      3. lower-*.f6447.0%

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

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

Alternative 3: 99.6% accurate, 1.2× speedup?

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

\mathbf{elif}\;F \leq 3.9 \cdot 10^{+142}:\\
\;\;\;\;\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - t\_1\\

\mathbf{else}:\\
\;\;\;\;\frac{1 - \cos B \cdot x}{t\_0} \cdot F\\


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

    1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.49999999999999979e28 < F < 3.9e142

    1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.9e142 < F

    1. Initial program 76.3%

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

      \[\leadsto \color{blue}{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.64N/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.64N/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.6447.0%

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

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

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

        \[\leadsto \mathsf{fma}\left(-1, \frac{x \cdot \cos B}{F \cdot \sin B}, \frac{1}{F \cdot \sin B}\right) \cdot \color{blue}{F} \]
      3. lower-*.f6447.0%

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

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

Alternative 4: 92.3% accurate, 1.3× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;\frac{1 - \cos B \cdot x}{t\_0} \cdot F\\


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

    1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -37 < F < -2.6000000000000001e-101

    1. Initial program 76.3%

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

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

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

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

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

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

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

    if -2.6000000000000001e-101 < F < 1.7e5

    1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

      if 1.7e5 < F

      1. Initial program 76.3%

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

        \[\leadsto \color{blue}{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.64N/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.64N/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.6447.0%

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

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

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

          \[\leadsto \mathsf{fma}\left(-1, \frac{x \cdot \cos B}{F \cdot \sin B}, \frac{1}{F \cdot \sin B}\right) \cdot \color{blue}{F} \]
        3. lower-*.f6447.0%

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

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

    Alternative 5: 86.3% accurate, 1.3× speedup?

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

      1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{\frac{-1}{F \cdot \sin B} \cdot F} + -1 \cdot \frac{x}{B} \]
        3. lower-fma.f6435.8%

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

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

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

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

          \[\leadsto \mathsf{fma}\left(\frac{-1}{\sin B \cdot \color{blue}{F}}, F, \mathsf{Rewrite=>}\left(lift-*.f64, \left(-1 \cdot \frac{x}{B}\right)\right)\right) \]
        8. lower-*.f64N/A

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

          \[\leadsto \mathsf{fma}\left(\frac{-1}{\sin B \cdot \color{blue}{F}}, F, \mathsf{neg}\left(\mathsf{Rewrite=>}\left(lift-/.f64, \left(\frac{x}{B}\right)\right)\right)\right) \]
        10. lower-*.f64N/A

          \[\leadsto \mathsf{fma}\left(\frac{-1}{\sin B \cdot \color{blue}{F}}, F, \mathsf{Rewrite=>}\left(distribute-neg-frac, \left(\frac{\mathsf{neg}\left(x\right)}{B}\right)\right)\right) \]
        11. lower-*.f64N/A

          \[\leadsto \mathsf{fma}\left(\frac{-1}{\sin B \cdot \color{blue}{F}}, F, \frac{\mathsf{Rewrite<=}\left(lift-neg.f64, \left(-x\right)\right)}{B}\right) \]
        12. lower-*.f64N/A

          \[\leadsto \mathsf{fma}\left(\frac{-1}{\sin B \cdot \color{blue}{F}}, F, \mathsf{Rewrite=>}\left(lower-/.f64, \left(\frac{-x}{B}\right)\right)\right) \]
      11. Applied rewrites35.8%

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

      if -4e153 < F < -2.6000000000000001e-101

      1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -2.6000000000000001e-101 < F < 1.7e5

      1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

        if 1.7e5 < F

        1. Initial program 76.3%

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

          \[\leadsto \color{blue}{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.64N/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.64N/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.6447.0%

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

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

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

            \[\leadsto \mathsf{fma}\left(-1, \frac{x \cdot \cos B}{F \cdot \sin B}, \frac{1}{F \cdot \sin B}\right) \cdot \color{blue}{F} \]
          3. lower-*.f6447.0%

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

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

      Alternative 6: 80.1% accurate, 1.4× speedup?

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

        1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{\frac{-1}{F \cdot \sin B} \cdot F} + -1 \cdot \frac{x}{B} \]
          3. lower-fma.f6435.8%

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

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

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

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

            \[\leadsto \mathsf{fma}\left(\frac{-1}{\sin B \cdot \color{blue}{F}}, F, \mathsf{Rewrite=>}\left(lift-*.f64, \left(-1 \cdot \frac{x}{B}\right)\right)\right) \]
          8. lower-*.f64N/A

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

            \[\leadsto \mathsf{fma}\left(\frac{-1}{\sin B \cdot \color{blue}{F}}, F, \mathsf{neg}\left(\mathsf{Rewrite=>}\left(lift-/.f64, \left(\frac{x}{B}\right)\right)\right)\right) \]
          10. lower-*.f64N/A

            \[\leadsto \mathsf{fma}\left(\frac{-1}{\sin B \cdot \color{blue}{F}}, F, \mathsf{Rewrite=>}\left(distribute-neg-frac, \left(\frac{\mathsf{neg}\left(x\right)}{B}\right)\right)\right) \]
          11. lower-*.f64N/A

            \[\leadsto \mathsf{fma}\left(\frac{-1}{\sin B \cdot \color{blue}{F}}, F, \frac{\mathsf{Rewrite<=}\left(lift-neg.f64, \left(-x\right)\right)}{B}\right) \]
          12. lower-*.f64N/A

            \[\leadsto \mathsf{fma}\left(\frac{-1}{\sin B \cdot \color{blue}{F}}, F, \mathsf{Rewrite=>}\left(lower-/.f64, \left(\frac{-x}{B}\right)\right)\right) \]
        11. Applied rewrites35.8%

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

        if -4e153 < F < -2.6000000000000001e-101

        1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -2.6000000000000001e-101 < F < 4e9

        1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

          if 4e9 < F

          1. Initial program 76.3%

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

            \[\leadsto \color{blue}{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.64N/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.64N/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.6447.0%

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

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

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

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

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

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

        Alternative 7: 80.1% accurate, 1.4× speedup?

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

          1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \color{blue}{\frac{-1}{F \cdot \sin B} \cdot F} + -1 \cdot \frac{x}{B} \]
            3. lower-fma.f6435.8%

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

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

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

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

              \[\leadsto \mathsf{fma}\left(\frac{-1}{\sin B \cdot \color{blue}{F}}, F, \mathsf{Rewrite=>}\left(lift-*.f64, \left(-1 \cdot \frac{x}{B}\right)\right)\right) \]
            8. lower-*.f64N/A

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

              \[\leadsto \mathsf{fma}\left(\frac{-1}{\sin B \cdot \color{blue}{F}}, F, \mathsf{neg}\left(\mathsf{Rewrite=>}\left(lift-/.f64, \left(\frac{x}{B}\right)\right)\right)\right) \]
            10. lower-*.f64N/A

              \[\leadsto \mathsf{fma}\left(\frac{-1}{\sin B \cdot \color{blue}{F}}, F, \mathsf{Rewrite=>}\left(distribute-neg-frac, \left(\frac{\mathsf{neg}\left(x\right)}{B}\right)\right)\right) \]
            11. lower-*.f64N/A

              \[\leadsto \mathsf{fma}\left(\frac{-1}{\sin B \cdot \color{blue}{F}}, F, \frac{\mathsf{Rewrite<=}\left(lift-neg.f64, \left(-x\right)\right)}{B}\right) \]
            12. lower-*.f64N/A

              \[\leadsto \mathsf{fma}\left(\frac{-1}{\sin B \cdot \color{blue}{F}}, F, \mathsf{Rewrite=>}\left(lower-/.f64, \left(\frac{-x}{B}\right)\right)\right) \]
          11. Applied rewrites35.8%

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

          if -1.5e19 < F < -2.6000000000000001e-101

          1. Initial program 76.3%

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

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

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

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

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

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

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

          if -2.6000000000000001e-101 < F < 4e9

          1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

            if 4e9 < F

            1. Initial program 76.3%

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

              \[\leadsto \color{blue}{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.64N/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.64N/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.6447.0%

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

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

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

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

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

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

          Alternative 8: 75.4% accurate, 1.4× speedup?

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

            1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if -4.7000000000000002e51 < x < 4.4999999999999998e-15

            1. Initial program 76.3%

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

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

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

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

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

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

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

            if 4.4999999999999998e-15 < x

            1. Initial program 76.3%

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

              \[\leadsto \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.64N/A

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

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

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

          Alternative 9: 74.0% accurate, 1.5× speedup?

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

            1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if -4.7000000000000002e51 < x < 7.0000000000000003e-17

            1. Initial program 76.3%

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

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

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

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

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

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

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

          Alternative 10: 74.0% accurate, 1.6× speedup?

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

            1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if -4.7000000000000002e51 < x < 7.0000000000000003e-17

            1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 11: 74.0% accurate, 1.7× speedup?

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

            1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if -4.7000000000000002e51 < x < 7.0000000000000003e-17

            1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 12: 74.0% accurate, 1.8× speedup?

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

            1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if -4.7000000000000002e51 < x < 7.0000000000000003e-17

            1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 13: 67.0% accurate, 1.8× speedup?

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

            1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(F, \frac{\frac{1}{\mathsf{neg}\left(F\right)}}{\sin B}, -1 \cdot \frac{x}{B}\right) \]
              6. distribute-neg-frac2N/A

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

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

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

                \[\leadsto \mathsf{fma}\left(F, \frac{\mathsf{neg}\left(\frac{1}{F}\right)}{\sin B}, -1 \cdot \frac{x}{B}\right) \]
              10. distribute-neg-fracN/A

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

                \[\leadsto \mathsf{fma}\left(F, \frac{\frac{-1}{F}}{\sin B}, -1 \cdot \frac{x}{B}\right) \]
              12. lift-/.f6435.8%

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

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

            if -2.3e14 < F < -1.04999999999999996e-190

            1. Initial program 76.3%

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

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

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

            if -1.04999999999999996e-190 < F < 3.99999999999999976e-11

            1. Initial program 76.3%

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

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

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

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

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

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

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

              \[\leadsto \color{blue}{\frac{-1}{F}} \cdot \frac{F}{\sin B} - \frac{x}{\tan B} \]
            5. Step-by-step derivation
              1. lower-/.f6448.0%

                \[\leadsto \frac{-1}{\color{blue}{F}} \cdot \frac{F}{\sin B} - \frac{x}{\tan B} \]
            6. Applied rewrites48.0%

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

              \[\leadsto \frac{-1}{F} \cdot \frac{F}{\color{blue}{B}} - \frac{x}{\tan B} \]
            8. Step-by-step derivation
              1. Applied rewrites46.4%

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

              if 3.99999999999999976e-11 < F

              1. Initial program 76.3%

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

                \[\leadsto \color{blue}{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.64N/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.64N/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.6447.0%

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

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

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

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

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

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

            Alternative 14: 65.9% accurate, 1.8× speedup?

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

              1. Initial program 76.3%

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

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

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

              if 8.0000000000000006e-18 < B

              1. Initial program 76.3%

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

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

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

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

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

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

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

                \[\leadsto \color{blue}{\frac{-1}{F}} \cdot \frac{F}{\sin B} - \frac{x}{\tan B} \]
              5. Step-by-step derivation
                1. lower-/.f6448.0%

                  \[\leadsto \frac{-1}{\color{blue}{F}} \cdot \frac{F}{\sin B} - \frac{x}{\tan B} \]
              6. Applied rewrites48.0%

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

                \[\leadsto \frac{-1}{F} \cdot \frac{F}{\color{blue}{B}} - \frac{x}{\tan B} \]
              8. Step-by-step derivation
                1. Applied rewrites46.4%

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

              Alternative 15: 64.7% accurate, 1.8× speedup?

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

                1. Initial program 76.3%

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

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

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

                if 4.69999999999999992e-24 < B

                1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              Alternative 16: 58.8% accurate, 2.1× speedup?

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

                1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \mathsf{fma}\left(F, \frac{\frac{1}{\mathsf{neg}\left(F\right)}}{\sin B}, -1 \cdot \frac{x}{B}\right) \]
                  6. distribute-neg-frac2N/A

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

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

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

                    \[\leadsto \mathsf{fma}\left(F, \frac{\mathsf{neg}\left(\frac{1}{F}\right)}{\sin B}, -1 \cdot \frac{x}{B}\right) \]
                  10. distribute-neg-fracN/A

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

                    \[\leadsto \mathsf{fma}\left(F, \frac{\frac{-1}{F}}{\sin B}, -1 \cdot \frac{x}{B}\right) \]
                  12. lift-/.f6435.8%

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

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

                if -2.3e14 < F < 2.2000000000000001e25

                1. Initial program 76.3%

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

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

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

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

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

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

                  if 2.2000000000000001e25 < F

                  1. Initial program 76.3%

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

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

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

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

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

                Alternative 17: 58.8% accurate, 2.2× speedup?

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

                  1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \color{blue}{\frac{-1}{F \cdot \sin B} \cdot F} + -1 \cdot \frac{x}{B} \]
                    3. lower-fma.f6435.8%

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

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

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

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

                      \[\leadsto \mathsf{fma}\left(\frac{-1}{\sin B \cdot \color{blue}{F}}, F, \mathsf{Rewrite=>}\left(lift-*.f64, \left(-1 \cdot \frac{x}{B}\right)\right)\right) \]
                    8. lower-*.f64N/A

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

                      \[\leadsto \mathsf{fma}\left(\frac{-1}{\sin B \cdot \color{blue}{F}}, F, \mathsf{neg}\left(\mathsf{Rewrite=>}\left(lift-/.f64, \left(\frac{x}{B}\right)\right)\right)\right) \]
                    10. lower-*.f64N/A

                      \[\leadsto \mathsf{fma}\left(\frac{-1}{\sin B \cdot \color{blue}{F}}, F, \mathsf{Rewrite=>}\left(distribute-neg-frac, \left(\frac{\mathsf{neg}\left(x\right)}{B}\right)\right)\right) \]
                    11. lower-*.f64N/A

                      \[\leadsto \mathsf{fma}\left(\frac{-1}{\sin B \cdot \color{blue}{F}}, F, \frac{\mathsf{Rewrite<=}\left(lift-neg.f64, \left(-x\right)\right)}{B}\right) \]
                    12. lower-*.f64N/A

                      \[\leadsto \mathsf{fma}\left(\frac{-1}{\sin B \cdot \color{blue}{F}}, F, \mathsf{Rewrite=>}\left(lower-/.f64, \left(\frac{-x}{B}\right)\right)\right) \]
                  11. Applied rewrites35.8%

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

                  if -2.3e14 < F < 2.2000000000000001e25

                  1. Initial program 76.3%

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

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

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

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

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

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

                    if 2.2000000000000001e25 < F

                    1. Initial program 76.3%

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

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

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

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

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

                  Alternative 18: 52.8% accurate, 2.2× speedup?

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

                    1. Initial program 76.3%

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

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

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

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

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

                    if -2.75e14 < F < 2.2000000000000001e25

                    1. Initial program 76.3%

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

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

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

                      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                    5. Taylor expanded in B around 0

                      \[\leadsto \left(-\frac{x}{B}\right) + \frac{F}{\color{blue}{B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                    6. Step-by-step derivation
                      1. Applied rewrites35.5%

                        \[\leadsto \left(-\frac{x}{B}\right) + \frac{F}{\color{blue}{B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]

                      if 2.2000000000000001e25 < F

                      1. Initial program 76.3%

                        \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                      2. Taylor expanded in F around inf

                        \[\leadsto \color{blue}{\frac{1}{\sin B}} \]
                      3. Step-by-step derivation
                        1. lower-/.f64N/A

                          \[\leadsto \frac{1}{\color{blue}{\sin B}} \]
                        2. lower-sin.6417.2%

                          \[\leadsto \frac{1}{\sin B} \]
                      4. Applied rewrites17.2%

                        \[\leadsto \color{blue}{\frac{1}{\sin B}} \]
                    7. Recombined 3 regimes into one program.
                    8. Add Preprocessing

                    Alternative 19: 52.8% accurate, 2.5× speedup?

                    \[\begin{array}{l} \mathbf{if}\;F \leq -2.75 \cdot 10^{+14}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 1.5 \cdot 10^{+26}:\\ \;\;\;\;\mathsf{fma}\left(F, \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{B}, -\frac{x}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
                    (FPCore (F B x)
                     :precision binary64
                     (if (<= F -2.75e+14)
                       (/ -1.0 (sin B))
                       (if (<= F 1.5e+26)
                         (fma F (/ (pow (fma x 2.0 (fma F F 2.0)) -0.5) B) (- (/ x B)))
                         (/ 1.0 (sin B)))))
                    double code(double F, double B, double x) {
                    	double tmp;
                    	if (F <= -2.75e+14) {
                    		tmp = -1.0 / sin(B);
                    	} else if (F <= 1.5e+26) {
                    		tmp = fma(F, (pow(fma(x, 2.0, fma(F, F, 2.0)), -0.5) / B), -(x / B));
                    	} else {
                    		tmp = 1.0 / sin(B);
                    	}
                    	return tmp;
                    }
                    
                    function code(F, B, x)
                    	tmp = 0.0
                    	if (F <= -2.75e+14)
                    		tmp = Float64(-1.0 / sin(B));
                    	elseif (F <= 1.5e+26)
                    		tmp = fma(F, Float64((fma(x, 2.0, fma(F, F, 2.0)) ^ -0.5) / B), Float64(-Float64(x / B)));
                    	else
                    		tmp = Float64(1.0 / sin(B));
                    	end
                    	return tmp
                    end
                    
                    code[F_, B_, x_] := If[LessEqual[F, -2.75e+14], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.5e+26], N[(F * N[(N[Power[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] / B), $MachinePrecision] + (-N[(x / B), $MachinePrecision])), $MachinePrecision], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]
                    
                    \begin{array}{l}
                    \mathbf{if}\;F \leq -2.75 \cdot 10^{+14}:\\
                    \;\;\;\;\frac{-1}{\sin B}\\
                    
                    \mathbf{elif}\;F \leq 1.5 \cdot 10^{+26}:\\
                    \;\;\;\;\mathsf{fma}\left(F, \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{B}, -\frac{x}{B}\right)\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\frac{1}{\sin B}\\
                    
                    
                    \end{array}
                    
                    Derivation
                    1. Split input into 3 regimes
                    2. if F < -2.75e14

                      1. Initial program 76.3%

                        \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                      2. Taylor expanded in F around -inf

                        \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                      3. Step-by-step derivation
                        1. lower-/.f64N/A

                          \[\leadsto \frac{-1}{\color{blue}{\sin B}} \]
                        2. lower-sin.6418.0%

                          \[\leadsto \frac{-1}{\sin B} \]
                      4. Applied rewrites18.0%

                        \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]

                      if -2.75e14 < F < 1.49999999999999999e26

                      1. Initial program 76.3%

                        \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                      2. 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.7%

                          \[\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.7%

                        \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                      5. Step-by-step derivation
                        1. lift-+.f64N/A

                          \[\leadsto \color{blue}{\left(-\frac{x}{B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
                        2. +-commutativeN/A

                          \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-\frac{x}{B}\right)} \]
                      6. Applied rewrites57.6%

                        \[\leadsto \color{blue}{\mathsf{fma}\left(F, \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B}, -\frac{x}{B}\right)} \]
                      7. Taylor expanded in B around 0

                        \[\leadsto \mathsf{fma}\left(F, \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\color{blue}{B}}, -\frac{x}{B}\right) \]
                      8. Step-by-step derivation
                        1. Applied rewrites43.3%

                          \[\leadsto \mathsf{fma}\left(F, \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\color{blue}{B}}, -\frac{x}{B}\right) \]

                        if 1.49999999999999999e26 < F

                        1. Initial program 76.3%

                          \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                        2. Taylor expanded in F around inf

                          \[\leadsto \color{blue}{\frac{1}{\sin B}} \]
                        3. Step-by-step derivation
                          1. lower-/.f64N/A

                            \[\leadsto \frac{1}{\color{blue}{\sin B}} \]
                          2. lower-sin.6417.2%

                            \[\leadsto \frac{1}{\sin B} \]
                        4. Applied rewrites17.2%

                          \[\leadsto \color{blue}{\frac{1}{\sin B}} \]
                      9. Recombined 3 regimes into one program.
                      10. Add Preprocessing

                      Alternative 20: 43.9% accurate, 2.6× speedup?

                      \[\begin{array}{l} \mathbf{if}\;F \leq -1.56 \cdot 10^{-78}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 2.3 \cdot 10^{-12}:\\ \;\;\;\;\frac{F \cdot \left(-1 \cdot \frac{x}{F}\right)}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
                      (FPCore (F B x)
                       :precision binary64
                       (if (<= F -1.56e-78)
                         (/ -1.0 (sin B))
                         (if (<= F 2.3e-12) (/ (* F (* -1.0 (/ x F))) B) (/ 1.0 (sin B)))))
                      double code(double F, double B, double x) {
                      	double tmp;
                      	if (F <= -1.56e-78) {
                      		tmp = -1.0 / sin(B);
                      	} else if (F <= 2.3e-12) {
                      		tmp = (F * (-1.0 * (x / F))) / 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.56d-78)) then
                              tmp = (-1.0d0) / sin(b)
                          else if (f <= 2.3d-12) then
                              tmp = (f * ((-1.0d0) * (x / f))) / 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.56e-78) {
                      		tmp = -1.0 / Math.sin(B);
                      	} else if (F <= 2.3e-12) {
                      		tmp = (F * (-1.0 * (x / F))) / B;
                      	} else {
                      		tmp = 1.0 / Math.sin(B);
                      	}
                      	return tmp;
                      }
                      
                      def code(F, B, x):
                      	tmp = 0
                      	if F <= -1.56e-78:
                      		tmp = -1.0 / math.sin(B)
                      	elif F <= 2.3e-12:
                      		tmp = (F * (-1.0 * (x / F))) / B
                      	else:
                      		tmp = 1.0 / math.sin(B)
                      	return tmp
                      
                      function code(F, B, x)
                      	tmp = 0.0
                      	if (F <= -1.56e-78)
                      		tmp = Float64(-1.0 / sin(B));
                      	elseif (F <= 2.3e-12)
                      		tmp = Float64(Float64(F * Float64(-1.0 * Float64(x / F))) / 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.56e-78)
                      		tmp = -1.0 / sin(B);
                      	elseif (F <= 2.3e-12)
                      		tmp = (F * (-1.0 * (x / F))) / B;
                      	else
                      		tmp = 1.0 / sin(B);
                      	end
                      	tmp_2 = tmp;
                      end
                      
                      code[F_, B_, x_] := If[LessEqual[F, -1.56e-78], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.3e-12], N[(N[(F * N[(-1.0 * N[(x / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]
                      
                      \begin{array}{l}
                      \mathbf{if}\;F \leq -1.56 \cdot 10^{-78}:\\
                      \;\;\;\;\frac{-1}{\sin B}\\
                      
                      \mathbf{elif}\;F \leq 2.3 \cdot 10^{-12}:\\
                      \;\;\;\;\frac{F \cdot \left(-1 \cdot \frac{x}{F}\right)}{B}\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;\frac{1}{\sin B}\\
                      
                      
                      \end{array}
                      
                      Derivation
                      1. Split input into 3 regimes
                      2. if F < -1.56000000000000002e-78

                        1. Initial program 76.3%

                          \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                        2. Taylor expanded in F around -inf

                          \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                        3. Step-by-step derivation
                          1. lower-/.f64N/A

                            \[\leadsto \frac{-1}{\color{blue}{\sin B}} \]
                          2. lower-sin.6418.0%

                            \[\leadsto \frac{-1}{\sin B} \]
                        4. Applied rewrites18.0%

                          \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]

                        if -1.56000000000000002e-78 < F < 2.29999999999999989e-12

                        1. Initial program 76.3%

                          \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                        2. Taylor expanded in F around inf

                          \[\leadsto \color{blue}{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.64N/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.64N/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.6447.0%

                            \[\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.0%

                          \[\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)} \]
                        5. Taylor expanded in B around 0

                          \[\leadsto \frac{F \cdot \left(-1 \cdot \frac{x}{F} + \frac{1}{F}\right)}{\color{blue}{B}} \]
                        6. Step-by-step derivation
                          1. lower-/.f64N/A

                            \[\leadsto \frac{F \cdot \left(-1 \cdot \frac{x}{F} + \frac{1}{F}\right)}{B} \]
                          2. lower-*.f64N/A

                            \[\leadsto \frac{F \cdot \left(-1 \cdot \frac{x}{F} + \frac{1}{F}\right)}{B} \]
                          3. lower-fma.f64N/A

                            \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B} \]
                          4. lower-/.f64N/A

                            \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B} \]
                          5. lower-/.f6428.4%

                            \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B} \]
                        7. Applied rewrites28.4%

                          \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{\color{blue}{B}} \]
                        8. Taylor expanded in x around inf

                          \[\leadsto \frac{F \cdot \left(-1 \cdot \frac{x}{F}\right)}{B} \]
                        9. Step-by-step derivation
                          1. lower-*.f64N/A

                            \[\leadsto \frac{F \cdot \left(-1 \cdot \frac{x}{F}\right)}{B} \]
                          2. lower-/.f6427.7%

                            \[\leadsto \frac{F \cdot \left(-1 \cdot \frac{x}{F}\right)}{B} \]
                        10. Applied rewrites27.7%

                          \[\leadsto \frac{F \cdot \left(-1 \cdot \frac{x}{F}\right)}{B} \]

                        if 2.29999999999999989e-12 < F

                        1. Initial program 76.3%

                          \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                        2. Taylor expanded in F around inf

                          \[\leadsto \color{blue}{\frac{1}{\sin B}} \]
                        3. Step-by-step derivation
                          1. lower-/.f64N/A

                            \[\leadsto \frac{1}{\color{blue}{\sin B}} \]
                          2. lower-sin.6417.2%

                            \[\leadsto \frac{1}{\sin B} \]
                        4. Applied rewrites17.2%

                          \[\leadsto \color{blue}{\frac{1}{\sin B}} \]
                      3. Recombined 3 regimes into one program.
                      4. Add Preprocessing

                      Alternative 21: 42.8% accurate, 2.9× speedup?

                      \[\begin{array}{l} \mathbf{if}\;F \leq -1.56 \cdot 10^{-78}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 2.35 \cdot 10^{-79}:\\ \;\;\;\;\frac{F \cdot \left(-1 \cdot \frac{x}{F}\right)}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{-1 \cdot \left(x - 1\right)}{B}\\ \end{array} \]
                      (FPCore (F B x)
                       :precision binary64
                       (if (<= F -1.56e-78)
                         (/ -1.0 (sin B))
                         (if (<= F 2.35e-79) (/ (* F (* -1.0 (/ x F))) B) (/ (* -1.0 (- x 1.0)) B))))
                      double code(double F, double B, double x) {
                      	double tmp;
                      	if (F <= -1.56e-78) {
                      		tmp = -1.0 / sin(B);
                      	} else if (F <= 2.35e-79) {
                      		tmp = (F * (-1.0 * (x / F))) / B;
                      	} else {
                      		tmp = (-1.0 * (x - 1.0)) / 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.56d-78)) then
                              tmp = (-1.0d0) / sin(b)
                          else if (f <= 2.35d-79) then
                              tmp = (f * ((-1.0d0) * (x / f))) / b
                          else
                              tmp = ((-1.0d0) * (x - 1.0d0)) / b
                          end if
                          code = tmp
                      end function
                      
                      public static double code(double F, double B, double x) {
                      	double tmp;
                      	if (F <= -1.56e-78) {
                      		tmp = -1.0 / Math.sin(B);
                      	} else if (F <= 2.35e-79) {
                      		tmp = (F * (-1.0 * (x / F))) / B;
                      	} else {
                      		tmp = (-1.0 * (x - 1.0)) / B;
                      	}
                      	return tmp;
                      }
                      
                      def code(F, B, x):
                      	tmp = 0
                      	if F <= -1.56e-78:
                      		tmp = -1.0 / math.sin(B)
                      	elif F <= 2.35e-79:
                      		tmp = (F * (-1.0 * (x / F))) / B
                      	else:
                      		tmp = (-1.0 * (x - 1.0)) / B
                      	return tmp
                      
                      function code(F, B, x)
                      	tmp = 0.0
                      	if (F <= -1.56e-78)
                      		tmp = Float64(-1.0 / sin(B));
                      	elseif (F <= 2.35e-79)
                      		tmp = Float64(Float64(F * Float64(-1.0 * Float64(x / F))) / B);
                      	else
                      		tmp = Float64(Float64(-1.0 * Float64(x - 1.0)) / B);
                      	end
                      	return tmp
                      end
                      
                      function tmp_2 = code(F, B, x)
                      	tmp = 0.0;
                      	if (F <= -1.56e-78)
                      		tmp = -1.0 / sin(B);
                      	elseif (F <= 2.35e-79)
                      		tmp = (F * (-1.0 * (x / F))) / B;
                      	else
                      		tmp = (-1.0 * (x - 1.0)) / B;
                      	end
                      	tmp_2 = tmp;
                      end
                      
                      code[F_, B_, x_] := If[LessEqual[F, -1.56e-78], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.35e-79], N[(N[(F * N[(-1.0 * N[(x / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], N[(N[(-1.0 * N[(x - 1.0), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]]]
                      
                      \begin{array}{l}
                      \mathbf{if}\;F \leq -1.56 \cdot 10^{-78}:\\
                      \;\;\;\;\frac{-1}{\sin B}\\
                      
                      \mathbf{elif}\;F \leq 2.35 \cdot 10^{-79}:\\
                      \;\;\;\;\frac{F \cdot \left(-1 \cdot \frac{x}{F}\right)}{B}\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;\frac{-1 \cdot \left(x - 1\right)}{B}\\
                      
                      
                      \end{array}
                      
                      Derivation
                      1. Split input into 3 regimes
                      2. if F < -1.56000000000000002e-78

                        1. Initial program 76.3%

                          \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                        2. Taylor expanded in F around -inf

                          \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                        3. Step-by-step derivation
                          1. lower-/.f64N/A

                            \[\leadsto \frac{-1}{\color{blue}{\sin B}} \]
                          2. lower-sin.6418.0%

                            \[\leadsto \frac{-1}{\sin B} \]
                        4. Applied rewrites18.0%

                          \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]

                        if -1.56000000000000002e-78 < F < 2.3500000000000001e-79

                        1. Initial program 76.3%

                          \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                        2. Taylor expanded in F around inf

                          \[\leadsto \color{blue}{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.64N/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.64N/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.6447.0%

                            \[\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.0%

                          \[\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)} \]
                        5. Taylor expanded in B around 0

                          \[\leadsto \frac{F \cdot \left(-1 \cdot \frac{x}{F} + \frac{1}{F}\right)}{\color{blue}{B}} \]
                        6. Step-by-step derivation
                          1. lower-/.f64N/A

                            \[\leadsto \frac{F \cdot \left(-1 \cdot \frac{x}{F} + \frac{1}{F}\right)}{B} \]
                          2. lower-*.f64N/A

                            \[\leadsto \frac{F \cdot \left(-1 \cdot \frac{x}{F} + \frac{1}{F}\right)}{B} \]
                          3. lower-fma.f64N/A

                            \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B} \]
                          4. lower-/.f64N/A

                            \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B} \]
                          5. lower-/.f6428.4%

                            \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B} \]
                        7. Applied rewrites28.4%

                          \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{\color{blue}{B}} \]
                        8. Taylor expanded in x around inf

                          \[\leadsto \frac{F \cdot \left(-1 \cdot \frac{x}{F}\right)}{B} \]
                        9. Step-by-step derivation
                          1. lower-*.f64N/A

                            \[\leadsto \frac{F \cdot \left(-1 \cdot \frac{x}{F}\right)}{B} \]
                          2. lower-/.f6427.7%

                            \[\leadsto \frac{F \cdot \left(-1 \cdot \frac{x}{F}\right)}{B} \]
                        10. Applied rewrites27.7%

                          \[\leadsto \frac{F \cdot \left(-1 \cdot \frac{x}{F}\right)}{B} \]

                        if 2.3500000000000001e-79 < F

                        1. Initial program 76.3%

                          \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                        2. Taylor expanded in F around inf

                          \[\leadsto \color{blue}{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.64N/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.64N/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.6447.0%

                            \[\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.0%

                          \[\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)} \]
                        5. Taylor expanded in B around 0

                          \[\leadsto \frac{F \cdot \left(-1 \cdot \frac{x}{F} + \frac{1}{F}\right)}{\color{blue}{B}} \]
                        6. Step-by-step derivation
                          1. lower-/.f64N/A

                            \[\leadsto \frac{F \cdot \left(-1 \cdot \frac{x}{F} + \frac{1}{F}\right)}{B} \]
                          2. lower-*.f64N/A

                            \[\leadsto \frac{F \cdot \left(-1 \cdot \frac{x}{F} + \frac{1}{F}\right)}{B} \]
                          3. lower-fma.f64N/A

                            \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B} \]
                          4. lower-/.f64N/A

                            \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B} \]
                          5. lower-/.f6428.4%

                            \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B} \]
                        7. Applied rewrites28.4%

                          \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{\color{blue}{B}} \]
                        8. Taylor expanded in F around -inf

                          \[\leadsto \frac{-1 \cdot \left(x - 1\right)}{B} \]
                        9. Step-by-step derivation
                          1. lower-*.f64N/A

                            \[\leadsto \frac{-1 \cdot \left(x - 1\right)}{B} \]
                          2. lower--.f6429.6%

                            \[\leadsto \frac{-1 \cdot \left(x - 1\right)}{B} \]
                        10. Applied rewrites29.6%

                          \[\leadsto \frac{-1 \cdot \left(x - 1\right)}{B} \]
                      3. Recombined 3 regimes into one program.
                      4. Add Preprocessing

                      Alternative 22: 40.8% accurate, 5.2× speedup?

                      \[\begin{array}{l} \mathbf{if}\;F \leq -2.4 \cdot 10^{-237}:\\ \;\;\;\;\mathsf{fma}\left(F, \frac{-1}{F \cdot B}, -1 \cdot \frac{x}{B}\right)\\ \mathbf{elif}\;F \leq 2.35 \cdot 10^{-79}:\\ \;\;\;\;\frac{F \cdot \left(-1 \cdot \frac{x}{F}\right)}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{-1 \cdot \left(x - 1\right)}{B}\\ \end{array} \]
                      (FPCore (F B x)
                       :precision binary64
                       (if (<= F -2.4e-237)
                         (fma F (/ -1.0 (* F B)) (* -1.0 (/ x B)))
                         (if (<= F 2.35e-79) (/ (* F (* -1.0 (/ x F))) B) (/ (* -1.0 (- x 1.0)) B))))
                      double code(double F, double B, double x) {
                      	double tmp;
                      	if (F <= -2.4e-237) {
                      		tmp = fma(F, (-1.0 / (F * B)), (-1.0 * (x / B)));
                      	} else if (F <= 2.35e-79) {
                      		tmp = (F * (-1.0 * (x / F))) / B;
                      	} else {
                      		tmp = (-1.0 * (x - 1.0)) / B;
                      	}
                      	return tmp;
                      }
                      
                      function code(F, B, x)
                      	tmp = 0.0
                      	if (F <= -2.4e-237)
                      		tmp = fma(F, Float64(-1.0 / Float64(F * B)), Float64(-1.0 * Float64(x / B)));
                      	elseif (F <= 2.35e-79)
                      		tmp = Float64(Float64(F * Float64(-1.0 * Float64(x / F))) / B);
                      	else
                      		tmp = Float64(Float64(-1.0 * Float64(x - 1.0)) / B);
                      	end
                      	return tmp
                      end
                      
                      code[F_, B_, x_] := If[LessEqual[F, -2.4e-237], N[(F * N[(-1.0 / N[(F * B), $MachinePrecision]), $MachinePrecision] + N[(-1.0 * N[(x / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.35e-79], N[(N[(F * N[(-1.0 * N[(x / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], N[(N[(-1.0 * N[(x - 1.0), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]]]
                      
                      \begin{array}{l}
                      \mathbf{if}\;F \leq -2.4 \cdot 10^{-237}:\\
                      \;\;\;\;\mathsf{fma}\left(F, \frac{-1}{F \cdot B}, -1 \cdot \frac{x}{B}\right)\\
                      
                      \mathbf{elif}\;F \leq 2.35 \cdot 10^{-79}:\\
                      \;\;\;\;\frac{F \cdot \left(-1 \cdot \frac{x}{F}\right)}{B}\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;\frac{-1 \cdot \left(x - 1\right)}{B}\\
                      
                      
                      \end{array}
                      
                      Derivation
                      1. Split input into 3 regimes
                      2. if F < -2.4e-237

                        1. Initial program 76.3%

                          \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                        2. Step-by-step derivation
                          1. lift-+.f64N/A

                            \[\leadsto \color{blue}{\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} \]
                          2. +-commutativeN/A

                            \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right)} \]
                          3. lift-*.f64N/A

                            \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                          4. lift-/.f64N/A

                            \[\leadsto \color{blue}{\frac{F}{\sin B}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                          5. mult-flipN/A

                            \[\leadsto \color{blue}{\left(F \cdot \frac{1}{\sin B}\right)} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                          6. associate-*l*N/A

                            \[\leadsto \color{blue}{F \cdot \left(\frac{1}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\right)} + \left(-x \cdot \frac{1}{\tan B}\right) \]
                          7. lower-fma.f64N/A

                            \[\leadsto \color{blue}{\mathsf{fma}\left(F, \frac{1}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}, -x \cdot \frac{1}{\tan B}\right)} \]
                        3. Applied rewrites84.3%

                          \[\leadsto \color{blue}{\mathsf{fma}\left(F, \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B}, \frac{-x}{\tan B}\right)} \]
                        4. Taylor expanded in F around -inf

                          \[\leadsto \mathsf{fma}\left(F, \color{blue}{\frac{-1}{F \cdot \sin B}}, \frac{-x}{\tan B}\right) \]
                        5. Step-by-step derivation
                          1. lower-/.f64N/A

                            \[\leadsto \mathsf{fma}\left(F, \frac{-1}{\color{blue}{F \cdot \sin B}}, \frac{-x}{\tan B}\right) \]
                          2. lower-*.f64N/A

                            \[\leadsto \mathsf{fma}\left(F, \frac{-1}{F \cdot \color{blue}{\sin B}}, \frac{-x}{\tan B}\right) \]
                          3. lower-sin.6454.6%

                            \[\leadsto \mathsf{fma}\left(F, \frac{-1}{F \cdot \sin B}, \frac{-x}{\tan B}\right) \]
                        6. Applied rewrites54.6%

                          \[\leadsto \mathsf{fma}\left(F, \color{blue}{\frac{-1}{F \cdot \sin B}}, \frac{-x}{\tan B}\right) \]
                        7. Taylor expanded in B around 0

                          \[\leadsto \mathsf{fma}\left(F, \frac{-1}{F \cdot \sin B}, \color{blue}{-1 \cdot \frac{x}{B}}\right) \]
                        8. Step-by-step derivation
                          1. lower-*.f64N/A

                            \[\leadsto \mathsf{fma}\left(F, \frac{-1}{F \cdot \sin B}, -1 \cdot \color{blue}{\frac{x}{B}}\right) \]
                          2. lower-/.f6435.8%

                            \[\leadsto \mathsf{fma}\left(F, \frac{-1}{F \cdot \sin B}, -1 \cdot \frac{x}{\color{blue}{B}}\right) \]
                        9. Applied rewrites35.8%

                          \[\leadsto \mathsf{fma}\left(F, \frac{-1}{F \cdot \sin B}, \color{blue}{-1 \cdot \frac{x}{B}}\right) \]
                        10. Taylor expanded in B around 0

                          \[\leadsto \mathsf{fma}\left(F, \frac{-1}{F \cdot B}, -1 \cdot \frac{x}{B}\right) \]
                        11. Step-by-step derivation
                          1. Applied rewrites28.6%

                            \[\leadsto \mathsf{fma}\left(F, \frac{-1}{F \cdot B}, -1 \cdot \frac{x}{B}\right) \]

                          if -2.4e-237 < F < 2.3500000000000001e-79

                          1. Initial program 76.3%

                            \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                          2. Taylor expanded in F around inf

                            \[\leadsto \color{blue}{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.64N/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.64N/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.6447.0%

                              \[\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.0%

                            \[\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)} \]
                          5. Taylor expanded in B around 0

                            \[\leadsto \frac{F \cdot \left(-1 \cdot \frac{x}{F} + \frac{1}{F}\right)}{\color{blue}{B}} \]
                          6. Step-by-step derivation
                            1. lower-/.f64N/A

                              \[\leadsto \frac{F \cdot \left(-1 \cdot \frac{x}{F} + \frac{1}{F}\right)}{B} \]
                            2. lower-*.f64N/A

                              \[\leadsto \frac{F \cdot \left(-1 \cdot \frac{x}{F} + \frac{1}{F}\right)}{B} \]
                            3. lower-fma.f64N/A

                              \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B} \]
                            4. lower-/.f64N/A

                              \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B} \]
                            5. lower-/.f6428.4%

                              \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B} \]
                          7. Applied rewrites28.4%

                            \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{\color{blue}{B}} \]
                          8. Taylor expanded in x around inf

                            \[\leadsto \frac{F \cdot \left(-1 \cdot \frac{x}{F}\right)}{B} \]
                          9. Step-by-step derivation
                            1. lower-*.f64N/A

                              \[\leadsto \frac{F \cdot \left(-1 \cdot \frac{x}{F}\right)}{B} \]
                            2. lower-/.f6427.7%

                              \[\leadsto \frac{F \cdot \left(-1 \cdot \frac{x}{F}\right)}{B} \]
                          10. Applied rewrites27.7%

                            \[\leadsto \frac{F \cdot \left(-1 \cdot \frac{x}{F}\right)}{B} \]

                          if 2.3500000000000001e-79 < F

                          1. Initial program 76.3%

                            \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                          2. Taylor expanded in F around inf

                            \[\leadsto \color{blue}{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.64N/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.64N/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.6447.0%

                              \[\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.0%

                            \[\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)} \]
                          5. Taylor expanded in B around 0

                            \[\leadsto \frac{F \cdot \left(-1 \cdot \frac{x}{F} + \frac{1}{F}\right)}{\color{blue}{B}} \]
                          6. Step-by-step derivation
                            1. lower-/.f64N/A

                              \[\leadsto \frac{F \cdot \left(-1 \cdot \frac{x}{F} + \frac{1}{F}\right)}{B} \]
                            2. lower-*.f64N/A

                              \[\leadsto \frac{F \cdot \left(-1 \cdot \frac{x}{F} + \frac{1}{F}\right)}{B} \]
                            3. lower-fma.f64N/A

                              \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B} \]
                            4. lower-/.f64N/A

                              \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B} \]
                            5. lower-/.f6428.4%

                              \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B} \]
                          7. Applied rewrites28.4%

                            \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{\color{blue}{B}} \]
                          8. Taylor expanded in F around -inf

                            \[\leadsto \frac{-1 \cdot \left(x - 1\right)}{B} \]
                          9. Step-by-step derivation
                            1. lower-*.f64N/A

                              \[\leadsto \frac{-1 \cdot \left(x - 1\right)}{B} \]
                            2. lower--.f6429.6%

                              \[\leadsto \frac{-1 \cdot \left(x - 1\right)}{B} \]
                          10. Applied rewrites29.6%

                            \[\leadsto \frac{-1 \cdot \left(x - 1\right)}{B} \]
                        12. Recombined 3 regimes into one program.
                        13. Add Preprocessing

                        Alternative 23: 35.3% accurate, 5.4× speedup?

                        \[\begin{array}{l} \mathbf{if}\;F \leq -1.7 \cdot 10^{-78}:\\ \;\;\;\;\frac{-1}{B}\\ \mathbf{elif}\;F \leq 2.35 \cdot 10^{-79}:\\ \;\;\;\;\frac{F \cdot \left(-1 \cdot \frac{x}{F}\right)}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{-1 \cdot \left(x - 1\right)}{B}\\ \end{array} \]
                        (FPCore (F B x)
                         :precision binary64
                         (if (<= F -1.7e-78)
                           (/ -1.0 B)
                           (if (<= F 2.35e-79) (/ (* F (* -1.0 (/ x F))) B) (/ (* -1.0 (- x 1.0)) B))))
                        double code(double F, double B, double x) {
                        	double tmp;
                        	if (F <= -1.7e-78) {
                        		tmp = -1.0 / B;
                        	} else if (F <= 2.35e-79) {
                        		tmp = (F * (-1.0 * (x / F))) / B;
                        	} else {
                        		tmp = (-1.0 * (x - 1.0)) / 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.7d-78)) then
                                tmp = (-1.0d0) / b
                            else if (f <= 2.35d-79) then
                                tmp = (f * ((-1.0d0) * (x / f))) / b
                            else
                                tmp = ((-1.0d0) * (x - 1.0d0)) / b
                            end if
                            code = tmp
                        end function
                        
                        public static double code(double F, double B, double x) {
                        	double tmp;
                        	if (F <= -1.7e-78) {
                        		tmp = -1.0 / B;
                        	} else if (F <= 2.35e-79) {
                        		tmp = (F * (-1.0 * (x / F))) / B;
                        	} else {
                        		tmp = (-1.0 * (x - 1.0)) / B;
                        	}
                        	return tmp;
                        }
                        
                        def code(F, B, x):
                        	tmp = 0
                        	if F <= -1.7e-78:
                        		tmp = -1.0 / B
                        	elif F <= 2.35e-79:
                        		tmp = (F * (-1.0 * (x / F))) / B
                        	else:
                        		tmp = (-1.0 * (x - 1.0)) / B
                        	return tmp
                        
                        function code(F, B, x)
                        	tmp = 0.0
                        	if (F <= -1.7e-78)
                        		tmp = Float64(-1.0 / B);
                        	elseif (F <= 2.35e-79)
                        		tmp = Float64(Float64(F * Float64(-1.0 * Float64(x / F))) / B);
                        	else
                        		tmp = Float64(Float64(-1.0 * Float64(x - 1.0)) / B);
                        	end
                        	return tmp
                        end
                        
                        function tmp_2 = code(F, B, x)
                        	tmp = 0.0;
                        	if (F <= -1.7e-78)
                        		tmp = -1.0 / B;
                        	elseif (F <= 2.35e-79)
                        		tmp = (F * (-1.0 * (x / F))) / B;
                        	else
                        		tmp = (-1.0 * (x - 1.0)) / B;
                        	end
                        	tmp_2 = tmp;
                        end
                        
                        code[F_, B_, x_] := If[LessEqual[F, -1.7e-78], N[(-1.0 / B), $MachinePrecision], If[LessEqual[F, 2.35e-79], N[(N[(F * N[(-1.0 * N[(x / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], N[(N[(-1.0 * N[(x - 1.0), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]]]
                        
                        \begin{array}{l}
                        \mathbf{if}\;F \leq -1.7 \cdot 10^{-78}:\\
                        \;\;\;\;\frac{-1}{B}\\
                        
                        \mathbf{elif}\;F \leq 2.35 \cdot 10^{-79}:\\
                        \;\;\;\;\frac{F \cdot \left(-1 \cdot \frac{x}{F}\right)}{B}\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;\frac{-1 \cdot \left(x - 1\right)}{B}\\
                        
                        
                        \end{array}
                        
                        Derivation
                        1. Split input into 3 regimes
                        2. if F < -1.70000000000000006e-78

                          1. Initial program 76.3%

                            \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                          2. Taylor expanded in F around -inf

                            \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                          3. Step-by-step derivation
                            1. lower-/.f64N/A

                              \[\leadsto \frac{-1}{\color{blue}{\sin B}} \]
                            2. lower-sin.6418.0%

                              \[\leadsto \frac{-1}{\sin B} \]
                          4. Applied rewrites18.0%

                            \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                          5. Taylor expanded in B around 0

                            \[\leadsto \frac{-1}{B} \]
                          6. Step-by-step derivation
                            1. Applied rewrites10.8%

                              \[\leadsto \frac{-1}{B} \]

                            if -1.70000000000000006e-78 < F < 2.3500000000000001e-79

                            1. Initial program 76.3%

                              \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                            2. Taylor expanded in F around inf

                              \[\leadsto \color{blue}{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.64N/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.64N/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.6447.0%

                                \[\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.0%

                              \[\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)} \]
                            5. Taylor expanded in B around 0

                              \[\leadsto \frac{F \cdot \left(-1 \cdot \frac{x}{F} + \frac{1}{F}\right)}{\color{blue}{B}} \]
                            6. Step-by-step derivation
                              1. lower-/.f64N/A

                                \[\leadsto \frac{F \cdot \left(-1 \cdot \frac{x}{F} + \frac{1}{F}\right)}{B} \]
                              2. lower-*.f64N/A

                                \[\leadsto \frac{F \cdot \left(-1 \cdot \frac{x}{F} + \frac{1}{F}\right)}{B} \]
                              3. lower-fma.f64N/A

                                \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B} \]
                              4. lower-/.f64N/A

                                \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B} \]
                              5. lower-/.f6428.4%

                                \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B} \]
                            7. Applied rewrites28.4%

                              \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{\color{blue}{B}} \]
                            8. Taylor expanded in x around inf

                              \[\leadsto \frac{F \cdot \left(-1 \cdot \frac{x}{F}\right)}{B} \]
                            9. Step-by-step derivation
                              1. lower-*.f64N/A

                                \[\leadsto \frac{F \cdot \left(-1 \cdot \frac{x}{F}\right)}{B} \]
                              2. lower-/.f6427.7%

                                \[\leadsto \frac{F \cdot \left(-1 \cdot \frac{x}{F}\right)}{B} \]
                            10. Applied rewrites27.7%

                              \[\leadsto \frac{F \cdot \left(-1 \cdot \frac{x}{F}\right)}{B} \]

                            if 2.3500000000000001e-79 < F

                            1. Initial program 76.3%

                              \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                            2. Taylor expanded in F around inf

                              \[\leadsto \color{blue}{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.64N/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.64N/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.6447.0%

                                \[\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.0%

                              \[\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)} \]
                            5. Taylor expanded in B around 0

                              \[\leadsto \frac{F \cdot \left(-1 \cdot \frac{x}{F} + \frac{1}{F}\right)}{\color{blue}{B}} \]
                            6. Step-by-step derivation
                              1. lower-/.f64N/A

                                \[\leadsto \frac{F \cdot \left(-1 \cdot \frac{x}{F} + \frac{1}{F}\right)}{B} \]
                              2. lower-*.f64N/A

                                \[\leadsto \frac{F \cdot \left(-1 \cdot \frac{x}{F} + \frac{1}{F}\right)}{B} \]
                              3. lower-fma.f64N/A

                                \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B} \]
                              4. lower-/.f64N/A

                                \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B} \]
                              5. lower-/.f6428.4%

                                \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B} \]
                            7. Applied rewrites28.4%

                              \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{\color{blue}{B}} \]
                            8. Taylor expanded in F around -inf

                              \[\leadsto \frac{-1 \cdot \left(x - 1\right)}{B} \]
                            9. Step-by-step derivation
                              1. lower-*.f64N/A

                                \[\leadsto \frac{-1 \cdot \left(x - 1\right)}{B} \]
                              2. lower--.f6429.6%

                                \[\leadsto \frac{-1 \cdot \left(x - 1\right)}{B} \]
                            10. Applied rewrites29.6%

                              \[\leadsto \frac{-1 \cdot \left(x - 1\right)}{B} \]
                          7. Recombined 3 regimes into one program.
                          8. Add Preprocessing

                          Alternative 24: 30.3% accurate, 8.4× speedup?

                          \[\begin{array}{l} \mathbf{if}\;F \leq -1.85 \cdot 10^{-75}:\\ \;\;\;\;\frac{-1}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{-1 \cdot \left(x - 1\right)}{B}\\ \end{array} \]
                          (FPCore (F B x)
                           :precision binary64
                           (if (<= F -1.85e-75) (/ -1.0 B) (/ (* -1.0 (- x 1.0)) B)))
                          double code(double F, double B, double x) {
                          	double tmp;
                          	if (F <= -1.85e-75) {
                          		tmp = -1.0 / B;
                          	} else {
                          		tmp = (-1.0 * (x - 1.0)) / 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.85d-75)) then
                                  tmp = (-1.0d0) / b
                              else
                                  tmp = ((-1.0d0) * (x - 1.0d0)) / b
                              end if
                              code = tmp
                          end function
                          
                          public static double code(double F, double B, double x) {
                          	double tmp;
                          	if (F <= -1.85e-75) {
                          		tmp = -1.0 / B;
                          	} else {
                          		tmp = (-1.0 * (x - 1.0)) / B;
                          	}
                          	return tmp;
                          }
                          
                          def code(F, B, x):
                          	tmp = 0
                          	if F <= -1.85e-75:
                          		tmp = -1.0 / B
                          	else:
                          		tmp = (-1.0 * (x - 1.0)) / B
                          	return tmp
                          
                          function code(F, B, x)
                          	tmp = 0.0
                          	if (F <= -1.85e-75)
                          		tmp = Float64(-1.0 / B);
                          	else
                          		tmp = Float64(Float64(-1.0 * Float64(x - 1.0)) / B);
                          	end
                          	return tmp
                          end
                          
                          function tmp_2 = code(F, B, x)
                          	tmp = 0.0;
                          	if (F <= -1.85e-75)
                          		tmp = -1.0 / B;
                          	else
                          		tmp = (-1.0 * (x - 1.0)) / B;
                          	end
                          	tmp_2 = tmp;
                          end
                          
                          code[F_, B_, x_] := If[LessEqual[F, -1.85e-75], N[(-1.0 / B), $MachinePrecision], N[(N[(-1.0 * N[(x - 1.0), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]]
                          
                          \begin{array}{l}
                          \mathbf{if}\;F \leq -1.85 \cdot 10^{-75}:\\
                          \;\;\;\;\frac{-1}{B}\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;\frac{-1 \cdot \left(x - 1\right)}{B}\\
                          
                          
                          \end{array}
                          
                          Derivation
                          1. Split input into 2 regimes
                          2. if F < -1.85000000000000012e-75

                            1. Initial program 76.3%

                              \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                            2. Taylor expanded in F around -inf

                              \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                            3. Step-by-step derivation
                              1. lower-/.f64N/A

                                \[\leadsto \frac{-1}{\color{blue}{\sin B}} \]
                              2. lower-sin.6418.0%

                                \[\leadsto \frac{-1}{\sin B} \]
                            4. Applied rewrites18.0%

                              \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                            5. Taylor expanded in B around 0

                              \[\leadsto \frac{-1}{B} \]
                            6. Step-by-step derivation
                              1. Applied rewrites10.8%

                                \[\leadsto \frac{-1}{B} \]

                              if -1.85000000000000012e-75 < F

                              1. Initial program 76.3%

                                \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                              2. Taylor expanded in F around inf

                                \[\leadsto \color{blue}{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.64N/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.64N/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.6447.0%

                                  \[\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.0%

                                \[\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)} \]
                              5. Taylor expanded in B around 0

                                \[\leadsto \frac{F \cdot \left(-1 \cdot \frac{x}{F} + \frac{1}{F}\right)}{\color{blue}{B}} \]
                              6. Step-by-step derivation
                                1. lower-/.f64N/A

                                  \[\leadsto \frac{F \cdot \left(-1 \cdot \frac{x}{F} + \frac{1}{F}\right)}{B} \]
                                2. lower-*.f64N/A

                                  \[\leadsto \frac{F \cdot \left(-1 \cdot \frac{x}{F} + \frac{1}{F}\right)}{B} \]
                                3. lower-fma.f64N/A

                                  \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B} \]
                                4. lower-/.f64N/A

                                  \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B} \]
                                5. lower-/.f6428.4%

                                  \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B} \]
                              7. Applied rewrites28.4%

                                \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{\color{blue}{B}} \]
                              8. Taylor expanded in F around -inf

                                \[\leadsto \frac{-1 \cdot \left(x - 1\right)}{B} \]
                              9. Step-by-step derivation
                                1. lower-*.f64N/A

                                  \[\leadsto \frac{-1 \cdot \left(x - 1\right)}{B} \]
                                2. lower--.f6429.6%

                                  \[\leadsto \frac{-1 \cdot \left(x - 1\right)}{B} \]
                              10. Applied rewrites29.6%

                                \[\leadsto \frac{-1 \cdot \left(x - 1\right)}{B} \]
                            7. Recombined 2 regimes into one program.
                            8. Add Preprocessing

                            Alternative 25: 18.0% accurate, 14.2× speedup?

                            \[\begin{array}{l} \mathbf{if}\;F \leq 0.00082:\\ \;\;\;\;\frac{-1}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B}\\ \end{array} \]
                            (FPCore (F B x) :precision binary64 (if (<= F 0.00082) (/ -1.0 B) (/ 1.0 B)))
                            double code(double F, double B, double x) {
                            	double tmp;
                            	if (F <= 0.00082) {
                            		tmp = -1.0 / B;
                            	} else {
                            		tmp = 1.0 / B;
                            	}
                            	return tmp;
                            }
                            
                            module fmin_fmax_functions
                                implicit none
                                private
                                public fmax
                                public fmin
                            
                                interface fmax
                                    module procedure fmax88
                                    module procedure fmax44
                                    module procedure fmax84
                                    module procedure fmax48
                                end interface
                                interface fmin
                                    module procedure fmin88
                                    module procedure fmin44
                                    module procedure fmin84
                                    module procedure fmin48
                                end interface
                            contains
                                real(8) function fmax88(x, y) result (res)
                                    real(8), intent (in) :: x
                                    real(8), intent (in) :: y
                                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                end function
                                real(4) function fmax44(x, y) result (res)
                                    real(4), intent (in) :: x
                                    real(4), intent (in) :: y
                                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                end function
                                real(8) function fmax84(x, y) result(res)
                                    real(8), intent (in) :: x
                                    real(4), intent (in) :: y
                                    res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                end function
                                real(8) function fmax48(x, y) result(res)
                                    real(4), intent (in) :: x
                                    real(8), intent (in) :: y
                                    res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                end function
                                real(8) function fmin88(x, y) result (res)
                                    real(8), intent (in) :: x
                                    real(8), intent (in) :: y
                                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                end function
                                real(4) function fmin44(x, y) result (res)
                                    real(4), intent (in) :: x
                                    real(4), intent (in) :: y
                                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                end function
                                real(8) function fmin84(x, y) result(res)
                                    real(8), intent (in) :: x
                                    real(4), intent (in) :: y
                                    res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                end function
                                real(8) function fmin48(x, y) result(res)
                                    real(4), intent (in) :: x
                                    real(8), intent (in) :: y
                                    res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                end function
                            end module
                            
                            real(8) function code(f, b, x)
                            use fmin_fmax_functions
                                real(8), intent (in) :: f
                                real(8), intent (in) :: b
                                real(8), intent (in) :: x
                                real(8) :: tmp
                                if (f <= 0.00082d0) then
                                    tmp = (-1.0d0) / b
                                else
                                    tmp = 1.0d0 / b
                                end if
                                code = tmp
                            end function
                            
                            public static double code(double F, double B, double x) {
                            	double tmp;
                            	if (F <= 0.00082) {
                            		tmp = -1.0 / B;
                            	} else {
                            		tmp = 1.0 / B;
                            	}
                            	return tmp;
                            }
                            
                            def code(F, B, x):
                            	tmp = 0
                            	if F <= 0.00082:
                            		tmp = -1.0 / B
                            	else:
                            		tmp = 1.0 / B
                            	return tmp
                            
                            function code(F, B, x)
                            	tmp = 0.0
                            	if (F <= 0.00082)
                            		tmp = Float64(-1.0 / B);
                            	else
                            		tmp = Float64(1.0 / B);
                            	end
                            	return tmp
                            end
                            
                            function tmp_2 = code(F, B, x)
                            	tmp = 0.0;
                            	if (F <= 0.00082)
                            		tmp = -1.0 / B;
                            	else
                            		tmp = 1.0 / B;
                            	end
                            	tmp_2 = tmp;
                            end
                            
                            code[F_, B_, x_] := If[LessEqual[F, 0.00082], N[(-1.0 / B), $MachinePrecision], N[(1.0 / B), $MachinePrecision]]
                            
                            \begin{array}{l}
                            \mathbf{if}\;F \leq 0.00082:\\
                            \;\;\;\;\frac{-1}{B}\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\frac{1}{B}\\
                            
                            
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if F < 8.1999999999999998e-4

                              1. Initial program 76.3%

                                \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                              2. Taylor expanded in F around -inf

                                \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                              3. Step-by-step derivation
                                1. lower-/.f64N/A

                                  \[\leadsto \frac{-1}{\color{blue}{\sin B}} \]
                                2. lower-sin.6418.0%

                                  \[\leadsto \frac{-1}{\sin B} \]
                              4. Applied rewrites18.0%

                                \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
                              5. Taylor expanded in B around 0

                                \[\leadsto \frac{-1}{B} \]
                              6. Step-by-step derivation
                                1. Applied rewrites10.8%

                                  \[\leadsto \frac{-1}{B} \]

                                if 8.1999999999999998e-4 < F

                                1. Initial program 76.3%

                                  \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                2. Taylor expanded in F around inf

                                  \[\leadsto \color{blue}{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.64N/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.64N/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.6447.0%

                                    \[\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.0%

                                  \[\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)} \]
                                5. Taylor expanded in B around 0

                                  \[\leadsto \frac{F \cdot \left(-1 \cdot \frac{x}{F} + \frac{1}{F}\right)}{\color{blue}{B}} \]
                                6. Step-by-step derivation
                                  1. lower-/.f64N/A

                                    \[\leadsto \frac{F \cdot \left(-1 \cdot \frac{x}{F} + \frac{1}{F}\right)}{B} \]
                                  2. lower-*.f64N/A

                                    \[\leadsto \frac{F \cdot \left(-1 \cdot \frac{x}{F} + \frac{1}{F}\right)}{B} \]
                                  3. lower-fma.f64N/A

                                    \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B} \]
                                  4. lower-/.f64N/A

                                    \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B} \]
                                  5. lower-/.f6428.4%

                                    \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B} \]
                                7. Applied rewrites28.4%

                                  \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{\color{blue}{B}} \]
                                8. Taylor expanded in x around 0

                                  \[\leadsto \frac{1}{B} \]
                                9. Step-by-step derivation
                                  1. Applied rewrites10.1%

                                    \[\leadsto \frac{1}{B} \]
                                10. Recombined 2 regimes into one program.
                                11. Add Preprocessing

                                Alternative 26: 10.1% accurate, 26.5× speedup?

                                \[\frac{1}{B} \]
                                (FPCore (F B x) :precision binary64 (/ 1.0 B))
                                double code(double F, double B, double x) {
                                	return 1.0 / B;
                                }
                                
                                module fmin_fmax_functions
                                    implicit none
                                    private
                                    public fmax
                                    public fmin
                                
                                    interface fmax
                                        module procedure fmax88
                                        module procedure fmax44
                                        module procedure fmax84
                                        module procedure fmax48
                                    end interface
                                    interface fmin
                                        module procedure fmin88
                                        module procedure fmin44
                                        module procedure fmin84
                                        module procedure fmin48
                                    end interface
                                contains
                                    real(8) function fmax88(x, y) result (res)
                                        real(8), intent (in) :: x
                                        real(8), intent (in) :: y
                                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                    end function
                                    real(4) function fmax44(x, y) result (res)
                                        real(4), intent (in) :: x
                                        real(4), intent (in) :: y
                                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                    end function
                                    real(8) function fmax84(x, y) result(res)
                                        real(8), intent (in) :: x
                                        real(4), intent (in) :: y
                                        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                    end function
                                    real(8) function fmax48(x, y) result(res)
                                        real(4), intent (in) :: x
                                        real(8), intent (in) :: y
                                        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                    end function
                                    real(8) function fmin88(x, y) result (res)
                                        real(8), intent (in) :: x
                                        real(8), intent (in) :: y
                                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                    end function
                                    real(4) function fmin44(x, y) result (res)
                                        real(4), intent (in) :: x
                                        real(4), intent (in) :: y
                                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                    end function
                                    real(8) function fmin84(x, y) result(res)
                                        real(8), intent (in) :: x
                                        real(4), intent (in) :: y
                                        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                    end function
                                    real(8) function fmin48(x, y) result(res)
                                        real(4), intent (in) :: x
                                        real(8), intent (in) :: y
                                        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                    end function
                                end module
                                
                                real(8) function code(f, b, x)
                                use fmin_fmax_functions
                                    real(8), intent (in) :: f
                                    real(8), intent (in) :: b
                                    real(8), intent (in) :: x
                                    code = 1.0d0 / b
                                end function
                                
                                public static double code(double F, double B, double x) {
                                	return 1.0 / B;
                                }
                                
                                def code(F, B, x):
                                	return 1.0 / B
                                
                                function code(F, B, x)
                                	return Float64(1.0 / B)
                                end
                                
                                function tmp = code(F, B, x)
                                	tmp = 1.0 / B;
                                end
                                
                                code[F_, B_, x_] := N[(1.0 / B), $MachinePrecision]
                                
                                \frac{1}{B}
                                
                                Derivation
                                1. Initial program 76.3%

                                  \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
                                2. Taylor expanded in F around inf

                                  \[\leadsto \color{blue}{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.64N/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.64N/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.6447.0%

                                    \[\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.0%

                                  \[\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)} \]
                                5. Taylor expanded in B around 0

                                  \[\leadsto \frac{F \cdot \left(-1 \cdot \frac{x}{F} + \frac{1}{F}\right)}{\color{blue}{B}} \]
                                6. Step-by-step derivation
                                  1. lower-/.f64N/A

                                    \[\leadsto \frac{F \cdot \left(-1 \cdot \frac{x}{F} + \frac{1}{F}\right)}{B} \]
                                  2. lower-*.f64N/A

                                    \[\leadsto \frac{F \cdot \left(-1 \cdot \frac{x}{F} + \frac{1}{F}\right)}{B} \]
                                  3. lower-fma.f64N/A

                                    \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B} \]
                                  4. lower-/.f64N/A

                                    \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B} \]
                                  5. lower-/.f6428.4%

                                    \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{B} \]
                                7. Applied rewrites28.4%

                                  \[\leadsto \frac{F \cdot \mathsf{fma}\left(-1, \frac{x}{F}, \frac{1}{F}\right)}{\color{blue}{B}} \]
                                8. Taylor expanded in x around 0

                                  \[\leadsto \frac{1}{B} \]
                                9. Step-by-step derivation
                                  1. Applied rewrites10.1%

                                    \[\leadsto \frac{1}{B} \]
                                  2. Add Preprocessing

                                  Reproduce

                                  ?
                                  herbie shell --seed 2025183 
                                  (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))))))