VandenBroeck and Keller, Equation (23)

Percentage Accurate: 76.9% → 95.6%
Time: 16.8s
Alternatives: 23
Speedup: 1.5×

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

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

Initial Program: 76.9% 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: 95.6% accurate, 0.8× speedup?

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

\mathbf{elif}\;F \leq 2.4 \cdot 10^{-22}:\\
\;\;\;\;\frac{F}{\frac{\sin B}{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-0.5}}} - 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.02e214

    1. Initial program 32.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. Simplified42.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}} \]
    3. Add Preprocessing
    4. Taylor expanded in F around -inf 99.9%

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

    if -1.02e214 < F < 2.40000000000000002e-22

    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. Simplified99.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}} \]
    3. Add Preprocessing
    4. Taylor expanded in x around 0 99.0%

      \[\leadsto F \cdot \color{blue}{\left(\frac{1}{\sin B} \cdot \sqrt{\frac{1}{2 + {F}^{2}}}\right)} - \frac{x}{\tan B} \]
    5. Step-by-step derivation
      1. associate-*l/99.0%

        \[\leadsto F \cdot \color{blue}{\frac{1 \cdot \sqrt{\frac{1}{2 + {F}^{2}}}}{\sin B}} - \frac{x}{\tan B} \]
      2. *-lft-identity99.0%

        \[\leadsto F \cdot \frac{\color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}}}{\sin B} - \frac{x}{\tan B} \]
      3. +-commutative99.0%

        \[\leadsto F \cdot \frac{\sqrt{\frac{1}{\color{blue}{{F}^{2} + 2}}}}{\sin B} - \frac{x}{\tan B} \]
      4. unpow299.0%

        \[\leadsto F \cdot \frac{\sqrt{\frac{1}{\color{blue}{F \cdot F} + 2}}}{\sin B} - \frac{x}{\tan B} \]
      5. fma-undefine99.0%

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

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

        \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}}} - \frac{x}{\tan B} \]
      2. un-div-inv99.0%

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

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

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

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

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

    if 2.40000000000000002e-22 < F

    1. Initial program 60.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. Simplified68.4%

      \[\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}} \]
    3. Add Preprocessing
    4. Taylor expanded in x around 0 68.5%

      \[\leadsto F \cdot \color{blue}{\left(\frac{1}{\sin B} \cdot \sqrt{\frac{1}{2 + {F}^{2}}}\right)} - \frac{x}{\tan B} \]
    5. Step-by-step derivation
      1. associate-*l/68.5%

        \[\leadsto F \cdot \color{blue}{\frac{1 \cdot \sqrt{\frac{1}{2 + {F}^{2}}}}{\sin B}} - \frac{x}{\tan B} \]
      2. *-lft-identity68.5%

        \[\leadsto F \cdot \frac{\color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}}}{\sin B} - \frac{x}{\tan B} \]
      3. +-commutative68.5%

        \[\leadsto F \cdot \frac{\sqrt{\frac{1}{\color{blue}{{F}^{2} + 2}}}}{\sin B} - \frac{x}{\tan B} \]
      4. unpow268.5%

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

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

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

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

Alternative 2: 95.6% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -1.02 \cdot 10^{+214}:\\ \;\;\;\;F \cdot \frac{-1}{F \cdot \sin B} - t\_0\\ \mathbf{elif}\;F \leq 2.4 \cdot 10^{-22}:\\ \;\;\;\;\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(F, F, 2\right)}} - 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.02e+214)
     (- (* F (/ -1.0 (* F (sin B)))) t_0)
     (if (<= F 2.4e-22)
       (- (/ F (* (sin B) (sqrt (fma F F 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.02e+214) {
		tmp = (F * (-1.0 / (F * sin(B)))) - t_0;
	} else if (F <= 2.4e-22) {
		tmp = (F / (sin(B) * sqrt(fma(F, F, 2.0)))) - 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 <= -1.02e+214)
		tmp = Float64(Float64(F * Float64(-1.0 / Float64(F * sin(B)))) - t_0);
	elseif (F <= 2.4e-22)
		tmp = Float64(Float64(F / Float64(sin(B) * sqrt(fma(F, F, 2.0)))) - 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, -1.02e+214], N[(N[(F * N[(-1.0 / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 2.4e-22], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[N[(F * F + 2.0), $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.02 \cdot 10^{+214}:\\
\;\;\;\;F \cdot \frac{-1}{F \cdot \sin B} - t\_0\\

\mathbf{elif}\;F \leq 2.4 \cdot 10^{-22}:\\
\;\;\;\;\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(F, F, 2\right)}} - 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.02e214

    1. Initial program 32.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. Simplified42.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}} \]
    3. Add Preprocessing
    4. Taylor expanded in F around -inf 99.9%

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

    if -1.02e214 < F < 2.40000000000000002e-22

    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. Simplified99.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}} \]
    3. Add Preprocessing
    4. Taylor expanded in x around 0 99.0%

      \[\leadsto F \cdot \color{blue}{\left(\frac{1}{\sin B} \cdot \sqrt{\frac{1}{2 + {F}^{2}}}\right)} - \frac{x}{\tan B} \]
    5. Step-by-step derivation
      1. associate-*l/99.0%

        \[\leadsto F \cdot \color{blue}{\frac{1 \cdot \sqrt{\frac{1}{2 + {F}^{2}}}}{\sin B}} - \frac{x}{\tan B} \]
      2. *-lft-identity99.0%

        \[\leadsto F \cdot \frac{\color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}}}{\sin B} - \frac{x}{\tan B} \]
      3. +-commutative99.0%

        \[\leadsto F \cdot \frac{\sqrt{\frac{1}{\color{blue}{{F}^{2} + 2}}}}{\sin B} - \frac{x}{\tan B} \]
      4. unpow299.0%

        \[\leadsto F \cdot \frac{\sqrt{\frac{1}{\color{blue}{F \cdot F} + 2}}}{\sin B} - \frac{x}{\tan B} \]
      5. fma-undefine99.0%

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

      \[\leadsto F \cdot \color{blue}{\frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B}} - \frac{x}{\tan B} \]
    7. Step-by-step derivation
      1. associate-*r/99.0%

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

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

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

        \[\leadsto \frac{1}{\frac{\sin B}{F \cdot \frac{\color{blue}{1}}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}}}} - \frac{x}{\tan B} \]
      5. un-div-inv99.0%

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

      \[\leadsto \color{blue}{\frac{1}{\frac{\sin B}{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}}}}} - \frac{x}{\tan B} \]
    9. Step-by-step derivation
      1. associate-/r/99.0%

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

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

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

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

    if 2.40000000000000002e-22 < F

    1. Initial program 60.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. Simplified68.4%

      \[\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}} \]
    3. Add Preprocessing
    4. Taylor expanded in x around 0 68.5%

      \[\leadsto F \cdot \color{blue}{\left(\frac{1}{\sin B} \cdot \sqrt{\frac{1}{2 + {F}^{2}}}\right)} - \frac{x}{\tan B} \]
    5. Step-by-step derivation
      1. associate-*l/68.5%

        \[\leadsto F \cdot \color{blue}{\frac{1 \cdot \sqrt{\frac{1}{2 + {F}^{2}}}}{\sin B}} - \frac{x}{\tan B} \]
      2. *-lft-identity68.5%

        \[\leadsto F \cdot \frac{\color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}}}{\sin B} - \frac{x}{\tan B} \]
      3. +-commutative68.5%

        \[\leadsto F \cdot \frac{\sqrt{\frac{1}{\color{blue}{{F}^{2} + 2}}}}{\sin B} - \frac{x}{\tan B} \]
      4. unpow268.5%

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

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

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

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

