VandenBroeck and Keller, Equation (23)

Percentage Accurate: 77.0% → 99.4%
Time: 44.9s
Alternatives: 31
Speedup: 1.4×

Specification

?
\[\begin{array}{l} \\ \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \end{array} \]
(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)));
}
real(8) function code(f, b, x)
    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]
\begin{array}{l}

\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}

Sampling outcomes in binary64 precision:

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

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

Initial Program: 77.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \end{array} \]
(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)));
}
real(8) function code(f, b, x)
    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]
\begin{array}{l}

\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}

Alternative 1: 99.4% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1 \cdot 10^{+55}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\

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

\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\


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

    1. Initial program 54.3%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Step-by-step derivation
      1. distribute-lft-neg-in54.3%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num67.9%

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

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

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

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

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

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

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

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

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

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

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

    if -1.00000000000000001e55 < F < 3.99999999999999982e-6

    1. Initial program 99.4%

      \[\left(-x \cdot \frac{1}{\tan 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. distribute-lft-neg-in99.4%

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

        \[\leadsto \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\right) \cdot \frac{1}{\tan B}} \]
      3. associate-*l/99.4%

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

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

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

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

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

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

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

    if 3.99999999999999982e-6 < F

    1. Initial program 59.7%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Step-by-step derivation
      1. distribute-lft-neg-in59.7%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num67.6%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{1}{\sin B}} - \frac{x}{\tan B} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification99.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1 \cdot 10^{+55}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 4 \cdot 10^{-6}:\\ \;\;\;\;F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 99.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -13000000000:\\ \;\;\;\;\frac{-1}{\sin B} - t\_0\\ \mathbf{elif}\;F \leq 4 \cdot 10^{-6}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t\_0\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (/ x (tan B))))
   (if (<= F -13000000000.0)
     (- (/ -1.0 (sin B)) t_0)
     (if (<= F 4e-6)
       (+
        (* x (/ -1.0 (tan B)))
        (* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)))
       (- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
	double t_0 = x / tan(B);
	double tmp;
	if (F <= -13000000000.0) {
		tmp = (-1.0 / sin(B)) - t_0;
	} else if (F <= 4e-6) {
		tmp = (x * (-1.0 / tan(B))) + ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
	} else {
		tmp = (1.0 / sin(B)) - t_0;
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: t_0
    real(8) :: tmp
    t_0 = x / tan(b)
    if (f <= (-13000000000.0d0)) then
        tmp = ((-1.0d0) / sin(b)) - t_0
    else if (f <= 4d-6) then
        tmp = (x * ((-1.0d0) / tan(b))) + ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)))
    else
        tmp = (1.0d0 / sin(b)) - t_0
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double t_0 = x / Math.tan(B);
	double tmp;
	if (F <= -13000000000.0) {
		tmp = (-1.0 / Math.sin(B)) - t_0;
	} else if (F <= 4e-6) {
		tmp = (x * (-1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
	} else {
		tmp = (1.0 / Math.sin(B)) - t_0;
	}
	return tmp;
}
def code(F, B, x):
	t_0 = x / math.tan(B)
	tmp = 0
	if F <= -13000000000.0:
		tmp = (-1.0 / math.sin(B)) - t_0
	elif F <= 4e-6:
		tmp = (x * (-1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5))
	else:
		tmp = (1.0 / math.sin(B)) - t_0
	return tmp
function code(F, B, x)
	t_0 = Float64(x / tan(B))
	tmp = 0.0
	if (F <= -13000000000.0)
		tmp = Float64(Float64(-1.0 / sin(B)) - t_0);
	elseif (F <= 4e-6)
		tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)));
	else
		tmp = Float64(Float64(1.0 / sin(B)) - t_0);
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = x / tan(B);
	tmp = 0.0;
	if (F <= -13000000000.0)
		tmp = (-1.0 / sin(B)) - t_0;
	elseif (F <= 4e-6)
		tmp = (x * (-1.0 / tan(B))) + ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5));
	else
		tmp = (1.0 / sin(B)) - t_0;
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -13000000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 4e-6], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -13000000000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\

\mathbf{elif}\;F \leq 4 \cdot 10^{-6}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\


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

    1. Initial program 59.2%

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

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

        \[\leadsto \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\right) \cdot \frac{1}{\tan B}} \]
      3. associate-*l/71.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.3e10 < F < 3.99999999999999982e-6

    1. Initial program 99.4%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Add Preprocessing

    if 3.99999999999999982e-6 < F

    1. Initial program 59.7%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Step-by-step derivation
      1. distribute-lft-neg-in59.7%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num67.6%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{1}{\sin B}} - \frac{x}{\tan B} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification99.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -13000000000:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 4 \cdot 10^{-6}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 98.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -1.45:\\ \;\;\;\;\frac{-1}{\sin B} - t\_0\\ \mathbf{elif}\;F \leq 4 \cdot 10^{-6}:\\ \;\;\;\;F \cdot \frac{1}{\sin B \cdot \sqrt{2 + x \cdot 2}} - t\_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t\_0\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (/ x (tan B))))
   (if (<= F -1.45)
     (- (/ -1.0 (sin B)) t_0)
     (if (<= F 4e-6)
       (- (* F (/ 1.0 (* (sin B) (sqrt (+ 2.0 (* x 2.0)))))) 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 <= -1.45) {
		tmp = (-1.0 / sin(B)) - t_0;
	} else if (F <= 4e-6) {
		tmp = (F * (1.0 / (sin(B) * sqrt((2.0 + (x * 2.0)))))) - t_0;
	} else {
		tmp = (1.0 / sin(B)) - t_0;
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: t_0
    real(8) :: tmp
    t_0 = x / tan(b)
    if (f <= (-1.45d0)) then
        tmp = ((-1.0d0) / sin(b)) - t_0
    else if (f <= 4d-6) then
        tmp = (f * (1.0d0 / (sin(b) * sqrt((2.0d0 + (x * 2.0d0)))))) - t_0
    else
        tmp = (1.0d0 / sin(b)) - t_0
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double t_0 = x / Math.tan(B);
	double tmp;
	if (F <= -1.45) {
		tmp = (-1.0 / Math.sin(B)) - t_0;
	} else if (F <= 4e-6) {
		tmp = (F * (1.0 / (Math.sin(B) * Math.sqrt((2.0 + (x * 2.0)))))) - t_0;
	} else {
		tmp = (1.0 / Math.sin(B)) - t_0;
	}
	return tmp;
}
def code(F, B, x):
	t_0 = x / math.tan(B)
	tmp = 0
	if F <= -1.45:
		tmp = (-1.0 / math.sin(B)) - t_0
	elif F <= 4e-6:
		tmp = (F * (1.0 / (math.sin(B) * math.sqrt((2.0 + (x * 2.0)))))) - t_0
	else:
		tmp = (1.0 / math.sin(B)) - t_0
	return tmp
function code(F, B, x)
	t_0 = Float64(x / tan(B))
	tmp = 0.0
	if (F <= -1.45)
		tmp = Float64(Float64(-1.0 / sin(B)) - t_0);
	elseif (F <= 4e-6)
		tmp = Float64(Float64(F * Float64(1.0 / Float64(sin(B) * sqrt(Float64(2.0 + Float64(x * 2.0)))))) - t_0);
	else
		tmp = Float64(Float64(1.0 / sin(B)) - t_0);
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = x / tan(B);
	tmp = 0.0;
	if (F <= -1.45)
		tmp = (-1.0 / sin(B)) - t_0;
	elseif (F <= 4e-6)
		tmp = (F * (1.0 / (sin(B) * sqrt((2.0 + (x * 2.0)))))) - t_0;
	else
		tmp = (1.0 / sin(B)) - t_0;
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.45], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 4e-6], N[(N[(F * N[(1.0 / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.45:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\

\mathbf{elif}\;F \leq 4 \cdot 10^{-6}:\\
\;\;\;\;F \cdot \frac{1}{\sin B \cdot \sqrt{2 + x \cdot 2}} - t\_0\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\


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

    1. Initial program 60.2%

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

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

        \[\leadsto \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\right) \cdot \frac{1}{\tan B}} \]
      3. associate-*l/72.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.44999999999999996 < F < 3.99999999999999982e-6

    1. Initial program 99.4%

      \[\left(-x \cdot \frac{1}{\tan 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. distribute-lft-neg-in99.4%

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

        \[\leadsto \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\right) \cdot \frac{1}{\tan B}} \]
      3. associate-*l/99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.99999999999999982e-6 < F

    1. Initial program 59.7%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Step-by-step derivation
      1. distribute-lft-neg-in59.7%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num67.6%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{1}{\sin B}} - \frac{x}{\tan B} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification99.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1.45:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 4 \cdot 10^{-6}:\\ \;\;\;\;F \cdot \frac{1}{\sin B \cdot \sqrt{2 + x \cdot 2}} - \frac{x}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 89.2% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -8.6 \cdot 10^{-7}:\\ \;\;\;\;\frac{-1}{\sin B} - t\_0\\ \mathbf{elif}\;F \leq -2.4 \cdot 10^{-216}:\\ \;\;\;\;\frac{F}{\sin B \cdot \sqrt{2}} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 1.35 \cdot 10^{-128}:\\ \;\;\;\;-t\_0\\ \mathbf{elif}\;F \leq 4 \cdot 10^{-6}:\\ \;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t\_0\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (/ x (tan B))))
   (if (<= F -8.6e-7)
     (- (/ -1.0 (sin B)) t_0)
     (if (<= F -2.4e-216)
       (- (/ F (* (sin B) (sqrt 2.0))) (/ x B))
       (if (<= F 1.35e-128)
         (- t_0)
         (if (<= F 4e-6)
           (-
            (* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
            (/ x B))
           (- (/ 1.0 (sin B)) t_0)))))))
double code(double F, double B, double x) {
	double t_0 = x / tan(B);
	double tmp;
	if (F <= -8.6e-7) {
		tmp = (-1.0 / sin(B)) - t_0;
	} else if (F <= -2.4e-216) {
		tmp = (F / (sin(B) * sqrt(2.0))) - (x / B);
	} else if (F <= 1.35e-128) {
		tmp = -t_0;
	} else if (F <= 4e-6) {
		tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
	} else {
		tmp = (1.0 / sin(B)) - t_0;
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: t_0
    real(8) :: tmp
    t_0 = x / tan(b)
    if (f <= (-8.6d-7)) then
        tmp = ((-1.0d0) / sin(b)) - t_0
    else if (f <= (-2.4d-216)) then
        tmp = (f / (sin(b) * sqrt(2.0d0))) - (x / b)
    else if (f <= 1.35d-128) then
        tmp = -t_0
    else if (f <= 4d-6) then
        tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
    else
        tmp = (1.0d0 / sin(b)) - t_0
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double t_0 = x / Math.tan(B);
	double tmp;
	if (F <= -8.6e-7) {
		tmp = (-1.0 / Math.sin(B)) - t_0;
	} else if (F <= -2.4e-216) {
		tmp = (F / (Math.sin(B) * Math.sqrt(2.0))) - (x / B);
	} else if (F <= 1.35e-128) {
		tmp = -t_0;
	} else if (F <= 4e-6) {
		tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
	} else {
		tmp = (1.0 / Math.sin(B)) - t_0;
	}
	return tmp;
}
def code(F, B, x):
	t_0 = x / math.tan(B)
	tmp = 0
	if F <= -8.6e-7:
		tmp = (-1.0 / math.sin(B)) - t_0
	elif F <= -2.4e-216:
		tmp = (F / (math.sin(B) * math.sqrt(2.0))) - (x / B)
	elif F <= 1.35e-128:
		tmp = -t_0
	elif F <= 4e-6:
		tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B)
	else:
		tmp = (1.0 / math.sin(B)) - t_0
	return tmp
function code(F, B, x)
	t_0 = Float64(x / tan(B))
	tmp = 0.0
	if (F <= -8.6e-7)
		tmp = Float64(Float64(-1.0 / sin(B)) - t_0);
	elseif (F <= -2.4e-216)
		tmp = Float64(Float64(F / Float64(sin(B) * sqrt(2.0))) - Float64(x / B));
	elseif (F <= 1.35e-128)
		tmp = Float64(-t_0);
	elseif (F <= 4e-6)
		tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) - Float64(x / B));
	else
		tmp = Float64(Float64(1.0 / sin(B)) - t_0);
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = x / tan(B);
	tmp = 0.0;
	if (F <= -8.6e-7)
		tmp = (-1.0 / sin(B)) - t_0;
	elseif (F <= -2.4e-216)
		tmp = (F / (sin(B) * sqrt(2.0))) - (x / B);
	elseif (F <= 1.35e-128)
		tmp = -t_0;
	elseif (F <= 4e-6)
		tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) - (x / B);
	else
		tmp = (1.0 / sin(B)) - t_0;
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -8.6e-7], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -2.4e-216], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.35e-128], (-t$95$0), If[LessEqual[F, 4e-6], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -8.6 \cdot 10^{-7}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\

\mathbf{elif}\;F \leq -2.4 \cdot 10^{-216}:\\
\;\;\;\;\frac{F}{\sin B \cdot \sqrt{2}} - \frac{x}{B}\\

\mathbf{elif}\;F \leq 1.35 \cdot 10^{-128}:\\
\;\;\;\;-t\_0\\

\mathbf{elif}\;F \leq 4 \cdot 10^{-6}:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if F < -8.6000000000000002e-7

    1. Initial program 61.1%

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

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

        \[\leadsto \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\right) \cdot \frac{1}{\tan B}} \]
      3. associate-*l/72.6%

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

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

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

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

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

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

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num72.6%

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

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

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

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

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

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

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

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

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

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

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

    if -8.6000000000000002e-7 < F < -2.40000000000000004e-216

    1. Initial program 99.3%

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

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

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

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

      \[\leadsto \color{blue}{\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - \frac{x}{B}} \]
    6. Taylor expanded in F around 0 82.0%

      \[\leadsto \frac{F}{\color{blue}{\sin B \cdot \sqrt{2 + 2 \cdot x}}} - \frac{x}{B} \]
    7. Step-by-step derivation
      1. *-commutative82.0%

        \[\leadsto \frac{F}{\color{blue}{\sqrt{2 + 2 \cdot x} \cdot \sin B}} - \frac{x}{B} \]
    8. Simplified82.0%

      \[\leadsto \frac{F}{\color{blue}{\sqrt{2 + 2 \cdot x} \cdot \sin B}} - \frac{x}{B} \]
    9. Taylor expanded in x around 0 82.0%

      \[\leadsto \frac{F}{\color{blue}{\sqrt{2}} \cdot \sin B} - \frac{x}{B} \]

    if -2.40000000000000004e-216 < F < 1.35000000000000003e-128

    1. Initial program 99.5%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Step-by-step derivation
      1. distribute-lft-neg-in99.5%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \color{blue}{\frac{\left(-x\right) \cdot 1}{\tan B}}\right) \]
      11. *-rgt-identity99.7%

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
    6. Step-by-step derivation
      1. mul-1-neg77.7%

        \[\leadsto \color{blue}{-\frac{x \cdot \cos B}{\sin B}} \]
      2. associate-/l*77.6%

        \[\leadsto -\color{blue}{x \cdot \frac{\cos B}{\sin B}} \]
    7. Simplified77.6%

      \[\leadsto \color{blue}{-x \cdot \frac{\cos B}{\sin B}} \]
    8. Step-by-step derivation
      1. clear-num77.6%

        \[\leadsto -x \cdot \color{blue}{\frac{1}{\frac{\sin B}{\cos B}}} \]
      2. un-div-inv77.7%

        \[\leadsto -\color{blue}{\frac{x}{\frac{\sin B}{\cos B}}} \]
      3. quot-tan77.8%

        \[\leadsto -\frac{x}{\color{blue}{\tan B}} \]
    9. Applied egg-rr77.8%

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

    if 1.35000000000000003e-128 < F < 3.99999999999999982e-6

    1. Initial program 99.4%

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

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

    if 3.99999999999999982e-6 < F

    1. Initial program 59.7%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Step-by-step derivation
      1. distribute-lft-neg-in59.7%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num67.6%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{1}{\sin B}} - \frac{x}{\tan B} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification91.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -8.6 \cdot 10^{-7}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -2.4 \cdot 10^{-216}:\\ \;\;\;\;\frac{F}{\sin B \cdot \sqrt{2}} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 1.35 \cdot 10^{-128}:\\ \;\;\;\;-\frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 4 \cdot 10^{-6}:\\ \;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 89.1% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\ t_1 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -8.6 \cdot 10^{-7}:\\ \;\;\;\;\frac{-1}{\sin B} - t\_1\\ \mathbf{elif}\;F \leq -1.3 \cdot 10^{-217}:\\ \;\;\;\;t\_0 \cdot \frac{1}{\frac{\sin B}{F}} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 1.62 \cdot 10^{-133}:\\ \;\;\;\;-t\_1\\ \mathbf{elif}\;F \leq 4 \cdot 10^{-6}:\\ \;\;\;\;\frac{F}{\sin B} \cdot t\_0 - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t\_1\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)) (t_1 (/ x (tan B))))
   (if (<= F -8.6e-7)
     (- (/ -1.0 (sin B)) t_1)
     (if (<= F -1.3e-217)
       (- (* t_0 (/ 1.0 (/ (sin B) F))) (/ x B))
       (if (<= F 1.62e-133)
         (- t_1)
         (if (<= F 4e-6)
           (- (* (/ F (sin B)) t_0) (/ x B))
           (- (/ 1.0 (sin B)) t_1)))))))
double code(double F, double B, double x) {
	double t_0 = pow(((2.0 + (F * F)) + (x * 2.0)), -0.5);
	double t_1 = x / tan(B);
	double tmp;
	if (F <= -8.6e-7) {
		tmp = (-1.0 / sin(B)) - t_1;
	} else if (F <= -1.3e-217) {
		tmp = (t_0 * (1.0 / (sin(B) / F))) - (x / B);
	} else if (F <= 1.62e-133) {
		tmp = -t_1;
	} else if (F <= 4e-6) {
		tmp = ((F / sin(B)) * t_0) - (x / B);
	} else {
		tmp = (1.0 / sin(B)) - t_1;
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = ((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)
    t_1 = x / tan(b)
    if (f <= (-8.6d-7)) then
        tmp = ((-1.0d0) / sin(b)) - t_1
    else if (f <= (-1.3d-217)) then
        tmp = (t_0 * (1.0d0 / (sin(b) / f))) - (x / b)
    else if (f <= 1.62d-133) then
        tmp = -t_1
    else if (f <= 4d-6) then
        tmp = ((f / sin(b)) * t_0) - (x / b)
    else
        tmp = (1.0d0 / sin(b)) - t_1
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double t_0 = Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5);
	double t_1 = x / Math.tan(B);
	double tmp;
	if (F <= -8.6e-7) {
		tmp = (-1.0 / Math.sin(B)) - t_1;
	} else if (F <= -1.3e-217) {
		tmp = (t_0 * (1.0 / (Math.sin(B) / F))) - (x / B);
	} else if (F <= 1.62e-133) {
		tmp = -t_1;
	} else if (F <= 4e-6) {
		tmp = ((F / Math.sin(B)) * t_0) - (x / B);
	} else {
		tmp = (1.0 / Math.sin(B)) - t_1;
	}
	return tmp;
}
def code(F, B, x):
	t_0 = math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)
	t_1 = x / math.tan(B)
	tmp = 0
	if F <= -8.6e-7:
		tmp = (-1.0 / math.sin(B)) - t_1
	elif F <= -1.3e-217:
		tmp = (t_0 * (1.0 / (math.sin(B) / F))) - (x / B)
	elif F <= 1.62e-133:
		tmp = -t_1
	elif F <= 4e-6:
		tmp = ((F / math.sin(B)) * t_0) - (x / B)
	else:
		tmp = (1.0 / math.sin(B)) - t_1
	return tmp
function code(F, B, x)
	t_0 = Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5
	t_1 = Float64(x / tan(B))
	tmp = 0.0
	if (F <= -8.6e-7)
		tmp = Float64(Float64(-1.0 / sin(B)) - t_1);
	elseif (F <= -1.3e-217)
		tmp = Float64(Float64(t_0 * Float64(1.0 / Float64(sin(B) / F))) - Float64(x / B));
	elseif (F <= 1.62e-133)
		tmp = Float64(-t_1);
	elseif (F <= 4e-6)
		tmp = Float64(Float64(Float64(F / sin(B)) * t_0) - Float64(x / B));
	else
		tmp = Float64(Float64(1.0 / sin(B)) - t_1);
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = ((2.0 + (F * F)) + (x * 2.0)) ^ -0.5;
	t_1 = x / tan(B);
	tmp = 0.0;
	if (F <= -8.6e-7)
		tmp = (-1.0 / sin(B)) - t_1;
	elseif (F <= -1.3e-217)
		tmp = (t_0 * (1.0 / (sin(B) / F))) - (x / B);
	elseif (F <= 1.62e-133)
		tmp = -t_1;
	elseif (F <= 4e-6)
		tmp = ((F / sin(B)) * t_0) - (x / B);
	else
		tmp = (1.0 / sin(B)) - t_1;
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := Block[{t$95$0 = N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -8.6e-7], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -1.3e-217], N[(N[(t$95$0 * N[(1.0 / N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.62e-133], (-t$95$1), If[LessEqual[F, 4e-6], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -8.6 \cdot 10^{-7}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\

\mathbf{elif}\;F \leq -1.3 \cdot 10^{-217}:\\
\;\;\;\;t\_0 \cdot \frac{1}{\frac{\sin B}{F}} - \frac{x}{B}\\

\mathbf{elif}\;F \leq 1.62 \cdot 10^{-133}:\\
\;\;\;\;-t\_1\\

\mathbf{elif}\;F \leq 4 \cdot 10^{-6}:\\
\;\;\;\;\frac{F}{\sin B} \cdot t\_0 - \frac{x}{B}\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if F < -8.6000000000000002e-7

    1. Initial program 61.1%

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

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

        \[\leadsto \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\right) \cdot \frac{1}{\tan B}} \]
      3. associate-*l/72.6%

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

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

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

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

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

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

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num72.6%

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

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

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

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

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

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

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

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

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

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

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

    if -8.6000000000000002e-7 < F < -1.29999999999999997e-217

    1. Initial program 99.3%

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

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

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

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

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

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

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

    if -1.29999999999999997e-217 < F < 1.61999999999999998e-133

    1. Initial program 99.5%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Step-by-step derivation
      1. distribute-lft-neg-in99.5%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \color{blue}{\frac{\left(-x\right) \cdot 1}{\tan B}}\right) \]
      11. *-rgt-identity99.7%

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
    6. Step-by-step derivation
      1. mul-1-neg77.7%

        \[\leadsto \color{blue}{-\frac{x \cdot \cos B}{\sin B}} \]
      2. associate-/l*77.6%

        \[\leadsto -\color{blue}{x \cdot \frac{\cos B}{\sin B}} \]
    7. Simplified77.6%

      \[\leadsto \color{blue}{-x \cdot \frac{\cos B}{\sin B}} \]
    8. Step-by-step derivation
      1. clear-num77.6%

        \[\leadsto -x \cdot \color{blue}{\frac{1}{\frac{\sin B}{\cos B}}} \]
      2. un-div-inv77.7%

        \[\leadsto -\color{blue}{\frac{x}{\frac{\sin B}{\cos B}}} \]
      3. quot-tan77.8%

        \[\leadsto -\frac{x}{\color{blue}{\tan B}} \]
    9. Applied egg-rr77.8%

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

    if 1.61999999999999998e-133 < F < 3.99999999999999982e-6

    1. Initial program 99.4%

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

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

    if 3.99999999999999982e-6 < F

    1. Initial program 59.7%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Step-by-step derivation
      1. distribute-lft-neg-in59.7%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num67.6%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{1}{\sin B}} - \frac{x}{\tan B} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification91.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -8.6 \cdot 10^{-7}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -1.3 \cdot 10^{-217}:\\ \;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{1}{\frac{\sin B}{F}} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 1.62 \cdot 10^{-133}:\\ \;\;\;\;-\frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 4 \cdot 10^{-6}:\\ \;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 71.3% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := F \cdot \frac{\sqrt{0.5}}{\sin B}\\ t_1 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -5.8 \cdot 10^{+84}:\\ \;\;\;\;\frac{-1}{B} - t\_1\\ \mathbf{elif}\;F \leq -4.4 \cdot 10^{-5}:\\ \;\;\;\;\frac{F}{\sin B \cdot \left(-0.5 \cdot \frac{2 + x \cdot 2}{F} - F\right)} - \frac{x}{B}\\ \mathbf{elif}\;F \leq -3.5 \cdot 10^{-140}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;F \leq 2.55 \cdot 10^{-84}:\\ \;\;\;\;-t\_1\\ \mathbf{elif}\;F \leq 4 \cdot 10^{-6}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;F \leq 5.5 \cdot 10^{+272}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;F \cdot \frac{1}{F \cdot B} - t\_1\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (* F (/ (sqrt 0.5) (sin B)))) (t_1 (/ x (tan B))))
   (if (<= F -5.8e+84)
     (- (/ -1.0 B) t_1)
     (if (<= F -4.4e-5)
       (- (/ F (* (sin B) (- (* -0.5 (/ (+ 2.0 (* x 2.0)) F)) F))) (/ x B))
       (if (<= F -3.5e-140)
         t_0
         (if (<= F 2.55e-84)
           (- t_1)
           (if (<= F 4e-6)
             t_0
             (if (<= F 5.5e+272)
               (- (/ 1.0 (sin B)) (/ x B))
               (- (* F (/ 1.0 (* F B))) t_1)))))))))
