VandenBroeck and Keller, Equation (23)

Percentage Accurate: 76.8% → 99.7%
Time: 7.3s
Alternatives: 19
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 19 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.8% accurate, 1.0× speedup?

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

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

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

Alternative 1: 99.7% accurate, 1.0× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{1}{\frac{\tan B}{x}}\\


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

    1. Initial program 76.8%

      \[\left(-x \cdot \frac{1}{\tan 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.8%

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

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

      \[\leadsto \frac{\color{blue}{-1}}{\sin B} - \frac{x}{\tan B} \]
    5. Step-by-step derivation
      1. Applied rewrites56.1%

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

      if -2.0000000000000001e32 < F < 6.8e7

      1. Initial program 76.8%

        \[\left(-x \cdot \frac{1}{\tan 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.8%

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

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

      if 6.8e7 < F

      1. Initial program 76.8%

        \[\left(-x \cdot \frac{1}{\tan 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.8%

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

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

        \[\leadsto \frac{\color{blue}{1}}{\sin B} - \frac{x}{\tan B} \]
      5. Step-by-step derivation
        1. Applied rewrites56.0%

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

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

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

            \[\leadsto \frac{1}{\sin B} - \color{blue}{\frac{1}{\frac{\tan B}{x}}} \]
          4. lower-unsound-/.f6455.9%

            \[\leadsto \frac{1}{\sin B} - \frac{1}{\color{blue}{\frac{\tan B}{x}}} \]
        3. Applied rewrites55.9%

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

      Alternative 2: 99.6% accurate, 1.1× speedup?

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

        1. Initial program 76.8%

          \[\left(-x \cdot \frac{1}{\tan 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.8%

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

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

          \[\leadsto \frac{\color{blue}{-1}}{\sin B} - \frac{x}{\tan B} \]
        5. Step-by-step derivation
          1. Applied rewrites56.1%

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

          if -2.0000000000000001e32 < F < 1.5500000000000001e41

          1. Initial program 76.8%

            \[\left(-x \cdot \frac{1}{\tan 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.8%

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

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

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

          if 1.5500000000000001e41 < F

          1. Initial program 76.8%

            \[\left(-x \cdot \frac{1}{\tan 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.8%

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

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

            \[\leadsto \frac{\color{blue}{1}}{\sin B} - \frac{x}{\tan B} \]
          5. Step-by-step derivation
            1. Applied rewrites56.0%

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

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

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

                \[\leadsto \frac{1}{\sin B} + \left(\mathsf{neg}\left(\color{blue}{\frac{x}{\tan B}}\right)\right) \]
              4. mult-flip-revN/A

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

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

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

                \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{1}{\tan B} \cdot x}\right)\right) + \frac{1}{\sin B} \]
              8. distribute-lft-neg-inN/A

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

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

                \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\frac{1}{\color{blue}{\tan B}}\right), x, \frac{1}{\sin B}\right) \]
              11. distribute-neg-fracN/A

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

                \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{-1}}{\tan B}, x, \frac{1}{\sin B}\right) \]
              13. lower-/.f6455.9%

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

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

          Alternative 3: 99.1% accurate, 1.1× speedup?

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

            1. Initial program 76.8%

              \[\left(-x \cdot \frac{1}{\tan 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.8%

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

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

              \[\leadsto \frac{\color{blue}{-1}}{\sin B} - \frac{x}{\tan B} \]
            5. Step-by-step derivation
              1. Applied rewrites56.1%

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

              if -1.25 < F < 0.84999999999999998

              1. Initial program 76.8%

                \[\left(-x \cdot \frac{1}{\tan 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.8%

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

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

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

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

                if 0.84999999999999998 < F

                1. Initial program 76.8%

                  \[\left(-x \cdot \frac{1}{\tan 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.8%

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

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

                  \[\leadsto \frac{\color{blue}{1}}{\sin B} - \frac{x}{\tan B} \]
                5. Step-by-step derivation
                  1. Applied rewrites56.0%

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

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

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

                      \[\leadsto \frac{1}{\sin B} - \color{blue}{\frac{1}{\frac{\tan B}{x}}} \]
                    4. lower-unsound-/.f6455.9%

                      \[\leadsto \frac{1}{\sin B} - \frac{1}{\color{blue}{\frac{\tan B}{x}}} \]
                  3. Applied rewrites55.9%

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

                Alternative 4: 91.0% accurate, 1.3× speedup?

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

                  1. Initial program 76.8%

                    \[\left(-x \cdot \frac{1}{\tan 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.8%

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

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

                    \[\leadsto \frac{\color{blue}{-1}}{\sin B} - \frac{x}{\tan B} \]
                  5. Step-by-step derivation
                    1. Applied rewrites56.1%

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

                    if -2.6e6 < F < 8.4999999999999996e-42

                    1. Initial program 76.8%

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

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

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

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

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

                        \[\leadsto \color{blue}{\frac{F}{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}{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. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

                    if 8.4999999999999996e-42 < F

                    1. Initial program 76.8%

                      \[\left(-x \cdot \frac{1}{\tan 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.8%

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

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

                      \[\leadsto \frac{\color{blue}{1}}{\sin B} - \frac{x}{\tan B} \]
                    5. Step-by-step derivation
                      1. Applied rewrites56.0%

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

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

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

                          \[\leadsto \frac{1}{\sin B} - \color{blue}{\frac{1}{\frac{\tan B}{x}}} \]
                        4. lower-unsound-/.f6455.9%

                          \[\leadsto \frac{1}{\sin B} - \frac{1}{\color{blue}{\frac{\tan B}{x}}} \]
                      3. Applied rewrites55.9%

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

                    Alternative 5: 91.0% accurate, 1.4× speedup?

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

                      1. Initial program 76.8%

                        \[\left(-x \cdot \frac{1}{\tan 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.8%

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

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

                        \[\leadsto \frac{\color{blue}{-1}}{\sin B} - \frac{x}{\tan B} \]
                      5. Step-by-step derivation
                        1. Applied rewrites56.1%

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

                        if -2.6e6 < F < 8.4999999999999996e-42

                        1. Initial program 76.8%

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

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

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

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

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

                            \[\leadsto \color{blue}{\frac{F}{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}{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. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

                        if 8.4999999999999996e-42 < F

                        1. Initial program 76.8%

                          \[\left(-x \cdot \frac{1}{\tan 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.8%

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

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

                          \[\leadsto \frac{\color{blue}{1}}{\sin B} - \frac{x}{\tan B} \]
                        5. Step-by-step derivation
                          1. Applied rewrites56.0%

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

                        Alternative 6: 82.7% accurate, 1.4× speedup?

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

                          1. Initial program 76.8%

                            \[\left(-x \cdot \frac{1}{\tan 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.8%

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

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

                            \[\leadsto \frac{\color{blue}{-1}}{\sin B} - \frac{x}{\tan B} \]
                          5. Step-by-step derivation
                            1. Applied rewrites56.1%

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

                            if -2.6e6 < F < 6.2000000000000003e165

                            1. Initial program 76.8%

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

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

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

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

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

                                \[\leadsto \color{blue}{\frac{F}{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}{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. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

                            if 6.2000000000000003e165 < F

                            1. Initial program 76.8%

                              \[\left(-x \cdot \frac{1}{\tan 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.8%

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

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

                              \[\leadsto \frac{\color{blue}{1}}{\sin B} - \frac{x}{\tan B} \]
                            5. Step-by-step derivation
                              1. Applied rewrites56.0%

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

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

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

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

                                  \[\leadsto \frac{1}{\sin B} - \frac{x}{B \cdot \left(1 + \frac{1}{3} \cdot \color{blue}{{B}^{2}}\right)} \]
                                4. lower-pow.f6436.7%

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

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

                            Alternative 7: 75.0% accurate, 1.4× speedup?

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

                              1. Initial program 76.8%

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

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

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

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

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

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

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

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

                              if -8.5999999999999997e144 < F < -2.6000000000000001e-74

                              1. Initial program 76.8%

                                \[\left(-x \cdot \frac{1}{\tan 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.8%

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

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

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

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

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

                              if -2.6000000000000001e-74 < F < 6.2000000000000003e165

                              1. Initial program 76.8%

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

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

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

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

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

                                  \[\leadsto \color{blue}{\frac{F}{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}{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. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

                              if 6.2000000000000003e165 < F

                              1. Initial program 76.8%

                                \[\left(-x \cdot \frac{1}{\tan 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.8%

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

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

                                \[\leadsto \frac{\color{blue}{1}}{\sin B} - \frac{x}{\tan B} \]
                              5. Step-by-step derivation
                                1. Applied rewrites56.0%

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

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

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

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

                                    \[\leadsto \frac{1}{\sin B} - \frac{x}{B \cdot \left(1 + \frac{1}{3} \cdot \color{blue}{{B}^{2}}\right)} \]
                                  4. lower-pow.f6436.7%

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

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

                              Alternative 8: 74.5% accurate, 1.5× speedup?

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

                                1. Initial program 76.8%

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

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

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

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

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

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

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

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

                                if -4.1999999999999998e-58 < x < 1.08e-107

                                1. Initial program 76.8%

                                  \[\left(-x \cdot \frac{1}{\tan 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.8%

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

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

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

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

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

                                if 1.08e-107 < x

                                1. Initial program 76.8%

                                  \[\left(-x \cdot \frac{1}{\tan 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.8%

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

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

                                  \[\leadsto \frac{\color{blue}{1}}{\sin B} - \frac{x}{\tan B} \]
                                5. Step-by-step derivation
                                  1. Applied rewrites56.0%

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

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

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

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

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

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

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

                                Alternative 9: 73.4% accurate, 1.5× speedup?

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

                                  1. Initial program 76.8%

                                    \[\left(-x \cdot \frac{1}{\tan 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.8%

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

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

                                    \[\leadsto \frac{\color{blue}{1}}{\sin B} - \frac{x}{\tan B} \]
                                  5. Step-by-step derivation
                                    1. Applied rewrites56.0%

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

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

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

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

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

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

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

                                    if -3.6000000000000001e-58 < x < 1.08e-107

                                    1. Initial program 76.8%

                                      \[\left(-x \cdot \frac{1}{\tan 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.8%

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

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

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

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

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

                                  Alternative 10: 70.1% accurate, 1.4× speedup?

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

                                    1. Initial program 76.8%

                                      \[\left(-x \cdot \frac{1}{\tan 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 rewrites45.2%

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

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

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

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

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

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

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

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

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

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

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

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

                                        \[\leadsto \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                      13. lift-*.f6445.2%

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

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

                                        \[\leadsto \frac{{\left(x \cdot 2 + \mathsf{fma}\left(F, F, 2\right)\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                      16. lower-fma.f6445.2%

                                        \[\leadsto \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot F - x}{B} \]
                                    6. Applied rewrites45.2%

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

                                    if 3.1000000000000001e-5 < B

                                    1. Initial program 76.8%

                                      \[\left(-x \cdot \frac{1}{\tan 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.8%

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

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

                                      \[\leadsto \frac{\color{blue}{1}}{\sin B} - \frac{x}{\tan B} \]
                                    5. Step-by-step derivation
                                      1. Applied rewrites56.0%

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

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

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

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

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

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

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

                                    Alternative 11: 58.6% accurate, 1.5× speedup?

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

                                      1. Initial program 76.8%

                                        \[\left(-x \cdot \frac{1}{\tan 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 rewrites45.2%

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

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

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

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

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

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

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

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

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

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

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

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

                                          \[\leadsto \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                        13. lift-*.f6445.2%

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

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

                                          \[\leadsto \frac{{\left(x \cdot 2 + \mathsf{fma}\left(F, F, 2\right)\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                        16. lower-fma.f6445.2%

                                          \[\leadsto \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot F - x}{B} \]
                                      6. Applied rewrites45.2%

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

                                        \[\leadsto \frac{-1 - x}{B} \]
                                      8. Step-by-step derivation
                                        1. Applied rewrites30.0%

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

                                        if -2.9000000000000001e138 < F < -7.5e14

                                        1. Initial program 76.8%

                                          \[\left(-x \cdot \frac{1}{\tan 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 rewrites45.2%

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

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

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

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

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

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

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

                                            \[\leadsto \frac{1}{B} \]
                                          2. Taylor expanded in F around -inf

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

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

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

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

                                          if -7.5e14 < F < 8.4999999999999996e-42

                                          1. Initial program 76.8%

                                            \[\left(-x \cdot \frac{1}{\tan 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 rewrites45.2%

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

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

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

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

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

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

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

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

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

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

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

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

                                              \[\leadsto \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                            13. lift-*.f6445.2%

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

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

                                              \[\leadsto \frac{{\left(x \cdot 2 + \mathsf{fma}\left(F, F, 2\right)\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                            16. lower-fma.f6445.2%

                                              \[\leadsto \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot F - x}{B} \]
                                          6. Applied rewrites45.2%

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

                                          if 8.4999999999999996e-42 < F

                                          1. Initial program 76.8%

                                            \[\left(-x \cdot \frac{1}{\tan 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.8%

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

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

                                            \[\leadsto \frac{\color{blue}{1}}{\sin B} - \frac{x}{\tan B} \]
                                          5. Step-by-step derivation
                                            1. Applied rewrites56.0%

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

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

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

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

                                                \[\leadsto \frac{1}{\sin B} - \frac{x}{B \cdot \left(1 + \frac{1}{3} \cdot \color{blue}{{B}^{2}}\right)} \]
                                              4. lower-pow.f6436.7%

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

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

                                          Alternative 12: 52.1% accurate, 2.4× speedup?

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

                                            1. Initial program 76.8%

                                              \[\left(-x \cdot \frac{1}{\tan 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 rewrites45.2%

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

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

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

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

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

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

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

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

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

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

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

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

                                                \[\leadsto \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                              13. lift-*.f6445.2%

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

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

                                                \[\leadsto \frac{{\left(x \cdot 2 + \mathsf{fma}\left(F, F, 2\right)\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                              16. lower-fma.f6445.2%

                                                \[\leadsto \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot F - x}{B} \]
                                            6. Applied rewrites45.2%

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

                                            if 460 < B

                                            1. Initial program 76.8%

                                              \[\left(-x \cdot \frac{1}{\tan 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 rewrites45.2%

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

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

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

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

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

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

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

                                                \[\leadsto \frac{1}{B} \]
                                              2. Taylor expanded in F around -inf

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

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

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

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

                                            Alternative 13: 51.7% accurate, 2.7× speedup?

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

                                              1. Initial program 76.8%

                                                \[\left(-x \cdot \frac{1}{\tan 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 rewrites45.2%

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

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

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

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

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

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

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

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

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

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

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

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

                                                  \[\leadsto \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                                13. lift-*.f6445.2%

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

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

                                                  \[\leadsto \frac{{\left(x \cdot 2 + \mathsf{fma}\left(F, F, 2\right)\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                                16. lower-fma.f6445.2%

                                                  \[\leadsto \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot F - x}{B} \]
                                              6. Applied rewrites45.2%

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

                                                \[\leadsto \frac{-1 - x}{B} \]
                                              8. Step-by-step derivation
                                                1. Applied rewrites30.0%

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

                                                if -4.9999999999999999e58 < F < 2e8

                                                1. Initial program 76.8%

                                                  \[\left(-x \cdot \frac{1}{\tan 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 rewrites45.2%

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

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

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

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

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

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

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

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

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

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

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

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

                                                    \[\leadsto \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                                  13. lift-*.f6445.2%

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

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

                                                    \[\leadsto \frac{{\left(x \cdot 2 + \mathsf{fma}\left(F, F, 2\right)\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                                  16. lower-fma.f6445.2%

                                                    \[\leadsto \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot F - x}{B} \]
                                                6. Applied rewrites45.2%

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

                                                if 2e8 < F

                                                1. Initial program 76.8%

                                                  \[\left(-x \cdot \frac{1}{\tan 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 rewrites45.2%

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

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

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

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

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

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

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

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

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

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

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

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

                                                    \[\leadsto \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                                  13. lift-*.f6445.2%

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

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

                                                    \[\leadsto \frac{{\left(x \cdot 2 + \mathsf{fma}\left(F, F, 2\right)\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                                  16. lower-fma.f6445.2%

                                                    \[\leadsto \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot F - x}{B} \]
                                                6. Applied rewrites45.2%

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

                                                  \[\leadsto \frac{1 - x}{B} \]
                                                8. Step-by-step derivation
                                                  1. Applied rewrites30.1%

                                                    \[\leadsto \frac{1 - x}{B} \]
                                                9. Recombined 3 regimes into one program.
                                                10. Add Preprocessing

                                                Alternative 14: 51.1% accurate, 3.1× speedup?

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

                                                  1. Initial program 76.8%

                                                    \[\left(-x \cdot \frac{1}{\tan 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 rewrites45.2%

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

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

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

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

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

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

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

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

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

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

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

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

                                                      \[\leadsto \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                                    13. lift-*.f6445.2%

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

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

                                                      \[\leadsto \frac{{\left(x \cdot 2 + \mathsf{fma}\left(F, F, 2\right)\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                                    16. lower-fma.f6445.2%

                                                      \[\leadsto \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot F - x}{B} \]
                                                  6. Applied rewrites45.2%

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

                                                    \[\leadsto \frac{-1 - x}{B} \]
                                                  8. Step-by-step derivation
                                                    1. Applied rewrites30.0%

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

                                                    if -0.34999999999999998 < F < 4.2e-35

                                                    1. Initial program 76.8%

                                                      \[\left(-x \cdot \frac{1}{\tan 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 rewrites45.2%

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

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

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

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

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

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

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

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

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

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

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

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

                                                        \[\leadsto \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                                      13. lift-*.f6445.2%

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

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

                                                        \[\leadsto \frac{{\left(x \cdot 2 + \mathsf{fma}\left(F, F, 2\right)\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                                      16. lower-fma.f6445.2%

                                                        \[\leadsto \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot F - x}{B} \]
                                                    6. Applied rewrites45.2%

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

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

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

                                                      if 4.2e-35 < F

                                                      1. Initial program 76.8%

                                                        \[\left(-x \cdot \frac{1}{\tan 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 rewrites45.2%

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

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

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

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

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

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

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

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

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

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

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

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

                                                          \[\leadsto \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                                        13. lift-*.f6445.2%

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

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

                                                          \[\leadsto \frac{{\left(x \cdot 2 + \mathsf{fma}\left(F, F, 2\right)\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                                        16. lower-fma.f6445.2%

                                                          \[\leadsto \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot F - x}{B} \]
                                                      6. Applied rewrites45.2%

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

                                                        \[\leadsto \frac{1 - x}{B} \]
                                                      8. Step-by-step derivation
                                                        1. Applied rewrites30.1%

                                                          \[\leadsto \frac{1 - x}{B} \]
                                                      9. Recombined 3 regimes into one program.
                                                      10. Add Preprocessing

                                                      Alternative 15: 44.5% accurate, 7.9× speedup?

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

                                                        1. Initial program 76.8%

                                                          \[\left(-x \cdot \frac{1}{\tan 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 rewrites45.2%

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

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

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

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

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

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

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

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

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

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

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

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

                                                            \[\leadsto \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                                          13. lift-*.f6445.2%

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

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

                                                            \[\leadsto \frac{{\left(x \cdot 2 + \mathsf{fma}\left(F, F, 2\right)\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                                          16. lower-fma.f6445.2%

                                                            \[\leadsto \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot F - x}{B} \]
                                                        6. Applied rewrites45.2%

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

                                                          \[\leadsto \frac{-1 - x}{B} \]
                                                        8. Step-by-step derivation
                                                          1. Applied rewrites30.0%

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

                                                          if -7.8000000000000007e-61 < F < 1.1e-54

                                                          1. Initial program 76.8%

                                                            \[\left(-x \cdot \frac{1}{\tan 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 rewrites45.2%

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

                                                            \[\leadsto \frac{-1 \cdot x}{B} \]
                                                          6. Step-by-step derivation
                                                            1. lower-*.f6430.3%

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

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

                                                          if 1.1e-54 < F

                                                          1. Initial program 76.8%

                                                            \[\left(-x \cdot \frac{1}{\tan 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 rewrites45.2%

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

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

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

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

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

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

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

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

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

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

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

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

                                                              \[\leadsto \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                                            13. lift-*.f6445.2%

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

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

                                                              \[\leadsto \frac{{\left(x \cdot 2 + \mathsf{fma}\left(F, F, 2\right)\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                                            16. lower-fma.f6445.2%

                                                              \[\leadsto \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot F - x}{B} \]
                                                          6. Applied rewrites45.2%

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

                                                            \[\leadsto \frac{1 - x}{B} \]
                                                          8. Step-by-step derivation
                                                            1. Applied rewrites30.1%

                                                              \[\leadsto \frac{1 - x}{B} \]
                                                          9. Recombined 3 regimes into one program.
                                                          10. Add Preprocessing

                                                          Alternative 16: 37.5% accurate, 10.9× speedup?

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

                                                            1. Initial program 76.8%

                                                              \[\left(-x \cdot \frac{1}{\tan 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 rewrites45.2%

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

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

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

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

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

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

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

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

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

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

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

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

                                                                \[\leadsto \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                                              13. lift-*.f6445.2%

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

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

                                                                \[\leadsto \frac{{\left(x \cdot 2 + \mathsf{fma}\left(F, F, 2\right)\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                                              16. lower-fma.f6445.2%

                                                                \[\leadsto \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot F - x}{B} \]
                                                            6. Applied rewrites45.2%

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

                                                              \[\leadsto \frac{-1 - x}{B} \]
                                                            8. Step-by-step derivation
                                                              1. Applied rewrites30.0%

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

                                                              if -3.2e-159 < F

                                                              1. Initial program 76.8%

                                                                \[\left(-x \cdot \frac{1}{\tan 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 rewrites45.2%

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

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

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

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

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

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

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

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

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

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

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

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

                                                                  \[\leadsto \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                                                13. lift-*.f6445.2%

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

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

                                                                  \[\leadsto \frac{{\left(x \cdot 2 + \mathsf{fma}\left(F, F, 2\right)\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                                                16. lower-fma.f6445.2%

                                                                  \[\leadsto \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot F - x}{B} \]
                                                              6. Applied rewrites45.2%

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

                                                                \[\leadsto \frac{1 - x}{B} \]
                                                              8. Step-by-step derivation
                                                                1. Applied rewrites30.1%

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

                                                              Alternative 17: 30.9% accurate, 10.9× speedup?

                                                              \[\begin{array}{l} \mathbf{if}\;F \leq 30500000:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B}\\ \end{array} \]
                                                              (FPCore (F B x)
                                                               :precision binary64
                                                               (if (<= F 30500000.0) (/ (- -1.0 x) B) (/ 1.0 B)))
                                                              double code(double F, double B, double x) {
                                                              	double tmp;
                                                              	if (F <= 30500000.0) {
                                                              		tmp = (-1.0 - x) / 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 <= 30500000.0d0) then
                                                                      tmp = ((-1.0d0) - x) / 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 <= 30500000.0) {
                                                              		tmp = (-1.0 - x) / B;
                                                              	} else {
                                                              		tmp = 1.0 / B;
                                                              	}
                                                              	return tmp;
                                                              }
                                                              
                                                              def code(F, B, x):
                                                              	tmp = 0
                                                              	if F <= 30500000.0:
                                                              		tmp = (-1.0 - x) / B
                                                              	else:
                                                              		tmp = 1.0 / B
                                                              	return tmp
                                                              
                                                              function code(F, B, x)
                                                              	tmp = 0.0
                                                              	if (F <= 30500000.0)
                                                              		tmp = Float64(Float64(-1.0 - x) / B);
                                                              	else
                                                              		tmp = Float64(1.0 / B);
                                                              	end
                                                              	return tmp
                                                              end
                                                              
                                                              function tmp_2 = code(F, B, x)
                                                              	tmp = 0.0;
                                                              	if (F <= 30500000.0)
                                                              		tmp = (-1.0 - x) / B;
                                                              	else
                                                              		tmp = 1.0 / B;
                                                              	end
                                                              	tmp_2 = tmp;
                                                              end
                                                              
                                                              code[F_, B_, x_] := If[LessEqual[F, 30500000.0], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[(1.0 / B), $MachinePrecision]]
                                                              
                                                              \begin{array}{l}
                                                              \mathbf{if}\;F \leq 30500000:\\
                                                              \;\;\;\;\frac{-1 - x}{B}\\
                                                              
                                                              \mathbf{else}:\\
                                                              \;\;\;\;\frac{1}{B}\\
                                                              
                                                              
                                                              \end{array}
                                                              
                                                              Derivation
                                                              1. Split input into 2 regimes
                                                              2. if F < 3.05e7

                                                                1. Initial program 76.8%

                                                                  \[\left(-x \cdot \frac{1}{\tan 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 rewrites45.2%

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

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

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

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

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

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

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

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

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

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

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

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

                                                                    \[\leadsto \frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                                                  13. lift-*.f6445.2%

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

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

                                                                    \[\leadsto \frac{{\left(x \cdot 2 + \mathsf{fma}\left(F, F, 2\right)\right)}^{\frac{-1}{2}} \cdot F - x}{B} \]
                                                                  16. lower-fma.f6445.2%

                                                                    \[\leadsto \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5} \cdot F - x}{B} \]
                                                                6. Applied rewrites45.2%

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

                                                                  \[\leadsto \frac{-1 - x}{B} \]
                                                                8. Step-by-step derivation
                                                                  1. Applied rewrites30.0%

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

                                                                  if 3.05e7 < F

                                                                  1. Initial program 76.8%

                                                                    \[\left(-x \cdot \frac{1}{\tan 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 rewrites45.2%

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

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

                                                                      \[\leadsto \frac{1}{B} \]
                                                                  7. Applied rewrites10.0%

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

                                                                Alternative 18: 17.4% accurate, 14.2× speedup?

                                                                \[\begin{array}{l} \mathbf{if}\;F \leq 2.05 \cdot 10^{-299}:\\ \;\;\;\;\frac{-1}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B}\\ \end{array} \]
                                                                (FPCore (F B x) :precision binary64 (if (<= F 2.05e-299) (/ -1.0 B) (/ 1.0 B)))
                                                                double code(double F, double B, double x) {
                                                                	double tmp;
                                                                	if (F <= 2.05e-299) {
                                                                		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 <= 2.05d-299) 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 <= 2.05e-299) {
                                                                		tmp = -1.0 / B;
                                                                	} else {
                                                                		tmp = 1.0 / B;
                                                                	}
                                                                	return tmp;
                                                                }
                                                                
                                                                def code(F, B, x):
                                                                	tmp = 0
                                                                	if F <= 2.05e-299:
                                                                		tmp = -1.0 / B
                                                                	else:
                                                                		tmp = 1.0 / B
                                                                	return tmp
                                                                
                                                                function code(F, B, x)
                                                                	tmp = 0.0
                                                                	if (F <= 2.05e-299)
                                                                		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 <= 2.05e-299)
                                                                		tmp = -1.0 / B;
                                                                	else
                                                                		tmp = 1.0 / B;
                                                                	end
                                                                	tmp_2 = tmp;
                                                                end
                                                                
                                                                code[F_, B_, x_] := If[LessEqual[F, 2.05e-299], N[(-1.0 / B), $MachinePrecision], N[(1.0 / B), $MachinePrecision]]
                                                                
                                                                \begin{array}{l}
                                                                \mathbf{if}\;F \leq 2.05 \cdot 10^{-299}:\\
                                                                \;\;\;\;\frac{-1}{B}\\
                                                                
                                                                \mathbf{else}:\\
                                                                \;\;\;\;\frac{1}{B}\\
                                                                
                                                                
                                                                \end{array}
                                                                
                                                                Derivation
                                                                1. Split input into 2 regimes
                                                                2. if F < 2.05e-299

                                                                  1. Initial program 76.8%

                                                                    \[\left(-x \cdot \frac{1}{\tan 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 rewrites45.2%

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

                                                                    \[\leadsto \frac{-1}{\color{blue}{B}} \]
                                                                  6. Step-by-step derivation
                                                                    1. lower-/.f6410.4%

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

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

                                                                  if 2.05e-299 < F

                                                                  1. Initial program 76.8%

                                                                    \[\left(-x \cdot \frac{1}{\tan 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 rewrites45.2%

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

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

                                                                      \[\leadsto \frac{1}{B} \]
                                                                  7. Applied rewrites10.0%

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

                                                                Alternative 19: 10.4% accurate, 25.4× 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.8%

                                                                  \[\left(-x \cdot \frac{1}{\tan 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 rewrites45.2%

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

                                                                  \[\leadsto \frac{-1}{\color{blue}{B}} \]
                                                                6. Step-by-step derivation
                                                                  1. lower-/.f6410.4%

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

                                                                  \[\leadsto \frac{-1}{\color{blue}{B}} \]
                                                                8. Add Preprocessing

                                                                Reproduce

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