Alternative 3: 96.1% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -1.7 \cdot 10^{+142}:\\ \;\;\;\;F \cdot \frac{-1}{F \cdot \sin B} - t\_0\\ \mathbf{elif}\;F \leq 1.33 \cdot 10^{-46}:\\ \;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \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 -1.7e+142)
     (- (* F (/ -1.0 (* F (sin B)))) t_0)
     (if (<= F 1.33e-46)
       (+
        (/ -1.0 (/ (tan B) x))
        (* (/ 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 <= -1.7e+142) {
		tmp = (F * (-1.0 / (F * sin(B)))) - t_0;
	} else if (F <= 1.33e-46) {
		tmp = (-1.0 / (tan(B) / x)) + ((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 <= (-1.7d+142)) then
        tmp = (f * ((-1.0d0) / (f * sin(b)))) - t_0
    else if (f <= 1.33d-46) then
        tmp = ((-1.0d0) / (tan(b) / x)) + ((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 <= -1.7e+142) {
		tmp = (F * (-1.0 / (F * Math.sin(B)))) - t_0;
	} else if (F <= 1.33e-46) {
		tmp = (-1.0 / (Math.tan(B) / x)) + ((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 <= -1.7e+142:
		tmp = (F * (-1.0 / (F * math.sin(B)))) - t_0
	elif F <= 1.33e-46:
		tmp = (-1.0 / (math.tan(B) / x)) + ((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 <= -1.7e+142)
		tmp = Float64(Float64(F * Float64(-1.0 / Float64(F * sin(B)))) - t_0);
	elseif (F <= 1.33e-46)
		tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + 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 <= -1.7e+142)
		tmp = (F * (-1.0 / (F * sin(B)))) - t_0;
	elseif (F <= 1.33e-46)
		tmp = (-1.0 / (tan(B) / x)) + ((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, -1.7e+142], N[(N[(F * N[(-1.0 / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.33e-46], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $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 -1.7 \cdot 10^{+142}:\\
\;\;\;\;F \cdot \frac{-1}{F \cdot \sin B} - t\_0\\

\mathbf{elif}\;F \leq 1.33 \cdot 10^{-46}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \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.6999999999999999e142

    1. Initial program 48.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. Simplified60.4%

      \[\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}} \]
    3. Add Preprocessing
    4. Taylor expanded in F around -inf 99.9%

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

    if -1.6999999999999999e142 < F < 1.33000000000000008e-46

    1. Initial program 98.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. Step-by-step derivation
      1. div-inv98.3%

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

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

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

    if 1.33000000000000008e-46 < F

    1. Initial program 61.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. Simplified68.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}} \]
    3. Add Preprocessing
    4. Taylor expanded in x around 0 68.9%

      \[\leadsto F \cdot \color{blue}{\left(\frac{1}{\sin B} \cdot \sqrt{\frac{1}{2 + {F}^{2}}}\right)} - \frac{x}{\tan B} \]
    5. Step-by-step derivation
      1. associate-*l/68.9%

        \[\leadsto F \cdot \color{blue}{\frac{1 \cdot \sqrt{\frac{1}{2 + {F}^{2}}}}{\sin B}} - \frac{x}{\tan B} \]
      2. *-lft-identity68.9%

        \[\leadsto F \cdot \frac{\color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}}}{\sin B} - \frac{x}{\tan B} \]
      3. +-commutative68.9%

        \[\leadsto F \cdot \frac{\sqrt{\frac{1}{\color{blue}{{F}^{2} + 2}}}}{\sin B} - \frac{x}{\tan B} \]
      4. unpow268.9%

        \[\leadsto F \cdot \frac{\sqrt{\frac{1}{\color{blue}{F \cdot F} + 2}}}{\sin B} - \frac{x}{\tan B} \]
      5. fma-undefine68.9%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1.7 \cdot 10^{+142}:\\ \;\;\;\;F \cdot \frac{-1}{F \cdot \sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 1.33 \cdot 10^{-46}:\\ \;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \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 4: 96.1% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -1.52 \cdot 10^{+142}:\\ \;\;\;\;F \cdot \frac{-1}{F \cdot \sin B} - t\_0\\ \mathbf{elif}\;F \leq 1.33 \cdot 10^{-46}:\\ \;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} + x \cdot \frac{-1}{\tan 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 -1.52e+142)
     (- (* F (/ -1.0 (* F (sin B)))) t_0)
     (if (<= F 1.33e-46)
       (+
        (* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
        (* x (/ -1.0 (tan 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 <= -1.52e+142) {
		tmp = (F * (-1.0 / (F * sin(B)))) - t_0;
	} else if (F <= 1.33e-46) {
		tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (x * (-1.0 / tan(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 <= (-1.52d+142)) then
        tmp = (f * ((-1.0d0) / (f * sin(b)))) - t_0
    else if (f <= 1.33d-46) then
        tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) + (x * ((-1.0d0) / tan(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 <= -1.52e+142) {
		tmp = (F * (-1.0 / (F * Math.sin(B)))) - t_0;
	} else if (F <= 1.33e-46) {
		tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (x * (-1.0 / Math.tan(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 <= -1.52e+142:
		tmp = (F * (-1.0 / (F * math.sin(B)))) - t_0
	elif F <= 1.33e-46:
		tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (x * (-1.0 / math.tan(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 <= -1.52e+142)
		tmp = Float64(Float64(F * Float64(-1.0 / Float64(F * sin(B)))) - t_0);
	elseif (F <= 1.33e-46)
		tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) + Float64(x * Float64(-1.0 / tan(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 <= -1.52e+142)
		tmp = (F * (-1.0 / (F * sin(B)))) - t_0;
	elseif (F <= 1.33e-46)
		tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) + (x * (-1.0 / tan(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, -1.52e+142], N[(N[(F * N[(-1.0 / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.33e-46], 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 * N[(-1.0 / N[Tan[B], $MachinePrecision]), $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 -1.52 \cdot 10^{+142}:\\
\;\;\;\;F \cdot \frac{-1}{F \cdot \sin B} - t\_0\\

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

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


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

    1. Initial program 48.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. Simplified60.4%

      \[\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}} \]
    3. Add Preprocessing
    4. Taylor expanded in F around -inf 99.9%

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

    if -1.5199999999999999e142 < F < 1.33000000000000008e-46

    1. Initial program 98.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

    if 1.33000000000000008e-46 < F

    1. Initial program 61.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. Simplified68.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}} \]
    3. Add Preprocessing
    4. Taylor expanded in x around 0 68.9%

      \[\leadsto F \cdot \color{blue}{\left(\frac{1}{\sin B} \cdot \sqrt{\frac{1}{2 + {F}^{2}}}\right)} - \frac{x}{\tan B} \]
    5. Step-by-step derivation
      1. associate-*l/68.9%

        \[\leadsto F \cdot \color{blue}{\frac{1 \cdot \sqrt{\frac{1}{2 + {F}^{2}}}}{\sin B}} - \frac{x}{\tan B} \]
      2. *-lft-identity68.9%

        \[\leadsto F \cdot \frac{\color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}}}{\sin B} - \frac{x}{\tan B} \]
      3. +-commutative68.9%

        \[\leadsto F \cdot \frac{\sqrt{\frac{1}{\color{blue}{{F}^{2} + 2}}}}{\sin B} - \frac{x}{\tan B} \]
      4. unpow268.9%

        \[\leadsto F \cdot \frac{\sqrt{\frac{1}{\color{blue}{F \cdot F} + 2}}}{\sin B} - \frac{x}{\tan B} \]
      5. fma-undefine68.9%

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

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

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

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

Alternative 5: 96.3% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_0 := \frac{1}{\sin B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -260000000000:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\

\mathbf{elif}\;F \leq 7.8 \cdot 10^{-53}:\\
\;\;\;\;F \cdot \left(t\_0 \cdot \sqrt{\frac{1}{2 + x \cdot 2}}\right) - t\_1\\

\mathbf{else}:\\
\;\;\;\;t\_0 - t\_1\\


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

    1. Initial program 68.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 F around -inf 99.7%

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

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

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

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

    if -2.6e11 < F < 7.8000000000000004e-53

    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. 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}} \]
    3. Add Preprocessing
    4. Taylor expanded in F around 0 98.8%

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

    if 7.8000000000000004e-53 < F

    1. Initial program 61.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. Simplified69.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}} \]
    3. Add Preprocessing
    4. Taylor expanded in x around 0 69.6%

      \[\leadsto F \cdot \color{blue}{\left(\frac{1}{\sin B} \cdot \sqrt{\frac{1}{2 + {F}^{2}}}\right)} - \frac{x}{\tan B} \]
    5. Step-by-step derivation
      1. associate-*l/69.6%

        \[\leadsto F \cdot \color{blue}{\frac{1 \cdot \sqrt{\frac{1}{2 + {F}^{2}}}}{\sin B}} - \frac{x}{\tan B} \]
      2. *-lft-identity69.6%

        \[\leadsto F \cdot \frac{\color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}}}{\sin B} - \frac{x}{\tan B} \]
      3. +-commutative69.6%

        \[\leadsto F \cdot \frac{\sqrt{\frac{1}{\color{blue}{{F}^{2} + 2}}}}{\sin B} - \frac{x}{\tan B} \]
      4. unpow269.6%

        \[\leadsto F \cdot \frac{\sqrt{\frac{1}{\color{blue}{F \cdot F} + 2}}}{\sin B} - \frac{x}{\tan B} \]
      5. fma-undefine69.6%

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

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

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

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

Alternative 6: 96.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -260000000000:\\ \;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 7.8 \cdot 10^{-53}:\\ \;\;\;\;F \cdot \frac{\sqrt{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 -260000000000.0)
     (+ (/ -1.0 (/ (tan B) x)) (/ -1.0 (sin B)))
     (if (<= F 7.8e-53)
       (- (* F (/ (sqrt 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 <= -260000000000.0) {
		tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B));
	} else if (F <= 7.8e-53) {
		tmp = (F * (sqrt(0.5) / sin(B))) - 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 <= (-260000000000.0d0)) then
        tmp = ((-1.0d0) / (tan(b) / x)) + ((-1.0d0) / sin(b))
    else if (f <= 7.8d-53) then
        tmp = (f * (sqrt(0.5d0) / sin(b))) - 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 <= -260000000000.0) {
		tmp = (-1.0 / (Math.tan(B) / x)) + (-1.0 / Math.sin(B));
	} else if (F <= 7.8e-53) {
		tmp = (F * (Math.sqrt(0.5) / Math.sin(B))) - 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 <= -260000000000.0:
		tmp = (-1.0 / (math.tan(B) / x)) + (-1.0 / math.sin(B))
	elif F <= 7.8e-53:
		tmp = (F * (math.sqrt(0.5) / math.sin(B))) - 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 <= -260000000000.0)
		tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(-1.0 / sin(B)));
	elseif (F <= 7.8e-53)
		tmp = Float64(Float64(F * Float64(sqrt(0.5) / sin(B))) - 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 <= -260000000000.0)
		tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B));
	elseif (F <= 7.8e-53)
		tmp = (F * (sqrt(0.5) / sin(B))) - 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, -260000000000.0], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7.8e-53], N[(N[(F * N[(N[Sqrt[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 -260000000000:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\

\mathbf{elif}\;F \leq 7.8 \cdot 10^{-53}:\\
\;\;\;\;F \cdot \frac{\sqrt{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 < -2.6e11

    1. Initial program 68.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 F around -inf 99.7%

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

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

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

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

    if -2.6e11 < F < 7.8000000000000004e-53

    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. 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}} \]
    3. Add Preprocessing
    4. Taylor expanded in x around 0 99.6%

      \[\leadsto F \cdot \color{blue}{\left(\frac{1}{\sin B} \cdot \sqrt{\frac{1}{2 + {F}^{2}}}\right)} - \frac{x}{\tan B} \]
    5. Step-by-step derivation
      1. associate-*l/99.6%

        \[\leadsto F \cdot \color{blue}{\frac{1 \cdot \sqrt{\frac{1}{2 + {F}^{2}}}}{\sin B}} - \frac{x}{\tan B} \]
      2. *-lft-identity99.6%

        \[\leadsto F \cdot \frac{\color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}}}{\sin B} - \frac{x}{\tan B} \]
      3. +-commutative99.6%

        \[\leadsto F \cdot \frac{\sqrt{\frac{1}{\color{blue}{{F}^{2} + 2}}}}{\sin B} - \frac{x}{\tan B} \]
      4. unpow299.6%

        \[\leadsto F \cdot \frac{\sqrt{\frac{1}{\color{blue}{F \cdot F} + 2}}}{\sin B} - \frac{x}{\tan B} \]
      5. fma-undefine99.6%

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

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

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

    if 7.8000000000000004e-53 < F

    1. Initial program 61.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. Simplified69.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}} \]
    3. Add Preprocessing
    4. Taylor expanded in x around 0 69.6%

      \[\leadsto F \cdot \color{blue}{\left(\frac{1}{\sin B} \cdot \sqrt{\frac{1}{2 + {F}^{2}}}\right)} - \frac{x}{\tan B} \]
    5. Step-by-step derivation
      1. associate-*l/69.6%

        \[\leadsto F \cdot \color{blue}{\frac{1 \cdot \sqrt{\frac{1}{2 + {F}^{2}}}}{\sin B}} - \frac{x}{\tan B} \]
      2. *-lft-identity69.6%

        \[\leadsto F \cdot \frac{\color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}}}{\sin B} - \frac{x}{\tan B} \]
      3. +-commutative69.6%

        \[\leadsto F \cdot \frac{\sqrt{\frac{1}{\color{blue}{{F}^{2} + 2}}}}{\sin B} - \frac{x}{\tan B} \]
      4. unpow269.6%

        \[\leadsto F \cdot \frac{\sqrt{\frac{1}{\color{blue}{F \cdot F} + 2}}}{\sin B} - \frac{x}{\tan B} \]
      5. fma-undefine69.6%

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

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

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

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

Alternative 7: 92.5% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -0.37:\\ \;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 2.1 \cdot 10^{-92}:\\ \;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - t\_0\\ \mathbf{elif}\;F \leq 10^{+16}:\\ \;\;\;\;\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 -0.37)
     (+ (/ -1.0 (/ (tan B) x)) (/ -1.0 (sin B)))
     (if (<= F 2.1e-92)
       (- (* F (/ (sqrt 0.5) B)) t_0)
       (if (<= F 1e+16)
         (- (* (/ 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 <= -0.37) {
		tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B));
	} else if (F <= 2.1e-92) {
		tmp = (F * (sqrt(0.5) / B)) - t_0;
	} else if (F <= 1e+16) {
		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 <= (-0.37d0)) then
        tmp = ((-1.0d0) / (tan(b) / x)) + ((-1.0d0) / sin(b))
    else if (f <= 2.1d-92) then
        tmp = (f * (sqrt(0.5d0) / b)) - t_0
    else if (f <= 1d+16) 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 <= -0.37) {
		tmp = (-1.0 / (Math.tan(B) / x)) + (-1.0 / Math.sin(B));
	} else if (F <= 2.1e-92) {
		tmp = (F * (Math.sqrt(0.5) / B)) - t_0;
	} else if (F <= 1e+16) {
		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 <= -0.37:
		tmp = (-1.0 / (math.tan(B) / x)) + (-1.0 / math.sin(B))
	elif F <= 2.1e-92:
		tmp = (F * (math.sqrt(0.5) / B)) - t_0
	elif F <= 1e+16:
		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 <= -0.37)
		tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(-1.0 / sin(B)));
	elseif (F <= 2.1e-92)
		tmp = Float64(Float64(F * Float64(sqrt(0.5) / B)) - t_0);
	elseif (F <= 1e+16)
		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 <= -0.37)
		tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B));
	elseif (F <= 2.1e-92)
		tmp = (F * (sqrt(0.5) / B)) - t_0;
	elseif (F <= 1e+16)
		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, -0.37], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.1e-92], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1e+16], 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 -0.37:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\

\mathbf{elif}\;F \leq 2.1 \cdot 10^{-92}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - t\_0\\

\mathbf{elif}\;F \leq 10^{+16}:\\
\;\;\;\;\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 4 regimes
  2. if F < -0.37

    1. Initial program 69.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 F around -inf 99.7%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    4. Step-by-step derivation
      1. div-inv69.3%

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

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

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

    if -0.37 < F < 2.1e-92

    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. Simplified99.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}} \]
    3. Add Preprocessing
    4. Taylor expanded in F around 0 99.7%

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

      \[\leadsto F \cdot \color{blue}{\left(\frac{1}{B} \cdot \sqrt{\frac{1}{2 + 2 \cdot x}}\right)} - \frac{x}{\tan B} \]
    6. Taylor expanded in x around 0 89.2%

      \[\leadsto \color{blue}{\frac{F \cdot \sqrt{0.5}}{B}} - \frac{x}{\tan B} \]
    7. Step-by-step derivation
      1. associate-/l*89.2%

        \[\leadsto \color{blue}{F \cdot \frac{\sqrt{0.5}}{B}} - \frac{x}{\tan B} \]
    8. Simplified89.2%

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

    if 2.1e-92 < F < 1e16

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

    if 1e16 < F

    1. Initial program 58.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. Simplified67.1%

      \[\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}} \]
    3. Add Preprocessing
    4. Taylor expanded in x around 0 67.2%

      \[\leadsto F \cdot \color{blue}{\left(\frac{1}{\sin B} \cdot \sqrt{\frac{1}{2 + {F}^{2}}}\right)} - \frac{x}{\tan B} \]
    5. Step-by-step derivation
      1. associate-*l/67.2%

        \[\leadsto F \cdot \color{blue}{\frac{1 \cdot \sqrt{\frac{1}{2 + {F}^{2}}}}{\sin B}} - \frac{x}{\tan B} \]
      2. *-lft-identity67.2%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -0.37:\\ \;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 2.1 \cdot 10^{-92}:\\ \;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 10^{+16}:\\ \;\;\;\;\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 8: 74.4% accurate, 1.4× 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 -7.4 \cdot 10^{-149}:\\ \;\;\;\;\frac{F}{B \cdot \left(-F\right)} - t\_1\\ \mathbf{elif}\;F \leq -2.8 \cdot 10^{-195}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;F \leq 9.2 \cdot 10^{-200}:\\ \;\;\;\;\frac{x}{-\tan B}\\ \mathbf{elif}\;F \leq 5.6 \cdot 10^{-142}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;F \leq 7.3 \cdot 10^{-96}:\\ \;\;\;\;\frac{1}{B} - t\_1\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin 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 -7.4e-149)
     (- (/ F (* B (- F))) t_1)
     (if (<= F -2.8e-195)
       t_0
       (if (<= F 9.2e-200)
         (/ x (- (tan B)))
         (if (<= F 5.6e-142)
           t_0
           (if (<= F 7.3e-96) (- (/ 1.0 B) t_1) (- (/ 1.0 (sin 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 <= -7.4e-149) {
		tmp = (F / (B * -F)) - t_1;
	} else if (F <= -2.8e-195) {
		tmp = t_0;
	} else if (F <= 9.2e-200) {
		tmp = x / -tan(B);
	} else if (F <= 5.6e-142) {
		tmp = t_0;
	} else if (F <= 7.3e-96) {
		tmp = (1.0 / B) - t_1;
	} 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((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
    t_1 = x / tan(b)
    if (f <= (-7.4d-149)) then
        tmp = (f / (b * -f)) - t_1
    else if (f <= (-2.8d-195)) then
        tmp = t_0
    else if (f <= 9.2d-200) then
        tmp = x / -tan(b)
    else if (f <= 5.6d-142) then
        tmp = t_0
    else if (f <= 7.3d-96) then
        tmp = (1.0d0 / b) - t_1
    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((1.0 / (2.0 + (x * 2.0))))) - x) / B;
	double t_1 = x / Math.tan(B);
	double tmp;
	if (F <= -7.4e-149) {
		tmp = (F / (B * -F)) - t_1;
	} else if (F <= -2.8e-195) {
		tmp = t_0;
	} else if (F <= 9.2e-200) {
		tmp = x / -Math.tan(B);
	} else if (F <= 5.6e-142) {
		tmp = t_0;
	} else if (F <= 7.3e-96) {
		tmp = (1.0 / B) - t_1;
	} else {
		tmp = (1.0 / Math.sin(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 <= -7.4e-149:
		tmp = (F / (B * -F)) - t_1
	elif F <= -2.8e-195:
		tmp = t_0
	elif F <= 9.2e-200:
		tmp = x / -math.tan(B)
	elif F <= 5.6e-142:
		tmp = t_0
	elif F <= 7.3e-96:
		tmp = (1.0 / B) - t_1
	else:
		tmp = (1.0 / math.sin(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 <= -7.4e-149)
		tmp = Float64(Float64(F / Float64(B * Float64(-F))) - t_1);
	elseif (F <= -2.8e-195)
		tmp = t_0;
	elseif (F <= 9.2e-200)
		tmp = Float64(x / Float64(-tan(B)));
	elseif (F <= 5.6e-142)
		tmp = t_0;
	elseif (F <= 7.3e-96)
		tmp = Float64(Float64(1.0 / B) - t_1);
	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((1.0 / (2.0 + (x * 2.0))))) - x) / B;
	t_1 = x / tan(B);
	tmp = 0.0;
	if (F <= -7.4e-149)
		tmp = (F / (B * -F)) - t_1;
	elseif (F <= -2.8e-195)
		tmp = t_0;
	elseif (F <= 9.2e-200)
		tmp = x / -tan(B);
	elseif (F <= 5.6e-142)
		tmp = t_0;
	elseif (F <= 7.3e-96)
		tmp = (1.0 / B) - t_1;
	else
		tmp = (1.0 / sin(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, -7.4e-149], N[(N[(F / N[(B * (-F)), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -2.8e-195], t$95$0, If[LessEqual[F, 9.2e-200], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 5.6e-142], t$95$0, If[LessEqual[F, 7.3e-96], N[(N[(1.0 / B), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $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 -7.4 \cdot 10^{-149}:\\
\;\;\;\;\frac{F}{B \cdot \left(-F\right)} - t\_1\\

\mathbf{elif}\;F \leq -2.8 \cdot 10^{-195}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;F \leq 9.2 \cdot 10^{-200}:\\
\;\;\;\;\frac{x}{-\tan B}\\

\mathbf{elif}\;F \leq 5.6 \cdot 10^{-142}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;F \leq 7.3 \cdot 10^{-96}:\\
\;\;\;\;\frac{1}{B} - t\_1\\

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


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

    1. Initial program 78.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. Simplified84.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}} \]
    3. Add Preprocessing
    4. Taylor expanded in x around 0 84.6%

      \[\leadsto F \cdot \color{blue}{\left(\frac{1}{\sin B} \cdot \sqrt{\frac{1}{2 + {F}^{2}}}\right)} - \frac{x}{\tan B} \]
    5. Step-by-step derivation
      1. associate-*l/84.5%

        \[\leadsto F \cdot \color{blue}{\frac{1 \cdot \sqrt{\frac{1}{2 + {F}^{2}}}}{\sin B}} - \frac{x}{\tan B} \]
      2. *-lft-identity84.5%

        \[\leadsto F \cdot \frac{\color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}}}{\sin B} - \frac{x}{\tan B} \]
      3. +-commutative84.5%

        \[\leadsto F \cdot \frac{\sqrt{\frac{1}{\color{blue}{{F}^{2} + 2}}}}{\sin B} - \frac{x}{\tan B} \]
      4. unpow284.5%

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

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

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

        \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}}} - \frac{x}{\tan B} \]
      2. un-div-inv84.5%

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

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

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

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

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

      \[\leadsto \frac{F}{\color{blue}{B \cdot \sqrt{2 + {F}^{2}}}} - \frac{x}{\tan B} \]
    10. Step-by-step derivation
      1. +-commutative72.5%

        \[\leadsto \frac{F}{B \cdot \sqrt{\color{blue}{{F}^{2} + 2}}} - \frac{x}{\tan B} \]
      2. unpow272.5%

        \[\leadsto \frac{F}{B \cdot \sqrt{\color{blue}{F \cdot F} + 2}} - \frac{x}{\tan B} \]
      3. fma-undefine72.5%

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

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

      \[\leadsto \frac{F}{\color{blue}{-1 \cdot \left(B \cdot F\right)}} - \frac{x}{\tan B} \]
    13. Step-by-step derivation
      1. associate-*r*77.1%

        \[\leadsto \frac{F}{\color{blue}{\left(-1 \cdot B\right) \cdot F}} - \frac{x}{\tan B} \]
      2. neg-mul-177.1%

        \[\leadsto \frac{F}{\color{blue}{\left(-B\right)} \cdot F} - \frac{x}{\tan B} \]
    14. Simplified77.1%

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

    if -7.3999999999999998e-149 < F < -2.80000000000000003e-195 or 9.2000000000000003e-200 < F < 5.60000000000000009e-142

    1. Initial program 99.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. Simplified99.4%

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

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

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

    if -2.80000000000000003e-195 < F < 9.2000000000000003e-200

    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. Add Preprocessing
    3. Taylor expanded in F around -inf 38.2%

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

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

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

        \[\leadsto -\color{blue}{x \cdot \frac{\cos B}{\sin B}} \]
      3. distribute-lft-neg-in94.0%

        \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{\cos B}{\sin B}} \]
    6. Simplified94.0%

      \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{\cos B}{\sin B}} \]
    7. Step-by-step derivation
      1. add-sqr-sqrt26.6%

        \[\leadsto \color{blue}{\left(\sqrt{-x} \cdot \sqrt{-x}\right)} \cdot \frac{\cos B}{\sin B} \]
      2. sqrt-unprod20.8%

        \[\leadsto \color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}} \cdot \frac{\cos B}{\sin B} \]
      3. sqr-neg20.8%

        \[\leadsto \sqrt{\color{blue}{x \cdot x}} \cdot \frac{\cos B}{\sin B} \]
      4. sqrt-unprod0.8%

        \[\leadsto \color{blue}{\left(\sqrt{x} \cdot \sqrt{x}\right)} \cdot \frac{\cos B}{\sin B} \]
      5. add-sqr-sqrt1.7%

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

        \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{\sin B}{\cos B}}} \]
      7. tan-quot1.7%

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

        \[\leadsto \color{blue}{\frac{x}{\tan B}} \]
      9. frac-2neg1.7%

        \[\leadsto \color{blue}{\frac{-x}{-\tan B}} \]
      10. neg-sub01.7%

        \[\leadsto \frac{\color{blue}{0 - x}}{-\tan B} \]
      11. div-sub1.7%

        \[\leadsto \color{blue}{\frac{0}{-\tan B} - \frac{x}{-\tan B}} \]
      12. add-sqr-sqrt0.8%

        \[\leadsto \frac{0}{-\tan B} - \frac{\color{blue}{\sqrt{x} \cdot \sqrt{x}}}{-\tan B} \]
      13. sqrt-unprod20.8%

        \[\leadsto \frac{0}{-\tan B} - \frac{\color{blue}{\sqrt{x \cdot x}}}{-\tan B} \]
      14. sqr-neg20.8%

        \[\leadsto \frac{0}{-\tan B} - \frac{\sqrt{\color{blue}{\left(-x\right) \cdot \left(-x\right)}}}{-\tan B} \]
      15. sqrt-unprod26.8%

        \[\leadsto \frac{0}{-\tan B} - \frac{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}{-\tan B} \]
      16. add-sqr-sqrt94.2%

        \[\leadsto \frac{0}{-\tan B} - \frac{\color{blue}{-x}}{-\tan B} \]
      17. frac-2neg94.2%

        \[\leadsto \frac{0}{-\tan B} - \color{blue}{\frac{x}{\tan B}} \]
    8. Applied egg-rr94.2%

      \[\leadsto \color{blue}{\frac{0}{-\tan B} - \frac{x}{\tan B}} \]
    9. Step-by-step derivation
      1. div094.2%

        \[\leadsto \color{blue}{0} - \frac{x}{\tan B} \]
      2. neg-sub094.2%

        \[\leadsto \color{blue}{-\frac{x}{\tan B}} \]
      3. distribute-frac-neg294.2%

        \[\leadsto \color{blue}{\frac{x}{-\tan B}} \]
    10. Simplified94.2%

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

    if 5.60000000000000009e-142 < F < 7.29999999999999994e-96

    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. Simplified99.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}} \]
    3. Add Preprocessing
    4. Taylor expanded in x around 0 99.3%

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

        \[\leadsto F \cdot \color{blue}{\frac{1 \cdot \sqrt{\frac{1}{2 + {F}^{2}}}}{\sin B}} - \frac{x}{\tan B} \]
      2. *-lft-identity99.5%

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

        \[\leadsto F \cdot \frac{\sqrt{\frac{1}{\color{blue}{{F}^{2} + 2}}}}{\sin B} - \frac{x}{\tan B} \]
      4. unpow299.5%

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

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

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

        \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}}} - \frac{x}{\tan B} \]
      2. un-div-inv99.5%

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

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

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

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

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

      \[\leadsto \frac{F}{\color{blue}{B \cdot \sqrt{2 + {F}^{2}}}} - \frac{x}{\tan B} \]
    10. Step-by-step derivation
      1. +-commutative87.8%

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

        \[\leadsto \frac{F}{B \cdot \sqrt{\color{blue}{F \cdot F} + 2}} - \frac{x}{\tan B} \]
      3. fma-undefine87.8%

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

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

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

    if 7.29999999999999994e-96 < 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. Simplified72.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}} \]
    3. Add Preprocessing
    4. Taylor expanded in x around 0 72.6%

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

        \[\leadsto F \cdot \color{blue}{\frac{1 \cdot \sqrt{\frac{1}{2 + {F}^{2}}}}{\sin B}} - \frac{x}{\tan B} \]
      2. *-lft-identity72.6%

        \[\leadsto F \cdot \frac{\color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}}}{\sin B} - \frac{x}{\tan B} \]
      3. +-commutative72.6%

        \[\leadsto F \cdot \frac{\sqrt{\frac{1}{\color{blue}{{F}^{2} + 2}}}}{\sin B} - \frac{x}{\tan B} \]
      4. unpow272.6%

        \[\leadsto F \cdot \frac{\sqrt{\frac{1}{\color{blue}{F \cdot F} + 2}}}{\sin B} - \frac{x}{\tan B} \]
      5. fma-undefine72.6%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -7.4 \cdot 10^{-149}:\\ \;\;\;\;\frac{F}{B \cdot \left(-F\right)} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -2.8 \cdot 10^{-195}:\\ \;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\ \mathbf{elif}\;F \leq 9.2 \cdot 10^{-200}:\\ \;\;\;\;\frac{x}{-\tan B}\\ \mathbf{elif}\;F \leq 5.6 \cdot 10^{-142}:\\ \;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\ \mathbf{elif}\;F \leq 7.3 \cdot 10^{-96}:\\ \;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 66.4% accurate, 1.4× 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 -2.5 \cdot 10^{-152}:\\ \;\;\;\;\frac{F}{B \cdot \left(-F\right)} - t\_1\\ \mathbf{elif}\;F \leq -2.9 \cdot 10^{-196}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;F \leq 4.3 \cdot 10^{-200}:\\ \;\;\;\;\frac{x}{-\tan B}\\ \mathbf{elif}\;F \leq 8.5 \cdot 10^{-145}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;F \leq 2.3 \cdot 10^{-61}:\\ \;\;\;\;\cos B \cdot \frac{-x}{\sin B}\\ \mathbf{elif}\;F \leq 2.35 \cdot 10^{+212}:\\ \;\;\;\;\frac{1}{B} - t\_1\\ \mathbf{elif}\;F \leq 3.6 \cdot 10^{+280}:\\ \;\;\;\;\frac{1}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{F}{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 -2.5e-152)
     (- (/ F (* B (- F))) t_1)
     (if (<= F -2.9e-196)
       t_0
       (if (<= F 4.3e-200)
         (/ x (- (tan B)))
         (if (<= F 8.5e-145)
           t_0
           (if (<= F 2.3e-61)
             (* (cos B) (/ (- x) (sin B)))
             (if (<= F 2.35e+212)
               (- (/ 1.0 B) t_1)
               (if (<= F 3.6e+280)
                 (/ 1.0 (sin B))
                 (- (/ F (* 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 <= -2.5e-152) {
		tmp = (F / (B * -F)) - t_1;
	} else if (F <= -2.9e-196) {
		tmp = t_0;
	} else if (F <= 4.3e-200) {
		tmp = x / -tan(B);
	} else if (F <= 8.5e-145) {
		tmp = t_0;
	} else if (F <= 2.3e-61) {
		tmp = cos(B) * (-x / sin(B));
	} else if (F <= 2.35e+212) {
		tmp = (1.0 / B) - t_1;
	} else if (F <= 3.6e+280) {
		tmp = 1.0 / sin(B);
	} else {
		tmp = (F / (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 <= (-2.5d-152)) then
        tmp = (f / (b * -f)) - t_1
    else if (f <= (-2.9d-196)) then
        tmp = t_0
    else if (f <= 4.3d-200) then
        tmp = x / -tan(b)
    else if (f <= 8.5d-145) then
        tmp = t_0
    else if (f <= 2.3d-61) then
        tmp = cos(b) * (-x / sin(b))
    else if (f <= 2.35d+212) then
        tmp = (1.0d0 / b) - t_1
    else if (f <= 3.6d+280) then
        tmp = 1.0d0 / sin(b)
    else
        tmp = (f / (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 <= -2.5e-152) {
		tmp = (F / (B * -F)) - t_1;
	} else if (F <= -2.9e-196) {
		tmp = t_0;
	} else if (F <= 4.3e-200) {
		tmp = x / -Math.tan(B);
	} else if (F <= 8.5e-145) {
		tmp = t_0;
	} else if (F <= 2.3e-61) {
		tmp = Math.cos(B) * (-x / Math.sin(B));
	} else if (F <= 2.35e+212) {
		tmp = (1.0 / B) - t_1;
	} else if (F <= 3.6e+280) {
		tmp = 1.0 / Math.sin(B);
	} else {
		tmp = (F / (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 <= -2.5e-152:
		tmp = (F / (B * -F)) - t_1
	elif F <= -2.9e-196:
		tmp = t_0
	elif F <= 4.3e-200:
		tmp = x / -math.tan(B)
	elif F <= 8.5e-145:
		tmp = t_0
	elif F <= 2.3e-61:
		tmp = math.cos(B) * (-x / math.sin(B))
	elif F <= 2.35e+212:
		tmp = (1.0 / B) - t_1
	elif F <= 3.6e+280:
		tmp = 1.0 / math.sin(B)
	else:
		tmp = (F / (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 <= -2.5e-152)
		tmp = Float64(Float64(F / Float64(B * Float64(-F))) - t_1);
	elseif (F <= -2.9e-196)
		tmp = t_0;
	elseif (F <= 4.3e-200)
		tmp = Float64(x / Float64(-tan(B)));
	elseif (F <= 8.5e-145)
		tmp = t_0;
	elseif (F <= 2.3e-61)
		tmp = Float64(cos(B) * Float64(Float64(-x) / sin(B)));
	elseif (F <= 2.35e+212)
		tmp = Float64(Float64(1.0 / B) - t_1);
	elseif (F <= 3.6e+280)
		tmp = Float64(1.0 / sin(B));
	else
		tmp = Float64(Float64(F / 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 <= -2.5e-152)
		tmp = (F / (B * -F)) - t_1;
	elseif (F <= -2.9e-196)
		tmp = t_0;
	elseif (F <= 4.3e-200)
		tmp = x / -tan(B);
	elseif (F <= 8.5e-145)
		tmp = t_0;
	elseif (F <= 2.3e-61)
		tmp = cos(B) * (-x / sin(B));
	elseif (F <= 2.35e+212)
		tmp = (1.0 / B) - t_1;
	elseif (F <= 3.6e+280)
		tmp = 1.0 / sin(B);
	else
		tmp = (F / (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, -2.5e-152], N[(N[(F / N[(B * (-F)), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -2.9e-196], t$95$0, If[LessEqual[F, 4.3e-200], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 8.5e-145], t$95$0, If[LessEqual[F, 2.3e-61], N[(N[Cos[B], $MachinePrecision] * N[((-x) / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.35e+212], N[(N[(1.0 / B), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 3.6e+280], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(F / N[(F * B), $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 -2.5 \cdot 10^{-152}:\\
\;\;\;\;\frac{F}{B \cdot \left(-F\right)} - t\_1\\

\mathbf{elif}\;F \leq -2.9 \cdot 10^{-196}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;F \leq 4.3 \cdot 10^{-200}:\\
\;\;\;\;\frac{x}{-\tan B}\\

\mathbf{elif}\;F \leq 8.5 \cdot 10^{-145}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;F \leq 2.3 \cdot 10^{-61}:\\
\;\;\;\;\cos B \cdot \frac{-x}{\sin B}\\

\mathbf{elif}\;F \leq 2.35 \cdot 10^{+212}:\\
\;\;\;\;\frac{1}{B} - t\_1\\

\mathbf{elif}\;F \leq 3.6 \cdot 10^{+280}:\\
\;\;\;\;\frac{1}{\sin B}\\

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


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

    1. Initial program 78.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. Simplified84.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}} \]
    3. Add Preprocessing
    4. Taylor expanded in x around 0 84.6%

      \[\leadsto F \cdot \color{blue}{\left(\frac{1}{\sin B} \cdot \sqrt{\frac{1}{2 + {F}^{2}}}\right)} - \frac{x}{\tan B} \]
    5. Step-by-step derivation
      1. associate-*l/84.5%

        \[\leadsto F \cdot \color{blue}{\frac{1 \cdot \sqrt{\frac{1}{2 + {F}^{2}}}}{\sin B}} - \frac{x}{\tan B} \]
      2. *-lft-identity84.5%

        \[\leadsto F \cdot \frac{\color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}}}{\sin B} - \frac{x}{\tan B} \]
      3. +-commutative84.5%

        \[\leadsto F \cdot \frac{\sqrt{\frac{1}{\color{blue}{{F}^{2} + 2}}}}{\sin B} - \frac{x}{\tan B} \]
      4. unpow284.5%

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

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

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

        \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}}} - \frac{x}{\tan B} \]
      2. un-div-inv84.5%

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

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

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

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

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

      \[\leadsto \frac{F}{\color{blue}{B \cdot \sqrt{2 + {F}^{2}}}} - \frac{x}{\tan B} \]
    10. Step-by-step derivation
      1. +-commutative72.5%

        \[\leadsto \frac{F}{B \cdot \sqrt{\color{blue}{{F}^{2} + 2}}} - \frac{x}{\tan B} \]
      2. unpow272.5%

        \[\leadsto \frac{F}{B \cdot \sqrt{\color{blue}{F \cdot F} + 2}} - \frac{x}{\tan B} \]
      3. fma-undefine72.5%

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

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

      \[\leadsto \frac{F}{\color{blue}{-1 \cdot \left(B \cdot F\right)}} - \frac{x}{\tan B} \]
    13. Step-by-step derivation
      1. associate-*r*77.1%

        \[\leadsto \frac{F}{\color{blue}{\left(-1 \cdot B\right) \cdot F}} - \frac{x}{\tan B} \]
      2. neg-mul-177.1%

        \[\leadsto \frac{F}{\color{blue}{\left(-B\right)} \cdot F} - \frac{x}{\tan B} \]
    14. Simplified77.1%

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

    if -2.4999999999999998e-152 < F < -2.89999999999999987e-196 or 4.29999999999999975e-200 < F < 8.50000000000000043e-145

    1. Initial program 99.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. Simplified99.4%

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

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

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

    if -2.89999999999999987e-196 < F < 4.29999999999999975e-200

    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. Add Preprocessing
    3. Taylor expanded in F around -inf 38.2%

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

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

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

        \[\leadsto -\color{blue}{x \cdot \frac{\cos B}{\sin B}} \]
      3. distribute-lft-neg-in94.0%

        \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{\cos B}{\sin B}} \]
    6. Simplified94.0%

      \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{\cos B}{\sin B}} \]
    7. Step-by-step derivation
      1. add-sqr-sqrt26.6%

        \[\leadsto \color{blue}{\left(\sqrt{-x} \cdot \sqrt{-x}\right)} \cdot \frac{\cos B}{\sin B} \]
      2. sqrt-unprod20.8%

        \[\leadsto \color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}} \cdot \frac{\cos B}{\sin B} \]
      3. sqr-neg20.8%

        \[\leadsto \sqrt{\color{blue}{x \cdot x}} \cdot \frac{\cos B}{\sin B} \]
      4. sqrt-unprod0.8%

        \[\leadsto \color{blue}{\left(\sqrt{x} \cdot \sqrt{x}\right)} \cdot \frac{\cos B}{\sin B} \]
      5. add-sqr-sqrt1.7%

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

        \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{\sin B}{\cos B}}} \]
      7. tan-quot1.7%

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

        \[\leadsto \color{blue}{\frac{x}{\tan B}} \]
      9. frac-2neg1.7%

        \[\leadsto \color{blue}{\frac{-x}{-\tan B}} \]
      10. neg-sub01.7%

        \[\leadsto \frac{\color{blue}{0 - x}}{-\tan B} \]
      11. div-sub1.7%

        \[\leadsto \color{blue}{\frac{0}{-\tan B} - \frac{x}{-\tan B}} \]
      12. add-sqr-sqrt0.8%

        \[\leadsto \frac{0}{-\tan B} - \frac{\color{blue}{\sqrt{x} \cdot \sqrt{x}}}{-\tan B} \]
      13. sqrt-unprod20.8%

        \[\leadsto \frac{0}{-\tan B} - \frac{\color{blue}{\sqrt{x \cdot x}}}{-\tan B} \]
      14. sqr-neg20.8%

        \[\leadsto \frac{0}{-\tan B} - \frac{\sqrt{\color{blue}{\left(-x\right) \cdot \left(-x\right)}}}{-\tan B} \]
      15. sqrt-unprod26.8%

        \[\leadsto \frac{0}{-\tan B} - \frac{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}{-\tan B} \]
      16. add-sqr-sqrt94.2%

        \[\leadsto \frac{0}{-\tan B} - \frac{\color{blue}{-x}}{-\tan B} \]
      17. frac-2neg94.2%

        \[\leadsto \frac{0}{-\tan B} - \color{blue}{\frac{x}{\tan B}} \]
    8. Applied egg-rr94.2%

      \[\leadsto \color{blue}{\frac{0}{-\tan B} - \frac{x}{\tan B}} \]
    9. Step-by-step derivation
      1. div094.2%

        \[\leadsto \color{blue}{0} - \frac{x}{\tan B} \]
      2. neg-sub094.2%

        \[\leadsto \color{blue}{-\frac{x}{\tan B}} \]
      3. distribute-frac-neg294.2%

        \[\leadsto \color{blue}{\frac{x}{-\tan B}} \]
    10. Simplified94.2%

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

    if 8.50000000000000043e-145 < F < 2.29999999999999992e-61

    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 F around -inf 29.5%

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

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

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

        \[\leadsto -\color{blue}{x \cdot \frac{\cos B}{\sin B}} \]
      3. distribute-lft-neg-in65.9%

        \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{\cos B}{\sin B}} \]
    6. Simplified65.9%

      \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{\cos B}{\sin B}} \]
    7. Step-by-step derivation
      1. clear-num65.9%

        \[\leadsto \left(-x\right) \cdot \color{blue}{\frac{1}{\frac{\sin B}{\cos B}}} \]
      2. tan-quot65.8%

        \[\leadsto \left(-x\right) \cdot \frac{1}{\color{blue}{\tan B}} \]
      3. *-un-lft-identity65.8%

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

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

        \[\leadsto \left(-x\right) \cdot \color{blue}{\frac{1}{\tan B}} \]
    10. Simplified65.8%

      \[\leadsto \left(-x\right) \cdot \color{blue}{\frac{1}{\tan B}} \]
    11. Taylor expanded in x around 0 65.8%

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

        \[\leadsto \color{blue}{-\frac{x \cdot \cos B}{\sin B}} \]
      2. distribute-frac-neg265.8%

        \[\leadsto \color{blue}{\frac{x \cdot \cos B}{-\sin B}} \]
      3. *-commutative65.8%

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

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

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

    if 2.29999999999999992e-61 < F < 2.34999999999999996e212

    1. Initial program 84.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. Simplified88.2%

      \[\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}} \]
    3. Add Preprocessing
    4. Taylor expanded in x around 0 88.3%

      \[\leadsto F \cdot \color{blue}{\left(\frac{1}{\sin B} \cdot \sqrt{\frac{1}{2 + {F}^{2}}}\right)} - \frac{x}{\tan B} \]
    5. Step-by-step derivation
      1. associate-*l/88.3%

        \[\leadsto F \cdot \color{blue}{\frac{1 \cdot \sqrt{\frac{1}{2 + {F}^{2}}}}{\sin B}} - \frac{x}{\tan B} \]
      2. *-lft-identity88.3%

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

        \[\leadsto F \cdot \frac{\sqrt{\frac{1}{\color{blue}{{F}^{2} + 2}}}}{\sin B} - \frac{x}{\tan B} \]
      4. unpow288.3%

        \[\leadsto F \cdot \frac{\sqrt{\frac{1}{\color{blue}{F \cdot F} + 2}}}{\sin B} - \frac{x}{\tan B} \]
      5. fma-undefine88.3%

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

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

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

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

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

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

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

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

      \[\leadsto \frac{F}{\color{blue}{B \cdot \sqrt{2 + {F}^{2}}}} - \frac{x}{\tan B} \]
    10. Step-by-step derivation
      1. +-commutative63.8%

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

        \[\leadsto \frac{F}{B \cdot \sqrt{\color{blue}{F \cdot F} + 2}} - \frac{x}{\tan B} \]
      3. fma-undefine63.8%

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

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

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

    if 2.34999999999999996e212 < F < 3.6e280

    1. Initial program 18.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 F around -inf 27.1%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    4. Step-by-step derivation
      1. add-cube-cbrt27.0%

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

        \[\leadsto \color{blue}{{\left(\sqrt[3]{\left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{\sin B}}\right)}^{3}} \]
    5. Applied egg-rr72.6%

      \[\leadsto \color{blue}{{\left(\sqrt[3]{\frac{1}{\sin B} + \frac{x}{\tan B}}\right)}^{3}} \]
    6. Taylor expanded in x around 0 73.9%

      \[\leadsto {\color{blue}{\left(\sqrt[3]{\frac{1}{\sin B}}\right)}}^{3} \]
    7. Taylor expanded in B around inf 74.9%

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

    if 3.6e280 < F

    1. Initial program 36.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. Simplified56.4%

      \[\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}} \]
    3. Add Preprocessing
    4. Taylor expanded in x around 0 56.4%

      \[\leadsto F \cdot \color{blue}{\left(\frac{1}{\sin B} \cdot \sqrt{\frac{1}{2 + {F}^{2}}}\right)} - \frac{x}{\tan B} \]
    5. Step-by-step derivation
      1. associate-*l/56.4%

        \[\leadsto F \cdot \color{blue}{\frac{1 \cdot \sqrt{\frac{1}{2 + {F}^{2}}}}{\sin B}} - \frac{x}{\tan B} \]
      2. *-lft-identity56.4%

        \[\leadsto F \cdot \frac{\color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}}}{\sin B} - \frac{x}{\tan B} \]
      3. +-commutative56.4%

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

        \[\leadsto F \cdot \frac{\sqrt{\frac{1}{\color{blue}{F \cdot F} + 2}}}{\sin B} - \frac{x}{\tan B} \]
      5. fma-undefine56.4%

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

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

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

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

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

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

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

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

      \[\leadsto \frac{F}{\color{blue}{B \cdot \sqrt{2 + {F}^{2}}}} - \frac{x}{\tan B} \]
    10. Step-by-step derivation
      1. +-commutative56.4%

        \[\leadsto \frac{F}{B \cdot \sqrt{\color{blue}{{F}^{2} + 2}}} - \frac{x}{\tan B} \]
      2. unpow256.4%

        \[\leadsto \frac{F}{B \cdot \sqrt{\color{blue}{F \cdot F} + 2}} - \frac{x}{\tan B} \]
      3. fma-undefine56.4%

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

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

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

        \[\leadsto \frac{F}{\color{blue}{F \cdot B}} - \frac{x}{\tan B} \]
    14. Simplified82.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -2.5 \cdot 10^{-152}:\\ \;\;\;\;\frac{F}{B \cdot \left(-F\right)} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -2.9 \cdot 10^{-196}:\\ \;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\ \mathbf{elif}\;F \leq 4.3 \cdot 10^{-200}:\\ \;\;\;\;\frac{x}{-\tan B}\\ \mathbf{elif}\;F \leq 8.5 \cdot 10^{-145}:\\ \;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\ \mathbf{elif}\;F \leq 2.3 \cdot 10^{-61}:\\ \;\;\;\;\cos B \cdot \frac{-x}{\sin B}\\ \mathbf{elif}\;F \leq 2.35 \cdot 10^{+212}:\\ \;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 3.6 \cdot 10^{+280}:\\ \;\;\;\;\frac{1}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{F}{F \cdot B} - \frac{x}{\tan B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 89.9% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -0.37:\\ \;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 4.5 \cdot 10^{-82}:\\ \;\;\;\;F \cdot \frac{\sqrt{0.5}}{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 -0.37)
     (+ (/ -1.0 (/ (tan B) x)) (/ -1.0 (sin B)))
     (if (<= F 4.5e-82)
       (- (* F (/ (sqrt 0.5) 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 <= -0.37) {
		tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B));
	} else if (F <= 4.5e-82) {
		tmp = (F * (sqrt(0.5) / B)) - 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 <= (-0.37d0)) then
        tmp = ((-1.0d0) / (tan(b) / x)) + ((-1.0d0) / sin(b))
    else if (f <= 4.5d-82) then
        tmp = (f * (sqrt(0.5d0) / b)) - 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 <= -0.37) {
		tmp = (-1.0 / (Math.tan(B) / x)) + (-1.0 / Math.sin(B));
	} else if (F <= 4.5e-82) {
		tmp = (F * (Math.sqrt(0.5) / B)) - 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 <= -0.37:
		tmp = (-1.0 / (math.tan(B) / x)) + (-1.0 / math.sin(B))
	elif F <= 4.5e-82:
		tmp = (F * (math.sqrt(0.5) / B)) - 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 <= -0.37)
		tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(-1.0 / sin(B)));
	elseif (F <= 4.5e-82)
		tmp = Float64(Float64(F * Float64(sqrt(0.5) / B)) - 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 <= -0.37)
		tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B));
	elseif (F <= 4.5e-82)
		tmp = (F * (sqrt(0.5) / B)) - 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, -0.37], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.5e-82], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / B), $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 -0.37:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\