double code(double F, double B, double x) {
	double t_0 = F * (sqrt(0.5) / sin(B));
	double t_1 = x / tan(B);
	double tmp;
	if (F <= -5.8e+84) {
		tmp = (-1.0 / B) - t_1;
	} else if (F <= -4.4e-5) {
		tmp = (F / (sin(B) * ((-0.5 * ((2.0 + (x * 2.0)) / F)) - F))) - (x / B);
	} else if (F <= -3.5e-140) {
		tmp = t_0;
	} else if (F <= 2.55e-84) {
		tmp = -t_1;
	} else if (F <= 4e-6) {
		tmp = t_0;
	} else if (F <= 5.5e+272) {
		tmp = (1.0 / sin(B)) - (x / B);
	} else {
		tmp = (F * (1.0 / (F * B))) - t_1;
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = f * (sqrt(0.5d0) / sin(b))
    t_1 = x / tan(b)
    if (f <= (-5.8d+84)) then
        tmp = ((-1.0d0) / b) - t_1
    else if (f <= (-4.4d-5)) then
        tmp = (f / (sin(b) * (((-0.5d0) * ((2.0d0 + (x * 2.0d0)) / f)) - f))) - (x / b)
    else if (f <= (-3.5d-140)) then
        tmp = t_0
    else if (f <= 2.55d-84) then
        tmp = -t_1
    else if (f <= 4d-6) then
        tmp = t_0
    else if (f <= 5.5d+272) then
        tmp = (1.0d0 / sin(b)) - (x / b)
    else
        tmp = (f * (1.0d0 / (f * b))) - t_1
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double t_0 = F * (Math.sqrt(0.5) / Math.sin(B));
	double t_1 = x / Math.tan(B);
	double tmp;
	if (F <= -5.8e+84) {
		tmp = (-1.0 / B) - t_1;
	} else if (F <= -4.4e-5) {
		tmp = (F / (Math.sin(B) * ((-0.5 * ((2.0 + (x * 2.0)) / F)) - F))) - (x / B);
	} else if (F <= -3.5e-140) {
		tmp = t_0;
	} else if (F <= 2.55e-84) {
		tmp = -t_1;
	} else if (F <= 4e-6) {
		tmp = t_0;
	} else if (F <= 5.5e+272) {
		tmp = (1.0 / Math.sin(B)) - (x / B);
	} else {
		tmp = (F * (1.0 / (F * B))) - t_1;
	}
	return tmp;
}
def code(F, B, x):
	t_0 = F * (math.sqrt(0.5) / math.sin(B))
	t_1 = x / math.tan(B)
	tmp = 0
	if F <= -5.8e+84:
		tmp = (-1.0 / B) - t_1
	elif F <= -4.4e-5:
		tmp = (F / (math.sin(B) * ((-0.5 * ((2.0 + (x * 2.0)) / F)) - F))) - (x / B)
	elif F <= -3.5e-140:
		tmp = t_0
	elif F <= 2.55e-84:
		tmp = -t_1
	elif F <= 4e-6:
		tmp = t_0
	elif F <= 5.5e+272:
		tmp = (1.0 / math.sin(B)) - (x / B)
	else:
		tmp = (F * (1.0 / (F * B))) - t_1
	return tmp
function code(F, B, x)
	t_0 = Float64(F * Float64(sqrt(0.5) / sin(B)))
	t_1 = Float64(x / tan(B))
	tmp = 0.0
	if (F <= -5.8e+84)
		tmp = Float64(Float64(-1.0 / B) - t_1);
	elseif (F <= -4.4e-5)
		tmp = Float64(Float64(F / Float64(sin(B) * Float64(Float64(-0.5 * Float64(Float64(2.0 + Float64(x * 2.0)) / F)) - F))) - Float64(x / B));
	elseif (F <= -3.5e-140)
		tmp = t_0;
	elseif (F <= 2.55e-84)
		tmp = Float64(-t_1);
	elseif (F <= 4e-6)
		tmp = t_0;
	elseif (F <= 5.5e+272)
		tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B));
	else
		tmp = Float64(Float64(F * Float64(1.0 / Float64(F * B))) - t_1);
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = F * (sqrt(0.5) / sin(B));
	t_1 = x / tan(B);
	tmp = 0.0;
	if (F <= -5.8e+84)
		tmp = (-1.0 / B) - t_1;
	elseif (F <= -4.4e-5)
		tmp = (F / (sin(B) * ((-0.5 * ((2.0 + (x * 2.0)) / F)) - F))) - (x / B);
	elseif (F <= -3.5e-140)
		tmp = t_0;
	elseif (F <= 2.55e-84)
		tmp = -t_1;
	elseif (F <= 4e-6)
		tmp = t_0;
	elseif (F <= 5.5e+272)
		tmp = (1.0 / sin(B)) - (x / B);
	else
		tmp = (F * (1.0 / (F * B))) - t_1;
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := Block[{t$95$0 = N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -5.8e+84], N[(N[(-1.0 / B), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -4.4e-5], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[(N[(-0.5 * N[(N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -3.5e-140], t$95$0, If[LessEqual[F, 2.55e-84], (-t$95$1), If[LessEqual[F, 4e-6], t$95$0, If[LessEqual[F, 5.5e+272], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(F * N[(1.0 / N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := F \cdot \frac{\sqrt{0.5}}{\sin B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -5.8 \cdot 10^{+84}:\\
\;\;\;\;\frac{-1}{B} - t\_1\\

\mathbf{elif}\;F \leq -4.4 \cdot 10^{-5}:\\
\;\;\;\;\frac{F}{\sin B \cdot \left(-0.5 \cdot \frac{2 + x \cdot 2}{F} - F\right)} - \frac{x}{B}\\

\mathbf{elif}\;F \leq -3.5 \cdot 10^{-140}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;F \leq 2.55 \cdot 10^{-84}:\\
\;\;\;\;-t\_1\\

\mathbf{elif}\;F \leq 4 \cdot 10^{-6}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;F \leq 5.5 \cdot 10^{+272}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\

\mathbf{else}:\\
\;\;\;\;F \cdot \frac{1}{F \cdot B} - t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if F < -5.79999999999999977e84

    1. Initial program 50.9%

      \[\left(-x \cdot \frac{1}{\tan 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. distribute-lft-neg-in50.9%

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

        \[\leadsto \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\right) \cdot \frac{1}{\tan B}} \]
      3. associate-*l/64.5%

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

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

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

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

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

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

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num64.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.79999999999999977e84 < F < -4.3999999999999999e-5

    1. Initial program 95.0%

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

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

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

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

      \[\leadsto \color{blue}{\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - \frac{x}{B}} \]
    6. Taylor expanded in F around -inf 90.3%

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

    if -4.3999999999999999e-5 < F < -3.4999999999999998e-140 or 2.5499999999999998e-84 < F < 3.99999999999999982e-6

    1. Initial program 99.3%

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

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

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

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

      \[\leadsto \color{blue}{\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - \frac{x}{B}} \]
    6. Taylor expanded in F around 0 82.8%

      \[\leadsto \frac{F}{\color{blue}{\sin B \cdot \sqrt{2 + 2 \cdot x}}} - \frac{x}{B} \]
    7. Step-by-step derivation
      1. *-commutative82.8%

        \[\leadsto \frac{F}{\color{blue}{\sqrt{2 + 2 \cdot x} \cdot \sin B}} - \frac{x}{B} \]
    8. Simplified82.8%

      \[\leadsto \frac{F}{\color{blue}{\sqrt{2 + 2 \cdot x} \cdot \sin B}} - \frac{x}{B} \]
    9. Taylor expanded in x around 0 70.6%

      \[\leadsto \color{blue}{\frac{F \cdot \sqrt{0.5}}{\sin B}} \]
    10. Step-by-step derivation
      1. associate-/l*70.8%

        \[\leadsto \color{blue}{F \cdot \frac{\sqrt{0.5}}{\sin B}} \]
    11. Simplified70.8%

      \[\leadsto \color{blue}{F \cdot \frac{\sqrt{0.5}}{\sin B}} \]

    if -3.4999999999999998e-140 < F < 2.5499999999999998e-84

    1. Initial program 99.4%

      \[\left(-x \cdot \frac{1}{\tan 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. distribute-lft-neg-in99.4%

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

        \[\leadsto \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\right) \cdot \frac{1}{\tan B}} \]
      3. fma-define99.4%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \color{blue}{\frac{\left(-x\right) \cdot 1}{\tan B}}\right) \]
      11. *-rgt-identity99.7%

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
    6. Step-by-step derivation
      1. mul-1-neg75.0%

        \[\leadsto \color{blue}{-\frac{x \cdot \cos B}{\sin B}} \]
      2. associate-/l*74.9%

        \[\leadsto -\color{blue}{x \cdot \frac{\cos B}{\sin B}} \]
    7. Simplified74.9%

      \[\leadsto \color{blue}{-x \cdot \frac{\cos B}{\sin B}} \]
    8. Step-by-step derivation
      1. clear-num74.8%

        \[\leadsto -x \cdot \color{blue}{\frac{1}{\frac{\sin B}{\cos B}}} \]
      2. un-div-inv75.0%

        \[\leadsto -\color{blue}{\frac{x}{\frac{\sin B}{\cos B}}} \]
      3. quot-tan75.1%

        \[\leadsto -\frac{x}{\color{blue}{\tan B}} \]
    9. Applied egg-rr75.1%

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

    if 3.99999999999999982e-6 < F < 5.4999999999999998e272

    1. Initial program 61.7%

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

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    4. Taylor expanded in F around inf 82.8%

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

    if 5.4999999999999998e272 < F

    1. Initial program 50.7%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Step-by-step derivation
      1. distribute-lft-neg-in50.7%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto F \cdot \color{blue}{\frac{1}{B \cdot F}} - \frac{x}{\tan B} \]
    7. Step-by-step derivation
      1. *-commutative90.7%

        \[\leadsto F \cdot \frac{1}{\color{blue}{F \cdot B}} - \frac{x}{\tan B} \]
    8. Simplified90.7%

      \[\leadsto F \cdot \color{blue}{\frac{1}{F \cdot B}} - \frac{x}{\tan B} \]
  3. Recombined 6 regimes into one program.
  4. Final simplification79.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -5.8 \cdot 10^{+84}:\\ \;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -4.4 \cdot 10^{-5}:\\ \;\;\;\;\frac{F}{\sin B \cdot \left(-0.5 \cdot \frac{2 + x \cdot 2}{F} - F\right)} - \frac{x}{B}\\ \mathbf{elif}\;F \leq -3.5 \cdot 10^{-140}:\\ \;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B}\\ \mathbf{elif}\;F \leq 2.55 \cdot 10^{-84}:\\ \;\;\;\;-\frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 4 \cdot 10^{-6}:\\ \;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B}\\ \mathbf{elif}\;F \leq 5.5 \cdot 10^{+272}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;F \cdot \frac{1}{F \cdot B} - \frac{x}{\tan B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 89.1% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{F}{\sin B \cdot \sqrt{2}} - \frac{x}{B}\\ t_1 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -8.6 \cdot 10^{-7}:\\ \;\;\;\;\frac{-1}{\sin B} - t\_1\\ \mathbf{elif}\;F \leq -3 \cdot 10^{-221}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;F \leq 3.4 \cdot 10^{-133}:\\ \;\;\;\;-t\_1\\ \mathbf{elif}\;F \leq 4 \cdot 10^{-6}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t\_1\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (- (/ F (* (sin B) (sqrt 2.0))) (/ x B))) (t_1 (/ x (tan B))))
   (if (<= F -8.6e-7)
     (- (/ -1.0 (sin B)) t_1)
     (if (<= F -3e-221)
       t_0
       (if (<= F 3.4e-133)
         (- t_1)
         (if (<= F 4e-6) t_0 (- (/ 1.0 (sin B)) t_1)))))))
double code(double F, double B, double x) {
	double t_0 = (F / (sin(B) * sqrt(2.0))) - (x / B);
	double t_1 = x / tan(B);
	double tmp;
	if (F <= -8.6e-7) {
		tmp = (-1.0 / sin(B)) - t_1;
	} else if (F <= -3e-221) {
		tmp = t_0;
	} else if (F <= 3.4e-133) {
		tmp = -t_1;
	} else if (F <= 4e-6) {
		tmp = t_0;
	} else {
		tmp = (1.0 / sin(B)) - t_1;
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = (f / (sin(b) * sqrt(2.0d0))) - (x / b)
    t_1 = x / tan(b)
    if (f <= (-8.6d-7)) then
        tmp = ((-1.0d0) / sin(b)) - t_1
    else if (f <= (-3d-221)) then
        tmp = t_0
    else if (f <= 3.4d-133) then
        tmp = -t_1
    else if (f <= 4d-6) then
        tmp = t_0
    else
        tmp = (1.0d0 / sin(b)) - t_1
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double t_0 = (F / (Math.sin(B) * Math.sqrt(2.0))) - (x / B);
	double t_1 = x / Math.tan(B);
	double tmp;
	if (F <= -8.6e-7) {
		tmp = (-1.0 / Math.sin(B)) - t_1;
	} else if (F <= -3e-221) {
		tmp = t_0;
	} else if (F <= 3.4e-133) {
		tmp = -t_1;
	} else if (F <= 4e-6) {
		tmp = t_0;
	} else {
		tmp = (1.0 / Math.sin(B)) - t_1;
	}
	return tmp;
}
def code(F, B, x):
	t_0 = (F / (math.sin(B) * math.sqrt(2.0))) - (x / B)
	t_1 = x / math.tan(B)
	tmp = 0
	if F <= -8.6e-7:
		tmp = (-1.0 / math.sin(B)) - t_1
	elif F <= -3e-221:
		tmp = t_0
	elif F <= 3.4e-133:
		tmp = -t_1
	elif F <= 4e-6:
		tmp = t_0
	else:
		tmp = (1.0 / math.sin(B)) - t_1
	return tmp
function code(F, B, x)
	t_0 = Float64(Float64(F / Float64(sin(B) * sqrt(2.0))) - Float64(x / B))
	t_1 = Float64(x / tan(B))
	tmp = 0.0
	if (F <= -8.6e-7)
		tmp = Float64(Float64(-1.0 / sin(B)) - t_1);
	elseif (F <= -3e-221)
		tmp = t_0;
	elseif (F <= 3.4e-133)
		tmp = Float64(-t_1);
	elseif (F <= 4e-6)
		tmp = t_0;
	else
		tmp = Float64(Float64(1.0 / sin(B)) - t_1);
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = (F / (sin(B) * sqrt(2.0))) - (x / B);
	t_1 = x / tan(B);
	tmp = 0.0;
	if (F <= -8.6e-7)
		tmp = (-1.0 / sin(B)) - t_1;
	elseif (F <= -3e-221)
		tmp = t_0;
	elseif (F <= 3.4e-133)
		tmp = -t_1;
	elseif (F <= 4e-6)
		tmp = t_0;
	else
		tmp = (1.0 / sin(B)) - t_1;
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -8.6e-7], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -3e-221], t$95$0, If[LessEqual[F, 3.4e-133], (-t$95$1), If[LessEqual[F, 4e-6], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{F}{\sin B \cdot \sqrt{2}} - \frac{x}{B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -8.6 \cdot 10^{-7}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\

\mathbf{elif}\;F \leq -3 \cdot 10^{-221}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;F \leq 3.4 \cdot 10^{-133}:\\
\;\;\;\;-t\_1\\

\mathbf{elif}\;F \leq 4 \cdot 10^{-6}:\\
\;\;\;\;t\_0\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_1\\


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

    1. Initial program 61.1%

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

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

        \[\leadsto \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\right) \cdot \frac{1}{\tan B}} \]
      3. associate-*l/72.6%

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

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

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

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

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

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

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num72.6%

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

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

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

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

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

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

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

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

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

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

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

    if -8.6000000000000002e-7 < F < -3.0000000000000002e-221 or 3.40000000000000006e-133 < F < 3.99999999999999982e-6

    1. Initial program 99.3%

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

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

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

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

      \[\leadsto \color{blue}{\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - \frac{x}{B}} \]
    6. Taylor expanded in F around 0 84.4%

      \[\leadsto \frac{F}{\color{blue}{\sin B \cdot \sqrt{2 + 2 \cdot x}}} - \frac{x}{B} \]
    7. Step-by-step derivation
      1. *-commutative84.4%

        \[\leadsto \frac{F}{\color{blue}{\sqrt{2 + 2 \cdot x} \cdot \sin B}} - \frac{x}{B} \]
    8. Simplified84.4%

      \[\leadsto \frac{F}{\color{blue}{\sqrt{2 + 2 \cdot x} \cdot \sin B}} - \frac{x}{B} \]
    9. Taylor expanded in x around 0 84.4%

      \[\leadsto \frac{F}{\color{blue}{\sqrt{2}} \cdot \sin B} - \frac{x}{B} \]

    if -3.0000000000000002e-221 < F < 3.40000000000000006e-133

    1. Initial program 99.5%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Step-by-step derivation
      1. distribute-lft-neg-in99.5%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \color{blue}{\frac{\left(-x\right) \cdot 1}{\tan B}}\right) \]
      11. *-rgt-identity99.7%

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
    6. Step-by-step derivation
      1. mul-1-neg77.7%

        \[\leadsto \color{blue}{-\frac{x \cdot \cos B}{\sin B}} \]
      2. associate-/l*77.6%

        \[\leadsto -\color{blue}{x \cdot \frac{\cos B}{\sin B}} \]
    7. Simplified77.6%

      \[\leadsto \color{blue}{-x \cdot \frac{\cos B}{\sin B}} \]
    8. Step-by-step derivation
      1. clear-num77.6%

        \[\leadsto -x \cdot \color{blue}{\frac{1}{\frac{\sin B}{\cos B}}} \]
      2. un-div-inv77.7%

        \[\leadsto -\color{blue}{\frac{x}{\frac{\sin B}{\cos B}}} \]
      3. quot-tan77.8%

        \[\leadsto -\frac{x}{\color{blue}{\tan B}} \]
    9. Applied egg-rr77.8%

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

    if 3.99999999999999982e-6 < F

    1. Initial program 59.7%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Step-by-step derivation
      1. distribute-lft-neg-in59.7%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num67.6%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{1}{\sin B}} - \frac{x}{\tan B} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification91.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -8.6 \cdot 10^{-7}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -3 \cdot 10^{-221}:\\ \;\;\;\;\frac{F}{\sin B \cdot \sqrt{2}} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 3.4 \cdot 10^{-133}:\\ \;\;\;\;-\frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 4 \cdot 10^{-6}:\\ \;\;\;\;\frac{F}{\sin B \cdot \sqrt{2}} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 85.4% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := F \cdot \frac{\sqrt{0.5}}{\sin B}\\ t_1 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -2.5 \cdot 10^{-7}:\\ \;\;\;\;\frac{-1}{\sin B} - t\_1\\ \mathbf{elif}\;F \leq -3.5 \cdot 10^{-140}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;F \leq 3.2 \cdot 10^{-82}:\\ \;\;\;\;-t\_1\\ \mathbf{elif}\;F \leq 4 \cdot 10^{-6}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t\_1\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (* F (/ (sqrt 0.5) (sin B)))) (t_1 (/ x (tan B))))
   (if (<= F -2.5e-7)
     (- (/ -1.0 (sin B)) t_1)
     (if (<= F -3.5e-140)
       t_0
       (if (<= F 3.2e-82)
         (- t_1)
         (if (<= F 4e-6) t_0 (- (/ 1.0 (sin B)) t_1)))))))
double code(double F, double B, double x) {
	double t_0 = F * (sqrt(0.5) / sin(B));
	double t_1 = x / tan(B);
	double tmp;
	if (F <= -2.5e-7) {
		tmp = (-1.0 / sin(B)) - t_1;
	} else if (F <= -3.5e-140) {
		tmp = t_0;
	} else if (F <= 3.2e-82) {
		tmp = -t_1;
	} else if (F <= 4e-6) {
		tmp = t_0;
	} else {
		tmp = (1.0 / sin(B)) - t_1;
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = f * (sqrt(0.5d0) / sin(b))
    t_1 = x / tan(b)
    if (f <= (-2.5d-7)) then
        tmp = ((-1.0d0) / sin(b)) - t_1
    else if (f <= (-3.5d-140)) then
        tmp = t_0
    else if (f <= 3.2d-82) then
        tmp = -t_1
    else if (f <= 4d-6) then
        tmp = t_0
    else
        tmp = (1.0d0 / sin(b)) - t_1
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double t_0 = F * (Math.sqrt(0.5) / Math.sin(B));
	double t_1 = x / Math.tan(B);
	double tmp;
	if (F <= -2.5e-7) {
		tmp = (-1.0 / Math.sin(B)) - t_1;
	} else if (F <= -3.5e-140) {
		tmp = t_0;
	} else if (F <= 3.2e-82) {
		tmp = -t_1;
	} else if (F <= 4e-6) {
		tmp = t_0;
	} else {
		tmp = (1.0 / Math.sin(B)) - t_1;
	}
	return tmp;
}
def code(F, B, x):
	t_0 = F * (math.sqrt(0.5) / math.sin(B))
	t_1 = x / math.tan(B)
	tmp = 0
	if F <= -2.5e-7:
		tmp = (-1.0 / math.sin(B)) - t_1
	elif F <= -3.5e-140:
		tmp = t_0
	elif F <= 3.2e-82:
		tmp = -t_1
	elif F <= 4e-6:
		tmp = t_0
	else:
		tmp = (1.0 / math.sin(B)) - t_1
	return tmp
function code(F, B, x)
	t_0 = Float64(F * Float64(sqrt(0.5) / sin(B)))
	t_1 = Float64(x / tan(B))
	tmp = 0.0
	if (F <= -2.5e-7)
		tmp = Float64(Float64(-1.0 / sin(B)) - t_1);
	elseif (F <= -3.5e-140)
		tmp = t_0;
	elseif (F <= 3.2e-82)
		tmp = Float64(-t_1);
	elseif (F <= 4e-6)
		tmp = t_0;
	else
		tmp = Float64(Float64(1.0 / sin(B)) - t_1);
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = F * (sqrt(0.5) / sin(B));
	t_1 = x / tan(B);
	tmp = 0.0;
	if (F <= -2.5e-7)
		tmp = (-1.0 / sin(B)) - t_1;
	elseif (F <= -3.5e-140)
		tmp = t_0;
	elseif (F <= 3.2e-82)
		tmp = -t_1;
	elseif (F <= 4e-6)
		tmp = t_0;
	else
		tmp = (1.0 / sin(B)) - t_1;
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := Block[{t$95$0 = N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.5e-7], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -3.5e-140], t$95$0, If[LessEqual[F, 3.2e-82], (-t$95$1), If[LessEqual[F, 4e-6], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := F \cdot \frac{\sqrt{0.5}}{\sin B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2.5 \cdot 10^{-7}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\

\mathbf{elif}\;F \leq -3.5 \cdot 10^{-140}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;F \leq 3.2 \cdot 10^{-82}:\\
\;\;\;\;-t\_1\\

\mathbf{elif}\;F \leq 4 \cdot 10^{-6}:\\
\;\;\;\;t\_0\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_1\\


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

    1. Initial program 61.1%

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

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

        \[\leadsto \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\right) \cdot \frac{1}{\tan B}} \]
      3. associate-*l/72.6%

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

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

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

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

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

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

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num72.6%

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

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

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

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

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

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

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

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

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

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

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

    if -2.49999999999999989e-7 < F < -3.4999999999999998e-140 or 3.2000000000000001e-82 < F < 3.99999999999999982e-6

    1. Initial program 99.3%

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

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

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

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

      \[\leadsto \color{blue}{\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - \frac{x}{B}} \]
    6. Taylor expanded in F around 0 84.8%

      \[\leadsto \frac{F}{\color{blue}{\sin B \cdot \sqrt{2 + 2 \cdot x}}} - \frac{x}{B} \]
    7. Step-by-step derivation
      1. *-commutative84.8%

        \[\leadsto \frac{F}{\color{blue}{\sqrt{2 + 2 \cdot x} \cdot \sin B}} - \frac{x}{B} \]
    8. Simplified84.8%

      \[\leadsto \frac{F}{\color{blue}{\sqrt{2 + 2 \cdot x} \cdot \sin B}} - \frac{x}{B} \]
    9. Taylor expanded in x around 0 72.2%

      \[\leadsto \color{blue}{\frac{F \cdot \sqrt{0.5}}{\sin B}} \]
    10. Step-by-step derivation
      1. associate-/l*72.4%

        \[\leadsto \color{blue}{F \cdot \frac{\sqrt{0.5}}{\sin B}} \]
    11. Simplified72.4%

      \[\leadsto \color{blue}{F \cdot \frac{\sqrt{0.5}}{\sin B}} \]

    if -3.4999999999999998e-140 < F < 3.2000000000000001e-82

    1. Initial program 99.4%

      \[\left(-x \cdot \frac{1}{\tan 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. distribute-lft-neg-in99.4%

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

        \[\leadsto \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\right) \cdot \frac{1}{\tan B}} \]
      3. fma-define99.4%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \color{blue}{\frac{\left(-x\right) \cdot 1}{\tan B}}\right) \]
      11. *-rgt-identity99.7%

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
    6. Step-by-step derivation
      1. mul-1-neg75.0%

        \[\leadsto \color{blue}{-\frac{x \cdot \cos B}{\sin B}} \]
      2. associate-/l*74.9%

        \[\leadsto -\color{blue}{x \cdot \frac{\cos B}{\sin B}} \]
    7. Simplified74.9%

      \[\leadsto \color{blue}{-x \cdot \frac{\cos B}{\sin B}} \]
    8. Step-by-step derivation
      1. clear-num74.8%

        \[\leadsto -x \cdot \color{blue}{\frac{1}{\frac{\sin B}{\cos B}}} \]
      2. un-div-inv75.0%

        \[\leadsto -\color{blue}{\frac{x}{\frac{\sin B}{\cos B}}} \]
      3. quot-tan75.1%

        \[\leadsto -\frac{x}{\color{blue}{\tan B}} \]
    9. Applied egg-rr75.1%

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

    if 3.99999999999999982e-6 < F

    1. Initial program 59.7%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Step-by-step derivation
      1. distribute-lft-neg-in59.7%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num67.6%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{1}{\sin B}} - \frac{x}{\tan B} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification88.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -2.5 \cdot 10^{-7}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -3.5 \cdot 10^{-140}:\\ \;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B}\\ \mathbf{elif}\;F \leq 3.2 \cdot 10^{-82}:\\ \;\;\;\;-\frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 4 \cdot 10^{-6}:\\ \;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 78.4% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := F \cdot \frac{\sqrt{0.5}}{\sin B}\\ t_1 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -5 \cdot 10^{-7}:\\ \;\;\;\;\frac{-1}{\sin B} - t\_1\\ \mathbf{elif}\;F \leq -6.8 \cdot 10^{-140}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;F \leq 6 \cdot 10^{-87}:\\ \;\;\;\;-t\_1\\ \mathbf{elif}\;F \leq 4 \cdot 10^{-6}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;F \leq 9.4 \cdot 10^{+272}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;F \cdot \frac{1}{F \cdot B} - t\_1\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (* F (/ (sqrt 0.5) (sin B)))) (t_1 (/ x (tan B))))
   (if (<= F -5e-7)
     (- (/ -1.0 (sin B)) t_1)
     (if (<= F -6.8e-140)
       t_0
       (if (<= F 6e-87)
         (- t_1)
         (if (<= F 4e-6)
           t_0
           (if (<= F 9.4e+272)
             (- (/ 1.0 (sin B)) (/ x B))
             (- (* F (/ 1.0 (* F B))) t_1))))))))
double code(double F, double B, double x) {
	double t_0 = F * (sqrt(0.5) / sin(B));
	double t_1 = x / tan(B);
	double tmp;
	if (F <= -5e-7) {
		tmp = (-1.0 / sin(B)) - t_1;
	} else if (F <= -6.8e-140) {
		tmp = t_0;
	} else if (F <= 6e-87) {
		tmp = -t_1;
	} else if (F <= 4e-6) {
		tmp = t_0;
	} else if (F <= 9.4e+272) {
		tmp = (1.0 / sin(B)) - (x / B);
	} else {
		tmp = (F * (1.0 / (F * B))) - t_1;
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = f * (sqrt(0.5d0) / sin(b))
    t_1 = x / tan(b)
    if (f <= (-5d-7)) then
        tmp = ((-1.0d0) / sin(b)) - t_1
    else if (f <= (-6.8d-140)) then
        tmp = t_0
    else if (f <= 6d-87) then
        tmp = -t_1
    else if (f <= 4d-6) then
        tmp = t_0
    else if (f <= 9.4d+272) then
        tmp = (1.0d0 / sin(b)) - (x / b)
    else
        tmp = (f * (1.0d0 / (f * b))) - t_1
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double t_0 = F * (Math.sqrt(0.5) / Math.sin(B));
	double t_1 = x / Math.tan(B);
	double tmp;
	if (F <= -5e-7) {
		tmp = (-1.0 / Math.sin(B)) - t_1;
	} else if (F <= -6.8e-140) {
		tmp = t_0;
	} else if (F <= 6e-87) {
		tmp = -t_1;
	} else if (F <= 4e-6) {
		tmp = t_0;
	} else if (F <= 9.4e+272) {
		tmp = (1.0 / Math.sin(B)) - (x / B);
	} else {
		tmp = (F * (1.0 / (F * B))) - t_1;
	}
	return tmp;
}
def code(F, B, x):
	t_0 = F * (math.sqrt(0.5) / math.sin(B))
	t_1 = x / math.tan(B)
	tmp = 0
	if F <= -5e-7:
		tmp = (-1.0 / math.sin(B)) - t_1
	elif F <= -6.8e-140:
		tmp = t_0
	elif F <= 6e-87:
		tmp = -t_1
	elif F <= 4e-6:
		tmp = t_0
	elif F <= 9.4e+272:
		tmp = (1.0 / math.sin(B)) - (x / B)
	else:
		tmp = (F * (1.0 / (F * B))) - t_1
	return tmp
function code(F, B, x)
	t_0 = Float64(F * Float64(sqrt(0.5) / sin(B)))
	t_1 = Float64(x / tan(B))
	tmp = 0.0
	if (F <= -5e-7)
		tmp = Float64(Float64(-1.0 / sin(B)) - t_1);
	elseif (F <= -6.8e-140)
		tmp = t_0;
	elseif (F <= 6e-87)
		tmp = Float64(-t_1);
	elseif (F <= 4e-6)
		tmp = t_0;
	elseif (F <= 9.4e+272)
		tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B));
	else
		tmp = Float64(Float64(F * Float64(1.0 / Float64(F * B))) - t_1);
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = F * (sqrt(0.5) / sin(B));
	t_1 = x / tan(B);
	tmp = 0.0;
	if (F <= -5e-7)
		tmp = (-1.0 / sin(B)) - t_1;
	elseif (F <= -6.8e-140)
		tmp = t_0;
	elseif (F <= 6e-87)
		tmp = -t_1;
	elseif (F <= 4e-6)
		tmp = t_0;
	elseif (F <= 9.4e+272)
		tmp = (1.0 / sin(B)) - (x / B);
	else
		tmp = (F * (1.0 / (F * B))) - t_1;
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := Block[{t$95$0 = N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -5e-7], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -6.8e-140], t$95$0, If[LessEqual[F, 6e-87], (-t$95$1), If[LessEqual[F, 4e-6], t$95$0, If[LessEqual[F, 9.4e+272], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(F * N[(1.0 / N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := F \cdot \frac{\sqrt{0.5}}{\sin B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -5 \cdot 10^{-7}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\

\mathbf{elif}\;F \leq -6.8 \cdot 10^{-140}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;F \leq 6 \cdot 10^{-87}:\\
\;\;\;\;-t\_1\\

\mathbf{elif}\;F \leq 4 \cdot 10^{-6}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;F \leq 9.4 \cdot 10^{+272}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\

\mathbf{else}:\\
\;\;\;\;F \cdot \frac{1}{F \cdot B} - t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if F < -4.99999999999999977e-7

    1. Initial program 61.1%

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

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

        \[\leadsto \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\right) \cdot \frac{1}{\tan B}} \]
      3. associate-*l/72.6%

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

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

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

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

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

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

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num72.6%

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

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

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

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

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

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

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

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

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

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

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

    if -4.99999999999999977e-7 < F < -6.80000000000000017e-140 or 6.00000000000000033e-87 < F < 3.99999999999999982e-6

    1. Initial program 99.3%

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

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

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

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

      \[\leadsto \color{blue}{\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - \frac{x}{B}} \]
    6. Taylor expanded in F around 0 84.8%

      \[\leadsto \frac{F}{\color{blue}{\sin B \cdot \sqrt{2 + 2 \cdot x}}} - \frac{x}{B} \]
    7. Step-by-step derivation
      1. *-commutative84.8%

        \[\leadsto \frac{F}{\color{blue}{\sqrt{2 + 2 \cdot x} \cdot \sin B}} - \frac{x}{B} \]
    8. Simplified84.8%

      \[\leadsto \frac{F}{\color{blue}{\sqrt{2 + 2 \cdot x} \cdot \sin B}} - \frac{x}{B} \]
    9. Taylor expanded in x around 0 72.2%

      \[\leadsto \color{blue}{\frac{F \cdot \sqrt{0.5}}{\sin B}} \]
    10. Step-by-step derivation
      1. associate-/l*72.4%

        \[\leadsto \color{blue}{F \cdot \frac{\sqrt{0.5}}{\sin B}} \]
    11. Simplified72.4%

      \[\leadsto \color{blue}{F \cdot \frac{\sqrt{0.5}}{\sin B}} \]

    if -6.80000000000000017e-140 < F < 6.00000000000000033e-87

    1. Initial program 99.4%

      \[\left(-x \cdot \frac{1}{\tan 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. distribute-lft-neg-in99.4%

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

        \[\leadsto \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\right) \cdot \frac{1}{\tan B}} \]
      3. fma-define99.4%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \color{blue}{\frac{\left(-x\right) \cdot 1}{\tan B}}\right) \]
      11. *-rgt-identity99.7%

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
    6. Step-by-step derivation
      1. mul-1-neg75.0%

        \[\leadsto \color{blue}{-\frac{x \cdot \cos B}{\sin B}} \]
      2. associate-/l*74.9%

        \[\leadsto -\color{blue}{x \cdot \frac{\cos B}{\sin B}} \]
    7. Simplified74.9%

      \[\leadsto \color{blue}{-x \cdot \frac{\cos B}{\sin B}} \]
    8. Step-by-step derivation
      1. clear-num74.8%

        \[\leadsto -x \cdot \color{blue}{\frac{1}{\frac{\sin B}{\cos B}}} \]
      2. un-div-inv75.0%

        \[\leadsto -\color{blue}{\frac{x}{\frac{\sin B}{\cos B}}} \]
      3. quot-tan75.1%

        \[\leadsto -\frac{x}{\color{blue}{\tan B}} \]
    9. Applied egg-rr75.1%

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

    if 3.99999999999999982e-6 < F < 9.3999999999999999e272

    1. Initial program 61.7%

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

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    4. Taylor expanded in F around inf 82.8%

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

    if 9.3999999999999999e272 < F

    1. Initial program 50.7%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Step-by-step derivation
      1. distribute-lft-neg-in50.7%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto F \cdot \color{blue}{\frac{1}{B \cdot F}} - \frac{x}{\tan B} \]
    7. Step-by-step derivation
      1. *-commutative90.7%

        \[\leadsto F \cdot \frac{1}{\color{blue}{F \cdot B}} - \frac{x}{\tan B} \]
    8. Simplified90.7%

      \[\leadsto F \cdot \color{blue}{\frac{1}{F \cdot B}} - \frac{x}{\tan B} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification84.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -5 \cdot 10^{-7}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -6.8 \cdot 10^{-140}:\\ \;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B}\\ \mathbf{elif}\;F \leq 6 \cdot 10^{-87}:\\ \;\;\;\;-\frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 4 \cdot 10^{-6}:\\ \;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B}\\ \mathbf{elif}\;F \leq 9.4 \cdot 10^{+272}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;F \cdot \frac{1}{F \cdot B} - \frac{x}{\tan B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 68.9% accurate, 2.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{F}{B \cdot \sqrt{2 + x \cdot 2}} - \frac{x}{B}\\ t_1 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -9.6 \cdot 10^{+84}:\\ \;\;\;\;\frac{-1}{B} - t\_1\\ \mathbf{elif}\;F \leq -3.1 \cdot 10^{-17}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq -3.7 \cdot 10^{-199}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;F \leq 9.8 \cdot 10^{-113}:\\ \;\;\;\;-t\_1\\ \mathbf{elif}\;F \leq 5.8 \cdot 10^{-65}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;F \leq 2.05 \cdot 10^{-42}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B}\\ \mathbf{elif}\;F \leq 8.5 \cdot 10^{+272}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;F \cdot \frac{1}{F \cdot B} - t\_1\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (- (/ F (* B (sqrt (+ 2.0 (* x 2.0))))) (/ x B)))
        (t_1 (/ x (tan B))))
   (if (<= F -9.6e+84)
     (- (/ -1.0 B) t_1)
     (if (<= F -3.1e-17)
       (- (/ -1.0 (sin B)) (/ x B))
       (if (<= F -3.7e-199)
         t_0
         (if (<= F 9.8e-113)
           (- t_1)
           (if (<= F 5.8e-65)
             t_0
             (if (<= F 2.05e-42)
               (* x (/ -1.0 (tan B)))
               (if (<= F 8.5e+272)
                 (- (/ 1.0 (sin B)) (/ x B))
                 (- (* F (/ 1.0 (* F B))) t_1))))))))))