\mathbf{elif}\;F \leq 4.5 \cdot 10^{-82}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{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 < -0.37

    1. Initial program 69.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 F around -inf 99.7%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    4. Step-by-step derivation
      1. div-inv69.3%

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

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

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

    if -0.37 < F < 4.4999999999999998e-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. 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}} \]
    3. Add Preprocessing
    4. Taylor expanded in F around 0 99.6%

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

      \[\leadsto F \cdot \color{blue}{\left(\frac{1}{B} \cdot \sqrt{\frac{1}{2 + 2 \cdot x}}\right)} - \frac{x}{\tan B} \]
    6. Taylor expanded in x around 0 88.4%

      \[\leadsto \color{blue}{\frac{F \cdot \sqrt{0.5}}{B}} - \frac{x}{\tan B} \]
    7. Step-by-step derivation
      1. associate-/l*88.5%

        \[\leadsto \color{blue}{F \cdot \frac{\sqrt{0.5}}{B}} - \frac{x}{\tan B} \]
    8. Simplified88.5%

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

    if 4.4999999999999998e-82 < F

    1. Initial program 64.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. Simplified71.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}} \]
    3. Add Preprocessing
    4. Taylor expanded in x around 0 71.7%

      \[\leadsto F \cdot \color{blue}{\left(\frac{1}{\sin B} \cdot \sqrt{\frac{1}{2 + {F}^{2}}}\right)} - \frac{x}{\tan B} \]
    5. Step-by-step derivation
      1. associate-*l/71.7%

        \[\leadsto F \cdot \color{blue}{\frac{1 \cdot \sqrt{\frac{1}{2 + {F}^{2}}}}{\sin B}} - \frac{x}{\tan B} \]
      2. *-lft-identity71.7%

        \[\leadsto F \cdot \frac{\color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}}}{\sin B} - \frac{x}{\tan B} \]
      3. +-commutative71.7%

        \[\leadsto F \cdot \frac{\sqrt{\frac{1}{\color{blue}{{F}^{2} + 2}}}}{\sin B} - \frac{x}{\tan B} \]
      4. unpow271.7%

        \[\leadsto F \cdot \frac{\sqrt{\frac{1}{\color{blue}{F \cdot F} + 2}}}{\sin B} - \frac{x}{\tan B} \]
      5. fma-undefine71.7%

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

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

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

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

Alternative 11: 90.4% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -0.5:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{\sin B}\\ \mathbf{elif}\;F \leq 2.15 \cdot 10^{-61}:\\ \;\;\;\;F \cdot \frac{\sqrt{0.5}}{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 -0.5)
     (+ (* x (/ -1.0 (tan B))) (/ -1.0 (sin B)))
     (if (<= F 2.15e-61)
       (- (* F (/ (sqrt 0.5) 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 <= -0.5) {
		tmp = (x * (-1.0 / tan(B))) + (-1.0 / sin(B));
	} else if (F <= 2.15e-61) {
		tmp = (F * (sqrt(0.5) / B)) - 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 <= (-0.5d0)) then
        tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / sin(b))
    else if (f <= 2.15d-61) then
        tmp = (f * (sqrt(0.5d0) / b)) - 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 <= -0.5) {
		tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / Math.sin(B));
	} else if (F <= 2.15e-61) {
		tmp = (F * (Math.sqrt(0.5) / B)) - 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 <= -0.5:
		tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / math.sin(B))
	elif F <= 2.15e-61:
		tmp = (F * (math.sqrt(0.5) / B)) - 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 <= -0.5)
		tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / sin(B)));
	elseif (F <= 2.15e-61)
		tmp = Float64(Float64(F * Float64(sqrt(0.5) / B)) - 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 <= -0.5)
		tmp = (x * (-1.0 / tan(B))) + (-1.0 / sin(B));
	elseif (F <= 2.15e-61)
		tmp = (F * (sqrt(0.5) / B)) - 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, -0.5], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.15e-61], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / B), $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 -0.5:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{\sin B}\\

\mathbf{elif}\;F \leq 2.15 \cdot 10^{-61}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{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 < -0.5

    1. Initial program 69.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 F around -inf 99.7%

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

    if -0.5 < F < 2.1500000000000002e-61

    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. 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}} \]
    3. Add Preprocessing
    4. Taylor expanded in F around 0 99.6%

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

      \[\leadsto F \cdot \color{blue}{\left(\frac{1}{B} \cdot \sqrt{\frac{1}{2 + 2 \cdot x}}\right)} - \frac{x}{\tan B} \]
    6. Taylor expanded in x around 0 88.0%

      \[\leadsto \color{blue}{\frac{F \cdot \sqrt{0.5}}{B}} - \frac{x}{\tan B} \]
    7. Step-by-step derivation
      1. associate-/l*88.0%

        \[\leadsto \color{blue}{F \cdot \frac{\sqrt{0.5}}{B}} - \frac{x}{\tan B} \]
    8. Simplified88.0%

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

    if 2.1500000000000002e-61 < F

    1. Initial program 62.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. Simplified70.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}} \]
    3. Add Preprocessing
    4. Taylor expanded in x around 0 70.4%

      \[\leadsto F \cdot \color{blue}{\left(\frac{1}{\sin B} \cdot \sqrt{\frac{1}{2 + {F}^{2}}}\right)} - \frac{x}{\tan B} \]
    5. Step-by-step derivation
      1. associate-*l/70.4%

        \[\leadsto F \cdot \color{blue}{\frac{1 \cdot \sqrt{\frac{1}{2 + {F}^{2}}}}{\sin B}} - \frac{x}{\tan B} \]
      2. *-lft-identity70.4%

        \[\leadsto F \cdot \frac{\color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}}}{\sin B} - \frac{x}{\tan B} \]
      3. +-commutative70.4%

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

        \[\leadsto F \cdot \frac{\sqrt{\frac{1}{\color{blue}{F \cdot F} + 2}}}{\sin B} - \frac{x}{\tan B} \]
      5. fma-undefine70.4%

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

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

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

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

Alternative 12: 81.6% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -3.4 \cdot 10^{+66}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\ \mathbf{elif}\;F \leq 7.8 \cdot 10^{-53}:\\ \;\;\;\;F \cdot \frac{\sqrt{0.5}}{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 -3.4e+66)
     (+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
     (if (<= F 7.8e-53)
       (- (* F (/ (sqrt 0.5) 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 <= -3.4e+66) {
		tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
	} else if (F <= 7.8e-53) {
		tmp = (F * (sqrt(0.5) / B)) - 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 <= (-3.4d+66)) then
        tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
    else if (f <= 7.8d-53) then
        tmp = (f * (sqrt(0.5d0) / b)) - 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 <= -3.4e+66) {
		tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
	} else if (F <= 7.8e-53) {
		tmp = (F * (Math.sqrt(0.5) / B)) - 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 <= -3.4e+66:
		tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B)
	elif F <= 7.8e-53:
		tmp = (F * (math.sqrt(0.5) / B)) - 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 <= -3.4e+66)
		tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B));
	elseif (F <= 7.8e-53)
		tmp = Float64(Float64(F * Float64(sqrt(0.5) / B)) - 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 <= -3.4e+66)
		tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
	elseif (F <= 7.8e-53)
		tmp = (F * (sqrt(0.5) / B)) - 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, -3.4e+66], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7.8e-53], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / B), $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 -3.4 \cdot 10^{+66}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\

\mathbf{elif}\;F \leq 7.8 \cdot 10^{-53}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{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 < -3.4000000000000003e66

    1. Initial program 63.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 F around -inf 99.7%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    4. Taylor expanded in B around 0 85.5%

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

    if -3.4000000000000003e66 < F < 7.8000000000000004e-53

    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. 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}} \]
    3. Add Preprocessing
    4. Taylor expanded in F around 0 94.1%

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

      \[\leadsto F \cdot \color{blue}{\left(\frac{1}{B} \cdot \sqrt{\frac{1}{2 + 2 \cdot x}}\right)} - \frac{x}{\tan B} \]
    6. Taylor expanded in x around 0 83.8%

      \[\leadsto \color{blue}{\frac{F \cdot \sqrt{0.5}}{B}} - \frac{x}{\tan B} \]
    7. Step-by-step derivation
      1. associate-/l*83.9%

        \[\leadsto \color{blue}{F \cdot \frac{\sqrt{0.5}}{B}} - \frac{x}{\tan B} \]
    8. Simplified83.9%

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

    if 7.8000000000000004e-53 < F

    1. Initial program 61.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. Simplified69.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}} \]
    3. Add Preprocessing
    4. Taylor expanded in x around 0 69.6%

      \[\leadsto F \cdot \color{blue}{\left(\frac{1}{\sin B} \cdot \sqrt{\frac{1}{2 + {F}^{2}}}\right)} - \frac{x}{\tan B} \]
    5. Step-by-step derivation
      1. associate-*l/69.6%

        \[\leadsto F \cdot \color{blue}{\frac{1 \cdot \sqrt{\frac{1}{2 + {F}^{2}}}}{\sin B}} - \frac{x}{\tan B} \]
      2. *-lft-identity69.6%

        \[\leadsto F \cdot \frac{\color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}}}{\sin B} - \frac{x}{\tan B} \]
      3. +-commutative69.6%

        \[\leadsto F \cdot \frac{\sqrt{\frac{1}{\color{blue}{{F}^{2} + 2}}}}{\sin B} - \frac{x}{\tan B} \]
      4. unpow269.6%

        \[\leadsto F \cdot \frac{\sqrt{\frac{1}{\color{blue}{F \cdot F} + 2}}}{\sin B} - \frac{x}{\tan B} \]
      5. fma-undefine69.6%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -3.4 \cdot 10^{+66}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\ \mathbf{elif}\;F \leq 7.8 \cdot 10^{-53}:\\ \;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - \frac{x}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 64.0% accurate, 2.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x}{\tan B}\\ t_1 := \frac{x}{-\tan B}\\ t_2 := \frac{1}{\sin B}\\ t_3 := \frac{-1}{\sin B} - \frac{x}{B}\\ t_4 := \frac{1}{B} - t\_0\\ \mathbf{if}\;F \leq -8 \cdot 10^{+209}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;F \leq -5.5 \cdot 10^{+149}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;F \leq -4.2 \cdot 10^{+105}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;F \leq 2.65 \cdot 10^{-61}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;F \leq 9.2 \cdot 10^{+80}:\\ \;\;\;\;t\_4\\ \mathbf{elif}\;F \leq 4.2 \cdot 10^{+100}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;F \leq 2.3 \cdot 10^{+212}:\\ \;\;\;\;t\_4\\ \mathbf{elif}\;F \leq 3.5 \cdot 10^{+280}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;\frac{F}{F \cdot B} - t\_0\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (/ x (tan B)))
        (t_1 (/ x (- (tan B))))
        (t_2 (/ 1.0 (sin B)))
        (t_3 (- (/ -1.0 (sin B)) (/ x B)))
        (t_4 (- (/ 1.0 B) t_0)))
   (if (<= F -8e+209)
     t_3
     (if (<= F -5.5e+149)
       t_1
       (if (<= F -4.2e+105)
         t_3
         (if (<= F 2.65e-61)
           t_1
           (if (<= F 9.2e+80)
             t_4
             (if (<= F 4.2e+100)
               t_2
               (if (<= F 2.3e+212)
                 t_4
                 (if (<= F 3.5e+280) t_2 (- (/ F (* F B)) t_0)))))))))))
double code(double F, double B, double x) {
	double t_0 = x / tan(B);
	double t_1 = x / -tan(B);
	double t_2 = 1.0 / sin(B);
	double t_3 = (-1.0 / sin(B)) - (x / B);
	double t_4 = (1.0 / B) - t_0;
	double tmp;
	if (F <= -8e+209) {
		tmp = t_3;
	} else if (F <= -5.5e+149) {
		tmp = t_1;
	} else if (F <= -4.2e+105) {
		tmp = t_3;
	} else if (F <= 2.65e-61) {
		tmp = t_1;
	} else if (F <= 9.2e+80) {
		tmp = t_4;
	} else if (F <= 4.2e+100) {
		tmp = t_2;
	} else if (F <= 2.3e+212) {
		tmp = t_4;
	} else if (F <= 3.5e+280) {
		tmp = t_2;
	} else {
		tmp = (F / (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) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: t_4
    real(8) :: tmp
    t_0 = x / tan(b)
    t_1 = x / -tan(b)
    t_2 = 1.0d0 / sin(b)
    t_3 = ((-1.0d0) / sin(b)) - (x / b)
    t_4 = (1.0d0 / b) - t_0
    if (f <= (-8d+209)) then
        tmp = t_3
    else if (f <= (-5.5d+149)) then
        tmp = t_1
    else if (f <= (-4.2d+105)) then
        tmp = t_3
    else if (f <= 2.65d-61) then
        tmp = t_1
    else if (f <= 9.2d+80) then
        tmp = t_4
    else if (f <= 4.2d+100) then
        tmp = t_2
    else if (f <= 2.3d+212) then
        tmp = t_4
    else if (f <= 3.5d+280) then
        tmp = t_2
    else
        tmp = (f / (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 t_1 = x / -Math.tan(B);
	double t_2 = 1.0 / Math.sin(B);
	double t_3 = (-1.0 / Math.sin(B)) - (x / B);
	double t_4 = (1.0 / B) - t_0;
	double tmp;
	if (F <= -8e+209) {
		tmp = t_3;
	} else if (F <= -5.5e+149) {
		tmp = t_1;
	} else if (F <= -4.2e+105) {
		tmp = t_3;
	} else if (F <= 2.65e-61) {
		tmp = t_1;
	} else if (F <= 9.2e+80) {
		tmp = t_4;
	} else if (F <= 4.2e+100) {
		tmp = t_2;
	} else if (F <= 2.3e+212) {
		tmp = t_4;
	} else if (F <= 3.5e+280) {
		tmp = t_2;
	} else {
		tmp = (F / (F * B)) - t_0;
	}
	return tmp;
}
def code(F, B, x):
	t_0 = x / math.tan(B)
	t_1 = x / -math.tan(B)
	t_2 = 1.0 / math.sin(B)
	t_3 = (-1.0 / math.sin(B)) - (x / B)
	t_4 = (1.0 / B) - t_0
	tmp = 0
	if F <= -8e+209:
		tmp = t_3
	elif F <= -5.5e+149:
		tmp = t_1
	elif F <= -4.2e+105:
		tmp = t_3
	elif F <= 2.65e-61:
		tmp = t_1
	elif F <= 9.2e+80:
		tmp = t_4
	elif F <= 4.2e+100:
		tmp = t_2
	elif F <= 2.3e+212:
		tmp = t_4
	elif F <= 3.5e+280:
		tmp = t_2
	else:
		tmp = (F / (F * B)) - t_0
	return tmp
function code(F, B, x)
	t_0 = Float64(x / tan(B))
	t_1 = Float64(x / Float64(-tan(B)))
	t_2 = Float64(1.0 / sin(B))
	t_3 = Float64(Float64(-1.0 / sin(B)) - Float64(x / B))
	t_4 = Float64(Float64(1.0 / B) - t_0)
	tmp = 0.0
	if (F <= -8e+209)
		tmp = t_3;
	elseif (F <= -5.5e+149)
		tmp = t_1;
	elseif (F <= -4.2e+105)
		tmp = t_3;
	elseif (F <= 2.65e-61)
		tmp = t_1;
	elseif (F <= 9.2e+80)
		tmp = t_4;
	elseif (F <= 4.2e+100)
		tmp = t_2;
	elseif (F <= 2.3e+212)
		tmp = t_4;
	elseif (F <= 3.5e+280)
		tmp = t_2;
	else
		tmp = Float64(Float64(F / Float64(F * B)) - t_0);
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = x / tan(B);
	t_1 = x / -tan(B);
	t_2 = 1.0 / sin(B);
	t_3 = (-1.0 / sin(B)) - (x / B);
	t_4 = (1.0 / B) - t_0;
	tmp = 0.0;
	if (F <= -8e+209)
		tmp = t_3;
	elseif (F <= -5.5e+149)
		tmp = t_1;
	elseif (F <= -4.2e+105)
		tmp = t_3;
	elseif (F <= 2.65e-61)
		tmp = t_1;
	elseif (F <= 9.2e+80)
		tmp = t_4;
	elseif (F <= 4.2e+100)
		tmp = t_2;
	elseif (F <= 2.3e+212)
		tmp = t_4;
	elseif (F <= 3.5e+280)
		tmp = t_2;
	else
		tmp = (F / (F * B)) - t_0;
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision]}, Block[{t$95$2 = N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]}, If[LessEqual[F, -8e+209], t$95$3, If[LessEqual[F, -5.5e+149], t$95$1, If[LessEqual[F, -4.2e+105], t$95$3, If[LessEqual[F, 2.65e-61], t$95$1, If[LessEqual[F, 9.2e+80], t$95$4, If[LessEqual[F, 4.2e+100], t$95$2, If[LessEqual[F, 2.3e+212], t$95$4, If[LessEqual[F, 3.5e+280], t$95$2, N[(N[(F / N[(F * B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
t_1 := \frac{x}{-\tan B}\\
t_2 := \frac{1}{\sin B}\\
t_3 := \frac{-1}{\sin B} - \frac{x}{B}\\
t_4 := \frac{1}{B} - t\_0\\
\mathbf{if}\;F \leq -8 \cdot 10^{+209}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;F \leq -5.5 \cdot 10^{+149}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;F \leq -4.2 \cdot 10^{+105}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;F \leq 2.65 \cdot 10^{-61}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;F \leq 9.2 \cdot 10^{+80}:\\
\;\;\;\;t\_4\\

\mathbf{elif}\;F \leq 4.2 \cdot 10^{+100}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;F \leq 2.3 \cdot 10^{+212}:\\
\;\;\;\;t\_4\\

\mathbf{elif}\;F \leq 3.5 \cdot 10^{+280}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if F < -8.0000000000000006e209 or -5.49999999999999999e149 < F < -4.2000000000000002e105

    1. Initial program 46.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. Add Preprocessing
    3. Taylor expanded in F around -inf 99.8%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    4. Taylor expanded in B around 0 75.5%

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

    if -8.0000000000000006e209 < F < -5.49999999999999999e149 or -4.2000000000000002e105 < F < 2.65e-61

    1. Initial program 98.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 F around -inf 51.4%

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

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

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

        \[\leadsto -\color{blue}{x \cdot \frac{\cos B}{\sin B}} \]
      3. distribute-lft-neg-in71.2%

        \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{\cos B}{\sin B}} \]
    6. Simplified71.2%

      \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{\cos B}{\sin B}} \]
    7. Step-by-step derivation
      1. add-sqr-sqrt19.2%

        \[\leadsto \color{blue}{\left(\sqrt{-x} \cdot \sqrt{-x}\right)} \cdot \frac{\cos B}{\sin B} \]
      2. sqrt-unprod16.2%

        \[\leadsto \color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}} \cdot \frac{\cos B}{\sin B} \]
      3. sqr-neg16.2%

        \[\leadsto \sqrt{\color{blue}{x \cdot x}} \cdot \frac{\cos B}{\sin B} \]
      4. sqrt-unprod1.1%

        \[\leadsto \color{blue}{\left(\sqrt{x} \cdot \sqrt{x}\right)} \cdot \frac{\cos B}{\sin B} \]
      5. add-sqr-sqrt1.9%

        \[\leadsto \color{blue}{x} \cdot \frac{\cos B}{\sin B} \]
      6. clear-num1.9%

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

        \[\leadsto x \cdot \frac{1}{\color{blue}{\tan B}} \]
      8. div-inv1.9%

        \[\leadsto \color{blue}{\frac{x}{\tan B}} \]
      9. frac-2neg1.9%

        \[\leadsto \color{blue}{\frac{-x}{-\tan B}} \]
      10. neg-sub01.9%

        \[\leadsto \frac{\color{blue}{0 - x}}{-\tan B} \]
      11. div-sub1.9%

        \[\leadsto \color{blue}{\frac{0}{-\tan B} - \frac{x}{-\tan B}} \]
      12. add-sqr-sqrt1.1%

        \[\leadsto \frac{0}{-\tan B} - \frac{\color{blue}{\sqrt{x} \cdot \sqrt{x}}}{-\tan B} \]
      13. sqrt-unprod16.2%

        \[\leadsto \frac{0}{-\tan B} - \frac{\color{blue}{\sqrt{x \cdot x}}}{-\tan B} \]
      14. sqr-neg16.2%

        \[\leadsto \frac{0}{-\tan B} - \frac{\sqrt{\color{blue}{\left(-x\right) \cdot \left(-x\right)}}}{-\tan B} \]
      15. sqrt-unprod19.3%

        \[\leadsto \frac{0}{-\tan B} - \frac{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}{-\tan B} \]
      16. add-sqr-sqrt71.4%

        \[\leadsto \frac{0}{-\tan B} - \frac{\color{blue}{-x}}{-\tan B} \]
      17. frac-2neg71.4%

        \[\leadsto \frac{0}{-\tan B} - \color{blue}{\frac{x}{\tan B}} \]
    8. Applied egg-rr71.4%

      \[\leadsto \color{blue}{\frac{0}{-\tan B} - \frac{x}{\tan B}} \]
    9. Step-by-step derivation
      1. div071.4%

        \[\leadsto \color{blue}{0} - \frac{x}{\tan B} \]
      2. neg-sub071.4%

        \[\leadsto \color{blue}{-\frac{x}{\tan B}} \]
      3. distribute-frac-neg271.4%

        \[\leadsto \color{blue}{\frac{x}{-\tan B}} \]
    10. Simplified71.4%

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

    if 2.65e-61 < F < 9.20000000000000016e80 or 4.1999999999999997e100 < F < 2.2999999999999998e212

    1. Initial program 82.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. Simplified86.4%

      \[\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}} \]
    3. Add Preprocessing
    4. Taylor expanded in x around 0 86.5%

      \[\leadsto F \cdot \color{blue}{\left(\frac{1}{\sin B} \cdot \sqrt{\frac{1}{2 + {F}^{2}}}\right)} - \frac{x}{\tan B} \]
    5. Step-by-step derivation
      1. associate-*l/86.6%

        \[\leadsto F \cdot \color{blue}{\frac{1 \cdot \sqrt{\frac{1}{2 + {F}^{2}}}}{\sin B}} - \frac{x}{\tan B} \]
      2. *-lft-identity86.6%

        \[\leadsto F \cdot \frac{\color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}}}{\sin B} - \frac{x}{\tan B} \]
      3. +-commutative86.6%

        \[\leadsto F \cdot \frac{\sqrt{\frac{1}{\color{blue}{{F}^{2} + 2}}}}{\sin B} - \frac{x}{\tan B} \]
      4. unpow286.6%

        \[\leadsto F \cdot \frac{\sqrt{\frac{1}{\color{blue}{F \cdot F} + 2}}}{\sin B} - \frac{x}{\tan B} \]
      5. fma-undefine86.6%

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

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

        \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}}} - \frac{x}{\tan B} \]
      2. un-div-inv86.5%

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

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

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

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

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

      \[\leadsto \frac{F}{\color{blue}{B \cdot \sqrt{2 + {F}^{2}}}} - \frac{x}{\tan B} \]
    10. Step-by-step derivation
      1. +-commutative69.0%

        \[\leadsto \frac{F}{B \cdot \sqrt{\color{blue}{{F}^{2} + 2}}} - \frac{x}{\tan B} \]
      2. unpow269.0%

        \[\leadsto \frac{F}{B \cdot \sqrt{\color{blue}{F \cdot F} + 2}} - \frac{x}{\tan B} \]
      3. fma-undefine69.0%

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

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

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

    if 9.20000000000000016e80 < F < 4.1999999999999997e100 or 2.2999999999999998e212 < F < 3.5000000000000001e280

    1. Initial program 40.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 F around -inf 24.0%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    4. Step-by-step derivation
      1. add-cube-cbrt23.9%

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

        \[\leadsto \color{blue}{{\left(\sqrt[3]{\left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{\sin B}}\right)}^{3}} \]
    5. Applied egg-rr75.7%

      \[\leadsto \color{blue}{{\left(\sqrt[3]{\frac{1}{\sin B} + \frac{x}{\tan B}}\right)}^{3}} \]
    6. Taylor expanded in x around 0 76.8%

      \[\leadsto {\color{blue}{\left(\sqrt[3]{\frac{1}{\sin B}}\right)}}^{3} \]
    7. Taylor expanded in B around inf 77.9%

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

    if 3.5000000000000001e280 < F

    1. Initial program 36.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. Simplified56.4%

      \[\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}} \]
    3. Add Preprocessing
    4. Taylor expanded in x around 0 56.4%

      \[\leadsto F \cdot \color{blue}{\left(\frac{1}{\sin B} \cdot \sqrt{\frac{1}{2 + {F}^{2}}}\right)} - \frac{x}{\tan B} \]
    5. Step-by-step derivation
      1. associate-*l/56.4%

        \[\leadsto F \cdot \color{blue}{\frac{1 \cdot \sqrt{\frac{1}{2 + {F}^{2}}}}{\sin B}} - \frac{x}{\tan B} \]
      2. *-lft-identity56.4%

        \[\leadsto F \cdot \frac{\color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}}}{\sin B} - \frac{x}{\tan B} \]
      3. +-commutative56.4%

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

        \[\leadsto F \cdot \frac{\sqrt{\frac{1}{\color{blue}{F \cdot F} + 2}}}{\sin B} - \frac{x}{\tan B} \]
      5. fma-undefine56.4%

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

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

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

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

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

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

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

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

      \[\leadsto \frac{F}{\color{blue}{B \cdot \sqrt{2 + {F}^{2}}}} - \frac{x}{\tan B} \]
    10. Step-by-step derivation
      1. +-commutative56.4%

        \[\leadsto \frac{F}{B \cdot \sqrt{\color{blue}{{F}^{2} + 2}}} - \frac{x}{\tan B} \]
      2. unpow256.4%

        \[\leadsto \frac{F}{B \cdot \sqrt{\color{blue}{F \cdot F} + 2}} - \frac{x}{\tan B} \]
      3. fma-undefine56.4%

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

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

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

        \[\leadsto \frac{F}{\color{blue}{F \cdot B}} - \frac{x}{\tan B} \]
    14. Simplified82.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -8 \cdot 10^{+209}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq -5.5 \cdot 10^{+149}:\\ \;\;\;\;\frac{x}{-\tan B}\\ \mathbf{elif}\;F \leq -4.2 \cdot 10^{+105}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 2.65 \cdot 10^{-61}:\\ \;\;\;\;\frac{x}{-\tan B}\\ \mathbf{elif}\;F \leq 9.2 \cdot 10^{+80}:\\ \;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 4.2 \cdot 10^{+100}:\\ \;\;\;\;\frac{1}{\sin B}\\ \mathbf{elif}\;F \leq 2.3 \cdot 10^{+212}:\\ \;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 3.5 \cdot 10^{+280}:\\ \;\;\;\;\frac{1}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{F}{F \cdot B} - \frac{x}{\tan B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 63.9% accurate, 2.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x}{-\tan B}\\ t_1 := \frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{if}\;F \leq -1 \cdot 10^{+212}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;F \leq -5.5 \cdot 10^{+149}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;F \leq -4.2 \cdot 10^{+105}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;F \leq 3.2 \cdot 10^{-61}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;F \leq 8.5 \cdot 10^{+78} \lor \neg \left(F \leq 1.5 \cdot 10^{+101}\right) \land \left(F \leq 2.15 \cdot 10^{+212} \lor \neg \left(F \leq 3.9 \cdot 10^{+280}\right)\right):\\ \;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (/ x (- (tan B)))) (t_1 (- (/ -1.0 (sin B)) (/ x B))))
   (if (<= F -1e+212)
     t_1
     (if (<= F -5.5e+149)
       t_0
       (if (<= F -4.2e+105)
         t_1
         (if (<= F 3.2e-61)
           t_0
           (if (or (<= F 8.5e+78)
                   (and (not (<= F 1.5e+101))
                        (or (<= F 2.15e+212) (not (<= F 3.9e+280)))))
             (- (/ 1.0 B) (/ x (tan B)))
             (/ 1.0 (sin B)))))))))