double code(double F, double B, double x) {
	double t_0 = (F / (B * sqrt((2.0 + (x * 2.0))))) - (x / B);
	double t_1 = x / tan(B);
	double tmp;
	if (F <= -9.6e+84) {
		tmp = (-1.0 / B) - t_1;
	} else if (F <= -3.1e-17) {
		tmp = (-1.0 / sin(B)) - (x / B);
	} else if (F <= -3.7e-199) {
		tmp = t_0;
	} else if (F <= 9.8e-113) {
		tmp = -t_1;
	} else if (F <= 5.8e-65) {
		tmp = t_0;
	} else if (F <= 2.05e-42) {
		tmp = x * (-1.0 / tan(B));
	} else if (F <= 8.5e+272) {
		tmp = (1.0 / sin(B)) - (x / B);
	} else {
		tmp = (F * (1.0 / (F * B))) - t_1;
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = (f / (b * sqrt((2.0d0 + (x * 2.0d0))))) - (x / b)
    t_1 = x / tan(b)
    if (f <= (-9.6d+84)) then
        tmp = ((-1.0d0) / b) - t_1
    else if (f <= (-3.1d-17)) then
        tmp = ((-1.0d0) / sin(b)) - (x / b)
    else if (f <= (-3.7d-199)) then
        tmp = t_0
    else if (f <= 9.8d-113) then
        tmp = -t_1
    else if (f <= 5.8d-65) then
        tmp = t_0
    else if (f <= 2.05d-42) then
        tmp = x * ((-1.0d0) / tan(b))
    else if (f <= 8.5d+272) then
        tmp = (1.0d0 / sin(b)) - (x / b)
    else
        tmp = (f * (1.0d0 / (f * b))) - t_1
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double t_0 = (F / (B * Math.sqrt((2.0 + (x * 2.0))))) - (x / B);
	double t_1 = x / Math.tan(B);
	double tmp;
	if (F <= -9.6e+84) {
		tmp = (-1.0 / B) - t_1;
	} else if (F <= -3.1e-17) {
		tmp = (-1.0 / Math.sin(B)) - (x / B);
	} else if (F <= -3.7e-199) {
		tmp = t_0;
	} else if (F <= 9.8e-113) {
		tmp = -t_1;
	} else if (F <= 5.8e-65) {
		tmp = t_0;
	} else if (F <= 2.05e-42) {
		tmp = x * (-1.0 / Math.tan(B));
	} else if (F <= 8.5e+272) {
		tmp = (1.0 / Math.sin(B)) - (x / B);
	} else {
		tmp = (F * (1.0 / (F * B))) - t_1;
	}
	return tmp;
}
def code(F, B, x):
	t_0 = (F / (B * math.sqrt((2.0 + (x * 2.0))))) - (x / B)
	t_1 = x / math.tan(B)
	tmp = 0
	if F <= -9.6e+84:
		tmp = (-1.0 / B) - t_1
	elif F <= -3.1e-17:
		tmp = (-1.0 / math.sin(B)) - (x / B)
	elif F <= -3.7e-199:
		tmp = t_0
	elif F <= 9.8e-113:
		tmp = -t_1
	elif F <= 5.8e-65:
		tmp = t_0
	elif F <= 2.05e-42:
		tmp = x * (-1.0 / math.tan(B))
	elif F <= 8.5e+272:
		tmp = (1.0 / math.sin(B)) - (x / B)
	else:
		tmp = (F * (1.0 / (F * B))) - t_1
	return tmp
function code(F, B, x)
	t_0 = Float64(Float64(F / Float64(B * sqrt(Float64(2.0 + Float64(x * 2.0))))) - Float64(x / B))
	t_1 = Float64(x / tan(B))
	tmp = 0.0
	if (F <= -9.6e+84)
		tmp = Float64(Float64(-1.0 / B) - t_1);
	elseif (F <= -3.1e-17)
		tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B));
	elseif (F <= -3.7e-199)
		tmp = t_0;
	elseif (F <= 9.8e-113)
		tmp = Float64(-t_1);
	elseif (F <= 5.8e-65)
		tmp = t_0;
	elseif (F <= 2.05e-42)
		tmp = Float64(x * Float64(-1.0 / tan(B)));
	elseif (F <= 8.5e+272)
		tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B));
	else
		tmp = Float64(Float64(F * Float64(1.0 / Float64(F * B))) - t_1);
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = (F / (B * sqrt((2.0 + (x * 2.0))))) - (x / B);
	t_1 = x / tan(B);
	tmp = 0.0;
	if (F <= -9.6e+84)
		tmp = (-1.0 / B) - t_1;
	elseif (F <= -3.1e-17)
		tmp = (-1.0 / sin(B)) - (x / B);
	elseif (F <= -3.7e-199)
		tmp = t_0;
	elseif (F <= 9.8e-113)
		tmp = -t_1;
	elseif (F <= 5.8e-65)
		tmp = t_0;
	elseif (F <= 2.05e-42)
		tmp = x * (-1.0 / tan(B));
	elseif (F <= 8.5e+272)
		tmp = (1.0 / sin(B)) - (x / B);
	else
		tmp = (F * (1.0 / (F * B))) - t_1;
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(F / N[(B * N[Sqrt[N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -9.6e+84], N[(N[(-1.0 / B), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -3.1e-17], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -3.7e-199], t$95$0, If[LessEqual[F, 9.8e-113], (-t$95$1), If[LessEqual[F, 5.8e-65], t$95$0, If[LessEqual[F, 2.05e-42], N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8.5e+272], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(F * N[(1.0 / N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{F}{B \cdot \sqrt{2 + x \cdot 2}} - \frac{x}{B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -9.6 \cdot 10^{+84}:\\
\;\;\;\;\frac{-1}{B} - t\_1\\

\mathbf{elif}\;F \leq -3.1 \cdot 10^{-17}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\

\mathbf{elif}\;F \leq -3.7 \cdot 10^{-199}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;F \leq 9.8 \cdot 10^{-113}:\\
\;\;\;\;-t\_1\\

\mathbf{elif}\;F \leq 5.8 \cdot 10^{-65}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;F \leq 2.05 \cdot 10^{-42}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B}\\

\mathbf{elif}\;F \leq 8.5 \cdot 10^{+272}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\

\mathbf{else}:\\
\;\;\;\;F \cdot \frac{1}{F \cdot B} - t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if F < -9.5999999999999999e84

    1. Initial program 50.9%

      \[\left(-x \cdot \frac{1}{\tan 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. distribute-lft-neg-in50.9%

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

        \[\leadsto \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\right) \cdot \frac{1}{\tan B}} \]
      3. associate-*l/64.5%

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

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

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

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

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

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

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num64.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.5999999999999999e84 < F < -3.0999999999999998e-17

    1. Initial program 95.5%

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

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    4. Taylor expanded in F around -inf 77.5%

      \[\leadsto \color{blue}{-1 \cdot \left(\frac{1}{\sin B} + \frac{x}{B}\right)} \]
    5. Step-by-step derivation
      1. distribute-lft-in77.5%

        \[\leadsto \color{blue}{-1 \cdot \frac{1}{\sin B} + -1 \cdot \frac{x}{B}} \]
      2. mul-1-neg77.5%

        \[\leadsto -1 \cdot \frac{1}{\sin B} + \color{blue}{\left(-\frac{x}{B}\right)} \]
      3. unsub-neg77.5%

        \[\leadsto \color{blue}{-1 \cdot \frac{1}{\sin B} - \frac{x}{B}} \]
      4. neg-mul-177.5%

        \[\leadsto \color{blue}{\left(-\frac{1}{\sin B}\right)} - \frac{x}{B} \]
      5. distribute-neg-frac77.5%

        \[\leadsto \color{blue}{\frac{-1}{\sin B}} - \frac{x}{B} \]
      6. metadata-eval77.5%

        \[\leadsto \frac{\color{blue}{-1}}{\sin B} - \frac{x}{B} \]
    6. Simplified77.5%

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

    if -3.0999999999999998e-17 < F < -3.69999999999999999e-199 or 9.8000000000000006e-113 < F < 5.7999999999999996e-65

    1. Initial program 99.4%

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

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

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

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

      \[\leadsto \color{blue}{\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - \frac{x}{B}} \]
    6. Taylor expanded in F around 0 87.2%

      \[\leadsto \frac{F}{\color{blue}{\sin B \cdot \sqrt{2 + 2 \cdot x}}} - \frac{x}{B} \]
    7. Step-by-step derivation
      1. *-commutative87.2%

        \[\leadsto \frac{F}{\color{blue}{\sqrt{2 + 2 \cdot x} \cdot \sin B}} - \frac{x}{B} \]
    8. Simplified87.2%

      \[\leadsto \frac{F}{\color{blue}{\sqrt{2 + 2 \cdot x} \cdot \sin B}} - \frac{x}{B} \]
    9. Taylor expanded in B around 0 73.2%

      \[\leadsto \frac{F}{\color{blue}{B \cdot \sqrt{2 + 2 \cdot x}}} - \frac{x}{B} \]

    if -3.69999999999999999e-199 < F < 9.8000000000000006e-113

    1. Initial program 99.4%

      \[\left(-x \cdot \frac{1}{\tan 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. distribute-lft-neg-in99.4%

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

        \[\leadsto \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\right) \cdot \frac{1}{\tan B}} \]
      3. fma-define99.4%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \color{blue}{\frac{\left(-x\right) \cdot 1}{\tan B}}\right) \]
      11. *-rgt-identity99.6%

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

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

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

        \[\leadsto \color{blue}{-\frac{x \cdot \cos B}{\sin B}} \]
      2. associate-/l*74.2%

        \[\leadsto -\color{blue}{x \cdot \frac{\cos B}{\sin B}} \]
    7. Simplified74.2%

      \[\leadsto \color{blue}{-x \cdot \frac{\cos B}{\sin B}} \]
    8. Step-by-step derivation
      1. clear-num74.2%

        \[\leadsto -x \cdot \color{blue}{\frac{1}{\frac{\sin B}{\cos B}}} \]
      2. un-div-inv74.3%

        \[\leadsto -\color{blue}{\frac{x}{\frac{\sin B}{\cos B}}} \]
      3. quot-tan74.4%

        \[\leadsto -\frac{x}{\color{blue}{\tan B}} \]
    9. Applied egg-rr74.4%

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

    if 5.7999999999999996e-65 < F < 2.0500000000000001e-42

    1. Initial program 99.7%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Step-by-step derivation
      1. distribute-lft-neg-in99.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \color{blue}{\frac{\left(-x\right) \cdot 1}{\tan B}}\right) \]
      11. *-rgt-identity99.1%

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
    6. Step-by-step derivation
      1. mul-1-neg60.9%

        \[\leadsto \color{blue}{-\frac{x \cdot \cos B}{\sin B}} \]
      2. associate-/l*61.5%

        \[\leadsto -\color{blue}{x \cdot \frac{\cos B}{\sin B}} \]
    7. Simplified61.5%

      \[\leadsto \color{blue}{-x \cdot \frac{\cos B}{\sin B}} \]
    8. Step-by-step derivation
      1. *-un-lft-identity61.5%

        \[\leadsto -x \cdot \color{blue}{\left(1 \cdot \frac{\cos B}{\sin B}\right)} \]
      2. clear-num60.9%

        \[\leadsto -x \cdot \left(1 \cdot \color{blue}{\frac{1}{\frac{\sin B}{\cos B}}}\right) \]
      3. quot-tan61.5%

        \[\leadsto -x \cdot \left(1 \cdot \frac{1}{\color{blue}{\tan B}}\right) \]
    9. Applied egg-rr61.5%

      \[\leadsto -x \cdot \color{blue}{\left(1 \cdot \frac{1}{\tan B}\right)} \]
    10. Step-by-step derivation
      1. *-lft-identity61.5%

        \[\leadsto -x \cdot \color{blue}{\frac{1}{\tan B}} \]
    11. Simplified61.5%

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

    if 2.0500000000000001e-42 < F < 8.49999999999999996e272

    1. Initial program 67.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. Add Preprocessing
    3. Taylor expanded in B around 0 53.6%

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    4. Taylor expanded in F around inf 74.1%

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

    if 8.49999999999999996e272 < F

    1. Initial program 50.7%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Step-by-step derivation
      1. distribute-lft-neg-in50.7%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto F \cdot \color{blue}{\frac{1}{B \cdot F}} - \frac{x}{\tan B} \]
    7. Step-by-step derivation
      1. *-commutative90.7%

        \[\leadsto F \cdot \frac{1}{\color{blue}{F \cdot B}} - \frac{x}{\tan B} \]
    8. Simplified90.7%

      \[\leadsto F \cdot \color{blue}{\frac{1}{F \cdot B}} - \frac{x}{\tan B} \]
  3. Recombined 7 regimes into one program.
  4. Final simplification76.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -9.6 \cdot 10^{+84}:\\ \;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -3.1 \cdot 10^{-17}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq -3.7 \cdot 10^{-199}:\\ \;\;\;\;\frac{F}{B \cdot \sqrt{2 + x \cdot 2}} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 9.8 \cdot 10^{-113}:\\ \;\;\;\;-\frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 5.8 \cdot 10^{-65}:\\ \;\;\;\;\frac{F}{B \cdot \sqrt{2 + x \cdot 2}} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 2.05 \cdot 10^{-42}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B}\\ \mathbf{elif}\;F \leq 8.5 \cdot 10^{+272}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;F \cdot \frac{1}{F \cdot B} - \frac{x}{\tan B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 69.0% accurate, 2.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\ t_1 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -1.05 \cdot 10^{+85}:\\ \;\;\;\;\frac{-1}{B} - t\_1\\ \mathbf{elif}\;F \leq -3.1 \cdot 10^{-17}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq -2.2 \cdot 10^{-198}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;F \leq 1.45 \cdot 10^{-112}:\\ \;\;\;\;-t\_1\\ \mathbf{elif}\;F \leq 1.5 \cdot 10^{-63}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;F \leq 2.05 \cdot 10^{-42}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B}\\ \mathbf{elif}\;F \leq 1.75 \cdot 10^{+273}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;F \cdot \frac{1}{F \cdot B} - t\_1\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B))
        (t_1 (/ x (tan B))))
   (if (<= F -1.05e+85)
     (- (/ -1.0 B) t_1)
     (if (<= F -3.1e-17)
       (- (/ -1.0 (sin B)) (/ x B))
       (if (<= F -2.2e-198)
         t_0
         (if (<= F 1.45e-112)
           (- t_1)
           (if (<= F 1.5e-63)
             t_0
             (if (<= F 2.05e-42)
               (* x (/ -1.0 (tan B)))
               (if (<= F 1.75e+273)
                 (- (/ 1.0 (sin B)) (/ x B))
                 (- (* F (/ 1.0 (* F B))) t_1))))))))))
double code(double F, double B, double x) {
	double t_0 = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
	double t_1 = x / tan(B);
	double tmp;
	if (F <= -1.05e+85) {
		tmp = (-1.0 / B) - t_1;
	} else if (F <= -3.1e-17) {
		tmp = (-1.0 / sin(B)) - (x / B);
	} else if (F <= -2.2e-198) {
		tmp = t_0;
	} else if (F <= 1.45e-112) {
		tmp = -t_1;
	} else if (F <= 1.5e-63) {
		tmp = t_0;
	} else if (F <= 2.05e-42) {
		tmp = x * (-1.0 / tan(B));
	} else if (F <= 1.75e+273) {
		tmp = (1.0 / sin(B)) - (x / B);
	} else {
		tmp = (F * (1.0 / (F * B))) - t_1;
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
    t_1 = x / tan(b)
    if (f <= (-1.05d+85)) then
        tmp = ((-1.0d0) / b) - t_1
    else if (f <= (-3.1d-17)) then
        tmp = ((-1.0d0) / sin(b)) - (x / b)
    else if (f <= (-2.2d-198)) then
        tmp = t_0
    else if (f <= 1.45d-112) then
        tmp = -t_1
    else if (f <= 1.5d-63) then
        tmp = t_0
    else if (f <= 2.05d-42) then
        tmp = x * ((-1.0d0) / tan(b))
    else if (f <= 1.75d+273) then
        tmp = (1.0d0 / sin(b)) - (x / b)
    else
        tmp = (f * (1.0d0 / (f * b))) - t_1
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double t_0 = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
	double t_1 = x / Math.tan(B);
	double tmp;
	if (F <= -1.05e+85) {
		tmp = (-1.0 / B) - t_1;
	} else if (F <= -3.1e-17) {
		tmp = (-1.0 / Math.sin(B)) - (x / B);
	} else if (F <= -2.2e-198) {
		tmp = t_0;
	} else if (F <= 1.45e-112) {
		tmp = -t_1;
	} else if (F <= 1.5e-63) {
		tmp = t_0;
	} else if (F <= 2.05e-42) {
		tmp = x * (-1.0 / Math.tan(B));
	} else if (F <= 1.75e+273) {
		tmp = (1.0 / Math.sin(B)) - (x / B);
	} else {
		tmp = (F * (1.0 / (F * B))) - t_1;
	}
	return tmp;
}
def code(F, B, x):
	t_0 = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B
	t_1 = x / math.tan(B)
	tmp = 0
	if F <= -1.05e+85:
		tmp = (-1.0 / B) - t_1
	elif F <= -3.1e-17:
		tmp = (-1.0 / math.sin(B)) - (x / B)
	elif F <= -2.2e-198:
		tmp = t_0
	elif F <= 1.45e-112:
		tmp = -t_1
	elif F <= 1.5e-63:
		tmp = t_0
	elif F <= 2.05e-42:
		tmp = x * (-1.0 / math.tan(B))
	elif F <= 1.75e+273:
		tmp = (1.0 / math.sin(B)) - (x / B)
	else:
		tmp = (F * (1.0 / (F * B))) - t_1
	return tmp
function code(F, B, x)
	t_0 = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B)
	t_1 = Float64(x / tan(B))
	tmp = 0.0
	if (F <= -1.05e+85)
		tmp = Float64(Float64(-1.0 / B) - t_1);
	elseif (F <= -3.1e-17)
		tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B));
	elseif (F <= -2.2e-198)
		tmp = t_0;
	elseif (F <= 1.45e-112)
		tmp = Float64(-t_1);
	elseif (F <= 1.5e-63)
		tmp = t_0;
	elseif (F <= 2.05e-42)
		tmp = Float64(x * Float64(-1.0 / tan(B)));
	elseif (F <= 1.75e+273)
		tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B));
	else
		tmp = Float64(Float64(F * Float64(1.0 / Float64(F * B))) - t_1);
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
	t_1 = x / tan(B);
	tmp = 0.0;
	if (F <= -1.05e+85)
		tmp = (-1.0 / B) - t_1;
	elseif (F <= -3.1e-17)
		tmp = (-1.0 / sin(B)) - (x / B);
	elseif (F <= -2.2e-198)
		tmp = t_0;
	elseif (F <= 1.45e-112)
		tmp = -t_1;
	elseif (F <= 1.5e-63)
		tmp = t_0;
	elseif (F <= 2.05e-42)
		tmp = x * (-1.0 / tan(B));
	elseif (F <= 1.75e+273)
		tmp = (1.0 / sin(B)) - (x / B);
	else
		tmp = (F * (1.0 / (F * B))) - t_1;
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.05e+85], N[(N[(-1.0 / B), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -3.1e-17], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.2e-198], t$95$0, If[LessEqual[F, 1.45e-112], (-t$95$1), If[LessEqual[F, 1.5e-63], t$95$0, If[LessEqual[F, 2.05e-42], N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.75e+273], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(F * N[(1.0 / N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.05 \cdot 10^{+85}:\\
\;\;\;\;\frac{-1}{B} - t\_1\\

\mathbf{elif}\;F \leq -3.1 \cdot 10^{-17}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\

\mathbf{elif}\;F \leq -2.2 \cdot 10^{-198}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;F \leq 1.45 \cdot 10^{-112}:\\
\;\;\;\;-t\_1\\

\mathbf{elif}\;F \leq 1.5 \cdot 10^{-63}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;F \leq 2.05 \cdot 10^{-42}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B}\\

\mathbf{elif}\;F \leq 1.75 \cdot 10^{+273}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\

\mathbf{else}:\\
\;\;\;\;F \cdot \frac{1}{F \cdot B} - t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if F < -1.05000000000000005e85

    1. Initial program 50.9%

      \[\left(-x \cdot \frac{1}{\tan 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. distribute-lft-neg-in50.9%

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

        \[\leadsto \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\right) \cdot \frac{1}{\tan B}} \]
      3. associate-*l/64.5%

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

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

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

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

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

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

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num64.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.05000000000000005e85 < F < -3.0999999999999998e-17

    1. Initial program 95.5%

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

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    4. Taylor expanded in F around -inf 77.5%

      \[\leadsto \color{blue}{-1 \cdot \left(\frac{1}{\sin B} + \frac{x}{B}\right)} \]
    5. Step-by-step derivation
      1. distribute-lft-in77.5%

        \[\leadsto \color{blue}{-1 \cdot \frac{1}{\sin B} + -1 \cdot \frac{x}{B}} \]
      2. mul-1-neg77.5%

        \[\leadsto -1 \cdot \frac{1}{\sin B} + \color{blue}{\left(-\frac{x}{B}\right)} \]
      3. unsub-neg77.5%

        \[\leadsto \color{blue}{-1 \cdot \frac{1}{\sin B} - \frac{x}{B}} \]
      4. neg-mul-177.5%

        \[\leadsto \color{blue}{\left(-\frac{1}{\sin B}\right)} - \frac{x}{B} \]
      5. distribute-neg-frac77.5%

        \[\leadsto \color{blue}{\frac{-1}{\sin B}} - \frac{x}{B} \]
      6. metadata-eval77.5%

        \[\leadsto \frac{\color{blue}{-1}}{\sin B} - \frac{x}{B} \]
    6. Simplified77.5%

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

    if -3.0999999999999998e-17 < F < -2.2e-198 or 1.44999999999999996e-112 < F < 1.4999999999999999e-63

    1. Initial program 99.4%

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

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

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

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

      \[\leadsto \color{blue}{\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - \frac{x}{B}} \]
    6. Taylor expanded in F around 0 87.2%

      \[\leadsto \frac{F}{\color{blue}{\sin B \cdot \sqrt{2 + 2 \cdot x}}} - \frac{x}{B} \]
    7. Step-by-step derivation
      1. *-commutative87.2%

        \[\leadsto \frac{F}{\color{blue}{\sqrt{2 + 2 \cdot x} \cdot \sin B}} - \frac{x}{B} \]
    8. Simplified87.2%

      \[\leadsto \frac{F}{\color{blue}{\sqrt{2 + 2 \cdot x} \cdot \sin B}} - \frac{x}{B} \]
    9. Taylor expanded in B around 0 73.3%

      \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + 2 \cdot x}} - x}{B}} \]

    if -2.2e-198 < F < 1.44999999999999996e-112

    1. Initial program 99.4%

      \[\left(-x \cdot \frac{1}{\tan 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. distribute-lft-neg-in99.4%

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

        \[\leadsto \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\right) \cdot \frac{1}{\tan B}} \]
      3. fma-define99.4%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \color{blue}{\frac{\left(-x\right) \cdot 1}{\tan B}}\right) \]
      11. *-rgt-identity99.6%

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

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

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

        \[\leadsto \color{blue}{-\frac{x \cdot \cos B}{\sin B}} \]
      2. associate-/l*74.2%

        \[\leadsto -\color{blue}{x \cdot \frac{\cos B}{\sin B}} \]
    7. Simplified74.2%

      \[\leadsto \color{blue}{-x \cdot \frac{\cos B}{\sin B}} \]
    8. Step-by-step derivation
      1. clear-num74.2%

        \[\leadsto -x \cdot \color{blue}{\frac{1}{\frac{\sin B}{\cos B}}} \]
      2. un-div-inv74.3%

        \[\leadsto -\color{blue}{\frac{x}{\frac{\sin B}{\cos B}}} \]
      3. quot-tan74.4%

        \[\leadsto -\frac{x}{\color{blue}{\tan B}} \]
    9. Applied egg-rr74.4%

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

    if 1.4999999999999999e-63 < F < 2.0500000000000001e-42

    1. Initial program 99.7%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Step-by-step derivation
      1. distribute-lft-neg-in99.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \color{blue}{\frac{\left(-x\right) \cdot 1}{\tan B}}\right) \]
      11. *-rgt-identity99.1%

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
    6. Step-by-step derivation
      1. mul-1-neg60.9%

        \[\leadsto \color{blue}{-\frac{x \cdot \cos B}{\sin B}} \]
      2. associate-/l*61.5%

        \[\leadsto -\color{blue}{x \cdot \frac{\cos B}{\sin B}} \]
    7. Simplified61.5%

      \[\leadsto \color{blue}{-x \cdot \frac{\cos B}{\sin B}} \]
    8. Step-by-step derivation
      1. *-un-lft-identity61.5%

        \[\leadsto -x \cdot \color{blue}{\left(1 \cdot \frac{\cos B}{\sin B}\right)} \]
      2. clear-num60.9%

        \[\leadsto -x \cdot \left(1 \cdot \color{blue}{\frac{1}{\frac{\sin B}{\cos B}}}\right) \]
      3. quot-tan61.5%

        \[\leadsto -x \cdot \left(1 \cdot \frac{1}{\color{blue}{\tan B}}\right) \]
    9. Applied egg-rr61.5%

      \[\leadsto -x \cdot \color{blue}{\left(1 \cdot \frac{1}{\tan B}\right)} \]
    10. Step-by-step derivation
      1. *-lft-identity61.5%

        \[\leadsto -x \cdot \color{blue}{\frac{1}{\tan B}} \]
    11. Simplified61.5%

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

    if 2.0500000000000001e-42 < F < 1.75000000000000005e273

    1. Initial program 67.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. Add Preprocessing
    3. Taylor expanded in B around 0 53.6%

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    4. Taylor expanded in F around inf 74.1%

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

    if 1.75000000000000005e273 < F

    1. Initial program 50.7%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Step-by-step derivation
      1. distribute-lft-neg-in50.7%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto F \cdot \color{blue}{\frac{1}{B \cdot F}} - \frac{x}{\tan B} \]
    7. Step-by-step derivation
      1. *-commutative90.7%

        \[\leadsto F \cdot \frac{1}{\color{blue}{F \cdot B}} - \frac{x}{\tan B} \]
    8. Simplified90.7%

      \[\leadsto F \cdot \color{blue}{\frac{1}{F \cdot B}} - \frac{x}{\tan B} \]
  3. Recombined 7 regimes into one program.
  4. Final simplification76.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1.05 \cdot 10^{+85}:\\ \;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -3.1 \cdot 10^{-17}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq -2.2 \cdot 10^{-198}:\\ \;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\ \mathbf{elif}\;F \leq 1.45 \cdot 10^{-112}:\\ \;\;\;\;-\frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 1.5 \cdot 10^{-63}:\\ \;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\ \mathbf{elif}\;F \leq 2.05 \cdot 10^{-42}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B}\\ \mathbf{elif}\;F \leq 1.75 \cdot 10^{+273}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;F \cdot \frac{1}{F \cdot B} - \frac{x}{\tan B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 69.0% accurate, 2.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt{\frac{1}{2 + x \cdot 2}}\\ t_1 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -1.05 \cdot 10^{+85}:\\ \;\;\;\;\frac{-1}{B} - t\_1\\ \mathbf{elif}\;F \leq -3.1 \cdot 10^{-17}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq -3.5 \cdot 10^{-200}:\\ \;\;\;\;t\_0 \cdot \frac{F}{B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 1.3 \cdot 10^{-112}:\\ \;\;\;\;-t\_1\\ \mathbf{elif}\;F \leq 2.8 \cdot 10^{-64}:\\ \;\;\;\;\frac{F \cdot t\_0 - x}{B}\\ \mathbf{elif}\;F \leq 2.05 \cdot 10^{-42}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B}\\ \mathbf{elif}\;F \leq 1.04 \cdot 10^{+273}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;F \cdot \frac{1}{F \cdot B} - t\_1\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) (t_1 (/ x (tan B))))
   (if (<= F -1.05e+85)
     (- (/ -1.0 B) t_1)
     (if (<= F -3.1e-17)
       (- (/ -1.0 (sin B)) (/ x B))
       (if (<= F -3.5e-200)
         (- (* t_0 (/ F B)) (/ x B))
         (if (<= F 1.3e-112)
           (- t_1)
           (if (<= F 2.8e-64)
             (/ (- (* F t_0) x) B)
             (if (<= F 2.05e-42)
               (* x (/ -1.0 (tan B)))
               (if (<= F 1.04e+273)
                 (- (/ 1.0 (sin B)) (/ x B))
                 (- (* F (/ 1.0 (* F B))) t_1))))))))))
double code(double F, double B, double x) {
	double t_0 = sqrt((1.0 / (2.0 + (x * 2.0))));
	double t_1 = x / tan(B);
	double tmp;
	if (F <= -1.05e+85) {
		tmp = (-1.0 / B) - t_1;
	} else if (F <= -3.1e-17) {
		tmp = (-1.0 / sin(B)) - (x / B);
	} else if (F <= -3.5e-200) {
		tmp = (t_0 * (F / B)) - (x / B);
	} else if (F <= 1.3e-112) {
		tmp = -t_1;
	} else if (F <= 2.8e-64) {
		tmp = ((F * t_0) - x) / B;
	} else if (F <= 2.05e-42) {
		tmp = x * (-1.0 / tan(B));
	} else if (F <= 1.04e+273) {
		tmp = (1.0 / sin(B)) - (x / B);
	} else {
		tmp = (F * (1.0 / (F * B))) - t_1;
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))
    t_1 = x / tan(b)
    if (f <= (-1.05d+85)) then
        tmp = ((-1.0d0) / b) - t_1
    else if (f <= (-3.1d-17)) then
        tmp = ((-1.0d0) / sin(b)) - (x / b)
    else if (f <= (-3.5d-200)) then
        tmp = (t_0 * (f / b)) - (x / b)
    else if (f <= 1.3d-112) then
        tmp = -t_1
    else if (f <= 2.8d-64) then
        tmp = ((f * t_0) - x) / b
    else if (f <= 2.05d-42) then
        tmp = x * ((-1.0d0) / tan(b))
    else if (f <= 1.04d+273) then
        tmp = (1.0d0 / sin(b)) - (x / b)
    else
        tmp = (f * (1.0d0 / (f * b))) - t_1
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double t_0 = Math.sqrt((1.0 / (2.0 + (x * 2.0))));
	double t_1 = x / Math.tan(B);
	double tmp;
	if (F <= -1.05e+85) {
		tmp = (-1.0 / B) - t_1;
	} else if (F <= -3.1e-17) {
		tmp = (-1.0 / Math.sin(B)) - (x / B);
	} else if (F <= -3.5e-200) {
		tmp = (t_0 * (F / B)) - (x / B);
	} else if (F <= 1.3e-112) {
		tmp = -t_1;
	} else if (F <= 2.8e-64) {
		tmp = ((F * t_0) - x) / B;
	} else if (F <= 2.05e-42) {
		tmp = x * (-1.0 / Math.tan(B));
	} else if (F <= 1.04e+273) {
		tmp = (1.0 / Math.sin(B)) - (x / B);
	} else {
		tmp = (F * (1.0 / (F * B))) - t_1;
	}
	return tmp;
}
def code(F, B, x):
	t_0 = math.sqrt((1.0 / (2.0 + (x * 2.0))))
	t_1 = x / math.tan(B)
	tmp = 0
	if F <= -1.05e+85:
		tmp = (-1.0 / B) - t_1
	elif F <= -3.1e-17:
		tmp = (-1.0 / math.sin(B)) - (x / B)
	elif F <= -3.5e-200:
		tmp = (t_0 * (F / B)) - (x / B)
	elif F <= 1.3e-112:
		tmp = -t_1
	elif F <= 2.8e-64:
		tmp = ((F * t_0) - x) / B
	elif F <= 2.05e-42:
		tmp = x * (-1.0 / math.tan(B))
	elif F <= 1.04e+273:
		tmp = (1.0 / math.sin(B)) - (x / B)
	else:
		tmp = (F * (1.0 / (F * B))) - t_1
	return tmp
function code(F, B, x)
	t_0 = sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))
	t_1 = Float64(x / tan(B))
	tmp = 0.0
	if (F <= -1.05e+85)
		tmp = Float64(Float64(-1.0 / B) - t_1);
	elseif (F <= -3.1e-17)
		tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B));
	elseif (F <= -3.5e-200)
		tmp = Float64(Float64(t_0 * Float64(F / B)) - Float64(x / B));
	elseif (F <= 1.3e-112)
		tmp = Float64(-t_1);
	elseif (F <= 2.8e-64)
		tmp = Float64(Float64(Float64(F * t_0) - x) / B);
	elseif (F <= 2.05e-42)
		tmp = Float64(x * Float64(-1.0 / tan(B)));
	elseif (F <= 1.04e+273)
		tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B));
	else
		tmp = Float64(Float64(F * Float64(1.0 / Float64(F * B))) - t_1);
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = sqrt((1.0 / (2.0 + (x * 2.0))));
	t_1 = x / tan(B);
	tmp = 0.0;
	if (F <= -1.05e+85)
		tmp = (-1.0 / B) - t_1;
	elseif (F <= -3.1e-17)
		tmp = (-1.0 / sin(B)) - (x / B);
	elseif (F <= -3.5e-200)
		tmp = (t_0 * (F / B)) - (x / B);
	elseif (F <= 1.3e-112)
		tmp = -t_1;
	elseif (F <= 2.8e-64)
		tmp = ((F * t_0) - x) / B;
	elseif (F <= 2.05e-42)
		tmp = x * (-1.0 / tan(B));
	elseif (F <= 1.04e+273)
		tmp = (1.0 / sin(B)) - (x / B);
	else
		tmp = (F * (1.0 / (F * B))) - t_1;
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := Block[{t$95$0 = N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.05e+85], N[(N[(-1.0 / B), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -3.1e-17], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -3.5e-200], N[(N[(t$95$0 * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.3e-112], (-t$95$1), If[LessEqual[F, 2.8e-64], N[(N[(N[(F * t$95$0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2.05e-42], N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.04e+273], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(F * N[(1.0 / N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \sqrt{\frac{1}{2 + x \cdot 2}}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.05 \cdot 10^{+85}:\\
\;\;\;\;\frac{-1}{B} - t\_1\\

\mathbf{elif}\;F \leq -3.1 \cdot 10^{-17}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\

\mathbf{elif}\;F \leq -3.5 \cdot 10^{-200}:\\
\;\;\;\;t\_0 \cdot \frac{F}{B} - \frac{x}{B}\\

\mathbf{elif}\;F \leq 1.3 \cdot 10^{-112}:\\
\;\;\;\;-t\_1\\

\mathbf{elif}\;F \leq 2.8 \cdot 10^{-64}:\\
\;\;\;\;\frac{F \cdot t\_0 - x}{B}\\

\mathbf{elif}\;F \leq 2.05 \cdot 10^{-42}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B}\\

\mathbf{elif}\;F \leq 1.04 \cdot 10^{+273}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\

\mathbf{else}:\\
\;\;\;\;F \cdot \frac{1}{F \cdot B} - t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 8 regimes
  2. if F < -1.05000000000000005e85

    1. Initial program 50.9%

      \[\left(-x \cdot \frac{1}{\tan 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. distribute-lft-neg-in50.9%

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

        \[\leadsto \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\right) \cdot \frac{1}{\tan B}} \]
      3. associate-*l/64.5%

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

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

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

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

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

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

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num64.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.05000000000000005e85 < F < -3.0999999999999998e-17

    1. Initial program 95.5%

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

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    4. Taylor expanded in F around -inf 77.5%

      \[\leadsto \color{blue}{-1 \cdot \left(\frac{1}{\sin B} + \frac{x}{B}\right)} \]
    5. Step-by-step derivation
      1. distribute-lft-in77.5%

        \[\leadsto \color{blue}{-1 \cdot \frac{1}{\sin B} + -1 \cdot \frac{x}{B}} \]
      2. mul-1-neg77.5%

        \[\leadsto -1 \cdot \frac{1}{\sin B} + \color{blue}{\left(-\frac{x}{B}\right)} \]
      3. unsub-neg77.5%

        \[\leadsto \color{blue}{-1 \cdot \frac{1}{\sin B} - \frac{x}{B}} \]
      4. neg-mul-177.5%

        \[\leadsto \color{blue}{\left(-\frac{1}{\sin B}\right)} - \frac{x}{B} \]
      5. distribute-neg-frac77.5%

        \[\leadsto \color{blue}{\frac{-1}{\sin B}} - \frac{x}{B} \]
      6. metadata-eval77.5%

        \[\leadsto \frac{\color{blue}{-1}}{\sin B} - \frac{x}{B} \]
    6. Simplified77.5%

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

    if -3.0999999999999998e-17 < F < -3.50000000000000023e-200

    1. Initial program 99.4%

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

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

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

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

      \[\leadsto \color{blue}{\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - \frac{x}{B}} \]
    6. Taylor expanded in F around 0 83.4%

      \[\leadsto \frac{F}{\color{blue}{\sin B \cdot \sqrt{2 + 2 \cdot x}}} - \frac{x}{B} \]
    7. Step-by-step derivation
      1. *-commutative83.4%

        \[\leadsto \frac{F}{\color{blue}{\sqrt{2 + 2 \cdot x} \cdot \sin B}} - \frac{x}{B} \]
    8. Simplified83.4%

      \[\leadsto \frac{F}{\color{blue}{\sqrt{2 + 2 \cdot x} \cdot \sin B}} - \frac{x}{B} \]
    9. Taylor expanded in B around 0 65.3%

      \[\leadsto \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + 2 \cdot x}}} - \frac{x}{B} \]

    if -3.50000000000000023e-200 < F < 1.29999999999999996e-112

    1. Initial program 99.4%

      \[\left(-x \cdot \frac{1}{\tan 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. distribute-lft-neg-in99.4%

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

        \[\leadsto \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\right) \cdot \frac{1}{\tan B}} \]
      3. fma-define99.4%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \color{blue}{\frac{\left(-x\right) \cdot 1}{\tan B}}\right) \]
      11. *-rgt-identity99.6%

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

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

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

        \[\leadsto \color{blue}{-\frac{x \cdot \cos B}{\sin B}} \]
      2. associate-/l*74.2%

        \[\leadsto -\color{blue}{x \cdot \frac{\cos B}{\sin B}} \]
    7. Simplified74.2%

      \[\leadsto \color{blue}{-x \cdot \frac{\cos B}{\sin B}} \]
    8. Step-by-step derivation
      1. clear-num74.2%

        \[\leadsto -x \cdot \color{blue}{\frac{1}{\frac{\sin B}{\cos B}}} \]
      2. un-div-inv74.3%

        \[\leadsto -\color{blue}{\frac{x}{\frac{\sin B}{\cos B}}} \]
      3. quot-tan74.4%

        \[\leadsto -\frac{x}{\color{blue}{\tan B}} \]
    9. Applied egg-rr74.4%

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

    if 1.29999999999999996e-112 < F < 2.80000000000000004e-64

    1. Initial program 99.3%

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

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

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

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

      \[\leadsto \color{blue}{\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - \frac{x}{B}} \]
    6. Taylor expanded in F around 0 99.6%

      \[\leadsto \frac{F}{\color{blue}{\sin B \cdot \sqrt{2 + 2 \cdot x}}} - \frac{x}{B} \]
    7. Step-by-step derivation
      1. *-commutative99.6%

        \[\leadsto \frac{F}{\color{blue}{\sqrt{2 + 2 \cdot x} \cdot \sin B}} - \frac{x}{B} \]
    8. Simplified99.6%

      \[\leadsto \frac{F}{\color{blue}{\sqrt{2 + 2 \cdot x} \cdot \sin B}} - \frac{x}{B} \]
    9. Taylor expanded in B around 0 99.7%

      \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + 2 \cdot x}} - x}{B}} \]

    if 2.80000000000000004e-64 < F < 2.0500000000000001e-42

    1. Initial program 99.7%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Step-by-step derivation
      1. distribute-lft-neg-in99.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \color{blue}{\frac{\left(-x\right) \cdot 1}{\tan B}}\right) \]
      11. *-rgt-identity99.1%

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
    6. Step-by-step derivation
      1. mul-1-neg60.9%

        \[\leadsto \color{blue}{-\frac{x \cdot \cos B}{\sin B}} \]
      2. associate-/l*61.5%

        \[\leadsto -\color{blue}{x \cdot \frac{\cos B}{\sin B}} \]
    7. Simplified61.5%

      \[\leadsto \color{blue}{-x \cdot \frac{\cos B}{\sin B}} \]
    8. Step-by-step derivation
      1. *-un-lft-identity61.5%

        \[\leadsto -x \cdot \color{blue}{\left(1 \cdot \frac{\cos B}{\sin B}\right)} \]
      2. clear-num60.9%

        \[\leadsto -x \cdot \left(1 \cdot \color{blue}{\frac{1}{\frac{\sin B}{\cos B}}}\right) \]
      3. quot-tan61.5%

        \[\leadsto -x \cdot \left(1 \cdot \frac{1}{\color{blue}{\tan B}}\right) \]
    9. Applied egg-rr61.5%

      \[\leadsto -x \cdot \color{blue}{\left(1 \cdot \frac{1}{\tan B}\right)} \]
    10. Step-by-step derivation
      1. *-lft-identity61.5%

        \[\leadsto -x \cdot \color{blue}{\frac{1}{\tan B}} \]
    11. Simplified61.5%

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

    if 2.0500000000000001e-42 < F < 1.04e273

    1. Initial program 67.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. Add Preprocessing
    3. Taylor expanded in B around 0 53.6%

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    4. Taylor expanded in F around inf 74.1%

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

    if 1.04e273 < F

    1. Initial program 50.7%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Step-by-step derivation
      1. distribute-lft-neg-in50.7%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto F \cdot \color{blue}{\frac{1}{B \cdot F}} - \frac{x}{\tan B} \]
    7. Step-by-step derivation
      1. *-commutative90.7%

        \[\leadsto F \cdot \frac{1}{\color{blue}{F \cdot B}} - \frac{x}{\tan B} \]
    8. Simplified90.7%

      \[\leadsto F \cdot \color{blue}{\frac{1}{F \cdot B}} - \frac{x}{\tan B} \]
  3. Recombined 8 regimes into one program.
  4. Final simplification76.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1.05 \cdot 10^{+85}:\\ \;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -3.1 \cdot 10^{-17}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq -3.5 \cdot 10^{-200}:\\ \;\;\;\;\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 1.3 \cdot 10^{-112}:\\ \;\;\;\;-\frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 2.8 \cdot 10^{-64}:\\ \;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\ \mathbf{elif}\;F \leq 2.05 \cdot 10^{-42}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B}\\ \mathbf{elif}\;F \leq 1.04 \cdot 10^{+273}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;F \cdot \frac{1}{F \cdot B} - \frac{x}{\tan B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 69.1% accurate, 2.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := 2 + x \cdot 2\\ t_1 := \sqrt{\frac{1}{t\_0}}\\ t_2 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -6.2 \cdot 10^{+84}:\\ \;\;\;\;\frac{-1}{B} - t\_2\\ \mathbf{elif}\;F \leq -3.1 \cdot 10^{-17}:\\ \;\;\;\;\frac{F}{\sin B \cdot \left(-0.5 \cdot \frac{t\_0}{F} - F\right)} - \frac{x}{B}\\ \mathbf{elif}\;F \leq -7 \cdot 10^{-198}:\\ \;\;\;\;t\_1 \cdot \frac{F}{B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 1.02 \cdot 10^{-112}:\\ \;\;\;\;-t\_2\\ \mathbf{elif}\;F \leq 1.65 \cdot 10^{-63}:\\ \;\;\;\;\frac{F \cdot t\_1 - x}{B}\\ \mathbf{elif}\;F \leq 2.05 \cdot 10^{-42}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B}\\ \mathbf{elif}\;F \leq 1.3 \cdot 10^{+273}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;F \cdot \frac{1}{F \cdot B} - t\_2\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (+ 2.0 (* x 2.0))) (t_1 (sqrt (/ 1.0 t_0))) (t_2 (/ x (tan B))))
   (if (<= F -6.2e+84)
     (- (/ -1.0 B) t_2)
     (if (<= F -3.1e-17)
       (- (/ F (* (sin B) (- (* -0.5 (/ t_0 F)) F))) (/ x B))
       (if (<= F -7e-198)
         (- (* t_1 (/ F B)) (/ x B))
         (if (<= F 1.02e-112)
           (- t_2)
           (if (<= F 1.65e-63)
             (/ (- (* F t_1) x) B)
             (if (<= F 2.05e-42)
               (* x (/ -1.0 (tan B)))
               (if (<= F 1.3e+273)
                 (- (/ 1.0 (sin B)) (/ x B))
                 (- (* F (/ 1.0 (* F B))) t_2))))))))))