double code(double F, double B, double x) {
	double t_0 = x / -tan(B);
	double t_1 = (-1.0 / sin(B)) - (x / B);
	double tmp;
	if (F <= -1e+212) {
		tmp = t_1;
	} else if (F <= -5.5e+149) {
		tmp = t_0;
	} else if (F <= -4.2e+105) {
		tmp = t_1;
	} else if (F <= 3.2e-61) {
		tmp = t_0;
	} else if ((F <= 8.5e+78) || (!(F <= 1.5e+101) && ((F <= 2.15e+212) || !(F <= 3.9e+280)))) {
		tmp = (1.0 / B) - (x / tan(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) :: t_1
    real(8) :: tmp
    t_0 = x / -tan(b)
    t_1 = ((-1.0d0) / sin(b)) - (x / b)
    if (f <= (-1d+212)) then
        tmp = t_1
    else if (f <= (-5.5d+149)) then
        tmp = t_0
    else if (f <= (-4.2d+105)) then
        tmp = t_1
    else if (f <= 3.2d-61) then
        tmp = t_0
    else if ((f <= 8.5d+78) .or. (.not. (f <= 1.5d+101)) .and. (f <= 2.15d+212) .or. (.not. (f <= 3.9d+280))) then
        tmp = (1.0d0 / b) - (x / tan(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 = x / -Math.tan(B);
	double t_1 = (-1.0 / Math.sin(B)) - (x / B);
	double tmp;
	if (F <= -1e+212) {
		tmp = t_1;
	} else if (F <= -5.5e+149) {
		tmp = t_0;
	} else if (F <= -4.2e+105) {
		tmp = t_1;
	} else if (F <= 3.2e-61) {
		tmp = t_0;
	} else if ((F <= 8.5e+78) || (!(F <= 1.5e+101) && ((F <= 2.15e+212) || !(F <= 3.9e+280)))) {
		tmp = (1.0 / B) - (x / Math.tan(B));
	} else {
		tmp = 1.0 / Math.sin(B);
	}
	return tmp;
}
def code(F, B, x):
	t_0 = x / -math.tan(B)
	t_1 = (-1.0 / math.sin(B)) - (x / B)
	tmp = 0
	if F <= -1e+212:
		tmp = t_1
	elif F <= -5.5e+149:
		tmp = t_0
	elif F <= -4.2e+105:
		tmp = t_1
	elif F <= 3.2e-61:
		tmp = t_0
	elif (F <= 8.5e+78) or (not (F <= 1.5e+101) and ((F <= 2.15e+212) or not (F <= 3.9e+280))):
		tmp = (1.0 / B) - (x / math.tan(B))
	else:
		tmp = 1.0 / math.sin(B)
	return tmp
function code(F, B, x)
	t_0 = Float64(x / Float64(-tan(B)))
	t_1 = Float64(Float64(-1.0 / sin(B)) - Float64(x / B))
	tmp = 0.0
	if (F <= -1e+212)
		tmp = t_1;
	elseif (F <= -5.5e+149)
		tmp = t_0;
	elseif (F <= -4.2e+105)
		tmp = t_1;
	elseif (F <= 3.2e-61)
		tmp = t_0;
	elseif ((F <= 8.5e+78) || (!(F <= 1.5e+101) && ((F <= 2.15e+212) || !(F <= 3.9e+280))))
		tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B)));
	else
		tmp = Float64(1.0 / sin(B));
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = x / -tan(B);
	t_1 = (-1.0 / sin(B)) - (x / B);
	tmp = 0.0;
	if (F <= -1e+212)
		tmp = t_1;
	elseif (F <= -5.5e+149)
		tmp = t_0;
	elseif (F <= -4.2e+105)
		tmp = t_1;
	elseif (F <= 3.2e-61)
		tmp = t_0;
	elseif ((F <= 8.5e+78) || (~((F <= 1.5e+101)) && ((F <= 2.15e+212) || ~((F <= 3.9e+280)))))
		tmp = (1.0 / B) - (x / tan(B));
	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]}, Block[{t$95$1 = N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1e+212], t$95$1, If[LessEqual[F, -5.5e+149], t$95$0, If[LessEqual[F, -4.2e+105], t$95$1, If[LessEqual[F, 3.2e-61], t$95$0, If[Or[LessEqual[F, 8.5e+78], And[N[Not[LessEqual[F, 1.5e+101]], $MachinePrecision], Or[LessEqual[F, 2.15e+212], N[Not[LessEqual[F, 3.9e+280]], $MachinePrecision]]]], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;F \leq -5.5 \cdot 10^{+149}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;F \leq -4.2 \cdot 10^{+105}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;F \leq 3.2 \cdot 10^{-61}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;F \leq 8.5 \cdot 10^{+78} \lor \neg \left(F \leq 1.5 \cdot 10^{+101}\right) \land \left(F \leq 2.15 \cdot 10^{+212} \lor \neg \left(F \leq 3.9 \cdot 10^{+280}\right)\right):\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if F < -9.9999999999999991e211 or -5.49999999999999999e149 < F < -4.2000000000000002e105

    1. Initial program 46.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. Add Preprocessing
    3. Taylor expanded in F around -inf 99.8%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    4. Taylor expanded in B around 0 75.5%

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

    if -9.9999999999999991e211 < F < -5.49999999999999999e149 or -4.2000000000000002e105 < F < 3.2000000000000001e-61

    1. Initial program 98.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 F around -inf 51.4%

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

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

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

        \[\leadsto -\color{blue}{x \cdot \frac{\cos B}{\sin B}} \]
      3. distribute-lft-neg-in71.2%

        \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{\cos B}{\sin B}} \]
    6. Simplified71.2%

      \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{\cos B}{\sin B}} \]
    7. Step-by-step derivation
      1. add-sqr-sqrt19.2%

        \[\leadsto \color{blue}{\left(\sqrt{-x} \cdot \sqrt{-x}\right)} \cdot \frac{\cos B}{\sin B} \]
      2. sqrt-unprod16.2%

        \[\leadsto \color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}} \cdot \frac{\cos B}{\sin B} \]
      3. sqr-neg16.2%

        \[\leadsto \sqrt{\color{blue}{x \cdot x}} \cdot \frac{\cos B}{\sin B} \]
      4. sqrt-unprod1.1%

        \[\leadsto \color{blue}{\left(\sqrt{x} \cdot \sqrt{x}\right)} \cdot \frac{\cos B}{\sin B} \]
      5. add-sqr-sqrt1.9%

        \[\leadsto \color{blue}{x} \cdot \frac{\cos B}{\sin B} \]
      6. clear-num1.9%

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

        \[\leadsto x \cdot \frac{1}{\color{blue}{\tan B}} \]
      8. div-inv1.9%

        \[\leadsto \color{blue}{\frac{x}{\tan B}} \]
      9. frac-2neg1.9%

        \[\leadsto \color{blue}{\frac{-x}{-\tan B}} \]
      10. neg-sub01.9%

        \[\leadsto \frac{\color{blue}{0 - x}}{-\tan B} \]
      11. div-sub1.9%

        \[\leadsto \color{blue}{\frac{0}{-\tan B} - \frac{x}{-\tan B}} \]
      12. add-sqr-sqrt1.1%

        \[\leadsto \frac{0}{-\tan B} - \frac{\color{blue}{\sqrt{x} \cdot \sqrt{x}}}{-\tan B} \]
      13. sqrt-unprod16.2%

        \[\leadsto \frac{0}{-\tan B} - \frac{\color{blue}{\sqrt{x \cdot x}}}{-\tan B} \]
      14. sqr-neg16.2%

        \[\leadsto \frac{0}{-\tan B} - \frac{\sqrt{\color{blue}{\left(-x\right) \cdot \left(-x\right)}}}{-\tan B} \]
      15. sqrt-unprod19.3%

        \[\leadsto \frac{0}{-\tan B} - \frac{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}{-\tan B} \]
      16. add-sqr-sqrt71.4%

        \[\leadsto \frac{0}{-\tan B} - \frac{\color{blue}{-x}}{-\tan B} \]
      17. frac-2neg71.4%

        \[\leadsto \frac{0}{-\tan B} - \color{blue}{\frac{x}{\tan B}} \]
    8. Applied egg-rr71.4%

      \[\leadsto \color{blue}{\frac{0}{-\tan B} - \frac{x}{\tan B}} \]
    9. Step-by-step derivation
      1. div071.4%

        \[\leadsto \color{blue}{0} - \frac{x}{\tan B} \]
      2. neg-sub071.4%

        \[\leadsto \color{blue}{-\frac{x}{\tan B}} \]
      3. distribute-frac-neg271.4%

        \[\leadsto \color{blue}{\frac{x}{-\tan B}} \]
    10. Simplified71.4%

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

    if 3.2000000000000001e-61 < F < 8.50000000000000079e78 or 1.49999999999999997e101 < F < 2.1499999999999998e212 or 3.90000000000000029e280 < F

    1. Initial program 73.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. Simplified80.4%

      \[\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}} \]
    3. Add Preprocessing
    4. Taylor expanded in x around 0 80.5%

      \[\leadsto F \cdot \color{blue}{\left(\frac{1}{\sin B} \cdot \sqrt{\frac{1}{2 + {F}^{2}}}\right)} - \frac{x}{\tan B} \]
    5. Step-by-step derivation
      1. associate-*l/80.5%

        \[\leadsto F \cdot \color{blue}{\frac{1 \cdot \sqrt{\frac{1}{2 + {F}^{2}}}}{\sin B}} - \frac{x}{\tan B} \]
      2. *-lft-identity80.5%

        \[\leadsto F \cdot \frac{\color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}}}{\sin B} - \frac{x}{\tan B} \]
      3. +-commutative80.5%

        \[\leadsto F \cdot \frac{\sqrt{\frac{1}{\color{blue}{{F}^{2} + 2}}}}{\sin B} - \frac{x}{\tan B} \]
      4. unpow280.5%

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

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

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

        \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}}} - \frac{x}{\tan B} \]
      2. un-div-inv80.5%

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

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

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

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

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

      \[\leadsto \frac{F}{\color{blue}{B \cdot \sqrt{2 + {F}^{2}}}} - \frac{x}{\tan B} \]
    10. Step-by-step derivation
      1. +-commutative66.5%

        \[\leadsto \frac{F}{B \cdot \sqrt{\color{blue}{{F}^{2} + 2}}} - \frac{x}{\tan B} \]
      2. unpow266.5%

        \[\leadsto \frac{F}{B \cdot \sqrt{\color{blue}{F \cdot F} + 2}} - \frac{x}{\tan B} \]
      3. fma-undefine66.5%

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

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

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

    if 8.50000000000000079e78 < F < 1.49999999999999997e101 or 2.1499999999999998e212 < F < 3.90000000000000029e280

    1. Initial program 40.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 F around -inf 24.0%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    4. Step-by-step derivation
      1. add-cube-cbrt23.9%

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

        \[\leadsto \color{blue}{{\left(\sqrt[3]{\left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{\sin B}}\right)}^{3}} \]
    5. Applied egg-rr75.7%

      \[\leadsto \color{blue}{{\left(\sqrt[3]{\frac{1}{\sin B} + \frac{x}{\tan B}}\right)}^{3}} \]
    6. Taylor expanded in x around 0 76.8%

      \[\leadsto {\color{blue}{\left(\sqrt[3]{\frac{1}{\sin B}}\right)}}^{3} \]
    7. Taylor expanded in B around inf 77.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1 \cdot 10^{+212}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq -5.5 \cdot 10^{+149}:\\ \;\;\;\;\frac{x}{-\tan B}\\ \mathbf{elif}\;F \leq -4.2 \cdot 10^{+105}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 3.2 \cdot 10^{-61}:\\ \;\;\;\;\frac{x}{-\tan B}\\ \mathbf{elif}\;F \leq 8.5 \cdot 10^{+78} \lor \neg \left(F \leq 1.5 \cdot 10^{+101}\right) \land \left(F \leq 2.15 \cdot 10^{+212} \lor \neg \left(F \leq 3.9 \cdot 10^{+280}\right)\right):\\ \;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 66.4% 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 -4.5 \cdot 10^{-152}:\\ \;\;\;\;\frac{F}{B \cdot \left(-F\right)} - t\_1\\ \mathbf{elif}\;F \leq -8.5 \cdot 10^{-196}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;F \leq 9 \cdot 10^{-200}:\\ \;\;\;\;\frac{x}{-\tan B}\\ \mathbf{elif}\;F \leq 9.2 \cdot 10^{-145}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;F \leq 3.2 \cdot 10^{-61}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B}\\ \mathbf{elif}\;F \leq 2.3 \cdot 10^{+212}:\\ \;\;\;\;\frac{1}{B} - t\_1\\ \mathbf{elif}\;F \leq 3.9 \cdot 10^{+280}:\\ \;\;\;\;\frac{1}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{F}{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 -4.5e-152)
     (- (/ F (* B (- F))) t_1)
     (if (<= F -8.5e-196)
       t_0
       (if (<= F 9e-200)
         (/ x (- (tan B)))
         (if (<= F 9.2e-145)
           t_0
           (if (<= F 3.2e-61)
             (* x (/ -1.0 (tan B)))
             (if (<= F 2.3e+212)
               (- (/ 1.0 B) t_1)
               (if (<= F 3.9e+280)
                 (/ 1.0 (sin B))
                 (- (/ F (* 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 <= -4.5e-152) {
		tmp = (F / (B * -F)) - t_1;
	} else if (F <= -8.5e-196) {
		tmp = t_0;
	} else if (F <= 9e-200) {
		tmp = x / -tan(B);
	} else if (F <= 9.2e-145) {
		tmp = t_0;
	} else if (F <= 3.2e-61) {
		tmp = x * (-1.0 / tan(B));
	} else if (F <= 2.3e+212) {
		tmp = (1.0 / B) - t_1;
	} else if (F <= 3.9e+280) {
		tmp = 1.0 / sin(B);
	} else {
		tmp = (F / (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 <= (-4.5d-152)) then
        tmp = (f / (b * -f)) - t_1
    else if (f <= (-8.5d-196)) then
        tmp = t_0
    else if (f <= 9d-200) then
        tmp = x / -tan(b)
    else if (f <= 9.2d-145) then
        tmp = t_0
    else if (f <= 3.2d-61) then
        tmp = x * ((-1.0d0) / tan(b))
    else if (f <= 2.3d+212) then
        tmp = (1.0d0 / b) - t_1
    else if (f <= 3.9d+280) then
        tmp = 1.0d0 / sin(b)
    else
        tmp = (f / (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 <= -4.5e-152) {
		tmp = (F / (B * -F)) - t_1;
	} else if (F <= -8.5e-196) {
		tmp = t_0;
	} else if (F <= 9e-200) {
		tmp = x / -Math.tan(B);
	} else if (F <= 9.2e-145) {
		tmp = t_0;
	} else if (F <= 3.2e-61) {
		tmp = x * (-1.0 / Math.tan(B));
	} else if (F <= 2.3e+212) {
		tmp = (1.0 / B) - t_1;
	} else if (F <= 3.9e+280) {
		tmp = 1.0 / Math.sin(B);
	} else {
		tmp = (F / (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 <= -4.5e-152:
		tmp = (F / (B * -F)) - t_1
	elif F <= -8.5e-196:
		tmp = t_0
	elif F <= 9e-200:
		tmp = x / -math.tan(B)
	elif F <= 9.2e-145:
		tmp = t_0
	elif F <= 3.2e-61:
		tmp = x * (-1.0 / math.tan(B))
	elif F <= 2.3e+212:
		tmp = (1.0 / B) - t_1
	elif F <= 3.9e+280:
		tmp = 1.0 / math.sin(B)
	else:
		tmp = (F / (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 <= -4.5e-152)
		tmp = Float64(Float64(F / Float64(B * Float64(-F))) - t_1);
	elseif (F <= -8.5e-196)
		tmp = t_0;
	elseif (F <= 9e-200)
		tmp = Float64(x / Float64(-tan(B)));
	elseif (F <= 9.2e-145)
		tmp = t_0;
	elseif (F <= 3.2e-61)
		tmp = Float64(x * Float64(-1.0 / tan(B)));
	elseif (F <= 2.3e+212)
		tmp = Float64(Float64(1.0 / B) - t_1);
	elseif (F <= 3.9e+280)
		tmp = Float64(1.0 / sin(B));
	else
		tmp = Float64(Float64(F / 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 <= -4.5e-152)
		tmp = (F / (B * -F)) - t_1;
	elseif (F <= -8.5e-196)
		tmp = t_0;
	elseif (F <= 9e-200)
		tmp = x / -tan(B);
	elseif (F <= 9.2e-145)
		tmp = t_0;
	elseif (F <= 3.2e-61)
		tmp = x * (-1.0 / tan(B));
	elseif (F <= 2.3e+212)
		tmp = (1.0 / B) - t_1;
	elseif (F <= 3.9e+280)
		tmp = 1.0 / sin(B);
	else
		tmp = (F / (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, -4.5e-152], N[(N[(F / N[(B * (-F)), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -8.5e-196], t$95$0, If[LessEqual[F, 9e-200], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 9.2e-145], t$95$0, If[LessEqual[F, 3.2e-61], N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.3e+212], N[(N[(1.0 / B), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 3.9e+280], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(F / N[(F * B), $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 -4.5 \cdot 10^{-152}:\\
\;\;\;\;\frac{F}{B \cdot \left(-F\right)} - t\_1\\

\mathbf{elif}\;F \leq -8.5 \cdot 10^{-196}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;F \leq 9 \cdot 10^{-200}:\\
\;\;\;\;\frac{x}{-\tan B}\\

\mathbf{elif}\;F \leq 9.2 \cdot 10^{-145}:\\
\;\;\;\;t\_0\\

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

\mathbf{elif}\;F \leq 2.3 \cdot 10^{+212}:\\
\;\;\;\;\frac{1}{B} - t\_1\\

\mathbf{elif}\;F \leq 3.9 \cdot 10^{+280}:\\
\;\;\;\;\frac{1}{\sin B}\\

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


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

    1. Initial program 78.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. Simplified84.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}} \]
    3. Add Preprocessing
    4. Taylor expanded in x around 0 84.6%

      \[\leadsto F \cdot \color{blue}{\left(\frac{1}{\sin B} \cdot \sqrt{\frac{1}{2 + {F}^{2}}}\right)} - \frac{x}{\tan B} \]
    5. Step-by-step derivation
      1. associate-*l/84.5%

        \[\leadsto F \cdot \color{blue}{\frac{1 \cdot \sqrt{\frac{1}{2 + {F}^{2}}}}{\sin B}} - \frac{x}{\tan B} \]
      2. *-lft-identity84.5%

        \[\leadsto F \cdot \frac{\color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}}}{\sin B} - \frac{x}{\tan B} \]
      3. +-commutative84.5%

        \[\leadsto F \cdot \frac{\sqrt{\frac{1}{\color{blue}{{F}^{2} + 2}}}}{\sin B} - \frac{x}{\tan B} \]
      4. unpow284.5%

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

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

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

        \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}}} - \frac{x}{\tan B} \]
      2. un-div-inv84.5%

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

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

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

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

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

      \[\leadsto \frac{F}{\color{blue}{B \cdot \sqrt{2 + {F}^{2}}}} - \frac{x}{\tan B} \]
    10. Step-by-step derivation
      1. +-commutative72.5%

        \[\leadsto \frac{F}{B \cdot \sqrt{\color{blue}{{F}^{2} + 2}}} - \frac{x}{\tan B} \]
      2. unpow272.5%

        \[\leadsto \frac{F}{B \cdot \sqrt{\color{blue}{F \cdot F} + 2}} - \frac{x}{\tan B} \]
      3. fma-undefine72.5%

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

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

      \[\leadsto \frac{F}{\color{blue}{-1 \cdot \left(B \cdot F\right)}} - \frac{x}{\tan B} \]
    13. Step-by-step derivation
      1. associate-*r*77.1%

        \[\leadsto \frac{F}{\color{blue}{\left(-1 \cdot B\right) \cdot F}} - \frac{x}{\tan B} \]
      2. neg-mul-177.1%

        \[\leadsto \frac{F}{\color{blue}{\left(-B\right)} \cdot F} - \frac{x}{\tan B} \]
    14. Simplified77.1%

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

    if -4.5000000000000004e-152 < F < -8.50000000000000004e-196 or 9.0000000000000004e-200 < F < 9.20000000000000028e-145

    1. Initial program 99.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. Simplified99.4%

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

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

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

    if -8.50000000000000004e-196 < F < 9.0000000000000004e-200

    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. Add Preprocessing
    3. Taylor expanded in F around -inf 38.2%

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

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

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

        \[\leadsto -\color{blue}{x \cdot \frac{\cos B}{\sin B}} \]
      3. distribute-lft-neg-in94.0%

        \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{\cos B}{\sin B}} \]
    6. Simplified94.0%

      \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{\cos B}{\sin B}} \]
    7. Step-by-step derivation
      1. add-sqr-sqrt26.6%

        \[\leadsto \color{blue}{\left(\sqrt{-x} \cdot \sqrt{-x}\right)} \cdot \frac{\cos B}{\sin B} \]
      2. sqrt-unprod20.8%

        \[\leadsto \color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}} \cdot \frac{\cos B}{\sin B} \]
      3. sqr-neg20.8%

        \[\leadsto \sqrt{\color{blue}{x \cdot x}} \cdot \frac{\cos B}{\sin B} \]
      4. sqrt-unprod0.8%

        \[\leadsto \color{blue}{\left(\sqrt{x} \cdot \sqrt{x}\right)} \cdot \frac{\cos B}{\sin B} \]
      5. add-sqr-sqrt1.7%

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

        \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{\sin B}{\cos B}}} \]
      7. tan-quot1.7%

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

        \[\leadsto \color{blue}{\frac{x}{\tan B}} \]
      9. frac-2neg1.7%

        \[\leadsto \color{blue}{\frac{-x}{-\tan B}} \]
      10. neg-sub01.7%

        \[\leadsto \frac{\color{blue}{0 - x}}{-\tan B} \]
      11. div-sub1.7%

        \[\leadsto \color{blue}{\frac{0}{-\tan B} - \frac{x}{-\tan B}} \]
      12. add-sqr-sqrt0.8%

        \[\leadsto \frac{0}{-\tan B} - \frac{\color{blue}{\sqrt{x} \cdot \sqrt{x}}}{-\tan B} \]
      13. sqrt-unprod20.8%

        \[\leadsto \frac{0}{-\tan B} - \frac{\color{blue}{\sqrt{x \cdot x}}}{-\tan B} \]
      14. sqr-neg20.8%

        \[\leadsto \frac{0}{-\tan B} - \frac{\sqrt{\color{blue}{\left(-x\right) \cdot \left(-x\right)}}}{-\tan B} \]
      15. sqrt-unprod26.8%

        \[\leadsto \frac{0}{-\tan B} - \frac{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}{-\tan B} \]
      16. add-sqr-sqrt94.2%

        \[\leadsto \frac{0}{-\tan B} - \frac{\color{blue}{-x}}{-\tan B} \]
      17. frac-2neg94.2%

        \[\leadsto \frac{0}{-\tan B} - \color{blue}{\frac{x}{\tan B}} \]
    8. Applied egg-rr94.2%

      \[\leadsto \color{blue}{\frac{0}{-\tan B} - \frac{x}{\tan B}} \]
    9. Step-by-step derivation
      1. div094.2%

        \[\leadsto \color{blue}{0} - \frac{x}{\tan B} \]
      2. neg-sub094.2%

        \[\leadsto \color{blue}{-\frac{x}{\tan B}} \]
      3. distribute-frac-neg294.2%

        \[\leadsto \color{blue}{\frac{x}{-\tan B}} \]
    10. Simplified94.2%

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

    if 9.20000000000000028e-145 < F < 3.2000000000000001e-61

    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 F around -inf 29.5%

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

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

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

        \[\leadsto -\color{blue}{x \cdot \frac{\cos B}{\sin B}} \]
      3. distribute-lft-neg-in65.9%

        \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{\cos B}{\sin B}} \]
    6. Simplified65.9%

      \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{\cos B}{\sin B}} \]
    7. Step-by-step derivation
      1. clear-num65.9%

        \[\leadsto \left(-x\right) \cdot \color{blue}{\frac{1}{\frac{\sin B}{\cos B}}} \]
      2. tan-quot65.8%

        \[\leadsto \left(-x\right) \cdot \frac{1}{\color{blue}{\tan B}} \]
      3. *-un-lft-identity65.8%

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

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

        \[\leadsto \left(-x\right) \cdot \color{blue}{\frac{1}{\tan B}} \]
    10. Simplified65.8%

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

    if 3.2000000000000001e-61 < F < 2.2999999999999998e212

    1. Initial program 84.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. Simplified88.2%

      \[\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}} \]
    3. Add Preprocessing
    4. Taylor expanded in x around 0 88.3%

      \[\leadsto F \cdot \color{blue}{\left(\frac{1}{\sin B} \cdot \sqrt{\frac{1}{2 + {F}^{2}}}\right)} - \frac{x}{\tan B} \]
    5. Step-by-step derivation
      1. associate-*l/88.3%

        \[\leadsto F \cdot \color{blue}{\frac{1 \cdot \sqrt{\frac{1}{2 + {F}^{2}}}}{\sin B}} - \frac{x}{\tan B} \]
      2. *-lft-identity88.3%

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

        \[\leadsto F \cdot \frac{\sqrt{\frac{1}{\color{blue}{{F}^{2} + 2}}}}{\sin B} - \frac{x}{\tan B} \]
      4. unpow288.3%

        \[\leadsto F \cdot \frac{\sqrt{\frac{1}{\color{blue}{F \cdot F} + 2}}}{\sin B} - \frac{x}{\tan B} \]
      5. fma-undefine88.3%

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

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

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

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

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

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

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

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

      \[\leadsto \frac{F}{\color{blue}{B \cdot \sqrt{2 + {F}^{2}}}} - \frac{x}{\tan B} \]
    10. Step-by-step derivation
      1. +-commutative63.8%

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

        \[\leadsto \frac{F}{B \cdot \sqrt{\color{blue}{F \cdot F} + 2}} - \frac{x}{\tan B} \]
      3. fma-undefine63.8%

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

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

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

    if 2.2999999999999998e212 < F < 3.90000000000000029e280

    1. Initial program 18.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 F around -inf 27.1%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    4. Step-by-step derivation
      1. add-cube-cbrt27.0%

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

        \[\leadsto \color{blue}{{\left(\sqrt[3]{\left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{\sin B}}\right)}^{3}} \]
    5. Applied egg-rr72.6%

      \[\leadsto \color{blue}{{\left(\sqrt[3]{\frac{1}{\sin B} + \frac{x}{\tan B}}\right)}^{3}} \]
    6. Taylor expanded in x around 0 73.9%

      \[\leadsto {\color{blue}{\left(\sqrt[3]{\frac{1}{\sin B}}\right)}}^{3} \]
    7. Taylor expanded in B around inf 74.9%

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

    if 3.90000000000000029e280 < F

    1. Initial program 36.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. Simplified56.4%

      \[\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}} \]
    3. Add Preprocessing
    4. Taylor expanded in x around 0 56.4%

      \[\leadsto F \cdot \color{blue}{\left(\frac{1}{\sin B} \cdot \sqrt{\frac{1}{2 + {F}^{2}}}\right)} - \frac{x}{\tan B} \]
    5. Step-by-step derivation
      1. associate-*l/56.4%

        \[\leadsto F \cdot \color{blue}{\frac{1 \cdot \sqrt{\frac{1}{2 + {F}^{2}}}}{\sin B}} - \frac{x}{\tan B} \]
      2. *-lft-identity56.4%

        \[\leadsto F \cdot \frac{\color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}}}{\sin B} - \frac{x}{\tan B} \]
      3. +-commutative56.4%

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

        \[\leadsto F \cdot \frac{\sqrt{\frac{1}{\color{blue}{F \cdot F} + 2}}}{\sin B} - \frac{x}{\tan B} \]
      5. fma-undefine56.4%

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

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

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

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

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

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

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

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

      \[\leadsto \frac{F}{\color{blue}{B \cdot \sqrt{2 + {F}^{2}}}} - \frac{x}{\tan B} \]
    10. Step-by-step derivation
      1. +-commutative56.4%

        \[\leadsto \frac{F}{B \cdot \sqrt{\color{blue}{{F}^{2} + 2}}} - \frac{x}{\tan B} \]
      2. unpow256.4%

        \[\leadsto \frac{F}{B \cdot \sqrt{\color{blue}{F \cdot F} + 2}} - \frac{x}{\tan B} \]
      3. fma-undefine56.4%

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

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

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

        \[\leadsto \frac{F}{\color{blue}{F \cdot B}} - \frac{x}{\tan B} \]
    14. Simplified82.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -4.5 \cdot 10^{-152}:\\ \;\;\;\;\frac{F}{B \cdot \left(-F\right)} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -8.5 \cdot 10^{-196}:\\ \;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\ \mathbf{elif}\;F \leq 9 \cdot 10^{-200}:\\ \;\;\;\;\frac{x}{-\tan B}\\ \mathbf{elif}\;F \leq 9.2 \cdot 10^{-145}:\\ \;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\ \mathbf{elif}\;F \leq 3.2 \cdot 10^{-61}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B}\\ \mathbf{elif}\;F \leq 2.3 \cdot 10^{+212}:\\ \;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 3.9 \cdot 10^{+280}:\\ \;\;\;\;\frac{1}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{F}{F \cdot B} - \frac{x}{\tan B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 61.0% accurate, 2.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x}{-\tan B}\\ \mathbf{if}\;F \leq -1.25 \cdot 10^{+149}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;F \leq -4.1 \cdot 10^{+83}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 2.85 \cdot 10^{-61}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;F \leq 4.4 \cdot 10^{+76} \lor \neg \left(F \leq 6.2 \cdot 10^{+100} \lor \neg \left(F \leq 2.3 \cdot 10^{+212}\right) \land F \leq 3.9 \cdot 10^{+280}\right):\\ \;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (/ x (- (tan B)))))
   (if (<= F -1.25e+149)
     t_0
     (if (<= F -4.1e+83)
       (/ (- -1.0 x) B)
       (if (<= F 2.85e-61)
         t_0
         (if (or (<= F 4.4e+76)
                 (not
                  (or (<= F 6.2e+100)
                      (and (not (<= F 2.3e+212)) (<= F 3.9e+280)))))
           (- (/ 1.0 B) (/ x (tan B)))
           (/ 1.0 (sin B))))))))