double code(double F, double B, double x) {
	double t_0 = 2.0 + (x * 2.0);
	double t_1 = sqrt((1.0 / t_0));
	double t_2 = x / tan(B);
	double tmp;
	if (F <= -6.2e+84) {
		tmp = (-1.0 / B) - t_2;
	} else if (F <= -3.1e-17) {
		tmp = (F / (sin(B) * ((-0.5 * (t_0 / F)) - F))) - (x / B);
	} else if (F <= -7e-198) {
		tmp = (t_1 * (F / B)) - (x / B);
	} else if (F <= 1.02e-112) {
		tmp = -t_2;
	} else if (F <= 1.65e-63) {
		tmp = ((F * t_1) - x) / B;
	} else if (F <= 2.05e-42) {
		tmp = x * (-1.0 / tan(B));
	} else if (F <= 1.3e+273) {
		tmp = (1.0 / sin(B)) - (x / B);
	} else {
		tmp = (F * (1.0 / (F * B))) - t_2;
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_0 = 2.0d0 + (x * 2.0d0)
    t_1 = sqrt((1.0d0 / t_0))
    t_2 = x / tan(b)
    if (f <= (-6.2d+84)) then
        tmp = ((-1.0d0) / b) - t_2
    else if (f <= (-3.1d-17)) then
        tmp = (f / (sin(b) * (((-0.5d0) * (t_0 / f)) - f))) - (x / b)
    else if (f <= (-7d-198)) then
        tmp = (t_1 * (f / b)) - (x / b)
    else if (f <= 1.02d-112) then
        tmp = -t_2
    else if (f <= 1.65d-63) then
        tmp = ((f * t_1) - x) / b
    else if (f <= 2.05d-42) then
        tmp = x * ((-1.0d0) / tan(b))
    else if (f <= 1.3d+273) then
        tmp = (1.0d0 / sin(b)) - (x / b)
    else
        tmp = (f * (1.0d0 / (f * b))) - t_2
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double t_0 = 2.0 + (x * 2.0);
	double t_1 = Math.sqrt((1.0 / t_0));
	double t_2 = x / Math.tan(B);
	double tmp;
	if (F <= -6.2e+84) {
		tmp = (-1.0 / B) - t_2;
	} else if (F <= -3.1e-17) {
		tmp = (F / (Math.sin(B) * ((-0.5 * (t_0 / F)) - F))) - (x / B);
	} else if (F <= -7e-198) {
		tmp = (t_1 * (F / B)) - (x / B);
	} else if (F <= 1.02e-112) {
		tmp = -t_2;
	} else if (F <= 1.65e-63) {
		tmp = ((F * t_1) - x) / B;
	} else if (F <= 2.05e-42) {
		tmp = x * (-1.0 / Math.tan(B));
	} else if (F <= 1.3e+273) {
		tmp = (1.0 / Math.sin(B)) - (x / B);
	} else {
		tmp = (F * (1.0 / (F * B))) - t_2;
	}
	return tmp;
}
def code(F, B, x):
	t_0 = 2.0 + (x * 2.0)
	t_1 = math.sqrt((1.0 / t_0))
	t_2 = x / math.tan(B)
	tmp = 0
	if F <= -6.2e+84:
		tmp = (-1.0 / B) - t_2
	elif F <= -3.1e-17:
		tmp = (F / (math.sin(B) * ((-0.5 * (t_0 / F)) - F))) - (x / B)
	elif F <= -7e-198:
		tmp = (t_1 * (F / B)) - (x / B)
	elif F <= 1.02e-112:
		tmp = -t_2
	elif F <= 1.65e-63:
		tmp = ((F * t_1) - x) / B
	elif F <= 2.05e-42:
		tmp = x * (-1.0 / math.tan(B))
	elif F <= 1.3e+273:
		tmp = (1.0 / math.sin(B)) - (x / B)
	else:
		tmp = (F * (1.0 / (F * B))) - t_2
	return tmp
function code(F, B, x)
	t_0 = Float64(2.0 + Float64(x * 2.0))
	t_1 = sqrt(Float64(1.0 / t_0))
	t_2 = Float64(x / tan(B))
	tmp = 0.0
	if (F <= -6.2e+84)
		tmp = Float64(Float64(-1.0 / B) - t_2);
	elseif (F <= -3.1e-17)
		tmp = Float64(Float64(F / Float64(sin(B) * Float64(Float64(-0.5 * Float64(t_0 / F)) - F))) - Float64(x / B));
	elseif (F <= -7e-198)
		tmp = Float64(Float64(t_1 * Float64(F / B)) - Float64(x / B));
	elseif (F <= 1.02e-112)
		tmp = Float64(-t_2);
	elseif (F <= 1.65e-63)
		tmp = Float64(Float64(Float64(F * t_1) - x) / B);
	elseif (F <= 2.05e-42)
		tmp = Float64(x * Float64(-1.0 / tan(B)));
	elseif (F <= 1.3e+273)
		tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B));
	else
		tmp = Float64(Float64(F * Float64(1.0 / Float64(F * B))) - t_2);
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = 2.0 + (x * 2.0);
	t_1 = sqrt((1.0 / t_0));
	t_2 = x / tan(B);
	tmp = 0.0;
	if (F <= -6.2e+84)
		tmp = (-1.0 / B) - t_2;
	elseif (F <= -3.1e-17)
		tmp = (F / (sin(B) * ((-0.5 * (t_0 / F)) - F))) - (x / B);
	elseif (F <= -7e-198)
		tmp = (t_1 * (F / B)) - (x / B);
	elseif (F <= 1.02e-112)
		tmp = -t_2;
	elseif (F <= 1.65e-63)
		tmp = ((F * t_1) - x) / B;
	elseif (F <= 2.05e-42)
		tmp = x * (-1.0 / tan(B));
	elseif (F <= 1.3e+273)
		tmp = (1.0 / sin(B)) - (x / B);
	else
		tmp = (F * (1.0 / (F * B))) - t_2;
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := Block[{t$95$0 = N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(1.0 / t$95$0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -6.2e+84], N[(N[(-1.0 / B), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[F, -3.1e-17], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[(N[(-0.5 * N[(t$95$0 / F), $MachinePrecision]), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -7e-198], N[(N[(t$95$1 * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.02e-112], (-t$95$2), If[LessEqual[F, 1.65e-63], N[(N[(N[(F * t$95$1), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2.05e-42], N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.3e+273], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(F * N[(1.0 / N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := 2 + x \cdot 2\\
t_1 := \sqrt{\frac{1}{t\_0}}\\
t_2 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -6.2 \cdot 10^{+84}:\\
\;\;\;\;\frac{-1}{B} - t\_2\\

\mathbf{elif}\;F \leq -3.1 \cdot 10^{-17}:\\
\;\;\;\;\frac{F}{\sin B \cdot \left(-0.5 \cdot \frac{t\_0}{F} - F\right)} - \frac{x}{B}\\

\mathbf{elif}\;F \leq -7 \cdot 10^{-198}:\\
\;\;\;\;t\_1 \cdot \frac{F}{B} - \frac{x}{B}\\

\mathbf{elif}\;F \leq 1.02 \cdot 10^{-112}:\\
\;\;\;\;-t\_2\\

\mathbf{elif}\;F \leq 1.65 \cdot 10^{-63}:\\
\;\;\;\;\frac{F \cdot t\_1 - x}{B}\\

\mathbf{elif}\;F \leq 2.05 \cdot 10^{-42}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B}\\

\mathbf{elif}\;F \leq 1.3 \cdot 10^{+273}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\

\mathbf{else}:\\
\;\;\;\;F \cdot \frac{1}{F \cdot B} - t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 8 regimes
  2. if F < -6.20000000000000006e84

    1. Initial program 50.9%

      \[\left(-x \cdot \frac{1}{\tan 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. distribute-lft-neg-in50.9%

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

        \[\leadsto \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\right) \cdot \frac{1}{\tan B}} \]
      3. associate-*l/64.5%

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

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

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

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

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

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

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num64.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.20000000000000006e84 < F < -3.0999999999999998e-17

    1. Initial program 95.5%

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

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

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

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

      \[\leadsto \color{blue}{\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - \frac{x}{B}} \]
    6. Taylor expanded in F around -inf 79.0%

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

    if -3.0999999999999998e-17 < F < -7.0000000000000005e-198

    1. Initial program 99.4%

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

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

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

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

      \[\leadsto \color{blue}{\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - \frac{x}{B}} \]
    6. Taylor expanded in F around 0 83.4%

      \[\leadsto \frac{F}{\color{blue}{\sin B \cdot \sqrt{2 + 2 \cdot x}}} - \frac{x}{B} \]
    7. Step-by-step derivation
      1. *-commutative83.4%

        \[\leadsto \frac{F}{\color{blue}{\sqrt{2 + 2 \cdot x} \cdot \sin B}} - \frac{x}{B} \]
    8. Simplified83.4%

      \[\leadsto \frac{F}{\color{blue}{\sqrt{2 + 2 \cdot x} \cdot \sin B}} - \frac{x}{B} \]
    9. Taylor expanded in B around 0 65.3%

      \[\leadsto \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + 2 \cdot x}}} - \frac{x}{B} \]

    if -7.0000000000000005e-198 < F < 1.01999999999999996e-112

    1. Initial program 99.4%

      \[\left(-x \cdot \frac{1}{\tan 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. distribute-lft-neg-in99.4%

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

        \[\leadsto \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\right) \cdot \frac{1}{\tan B}} \]
      3. fma-define99.4%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \color{blue}{\frac{\left(-x\right) \cdot 1}{\tan B}}\right) \]
      11. *-rgt-identity99.6%

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

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

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

        \[\leadsto \color{blue}{-\frac{x \cdot \cos B}{\sin B}} \]
      2. associate-/l*74.2%

        \[\leadsto -\color{blue}{x \cdot \frac{\cos B}{\sin B}} \]
    7. Simplified74.2%

      \[\leadsto \color{blue}{-x \cdot \frac{\cos B}{\sin B}} \]
    8. Step-by-step derivation
      1. clear-num74.2%

        \[\leadsto -x \cdot \color{blue}{\frac{1}{\frac{\sin B}{\cos B}}} \]
      2. un-div-inv74.3%

        \[\leadsto -\color{blue}{\frac{x}{\frac{\sin B}{\cos B}}} \]
      3. quot-tan74.4%

        \[\leadsto -\frac{x}{\color{blue}{\tan B}} \]
    9. Applied egg-rr74.4%

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

    if 1.01999999999999996e-112 < F < 1.64999999999999997e-63

    1. Initial program 99.3%

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

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

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

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

      \[\leadsto \color{blue}{\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - \frac{x}{B}} \]
    6. Taylor expanded in F around 0 99.6%

      \[\leadsto \frac{F}{\color{blue}{\sin B \cdot \sqrt{2 + 2 \cdot x}}} - \frac{x}{B} \]
    7. Step-by-step derivation
      1. *-commutative99.6%

        \[\leadsto \frac{F}{\color{blue}{\sqrt{2 + 2 \cdot x} \cdot \sin B}} - \frac{x}{B} \]
    8. Simplified99.6%

      \[\leadsto \frac{F}{\color{blue}{\sqrt{2 + 2 \cdot x} \cdot \sin B}} - \frac{x}{B} \]
    9. Taylor expanded in B around 0 99.7%

      \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + 2 \cdot x}} - x}{B}} \]

    if 1.64999999999999997e-63 < F < 2.0500000000000001e-42

    1. Initial program 99.7%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Step-by-step derivation
      1. distribute-lft-neg-in99.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \color{blue}{\frac{\left(-x\right) \cdot 1}{\tan B}}\right) \]
      11. *-rgt-identity99.1%

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
    6. Step-by-step derivation
      1. mul-1-neg60.9%

        \[\leadsto \color{blue}{-\frac{x \cdot \cos B}{\sin B}} \]
      2. associate-/l*61.5%

        \[\leadsto -\color{blue}{x \cdot \frac{\cos B}{\sin B}} \]
    7. Simplified61.5%

      \[\leadsto \color{blue}{-x \cdot \frac{\cos B}{\sin B}} \]
    8. Step-by-step derivation
      1. *-un-lft-identity61.5%

        \[\leadsto -x \cdot \color{blue}{\left(1 \cdot \frac{\cos B}{\sin B}\right)} \]
      2. clear-num60.9%

        \[\leadsto -x \cdot \left(1 \cdot \color{blue}{\frac{1}{\frac{\sin B}{\cos B}}}\right) \]
      3. quot-tan61.5%

        \[\leadsto -x \cdot \left(1 \cdot \frac{1}{\color{blue}{\tan B}}\right) \]
    9. Applied egg-rr61.5%

      \[\leadsto -x \cdot \color{blue}{\left(1 \cdot \frac{1}{\tan B}\right)} \]
    10. Step-by-step derivation
      1. *-lft-identity61.5%

        \[\leadsto -x \cdot \color{blue}{\frac{1}{\tan B}} \]
    11. Simplified61.5%

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

    if 2.0500000000000001e-42 < F < 1.29999999999999997e273

    1. Initial program 67.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. Add Preprocessing
    3. Taylor expanded in B around 0 53.6%

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    4. Taylor expanded in F around inf 74.1%

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

    if 1.29999999999999997e273 < F

    1. Initial program 50.7%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Step-by-step derivation
      1. distribute-lft-neg-in50.7%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto F \cdot \color{blue}{\frac{1}{B \cdot F}} - \frac{x}{\tan B} \]
    7. Step-by-step derivation
      1. *-commutative90.7%

        \[\leadsto F \cdot \frac{1}{\color{blue}{F \cdot B}} - \frac{x}{\tan B} \]
    8. Simplified90.7%

      \[\leadsto F \cdot \color{blue}{\frac{1}{F \cdot B}} - \frac{x}{\tan B} \]
  3. Recombined 8 regimes into one program.
  4. Final simplification76.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -6.2 \cdot 10^{+84}:\\ \;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -3.1 \cdot 10^{-17}:\\ \;\;\;\;\frac{F}{\sin B \cdot \left(-0.5 \cdot \frac{2 + x \cdot 2}{F} - F\right)} - \frac{x}{B}\\ \mathbf{elif}\;F \leq -7 \cdot 10^{-198}:\\ \;\;\;\;\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 1.02 \cdot 10^{-112}:\\ \;\;\;\;-\frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 1.65 \cdot 10^{-63}:\\ \;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\ \mathbf{elif}\;F \leq 2.05 \cdot 10^{-42}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B}\\ \mathbf{elif}\;F \leq 1.3 \cdot 10^{+273}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;F \cdot \frac{1}{F \cdot B} - \frac{x}{\tan B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 69.0% accurate, 2.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := 2 + x \cdot 2\\ t_1 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -9.6 \cdot 10^{+84}:\\ \;\;\;\;\frac{-1}{B} - t\_1\\ \mathbf{elif}\;F \leq -3.1 \cdot 10^{-17}:\\ \;\;\;\;\frac{F}{\sin B \cdot \left(-0.5 \cdot \frac{t\_0}{F} - F\right)} - \frac{x}{B}\\ \mathbf{elif}\;F \leq -7 \cdot 10^{-198}:\\ \;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 10^{-112}:\\ \;\;\;\;-t\_1\\ \mathbf{elif}\;F \leq 1.25 \cdot 10^{-64}:\\ \;\;\;\;\frac{F \cdot \sqrt{\frac{1}{t\_0}} - x}{B}\\ \mathbf{elif}\;F \leq 2.05 \cdot 10^{-42}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B}\\ \mathbf{elif}\;F \leq 3.9 \cdot 10^{+270}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;F \cdot \frac{1}{F \cdot B} - t\_1\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (+ 2.0 (* x 2.0))) (t_1 (/ x (tan B))))
   (if (<= F -9.6e+84)
     (- (/ -1.0 B) t_1)
     (if (<= F -3.1e-17)
       (- (/ F (* (sin B) (- (* -0.5 (/ t_0 F)) F))) (/ x B))
       (if (<= F -7e-198)
         (- (* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B)) (/ x B))
         (if (<= F 1e-112)
           (- t_1)
           (if (<= F 1.25e-64)
             (/ (- (* F (sqrt (/ 1.0 t_0))) x) B)
             (if (<= F 2.05e-42)
               (* x (/ -1.0 (tan B)))
               (if (<= F 3.9e+270)
                 (- (/ 1.0 (sin B)) (/ x B))
                 (- (* F (/ 1.0 (* F B))) t_1))))))))))
double code(double F, double B, double x) {
	double t_0 = 2.0 + (x * 2.0);
	double t_1 = x / tan(B);
	double tmp;
	if (F <= -9.6e+84) {
		tmp = (-1.0 / B) - t_1;
	} else if (F <= -3.1e-17) {
		tmp = (F / (sin(B) * ((-0.5 * (t_0 / F)) - F))) - (x / B);
	} else if (F <= -7e-198) {
		tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
	} else if (F <= 1e-112) {
		tmp = -t_1;
	} else if (F <= 1.25e-64) {
		tmp = ((F * sqrt((1.0 / t_0))) - x) / B;
	} else if (F <= 2.05e-42) {
		tmp = x * (-1.0 / tan(B));
	} else if (F <= 3.9e+270) {
		tmp = (1.0 / sin(B)) - (x / B);
	} else {
		tmp = (F * (1.0 / (F * B))) - t_1;
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = 2.0d0 + (x * 2.0d0)
    t_1 = x / tan(b)
    if (f <= (-9.6d+84)) then
        tmp = ((-1.0d0) / b) - t_1
    else if (f <= (-3.1d-17)) then
        tmp = (f / (sin(b) * (((-0.5d0) * (t_0 / f)) - f))) - (x / b)
    else if (f <= (-7d-198)) then
        tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / b)
    else if (f <= 1d-112) then
        tmp = -t_1
    else if (f <= 1.25d-64) then
        tmp = ((f * sqrt((1.0d0 / t_0))) - x) / b
    else if (f <= 2.05d-42) then
        tmp = x * ((-1.0d0) / tan(b))
    else if (f <= 3.9d+270) then
        tmp = (1.0d0 / sin(b)) - (x / b)
    else
        tmp = (f * (1.0d0 / (f * b))) - t_1
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double t_0 = 2.0 + (x * 2.0);
	double t_1 = x / Math.tan(B);
	double tmp;
	if (F <= -9.6e+84) {
		tmp = (-1.0 / B) - t_1;
	} else if (F <= -3.1e-17) {
		tmp = (F / (Math.sin(B) * ((-0.5 * (t_0 / F)) - F))) - (x / B);
	} else if (F <= -7e-198) {
		tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
	} else if (F <= 1e-112) {
		tmp = -t_1;
	} else if (F <= 1.25e-64) {
		tmp = ((F * Math.sqrt((1.0 / t_0))) - x) / B;
	} else if (F <= 2.05e-42) {
		tmp = x * (-1.0 / Math.tan(B));
	} else if (F <= 3.9e+270) {
		tmp = (1.0 / Math.sin(B)) - (x / B);
	} else {
		tmp = (F * (1.0 / (F * B))) - t_1;
	}
	return tmp;
}
def code(F, B, x):
	t_0 = 2.0 + (x * 2.0)
	t_1 = x / math.tan(B)
	tmp = 0
	if F <= -9.6e+84:
		tmp = (-1.0 / B) - t_1
	elif F <= -3.1e-17:
		tmp = (F / (math.sin(B) * ((-0.5 * (t_0 / F)) - F))) - (x / B)
	elif F <= -7e-198:
		tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B)
	elif F <= 1e-112:
		tmp = -t_1
	elif F <= 1.25e-64:
		tmp = ((F * math.sqrt((1.0 / t_0))) - x) / B
	elif F <= 2.05e-42:
		tmp = x * (-1.0 / math.tan(B))
	elif F <= 3.9e+270:
		tmp = (1.0 / math.sin(B)) - (x / B)
	else:
		tmp = (F * (1.0 / (F * B))) - t_1
	return tmp
function code(F, B, x)
	t_0 = Float64(2.0 + Float64(x * 2.0))
	t_1 = Float64(x / tan(B))
	tmp = 0.0
	if (F <= -9.6e+84)
		tmp = Float64(Float64(-1.0 / B) - t_1);
	elseif (F <= -3.1e-17)
		tmp = Float64(Float64(F / Float64(sin(B) * Float64(Float64(-0.5 * Float64(t_0 / F)) - F))) - Float64(x / B));
	elseif (F <= -7e-198)
		tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B));
	elseif (F <= 1e-112)
		tmp = Float64(-t_1);
	elseif (F <= 1.25e-64)
		tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / t_0))) - x) / B);
	elseif (F <= 2.05e-42)
		tmp = Float64(x * Float64(-1.0 / tan(B)));
	elseif (F <= 3.9e+270)
		tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B));
	else
		tmp = Float64(Float64(F * Float64(1.0 / Float64(F * B))) - t_1);
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = 2.0 + (x * 2.0);
	t_1 = x / tan(B);
	tmp = 0.0;
	if (F <= -9.6e+84)
		tmp = (-1.0 / B) - t_1;
	elseif (F <= -3.1e-17)
		tmp = (F / (sin(B) * ((-0.5 * (t_0 / F)) - F))) - (x / B);
	elseif (F <= -7e-198)
		tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B);
	elseif (F <= 1e-112)
		tmp = -t_1;
	elseif (F <= 1.25e-64)
		tmp = ((F * sqrt((1.0 / t_0))) - x) / B;
	elseif (F <= 2.05e-42)
		tmp = x * (-1.0 / tan(B));
	elseif (F <= 3.9e+270)
		tmp = (1.0 / sin(B)) - (x / B);
	else
		tmp = (F * (1.0 / (F * B))) - t_1;
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := Block[{t$95$0 = N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -9.6e+84], N[(N[(-1.0 / B), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -3.1e-17], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[(N[(-0.5 * N[(t$95$0 / F), $MachinePrecision]), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -7e-198], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1e-112], (-t$95$1), If[LessEqual[F, 1.25e-64], N[(N[(N[(F * N[Sqrt[N[(1.0 / t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2.05e-42], N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.9e+270], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(F * N[(1.0 / N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := 2 + x \cdot 2\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -9.6 \cdot 10^{+84}:\\
\;\;\;\;\frac{-1}{B} - t\_1\\

\mathbf{elif}\;F \leq -3.1 \cdot 10^{-17}:\\
\;\;\;\;\frac{F}{\sin B \cdot \left(-0.5 \cdot \frac{t\_0}{F} - F\right)} - \frac{x}{B}\\

\mathbf{elif}\;F \leq -7 \cdot 10^{-198}:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\

\mathbf{elif}\;F \leq 10^{-112}:\\
\;\;\;\;-t\_1\\

\mathbf{elif}\;F \leq 1.25 \cdot 10^{-64}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{t\_0}} - x}{B}\\

\mathbf{elif}\;F \leq 2.05 \cdot 10^{-42}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B}\\

\mathbf{elif}\;F \leq 3.9 \cdot 10^{+270}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\

\mathbf{else}:\\
\;\;\;\;F \cdot \frac{1}{F \cdot B} - t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 8 regimes
  2. if F < -9.5999999999999999e84

    1. Initial program 50.9%

      \[\left(-x \cdot \frac{1}{\tan 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. distribute-lft-neg-in50.9%

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

        \[\leadsto \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\right) \cdot \frac{1}{\tan B}} \]
      3. associate-*l/64.5%

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

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

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

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

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

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

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num64.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.5999999999999999e84 < F < -3.0999999999999998e-17

    1. Initial program 95.5%

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

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

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

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

      \[\leadsto \color{blue}{\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - \frac{x}{B}} \]
    6. Taylor expanded in F around -inf 79.0%

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

    if -3.0999999999999998e-17 < F < -7.0000000000000005e-198

    1. Initial program 99.4%

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

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

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

    if -7.0000000000000005e-198 < F < 9.9999999999999995e-113

    1. Initial program 99.4%

      \[\left(-x \cdot \frac{1}{\tan 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. distribute-lft-neg-in99.4%

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

        \[\leadsto \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\right) \cdot \frac{1}{\tan B}} \]
      3. fma-define99.4%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \color{blue}{\frac{\left(-x\right) \cdot 1}{\tan B}}\right) \]
      11. *-rgt-identity99.6%

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

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

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

        \[\leadsto \color{blue}{-\frac{x \cdot \cos B}{\sin B}} \]
      2. associate-/l*74.2%

        \[\leadsto -\color{blue}{x \cdot \frac{\cos B}{\sin B}} \]
    7. Simplified74.2%

      \[\leadsto \color{blue}{-x \cdot \frac{\cos B}{\sin B}} \]
    8. Step-by-step derivation
      1. clear-num74.2%

        \[\leadsto -x \cdot \color{blue}{\frac{1}{\frac{\sin B}{\cos B}}} \]
      2. un-div-inv74.3%

        \[\leadsto -\color{blue}{\frac{x}{\frac{\sin B}{\cos B}}} \]
      3. quot-tan74.4%

        \[\leadsto -\frac{x}{\color{blue}{\tan B}} \]
    9. Applied egg-rr74.4%

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

    if 9.9999999999999995e-113 < F < 1.25000000000000008e-64

    1. Initial program 99.3%

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

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

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

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

      \[\leadsto \color{blue}{\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - \frac{x}{B}} \]
    6. Taylor expanded in F around 0 99.6%

      \[\leadsto \frac{F}{\color{blue}{\sin B \cdot \sqrt{2 + 2 \cdot x}}} - \frac{x}{B} \]
    7. Step-by-step derivation
      1. *-commutative99.6%

        \[\leadsto \frac{F}{\color{blue}{\sqrt{2 + 2 \cdot x} \cdot \sin B}} - \frac{x}{B} \]
    8. Simplified99.6%

      \[\leadsto \frac{F}{\color{blue}{\sqrt{2 + 2 \cdot x} \cdot \sin B}} - \frac{x}{B} \]
    9. Taylor expanded in B around 0 99.7%

      \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + 2 \cdot x}} - x}{B}} \]

    if 1.25000000000000008e-64 < F < 2.0500000000000001e-42

    1. Initial program 99.7%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Step-by-step derivation
      1. distribute-lft-neg-in99.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \color{blue}{\frac{\left(-x\right) \cdot 1}{\tan B}}\right) \]
      11. *-rgt-identity99.1%

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
    6. Step-by-step derivation
      1. mul-1-neg60.9%

        \[\leadsto \color{blue}{-\frac{x \cdot \cos B}{\sin B}} \]
      2. associate-/l*61.5%

        \[\leadsto -\color{blue}{x \cdot \frac{\cos B}{\sin B}} \]
    7. Simplified61.5%

      \[\leadsto \color{blue}{-x \cdot \frac{\cos B}{\sin B}} \]
    8. Step-by-step derivation
      1. *-un-lft-identity61.5%

        \[\leadsto -x \cdot \color{blue}{\left(1 \cdot \frac{\cos B}{\sin B}\right)} \]
      2. clear-num60.9%

        \[\leadsto -x \cdot \left(1 \cdot \color{blue}{\frac{1}{\frac{\sin B}{\cos B}}}\right) \]
      3. quot-tan61.5%

        \[\leadsto -x \cdot \left(1 \cdot \frac{1}{\color{blue}{\tan B}}\right) \]
    9. Applied egg-rr61.5%

      \[\leadsto -x \cdot \color{blue}{\left(1 \cdot \frac{1}{\tan B}\right)} \]
    10. Step-by-step derivation
      1. *-lft-identity61.5%

        \[\leadsto -x \cdot \color{blue}{\frac{1}{\tan B}} \]
    11. Simplified61.5%

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

    if 2.0500000000000001e-42 < F < 3.8999999999999999e270

    1. Initial program 67.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. Add Preprocessing
    3. Taylor expanded in B around 0 53.6%

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    4. Taylor expanded in F around inf 74.1%

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

    if 3.8999999999999999e270 < F

    1. Initial program 50.7%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Step-by-step derivation
      1. distribute-lft-neg-in50.7%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto F \cdot \color{blue}{\frac{1}{B \cdot F}} - \frac{x}{\tan B} \]
    7. Step-by-step derivation
      1. *-commutative90.7%

        \[\leadsto F \cdot \frac{1}{\color{blue}{F \cdot B}} - \frac{x}{\tan B} \]
    8. Simplified90.7%

      \[\leadsto F \cdot \color{blue}{\frac{1}{F \cdot B}} - \frac{x}{\tan B} \]
  3. Recombined 8 regimes into one program.
  4. Final simplification76.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -9.6 \cdot 10^{+84}:\\ \;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -3.1 \cdot 10^{-17}:\\ \;\;\;\;\frac{F}{\sin B \cdot \left(-0.5 \cdot \frac{2 + x \cdot 2}{F} - F\right)} - \frac{x}{B}\\ \mathbf{elif}\;F \leq -7 \cdot 10^{-198}:\\ \;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 10^{-112}:\\ \;\;\;\;-\frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 1.25 \cdot 10^{-64}:\\ \;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\ \mathbf{elif}\;F \leq 2.05 \cdot 10^{-42}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B}\\ \mathbf{elif}\;F \leq 3.9 \cdot 10^{+270}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;F \cdot \frac{1}{F \cdot B} - \frac{x}{\tan B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 69.1% accurate, 2.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := 2 + x \cdot 2\\ t_1 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -8.5 \cdot 10^{+84}:\\ \;\;\;\;\frac{-1}{B} - t\_1\\ \mathbf{elif}\;F \leq -3.1 \cdot 10^{-17}:\\ \;\;\;\;\frac{F}{\sin B \cdot \left(-0.5 \cdot \frac{t\_0}{F} - F\right)} - \frac{x}{B}\\ \mathbf{elif}\;F \leq -7 \cdot 10^{-198}:\\ \;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{1}{\frac{B}{F}} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 1.65 \cdot 10^{-112}:\\ \;\;\;\;-t\_1\\ \mathbf{elif}\;F \leq 3.9 \cdot 10^{-64}:\\ \;\;\;\;\frac{F \cdot \sqrt{\frac{1}{t\_0}} - x}{B}\\ \mathbf{elif}\;F \leq 2.05 \cdot 10^{-42}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B}\\ \mathbf{elif}\;F \leq 1.75 \cdot 10^{+273}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;F \cdot \frac{1}{F \cdot B} - t\_1\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (+ 2.0 (* x 2.0))) (t_1 (/ x (tan B))))
   (if (<= F -8.5e+84)
     (- (/ -1.0 B) t_1)
     (if (<= F -3.1e-17)
       (- (/ F (* (sin B) (- (* -0.5 (/ t_0 F)) F))) (/ x B))
       (if (<= F -7e-198)
         (-
          (* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ 1.0 (/ B F)))
          (/ x B))
         (if (<= F 1.65e-112)
           (- t_1)
           (if (<= F 3.9e-64)
             (/ (- (* F (sqrt (/ 1.0 t_0))) x) B)
             (if (<= F 2.05e-42)
               (* x (/ -1.0 (tan B)))
               (if (<= F 1.75e+273)
                 (- (/ 1.0 (sin B)) (/ x B))
                 (- (* F (/ 1.0 (* F B))) t_1))))))))))
double code(double F, double B, double x) {
	double t_0 = 2.0 + (x * 2.0);
	double t_1 = x / tan(B);
	double tmp;
	if (F <= -8.5e+84) {
		tmp = (-1.0 / B) - t_1;
	} else if (F <= -3.1e-17) {
		tmp = (F / (sin(B) * ((-0.5 * (t_0 / F)) - F))) - (x / B);
	} else if (F <= -7e-198) {
		tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (1.0 / (B / F))) - (x / B);
	} else if (F <= 1.65e-112) {
		tmp = -t_1;
	} else if (F <= 3.9e-64) {
		tmp = ((F * sqrt((1.0 / t_0))) - x) / B;
	} else if (F <= 2.05e-42) {
		tmp = x * (-1.0 / tan(B));
	} else if (F <= 1.75e+273) {
		tmp = (1.0 / sin(B)) - (x / B);
	} else {
		tmp = (F * (1.0 / (F * B))) - t_1;
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = 2.0d0 + (x * 2.0d0)
    t_1 = x / tan(b)
    if (f <= (-8.5d+84)) then
        tmp = ((-1.0d0) / b) - t_1
    else if (f <= (-3.1d-17)) then
        tmp = (f / (sin(b) * (((-0.5d0) * (t_0 / f)) - f))) - (x / b)
    else if (f <= (-7d-198)) then
        tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (1.0d0 / (b / f))) - (x / b)
    else if (f <= 1.65d-112) then
        tmp = -t_1
    else if (f <= 3.9d-64) then
        tmp = ((f * sqrt((1.0d0 / t_0))) - x) / b
    else if (f <= 2.05d-42) then
        tmp = x * ((-1.0d0) / tan(b))
    else if (f <= 1.75d+273) then
        tmp = (1.0d0 / sin(b)) - (x / b)
    else
        tmp = (f * (1.0d0 / (f * b))) - t_1
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double t_0 = 2.0 + (x * 2.0);
	double t_1 = x / Math.tan(B);
	double tmp;
	if (F <= -8.5e+84) {
		tmp = (-1.0 / B) - t_1;
	} else if (F <= -3.1e-17) {
		tmp = (F / (Math.sin(B) * ((-0.5 * (t_0 / F)) - F))) - (x / B);
	} else if (F <= -7e-198) {
		tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (1.0 / (B / F))) - (x / B);
	} else if (F <= 1.65e-112) {
		tmp = -t_1;
	} else if (F <= 3.9e-64) {
		tmp = ((F * Math.sqrt((1.0 / t_0))) - x) / B;
	} else if (F <= 2.05e-42) {
		tmp = x * (-1.0 / Math.tan(B));
	} else if (F <= 1.75e+273) {
		tmp = (1.0 / Math.sin(B)) - (x / B);
	} else {
		tmp = (F * (1.0 / (F * B))) - t_1;
	}
	return tmp;
}
def code(F, B, x):
	t_0 = 2.0 + (x * 2.0)
	t_1 = x / math.tan(B)
	tmp = 0
	if F <= -8.5e+84:
		tmp = (-1.0 / B) - t_1
	elif F <= -3.1e-17:
		tmp = (F / (math.sin(B) * ((-0.5 * (t_0 / F)) - F))) - (x / B)
	elif F <= -7e-198:
		tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (1.0 / (B / F))) - (x / B)
	elif F <= 1.65e-112:
		tmp = -t_1
	elif F <= 3.9e-64:
		tmp = ((F * math.sqrt((1.0 / t_0))) - x) / B
	elif F <= 2.05e-42:
		tmp = x * (-1.0 / math.tan(B))
	elif F <= 1.75e+273:
		tmp = (1.0 / math.sin(B)) - (x / B)
	else:
		tmp = (F * (1.0 / (F * B))) - t_1
	return tmp