double code(double F, double B, double x) {
	double t_0 = x / -tan(B);
	double tmp;
	if (F <= -1.25e+149) {
		tmp = t_0;
	} else if (F <= -4.1e+83) {
		tmp = (-1.0 - x) / B;
	} else if (F <= 2.85e-61) {
		tmp = t_0;
	} else if ((F <= 4.4e+76) || !((F <= 6.2e+100) || (!(F <= 2.3e+212) && (F <= 3.9e+280)))) {
		tmp = (1.0 / B) - (x / tan(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 = x / -tan(b)
    if (f <= (-1.25d+149)) then
        tmp = t_0
    else if (f <= (-4.1d+83)) then
        tmp = ((-1.0d0) - x) / b
    else if (f <= 2.85d-61) then
        tmp = t_0
    else if ((f <= 4.4d+76) .or. (.not. (f <= 6.2d+100) .or. (.not. (f <= 2.3d+212)) .and. (f <= 3.9d+280))) then
        tmp = (1.0d0 / b) - (x / tan(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 = x / -Math.tan(B);
	double tmp;
	if (F <= -1.25e+149) {
		tmp = t_0;
	} else if (F <= -4.1e+83) {
		tmp = (-1.0 - x) / B;
	} else if (F <= 2.85e-61) {
		tmp = t_0;
	} else if ((F <= 4.4e+76) || !((F <= 6.2e+100) || (!(F <= 2.3e+212) && (F <= 3.9e+280)))) {
		tmp = (1.0 / B) - (x / Math.tan(B));
	} else {
		tmp = 1.0 / Math.sin(B);
	}
	return tmp;
}
def code(F, B, x):
	t_0 = x / -math.tan(B)
	tmp = 0
	if F <= -1.25e+149:
		tmp = t_0
	elif F <= -4.1e+83:
		tmp = (-1.0 - x) / B
	elif F <= 2.85e-61:
		tmp = t_0
	elif (F <= 4.4e+76) or not ((F <= 6.2e+100) or (not (F <= 2.3e+212) and (F <= 3.9e+280))):
		tmp = (1.0 / B) - (x / math.tan(B))
	else:
		tmp = 1.0 / math.sin(B)
	return tmp
function code(F, B, x)
	t_0 = Float64(x / Float64(-tan(B)))
	tmp = 0.0
	if (F <= -1.25e+149)
		tmp = t_0;
	elseif (F <= -4.1e+83)
		tmp = Float64(Float64(-1.0 - x) / B);
	elseif (F <= 2.85e-61)
		tmp = t_0;
	elseif ((F <= 4.4e+76) || !((F <= 6.2e+100) || (!(F <= 2.3e+212) && (F <= 3.9e+280))))
		tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B)));
	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 <= -1.25e+149)
		tmp = t_0;
	elseif (F <= -4.1e+83)
		tmp = (-1.0 - x) / B;
	elseif (F <= 2.85e-61)
		tmp = t_0;
	elseif ((F <= 4.4e+76) || ~(((F <= 6.2e+100) || (~((F <= 2.3e+212)) && (F <= 3.9e+280)))))
		tmp = (1.0 / B) - (x / tan(B));
	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, -1.25e+149], t$95$0, If[LessEqual[F, -4.1e+83], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2.85e-61], t$95$0, If[Or[LessEqual[F, 4.4e+76], N[Not[Or[LessEqual[F, 6.2e+100], And[N[Not[LessEqual[F, 2.3e+212]], $MachinePrecision], LessEqual[F, 3.9e+280]]]], $MachinePrecision]], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;F \leq -4.1 \cdot 10^{+83}:\\
\;\;\;\;\frac{-1 - x}{B}\\

\mathbf{elif}\;F \leq 2.85 \cdot 10^{-61}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;F \leq 4.4 \cdot 10^{+76} \lor \neg \left(F \leq 6.2 \cdot 10^{+100} \lor \neg \left(F \leq 2.3 \cdot 10^{+212}\right) \land F \leq 3.9 \cdot 10^{+280}\right):\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if F < -1.24999999999999998e149 or -4.1000000000000001e83 < F < 2.85000000000000003e-61

    1. Initial program 87.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 F around -inf 58.1%

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

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

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

        \[\leadsto -\color{blue}{x \cdot \frac{\cos B}{\sin B}} \]
      3. distribute-lft-neg-in66.7%

        \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{\cos B}{\sin B}} \]
    6. Simplified66.7%

      \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{\cos B}{\sin B}} \]
    7. Step-by-step derivation
      1. add-sqr-sqrt21.1%

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

        \[\leadsto \color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}} \cdot \frac{\cos B}{\sin B} \]
      3. sqr-neg18.1%

        \[\leadsto \sqrt{\color{blue}{x \cdot x}} \cdot \frac{\cos B}{\sin B} \]
      4. sqrt-unprod1.1%

        \[\leadsto \color{blue}{\left(\sqrt{x} \cdot \sqrt{x}\right)} \cdot \frac{\cos B}{\sin B} \]
      5. add-sqr-sqrt2.0%

        \[\leadsto \color{blue}{x} \cdot \frac{\cos B}{\sin B} \]
      6. clear-num2.0%

        \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{\sin B}{\cos B}}} \]
      7. tan-quot2.0%

        \[\leadsto x \cdot \frac{1}{\color{blue}{\tan B}} \]
      8. div-inv2.0%

        \[\leadsto \color{blue}{\frac{x}{\tan B}} \]
      9. frac-2neg2.0%

        \[\leadsto \color{blue}{\frac{-x}{-\tan B}} \]
      10. neg-sub02.0%

        \[\leadsto \frac{\color{blue}{0 - x}}{-\tan B} \]
      11. div-sub2.0%

        \[\leadsto \color{blue}{\frac{0}{-\tan B} - \frac{x}{-\tan B}} \]
      12. add-sqr-sqrt1.1%

        \[\leadsto \frac{0}{-\tan B} - \frac{\color{blue}{\sqrt{x} \cdot \sqrt{x}}}{-\tan B} \]
      13. sqrt-unprod18.2%

        \[\leadsto \frac{0}{-\tan B} - \frac{\color{blue}{\sqrt{x \cdot x}}}{-\tan B} \]
      14. sqr-neg18.2%

        \[\leadsto \frac{0}{-\tan B} - \frac{\sqrt{\color{blue}{\left(-x\right) \cdot \left(-x\right)}}}{-\tan B} \]
      15. sqrt-unprod21.2%

        \[\leadsto \frac{0}{-\tan B} - \frac{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}{-\tan B} \]
      16. add-sqr-sqrt66.9%

        \[\leadsto \frac{0}{-\tan B} - \frac{\color{blue}{-x}}{-\tan B} \]
      17. frac-2neg66.9%

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

      \[\leadsto \color{blue}{\frac{0}{-\tan B} - \frac{x}{\tan B}} \]
    9. Step-by-step derivation
      1. div066.9%

        \[\leadsto \color{blue}{0} - \frac{x}{\tan B} \]
      2. neg-sub066.9%

        \[\leadsto \color{blue}{-\frac{x}{\tan B}} \]
      3. distribute-frac-neg266.9%

        \[\leadsto \color{blue}{\frac{x}{-\tan B}} \]
    10. Simplified66.9%

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

    if -1.24999999999999998e149 < F < -4.1000000000000001e83

    1. Initial program 82.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. Add Preprocessing
    3. Taylor expanded in F around -inf 99.9%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    4. Taylor expanded in B around 0 71.5%

      \[\leadsto \color{blue}{-1 \cdot \frac{1 + x}{B}} \]
    5. Step-by-step derivation
      1. mul-1-neg71.5%

        \[\leadsto \color{blue}{-\frac{1 + x}{B}} \]
      2. distribute-neg-frac271.5%

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

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

    if 2.85000000000000003e-61 < F < 4.4000000000000001e76 or 6.20000000000000014e100 < F < 2.2999999999999998e212 or 3.90000000000000029e280 < F

    1. Initial program 73.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. Simplified80.4%

      \[\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}} \]
    3. Add Preprocessing
    4. Taylor expanded in x around 0 80.5%

      \[\leadsto F \cdot \color{blue}{\left(\frac{1}{\sin B} \cdot \sqrt{\frac{1}{2 + {F}^{2}}}\right)} - \frac{x}{\tan B} \]
    5. Step-by-step derivation
      1. associate-*l/80.5%

        \[\leadsto F \cdot \color{blue}{\frac{1 \cdot \sqrt{\frac{1}{2 + {F}^{2}}}}{\sin B}} - \frac{x}{\tan B} \]
      2. *-lft-identity80.5%

        \[\leadsto F \cdot \frac{\color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}}}{\sin B} - \frac{x}{\tan B} \]
      3. +-commutative80.5%

        \[\leadsto F \cdot \frac{\sqrt{\frac{1}{\color{blue}{{F}^{2} + 2}}}}{\sin B} - \frac{x}{\tan B} \]
      4. unpow280.5%

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

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

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

        \[\leadsto F \cdot \color{blue}{\frac{1}{\frac{\sin B}{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}}} - \frac{x}{\tan B} \]
      2. un-div-inv80.5%

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

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

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

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

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

      \[\leadsto \frac{F}{\color{blue}{B \cdot \sqrt{2 + {F}^{2}}}} - \frac{x}{\tan B} \]
    10. Step-by-step derivation
      1. +-commutative66.5%

        \[\leadsto \frac{F}{B \cdot \sqrt{\color{blue}{{F}^{2} + 2}}} - \frac{x}{\tan B} \]
      2. unpow266.5%

        \[\leadsto \frac{F}{B \cdot \sqrt{\color{blue}{F \cdot F} + 2}} - \frac{x}{\tan B} \]
      3. fma-undefine66.5%

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

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

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

    if 4.4000000000000001e76 < F < 6.20000000000000014e100 or 2.2999999999999998e212 < F < 3.90000000000000029e280

    1. Initial program 40.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 F around -inf 24.0%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    4. Step-by-step derivation
      1. add-cube-cbrt23.9%

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

        \[\leadsto \color{blue}{{\left(\sqrt[3]{\left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{\sin B}}\right)}^{3}} \]
    5. Applied egg-rr75.7%

      \[\leadsto \color{blue}{{\left(\sqrt[3]{\frac{1}{\sin B} + \frac{x}{\tan B}}\right)}^{3}} \]
    6. Taylor expanded in x around 0 76.8%

      \[\leadsto {\color{blue}{\left(\sqrt[3]{\frac{1}{\sin B}}\right)}}^{3} \]
    7. Taylor expanded in B around inf 77.9%

      \[\leadsto \color{blue}{\frac{1}{\sin B}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification70.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1.25 \cdot 10^{+149}:\\ \;\;\;\;\frac{x}{-\tan B}\\ \mathbf{elif}\;F \leq -4.1 \cdot 10^{+83}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 2.85 \cdot 10^{-61}:\\ \;\;\;\;\frac{x}{-\tan B}\\ \mathbf{elif}\;F \leq 4.4 \cdot 10^{+76} \lor \neg \left(F \leq 6.2 \cdot 10^{+100} \lor \neg \left(F \leq 2.3 \cdot 10^{+212}\right) \land F \leq 3.9 \cdot 10^{+280}\right):\\ \;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 67.0% accurate, 2.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x}{\tan B}\\ t_1 := \frac{1}{B} - t\_0\\ t_2 := \frac{1}{\sin B}\\ \mathbf{if}\;F \leq -2.2 \cdot 10^{-7}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\ \mathbf{elif}\;F \leq 2.45 \cdot 10^{-145}:\\ \;\;\;\;\frac{x}{-\tan B}\\ \mathbf{elif}\;F \leq 4.4 \cdot 10^{+57}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;F \leq 8.8 \cdot 10^{+101}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;F \leq 2.35 \cdot 10^{+212}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;F \leq 3.5 \cdot 10^{+280}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;\frac{F}{F \cdot B} - t\_0\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (/ x (tan B))) (t_1 (- (/ 1.0 B) t_0)) (t_2 (/ 1.0 (sin B))))
   (if (<= F -2.2e-7)
     (+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
     (if (<= F 2.45e-145)
       (/ x (- (tan B)))
       (if (<= F 4.4e+57)
         t_1
         (if (<= F 8.8e+101)
           t_2
           (if (<= F 2.35e+212)
             t_1
             (if (<= F 3.5e+280) t_2 (- (/ F (* F B)) t_0)))))))))
double code(double F, double B, double x) {
	double t_0 = x / tan(B);
	double t_1 = (1.0 / B) - t_0;
	double t_2 = 1.0 / sin(B);
	double tmp;
	if (F <= -2.2e-7) {
		tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
	} else if (F <= 2.45e-145) {
		tmp = x / -tan(B);
	} else if (F <= 4.4e+57) {
		tmp = t_1;
	} else if (F <= 8.8e+101) {
		tmp = t_2;
	} else if (F <= 2.35e+212) {
		tmp = t_1;
	} else if (F <= 3.5e+280) {
		tmp = t_2;
	} else {
		tmp = (F / (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) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_0 = x / tan(b)
    t_1 = (1.0d0 / b) - t_0
    t_2 = 1.0d0 / sin(b)
    if (f <= (-2.2d-7)) then
        tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
    else if (f <= 2.45d-145) then
        tmp = x / -tan(b)
    else if (f <= 4.4d+57) then
        tmp = t_1
    else if (f <= 8.8d+101) then
        tmp = t_2
    else if (f <= 2.35d+212) then
        tmp = t_1
    else if (f <= 3.5d+280) then
        tmp = t_2
    else
        tmp = (f / (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 t_1 = (1.0 / B) - t_0;
	double t_2 = 1.0 / Math.sin(B);
	double tmp;
	if (F <= -2.2e-7) {
		tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
	} else if (F <= 2.45e-145) {
		tmp = x / -Math.tan(B);
	} else if (F <= 4.4e+57) {
		tmp = t_1;
	} else if (F <= 8.8e+101) {
		tmp = t_2;
	} else if (F <= 2.35e+212) {
		tmp = t_1;
	} else if (F <= 3.5e+280) {
		tmp = t_2;
	} else {
		tmp = (F / (F * B)) - t_0;
	}
	return tmp;
}
def code(F, B, x):
	t_0 = x / math.tan(B)
	t_1 = (1.0 / B) - t_0
	t_2 = 1.0 / math.sin(B)
	tmp = 0
	if F <= -2.2e-7:
		tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B)
	elif F <= 2.45e-145:
		tmp = x / -math.tan(B)
	elif F <= 4.4e+57:
		tmp = t_1
	elif F <= 8.8e+101:
		tmp = t_2
	elif F <= 2.35e+212:
		tmp = t_1
	elif F <= 3.5e+280:
		tmp = t_2
	else:
		tmp = (F / (F * B)) - t_0
	return tmp
function code(F, B, x)
	t_0 = Float64(x / tan(B))
	t_1 = Float64(Float64(1.0 / B) - t_0)
	t_2 = Float64(1.0 / sin(B))
	tmp = 0.0
	if (F <= -2.2e-7)
		tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B));
	elseif (F <= 2.45e-145)
		tmp = Float64(x / Float64(-tan(B)));
	elseif (F <= 4.4e+57)
		tmp = t_1;
	elseif (F <= 8.8e+101)
		tmp = t_2;
	elseif (F <= 2.35e+212)
		tmp = t_1;
	elseif (F <= 3.5e+280)
		tmp = t_2;
	else
		tmp = Float64(Float64(F / Float64(F * B)) - t_0);
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = x / tan(B);
	t_1 = (1.0 / B) - t_0;
	t_2 = 1.0 / sin(B);
	tmp = 0.0;
	if (F <= -2.2e-7)
		tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
	elseif (F <= 2.45e-145)
		tmp = x / -tan(B);
	elseif (F <= 4.4e+57)
		tmp = t_1;
	elseif (F <= 8.8e+101)
		tmp = t_2;
	elseif (F <= 2.35e+212)
		tmp = t_1;
	elseif (F <= 3.5e+280)
		tmp = t_2;
	else
		tmp = (F / (F * B)) - t_0;
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.2e-7], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.45e-145], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 4.4e+57], t$95$1, If[LessEqual[F, 8.8e+101], t$95$2, If[LessEqual[F, 2.35e+212], t$95$1, If[LessEqual[F, 3.5e+280], t$95$2, N[(N[(F / N[(F * B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;F \leq 2.45 \cdot 10^{-145}:\\
\;\;\;\;\frac{x}{-\tan B}\\

\mathbf{elif}\;F \leq 4.4 \cdot 10^{+57}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;F \leq 8.8 \cdot 10^{+101}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;F \leq 2.35 \cdot 10^{+212}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;F \leq 3.5 \cdot 10^{+280}:\\
\;\;\;\;t\_2\\

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


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

    1. Initial program 69.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 F around -inf 99.7%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    4. Taylor expanded in B around 0 83.7%

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

    if -2.2000000000000001e-7 < F < 2.44999999999999984e-145

    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 F around -inf 38.8%

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

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

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

        \[\leadsto -\color{blue}{x \cdot \frac{\cos B}{\sin B}} \]
      3. distribute-lft-neg-in74.4%

        \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{\cos B}{\sin B}} \]
    6. Simplified74.4%

      \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{\cos B}{\sin B}} \]
    7. Step-by-step derivation
      1. add-sqr-sqrt16.6%

        \[\leadsto \color{blue}{\left(\sqrt{-x} \cdot \sqrt{-x}\right)} \cdot \frac{\cos B}{\sin B} \]
      2. sqrt-unprod14.6%

        \[\leadsto \color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}} \cdot \frac{\cos B}{\sin B} \]
      3. sqr-neg14.6%

        \[\leadsto \sqrt{\color{blue}{x \cdot x}} \cdot \frac{\cos B}{\sin B} \]
      4. sqrt-unprod1.3%

        \[\leadsto \color{blue}{\left(\sqrt{x} \cdot \sqrt{x}\right)} \cdot \frac{\cos B}{\sin B} \]
      5. add-sqr-sqrt2.0%

        \[\leadsto \color{blue}{x} \cdot \frac{\cos B}{\sin B} \]
      6. clear-num2.0%

        \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{\sin B}{\cos B}}} \]
      7. tan-quot2.0%

        \[\leadsto x \cdot \frac{1}{\color{blue}{\tan B}} \]
      8. div-inv2.0%

        \[\leadsto \color{blue}{\frac{x}{\tan B}} \]
      9. frac-2neg2.0%

        \[\leadsto \color{blue}{\frac{-x}{-\tan B}} \]
      10. neg-sub02.0%

        \[\leadsto \frac{\color{blue}{0 - x}}{-\tan B} \]
      11. div-sub2.0%

        \[\leadsto \color{blue}{\frac{0}{-\tan B} - \frac{x}{-\tan B}} \]
      12. add-sqr-sqrt1.3%

        \[\leadsto \frac{0}{-\tan B} - \frac{\color{blue}{\sqrt{x} \cdot \sqrt{x}}}{-\tan B} \]
      13. sqrt-unprod14.6%

        \[\leadsto \frac{0}{-\tan B} - \frac{\color{blue}{\sqrt{x \cdot x}}}{-\tan B} \]
      14. sqr-neg14.6%

        \[\leadsto \frac{0}{-\tan B} - \frac{\sqrt{\color{blue}{\left(-x\right) \cdot \left(-x\right)}}}{-\tan B} \]
      15. sqrt-unprod16.7%

        \[\leadsto \frac{0}{-\tan B} - \frac{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}{-\tan B} \]
      16. add-sqr-sqrt74.7%

        \[\leadsto \frac{0}{-\tan B} - \frac{\color{blue}{-x}}{-\tan B} \]
      17. frac-2neg74.7%

        \[\leadsto \frac{0}{-\tan B} - \color{blue}{\frac{x}{\tan B}} \]
    8. Applied egg-rr74.7%

      \[\leadsto \color{blue}{\frac{0}{-\tan B} - \frac{x}{\tan B}} \]
    9. Step-by-step derivation
      1. div074.7%

        \[\leadsto \color{blue}{0} - \frac{x}{\tan B} \]
      2. neg-sub074.7%

        \[\leadsto \color{blue}{-\frac{x}{\tan B}} \]
      3. distribute-frac-neg274.7%

        \[\leadsto \color{blue}{\frac{x}{-\tan B}} \]
    10. Simplified74.7%

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

    if 2.44999999999999984e-145 < F < 4.4000000000000001e57 or 8.8000000000000003e101 < F < 2.34999999999999996e212

    1. Initial program 86.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. Simplified89.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}} \]
    3. Add Preprocessing
    4. Taylor expanded in x around 0 89.4%

      \[\leadsto F \cdot \color{blue}{\left(\frac{1}{\sin B} \cdot \sqrt{\frac{1}{2 + {F}^{2}}}\right)} - \frac{x}{\tan B} \]
    5. Step-by-step derivation
      1. associate-*l/89.4%

        \[\leadsto F \cdot \color{blue}{\frac{1 \cdot \sqrt{\frac{1}{2 + {F}^{2}}}}{\sin B}} - \frac{x}{\tan B} \]
      2. *-lft-identity89.4%

        \[\leadsto F \cdot \frac{\color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}}}{\sin B} - \frac{x}{\tan B} \]
      3. +-commutative89.4%

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

        \[\leadsto F \cdot \frac{\sqrt{\frac{1}{\color{blue}{F \cdot F} + 2}}}{\sin B} - \frac{x}{\tan B} \]
      5. fma-undefine89.4%

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

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

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

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

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

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

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

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

      \[\leadsto \frac{F}{\color{blue}{B \cdot \sqrt{2 + {F}^{2}}}} - \frac{x}{\tan B} \]
    10. Step-by-step derivation
      1. +-commutative72.3%

        \[\leadsto \frac{F}{B \cdot \sqrt{\color{blue}{{F}^{2} + 2}}} - \frac{x}{\tan B} \]
      2. unpow272.3%

        \[\leadsto \frac{F}{B \cdot \sqrt{\color{blue}{F \cdot F} + 2}} - \frac{x}{\tan B} \]
      3. fma-undefine72.3%

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

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

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

    if 4.4000000000000001e57 < F < 8.8000000000000003e101 or 2.34999999999999996e212 < F < 3.5000000000000001e280

    1. Initial program 51.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 F around -inf 25.9%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    4. Step-by-step derivation
      1. add-cube-cbrt25.6%

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

        \[\leadsto \color{blue}{{\left(\sqrt[3]{\left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{\sin B}}\right)}^{3}} \]
    5. Applied egg-rr73.8%

      \[\leadsto \color{blue}{{\left(\sqrt[3]{\frac{1}{\sin B} + \frac{x}{\tan B}}\right)}^{3}} \]
    6. Taylor expanded in x around 0 74.9%

      \[\leadsto {\color{blue}{\left(\sqrt[3]{\frac{1}{\sin B}}\right)}}^{3} \]
    7. Taylor expanded in B around inf 76.0%

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

    if 3.5000000000000001e280 < F

    1. Initial program 36.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. Simplified56.4%

      \[\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}} \]
    3. Add Preprocessing
    4. Taylor expanded in x around 0 56.4%

      \[\leadsto F \cdot \color{blue}{\left(\frac{1}{\sin B} \cdot \sqrt{\frac{1}{2 + {F}^{2}}}\right)} - \frac{x}{\tan B} \]
    5. Step-by-step derivation
      1. associate-*l/56.4%

        \[\leadsto F \cdot \color{blue}{\frac{1 \cdot \sqrt{\frac{1}{2 + {F}^{2}}}}{\sin B}} - \frac{x}{\tan B} \]
      2. *-lft-identity56.4%

        \[\leadsto F \cdot \frac{\color{blue}{\sqrt{\frac{1}{2 + {F}^{2}}}}}{\sin B} - \frac{x}{\tan B} \]
      3. +-commutative56.4%

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

        \[\leadsto F \cdot \frac{\sqrt{\frac{1}{\color{blue}{F \cdot F} + 2}}}{\sin B} - \frac{x}{\tan B} \]
      5. fma-undefine56.4%

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

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

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

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

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

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

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

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

      \[\leadsto \frac{F}{\color{blue}{B \cdot \sqrt{2 + {F}^{2}}}} - \frac{x}{\tan B} \]
    10. Step-by-step derivation
      1. +-commutative56.4%

        \[\leadsto \frac{F}{B \cdot \sqrt{\color{blue}{{F}^{2} + 2}}} - \frac{x}{\tan B} \]
      2. unpow256.4%

        \[\leadsto \frac{F}{B \cdot \sqrt{\color{blue}{F \cdot F} + 2}} - \frac{x}{\tan B} \]
      3. fma-undefine56.4%

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

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

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

        \[\leadsto \frac{F}{\color{blue}{F \cdot B}} - \frac{x}{\tan B} \]
    14. Simplified82.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -2.2 \cdot 10^{-7}:\\ \;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\ \mathbf{elif}\;F \leq 2.45 \cdot 10^{-145}:\\ \;\;\;\;\frac{x}{-\tan B}\\ \mathbf{elif}\;F \leq 4.4 \cdot 10^{+57}:\\ \;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 8.8 \cdot 10^{+101}:\\ \;\;\;\;\frac{1}{\sin B}\\ \mathbf{elif}\;F \leq 2.35 \cdot 10^{+212}:\\ \;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 3.5 \cdot 10^{+280}:\\ \;\;\;\;\frac{1}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{F}{F \cdot B} - \frac{x}{\tan B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 39.2% accurate, 2.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{-1 - x}{B}\\ \mathbf{if}\;F \leq -2.2 \cdot 10^{-7}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;F \leq 2.3 \cdot 10^{-222}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{elif}\;F \leq 5.3 \cdot 10^{+129} \lor \neg \left(F \leq 6.2 \cdot 10^{+155}\right):\\ \;\;\;\;\frac{1}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (/ (- -1.0 x) B)))
   (if (<= F -2.2e-7)
     t_0
     (if (<= F 2.3e-222)
       (/ (- x) B)
       (if (or (<= F 5.3e+129) (not (<= F 6.2e+155))) (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
	double t_0 = (-1.0 - x) / B;
	double tmp;
	if (F <= -2.2e-7) {
		tmp = t_0;
	} else if (F <= 2.3e-222) {
		tmp = -x / B;
	} else if ((F <= 5.3e+129) || !(F <= 6.2e+155)) {
		tmp = 1.0 / sin(B);
	} else {
		tmp = 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 = ((-1.0d0) - x) / b
    if (f <= (-2.2d-7)) then
        tmp = t_0
    else if (f <= 2.3d-222) then
        tmp = -x / b
    else if ((f <= 5.3d+129) .or. (.not. (f <= 6.2d+155))) then
        tmp = 1.0d0 / sin(b)
    else
        tmp = t_0
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double t_0 = (-1.0 - x) / B;
	double tmp;
	if (F <= -2.2e-7) {
		tmp = t_0;
	} else if (F <= 2.3e-222) {
		tmp = -x / B;
	} else if ((F <= 5.3e+129) || !(F <= 6.2e+155)) {
		tmp = 1.0 / Math.sin(B);
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(F, B, x):
	t_0 = (-1.0 - x) / B
	tmp = 0
	if F <= -2.2e-7:
		tmp = t_0
	elif F <= 2.3e-222:
		tmp = -x / B
	elif (F <= 5.3e+129) or not (F <= 6.2e+155):
		tmp = 1.0 / math.sin(B)
	else:
		tmp = t_0
	return tmp
function code(F, B, x)
	t_0 = Float64(Float64(-1.0 - x) / B)
	tmp = 0.0
	if (F <= -2.2e-7)
		tmp = t_0;
	elseif (F <= 2.3e-222)
		tmp = Float64(Float64(-x) / B);
	elseif ((F <= 5.3e+129) || !(F <= 6.2e+155))
		tmp = Float64(1.0 / sin(B));
	else
		tmp = t_0;
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = (-1.0 - x) / B;
	tmp = 0.0;
	if (F <= -2.2e-7)
		tmp = t_0;
	elseif (F <= 2.3e-222)
		tmp = -x / B;
	elseif ((F <= 5.3e+129) || ~((F <= 6.2e+155)))
		tmp = 1.0 / sin(B);
	else
		tmp = t_0;
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[F, -2.2e-7], t$95$0, If[LessEqual[F, 2.3e-222], N[((-x) / B), $MachinePrecision], If[Or[LessEqual[F, 5.3e+129], N[Not[LessEqual[F, 6.2e+155]], $MachinePrecision]], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}

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

\mathbf{elif}\;F \leq 2.3 \cdot 10^{-222}:\\
\;\;\;\;\frac{-x}{B}\\

\mathbf{elif}\;F \leq 5.3 \cdot 10^{+129} \lor \neg \left(F \leq 6.2 \cdot 10^{+155}\right):\\
\;\;\;\;\frac{1}{\sin B}\\

\mathbf{else}:\\
\;\;\;\;t\_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if F < -2.2000000000000001e-7 or 5.2999999999999999e129 < F < 6.19999999999999978e155

    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 F around -inf 99.2%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    4. Taylor expanded in B around 0 54.8%

      \[\leadsto \color{blue}{-1 \cdot \frac{1 + x}{B}} \]
    5. Step-by-step derivation
      1. mul-1-neg54.8%

        \[\leadsto \color{blue}{-\frac{1 + x}{B}} \]
      2. distribute-neg-frac254.8%

        \[\leadsto \color{blue}{\frac{1 + x}{-B}} \]
    6. Simplified54.8%

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

    if -2.2000000000000001e-7 < F < 2.3000000000000001e-222

    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. Add Preprocessing
    3. Taylor expanded in F around -inf 41.1%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    4. Taylor expanded in B around 0 23.6%

      \[\leadsto \color{blue}{-1 \cdot \frac{1 + x}{B}} \]
    5. Step-by-step derivation
      1. mul-1-neg23.6%

        \[\leadsto \color{blue}{-\frac{1 + x}{B}} \]
      2. distribute-neg-frac223.6%

        \[\leadsto \color{blue}{\frac{1 + x}{-B}} \]
    6. Simplified23.6%

      \[\leadsto \color{blue}{\frac{1 + x}{-B}} \]
    7. Taylor expanded in x around inf 43.6%

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{B}} \]
    8. Step-by-step derivation
      1. associate-*r/43.6%

        \[\leadsto \color{blue}{\frac{-1 \cdot x}{B}} \]
      2. mul-1-neg43.6%

        \[\leadsto \frac{\color{blue}{-x}}{B} \]
    9. Simplified43.6%

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

    if 2.3000000000000001e-222 < F < 5.2999999999999999e129 or 6.19999999999999978e155 < F

    1. Initial program 70.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 F around -inf 30.4%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    4. Step-by-step derivation
      1. add-cube-cbrt30.0%

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

        \[\leadsto \color{blue}{{\left(\sqrt[3]{\left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{\sin B}}\right)}^{3}} \]
    5. Applied egg-rr43.0%

      \[\leadsto \color{blue}{{\left(\sqrt[3]{\frac{1}{\sin B} + \frac{x}{\tan B}}\right)}^{3}} \]
    6. Taylor expanded in x around 0 44.1%

      \[\leadsto {\color{blue}{\left(\sqrt[3]{\frac{1}{\sin B}}\right)}}^{3} \]
    7. Taylor expanded in B around inf 44.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -2.2 \cdot 10^{-7}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 2.3 \cdot 10^{-222}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{elif}\;F \leq 5.3 \cdot 10^{+129} \lor \neg \left(F \leq 6.2 \cdot 10^{+155}\right):\\ \;\;\;\;\frac{1}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 42.1% accurate, 2.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{-1 - x}{B}\\ \mathbf{if}\;B \leq 9.5 \cdot 10^{-102}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;B \leq 9.6 \cdot 10^{-52}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{elif}\;B \leq 3 \cdot 10^{-12}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{-\tan B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (/ (- -1.0 x) B)))
   (if (<= B 9.5e-102)
     t_0
     (if (<= B 9.6e-52) (/ (- x) B) (if (<= B 3e-12) t_0 (/ x (- (tan B))))))))
double code(double F, double B, double x) {
	double t_0 = (-1.0 - x) / B;
	double tmp;
	if (B <= 9.5e-102) {
		tmp = t_0;
	} else if (B <= 9.6e-52) {
		tmp = -x / B;
	} else if (B <= 3e-12) {
		tmp = t_0;
	} 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 = ((-1.0d0) - x) / b
    if (b <= 9.5d-102) then
        tmp = t_0
    else if (b <= 9.6d-52) then
        tmp = -x / b
    else if (b <= 3d-12) then
        tmp = t_0
    else
        tmp = x / -tan(b)
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double t_0 = (-1.0 - x) / B;
	double tmp;
	if (B <= 9.5e-102) {
		tmp = t_0;
	} else if (B <= 9.6e-52) {
		tmp = -x / B;
	} else if (B <= 3e-12) {
		tmp = t_0;
	} else {
		tmp = x / -Math.tan(B);
	}
	return tmp;
}
def code(F, B, x):
	t_0 = (-1.0 - x) / B
	tmp = 0
	if B <= 9.5e-102:
		tmp = t_0
	elif B <= 9.6e-52:
		tmp = -x / B
	elif B <= 3e-12:
		tmp = t_0
	else:
		tmp = x / -math.tan(B)
	return tmp
function code(F, B, x)
	t_0 = Float64(Float64(-1.0 - x) / B)
	tmp = 0.0
	if (B <= 9.5e-102)
		tmp = t_0;
	elseif (B <= 9.6e-52)
		tmp = Float64(Float64(-x) / B);
	elseif (B <= 3e-12)
		tmp = t_0;
	else
		tmp = Float64(x / Float64(-tan(B)));
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	t_0 = (-1.0 - x) / B;
	tmp = 0.0;
	if (B <= 9.5e-102)
		tmp = t_0;
	elseif (B <= 9.6e-52)
		tmp = -x / B;
	elseif (B <= 3e-12)
		tmp = t_0;
	else
		tmp = x / -tan(B);
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[B, 9.5e-102], t$95$0, If[LessEqual[B, 9.6e-52], N[((-x) / B), $MachinePrecision], If[LessEqual[B, 3e-12], t$95$0, N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{-1 - x}{B}\\
\mathbf{if}\;B \leq 9.5 \cdot 10^{-102}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;B \leq 9.6 \cdot 10^{-52}:\\
\;\;\;\;\frac{-x}{B}\\

\mathbf{elif}\;B \leq 3 \cdot 10^{-12}:\\
\;\;\;\;t\_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if B < 9.50000000000000025e-102 or 9.6000000000000007e-52 < B < 3.0000000000000001e-12

    1. Initial program 76.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 F around -inf 54.6%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    4. Taylor expanded in B around 0 35.7%

      \[\leadsto \color{blue}{-1 \cdot \frac{1 + x}{B}} \]
    5. Step-by-step derivation
      1. mul-1-neg35.7%

        \[\leadsto \color{blue}{-\frac{1 + x}{B}} \]
      2. distribute-neg-frac235.7%

        \[\leadsto \color{blue}{\frac{1 + x}{-B}} \]
    6. Simplified35.7%

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

    if 9.50000000000000025e-102 < B < 9.6000000000000007e-52

    1. Initial program 83.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 F around -inf 48.4%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    4. Taylor expanded in B around 0 48.5%

      \[\leadsto \color{blue}{-1 \cdot \frac{1 + x}{B}} \]
    5. Step-by-step derivation
      1. mul-1-neg48.5%

        \[\leadsto \color{blue}{-\frac{1 + x}{B}} \]
      2. distribute-neg-frac248.5%

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

      \[\leadsto \color{blue}{\frac{1 + x}{-B}} \]
    7. Taylor expanded in x around inf 65.3%

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{B}} \]
    8. Step-by-step derivation
      1. associate-*r/65.3%

        \[\leadsto \color{blue}{\frac{-1 \cdot x}{B}} \]
      2. mul-1-neg65.3%

        \[\leadsto \frac{\color{blue}{-x}}{B} \]
    9. Simplified65.3%

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

    if 3.0000000000000001e-12 < B

    1. Initial program 87.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 F around -inf 55.9%

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

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

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

        \[\leadsto -\color{blue}{x \cdot \frac{\cos B}{\sin B}} \]
      3. distribute-lft-neg-in60.7%

        \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{\cos B}{\sin B}} \]
    6. Simplified60.7%

      \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{\cos B}{\sin B}} \]
    7. Step-by-step derivation
      1. add-sqr-sqrt28.3%

        \[\leadsto \color{blue}{\left(\sqrt{-x} \cdot \sqrt{-x}\right)} \cdot \frac{\cos B}{\sin B} \]
      2. sqrt-unprod20.7%

        \[\leadsto \color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}} \cdot \frac{\cos B}{\sin B} \]
      3. sqr-neg20.7%

        \[\leadsto \sqrt{\color{blue}{x \cdot x}} \cdot \frac{\cos B}{\sin B} \]
      4. sqrt-unprod1.0%

        \[\leadsto \color{blue}{\left(\sqrt{x} \cdot \sqrt{x}\right)} \cdot \frac{\cos B}{\sin B} \]
      5. add-sqr-sqrt2.2%

        \[\leadsto \color{blue}{x} \cdot \frac{\cos B}{\sin B} \]
      6. clear-num2.2%

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

        \[\leadsto x \cdot \frac{1}{\color{blue}{\tan B}} \]
      8. div-inv2.2%

        \[\leadsto \color{blue}{\frac{x}{\tan B}} \]
      9. frac-2neg2.2%

        \[\leadsto \color{blue}{\frac{-x}{-\tan B}} \]
      10. neg-sub02.2%

        \[\leadsto \frac{\color{blue}{0 - x}}{-\tan B} \]
      11. div-sub2.2%

        \[\leadsto \color{blue}{\frac{0}{-\tan B} - \frac{x}{-\tan B}} \]
      12. add-sqr-sqrt1.0%

        \[\leadsto \frac{0}{-\tan B} - \frac{\color{blue}{\sqrt{x} \cdot \sqrt{x}}}{-\tan B} \]
      13. sqrt-unprod20.7%

        \[\leadsto \frac{0}{-\tan B} - \frac{\color{blue}{\sqrt{x \cdot x}}}{-\tan B} \]
      14. sqr-neg20.7%

        \[\leadsto \frac{0}{-\tan B} - \frac{\sqrt{\color{blue}{\left(-x\right) \cdot \left(-x\right)}}}{-\tan B} \]
      15. sqrt-unprod28.4%

        \[\leadsto \frac{0}{-\tan B} - \frac{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}{-\tan B} \]
      16. add-sqr-sqrt60.8%

        \[\leadsto \frac{0}{-\tan B} - \frac{\color{blue}{-x}}{-\tan B} \]
      17. frac-2neg60.8%

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

      \[\leadsto \color{blue}{\frac{0}{-\tan B} - \frac{x}{\tan B}} \]
    9. Step-by-step derivation
      1. div060.8%

        \[\leadsto \color{blue}{0} - \frac{x}{\tan B} \]
      2. neg-sub060.8%

        \[\leadsto \color{blue}{-\frac{x}{\tan B}} \]
      3. distribute-frac-neg260.8%

        \[\leadsto \color{blue}{\frac{x}{-\tan B}} \]
    10. Simplified60.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 9.5 \cdot 10^{-102}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;B \leq 9.6 \cdot 10^{-52}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{elif}\;B \leq 3 \cdot 10^{-12}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{-\tan B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 34.2% accurate, 12.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -3 \cdot 10^{+56}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 9.5 \cdot 10^{-79} \lor \neg \left(F \leq 4.5 \cdot 10^{+121}\right) \land F \leq 4.6 \cdot 10^{+152}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + 1}{B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (if (<= F -3e+56)
   (/ (- -1.0 x) B)
   (if (or (<= F 9.5e-79) (and (not (<= F 4.5e+121)) (<= F 4.6e+152)))
     (/ (- x) B)
     (/ (+ x 1.0) B))))