function code(F, B, x)
	t_0 = Float64(2.0 + Float64(x * 2.0))
	t_1 = Float64(x / tan(B))
	tmp = 0.0
	if (F <= -8.5e+84)
		tmp = Float64(Float64(-1.0 / B) - t_1);
	elseif (F <= -3.1e-17)
		tmp = Float64(Float64(F / Float64(sin(B) * Float64(Float64(-0.5 * Float64(t_0 / F)) - F))) - Float64(x / B));
	elseif (F <= -7e-198)
		tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(1.0 / Float64(B / F))) - Float64(x / B));
	elseif (F <= 1.65e-112)
		tmp = Float64(-t_1);
	elseif (F <= 3.9e-64)
		tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / t_0))) - x) / B);
	elseif (F <= 2.05e-42)
		tmp = Float64(x * Float64(-1.0 / tan(B)));
	elseif (F <= 1.75e+273)
		tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B));
	else
		tmp = Float64(Float64(F * Float64(1.0 / Float64(F * B))) - t_1);
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = 2.0 + (x * 2.0);
	t_1 = x / tan(B);
	tmp = 0.0;
	if (F <= -8.5e+84)
		tmp = (-1.0 / B) - t_1;
	elseif (F <= -3.1e-17)
		tmp = (F / (sin(B) * ((-0.5 * (t_0 / F)) - F))) - (x / B);
	elseif (F <= -7e-198)
		tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (1.0 / (B / F))) - (x / B);
	elseif (F <= 1.65e-112)
		tmp = -t_1;
	elseif (F <= 3.9e-64)
		tmp = ((F * sqrt((1.0 / t_0))) - x) / B;
	elseif (F <= 2.05e-42)
		tmp = x * (-1.0 / tan(B));
	elseif (F <= 1.75e+273)
		tmp = (1.0 / sin(B)) - (x / B);
	else
		tmp = (F * (1.0 / (F * B))) - t_1;
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := Block[{t$95$0 = N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -8.5e+84], N[(N[(-1.0 / B), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -3.1e-17], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[(N[(-0.5 * N[(t$95$0 / F), $MachinePrecision]), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -7e-198], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(1.0 / N[(B / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.65e-112], (-t$95$1), If[LessEqual[F, 3.9e-64], N[(N[(N[(F * N[Sqrt[N[(1.0 / t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2.05e-42], N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.75e+273], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(F * N[(1.0 / N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := 2 + x \cdot 2\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -8.5 \cdot 10^{+84}:\\
\;\;\;\;\frac{-1}{B} - t\_1\\

\mathbf{elif}\;F \leq -3.1 \cdot 10^{-17}:\\
\;\;\;\;\frac{F}{\sin B \cdot \left(-0.5 \cdot \frac{t\_0}{F} - F\right)} - \frac{x}{B}\\

\mathbf{elif}\;F \leq -7 \cdot 10^{-198}:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{1}{\frac{B}{F}} - \frac{x}{B}\\

\mathbf{elif}\;F \leq 1.65 \cdot 10^{-112}:\\
\;\;\;\;-t\_1\\

\mathbf{elif}\;F \leq 3.9 \cdot 10^{-64}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{t\_0}} - x}{B}\\

\mathbf{elif}\;F \leq 2.05 \cdot 10^{-42}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B}\\

\mathbf{elif}\;F \leq 1.75 \cdot 10^{+273}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\

\mathbf{else}:\\
\;\;\;\;F \cdot \frac{1}{F \cdot B} - t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 8 regimes
  2. if F < -8.5000000000000008e84

    1. Initial program 50.9%

      \[\left(-x \cdot \frac{1}{\tan 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. distribute-lft-neg-in50.9%

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

        \[\leadsto \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\right) \cdot \frac{1}{\tan B}} \]
      3. associate-*l/64.5%

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

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

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

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

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

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

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num64.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.5000000000000008e84 < F < -3.0999999999999998e-17

    1. Initial program 95.5%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in B around 0 83.0%

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    4. Step-by-step derivation
      1. +-commutative83.0%

        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-\frac{x}{B}\right)} \]
      2. unsub-neg83.0%

        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \frac{x}{B}} \]
    5. Applied egg-rr87.1%

      \[\leadsto \color{blue}{\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - \frac{x}{B}} \]
    6. Taylor expanded in F around -inf 79.0%

      \[\leadsto \frac{F}{\sin B \cdot \color{blue}{\left(-1 \cdot F + -0.5 \cdot \frac{2 + 2 \cdot x}{F}\right)}} - \frac{x}{B} \]

    if -3.0999999999999998e-17 < F < -7.0000000000000005e-198

    1. Initial program 99.4%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in B around 0 83.5%

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    4. Step-by-step derivation
      1. clear-num83.6%

        \[\leadsto \left(-\frac{x}{B}\right) + \color{blue}{\frac{1}{\frac{\sin B}{F}}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
      2. inv-pow83.6%

        \[\leadsto \left(-\frac{x}{B}\right) + \color{blue}{{\left(\frac{\sin B}{F}\right)}^{-1}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    5. Applied egg-rr83.6%

      \[\leadsto \left(-\frac{x}{B}\right) + \color{blue}{{\left(\frac{\sin B}{F}\right)}^{-1}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    6. Step-by-step derivation
      1. unpow-183.6%

        \[\leadsto \left(-\frac{x}{B}\right) + \color{blue}{\frac{1}{\frac{\sin B}{F}}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    7. Simplified83.6%

      \[\leadsto \left(-\frac{x}{B}\right) + \color{blue}{\frac{1}{\frac{\sin B}{F}}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    8. Taylor expanded in B around 0 65.5%

      \[\leadsto \left(-\frac{x}{B}\right) + \frac{1}{\color{blue}{\frac{B}{F}}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]

    if -7.0000000000000005e-198 < F < 1.65e-112

    1. Initial program 99.4%

      \[\left(-x \cdot \frac{1}{\tan 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. distribute-lft-neg-in99.4%

        \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{1}{\tan B}} + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
      2. +-commutative99.4%

        \[\leadsto \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\right) \cdot \frac{1}{\tan B}} \]
      3. fma-define99.4%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{F}{\sin B}, {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}, \left(-x\right) \cdot \frac{1}{\tan B}\right)} \]
      4. +-commutative99.4%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\color{blue}{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}}^{\left(-\frac{1}{2}\right)}, \left(-x\right) \cdot \frac{1}{\tan B}\right) \]
      5. *-commutative99.4%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\color{blue}{x \cdot 2} + \left(F \cdot F + 2\right)\right)}^{\left(-\frac{1}{2}\right)}, \left(-x\right) \cdot \frac{1}{\tan B}\right) \]
      6. fma-define99.4%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\color{blue}{\left(\mathsf{fma}\left(x, 2, F \cdot F + 2\right)\right)}}^{\left(-\frac{1}{2}\right)}, \left(-x\right) \cdot \frac{1}{\tan B}\right) \]
      7. fma-define99.4%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)\right)}^{\left(-\frac{1}{2}\right)}, \left(-x\right) \cdot \frac{1}{\tan B}\right) \]
      8. metadata-eval99.4%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(-\color{blue}{0.5}\right)}, \left(-x\right) \cdot \frac{1}{\tan B}\right) \]
      9. metadata-eval99.4%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\color{blue}{-0.5}}, \left(-x\right) \cdot \frac{1}{\tan B}\right) \]
      10. associate-*r/99.6%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \color{blue}{\frac{\left(-x\right) \cdot 1}{\tan B}}\right) \]
      11. *-rgt-identity99.6%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \frac{\color{blue}{-x}}{\tan B}\right) \]
    3. Simplified99.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \frac{-x}{\tan B}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in F around 0 74.3%

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
    6. Step-by-step derivation
      1. mul-1-neg74.3%

        \[\leadsto \color{blue}{-\frac{x \cdot \cos B}{\sin B}} \]
      2. associate-/l*74.2%

        \[\leadsto -\color{blue}{x \cdot \frac{\cos B}{\sin B}} \]
    7. Simplified74.2%

      \[\leadsto \color{blue}{-x \cdot \frac{\cos B}{\sin B}} \]
    8. Step-by-step derivation
      1. clear-num74.2%

        \[\leadsto -x \cdot \color{blue}{\frac{1}{\frac{\sin B}{\cos B}}} \]
      2. un-div-inv74.3%

        \[\leadsto -\color{blue}{\frac{x}{\frac{\sin B}{\cos B}}} \]
      3. quot-tan74.4%

        \[\leadsto -\frac{x}{\color{blue}{\tan B}} \]
    9. Applied egg-rr74.4%

      \[\leadsto -\color{blue}{\frac{x}{\tan B}} \]

    if 1.65e-112 < F < 3.8999999999999997e-64

    1. Initial program 99.3%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in B around 0 99.6%

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    4. Step-by-step derivation
      1. +-commutative99.6%

        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-\frac{x}{B}\right)} \]
      2. unsub-neg99.6%

        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \frac{x}{B}} \]
    5. Applied egg-rr99.6%

      \[\leadsto \color{blue}{\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - \frac{x}{B}} \]
    6. Taylor expanded in F around 0 99.6%

      \[\leadsto \frac{F}{\color{blue}{\sin B \cdot \sqrt{2 + 2 \cdot x}}} - \frac{x}{B} \]
    7. Step-by-step derivation
      1. *-commutative99.6%

        \[\leadsto \frac{F}{\color{blue}{\sqrt{2 + 2 \cdot x} \cdot \sin B}} - \frac{x}{B} \]
    8. Simplified99.6%

      \[\leadsto \frac{F}{\color{blue}{\sqrt{2 + 2 \cdot x} \cdot \sin B}} - \frac{x}{B} \]
    9. Taylor expanded in B around 0 99.7%

      \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + 2 \cdot x}} - x}{B}} \]

    if 3.8999999999999997e-64 < F < 2.0500000000000001e-42

    1. Initial program 99.7%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Step-by-step derivation
      1. distribute-lft-neg-in99.7%

        \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{1}{\tan B}} + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
      2. +-commutative99.7%

        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x\right) \cdot \frac{1}{\tan B}} \]
      3. fma-define99.7%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{F}{\sin B}, {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}, \left(-x\right) \cdot \frac{1}{\tan B}\right)} \]
      4. +-commutative99.7%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\color{blue}{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}}^{\left(-\frac{1}{2}\right)}, \left(-x\right) \cdot \frac{1}{\tan B}\right) \]
      5. *-commutative99.7%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\color{blue}{x \cdot 2} + \left(F \cdot F + 2\right)\right)}^{\left(-\frac{1}{2}\right)}, \left(-x\right) \cdot \frac{1}{\tan B}\right) \]
      6. fma-define99.7%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\color{blue}{\left(\mathsf{fma}\left(x, 2, F \cdot F + 2\right)\right)}}^{\left(-\frac{1}{2}\right)}, \left(-x\right) \cdot \frac{1}{\tan B}\right) \]
      7. fma-define99.7%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)\right)}^{\left(-\frac{1}{2}\right)}, \left(-x\right) \cdot \frac{1}{\tan B}\right) \]
      8. metadata-eval99.7%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(-\color{blue}{0.5}\right)}, \left(-x\right) \cdot \frac{1}{\tan B}\right) \]
      9. metadata-eval99.7%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\color{blue}{-0.5}}, \left(-x\right) \cdot \frac{1}{\tan B}\right) \]
      10. associate-*r/99.1%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \color{blue}{\frac{\left(-x\right) \cdot 1}{\tan B}}\right) \]
      11. *-rgt-identity99.1%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \frac{\color{blue}{-x}}{\tan B}\right) \]
    3. Simplified99.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \frac{-x}{\tan B}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in F around 0 60.9%

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
    6. Step-by-step derivation
      1. mul-1-neg60.9%

        \[\leadsto \color{blue}{-\frac{x \cdot \cos B}{\sin B}} \]
      2. associate-/l*61.5%

        \[\leadsto -\color{blue}{x \cdot \frac{\cos B}{\sin B}} \]
    7. Simplified61.5%

      \[\leadsto \color{blue}{-x \cdot \frac{\cos B}{\sin B}} \]
    8. Step-by-step derivation
      1. *-un-lft-identity61.5%

        \[\leadsto -x \cdot \color{blue}{\left(1 \cdot \frac{\cos B}{\sin B}\right)} \]
      2. clear-num60.9%

        \[\leadsto -x \cdot \left(1 \cdot \color{blue}{\frac{1}{\frac{\sin B}{\cos B}}}\right) \]
      3. quot-tan61.5%

        \[\leadsto -x \cdot \left(1 \cdot \frac{1}{\color{blue}{\tan B}}\right) \]
    9. Applied egg-rr61.5%

      \[\leadsto -x \cdot \color{blue}{\left(1 \cdot \frac{1}{\tan B}\right)} \]
    10. Step-by-step derivation
      1. *-lft-identity61.5%

        \[\leadsto -x \cdot \color{blue}{\frac{1}{\tan B}} \]
    11. Simplified61.5%

      \[\leadsto -x \cdot \color{blue}{\frac{1}{\tan B}} \]

    if 2.0500000000000001e-42 < F < 1.75000000000000005e273

    1. Initial program 67.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. Add Preprocessing
    3. Taylor expanded in B around 0 53.6%

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    4. Taylor expanded in F around inf 74.1%

      \[\leadsto \color{blue}{\frac{1}{\sin B} - \frac{x}{B}} \]

    if 1.75000000000000005e273 < F

    1. Initial program 50.7%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Step-by-step derivation
      1. distribute-lft-neg-in50.7%

        \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{1}{\tan B}} + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
      2. +-commutative50.7%

        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x\right) \cdot \frac{1}{\tan B}} \]
      3. associate-*l/64.0%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} + \left(-x\right) \cdot \frac{1}{\tan B} \]
      4. associate-/l*64.0%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} + \left(-x\right) \cdot \frac{1}{\tan B} \]
      5. fma-define64.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(F, \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}, \left(-x\right) \cdot \frac{1}{\tan B}\right)} \]
      6. /-rgt-identity64.0%

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{F}{1}}, \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}, \left(-x\right) \cdot \frac{1}{\tan B}\right) \]
      7. remove-double-neg64.0%

        \[\leadsto \mathsf{fma}\left(\frac{F}{1}, \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}, \color{blue}{-\left(-\left(-x\right) \cdot \frac{1}{\tan B}\right)}\right) \]
      8. fma-neg64.0%

        \[\leadsto \color{blue}{\frac{F}{1} \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B} - \left(-\left(-x\right) \cdot \frac{1}{\tan B}\right)} \]
    3. Simplified64.0%

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Add Preprocessing
    5. Taylor expanded in F around inf 99.7%

      \[\leadsto F \cdot \color{blue}{\frac{1}{F \cdot \sin B}} - \frac{x}{\tan B} \]
    6. Taylor expanded in B around 0 90.7%

      \[\leadsto F \cdot \color{blue}{\frac{1}{B \cdot F}} - \frac{x}{\tan B} \]
    7. Step-by-step derivation
      1. *-commutative90.7%

        \[\leadsto F \cdot \frac{1}{\color{blue}{F \cdot B}} - \frac{x}{\tan B} \]
    8. Simplified90.7%

      \[\leadsto F \cdot \color{blue}{\frac{1}{F \cdot B}} - \frac{x}{\tan B} \]
  3. Recombined 8 regimes into one program.
  4. Final simplification76.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -8.5 \cdot 10^{+84}:\\ \;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -3.1 \cdot 10^{-17}:\\ \;\;\;\;\frac{F}{\sin B \cdot \left(-0.5 \cdot \frac{2 + x \cdot 2}{F} - F\right)} - \frac{x}{B}\\ \mathbf{elif}\;F \leq -7 \cdot 10^{-198}:\\ \;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{1}{\frac{B}{F}} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 1.65 \cdot 10^{-112}:\\ \;\;\;\;-\frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 3.9 \cdot 10^{-64}:\\ \;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\ \mathbf{elif}\;F \leq 2.05 \cdot 10^{-42}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B}\\ \mathbf{elif}\;F \leq 1.75 \cdot 10^{+273}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;F \cdot \frac{1}{F \cdot B} - \frac{x}{\tan B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 69.4% accurate, 2.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -7.2 \cdot 10^{+84}:\\ \;\;\;\;\frac{-1}{B} - t\_0\\ \mathbf{elif}\;F \leq -0.31:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 2.05 \cdot 10^{-42}:\\ \;\;\;\;-t\_0\\ \mathbf{elif}\;F \leq 1.7 \cdot 10^{+273}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;F \cdot \frac{1}{F \cdot B} - t\_0\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (/ x (tan B))))
   (if (<= F -7.2e+84)
     (- (/ -1.0 B) t_0)
     (if (<= F -0.31)
       (- (/ -1.0 (sin B)) (/ x B))
       (if (<= F 2.05e-42)
         (- t_0)
         (if (<= F 1.7e+273)
           (- (/ 1.0 (sin B)) (/ x B))
           (- (* F (/ 1.0 (* F B))) t_0)))))))
double code(double F, double B, double x) {
	double t_0 = x / tan(B);
	double tmp;
	if (F <= -7.2e+84) {
		tmp = (-1.0 / B) - t_0;
	} else if (F <= -0.31) {
		tmp = (-1.0 / sin(B)) - (x / B);
	} else if (F <= 2.05e-42) {
		tmp = -t_0;
	} else if (F <= 1.7e+273) {
		tmp = (1.0 / sin(B)) - (x / B);
	} else {
		tmp = (F * (1.0 / (F * B))) - t_0;
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: t_0
    real(8) :: tmp
    t_0 = x / tan(b)
    if (f <= (-7.2d+84)) then
        tmp = ((-1.0d0) / b) - t_0
    else if (f <= (-0.31d0)) then
        tmp = ((-1.0d0) / sin(b)) - (x / b)
    else if (f <= 2.05d-42) then
        tmp = -t_0
    else if (f <= 1.7d+273) then
        tmp = (1.0d0 / sin(b)) - (x / b)
    else
        tmp = (f * (1.0d0 / (f * b))) - t_0
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double t_0 = x / Math.tan(B);
	double tmp;
	if (F <= -7.2e+84) {
		tmp = (-1.0 / B) - t_0;
	} else if (F <= -0.31) {
		tmp = (-1.0 / Math.sin(B)) - (x / B);
	} else if (F <= 2.05e-42) {
		tmp = -t_0;
	} else if (F <= 1.7e+273) {
		tmp = (1.0 / Math.sin(B)) - (x / B);
	} else {
		tmp = (F * (1.0 / (F * B))) - t_0;
	}
	return tmp;
}
def code(F, B, x):
	t_0 = x / math.tan(B)
	tmp = 0
	if F <= -7.2e+84:
		tmp = (-1.0 / B) - t_0
	elif F <= -0.31:
		tmp = (-1.0 / math.sin(B)) - (x / B)
	elif F <= 2.05e-42:
		tmp = -t_0
	elif F <= 1.7e+273:
		tmp = (1.0 / math.sin(B)) - (x / B)
	else:
		tmp = (F * (1.0 / (F * B))) - t_0
	return tmp
function code(F, B, x)
	t_0 = Float64(x / tan(B))
	tmp = 0.0
	if (F <= -7.2e+84)
		tmp = Float64(Float64(-1.0 / B) - t_0);
	elseif (F <= -0.31)
		tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B));
	elseif (F <= 2.05e-42)
		tmp = Float64(-t_0);
	elseif (F <= 1.7e+273)
		tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B));
	else
		tmp = Float64(Float64(F * Float64(1.0 / Float64(F * B))) - t_0);
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = x / tan(B);
	tmp = 0.0;
	if (F <= -7.2e+84)
		tmp = (-1.0 / B) - t_0;
	elseif (F <= -0.31)
		tmp = (-1.0 / sin(B)) - (x / B);
	elseif (F <= 2.05e-42)
		tmp = -t_0;
	elseif (F <= 1.7e+273)
		tmp = (1.0 / sin(B)) - (x / B);
	else
		tmp = (F * (1.0 / (F * B))) - t_0;
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -7.2e+84], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -0.31], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.05e-42], (-t$95$0), If[LessEqual[F, 1.7e+273], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(F * N[(1.0 / N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -7.2 \cdot 10^{+84}:\\
\;\;\;\;\frac{-1}{B} - t\_0\\

\mathbf{elif}\;F \leq -0.31:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\

\mathbf{elif}\;F \leq 2.05 \cdot 10^{-42}:\\
\;\;\;\;-t\_0\\

\mathbf{elif}\;F \leq 1.7 \cdot 10^{+273}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\

\mathbf{else}:\\
\;\;\;\;F \cdot \frac{1}{F \cdot B} - t\_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if F < -7.1999999999999999e84

    1. Initial program 50.9%

      \[\left(-x \cdot \frac{1}{\tan 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. distribute-lft-neg-in50.9%

        \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{1}{\tan B}} + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
      2. +-commutative50.9%

        \[\leadsto \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\right) \cdot \frac{1}{\tan B}} \]
      3. associate-*l/64.5%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} + \left(-x\right) \cdot \frac{1}{\tan B} \]
      4. associate-/l*64.5%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} + \left(-x\right) \cdot \frac{1}{\tan B} \]
      5. fma-define64.5%

        \[\leadsto \color{blue}{\mathsf{fma}\left(F, \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}, \left(-x\right) \cdot \frac{1}{\tan B}\right)} \]
      6. /-rgt-identity64.5%

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{F}{1}}, \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}, \left(-x\right) \cdot \frac{1}{\tan B}\right) \]
      7. remove-double-neg64.5%

        \[\leadsto \mathsf{fma}\left(\frac{F}{1}, \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}, \color{blue}{-\left(-\left(-x\right) \cdot \frac{1}{\tan B}\right)}\right) \]
      8. fma-neg64.5%

        \[\leadsto \color{blue}{\frac{F}{1} \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B} - \left(-\left(-x\right) \cdot \frac{1}{\tan B}\right)} \]
    3. Simplified64.5%

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num64.6%

        \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
      2. inv-pow64.6%

        \[\leadsto F \cdot \color{blue}{{\left(\frac{\sin B}{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}\right)}^{-1}} - \frac{x}{\tan B} \]
      3. fma-define64.6%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F + 2}\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      4. fma-undefine64.6%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\color{blue}{\left(x \cdot 2 + \left(F \cdot F + 2\right)\right)}}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      5. *-commutative64.6%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\color{blue}{2 \cdot x} + \left(F \cdot F + 2\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      6. fma-define64.6%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\color{blue}{\left(\mathsf{fma}\left(2, x, F \cdot F + 2\right)\right)}}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      7. fma-define64.6%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
    6. Applied egg-rr64.6%

      \[\leadsto F \cdot \color{blue}{{\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}\right)}^{-1}} - \frac{x}{\tan B} \]
    7. Step-by-step derivation
      1. unpow-164.6%

        \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
    8. Simplified64.6%

      \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
    9. Taylor expanded in F around -inf 99.7%

      \[\leadsto \color{blue}{\frac{-1}{\sin B}} - \frac{x}{\tan B} \]
    10. Taylor expanded in B around 0 80.9%

      \[\leadsto \color{blue}{\frac{-1}{B}} - \frac{x}{\tan B} \]

    if -7.1999999999999999e84 < F < -0.309999999999999998

    1. Initial program 94.7%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in B around 0 84.9%

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    4. Taylor expanded in F around -inf 87.9%

      \[\leadsto \color{blue}{-1 \cdot \left(\frac{1}{\sin B} + \frac{x}{B}\right)} \]
    5. Step-by-step derivation
      1. distribute-lft-in87.9%

        \[\leadsto \color{blue}{-1 \cdot \frac{1}{\sin B} + -1 \cdot \frac{x}{B}} \]
      2. mul-1-neg87.9%

        \[\leadsto -1 \cdot \frac{1}{\sin B} + \color{blue}{\left(-\frac{x}{B}\right)} \]
      3. unsub-neg87.9%

        \[\leadsto \color{blue}{-1 \cdot \frac{1}{\sin B} - \frac{x}{B}} \]
      4. neg-mul-187.9%

        \[\leadsto \color{blue}{\left(-\frac{1}{\sin B}\right)} - \frac{x}{B} \]
      5. distribute-neg-frac87.9%

        \[\leadsto \color{blue}{\frac{-1}{\sin B}} - \frac{x}{B} \]
      6. metadata-eval87.9%

        \[\leadsto \frac{\color{blue}{-1}}{\sin B} - \frac{x}{B} \]
    6. Simplified87.9%

      \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x}{B}} \]

    if -0.309999999999999998 < F < 2.0500000000000001e-42

    1. Initial program 99.4%

      \[\left(-x \cdot \frac{1}{\tan 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. distribute-lft-neg-in99.4%

        \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{1}{\tan B}} + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
      2. +-commutative99.4%

        \[\leadsto \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\right) \cdot \frac{1}{\tan B}} \]
      3. fma-define99.4%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{F}{\sin B}, {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}, \left(-x\right) \cdot \frac{1}{\tan B}\right)} \]
      4. +-commutative99.4%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\color{blue}{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}}^{\left(-\frac{1}{2}\right)}, \left(-x\right) \cdot \frac{1}{\tan B}\right) \]
      5. *-commutative99.4%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\color{blue}{x \cdot 2} + \left(F \cdot F + 2\right)\right)}^{\left(-\frac{1}{2}\right)}, \left(-x\right) \cdot \frac{1}{\tan B}\right) \]
      6. fma-define99.4%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\color{blue}{\left(\mathsf{fma}\left(x, 2, F \cdot F + 2\right)\right)}}^{\left(-\frac{1}{2}\right)}, \left(-x\right) \cdot \frac{1}{\tan B}\right) \]
      7. fma-define99.4%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)\right)}^{\left(-\frac{1}{2}\right)}, \left(-x\right) \cdot \frac{1}{\tan B}\right) \]
      8. metadata-eval99.4%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(-\color{blue}{0.5}\right)}, \left(-x\right) \cdot \frac{1}{\tan B}\right) \]
      9. metadata-eval99.4%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\color{blue}{-0.5}}, \left(-x\right) \cdot \frac{1}{\tan B}\right) \]
      10. associate-*r/99.5%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \color{blue}{\frac{\left(-x\right) \cdot 1}{\tan B}}\right) \]
      11. *-rgt-identity99.5%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \frac{\color{blue}{-x}}{\tan B}\right) \]
    3. Simplified99.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \frac{-x}{\tan B}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in F around 0 62.1%

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
    6. Step-by-step derivation
      1. mul-1-neg62.1%

        \[\leadsto \color{blue}{-\frac{x \cdot \cos B}{\sin B}} \]
      2. associate-/l*62.0%

        \[\leadsto -\color{blue}{x \cdot \frac{\cos B}{\sin B}} \]
    7. Simplified62.0%

      \[\leadsto \color{blue}{-x \cdot \frac{\cos B}{\sin B}} \]
    8. Step-by-step derivation
      1. clear-num62.0%

        \[\leadsto -x \cdot \color{blue}{\frac{1}{\frac{\sin B}{\cos B}}} \]
      2. un-div-inv62.1%

        \[\leadsto -\color{blue}{\frac{x}{\frac{\sin B}{\cos B}}} \]
      3. quot-tan62.1%

        \[\leadsto -\frac{x}{\color{blue}{\tan B}} \]
    9. Applied egg-rr62.1%

      \[\leadsto -\color{blue}{\frac{x}{\tan B}} \]

    if 2.0500000000000001e-42 < F < 1.69999999999999999e273

    1. Initial program 67.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. Add Preprocessing
    3. Taylor expanded in B around 0 53.6%

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    4. Taylor expanded in F around inf 74.1%

      \[\leadsto \color{blue}{\frac{1}{\sin B} - \frac{x}{B}} \]

    if 1.69999999999999999e273 < F

    1. Initial program 50.7%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Step-by-step derivation
      1. distribute-lft-neg-in50.7%

        \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{1}{\tan B}} + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
      2. +-commutative50.7%

        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x\right) \cdot \frac{1}{\tan B}} \]
      3. associate-*l/64.0%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} + \left(-x\right) \cdot \frac{1}{\tan B} \]
      4. associate-/l*64.0%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} + \left(-x\right) \cdot \frac{1}{\tan B} \]
      5. fma-define64.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(F, \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}, \left(-x\right) \cdot \frac{1}{\tan B}\right)} \]
      6. /-rgt-identity64.0%

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{F}{1}}, \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}, \left(-x\right) \cdot \frac{1}{\tan B}\right) \]
      7. remove-double-neg64.0%

        \[\leadsto \mathsf{fma}\left(\frac{F}{1}, \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}, \color{blue}{-\left(-\left(-x\right) \cdot \frac{1}{\tan B}\right)}\right) \]
      8. fma-neg64.0%

        \[\leadsto \color{blue}{\frac{F}{1} \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B} - \left(-\left(-x\right) \cdot \frac{1}{\tan B}\right)} \]
    3. Simplified64.0%

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Add Preprocessing
    5. Taylor expanded in F around inf 99.7%

      \[\leadsto F \cdot \color{blue}{\frac{1}{F \cdot \sin B}} - \frac{x}{\tan B} \]
    6. Taylor expanded in B around 0 90.7%

      \[\leadsto F \cdot \color{blue}{\frac{1}{B \cdot F}} - \frac{x}{\tan B} \]
    7. Step-by-step derivation
      1. *-commutative90.7%

        \[\leadsto F \cdot \frac{1}{\color{blue}{F \cdot B}} - \frac{x}{\tan B} \]
    8. Simplified90.7%

      \[\leadsto F \cdot \color{blue}{\frac{1}{F \cdot B}} - \frac{x}{\tan B} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification72.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -7.2 \cdot 10^{+84}:\\ \;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -0.31:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 2.05 \cdot 10^{-42}:\\ \;\;\;\;-\frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 1.7 \cdot 10^{+273}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;F \cdot \frac{1}{F \cdot B} - \frac{x}{\tan B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 63.8% accurate, 2.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -6.8 \cdot 10^{+84}:\\ \;\;\;\;\frac{-1}{B} - t\_0\\ \mathbf{elif}\;F \leq -7:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 215 \lor \neg \left(F \leq 2.5 \cdot 10^{+274}\right):\\ \;\;\;\;-t\_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (/ x (tan B))))
   (if (<= F -6.8e+84)
     (- (/ -1.0 B) t_0)
     (if (<= F -7.0)
       (- (/ -1.0 (sin B)) (/ x B))
       (if (or (<= F 215.0) (not (<= F 2.5e+274))) (- t_0) (/ 1.0 (sin B)))))))
double code(double F, double B, double x) {
	double t_0 = x / tan(B);
	double tmp;
	if (F <= -6.8e+84) {
		tmp = (-1.0 / B) - t_0;
	} else if (F <= -7.0) {
		tmp = (-1.0 / sin(B)) - (x / B);
	} else if ((F <= 215.0) || !(F <= 2.5e+274)) {
		tmp = -t_0;
	} else {
		tmp = 1.0 / sin(B);
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: t_0
    real(8) :: tmp
    t_0 = x / tan(b)
    if (f <= (-6.8d+84)) then
        tmp = ((-1.0d0) / b) - t_0
    else if (f <= (-7.0d0)) then
        tmp = ((-1.0d0) / sin(b)) - (x / b)
    else if ((f <= 215.0d0) .or. (.not. (f <= 2.5d+274))) then
        tmp = -t_0
    else
        tmp = 1.0d0 / sin(b)
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double t_0 = x / Math.tan(B);
	double tmp;
	if (F <= -6.8e+84) {
		tmp = (-1.0 / B) - t_0;
	} else if (F <= -7.0) {
		tmp = (-1.0 / Math.sin(B)) - (x / B);
	} else if ((F <= 215.0) || !(F <= 2.5e+274)) {
		tmp = -t_0;
	} else {
		tmp = 1.0 / Math.sin(B);
	}
	return tmp;
}
def code(F, B, x):
	t_0 = x / math.tan(B)
	tmp = 0
	if F <= -6.8e+84:
		tmp = (-1.0 / B) - t_0
	elif F <= -7.0:
		tmp = (-1.0 / math.sin(B)) - (x / B)
	elif (F <= 215.0) or not (F <= 2.5e+274):
		tmp = -t_0
	else:
		tmp = 1.0 / math.sin(B)
	return tmp
function code(F, B, x)
	t_0 = Float64(x / tan(B))
	tmp = 0.0
	if (F <= -6.8e+84)
		tmp = Float64(Float64(-1.0 / B) - t_0);
	elseif (F <= -7.0)
		tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B));
	elseif ((F <= 215.0) || !(F <= 2.5e+274))
		tmp = Float64(-t_0);
	else
		tmp = Float64(1.0 / sin(B));
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = x / tan(B);
	tmp = 0.0;
	if (F <= -6.8e+84)
		tmp = (-1.0 / B) - t_0;
	elseif (F <= -7.0)
		tmp = (-1.0 / sin(B)) - (x / B);
	elseif ((F <= 215.0) || ~((F <= 2.5e+274)))
		tmp = -t_0;
	else
		tmp = 1.0 / sin(B);
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -6.8e+84], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -7.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, 215.0], N[Not[LessEqual[F, 2.5e+274]], $MachinePrecision]], (-t$95$0), N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -6.8 \cdot 10^{+84}:\\
\;\;\;\;\frac{-1}{B} - t\_0\\

\mathbf{elif}\;F \leq -7:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\

\mathbf{elif}\;F \leq 215 \lor \neg \left(F \leq 2.5 \cdot 10^{+274}\right):\\
\;\;\;\;-t\_0\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if F < -6.7999999999999996e84

    1. Initial program 50.9%

      \[\left(-x \cdot \frac{1}{\tan 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. distribute-lft-neg-in50.9%

        \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{1}{\tan B}} + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
      2. +-commutative50.9%

        \[\leadsto \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\right) \cdot \frac{1}{\tan B}} \]
      3. associate-*l/64.5%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} + \left(-x\right) \cdot \frac{1}{\tan B} \]
      4. associate-/l*64.5%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} + \left(-x\right) \cdot \frac{1}{\tan B} \]
      5. fma-define64.5%

        \[\leadsto \color{blue}{\mathsf{fma}\left(F, \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}, \left(-x\right) \cdot \frac{1}{\tan B}\right)} \]
      6. /-rgt-identity64.5%

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{F}{1}}, \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}, \left(-x\right) \cdot \frac{1}{\tan B}\right) \]
      7. remove-double-neg64.5%

        \[\leadsto \mathsf{fma}\left(\frac{F}{1}, \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}, \color{blue}{-\left(-\left(-x\right) \cdot \frac{1}{\tan B}\right)}\right) \]
      8. fma-neg64.5%

        \[\leadsto \color{blue}{\frac{F}{1} \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B} - \left(-\left(-x\right) \cdot \frac{1}{\tan B}\right)} \]
    3. Simplified64.5%

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num64.6%

        \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
      2. inv-pow64.6%

        \[\leadsto F \cdot \color{blue}{{\left(\frac{\sin B}{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}\right)}^{-1}} - \frac{x}{\tan B} \]
      3. fma-define64.6%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F + 2}\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      4. fma-undefine64.6%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\color{blue}{\left(x \cdot 2 + \left(F \cdot F + 2\right)\right)}}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      5. *-commutative64.6%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\color{blue}{2 \cdot x} + \left(F \cdot F + 2\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      6. fma-define64.6%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\color{blue}{\left(\mathsf{fma}\left(2, x, F \cdot F + 2\right)\right)}}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      7. fma-define64.6%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
    6. Applied egg-rr64.6%

      \[\leadsto F \cdot \color{blue}{{\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}\right)}^{-1}} - \frac{x}{\tan B} \]
    7. Step-by-step derivation
      1. unpow-164.6%

        \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
    8. Simplified64.6%

      \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
    9. Taylor expanded in F around -inf 99.7%

      \[\leadsto \color{blue}{\frac{-1}{\sin B}} - \frac{x}{\tan B} \]
    10. Taylor expanded in B around 0 80.9%

      \[\leadsto \color{blue}{\frac{-1}{B}} - \frac{x}{\tan B} \]

    if -6.7999999999999996e84 < F < -7

    1. Initial program 94.7%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in B around 0 84.9%

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    4. Taylor expanded in F around -inf 87.9%

      \[\leadsto \color{blue}{-1 \cdot \left(\frac{1}{\sin B} + \frac{x}{B}\right)} \]
    5. Step-by-step derivation
      1. distribute-lft-in87.9%

        \[\leadsto \color{blue}{-1 \cdot \frac{1}{\sin B} + -1 \cdot \frac{x}{B}} \]
      2. mul-1-neg87.9%

        \[\leadsto -1 \cdot \frac{1}{\sin B} + \color{blue}{\left(-\frac{x}{B}\right)} \]
      3. unsub-neg87.9%

        \[\leadsto \color{blue}{-1 \cdot \frac{1}{\sin B} - \frac{x}{B}} \]
      4. neg-mul-187.9%

        \[\leadsto \color{blue}{\left(-\frac{1}{\sin B}\right)} - \frac{x}{B} \]
      5. distribute-neg-frac87.9%

        \[\leadsto \color{blue}{\frac{-1}{\sin B}} - \frac{x}{B} \]
      6. metadata-eval87.9%

        \[\leadsto \frac{\color{blue}{-1}}{\sin B} - \frac{x}{B} \]
    6. Simplified87.9%

      \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x}{B}} \]

    if -7 < F < 215 or 2.4999999999999999e274 < F

    1. Initial program 96.3%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Step-by-step derivation
      1. distribute-lft-neg-in96.3%

        \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{1}{\tan B}} + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
      2. +-commutative96.3%

        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x\right) \cdot \frac{1}{\tan B}} \]
      3. fma-define96.3%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{F}{\sin B}, {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}, \left(-x\right) \cdot \frac{1}{\tan B}\right)} \]
      4. +-commutative96.3%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\color{blue}{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}}^{\left(-\frac{1}{2}\right)}, \left(-x\right) \cdot \frac{1}{\tan B}\right) \]
      5. *-commutative96.3%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\color{blue}{x \cdot 2} + \left(F \cdot F + 2\right)\right)}^{\left(-\frac{1}{2}\right)}, \left(-x\right) \cdot \frac{1}{\tan B}\right) \]
      6. fma-define96.3%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\color{blue}{\left(\mathsf{fma}\left(x, 2, F \cdot F + 2\right)\right)}}^{\left(-\frac{1}{2}\right)}, \left(-x\right) \cdot \frac{1}{\tan B}\right) \]
      7. fma-define96.3%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)\right)}^{\left(-\frac{1}{2}\right)}, \left(-x\right) \cdot \frac{1}{\tan B}\right) \]
      8. metadata-eval96.3%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(-\color{blue}{0.5}\right)}, \left(-x\right) \cdot \frac{1}{\tan B}\right) \]
      9. metadata-eval96.3%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\color{blue}{-0.5}}, \left(-x\right) \cdot \frac{1}{\tan B}\right) \]
      10. associate-*r/96.4%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \color{blue}{\frac{\left(-x\right) \cdot 1}{\tan B}}\right) \]
      11. *-rgt-identity96.4%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \frac{\color{blue}{-x}}{\tan B}\right) \]
    3. Simplified96.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \frac{-x}{\tan B}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in F around 0 60.3%

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
    6. Step-by-step derivation
      1. mul-1-neg60.3%

        \[\leadsto \color{blue}{-\frac{x \cdot \cos B}{\sin B}} \]
      2. associate-/l*60.3%

        \[\leadsto -\color{blue}{x \cdot \frac{\cos B}{\sin B}} \]
    7. Simplified60.3%

      \[\leadsto \color{blue}{-x \cdot \frac{\cos B}{\sin B}} \]
    8. Step-by-step derivation
      1. clear-num60.2%

        \[\leadsto -x \cdot \color{blue}{\frac{1}{\frac{\sin B}{\cos B}}} \]
      2. un-div-inv60.4%

        \[\leadsto -\color{blue}{\frac{x}{\frac{\sin B}{\cos B}}} \]
      3. quot-tan60.4%

        \[\leadsto -\frac{x}{\color{blue}{\tan B}} \]
    9. Applied egg-rr60.4%

      \[\leadsto -\color{blue}{\frac{x}{\tan B}} \]

    if 215 < F < 2.4999999999999999e274

    1. Initial program 59.5%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in B around 0 42.5%

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    4. Taylor expanded in F around inf 68.4%

      \[\leadsto \left(-\frac{x}{B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\frac{1}{F}} \]
    5. Step-by-step derivation
      1. *-un-lft-identity68.4%

        \[\leadsto \color{blue}{1 \cdot \left(\left(-\frac{x}{B}\right) + \frac{F}{\sin B} \cdot \frac{1}{F}\right)} \]
      2. +-commutative68.4%

        \[\leadsto 1 \cdot \color{blue}{\left(\frac{F}{\sin B} \cdot \frac{1}{F} + \left(-\frac{x}{B}\right)\right)} \]
      3. add-sqr-sqrt24.4%

        \[\leadsto 1 \cdot \left(\color{blue}{\sqrt{\frac{F}{\sin B} \cdot \frac{1}{F}} \cdot \sqrt{\frac{F}{\sin B} \cdot \frac{1}{F}}} + \left(-\frac{x}{B}\right)\right) \]
      4. add-sqr-sqrt15.4%

        \[\leadsto 1 \cdot \left(\sqrt{\frac{F}{\sin B} \cdot \frac{1}{F}} \cdot \sqrt{\frac{F}{\sin B} \cdot \frac{1}{F}} + \color{blue}{\sqrt{-\frac{x}{B}} \cdot \sqrt{-\frac{x}{B}}}\right) \]
      5. add-sqr-sqrt41.9%

        \[\leadsto 1 \cdot \left(\color{blue}{\frac{F}{\sin B} \cdot \frac{1}{F}} + \sqrt{-\frac{x}{B}} \cdot \sqrt{-\frac{x}{B}}\right) \]
      6. associate-*l/48.0%

        \[\leadsto 1 \cdot \left(\color{blue}{\frac{F \cdot \frac{1}{F}}{\sin B}} + \sqrt{-\frac{x}{B}} \cdot \sqrt{-\frac{x}{B}}\right) \]
      7. rgt-mult-inverse48.1%

        \[\leadsto 1 \cdot \left(\frac{\color{blue}{1}}{\sin B} + \sqrt{-\frac{x}{B}} \cdot \sqrt{-\frac{x}{B}}\right) \]
      8. sqrt-unprod69.6%

        \[\leadsto 1 \cdot \left(\frac{1}{\sin B} + \color{blue}{\sqrt{\left(-\frac{x}{B}\right) \cdot \left(-\frac{x}{B}\right)}}\right) \]
      9. sqr-neg69.6%

        \[\leadsto 1 \cdot \left(\frac{1}{\sin B} + \sqrt{\color{blue}{\frac{x}{B} \cdot \frac{x}{B}}}\right) \]
      10. sqrt-unprod45.2%

        \[\leadsto 1 \cdot \left(\frac{1}{\sin B} + \color{blue}{\sqrt{\frac{x}{B}} \cdot \sqrt{\frac{x}{B}}}\right) \]
      11. add-sqr-sqrt70.6%

        \[\leadsto 1 \cdot \left(\frac{1}{\sin B} + \color{blue}{\frac{x}{B}}\right) \]
    6. Applied egg-rr70.6%

      \[\leadsto \color{blue}{1 \cdot \left(\frac{1}{\sin B} + \frac{x}{B}\right)} \]
    7. Step-by-step derivation
      1. *-lft-identity70.6%

        \[\leadsto \color{blue}{\frac{1}{\sin B} + \frac{x}{B}} \]
    8. Simplified70.6%

      \[\leadsto \color{blue}{\frac{1}{\sin B} + \frac{x}{B}} \]
    9. Taylor expanded in B around inf 71.0%

      \[\leadsto \color{blue}{\frac{1}{\sin B}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification69.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -6.8 \cdot 10^{+84}:\\ \;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -7:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 215 \lor \neg \left(F \leq 2.5 \cdot 10^{+274}\right):\\ \;\;\;\;-\frac{x}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 69.6% accurate, 2.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -9.6 \cdot 10^{+84}:\\ \;\;\;\;\frac{-1}{B} - t\_0\\ \mathbf{elif}\;F \leq -680:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 2.05 \cdot 10^{-42}:\\ \;\;\;\;-t\_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (/ x (tan B))))
   (if (<= F -9.6e+84)
     (- (/ -1.0 B) t_0)
     (if (<= F -680.0)
       (- (/ -1.0 (sin B)) (/ x B))
       (if (<= F 2.05e-42) (- t_0) (- (/ 1.0 (sin B)) (/ x B)))))))