double code(double F, double B, double x) {
	double tmp;
	if (F <= -3e+56) {
		tmp = (-1.0 - x) / B;
	} else if ((F <= 9.5e-79) || (!(F <= 4.5e+121) && (F <= 4.6e+152))) {
		tmp = -x / B;
	} else {
		tmp = (x + 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 <= (-3d+56)) then
        tmp = ((-1.0d0) - x) / b
    else if ((f <= 9.5d-79) .or. (.not. (f <= 4.5d+121)) .and. (f <= 4.6d+152)) then
        tmp = -x / b
    else
        tmp = (x + 1.0d0) / b
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double tmp;
	if (F <= -3e+56) {
		tmp = (-1.0 - x) / B;
	} else if ((F <= 9.5e-79) || (!(F <= 4.5e+121) && (F <= 4.6e+152))) {
		tmp = -x / B;
	} else {
		tmp = (x + 1.0) / B;
	}
	return tmp;
}
def code(F, B, x):
	tmp = 0
	if F <= -3e+56:
		tmp = (-1.0 - x) / B
	elif (F <= 9.5e-79) or (not (F <= 4.5e+121) and (F <= 4.6e+152)):
		tmp = -x / B
	else:
		tmp = (x + 1.0) / B
	return tmp
function code(F, B, x)
	tmp = 0.0
	if (F <= -3e+56)
		tmp = Float64(Float64(-1.0 - x) / B);
	elseif ((F <= 9.5e-79) || (!(F <= 4.5e+121) && (F <= 4.6e+152)))
		tmp = Float64(Float64(-x) / B);
	else
		tmp = Float64(Float64(x + 1.0) / B);
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	tmp = 0.0;
	if (F <= -3e+56)
		tmp = (-1.0 - x) / B;
	elseif ((F <= 9.5e-79) || (~((F <= 4.5e+121)) && (F <= 4.6e+152)))
		tmp = -x / B;
	else
		tmp = (x + 1.0) / B;
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := If[LessEqual[F, -3e+56], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[Or[LessEqual[F, 9.5e-79], And[N[Not[LessEqual[F, 4.5e+121]], $MachinePrecision], LessEqual[F, 4.6e+152]]], N[((-x) / B), $MachinePrecision], N[(N[(x + 1.0), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;F \leq -3 \cdot 10^{+56}:\\
\;\;\;\;\frac{-1 - x}{B}\\

\mathbf{elif}\;F \leq 9.5 \cdot 10^{-79} \lor \neg \left(F \leq 4.5 \cdot 10^{+121}\right) \land F \leq 4.6 \cdot 10^{+152}:\\
\;\;\;\;\frac{-x}{B}\\

\mathbf{else}:\\
\;\;\;\;\frac{x + 1}{B}\\


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

    1. Initial program 64.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 F around -inf 99.7%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    4. Taylor expanded in B around 0 50.2%

      \[\leadsto \color{blue}{-1 \cdot \frac{1 + x}{B}} \]
    5. Step-by-step derivation
      1. mul-1-neg50.2%

        \[\leadsto \color{blue}{-\frac{1 + x}{B}} \]
      2. distribute-neg-frac250.2%

        \[\leadsto \color{blue}{\frac{1 + x}{-B}} \]
    6. Simplified50.2%

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

    if -3.00000000000000006e56 < F < 9.4999999999999997e-79 or 4.5000000000000003e121 < F < 4.5999999999999997e152

    1. Initial program 98.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 F around -inf 44.4%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    4. Taylor expanded in B around 0 27.8%

      \[\leadsto \color{blue}{-1 \cdot \frac{1 + x}{B}} \]
    5. Step-by-step derivation
      1. mul-1-neg27.8%

        \[\leadsto \color{blue}{-\frac{1 + x}{B}} \]
      2. distribute-neg-frac227.8%

        \[\leadsto \color{blue}{\frac{1 + x}{-B}} \]
    6. Simplified27.8%

      \[\leadsto \color{blue}{\frac{1 + x}{-B}} \]
    7. Taylor expanded in x around inf 39.7%

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{B}} \]
    8. Step-by-step derivation
      1. associate-*r/39.7%

        \[\leadsto \color{blue}{\frac{-1 \cdot x}{B}} \]
      2. mul-1-neg39.7%

        \[\leadsto \frac{\color{blue}{-x}}{B} \]
    9. Simplified39.7%

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

    if 9.4999999999999997e-79 < F < 4.5000000000000003e121 or 4.5999999999999997e152 < F

    1. Initial program 61.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 F around -inf 33.9%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    4. Step-by-step derivation
      1. add-cube-cbrt33.4%

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

        \[\leadsto \color{blue}{{\left(\sqrt[3]{\left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{\sin B}}\right)}^{3}} \]
    5. Applied egg-rr54.7%

      \[\leadsto \color{blue}{{\left(\sqrt[3]{\frac{1}{\sin B} + \frac{x}{\tan B}}\right)}^{3}} \]
    6. Taylor expanded in B around 0 28.0%

      \[\leadsto \color{blue}{\frac{1 + x}{B}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification38.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -3 \cdot 10^{+56}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 9.5 \cdot 10^{-79} \lor \neg \left(F \leq 4.5 \cdot 10^{+121}\right) \land F \leq 4.6 \cdot 10^{+152}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + 1}{B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 28.5% accurate, 21.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -1.3 \cdot 10^{+235}:\\ \;\;\;\;\frac{-1}{B}\\ \mathbf{elif}\;F \leq 1.05 \cdot 10^{-78}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + 1}{B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (if (<= F -1.3e+235)
   (/ -1.0 B)
   (if (<= F 1.05e-78) (/ (- x) B) (/ (+ x 1.0) B))))
double code(double F, double B, double x) {
	double tmp;
	if (F <= -1.3e+235) {
		tmp = -1.0 / B;
	} else if (F <= 1.05e-78) {
		tmp = -x / B;
	} else {
		tmp = (x + 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 <= (-1.3d+235)) then
        tmp = (-1.0d0) / b
    else if (f <= 1.05d-78) then
        tmp = -x / b
    else
        tmp = (x + 1.0d0) / b
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double tmp;
	if (F <= -1.3e+235) {
		tmp = -1.0 / B;
	} else if (F <= 1.05e-78) {
		tmp = -x / B;
	} else {
		tmp = (x + 1.0) / B;
	}
	return tmp;
}
def code(F, B, x):
	tmp = 0
	if F <= -1.3e+235:
		tmp = -1.0 / B
	elif F <= 1.05e-78:
		tmp = -x / B
	else:
		tmp = (x + 1.0) / B
	return tmp
function code(F, B, x)
	tmp = 0.0
	if (F <= -1.3e+235)
		tmp = Float64(-1.0 / B);
	elseif (F <= 1.05e-78)
		tmp = Float64(Float64(-x) / B);
	else
		tmp = Float64(Float64(x + 1.0) / B);
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	tmp = 0.0;
	if (F <= -1.3e+235)
		tmp = -1.0 / B;
	elseif (F <= 1.05e-78)
		tmp = -x / B;
	else
		tmp = (x + 1.0) / B;
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := If[LessEqual[F, -1.3e+235], N[(-1.0 / B), $MachinePrecision], If[LessEqual[F, 1.05e-78], N[((-x) / B), $MachinePrecision], N[(N[(x + 1.0), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.3 \cdot 10^{+235}:\\
\;\;\;\;\frac{-1}{B}\\

\mathbf{elif}\;F \leq 1.05 \cdot 10^{-78}:\\
\;\;\;\;\frac{-x}{B}\\

\mathbf{else}:\\
\;\;\;\;\frac{x + 1}{B}\\


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

    1. Initial program 32.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 F around -inf 99.8%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    4. Taylor expanded in B around 0 54.8%

      \[\leadsto \color{blue}{-1 \cdot \frac{1 + x}{B}} \]
    5. Step-by-step derivation
      1. mul-1-neg54.8%

        \[\leadsto \color{blue}{-\frac{1 + x}{B}} \]
      2. distribute-neg-frac254.8%

        \[\leadsto \color{blue}{\frac{1 + x}{-B}} \]
    6. Simplified54.8%

      \[\leadsto \color{blue}{\frac{1 + x}{-B}} \]
    7. Taylor expanded in x around 0 39.8%

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

    if -1.2999999999999999e235 < F < 1.05e-78

    1. Initial program 93.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 F around -inf 58.4%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    4. Taylor expanded in B around 0 32.3%

      \[\leadsto \color{blue}{-1 \cdot \frac{1 + x}{B}} \]
    5. Step-by-step derivation
      1. mul-1-neg32.3%

        \[\leadsto \color{blue}{-\frac{1 + x}{B}} \]
      2. distribute-neg-frac232.3%

        \[\leadsto \color{blue}{\frac{1 + x}{-B}} \]
    6. Simplified32.3%

      \[\leadsto \color{blue}{\frac{1 + x}{-B}} \]
    7. Taylor expanded in x around inf 33.9%

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{B}} \]
    8. Step-by-step derivation
      1. associate-*r/33.9%

        \[\leadsto \color{blue}{\frac{-1 \cdot x}{B}} \]
      2. mul-1-neg33.9%

        \[\leadsto \frac{\color{blue}{-x}}{B} \]
    9. Simplified33.9%

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

    if 1.05e-78 < F

    1. Initial program 64.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 F around -inf 37.7%

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

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

        \[\leadsto \color{blue}{{\left(\sqrt[3]{\left(-x \cdot \frac{1}{\tan B}\right) + \frac{-1}{\sin B}}\right)}^{3}} \]
    5. Applied egg-rr51.9%

      \[\leadsto \color{blue}{{\left(\sqrt[3]{\frac{1}{\sin B} + \frac{x}{\tan B}}\right)}^{3}} \]
    6. Taylor expanded in B around 0 27.8%

      \[\leadsto \color{blue}{\frac{1 + x}{B}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification32.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1.3 \cdot 10^{+235}:\\ \;\;\;\;\frac{-1}{B}\\ \mathbf{elif}\;F \leq 1.05 \cdot 10^{-78}:\\ \;\;\;\;\frac{-x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + 1}{B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 22: 28.8% accurate, 35.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -1.16 \cdot 10^{+235}:\\ \;\;\;\;\frac{-1}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{-x}{B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (if (<= F -1.16e+235) (/ -1.0 B) (/ (- x) B)))
double code(double F, double B, double x) {
	double tmp;
	if (F <= -1.16e+235) {
		tmp = -1.0 / B;
	} else {
		tmp = -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.16d+235)) then
        tmp = (-1.0d0) / b
    else
        tmp = -x / b
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double tmp;
	if (F <= -1.16e+235) {
		tmp = -1.0 / B;
	} else {
		tmp = -x / B;
	}
	return tmp;
}
def code(F, B, x):
	tmp = 0
	if F <= -1.16e+235:
		tmp = -1.0 / B
	else:
		tmp = -x / B
	return tmp
function code(F, B, x)
	tmp = 0.0
	if (F <= -1.16e+235)
		tmp = Float64(-1.0 / B);
	else
		tmp = Float64(Float64(-x) / B);
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	tmp = 0.0;
	if (F <= -1.16e+235)
		tmp = -1.0 / B;
	else
		tmp = -x / B;
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := If[LessEqual[F, -1.16e+235], N[(-1.0 / B), $MachinePrecision], N[((-x) / B), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.16 \cdot 10^{+235}:\\
\;\;\;\;\frac{-1}{B}\\

\mathbf{else}:\\
\;\;\;\;\frac{-x}{B}\\


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

    1. Initial program 32.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 F around -inf 99.8%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    4. Taylor expanded in B around 0 54.8%

      \[\leadsto \color{blue}{-1 \cdot \frac{1 + x}{B}} \]
    5. Step-by-step derivation
      1. mul-1-neg54.8%

        \[\leadsto \color{blue}{-\frac{1 + x}{B}} \]
      2. distribute-neg-frac254.8%

        \[\leadsto \color{blue}{\frac{1 + x}{-B}} \]
    6. Simplified54.8%

      \[\leadsto \color{blue}{\frac{1 + x}{-B}} \]
    7. Taylor expanded in x around 0 39.8%

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

    if -1.15999999999999994e235 < F

    1. Initial program 83.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 F around -inf 51.0%

      \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
    4. Taylor expanded in B around 0 26.6%

      \[\leadsto \color{blue}{-1 \cdot \frac{1 + x}{B}} \]
    5. Step-by-step derivation
      1. mul-1-neg26.6%

        \[\leadsto \color{blue}{-\frac{1 + x}{B}} \]
      2. distribute-neg-frac226.6%

        \[\leadsto \color{blue}{\frac{1 + x}{-B}} \]
    6. Simplified26.6%

      \[\leadsto \color{blue}{\frac{1 + x}{-B}} \]
    7. Taylor expanded in x around inf 27.9%

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{B}} \]
    8. Step-by-step derivation
      1. associate-*r/27.9%

        \[\leadsto \color{blue}{\frac{-1 \cdot x}{B}} \]
      2. mul-1-neg27.9%

        \[\leadsto \frac{\color{blue}{-x}}{B} \]
    9. Simplified27.9%

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

Alternative 23: 10.5% 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 79.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 F around -inf 54.6%

    \[\leadsto \left(-x \cdot \frac{1}{\tan B}\right) + \color{blue}{\frac{-1}{\sin B}} \]
  4. Taylor expanded in B around 0 28.7%

    \[\leadsto \color{blue}{-1 \cdot \frac{1 + x}{B}} \]
  5. Step-by-step derivation
    1. mul-1-neg28.7%

      \[\leadsto \color{blue}{-\frac{1 + x}{B}} \]
    2. distribute-neg-frac228.7%

      \[\leadsto \color{blue}{\frac{1 + x}{-B}} \]
  6. Simplified28.7%

    \[\leadsto \color{blue}{\frac{1 + x}{-B}} \]
  7. Taylor expanded in x around 0 11.2%

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

Reproduce

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