double code(double F, double B, double x) {
	double t_0 = x / tan(B);
	double tmp;
	if (F <= -9.6e+84) {
		tmp = (-1.0 / B) - t_0;
	} else if (F <= -680.0) {
		tmp = (-1.0 / sin(B)) - (x / B);
	} else if (F <= 2.05e-42) {
		tmp = -t_0;
	} else {
		tmp = (1.0 / sin(B)) - (x / B);
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: t_0
    real(8) :: tmp
    t_0 = x / tan(b)
    if (f <= (-9.6d+84)) then
        tmp = ((-1.0d0) / b) - t_0
    else if (f <= (-680.0d0)) then
        tmp = ((-1.0d0) / sin(b)) - (x / b)
    else if (f <= 2.05d-42) then
        tmp = -t_0
    else
        tmp = (1.0d0 / sin(b)) - (x / b)
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double t_0 = x / Math.tan(B);
	double tmp;
	if (F <= -9.6e+84) {
		tmp = (-1.0 / B) - t_0;
	} else if (F <= -680.0) {
		tmp = (-1.0 / Math.sin(B)) - (x / B);
	} else if (F <= 2.05e-42) {
		tmp = -t_0;
	} else {
		tmp = (1.0 / Math.sin(B)) - (x / B);
	}
	return tmp;
}
def code(F, B, x):
	t_0 = x / math.tan(B)
	tmp = 0
	if F <= -9.6e+84:
		tmp = (-1.0 / B) - t_0
	elif F <= -680.0:
		tmp = (-1.0 / math.sin(B)) - (x / B)
	elif F <= 2.05e-42:
		tmp = -t_0
	else:
		tmp = (1.0 / math.sin(B)) - (x / B)
	return tmp
function code(F, B, x)
	t_0 = Float64(x / tan(B))
	tmp = 0.0
	if (F <= -9.6e+84)
		tmp = Float64(Float64(-1.0 / B) - t_0);
	elseif (F <= -680.0)
		tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B));
	elseif (F <= 2.05e-42)
		tmp = Float64(-t_0);
	else
		tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B));
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = x / tan(B);
	tmp = 0.0;
	if (F <= -9.6e+84)
		tmp = (-1.0 / B) - t_0;
	elseif (F <= -680.0)
		tmp = (-1.0 / sin(B)) - (x / B);
	elseif (F <= 2.05e-42)
		tmp = -t_0;
	else
		tmp = (1.0 / sin(B)) - (x / B);
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -9.6e+84], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -680.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.05e-42], (-t$95$0), N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -9.6 \cdot 10^{+84}:\\
\;\;\;\;\frac{-1}{B} - t\_0\\

\mathbf{elif}\;F \leq -680:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\

\mathbf{elif}\;F \leq 2.05 \cdot 10^{-42}:\\
\;\;\;\;-t\_0\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if F < -9.5999999999999999e84

    1. Initial program 50.9%

      \[\left(-x \cdot \frac{1}{\tan 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. distribute-lft-neg-in50.9%

        \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{1}{\tan B}} + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
      2. +-commutative50.9%

        \[\leadsto \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\right) \cdot \frac{1}{\tan B}} \]
      3. associate-*l/64.5%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} + \left(-x\right) \cdot \frac{1}{\tan B} \]
      4. associate-/l*64.5%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} + \left(-x\right) \cdot \frac{1}{\tan B} \]
      5. fma-define64.5%

        \[\leadsto \color{blue}{\mathsf{fma}\left(F, \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}, \left(-x\right) \cdot \frac{1}{\tan B}\right)} \]
      6. /-rgt-identity64.5%

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{F}{1}}, \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}, \left(-x\right) \cdot \frac{1}{\tan B}\right) \]
      7. remove-double-neg64.5%

        \[\leadsto \mathsf{fma}\left(\frac{F}{1}, \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}, \color{blue}{-\left(-\left(-x\right) \cdot \frac{1}{\tan B}\right)}\right) \]
      8. fma-neg64.5%

        \[\leadsto \color{blue}{\frac{F}{1} \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B} - \left(-\left(-x\right) \cdot \frac{1}{\tan B}\right)} \]
    3. Simplified64.5%

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num64.6%

        \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
      2. inv-pow64.6%

        \[\leadsto F \cdot \color{blue}{{\left(\frac{\sin B}{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}\right)}^{-1}} - \frac{x}{\tan B} \]
      3. fma-define64.6%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F + 2}\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      4. fma-undefine64.6%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\color{blue}{\left(x \cdot 2 + \left(F \cdot F + 2\right)\right)}}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      5. *-commutative64.6%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\color{blue}{2 \cdot x} + \left(F \cdot F + 2\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      6. fma-define64.6%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\color{blue}{\left(\mathsf{fma}\left(2, x, F \cdot F + 2\right)\right)}}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      7. fma-define64.6%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
    6. Applied egg-rr64.6%

      \[\leadsto F \cdot \color{blue}{{\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}\right)}^{-1}} - \frac{x}{\tan B} \]
    7. Step-by-step derivation
      1. unpow-164.6%

        \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
    8. Simplified64.6%

      \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
    9. Taylor expanded in F around -inf 99.7%

      \[\leadsto \color{blue}{\frac{-1}{\sin B}} - \frac{x}{\tan B} \]
    10. Taylor expanded in B around 0 80.9%

      \[\leadsto \color{blue}{\frac{-1}{B}} - \frac{x}{\tan B} \]

    if -9.5999999999999999e84 < F < -680

    1. Initial program 94.7%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in B around 0 84.9%

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    4. Taylor expanded in F around -inf 87.9%

      \[\leadsto \color{blue}{-1 \cdot \left(\frac{1}{\sin B} + \frac{x}{B}\right)} \]
    5. Step-by-step derivation
      1. distribute-lft-in87.9%

        \[\leadsto \color{blue}{-1 \cdot \frac{1}{\sin B} + -1 \cdot \frac{x}{B}} \]
      2. mul-1-neg87.9%

        \[\leadsto -1 \cdot \frac{1}{\sin B} + \color{blue}{\left(-\frac{x}{B}\right)} \]
      3. unsub-neg87.9%

        \[\leadsto \color{blue}{-1 \cdot \frac{1}{\sin B} - \frac{x}{B}} \]
      4. neg-mul-187.9%

        \[\leadsto \color{blue}{\left(-\frac{1}{\sin B}\right)} - \frac{x}{B} \]
      5. distribute-neg-frac87.9%

        \[\leadsto \color{blue}{\frac{-1}{\sin B}} - \frac{x}{B} \]
      6. metadata-eval87.9%

        \[\leadsto \frac{\color{blue}{-1}}{\sin B} - \frac{x}{B} \]
    6. Simplified87.9%

      \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x}{B}} \]

    if -680 < F < 2.0500000000000001e-42

    1. Initial program 99.4%

      \[\left(-x \cdot \frac{1}{\tan 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. distribute-lft-neg-in99.4%

        \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{1}{\tan B}} + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
      2. +-commutative99.4%

        \[\leadsto \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\right) \cdot \frac{1}{\tan B}} \]
      3. fma-define99.4%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{F}{\sin B}, {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}, \left(-x\right) \cdot \frac{1}{\tan B}\right)} \]
      4. +-commutative99.4%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\color{blue}{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}}^{\left(-\frac{1}{2}\right)}, \left(-x\right) \cdot \frac{1}{\tan B}\right) \]
      5. *-commutative99.4%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\color{blue}{x \cdot 2} + \left(F \cdot F + 2\right)\right)}^{\left(-\frac{1}{2}\right)}, \left(-x\right) \cdot \frac{1}{\tan B}\right) \]
      6. fma-define99.4%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\color{blue}{\left(\mathsf{fma}\left(x, 2, F \cdot F + 2\right)\right)}}^{\left(-\frac{1}{2}\right)}, \left(-x\right) \cdot \frac{1}{\tan B}\right) \]
      7. fma-define99.4%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)\right)}^{\left(-\frac{1}{2}\right)}, \left(-x\right) \cdot \frac{1}{\tan B}\right) \]
      8. metadata-eval99.4%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(-\color{blue}{0.5}\right)}, \left(-x\right) \cdot \frac{1}{\tan B}\right) \]
      9. metadata-eval99.4%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\color{blue}{-0.5}}, \left(-x\right) \cdot \frac{1}{\tan B}\right) \]
      10. associate-*r/99.5%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \color{blue}{\frac{\left(-x\right) \cdot 1}{\tan B}}\right) \]
      11. *-rgt-identity99.5%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \frac{\color{blue}{-x}}{\tan B}\right) \]
    3. Simplified99.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \frac{-x}{\tan B}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in F around 0 62.1%

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
    6. Step-by-step derivation
      1. mul-1-neg62.1%

        \[\leadsto \color{blue}{-\frac{x \cdot \cos B}{\sin B}} \]
      2. associate-/l*62.0%

        \[\leadsto -\color{blue}{x \cdot \frac{\cos B}{\sin B}} \]
    7. Simplified62.0%

      \[\leadsto \color{blue}{-x \cdot \frac{\cos B}{\sin B}} \]
    8. Step-by-step derivation
      1. clear-num62.0%

        \[\leadsto -x \cdot \color{blue}{\frac{1}{\frac{\sin B}{\cos B}}} \]
      2. un-div-inv62.1%

        \[\leadsto -\color{blue}{\frac{x}{\frac{\sin B}{\cos B}}} \]
      3. quot-tan62.1%

        \[\leadsto -\frac{x}{\color{blue}{\tan B}} \]
    9. Applied egg-rr62.1%

      \[\leadsto -\color{blue}{\frac{x}{\tan B}} \]

    if 2.0500000000000001e-42 < F

    1. Initial program 65.2%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in B around 0 45.8%

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    4. Taylor expanded in F around inf 70.3%

      \[\leadsto \color{blue}{\frac{1}{\sin B} - \frac{x}{B}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification70.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -9.6 \cdot 10^{+84}:\\ \;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -680:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 2.05 \cdot 10^{-42}:\\ \;\;\;\;-\frac{x}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 63.6% accurate, 2.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -3 \cdot 10^{-51}:\\ \;\;\;\;\frac{-1}{B} - t\_0\\ \mathbf{elif}\;F \leq 8200 \lor \neg \left(F \leq 6.5 \cdot 10^{+277}\right):\\ \;\;\;\;-t\_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (/ x (tan B))))
   (if (<= F -3e-51)
     (- (/ -1.0 B) t_0)
     (if (or (<= F 8200.0) (not (<= F 6.5e+277))) (- t_0) (/ 1.0 (sin B))))))
double code(double F, double B, double x) {
	double t_0 = x / tan(B);
	double tmp;
	if (F <= -3e-51) {
		tmp = (-1.0 / B) - t_0;
	} else if ((F <= 8200.0) || !(F <= 6.5e+277)) {
		tmp = -t_0;
	} else {
		tmp = 1.0 / sin(B);
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: t_0
    real(8) :: tmp
    t_0 = x / tan(b)
    if (f <= (-3d-51)) then
        tmp = ((-1.0d0) / b) - t_0
    else if ((f <= 8200.0d0) .or. (.not. (f <= 6.5d+277))) then
        tmp = -t_0
    else
        tmp = 1.0d0 / sin(b)
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double t_0 = x / Math.tan(B);
	double tmp;
	if (F <= -3e-51) {
		tmp = (-1.0 / B) - t_0;
	} else if ((F <= 8200.0) || !(F <= 6.5e+277)) {
		tmp = -t_0;
	} else {
		tmp = 1.0 / Math.sin(B);
	}
	return tmp;
}
def code(F, B, x):
	t_0 = x / math.tan(B)
	tmp = 0
	if F <= -3e-51:
		tmp = (-1.0 / B) - t_0
	elif (F <= 8200.0) or not (F <= 6.5e+277):
		tmp = -t_0
	else:
		tmp = 1.0 / math.sin(B)
	return tmp
function code(F, B, x)
	t_0 = Float64(x / tan(B))
	tmp = 0.0
	if (F <= -3e-51)
		tmp = Float64(Float64(-1.0 / B) - t_0);
	elseif ((F <= 8200.0) || !(F <= 6.5e+277))
		tmp = Float64(-t_0);
	else
		tmp = Float64(1.0 / sin(B));
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = x / tan(B);
	tmp = 0.0;
	if (F <= -3e-51)
		tmp = (-1.0 / B) - t_0;
	elseif ((F <= 8200.0) || ~((F <= 6.5e+277)))
		tmp = -t_0;
	else
		tmp = 1.0 / sin(B);
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3e-51], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[Or[LessEqual[F, 8200.0], N[Not[LessEqual[F, 6.5e+277]], $MachinePrecision]], (-t$95$0), N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3 \cdot 10^{-51}:\\
\;\;\;\;\frac{-1}{B} - t\_0\\

\mathbf{elif}\;F \leq 8200 \lor \neg \left(F \leq 6.5 \cdot 10^{+277}\right):\\
\;\;\;\;-t\_0\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if F < -3.00000000000000002e-51

    1. Initial program 64.3%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Step-by-step derivation
      1. distribute-lft-neg-in64.3%

        \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{1}{\tan B}} + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
      2. +-commutative64.3%

        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x\right) \cdot \frac{1}{\tan B}} \]
      3. associate-*l/74.8%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} + \left(-x\right) \cdot \frac{1}{\tan B} \]
      4. associate-/l*74.8%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} + \left(-x\right) \cdot \frac{1}{\tan B} \]
      5. fma-define74.8%

        \[\leadsto \color{blue}{\mathsf{fma}\left(F, \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}, \left(-x\right) \cdot \frac{1}{\tan B}\right)} \]
      6. /-rgt-identity74.8%

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{F}{1}}, \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}, \left(-x\right) \cdot \frac{1}{\tan B}\right) \]
      7. remove-double-neg74.8%

        \[\leadsto \mathsf{fma}\left(\frac{F}{1}, \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}, \color{blue}{-\left(-\left(-x\right) \cdot \frac{1}{\tan B}\right)}\right) \]
      8. fma-neg74.8%

        \[\leadsto \color{blue}{\frac{F}{1} \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B} - \left(-\left(-x\right) \cdot \frac{1}{\tan B}\right)} \]
    3. Simplified74.9%

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num74.8%

        \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
      2. inv-pow74.8%

        \[\leadsto F \cdot \color{blue}{{\left(\frac{\sin B}{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}\right)}^{-1}} - \frac{x}{\tan B} \]
      3. fma-define74.8%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F + 2}\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      4. fma-undefine74.8%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\color{blue}{\left(x \cdot 2 + \left(F \cdot F + 2\right)\right)}}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      5. *-commutative74.8%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\color{blue}{2 \cdot x} + \left(F \cdot F + 2\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      6. fma-define74.8%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\color{blue}{\left(\mathsf{fma}\left(2, x, F \cdot F + 2\right)\right)}}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      7. fma-define74.8%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
    6. Applied egg-rr74.8%

      \[\leadsto F \cdot \color{blue}{{\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}\right)}^{-1}} - \frac{x}{\tan B} \]
    7. Step-by-step derivation
      1. unpow-174.8%

        \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
    8. Simplified74.8%

      \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
    9. Taylor expanded in F around -inf 92.7%

      \[\leadsto \color{blue}{\frac{-1}{\sin B}} - \frac{x}{\tan B} \]
    10. Taylor expanded in B around 0 70.1%

      \[\leadsto \color{blue}{\frac{-1}{B}} - \frac{x}{\tan B} \]

    if -3.00000000000000002e-51 < F < 8200 or 6.5000000000000003e277 < F

    1. Initial program 96.0%

      \[\left(-x \cdot \frac{1}{\tan 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. distribute-lft-neg-in96.0%

        \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{1}{\tan B}} + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
      2. +-commutative96.0%

        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x\right) \cdot \frac{1}{\tan B}} \]
      3. fma-define96.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{F}{\sin B}, {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}, \left(-x\right) \cdot \frac{1}{\tan B}\right)} \]
      4. +-commutative96.0%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\color{blue}{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}}^{\left(-\frac{1}{2}\right)}, \left(-x\right) \cdot \frac{1}{\tan B}\right) \]
      5. *-commutative96.0%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\color{blue}{x \cdot 2} + \left(F \cdot F + 2\right)\right)}^{\left(-\frac{1}{2}\right)}, \left(-x\right) \cdot \frac{1}{\tan B}\right) \]
      6. fma-define96.0%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\color{blue}{\left(\mathsf{fma}\left(x, 2, F \cdot F + 2\right)\right)}}^{\left(-\frac{1}{2}\right)}, \left(-x\right) \cdot \frac{1}{\tan B}\right) \]
      7. fma-define96.0%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)\right)}^{\left(-\frac{1}{2}\right)}, \left(-x\right) \cdot \frac{1}{\tan B}\right) \]
      8. metadata-eval96.0%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(-\color{blue}{0.5}\right)}, \left(-x\right) \cdot \frac{1}{\tan B}\right) \]
      9. metadata-eval96.0%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\color{blue}{-0.5}}, \left(-x\right) \cdot \frac{1}{\tan B}\right) \]
      10. associate-*r/96.1%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \color{blue}{\frac{\left(-x\right) \cdot 1}{\tan B}}\right) \]
      11. *-rgt-identity96.1%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \frac{\color{blue}{-x}}{\tan B}\right) \]
    3. Simplified96.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \frac{-x}{\tan B}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in F around 0 62.8%

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
    6. Step-by-step derivation
      1. mul-1-neg62.8%

        \[\leadsto \color{blue}{-\frac{x \cdot \cos B}{\sin B}} \]
      2. associate-/l*62.7%

        \[\leadsto -\color{blue}{x \cdot \frac{\cos B}{\sin B}} \]
    7. Simplified62.7%

      \[\leadsto \color{blue}{-x \cdot \frac{\cos B}{\sin B}} \]
    8. Step-by-step derivation
      1. clear-num62.7%

        \[\leadsto -x \cdot \color{blue}{\frac{1}{\frac{\sin B}{\cos B}}} \]
      2. un-div-inv62.8%

        \[\leadsto -\color{blue}{\frac{x}{\frac{\sin B}{\cos B}}} \]
      3. quot-tan62.8%

        \[\leadsto -\frac{x}{\color{blue}{\tan B}} \]
    9. Applied egg-rr62.8%

      \[\leadsto -\color{blue}{\frac{x}{\tan B}} \]

    if 8200 < F < 6.5000000000000003e277

    1. Initial program 59.5%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in B around 0 42.5%

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    4. Taylor expanded in F around inf 68.4%

      \[\leadsto \left(-\frac{x}{B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\frac{1}{F}} \]
    5. Step-by-step derivation
      1. *-un-lft-identity68.4%

        \[\leadsto \color{blue}{1 \cdot \left(\left(-\frac{x}{B}\right) + \frac{F}{\sin B} \cdot \frac{1}{F}\right)} \]
      2. +-commutative68.4%

        \[\leadsto 1 \cdot \color{blue}{\left(\frac{F}{\sin B} \cdot \frac{1}{F} + \left(-\frac{x}{B}\right)\right)} \]
      3. add-sqr-sqrt24.4%

        \[\leadsto 1 \cdot \left(\color{blue}{\sqrt{\frac{F}{\sin B} \cdot \frac{1}{F}} \cdot \sqrt{\frac{F}{\sin B} \cdot \frac{1}{F}}} + \left(-\frac{x}{B}\right)\right) \]
      4. add-sqr-sqrt15.4%

        \[\leadsto 1 \cdot \left(\sqrt{\frac{F}{\sin B} \cdot \frac{1}{F}} \cdot \sqrt{\frac{F}{\sin B} \cdot \frac{1}{F}} + \color{blue}{\sqrt{-\frac{x}{B}} \cdot \sqrt{-\frac{x}{B}}}\right) \]
      5. add-sqr-sqrt41.9%

        \[\leadsto 1 \cdot \left(\color{blue}{\frac{F}{\sin B} \cdot \frac{1}{F}} + \sqrt{-\frac{x}{B}} \cdot \sqrt{-\frac{x}{B}}\right) \]
      6. associate-*l/48.0%

        \[\leadsto 1 \cdot \left(\color{blue}{\frac{F \cdot \frac{1}{F}}{\sin B}} + \sqrt{-\frac{x}{B}} \cdot \sqrt{-\frac{x}{B}}\right) \]
      7. rgt-mult-inverse48.1%

        \[\leadsto 1 \cdot \left(\frac{\color{blue}{1}}{\sin B} + \sqrt{-\frac{x}{B}} \cdot \sqrt{-\frac{x}{B}}\right) \]
      8. sqrt-unprod69.6%

        \[\leadsto 1 \cdot \left(\frac{1}{\sin B} + \color{blue}{\sqrt{\left(-\frac{x}{B}\right) \cdot \left(-\frac{x}{B}\right)}}\right) \]
      9. sqr-neg69.6%

        \[\leadsto 1 \cdot \left(\frac{1}{\sin B} + \sqrt{\color{blue}{\frac{x}{B} \cdot \frac{x}{B}}}\right) \]
      10. sqrt-unprod45.2%

        \[\leadsto 1 \cdot \left(\frac{1}{\sin B} + \color{blue}{\sqrt{\frac{x}{B}} \cdot \sqrt{\frac{x}{B}}}\right) \]
      11. add-sqr-sqrt70.6%

        \[\leadsto 1 \cdot \left(\frac{1}{\sin B} + \color{blue}{\frac{x}{B}}\right) \]
    6. Applied egg-rr70.6%

      \[\leadsto \color{blue}{1 \cdot \left(\frac{1}{\sin B} + \frac{x}{B}\right)} \]
    7. Step-by-step derivation
      1. *-lft-identity70.6%

        \[\leadsto \color{blue}{\frac{1}{\sin B} + \frac{x}{B}} \]
    8. Simplified70.6%

      \[\leadsto \color{blue}{\frac{1}{\sin B} + \frac{x}{B}} \]
    9. Taylor expanded in B around inf 71.0%

      \[\leadsto \color{blue}{\frac{1}{\sin B}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification67.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -3 \cdot 10^{-51}:\\ \;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 8200 \lor \neg \left(F \leq 6.5 \cdot 10^{+277}\right):\\ \;\;\;\;-\frac{x}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 44.7% accurate, 2.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := F + 0.5 \cdot \frac{2 + x \cdot 2}{F}\\ \mathbf{if}\;F \leq -9.8 \cdot 10^{+92}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq -3.2:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 66000:\\ \;\;\;\;\left(0.16666666666666666 \cdot \frac{F \cdot B}{t\_0} + \frac{F}{B \cdot t\_0}\right) - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (+ F (* 0.5 (/ (+ 2.0 (* x 2.0)) F)))))
   (if (<= F -9.8e+92)
     (/ (- -1.0 x) B)
     (if (<= F -3.2)
       (/ -1.0 (sin B))
       (if (<= F 66000.0)
         (-
          (+ (* 0.16666666666666666 (/ (* F B) t_0)) (/ F (* B t_0)))
          (/ x B))
         (/ 1.0 (sin B)))))))
double code(double F, double B, double x) {
	double t_0 = F + (0.5 * ((2.0 + (x * 2.0)) / F));
	double tmp;
	if (F <= -9.8e+92) {
		tmp = (-1.0 - x) / B;
	} else if (F <= -3.2) {
		tmp = -1.0 / sin(B);
	} else if (F <= 66000.0) {
		tmp = ((0.16666666666666666 * ((F * B) / t_0)) + (F / (B * t_0))) - (x / B);
	} else {
		tmp = 1.0 / sin(B);
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: t_0
    real(8) :: tmp
    t_0 = f + (0.5d0 * ((2.0d0 + (x * 2.0d0)) / f))
    if (f <= (-9.8d+92)) then
        tmp = ((-1.0d0) - x) / b
    else if (f <= (-3.2d0)) then
        tmp = (-1.0d0) / sin(b)
    else if (f <= 66000.0d0) then
        tmp = ((0.16666666666666666d0 * ((f * b) / t_0)) + (f / (b * t_0))) - (x / b)
    else
        tmp = 1.0d0 / sin(b)
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double t_0 = F + (0.5 * ((2.0 + (x * 2.0)) / F));
	double tmp;
	if (F <= -9.8e+92) {
		tmp = (-1.0 - x) / B;
	} else if (F <= -3.2) {
		tmp = -1.0 / Math.sin(B);
	} else if (F <= 66000.0) {
		tmp = ((0.16666666666666666 * ((F * B) / t_0)) + (F / (B * t_0))) - (x / B);
	} else {
		tmp = 1.0 / Math.sin(B);
	}
	return tmp;
}
def code(F, B, x):
	t_0 = F + (0.5 * ((2.0 + (x * 2.0)) / F))
	tmp = 0
	if F <= -9.8e+92:
		tmp = (-1.0 - x) / B
	elif F <= -3.2:
		tmp = -1.0 / math.sin(B)
	elif F <= 66000.0:
		tmp = ((0.16666666666666666 * ((F * B) / t_0)) + (F / (B * t_0))) - (x / B)
	else:
		tmp = 1.0 / math.sin(B)
	return tmp
function code(F, B, x)
	t_0 = Float64(F + Float64(0.5 * Float64(Float64(2.0 + Float64(x * 2.0)) / F)))
	tmp = 0.0
	if (F <= -9.8e+92)
		tmp = Float64(Float64(-1.0 - x) / B);
	elseif (F <= -3.2)
		tmp = Float64(-1.0 / sin(B));
	elseif (F <= 66000.0)
		tmp = Float64(Float64(Float64(0.16666666666666666 * Float64(Float64(F * B) / t_0)) + Float64(F / Float64(B * t_0))) - Float64(x / B));
	else
		tmp = Float64(1.0 / sin(B));
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = F + (0.5 * ((2.0 + (x * 2.0)) / F));
	tmp = 0.0;
	if (F <= -9.8e+92)
		tmp = (-1.0 - x) / B;
	elseif (F <= -3.2)
		tmp = -1.0 / sin(B);
	elseif (F <= 66000.0)
		tmp = ((0.16666666666666666 * ((F * B) / t_0)) + (F / (B * t_0))) - (x / B);
	else
		tmp = 1.0 / sin(B);
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := Block[{t$95$0 = N[(F + N[(0.5 * N[(N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -9.8e+92], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, -3.2], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 66000.0], N[(N[(N[(0.16666666666666666 * N[(N[(F * B), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(F / N[(B * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := F + 0.5 \cdot \frac{2 + x \cdot 2}{F}\\
\mathbf{if}\;F \leq -9.8 \cdot 10^{+92}:\\
\;\;\;\;\frac{-1 - x}{B}\\

\mathbf{elif}\;F \leq -3.2:\\
\;\;\;\;\frac{-1}{\sin B}\\

\mathbf{elif}\;F \leq 66000:\\
\;\;\;\;\left(0.16666666666666666 \cdot \frac{F \cdot B}{t\_0} + \frac{F}{B \cdot t\_0}\right) - \frac{x}{B}\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if F < -9.8000000000000003e92

    1. Initial program 49.4%

      \[\left(-x \cdot \frac{1}{\tan 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. distribute-lft-neg-in49.4%

        \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{1}{\tan B}} + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
      2. +-commutative49.4%

        \[\leadsto \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\right) \cdot \frac{1}{\tan B}} \]
      3. associate-*l/63.4%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} + \left(-x\right) \cdot \frac{1}{\tan B} \]
      4. associate-/l*63.4%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} + \left(-x\right) \cdot \frac{1}{\tan B} \]
      5. fma-define63.4%

        \[\leadsto \color{blue}{\mathsf{fma}\left(F, \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}, \left(-x\right) \cdot \frac{1}{\tan B}\right)} \]
      6. /-rgt-identity63.4%

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{F}{1}}, \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}, \left(-x\right) \cdot \frac{1}{\tan B}\right) \]
      7. remove-double-neg63.4%

        \[\leadsto \mathsf{fma}\left(\frac{F}{1}, \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}, \color{blue}{-\left(-\left(-x\right) \cdot \frac{1}{\tan B}\right)}\right) \]
      8. fma-neg63.4%

        \[\leadsto \color{blue}{\frac{F}{1} \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B} - \left(-\left(-x\right) \cdot \frac{1}{\tan B}\right)} \]
    3. Simplified63.5%

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num63.5%

        \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
      2. inv-pow63.5%

        \[\leadsto F \cdot \color{blue}{{\left(\frac{\sin B}{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}\right)}^{-1}} - \frac{x}{\tan B} \]
      3. fma-define63.5%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F + 2}\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      4. fma-undefine63.5%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\color{blue}{\left(x \cdot 2 + \left(F \cdot F + 2\right)\right)}}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      5. *-commutative63.5%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\color{blue}{2 \cdot x} + \left(F \cdot F + 2\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      6. fma-define63.5%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\color{blue}{\left(\mathsf{fma}\left(2, x, F \cdot F + 2\right)\right)}}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      7. fma-define63.5%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
    6. Applied egg-rr63.5%

      \[\leadsto F \cdot \color{blue}{{\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}\right)}^{-1}} - \frac{x}{\tan B} \]
    7. Step-by-step derivation
      1. unpow-163.5%

        \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
    8. Simplified63.5%

      \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
    9. Taylor expanded in F around -inf 99.7%

      \[\leadsto \color{blue}{\frac{-1}{\sin B}} - \frac{x}{\tan B} \]
    10. Taylor expanded in B around 0 55.4%

      \[\leadsto \color{blue}{-1 \cdot \frac{1 + x}{B}} \]
    11. Step-by-step derivation
      1. mul-1-neg55.4%

        \[\leadsto \color{blue}{-\frac{1 + x}{B}} \]
      2. distribute-neg-frac255.4%

        \[\leadsto \color{blue}{\frac{1 + x}{-B}} \]
    12. Simplified55.4%

      \[\leadsto \color{blue}{\frac{1 + x}{-B}} \]

    if -9.8000000000000003e92 < F < -3.2000000000000002

    1. Initial program 95.3%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Step-by-step derivation
      1. distribute-lft-neg-in95.3%

        \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{1}{\tan B}} + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
      2. +-commutative95.3%

        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x\right) \cdot \frac{1}{\tan B}} \]
      3. associate-*l/99.7%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} + \left(-x\right) \cdot \frac{1}{\tan B} \]
      4. associate-/l*99.7%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} + \left(-x\right) \cdot \frac{1}{\tan B} \]
      5. fma-define99.7%

        \[\leadsto \color{blue}{\mathsf{fma}\left(F, \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}, \left(-x\right) \cdot \frac{1}{\tan B}\right)} \]
      6. /-rgt-identity99.7%

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{F}{1}}, \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}, \left(-x\right) \cdot \frac{1}{\tan B}\right) \]
      7. remove-double-neg99.7%

        \[\leadsto \mathsf{fma}\left(\frac{F}{1}, \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}, \color{blue}{-\left(-\left(-x\right) \cdot \frac{1}{\tan B}\right)}\right) \]
      8. fma-neg99.7%

        \[\leadsto \color{blue}{\frac{F}{1} \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B} - \left(-\left(-x\right) \cdot \frac{1}{\tan B}\right)} \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num99.5%

        \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
      2. inv-pow99.5%

        \[\leadsto F \cdot \color{blue}{{\left(\frac{\sin B}{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}\right)}^{-1}} - \frac{x}{\tan B} \]
      3. fma-define99.5%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F + 2}\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      4. fma-undefine99.5%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\color{blue}{\left(x \cdot 2 + \left(F \cdot F + 2\right)\right)}}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      5. *-commutative99.5%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\color{blue}{2 \cdot x} + \left(F \cdot F + 2\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      6. fma-define99.5%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\color{blue}{\left(\mathsf{fma}\left(2, x, F \cdot F + 2\right)\right)}}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      7. fma-define99.5%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
    6. Applied egg-rr99.5%

      \[\leadsto F \cdot \color{blue}{{\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}\right)}^{-1}} - \frac{x}{\tan B} \]
    7. Step-by-step derivation
      1. unpow-199.5%

        \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
    8. Simplified99.5%

      \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
    9. Taylor expanded in F around -inf 98.0%

      \[\leadsto \color{blue}{\frac{-1}{\sin B}} - \frac{x}{\tan B} \]
    10. Taylor expanded in x around 0 65.0%

      \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]

    if -3.2000000000000002 < F < 66000

    1. Initial program 99.4%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in B around 0 72.9%

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    4. Step-by-step derivation
      1. +-commutative72.9%

        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-\frac{x}{B}\right)} \]
      2. unsub-neg72.9%

        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \frac{x}{B}} \]
    5. Applied egg-rr73.0%

      \[\leadsto \color{blue}{\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - \frac{x}{B}} \]
    6. Taylor expanded in F around inf 34.6%

      \[\leadsto \frac{F}{\sin B \cdot \color{blue}{\left(F + 0.5 \cdot \frac{2 + 2 \cdot x}{F}\right)}} - \frac{x}{B} \]
    7. Taylor expanded in B around 0 34.6%

      \[\leadsto \color{blue}{\left(0.16666666666666666 \cdot \frac{B \cdot F}{F + 0.5 \cdot \frac{2 + 2 \cdot x}{F}} + \frac{F}{B \cdot \left(F + 0.5 \cdot \frac{2 + 2 \cdot x}{F}\right)}\right)} - \frac{x}{B} \]

    if 66000 < F

    1. Initial program 59.0%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in B around 0 36.1%

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    4. Taylor expanded in F around inf 59.1%

      \[\leadsto \left(-\frac{x}{B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\frac{1}{F}} \]
    5. Step-by-step derivation
      1. *-un-lft-identity59.1%

        \[\leadsto \color{blue}{1 \cdot \left(\left(-\frac{x}{B}\right) + \frac{F}{\sin B} \cdot \frac{1}{F}\right)} \]
      2. +-commutative59.1%

        \[\leadsto 1 \cdot \color{blue}{\left(\frac{F}{\sin B} \cdot \frac{1}{F} + \left(-\frac{x}{B}\right)\right)} \]
      3. add-sqr-sqrt20.8%

        \[\leadsto 1 \cdot \left(\color{blue}{\sqrt{\frac{F}{\sin B} \cdot \frac{1}{F}} \cdot \sqrt{\frac{F}{\sin B} \cdot \frac{1}{F}}} + \left(-\frac{x}{B}\right)\right) \]
      4. add-sqr-sqrt13.2%

        \[\leadsto 1 \cdot \left(\sqrt{\frac{F}{\sin B} \cdot \frac{1}{F}} \cdot \sqrt{\frac{F}{\sin B} \cdot \frac{1}{F}} + \color{blue}{\sqrt{-\frac{x}{B}} \cdot \sqrt{-\frac{x}{B}}}\right) \]
      5. add-sqr-sqrt35.5%

        \[\leadsto 1 \cdot \left(\color{blue}{\frac{F}{\sin B} \cdot \frac{1}{F}} + \sqrt{-\frac{x}{B}} \cdot \sqrt{-\frac{x}{B}}\right) \]
      6. associate-*l/44.1%

        \[\leadsto 1 \cdot \left(\color{blue}{\frac{F \cdot \frac{1}{F}}{\sin B}} + \sqrt{-\frac{x}{B}} \cdot \sqrt{-\frac{x}{B}}\right) \]
      7. rgt-mult-inverse44.2%

        \[\leadsto 1 \cdot \left(\frac{\color{blue}{1}}{\sin B} + \sqrt{-\frac{x}{B}} \cdot \sqrt{-\frac{x}{B}}\right) \]
      8. sqrt-unprod63.6%

        \[\leadsto 1 \cdot \left(\frac{1}{\sin B} + \color{blue}{\sqrt{\left(-\frac{x}{B}\right) \cdot \left(-\frac{x}{B}\right)}}\right) \]
      9. sqr-neg63.6%

        \[\leadsto 1 \cdot \left(\frac{1}{\sin B} + \sqrt{\color{blue}{\frac{x}{B} \cdot \frac{x}{B}}}\right) \]
      10. sqrt-unprod39.2%

        \[\leadsto 1 \cdot \left(\frac{1}{\sin B} + \color{blue}{\sqrt{\frac{x}{B}} \cdot \sqrt{\frac{x}{B}}}\right) \]
      11. add-sqr-sqrt62.4%

        \[\leadsto 1 \cdot \left(\frac{1}{\sin B} + \color{blue}{\frac{x}{B}}\right) \]
    6. Applied egg-rr62.4%

      \[\leadsto \color{blue}{1 \cdot \left(\frac{1}{\sin B} + \frac{x}{B}\right)} \]
    7. Step-by-step derivation
      1. *-lft-identity62.4%

        \[\leadsto \color{blue}{\frac{1}{\sin B} + \frac{x}{B}} \]
    8. Simplified62.4%

      \[\leadsto \color{blue}{\frac{1}{\sin B} + \frac{x}{B}} \]
    9. Taylor expanded in B around inf 62.8%

      \[\leadsto \color{blue}{\frac{1}{\sin B}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification48.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -9.8 \cdot 10^{+92}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq -3.2:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 66000:\\ \;\;\;\;\left(0.16666666666666666 \cdot \frac{F \cdot B}{F + 0.5 \cdot \frac{2 + x \cdot 2}{F}} + \frac{F}{B \cdot \left(F + 0.5 \cdot \frac{2 + x \cdot 2}{F}\right)}\right) - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 44.8% accurate, 2.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := F + 0.5 \cdot \frac{2 + x \cdot 2}{F}\\ \mathbf{if}\;B \leq 4.4 \cdot 10^{-279}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;B \leq 1500000000:\\ \;\;\;\;\left(0.16666666666666666 \cdot \frac{F \cdot B}{t\_0} + \frac{F}{B \cdot t\_0}\right) - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (+ F (* 0.5 (/ (+ 2.0 (* x 2.0)) F)))))
   (if (<= B 4.4e-279)
     (/ (- -1.0 x) B)
     (if (<= B 1500000000.0)
       (- (+ (* 0.16666666666666666 (/ (* F B) t_0)) (/ F (* B t_0))) (/ x B))
       (* x (/ -1.0 (tan B)))))))
double code(double F, double B, double x) {
	double t_0 = F + (0.5 * ((2.0 + (x * 2.0)) / F));
	double tmp;
	if (B <= 4.4e-279) {
		tmp = (-1.0 - x) / B;
	} else if (B <= 1500000000.0) {
		tmp = ((0.16666666666666666 * ((F * B) / t_0)) + (F / (B * t_0))) - (x / B);
	} else {
		tmp = x * (-1.0 / tan(B));
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: t_0
    real(8) :: tmp
    t_0 = f + (0.5d0 * ((2.0d0 + (x * 2.0d0)) / f))
    if (b <= 4.4d-279) then
        tmp = ((-1.0d0) - x) / b
    else if (b <= 1500000000.0d0) then
        tmp = ((0.16666666666666666d0 * ((f * b) / t_0)) + (f / (b * t_0))) - (x / b)
    else
        tmp = x * ((-1.0d0) / tan(b))
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double t_0 = F + (0.5 * ((2.0 + (x * 2.0)) / F));
	double tmp;
	if (B <= 4.4e-279) {
		tmp = (-1.0 - x) / B;
	} else if (B <= 1500000000.0) {
		tmp = ((0.16666666666666666 * ((F * B) / t_0)) + (F / (B * t_0))) - (x / B);
	} else {
		tmp = x * (-1.0 / Math.tan(B));
	}
	return tmp;
}
def code(F, B, x):
	t_0 = F + (0.5 * ((2.0 + (x * 2.0)) / F))
	tmp = 0
	if B <= 4.4e-279:
		tmp = (-1.0 - x) / B
	elif B <= 1500000000.0:
		tmp = ((0.16666666666666666 * ((F * B) / t_0)) + (F / (B * t_0))) - (x / B)
	else:
		tmp = x * (-1.0 / math.tan(B))
	return tmp
function code(F, B, x)
	t_0 = Float64(F + Float64(0.5 * Float64(Float64(2.0 + Float64(x * 2.0)) / F)))
	tmp = 0.0
	if (B <= 4.4e-279)
		tmp = Float64(Float64(-1.0 - x) / B);
	elseif (B <= 1500000000.0)
		tmp = Float64(Float64(Float64(0.16666666666666666 * Float64(Float64(F * B) / t_0)) + Float64(F / Float64(B * t_0))) - Float64(x / B));
	else
		tmp = Float64(x * Float64(-1.0 / tan(B)));
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = F + (0.5 * ((2.0 + (x * 2.0)) / F));
	tmp = 0.0;
	if (B <= 4.4e-279)
		tmp = (-1.0 - x) / B;
	elseif (B <= 1500000000.0)
		tmp = ((0.16666666666666666 * ((F * B) / t_0)) + (F / (B * t_0))) - (x / B);
	else
		tmp = x * (-1.0 / tan(B));
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := Block[{t$95$0 = N[(F + N[(0.5 * N[(N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, 4.4e-279], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[B, 1500000000.0], N[(N[(N[(0.16666666666666666 * N[(N[(F * B), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(F / N[(B * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := F + 0.5 \cdot \frac{2 + x \cdot 2}{F}\\
\mathbf{if}\;B \leq 4.4 \cdot 10^{-279}:\\
\;\;\;\;\frac{-1 - x}{B}\\

\mathbf{elif}\;B \leq 1500000000:\\
\;\;\;\;\left(0.16666666666666666 \cdot \frac{F \cdot B}{t\_0} + \frac{F}{B \cdot t\_0}\right) - \frac{x}{B}\\

\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if B < 4.40000000000000001e-279

    1. Initial program 77.2%

      \[\left(-x \cdot \frac{1}{\tan 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. distribute-lft-neg-in77.2%

        \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{1}{\tan B}} + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
      2. +-commutative77.2%

        \[\leadsto \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\right) \cdot \frac{1}{\tan B}} \]
      3. associate-*l/85.5%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} + \left(-x\right) \cdot \frac{1}{\tan B} \]
      4. associate-/l*85.4%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} + \left(-x\right) \cdot \frac{1}{\tan B} \]
      5. fma-define85.4%

        \[\leadsto \color{blue}{\mathsf{fma}\left(F, \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}, \left(-x\right) \cdot \frac{1}{\tan B}\right)} \]
      6. /-rgt-identity85.4%

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{F}{1}}, \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}, \left(-x\right) \cdot \frac{1}{\tan B}\right) \]
      7. remove-double-neg85.4%

        \[\leadsto \mathsf{fma}\left(\frac{F}{1}, \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}, \color{blue}{-\left(-\left(-x\right) \cdot \frac{1}{\tan B}\right)}\right) \]
      8. fma-neg85.4%

        \[\leadsto \color{blue}{\frac{F}{1} \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B} - \left(-\left(-x\right) \cdot \frac{1}{\tan B}\right)} \]
    3. Simplified85.5%

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num85.4%

        \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
      2. inv-pow85.4%

        \[\leadsto F \cdot \color{blue}{{\left(\frac{\sin B}{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}\right)}^{-1}} - \frac{x}{\tan B} \]
      3. fma-define85.4%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F + 2}\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      4. fma-undefine85.4%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\color{blue}{\left(x \cdot 2 + \left(F \cdot F + 2\right)\right)}}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      5. *-commutative85.4%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\color{blue}{2 \cdot x} + \left(F \cdot F + 2\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      6. fma-define85.4%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\color{blue}{\left(\mathsf{fma}\left(2, x, F \cdot F + 2\right)\right)}}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      7. fma-define85.4%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
    6. Applied egg-rr85.4%

      \[\leadsto F \cdot \color{blue}{{\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}\right)}^{-1}} - \frac{x}{\tan B} \]
    7. Step-by-step derivation
      1. unpow-185.4%

        \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
    8. Simplified85.4%

      \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
    9. Taylor expanded in F around -inf 62.6%

      \[\leadsto \color{blue}{\frac{-1}{\sin B}} - \frac{x}{\tan B} \]
    10. Taylor expanded in B around 0 35.3%

      \[\leadsto \color{blue}{-1 \cdot \frac{1 + x}{B}} \]
    11. Step-by-step derivation
      1. mul-1-neg35.3%

        \[\leadsto \color{blue}{-\frac{1 + x}{B}} \]
      2. distribute-neg-frac235.3%

        \[\leadsto \color{blue}{\frac{1 + x}{-B}} \]
    12. Simplified35.3%

      \[\leadsto \color{blue}{\frac{1 + x}{-B}} \]

    if 4.40000000000000001e-279 < B < 1.5e9

    1. Initial program 72.3%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in B around 0 72.1%

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    4. Step-by-step derivation
      1. +-commutative72.1%

        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-\frac{x}{B}\right)} \]
      2. unsub-neg72.1%

        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \frac{x}{B}} \]
    5. Applied egg-rr78.0%

      \[\leadsto \color{blue}{\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - \frac{x}{B}} \]
    6. Taylor expanded in F around inf 63.3%

      \[\leadsto \frac{F}{\sin B \cdot \color{blue}{\left(F + 0.5 \cdot \frac{2 + 2 \cdot x}{F}\right)}} - \frac{x}{B} \]
    7. Taylor expanded in B around 0 60.7%

      \[\leadsto \color{blue}{\left(0.16666666666666666 \cdot \frac{B \cdot F}{F + 0.5 \cdot \frac{2 + 2 \cdot x}{F}} + \frac{F}{B \cdot \left(F + 0.5 \cdot \frac{2 + 2 \cdot x}{F}\right)}\right)} - \frac{x}{B} \]

    if 1.5e9 < B

    1. Initial program 83.9%

      \[\left(-x \cdot \frac{1}{\tan 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. distribute-lft-neg-in83.9%

        \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{1}{\tan B}} + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
      2. +-commutative83.9%

        \[\leadsto \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\right) \cdot \frac{1}{\tan B}} \]
      3. fma-define83.9%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{F}{\sin B}, {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}, \left(-x\right) \cdot \frac{1}{\tan B}\right)} \]
      4. +-commutative83.9%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\color{blue}{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}}^{\left(-\frac{1}{2}\right)}, \left(-x\right) \cdot \frac{1}{\tan B}\right) \]
      5. *-commutative83.9%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\color{blue}{x \cdot 2} + \left(F \cdot F + 2\right)\right)}^{\left(-\frac{1}{2}\right)}, \left(-x\right) \cdot \frac{1}{\tan B}\right) \]
      6. fma-define83.9%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\color{blue}{\left(\mathsf{fma}\left(x, 2, F \cdot F + 2\right)\right)}}^{\left(-\frac{1}{2}\right)}, \left(-x\right) \cdot \frac{1}{\tan B}\right) \]
      7. fma-define83.9%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)\right)}^{\left(-\frac{1}{2}\right)}, \left(-x\right) \cdot \frac{1}{\tan B}\right) \]
      8. metadata-eval83.9%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(-\color{blue}{0.5}\right)}, \left(-x\right) \cdot \frac{1}{\tan B}\right) \]
      9. metadata-eval83.9%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\color{blue}{-0.5}}, \left(-x\right) \cdot \frac{1}{\tan B}\right) \]
      10. associate-*r/83.9%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \color{blue}{\frac{\left(-x\right) \cdot 1}{\tan B}}\right) \]
      11. *-rgt-identity83.9%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \frac{\color{blue}{-x}}{\tan B}\right) \]
    3. Simplified83.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \frac{-x}{\tan B}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in F around 0 47.9%

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
    6. Step-by-step derivation
      1. mul-1-neg47.9%

        \[\leadsto \color{blue}{-\frac{x \cdot \cos B}{\sin B}} \]
      2. associate-/l*48.0%

        \[\leadsto -\color{blue}{x \cdot \frac{\cos B}{\sin B}} \]
    7. Simplified48.0%

      \[\leadsto \color{blue}{-x \cdot \frac{\cos B}{\sin B}} \]
    8. Step-by-step derivation
      1. *-un-lft-identity48.0%

        \[\leadsto -x \cdot \color{blue}{\left(1 \cdot \frac{\cos B}{\sin B}\right)} \]
      2. clear-num48.0%

        \[\leadsto -x \cdot \left(1 \cdot \color{blue}{\frac{1}{\frac{\sin B}{\cos B}}}\right) \]
      3. quot-tan48.0%

        \[\leadsto -x \cdot \left(1 \cdot \frac{1}{\color{blue}{\tan B}}\right) \]
    9. Applied egg-rr48.0%

      \[\leadsto -x \cdot \color{blue}{\left(1 \cdot \frac{1}{\tan B}\right)} \]
    10. Step-by-step derivation
      1. *-lft-identity48.0%

        \[\leadsto -x \cdot \color{blue}{\frac{1}{\tan B}} \]
    11. Simplified48.0%

      \[\leadsto -x \cdot \color{blue}{\frac{1}{\tan B}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification44.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 4.4 \cdot 10^{-279}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;B \leq 1500000000:\\ \;\;\;\;\left(0.16666666666666666 \cdot \frac{F \cdot B}{F + 0.5 \cdot \frac{2 + x \cdot 2}{F}} + \frac{F}{B \cdot \left(F + 0.5 \cdot \frac{2 + x \cdot 2}{F}\right)}\right) - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 22: 44.8% accurate, 2.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := F + 0.5 \cdot \frac{2 + x \cdot 2}{F}\\ \mathbf{if}\;B \leq 1.3 \cdot 10^{-279}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;B \leq 1500000000:\\ \;\;\;\;\left(0.16666666666666666 \cdot \frac{F \cdot B}{t\_0} + \frac{F}{B \cdot t\_0}\right) - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;-\frac{x}{\tan B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (+ F (* 0.5 (/ (+ 2.0 (* x 2.0)) F)))))
   (if (<= B 1.3e-279)
     (/ (- -1.0 x) B)
     (if (<= B 1500000000.0)
       (- (+ (* 0.16666666666666666 (/ (* F B) t_0)) (/ F (* B t_0))) (/ x B))
       (- (/ x (tan B)))))))
double code(double F, double B, double x) {
	double t_0 = F + (0.5 * ((2.0 + (x * 2.0)) / F));
	double tmp;
	if (B <= 1.3e-279) {
		tmp = (-1.0 - x) / B;
	} else if (B <= 1500000000.0) {
		tmp = ((0.16666666666666666 * ((F * B) / t_0)) + (F / (B * t_0))) - (x / B);
	} else {
		tmp = -(x / tan(B));
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: t_0
    real(8) :: tmp
    t_0 = f + (0.5d0 * ((2.0d0 + (x * 2.0d0)) / f))
    if (b <= 1.3d-279) then
        tmp = ((-1.0d0) - x) / b
    else if (b <= 1500000000.0d0) then
        tmp = ((0.16666666666666666d0 * ((f * b) / t_0)) + (f / (b * t_0))) - (x / b)
    else
        tmp = -(x / tan(b))
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double t_0 = F + (0.5 * ((2.0 + (x * 2.0)) / F));
	double tmp;
	if (B <= 1.3e-279) {
		tmp = (-1.0 - x) / B;
	} else if (B <= 1500000000.0) {
		tmp = ((0.16666666666666666 * ((F * B) / t_0)) + (F / (B * t_0))) - (x / B);
	} else {
		tmp = -(x / Math.tan(B));
	}
	return tmp;
}
def code(F, B, x):
	t_0 = F + (0.5 * ((2.0 + (x * 2.0)) / F))
	tmp = 0
	if B <= 1.3e-279:
		tmp = (-1.0 - x) / B
	elif B <= 1500000000.0:
		tmp = ((0.16666666666666666 * ((F * B) / t_0)) + (F / (B * t_0))) - (x / B)
	else:
		tmp = -(x / math.tan(B))
	return tmp
function code(F, B, x)
	t_0 = Float64(F + Float64(0.5 * Float64(Float64(2.0 + Float64(x * 2.0)) / F)))
	tmp = 0.0
	if (B <= 1.3e-279)
		tmp = Float64(Float64(-1.0 - x) / B);
	elseif (B <= 1500000000.0)
		tmp = Float64(Float64(Float64(0.16666666666666666 * Float64(Float64(F * B) / t_0)) + Float64(F / Float64(B * t_0))) - Float64(x / B));
	else
		tmp = Float64(-Float64(x / tan(B)));
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = F + (0.5 * ((2.0 + (x * 2.0)) / F));
	tmp = 0.0;
	if (B <= 1.3e-279)
		tmp = (-1.0 - x) / B;
	elseif (B <= 1500000000.0)
		tmp = ((0.16666666666666666 * ((F * B) / t_0)) + (F / (B * t_0))) - (x / B);
	else
		tmp = -(x / tan(B));
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := Block[{t$95$0 = N[(F + N[(0.5 * N[(N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, 1.3e-279], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[B, 1500000000.0], N[(N[(N[(0.16666666666666666 * N[(N[(F * B), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(F / N[(B * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], (-N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision])]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := F + 0.5 \cdot \frac{2 + x \cdot 2}{F}\\
\mathbf{if}\;B \leq 1.3 \cdot 10^{-279}:\\
\;\;\;\;\frac{-1 - x}{B}\\

\mathbf{elif}\;B \leq 1500000000:\\
\;\;\;\;\left(0.16666666666666666 \cdot \frac{F \cdot B}{t\_0} + \frac{F}{B \cdot t\_0}\right) - \frac{x}{B}\\

\mathbf{else}:\\
\;\;\;\;-\frac{x}{\tan B}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if B < 1.3000000000000001e-279

    1. Initial program 77.2%

      \[\left(-x \cdot \frac{1}{\tan 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. distribute-lft-neg-in77.2%

        \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{1}{\tan B}} + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
      2. +-commutative77.2%

        \[\leadsto \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\right) \cdot \frac{1}{\tan B}} \]
      3. associate-*l/85.5%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} + \left(-x\right) \cdot \frac{1}{\tan B} \]
      4. associate-/l*85.4%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} + \left(-x\right) \cdot \frac{1}{\tan B} \]
      5. fma-define85.4%

        \[\leadsto \color{blue}{\mathsf{fma}\left(F, \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}, \left(-x\right) \cdot \frac{1}{\tan B}\right)} \]
      6. /-rgt-identity85.4%

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{F}{1}}, \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}, \left(-x\right) \cdot \frac{1}{\tan B}\right) \]
      7. remove-double-neg85.4%

        \[\leadsto \mathsf{fma}\left(\frac{F}{1}, \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}, \color{blue}{-\left(-\left(-x\right) \cdot \frac{1}{\tan B}\right)}\right) \]
      8. fma-neg85.4%

        \[\leadsto \color{blue}{\frac{F}{1} \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B} - \left(-\left(-x\right) \cdot \frac{1}{\tan B}\right)} \]
    3. Simplified85.5%

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num85.4%

        \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
      2. inv-pow85.4%

        \[\leadsto F \cdot \color{blue}{{\left(\frac{\sin B}{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}\right)}^{-1}} - \frac{x}{\tan B} \]
      3. fma-define85.4%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F + 2}\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      4. fma-undefine85.4%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\color{blue}{\left(x \cdot 2 + \left(F \cdot F + 2\right)\right)}}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      5. *-commutative85.4%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\color{blue}{2 \cdot x} + \left(F \cdot F + 2\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      6. fma-define85.4%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\color{blue}{\left(\mathsf{fma}\left(2, x, F \cdot F + 2\right)\right)}}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      7. fma-define85.4%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
    6. Applied egg-rr85.4%

      \[\leadsto F \cdot \color{blue}{{\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}\right)}^{-1}} - \frac{x}{\tan B} \]
    7. Step-by-step derivation
      1. unpow-185.4%

        \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
    8. Simplified85.4%

      \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
    9. Taylor expanded in F around -inf 62.6%

      \[\leadsto \color{blue}{\frac{-1}{\sin B}} - \frac{x}{\tan B} \]
    10. Taylor expanded in B around 0 35.3%

      \[\leadsto \color{blue}{-1 \cdot \frac{1 + x}{B}} \]
    11. Step-by-step derivation
      1. mul-1-neg35.3%

        \[\leadsto \color{blue}{-\frac{1 + x}{B}} \]
      2. distribute-neg-frac235.3%

        \[\leadsto \color{blue}{\frac{1 + x}{-B}} \]
    12. Simplified35.3%

      \[\leadsto \color{blue}{\frac{1 + x}{-B}} \]

    if 1.3000000000000001e-279 < B < 1.5e9

    1. Initial program 72.3%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in B around 0 72.1%

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    4. Step-by-step derivation
      1. +-commutative72.1%

        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-\frac{x}{B}\right)} \]
      2. unsub-neg72.1%

        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \frac{x}{B}} \]
    5. Applied egg-rr78.0%

      \[\leadsto \color{blue}{\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - \frac{x}{B}} \]
    6. Taylor expanded in F around inf 63.3%

      \[\leadsto \frac{F}{\sin B \cdot \color{blue}{\left(F + 0.5 \cdot \frac{2 + 2 \cdot x}{F}\right)}} - \frac{x}{B} \]
    7. Taylor expanded in B around 0 60.7%

      \[\leadsto \color{blue}{\left(0.16666666666666666 \cdot \frac{B \cdot F}{F + 0.5 \cdot \frac{2 + 2 \cdot x}{F}} + \frac{F}{B \cdot \left(F + 0.5 \cdot \frac{2 + 2 \cdot x}{F}\right)}\right)} - \frac{x}{B} \]

    if 1.5e9 < B

    1. Initial program 83.9%

      \[\left(-x \cdot \frac{1}{\tan 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. distribute-lft-neg-in83.9%

        \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{1}{\tan B}} + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
      2. +-commutative83.9%

        \[\leadsto \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\right) \cdot \frac{1}{\tan B}} \]
      3. fma-define83.9%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{F}{\sin B}, {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}, \left(-x\right) \cdot \frac{1}{\tan B}\right)} \]
      4. +-commutative83.9%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\color{blue}{\left(2 \cdot x + \left(F \cdot F + 2\right)\right)}}^{\left(-\frac{1}{2}\right)}, \left(-x\right) \cdot \frac{1}{\tan B}\right) \]
      5. *-commutative83.9%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\color{blue}{x \cdot 2} + \left(F \cdot F + 2\right)\right)}^{\left(-\frac{1}{2}\right)}, \left(-x\right) \cdot \frac{1}{\tan B}\right) \]
      6. fma-define83.9%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\color{blue}{\left(\mathsf{fma}\left(x, 2, F \cdot F + 2\right)\right)}}^{\left(-\frac{1}{2}\right)}, \left(-x\right) \cdot \frac{1}{\tan B}\right) \]
      7. fma-define83.9%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)\right)}^{\left(-\frac{1}{2}\right)}, \left(-x\right) \cdot \frac{1}{\tan B}\right) \]
      8. metadata-eval83.9%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(-\color{blue}{0.5}\right)}, \left(-x\right) \cdot \frac{1}{\tan B}\right) \]
      9. metadata-eval83.9%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\color{blue}{-0.5}}, \left(-x\right) \cdot \frac{1}{\tan B}\right) \]
      10. associate-*r/83.9%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \color{blue}{\frac{\left(-x\right) \cdot 1}{\tan B}}\right) \]
      11. *-rgt-identity83.9%

        \[\leadsto \mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \frac{\color{blue}{-x}}{\tan B}\right) \]
    3. Simplified83.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{F}{\sin B}, {\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}, \frac{-x}{\tan B}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in F around 0 47.9%

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
    6. Step-by-step derivation
      1. mul-1-neg47.9%

        \[\leadsto \color{blue}{-\frac{x \cdot \cos B}{\sin B}} \]
      2. associate-/l*48.0%

        \[\leadsto -\color{blue}{x \cdot \frac{\cos B}{\sin B}} \]
    7. Simplified48.0%

      \[\leadsto \color{blue}{-x \cdot \frac{\cos B}{\sin B}} \]
    8. Step-by-step derivation
      1. clear-num48.0%

        \[\leadsto -x \cdot \color{blue}{\frac{1}{\frac{\sin B}{\cos B}}} \]
      2. un-div-inv48.0%

        \[\leadsto -\color{blue}{\frac{x}{\frac{\sin B}{\cos B}}} \]
      3. quot-tan48.0%

        \[\leadsto -\frac{x}{\color{blue}{\tan B}} \]
    9. Applied egg-rr48.0%

      \[\leadsto -\color{blue}{\frac{x}{\tan B}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification44.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 1.3 \cdot 10^{-279}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;B \leq 1500000000:\\ \;\;\;\;\left(0.16666666666666666 \cdot \frac{F \cdot B}{F + 0.5 \cdot \frac{2 + x \cdot 2}{F}} + \frac{F}{B \cdot \left(F + 0.5 \cdot \frac{2 + x \cdot 2}{F}\right)}\right) - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;-\frac{x}{\tan B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 23: 44.0% accurate, 2.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := F + 0.5 \cdot \frac{2 + x \cdot 2}{F}\\ \mathbf{if}\;F \leq -1.15 \cdot 10^{+92}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq -1.65:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\left(0.16666666666666666 \cdot \frac{F \cdot B}{t\_0} + \frac{F}{B \cdot t\_0}\right) - \frac{x}{B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (+ F (* 0.5 (/ (+ 2.0 (* x 2.0)) F)))))
   (if (<= F -1.15e+92)
     (/ (- -1.0 x) B)
     (if (<= F -1.65)
       (/ -1.0 (sin B))
       (-
        (+ (* 0.16666666666666666 (/ (* F B) t_0)) (/ F (* B t_0)))
        (/ x B))))))
double code(double F, double B, double x) {
	double t_0 = F + (0.5 * ((2.0 + (x * 2.0)) / F));
	double tmp;
	if (F <= -1.15e+92) {
		tmp = (-1.0 - x) / B;
	} else if (F <= -1.65) {
		tmp = -1.0 / sin(B);
	} else {
		tmp = ((0.16666666666666666 * ((F * B) / t_0)) + (F / (B * t_0))) - (x / B);
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: t_0
    real(8) :: tmp
    t_0 = f + (0.5d0 * ((2.0d0 + (x * 2.0d0)) / f))
    if (f <= (-1.15d+92)) then
        tmp = ((-1.0d0) - x) / b
    else if (f <= (-1.65d0)) then
        tmp = (-1.0d0) / sin(b)
    else
        tmp = ((0.16666666666666666d0 * ((f * b) / t_0)) + (f / (b * t_0))) - (x / b)
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double t_0 = F + (0.5 * ((2.0 + (x * 2.0)) / F));
	double tmp;
	if (F <= -1.15e+92) {
		tmp = (-1.0 - x) / B;
	} else if (F <= -1.65) {
		tmp = -1.0 / Math.sin(B);
	} else {
		tmp = ((0.16666666666666666 * ((F * B) / t_0)) + (F / (B * t_0))) - (x / B);
	}
	return tmp;
}
def code(F, B, x):
	t_0 = F + (0.5 * ((2.0 + (x * 2.0)) / F))
	tmp = 0
	if F <= -1.15e+92:
		tmp = (-1.0 - x) / B
	elif F <= -1.65:
		tmp = -1.0 / math.sin(B)
	else:
		tmp = ((0.16666666666666666 * ((F * B) / t_0)) + (F / (B * t_0))) - (x / B)
	return tmp
function code(F, B, x)
	t_0 = Float64(F + Float64(0.5 * Float64(Float64(2.0 + Float64(x * 2.0)) / F)))
	tmp = 0.0
	if (F <= -1.15e+92)
		tmp = Float64(Float64(-1.0 - x) / B);
	elseif (F <= -1.65)
		tmp = Float64(-1.0 / sin(B));
	else
		tmp = Float64(Float64(Float64(0.16666666666666666 * Float64(Float64(F * B) / t_0)) + Float64(F / Float64(B * t_0))) - Float64(x / B));
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = F + (0.5 * ((2.0 + (x * 2.0)) / F));
	tmp = 0.0;
	if (F <= -1.15e+92)
		tmp = (-1.0 - x) / B;
	elseif (F <= -1.65)
		tmp = -1.0 / sin(B);
	else
		tmp = ((0.16666666666666666 * ((F * B) / t_0)) + (F / (B * t_0))) - (x / B);
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := Block[{t$95$0 = N[(F + N[(0.5 * N[(N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.15e+92], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, -1.65], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(N[(0.16666666666666666 * N[(N[(F * B), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(F / N[(B * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := F + 0.5 \cdot \frac{2 + x \cdot 2}{F}\\
\mathbf{if}\;F \leq -1.15 \cdot 10^{+92}:\\
\;\;\;\;\frac{-1 - x}{B}\\

\mathbf{elif}\;F \leq -1.65:\\
\;\;\;\;\frac{-1}{\sin B}\\

\mathbf{else}:\\
\;\;\;\;\left(0.16666666666666666 \cdot \frac{F \cdot B}{t\_0} + \frac{F}{B \cdot t\_0}\right) - \frac{x}{B}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if F < -1.14999999999999999e92

    1. Initial program 49.4%

      \[\left(-x \cdot \frac{1}{\tan 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. distribute-lft-neg-in49.4%

        \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{1}{\tan B}} + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
      2. +-commutative49.4%

        \[\leadsto \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\right) \cdot \frac{1}{\tan B}} \]
      3. associate-*l/63.4%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} + \left(-x\right) \cdot \frac{1}{\tan B} \]
      4. associate-/l*63.4%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} + \left(-x\right) \cdot \frac{1}{\tan B} \]
      5. fma-define63.4%

        \[\leadsto \color{blue}{\mathsf{fma}\left(F, \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}, \left(-x\right) \cdot \frac{1}{\tan B}\right)} \]
      6. /-rgt-identity63.4%

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{F}{1}}, \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}, \left(-x\right) \cdot \frac{1}{\tan B}\right) \]
      7. remove-double-neg63.4%

        \[\leadsto \mathsf{fma}\left(\frac{F}{1}, \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}, \color{blue}{-\left(-\left(-x\right) \cdot \frac{1}{\tan B}\right)}\right) \]
      8. fma-neg63.4%

        \[\leadsto \color{blue}{\frac{F}{1} \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B} - \left(-\left(-x\right) \cdot \frac{1}{\tan B}\right)} \]
    3. Simplified63.5%

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num63.5%

        \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
      2. inv-pow63.5%

        \[\leadsto F \cdot \color{blue}{{\left(\frac{\sin B}{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}\right)}^{-1}} - \frac{x}{\tan B} \]
      3. fma-define63.5%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F + 2}\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      4. fma-undefine63.5%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\color{blue}{\left(x \cdot 2 + \left(F \cdot F + 2\right)\right)}}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      5. *-commutative63.5%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\color{blue}{2 \cdot x} + \left(F \cdot F + 2\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      6. fma-define63.5%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\color{blue}{\left(\mathsf{fma}\left(2, x, F \cdot F + 2\right)\right)}}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      7. fma-define63.5%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
    6. Applied egg-rr63.5%

      \[\leadsto F \cdot \color{blue}{{\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}\right)}^{-1}} - \frac{x}{\tan B} \]
    7. Step-by-step derivation
      1. unpow-163.5%

        \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
    8. Simplified63.5%

      \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
    9. Taylor expanded in F around -inf 99.7%

      \[\leadsto \color{blue}{\frac{-1}{\sin B}} - \frac{x}{\tan B} \]
    10. Taylor expanded in B around 0 55.4%

      \[\leadsto \color{blue}{-1 \cdot \frac{1 + x}{B}} \]
    11. Step-by-step derivation
      1. mul-1-neg55.4%

        \[\leadsto \color{blue}{-\frac{1 + x}{B}} \]
      2. distribute-neg-frac255.4%

        \[\leadsto \color{blue}{\frac{1 + x}{-B}} \]
    12. Simplified55.4%

      \[\leadsto \color{blue}{\frac{1 + x}{-B}} \]

    if -1.14999999999999999e92 < F < -1.6499999999999999

    1. Initial program 95.3%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Step-by-step derivation
      1. distribute-lft-neg-in95.3%

        \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{1}{\tan B}} + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
      2. +-commutative95.3%

        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x\right) \cdot \frac{1}{\tan B}} \]
      3. associate-*l/99.7%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} + \left(-x\right) \cdot \frac{1}{\tan B} \]
      4. associate-/l*99.7%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} + \left(-x\right) \cdot \frac{1}{\tan B} \]
      5. fma-define99.7%

        \[\leadsto \color{blue}{\mathsf{fma}\left(F, \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}, \left(-x\right) \cdot \frac{1}{\tan B}\right)} \]
      6. /-rgt-identity99.7%

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{F}{1}}, \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}, \left(-x\right) \cdot \frac{1}{\tan B}\right) \]
      7. remove-double-neg99.7%

        \[\leadsto \mathsf{fma}\left(\frac{F}{1}, \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}, \color{blue}{-\left(-\left(-x\right) \cdot \frac{1}{\tan B}\right)}\right) \]
      8. fma-neg99.7%

        \[\leadsto \color{blue}{\frac{F}{1} \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B} - \left(-\left(-x\right) \cdot \frac{1}{\tan B}\right)} \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num99.5%

        \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
      2. inv-pow99.5%

        \[\leadsto F \cdot \color{blue}{{\left(\frac{\sin B}{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}\right)}^{-1}} - \frac{x}{\tan B} \]
      3. fma-define99.5%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F + 2}\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      4. fma-undefine99.5%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\color{blue}{\left(x \cdot 2 + \left(F \cdot F + 2\right)\right)}}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      5. *-commutative99.5%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\color{blue}{2 \cdot x} + \left(F \cdot F + 2\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      6. fma-define99.5%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\color{blue}{\left(\mathsf{fma}\left(2, x, F \cdot F + 2\right)\right)}}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      7. fma-define99.5%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
    6. Applied egg-rr99.5%

      \[\leadsto F \cdot \color{blue}{{\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}\right)}^{-1}} - \frac{x}{\tan B} \]
    7. Step-by-step derivation
      1. unpow-199.5%

        \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
    8. Simplified99.5%

      \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
    9. Taylor expanded in F around -inf 98.0%

      \[\leadsto \color{blue}{\frac{-1}{\sin B}} - \frac{x}{\tan B} \]
    10. Taylor expanded in x around 0 65.0%

      \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]

    if -1.6499999999999999 < F

    1. Initial program 86.4%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in B around 0 61.1%

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    4. Step-by-step derivation
      1. +-commutative61.1%

        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-\frac{x}{B}\right)} \]
      2. unsub-neg61.1%

        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \frac{x}{B}} \]
    5. Applied egg-rr63.7%

      \[\leadsto \color{blue}{\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - \frac{x}{B}} \]
    6. Taylor expanded in F around inf 48.0%

      \[\leadsto \frac{F}{\sin B \cdot \color{blue}{\left(F + 0.5 \cdot \frac{2 + 2 \cdot x}{F}\right)}} - \frac{x}{B} \]
    7. Taylor expanded in B around 0 38.7%

      \[\leadsto \color{blue}{\left(0.16666666666666666 \cdot \frac{B \cdot F}{F + 0.5 \cdot \frac{2 + 2 \cdot x}{F}} + \frac{F}{B \cdot \left(F + 0.5 \cdot \frac{2 + 2 \cdot x}{F}\right)}\right)} - \frac{x}{B} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification45.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1.15 \cdot 10^{+92}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq -1.65:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\left(0.16666666666666666 \cdot \frac{F \cdot B}{F + 0.5 \cdot \frac{2 + x \cdot 2}{F}} + \frac{F}{B \cdot \left(F + 0.5 \cdot \frac{2 + x \cdot 2}{F}\right)}\right) - \frac{x}{B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 24: 43.2% accurate, 7.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := F + 0.5 \cdot \frac{2 + x \cdot 2}{F}\\ \mathbf{if}\;F \leq -2.2 \cdot 10^{-50}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\left(0.16666666666666666 \cdot \frac{F \cdot B}{t\_0} + \frac{F}{B \cdot t\_0}\right) - \frac{x}{B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (+ F (* 0.5 (/ (+ 2.0 (* x 2.0)) F)))))
   (if (<= F -2.2e-50)
     (/ (- -1.0 x) B)
     (- (+ (* 0.16666666666666666 (/ (* F B) t_0)) (/ F (* B t_0))) (/ x B)))))
double code(double F, double B, double x) {
	double t_0 = F + (0.5 * ((2.0 + (x * 2.0)) / F));
	double tmp;
	if (F <= -2.2e-50) {
		tmp = (-1.0 - x) / B;
	} else {
		tmp = ((0.16666666666666666 * ((F * B) / t_0)) + (F / (B * t_0))) - (x / B);
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: t_0
    real(8) :: tmp
    t_0 = f + (0.5d0 * ((2.0d0 + (x * 2.0d0)) / f))
    if (f <= (-2.2d-50)) then
        tmp = ((-1.0d0) - x) / b
    else
        tmp = ((0.16666666666666666d0 * ((f * b) / t_0)) + (f / (b * t_0))) - (x / b)
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double t_0 = F + (0.5 * ((2.0 + (x * 2.0)) / F));
	double tmp;
	if (F <= -2.2e-50) {
		tmp = (-1.0 - x) / B;
	} else {
		tmp = ((0.16666666666666666 * ((F * B) / t_0)) + (F / (B * t_0))) - (x / B);
	}
	return tmp;
}
def code(F, B, x):
	t_0 = F + (0.5 * ((2.0 + (x * 2.0)) / F))
	tmp = 0
	if F <= -2.2e-50:
		tmp = (-1.0 - x) / B
	else:
		tmp = ((0.16666666666666666 * ((F * B) / t_0)) + (F / (B * t_0))) - (x / B)
	return tmp
function code(F, B, x)
	t_0 = Float64(F + Float64(0.5 * Float64(Float64(2.0 + Float64(x * 2.0)) / F)))
	tmp = 0.0
	if (F <= -2.2e-50)
		tmp = Float64(Float64(-1.0 - x) / B);
	else
		tmp = Float64(Float64(Float64(0.16666666666666666 * Float64(Float64(F * B) / t_0)) + Float64(F / Float64(B * t_0))) - Float64(x / B));
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = F + (0.5 * ((2.0 + (x * 2.0)) / F));
	tmp = 0.0;
	if (F <= -2.2e-50)
		tmp = (-1.0 - x) / B;
	else
		tmp = ((0.16666666666666666 * ((F * B) / t_0)) + (F / (B * t_0))) - (x / B);
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := Block[{t$95$0 = N[(F + N[(0.5 * N[(N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.2e-50], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(N[(0.16666666666666666 * N[(N[(F * B), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(F / N[(B * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := F + 0.5 \cdot \frac{2 + x \cdot 2}{F}\\
\mathbf{if}\;F \leq -2.2 \cdot 10^{-50}:\\
\;\;\;\;\frac{-1 - x}{B}\\

\mathbf{else}:\\
\;\;\;\;\left(0.16666666666666666 \cdot \frac{F \cdot B}{t\_0} + \frac{F}{B \cdot t\_0}\right) - \frac{x}{B}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if F < -2.1999999999999999e-50

    1. Initial program 64.3%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Step-by-step derivation
      1. distribute-lft-neg-in64.3%

        \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{1}{\tan B}} + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
      2. +-commutative64.3%

        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x\right) \cdot \frac{1}{\tan B}} \]
      3. associate-*l/74.8%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} + \left(-x\right) \cdot \frac{1}{\tan B} \]
      4. associate-/l*74.8%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} + \left(-x\right) \cdot \frac{1}{\tan B} \]
      5. fma-define74.8%

        \[\leadsto \color{blue}{\mathsf{fma}\left(F, \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}, \left(-x\right) \cdot \frac{1}{\tan B}\right)} \]
      6. /-rgt-identity74.8%

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{F}{1}}, \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}, \left(-x\right) \cdot \frac{1}{\tan B}\right) \]
      7. remove-double-neg74.8%

        \[\leadsto \mathsf{fma}\left(\frac{F}{1}, \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}, \color{blue}{-\left(-\left(-x\right) \cdot \frac{1}{\tan B}\right)}\right) \]
      8. fma-neg74.8%

        \[\leadsto \color{blue}{\frac{F}{1} \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B} - \left(-\left(-x\right) \cdot \frac{1}{\tan B}\right)} \]
    3. Simplified74.9%

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num74.8%

        \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
      2. inv-pow74.8%

        \[\leadsto F \cdot \color{blue}{{\left(\frac{\sin B}{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}\right)}^{-1}} - \frac{x}{\tan B} \]
      3. fma-define74.8%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F + 2}\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      4. fma-undefine74.8%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\color{blue}{\left(x \cdot 2 + \left(F \cdot F + 2\right)\right)}}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      5. *-commutative74.8%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\color{blue}{2 \cdot x} + \left(F \cdot F + 2\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      6. fma-define74.8%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\color{blue}{\left(\mathsf{fma}\left(2, x, F \cdot F + 2\right)\right)}}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      7. fma-define74.8%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
    6. Applied egg-rr74.8%

      \[\leadsto F \cdot \color{blue}{{\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}\right)}^{-1}} - \frac{x}{\tan B} \]
    7. Step-by-step derivation
      1. unpow-174.8%

        \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
    8. Simplified74.8%

      \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
    9. Taylor expanded in F around -inf 92.7%

      \[\leadsto \color{blue}{\frac{-1}{\sin B}} - \frac{x}{\tan B} \]
    10. Taylor expanded in B around 0 49.5%

      \[\leadsto \color{blue}{-1 \cdot \frac{1 + x}{B}} \]
    11. Step-by-step derivation
      1. mul-1-neg49.5%

        \[\leadsto \color{blue}{-\frac{1 + x}{B}} \]
      2. distribute-neg-frac249.5%

        \[\leadsto \color{blue}{\frac{1 + x}{-B}} \]
    12. Simplified49.5%

      \[\leadsto \color{blue}{\frac{1 + x}{-B}} \]

    if -2.1999999999999999e-50 < F

    1. Initial program 85.6%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in B around 0 59.3%

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    4. Step-by-step derivation
      1. +-commutative59.3%

        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-\frac{x}{B}\right)} \]
      2. unsub-neg59.3%

        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \frac{x}{B}} \]
    5. Applied egg-rr62.0%

      \[\leadsto \color{blue}{\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - \frac{x}{B}} \]
    6. Taylor expanded in F around inf 49.7%

      \[\leadsto \frac{F}{\sin B \cdot \color{blue}{\left(F + 0.5 \cdot \frac{2 + 2 \cdot x}{F}\right)}} - \frac{x}{B} \]
    7. Taylor expanded in B around 0 39.8%

      \[\leadsto \color{blue}{\left(0.16666666666666666 \cdot \frac{B \cdot F}{F + 0.5 \cdot \frac{2 + 2 \cdot x}{F}} + \frac{F}{B \cdot \left(F + 0.5 \cdot \frac{2 + 2 \cdot x}{F}\right)}\right)} - \frac{x}{B} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification43.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -2.2 \cdot 10^{-50}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\left(0.16666666666666666 \cdot \frac{F \cdot B}{F + 0.5 \cdot \frac{2 + x \cdot 2}{F}} + \frac{F}{B \cdot \left(F + 0.5 \cdot \frac{2 + x \cdot 2}{F}\right)}\right) - \frac{x}{B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 25: 42.7% accurate, 14.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -6.9 \cdot 10^{-137}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{F}{F + 0.5 \cdot \frac{2 + x \cdot 2}{F}} - x}{B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (if (<= F -6.9e-137)
   (/ (- -1.0 x) B)
   (/ (- (/ F (+ F (* 0.5 (/ (+ 2.0 (* x 2.0)) F)))) x) B)))
double code(double F, double B, double x) {
	double tmp;
	if (F <= -6.9e-137) {
		tmp = (-1.0 - x) / B;
	} else {
		tmp = ((F / (F + (0.5 * ((2.0 + (x * 2.0)) / F)))) - x) / B;
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: tmp
    if (f <= (-6.9d-137)) then
        tmp = ((-1.0d0) - x) / b
    else
        tmp = ((f / (f + (0.5d0 * ((2.0d0 + (x * 2.0d0)) / f)))) - x) / b
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double tmp;
	if (F <= -6.9e-137) {
		tmp = (-1.0 - x) / B;
	} else {
		tmp = ((F / (F + (0.5 * ((2.0 + (x * 2.0)) / F)))) - x) / B;
	}
	return tmp;
}
def code(F, B, x):
	tmp = 0
	if F <= -6.9e-137:
		tmp = (-1.0 - x) / B
	else:
		tmp = ((F / (F + (0.5 * ((2.0 + (x * 2.0)) / F)))) - x) / B
	return tmp
function code(F, B, x)
	tmp = 0.0
	if (F <= -6.9e-137)
		tmp = Float64(Float64(-1.0 - x) / B);
	else
		tmp = Float64(Float64(Float64(F / Float64(F + Float64(0.5 * Float64(Float64(2.0 + Float64(x * 2.0)) / F)))) - x) / B);
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	tmp = 0.0;
	if (F <= -6.9e-137)
		tmp = (-1.0 - x) / B;
	else
		tmp = ((F / (F + (0.5 * ((2.0 + (x * 2.0)) / F)))) - x) / B;
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := If[LessEqual[F, -6.9e-137], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(N[(F / N[(F + N[(0.5 * N[(N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;F \leq -6.9 \cdot 10^{-137}:\\
\;\;\;\;\frac{-1 - x}{B}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + 0.5 \cdot \frac{2 + x \cdot 2}{F}} - x}{B}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if F < -6.89999999999999976e-137

    1. Initial program 68.2%

      \[\left(-x \cdot \frac{1}{\tan 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. distribute-lft-neg-in68.2%

        \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{1}{\tan B}} + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
      2. +-commutative68.2%

        \[\leadsto \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\right) \cdot \frac{1}{\tan B}} \]
      3. associate-*l/77.6%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} + \left(-x\right) \cdot \frac{1}{\tan B} \]
      4. associate-/l*77.6%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} + \left(-x\right) \cdot \frac{1}{\tan B} \]
      5. fma-define77.6%

        \[\leadsto \color{blue}{\mathsf{fma}\left(F, \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}, \left(-x\right) \cdot \frac{1}{\tan B}\right)} \]
      6. /-rgt-identity77.6%

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{F}{1}}, \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}, \left(-x\right) \cdot \frac{1}{\tan B}\right) \]
      7. remove-double-neg77.6%

        \[\leadsto \mathsf{fma}\left(\frac{F}{1}, \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}, \color{blue}{-\left(-\left(-x\right) \cdot \frac{1}{\tan B}\right)}\right) \]
      8. fma-neg77.6%

        \[\leadsto \color{blue}{\frac{F}{1} \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B} - \left(-\left(-x\right) \cdot \frac{1}{\tan B}\right)} \]
    3. Simplified77.7%

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num77.6%

        \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
      2. inv-pow77.6%

        \[\leadsto F \cdot \color{blue}{{\left(\frac{\sin B}{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}\right)}^{-1}} - \frac{x}{\tan B} \]
      3. fma-define77.6%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F + 2}\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      4. fma-undefine77.6%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\color{blue}{\left(x \cdot 2 + \left(F \cdot F + 2\right)\right)}}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      5. *-commutative77.6%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\color{blue}{2 \cdot x} + \left(F \cdot F + 2\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      6. fma-define77.6%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\color{blue}{\left(\mathsf{fma}\left(2, x, F \cdot F + 2\right)\right)}}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      7. fma-define77.6%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
    6. Applied egg-rr77.6%

      \[\leadsto F \cdot \color{blue}{{\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}\right)}^{-1}} - \frac{x}{\tan B} \]
    7. Step-by-step derivation
      1. unpow-177.6%

        \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
    8. Simplified77.6%

      \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
    9. Taylor expanded in F around -inf 85.5%

      \[\leadsto \color{blue}{\frac{-1}{\sin B}} - \frac{x}{\tan B} \]
    10. Taylor expanded in B around 0 45.4%

      \[\leadsto \color{blue}{-1 \cdot \frac{1 + x}{B}} \]
    11. Step-by-step derivation
      1. mul-1-neg45.4%

        \[\leadsto \color{blue}{-\frac{1 + x}{B}} \]
      2. distribute-neg-frac245.4%

        \[\leadsto \color{blue}{\frac{1 + x}{-B}} \]
    12. Simplified45.4%

      \[\leadsto \color{blue}{\frac{1 + x}{-B}} \]

    if -6.89999999999999976e-137 < F

    1. Initial program 84.5%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in B around 0 58.0%

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    4. Step-by-step derivation
      1. +-commutative58.0%

        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-\frac{x}{B}\right)} \]
      2. unsub-neg58.0%

        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} - \frac{x}{B}} \]
    5. Applied egg-rr61.0%

      \[\leadsto \color{blue}{\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - \frac{x}{B}} \]
    6. Taylor expanded in F around inf 52.6%

      \[\leadsto \frac{F}{\sin B \cdot \color{blue}{\left(F + 0.5 \cdot \frac{2 + 2 \cdot x}{F}\right)}} - \frac{x}{B} \]
    7. Taylor expanded in B around 0 41.6%

      \[\leadsto \color{blue}{\frac{\frac{F}{F + 0.5 \cdot \frac{2 + 2 \cdot x}{F}} - x}{B}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification43.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -6.9 \cdot 10^{-137}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{F}{F + 0.5 \cdot \frac{2 + x \cdot 2}{F}} - x}{B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 26: 43.2% accurate, 17.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -1.05 \cdot 10^{-50}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 4.2 \cdot 10^{-51}:\\ \;\;\;\;\frac{x}{-B}\\ \mathbf{else}:\\ \;\;\;\;B \cdot 0.16666666666666666 + \frac{1 - x}{B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (if (<= F -1.05e-50)
   (/ (- -1.0 x) B)
   (if (<= F 4.2e-51)
     (/ x (- B))
     (+ (* B 0.16666666666666666) (/ (- 1.0 x) B)))))
double code(double F, double B, double x) {
	double tmp;
	if (F <= -1.05e-50) {
		tmp = (-1.0 - x) / B;
	} else if (F <= 4.2e-51) {
		tmp = x / -B;
	} else {
		tmp = (B * 0.16666666666666666) + ((1.0 - x) / B);
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: tmp
    if (f <= (-1.05d-50)) then
        tmp = ((-1.0d0) - x) / b
    else if (f <= 4.2d-51) then
        tmp = x / -b
    else
        tmp = (b * 0.16666666666666666d0) + ((1.0d0 - x) / b)
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double tmp;
	if (F <= -1.05e-50) {
		tmp = (-1.0 - x) / B;
	} else if (F <= 4.2e-51) {
		tmp = x / -B;
	} else {
		tmp = (B * 0.16666666666666666) + ((1.0 - x) / B);
	}
	return tmp;
}
def code(F, B, x):
	tmp = 0
	if F <= -1.05e-50:
		tmp = (-1.0 - x) / B
	elif F <= 4.2e-51:
		tmp = x / -B
	else:
		tmp = (B * 0.16666666666666666) + ((1.0 - x) / B)
	return tmp
function code(F, B, x)
	tmp = 0.0
	if (F <= -1.05e-50)
		tmp = Float64(Float64(-1.0 - x) / B);
	elseif (F <= 4.2e-51)
		tmp = Float64(x / Float64(-B));
	else
		tmp = Float64(Float64(B * 0.16666666666666666) + Float64(Float64(1.0 - x) / B));
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	tmp = 0.0;
	if (F <= -1.05e-50)
		tmp = (-1.0 - x) / B;
	elseif (F <= 4.2e-51)
		tmp = x / -B;
	else
		tmp = (B * 0.16666666666666666) + ((1.0 - x) / B);
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := If[LessEqual[F, -1.05e-50], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 4.2e-51], N[(x / (-B)), $MachinePrecision], N[(N[(B * 0.16666666666666666), $MachinePrecision] + N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.05 \cdot 10^{-50}:\\
\;\;\;\;\frac{-1 - x}{B}\\

\mathbf{elif}\;F \leq 4.2 \cdot 10^{-51}:\\
\;\;\;\;\frac{x}{-B}\\

\mathbf{else}:\\
\;\;\;\;B \cdot 0.16666666666666666 + \frac{1 - x}{B}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if F < -1.05e-50

    1. Initial program 64.3%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Step-by-step derivation
      1. distribute-lft-neg-in64.3%

        \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{1}{\tan B}} + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
      2. +-commutative64.3%

        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x\right) \cdot \frac{1}{\tan B}} \]
      3. associate-*l/74.8%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} + \left(-x\right) \cdot \frac{1}{\tan B} \]
      4. associate-/l*74.8%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} + \left(-x\right) \cdot \frac{1}{\tan B} \]
      5. fma-define74.8%

        \[\leadsto \color{blue}{\mathsf{fma}\left(F, \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}, \left(-x\right) \cdot \frac{1}{\tan B}\right)} \]
      6. /-rgt-identity74.8%

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{F}{1}}, \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}, \left(-x\right) \cdot \frac{1}{\tan B}\right) \]
      7. remove-double-neg74.8%

        \[\leadsto \mathsf{fma}\left(\frac{F}{1}, \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}, \color{blue}{-\left(-\left(-x\right) \cdot \frac{1}{\tan B}\right)}\right) \]
      8. fma-neg74.8%

        \[\leadsto \color{blue}{\frac{F}{1} \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B} - \left(-\left(-x\right) \cdot \frac{1}{\tan B}\right)} \]
    3. Simplified74.9%

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num74.8%

        \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
      2. inv-pow74.8%

        \[\leadsto F \cdot \color{blue}{{\left(\frac{\sin B}{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}\right)}^{-1}} - \frac{x}{\tan B} \]
      3. fma-define74.8%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F + 2}\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      4. fma-undefine74.8%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\color{blue}{\left(x \cdot 2 + \left(F \cdot F + 2\right)\right)}}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      5. *-commutative74.8%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\color{blue}{2 \cdot x} + \left(F \cdot F + 2\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      6. fma-define74.8%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\color{blue}{\left(\mathsf{fma}\left(2, x, F \cdot F + 2\right)\right)}}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      7. fma-define74.8%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
    6. Applied egg-rr74.8%

      \[\leadsto F \cdot \color{blue}{{\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}\right)}^{-1}} - \frac{x}{\tan B} \]
    7. Step-by-step derivation
      1. unpow-174.8%

        \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
    8. Simplified74.8%

      \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
    9. Taylor expanded in F around -inf 92.7%

      \[\leadsto \color{blue}{\frac{-1}{\sin B}} - \frac{x}{\tan B} \]
    10. Taylor expanded in B around 0 49.5%

      \[\leadsto \color{blue}{-1 \cdot \frac{1 + x}{B}} \]
    11. Step-by-step derivation
      1. mul-1-neg49.5%

        \[\leadsto \color{blue}{-\frac{1 + x}{B}} \]
      2. distribute-neg-frac249.5%

        \[\leadsto \color{blue}{\frac{1 + x}{-B}} \]
    12. Simplified49.5%

      \[\leadsto \color{blue}{\frac{1 + x}{-B}} \]

    if -1.05e-50 < F < 4.20000000000000003e-51

    1. Initial program 99.4%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in B around 0 69.1%

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    4. Taylor expanded in x around inf 36.1%

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{B}} \]
    5. Step-by-step derivation
      1. mul-1-neg36.1%

        \[\leadsto \color{blue}{-\frac{x}{B}} \]
      2. distribute-neg-frac236.1%

        \[\leadsto \color{blue}{\frac{x}{-B}} \]
    6. Simplified36.1%

      \[\leadsto \color{blue}{\frac{x}{-B}} \]

    if 4.20000000000000003e-51 < F

    1. Initial program 65.7%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in B around 0 45.1%

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    4. Taylor expanded in F around inf 54.8%

      \[\leadsto \left(-\frac{x}{B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\frac{1}{F}} \]
    5. Taylor expanded in B around 0 44.8%

      \[\leadsto \color{blue}{\left(0.16666666666666666 \cdot B + \frac{1}{B}\right) - \frac{x}{B}} \]
    6. Step-by-step derivation
      1. associate--l+44.8%

        \[\leadsto \color{blue}{0.16666666666666666 \cdot B + \left(\frac{1}{B} - \frac{x}{B}\right)} \]
      2. *-commutative44.8%

        \[\leadsto \color{blue}{B \cdot 0.16666666666666666} + \left(\frac{1}{B} - \frac{x}{B}\right) \]
      3. div-sub44.8%

        \[\leadsto B \cdot 0.16666666666666666 + \color{blue}{\frac{1 - x}{B}} \]
    7. Simplified44.8%

      \[\leadsto \color{blue}{B \cdot 0.16666666666666666 + \frac{1 - x}{B}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification43.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1.05 \cdot 10^{-50}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 4.2 \cdot 10^{-51}:\\ \;\;\;\;\frac{x}{-B}\\ \mathbf{else}:\\ \;\;\;\;B \cdot 0.16666666666666666 + \frac{1 - x}{B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 27: 43.0% accurate, 19.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -2.2 \cdot 10^{-51}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 2.4 \cdot 10^{-85}:\\ \;\;\;\;\frac{x}{-B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - \frac{x}{B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (if (<= F -2.2e-51)
   (/ (- -1.0 x) B)
   (if (<= F 2.4e-85) (/ x (- B)) (- (/ 1.0 B) (/ x B)))))
double code(double F, double B, double x) {
	double tmp;
	if (F <= -2.2e-51) {
		tmp = (-1.0 - x) / B;
	} else if (F <= 2.4e-85) {
		tmp = x / -B;
	} else {
		tmp = (1.0 / B) - (x / B);
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: tmp
    if (f <= (-2.2d-51)) then
        tmp = ((-1.0d0) - x) / b
    else if (f <= 2.4d-85) then
        tmp = x / -b
    else
        tmp = (1.0d0 / b) - (x / b)
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double tmp;
	if (F <= -2.2e-51) {
		tmp = (-1.0 - x) / B;
	} else if (F <= 2.4e-85) {
		tmp = x / -B;
	} else {
		tmp = (1.0 / B) - (x / B);
	}
	return tmp;
}
def code(F, B, x):
	tmp = 0
	if F <= -2.2e-51:
		tmp = (-1.0 - x) / B
	elif F <= 2.4e-85:
		tmp = x / -B
	else:
		tmp = (1.0 / B) - (x / B)
	return tmp
function code(F, B, x)
	tmp = 0.0
	if (F <= -2.2e-51)
		tmp = Float64(Float64(-1.0 - x) / B);
	elseif (F <= 2.4e-85)
		tmp = Float64(x / Float64(-B));
	else
		tmp = Float64(Float64(1.0 / B) - Float64(x / B));
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	tmp = 0.0;
	if (F <= -2.2e-51)
		tmp = (-1.0 - x) / B;
	elseif (F <= 2.4e-85)
		tmp = x / -B;
	else
		tmp = (1.0 / B) - (x / B);
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := If[LessEqual[F, -2.2e-51], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2.4e-85], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.2 \cdot 10^{-51}:\\
\;\;\;\;\frac{-1 - x}{B}\\

\mathbf{elif}\;F \leq 2.4 \cdot 10^{-85}:\\
\;\;\;\;\frac{x}{-B}\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{B}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if F < -2.2e-51

    1. Initial program 64.3%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Step-by-step derivation
      1. distribute-lft-neg-in64.3%

        \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{1}{\tan B}} + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
      2. +-commutative64.3%

        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x\right) \cdot \frac{1}{\tan B}} \]
      3. associate-*l/74.8%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} + \left(-x\right) \cdot \frac{1}{\tan B} \]
      4. associate-/l*74.8%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} + \left(-x\right) \cdot \frac{1}{\tan B} \]
      5. fma-define74.8%

        \[\leadsto \color{blue}{\mathsf{fma}\left(F, \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}, \left(-x\right) \cdot \frac{1}{\tan B}\right)} \]
      6. /-rgt-identity74.8%

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{F}{1}}, \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}, \left(-x\right) \cdot \frac{1}{\tan B}\right) \]
      7. remove-double-neg74.8%

        \[\leadsto \mathsf{fma}\left(\frac{F}{1}, \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}, \color{blue}{-\left(-\left(-x\right) \cdot \frac{1}{\tan B}\right)}\right) \]
      8. fma-neg74.8%

        \[\leadsto \color{blue}{\frac{F}{1} \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B} - \left(-\left(-x\right) \cdot \frac{1}{\tan B}\right)} \]
    3. Simplified74.9%

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num74.8%

        \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
      2. inv-pow74.8%

        \[\leadsto F \cdot \color{blue}{{\left(\frac{\sin B}{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}\right)}^{-1}} - \frac{x}{\tan B} \]
      3. fma-define74.8%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F + 2}\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      4. fma-undefine74.8%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\color{blue}{\left(x \cdot 2 + \left(F \cdot F + 2\right)\right)}}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      5. *-commutative74.8%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\color{blue}{2 \cdot x} + \left(F \cdot F + 2\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      6. fma-define74.8%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\color{blue}{\left(\mathsf{fma}\left(2, x, F \cdot F + 2\right)\right)}}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      7. fma-define74.8%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
    6. Applied egg-rr74.8%

      \[\leadsto F \cdot \color{blue}{{\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}\right)}^{-1}} - \frac{x}{\tan B} \]
    7. Step-by-step derivation
      1. unpow-174.8%

        \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
    8. Simplified74.8%

      \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
    9. Taylor expanded in F around -inf 92.7%

      \[\leadsto \color{blue}{\frac{-1}{\sin B}} - \frac{x}{\tan B} \]
    10. Taylor expanded in B around 0 49.5%

      \[\leadsto \color{blue}{-1 \cdot \frac{1 + x}{B}} \]
    11. Step-by-step derivation
      1. mul-1-neg49.5%

        \[\leadsto \color{blue}{-\frac{1 + x}{B}} \]
      2. distribute-neg-frac249.5%

        \[\leadsto \color{blue}{\frac{1 + x}{-B}} \]
    12. Simplified49.5%

      \[\leadsto \color{blue}{\frac{1 + x}{-B}} \]

    if -2.2e-51 < F < 2.4000000000000001e-85

    1. Initial program 99.4%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in B around 0 68.4%

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    4. Taylor expanded in x around inf 39.0%

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{B}} \]
    5. Step-by-step derivation
      1. mul-1-neg39.0%

        \[\leadsto \color{blue}{-\frac{x}{B}} \]
      2. distribute-neg-frac239.0%

        \[\leadsto \color{blue}{\frac{x}{-B}} \]
    6. Simplified39.0%

      \[\leadsto \color{blue}{\frac{x}{-B}} \]

    if 2.4000000000000001e-85 < F

    1. Initial program 69.4%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in B around 0 48.5%

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    4. Taylor expanded in F around inf 49.6%

      \[\leadsto \left(-\frac{x}{B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\frac{1}{F}} \]
    5. Taylor expanded in B around 0 40.1%

      \[\leadsto \color{blue}{\frac{1 - x}{B}} \]
    6. Step-by-step derivation
      1. div-sub40.1%

        \[\leadsto \color{blue}{\frac{1}{B} - \frac{x}{B}} \]
    7. Applied egg-rr40.1%

      \[\leadsto \color{blue}{\frac{1}{B} - \frac{x}{B}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification43.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -2.2 \cdot 10^{-51}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 2.4 \cdot 10^{-85}:\\ \;\;\;\;\frac{x}{-B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - \frac{x}{B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 28: 43.0% accurate, 21.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -1.25 \cdot 10^{-50}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 2.9 \cdot 10^{-85}:\\ \;\;\;\;\frac{x}{-B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (if (<= F -1.25e-50)
   (/ (- -1.0 x) B)
   (if (<= F 2.9e-85) (/ x (- B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
	double tmp;
	if (F <= -1.25e-50) {
		tmp = (-1.0 - x) / B;
	} else if (F <= 2.9e-85) {
		tmp = x / -B;
	} else {
		tmp = (1.0 - x) / B;
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: tmp
    if (f <= (-1.25d-50)) then
        tmp = ((-1.0d0) - x) / b
    else if (f <= 2.9d-85) then
        tmp = 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 <= -1.25e-50) {
		tmp = (-1.0 - x) / B;
	} else if (F <= 2.9e-85) {
		tmp = x / -B;
	} else {
		tmp = (1.0 - x) / B;
	}
	return tmp;
}
def code(F, B, x):
	tmp = 0
	if F <= -1.25e-50:
		tmp = (-1.0 - x) / B
	elif F <= 2.9e-85:
		tmp = x / -B
	else:
		tmp = (1.0 - x) / B
	return tmp
function code(F, B, x)
	tmp = 0.0
	if (F <= -1.25e-50)
		tmp = Float64(Float64(-1.0 - x) / B);
	elseif (F <= 2.9e-85)
		tmp = Float64(x / Float64(-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 <= -1.25e-50)
		tmp = (-1.0 - x) / B;
	elseif (F <= 2.9e-85)
		tmp = x / -B;
	else
		tmp = (1.0 - x) / B;
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := If[LessEqual[F, -1.25e-50], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2.9e-85], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.25 \cdot 10^{-50}:\\
\;\;\;\;\frac{-1 - x}{B}\\

\mathbf{elif}\;F \leq 2.9 \cdot 10^{-85}:\\
\;\;\;\;\frac{x}{-B}\\

\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if F < -1.24999999999999992e-50

    1. Initial program 64.3%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Step-by-step derivation
      1. distribute-lft-neg-in64.3%

        \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{1}{\tan B}} + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
      2. +-commutative64.3%

        \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} + \left(-x\right) \cdot \frac{1}{\tan B}} \]
      3. associate-*l/74.8%

        \[\leadsto \color{blue}{\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} + \left(-x\right) \cdot \frac{1}{\tan B} \]
      4. associate-/l*74.8%

        \[\leadsto \color{blue}{F \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}} + \left(-x\right) \cdot \frac{1}{\tan B} \]
      5. fma-define74.8%

        \[\leadsto \color{blue}{\mathsf{fma}\left(F, \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}, \left(-x\right) \cdot \frac{1}{\tan B}\right)} \]
      6. /-rgt-identity74.8%

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{F}{1}}, \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}, \left(-x\right) \cdot \frac{1}{\tan B}\right) \]
      7. remove-double-neg74.8%

        \[\leadsto \mathsf{fma}\left(\frac{F}{1}, \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B}, \color{blue}{-\left(-\left(-x\right) \cdot \frac{1}{\tan B}\right)}\right) \]
      8. fma-neg74.8%

        \[\leadsto \color{blue}{\frac{F}{1} \cdot \frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}}{\sin B} - \left(-\left(-x\right) \cdot \frac{1}{\tan B}\right)} \]
    3. Simplified74.9%

      \[\leadsto \color{blue}{F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num74.8%

        \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
      2. inv-pow74.8%

        \[\leadsto F \cdot \color{blue}{{\left(\frac{\sin B}{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}\right)}^{-1}} - \frac{x}{\tan B} \]
      3. fma-define74.8%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\mathsf{fma}\left(x, 2, \color{blue}{F \cdot F + 2}\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      4. fma-undefine74.8%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\color{blue}{\left(x \cdot 2 + \left(F \cdot F + 2\right)\right)}}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      5. *-commutative74.8%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\color{blue}{2 \cdot x} + \left(F \cdot F + 2\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      6. fma-define74.8%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\color{blue}{\left(\mathsf{fma}\left(2, x, F \cdot F + 2\right)\right)}}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
      7. fma-define74.8%

        \[\leadsto F \cdot {\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \color{blue}{\mathsf{fma}\left(F, F, 2\right)}\right)\right)}^{-0.5}}\right)}^{-1} - \frac{x}{\tan B} \]
    6. Applied egg-rr74.8%

      \[\leadsto F \cdot \color{blue}{{\left(\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}\right)}^{-1}} - \frac{x}{\tan B} \]
    7. Step-by-step derivation
      1. unpow-174.8%

        \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
    8. Simplified74.8%

      \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}}} - \frac{x}{\tan B} \]
    9. Taylor expanded in F around -inf 92.7%

      \[\leadsto \color{blue}{\frac{-1}{\sin B}} - \frac{x}{\tan B} \]
    10. Taylor expanded in B around 0 49.5%

      \[\leadsto \color{blue}{-1 \cdot \frac{1 + x}{B}} \]
    11. Step-by-step derivation
      1. mul-1-neg49.5%

        \[\leadsto \color{blue}{-\frac{1 + x}{B}} \]
      2. distribute-neg-frac249.5%

        \[\leadsto \color{blue}{\frac{1 + x}{-B}} \]
    12. Simplified49.5%

      \[\leadsto \color{blue}{\frac{1 + x}{-B}} \]

    if -1.24999999999999992e-50 < F < 2.9000000000000002e-85

    1. Initial program 99.4%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in B around 0 68.4%

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    4. Taylor expanded in x around inf 39.0%

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{B}} \]
    5. Step-by-step derivation
      1. mul-1-neg39.0%

        \[\leadsto \color{blue}{-\frac{x}{B}} \]
      2. distribute-neg-frac239.0%

        \[\leadsto \color{blue}{\frac{x}{-B}} \]
    6. Simplified39.0%

      \[\leadsto \color{blue}{\frac{x}{-B}} \]

    if 2.9000000000000002e-85 < F

    1. Initial program 69.4%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in B around 0 48.5%

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    4. Taylor expanded in F around inf 49.6%

      \[\leadsto \left(-\frac{x}{B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\frac{1}{F}} \]
    5. Taylor expanded in B around 0 40.1%

      \[\leadsto \color{blue}{\frac{1 - x}{B}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification43.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1.25 \cdot 10^{-50}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 2.9 \cdot 10^{-85}:\\ \;\;\;\;\frac{x}{-B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 29: 35.9% accurate, 32.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq 10^{-82}:\\ \;\;\;\;\frac{x}{-B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (if (<= F 1e-82) (/ x (- B)) (/ (- 1.0 x) B)))
double code(double F, double B, double x) {
	double tmp;
	if (F <= 1e-82) {
		tmp = x / -B;
	} else {
		tmp = (1.0 - x) / B;
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: tmp
    if (f <= 1d-82) then
        tmp = 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 <= 1e-82) {
		tmp = x / -B;
	} else {
		tmp = (1.0 - x) / B;
	}
	return tmp;
}
def code(F, B, x):
	tmp = 0
	if F <= 1e-82:
		tmp = x / -B
	else:
		tmp = (1.0 - x) / B
	return tmp
function code(F, B, x)
	tmp = 0.0
	if (F <= 1e-82)
		tmp = Float64(x / Float64(-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 <= 1e-82)
		tmp = x / -B;
	else
		tmp = (1.0 - x) / B;
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := If[LessEqual[F, 1e-82], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;F \leq 10^{-82}:\\
\;\;\;\;\frac{x}{-B}\\

\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if F < 1e-82

    1. Initial program 81.1%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in B around 0 54.3%

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    4. Taylor expanded in x around inf 31.6%

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{B}} \]
    5. Step-by-step derivation
      1. mul-1-neg31.6%

        \[\leadsto \color{blue}{-\frac{x}{B}} \]
      2. distribute-neg-frac231.6%

        \[\leadsto \color{blue}{\frac{x}{-B}} \]
    6. Simplified31.6%

      \[\leadsto \color{blue}{\frac{x}{-B}} \]

    if 1e-82 < F

    1. Initial program 69.4%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in B around 0 48.5%

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    4. Taylor expanded in F around inf 49.6%

      \[\leadsto \left(-\frac{x}{B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\frac{1}{F}} \]
    5. Taylor expanded in B around 0 40.1%

      \[\leadsto \color{blue}{\frac{1 - x}{B}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification34.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq 10^{-82}:\\ \;\;\;\;\frac{x}{-B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 30: 29.6% accurate, 35.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq 1500000:\\ \;\;\;\;\frac{x}{-B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (if (<= F 1500000.0) (/ x (- B)) (/ 1.0 B)))
double code(double F, double B, double x) {
	double tmp;
	if (F <= 1500000.0) {
		tmp = x / -B;
	} else {
		tmp = 1.0 / B;
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: tmp
    if (f <= 1500000.0d0) then
        tmp = 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 <= 1500000.0) {
		tmp = x / -B;
	} else {
		tmp = 1.0 / B;
	}
	return tmp;
}
def code(F, B, x):
	tmp = 0
	if F <= 1500000.0:
		tmp = x / -B
	else:
		tmp = 1.0 / B
	return tmp
function code(F, B, x)
	tmp = 0.0
	if (F <= 1500000.0)
		tmp = Float64(x / Float64(-B));
	else
		tmp = Float64(1.0 / B);
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	tmp = 0.0;
	if (F <= 1500000.0)
		tmp = x / -B;
	else
		tmp = 1.0 / B;
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := If[LessEqual[F, 1500000.0], N[(x / (-B)), $MachinePrecision], N[(1.0 / B), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;F \leq 1500000:\\
\;\;\;\;\frac{x}{-B}\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{B}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if F < 1.5e6

    1. Initial program 82.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. Add Preprocessing
    3. Taylor expanded in B around 0 57.2%

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    4. Taylor expanded in x around inf 30.5%

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{B}} \]
    5. Step-by-step derivation
      1. mul-1-neg30.5%

        \[\leadsto \color{blue}{-\frac{x}{B}} \]
      2. distribute-neg-frac230.5%

        \[\leadsto \color{blue}{\frac{x}{-B}} \]
    6. Simplified30.5%

      \[\leadsto \color{blue}{\frac{x}{-B}} \]

    if 1.5e6 < F

    1. Initial program 59.0%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in B around 0 36.1%

      \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    4. Taylor expanded in F around inf 59.1%

      \[\leadsto \left(-\frac{x}{B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\frac{1}{F}} \]
    5. Taylor expanded in B around 0 46.9%

      \[\leadsto \color{blue}{\frac{1 - x}{B}} \]
    6. Taylor expanded in x around 0 33.2%

      \[\leadsto \color{blue}{\frac{1}{B}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification31.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq 1500000:\\ \;\;\;\;\frac{x}{-B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 31: 10.0% accurate, 108.0× speedup?

\[\begin{array}{l} \\ \frac{1}{B} \end{array} \]
(FPCore (F B x) :precision binary64 (/ 1.0 B))
double code(double F, double B, double x) {
	return 1.0 / B;
}
real(8) function code(f, b, x)
    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]
\begin{array}{l}

\\
\frac{1}{B}
\end{array}
Derivation
  1. Initial program 77.7%

    \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
  2. Add Preprocessing
  3. Taylor expanded in B around 0 52.6%

    \[\leadsto \left(-\color{blue}{\frac{x}{B}}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
  4. Taylor expanded in F around inf 27.9%

    \[\leadsto \left(-\frac{x}{B}\right) + \frac{F}{\sin B} \cdot \color{blue}{\frac{1}{F}} \]
  5. Taylor expanded in B around 0 28.6%

    \[\leadsto \color{blue}{\frac{1 - x}{B}} \]
  6. Taylor expanded in x around 0 9.3%

    \[\leadsto \color{blue}{\frac{1}{B}} \]
  7. Final simplification9.3%

    \[\leadsto \frac{1}{B} \]
  8. Add Preprocessing

Reproduce

?
herbie shell --seed 2024050 
(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))))))