VandenBroeck and Keller, Equation (23)

Percentage Accurate: 76.2% → 99.7%
Time: 18.7s
Alternatives: 32
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 32 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.2% accurate, 1.0× speedup?

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

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

Alternative 1: 99.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -1000000000:\\ \;\;\;\;\frac{-1}{\sin B} - t\_0\\ \mathbf{elif}\;F \leq 100000000:\\ \;\;\;\;\frac{F \cdot {\left(F \cdot F + \left(2 + x \cdot 2\right)\right)}^{-0.5}}{\sin B} - t\_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t\_0\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (/ x (tan B))))
   (if (<= F -1000000000.0)
     (- (/ -1.0 (sin B)) t_0)
     (if (<= F 100000000.0)
       (- (/ (* F (pow (+ (* F F) (+ 2.0 (* x 2.0))) -0.5)) (sin B)) t_0)
       (- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
	double t_0 = x / tan(B);
	double tmp;
	if (F <= -1000000000.0) {
		tmp = (-1.0 / sin(B)) - t_0;
	} else if (F <= 100000000.0) {
		tmp = ((F * pow(((F * F) + (2.0 + (x * 2.0))), -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 <= (-1000000000.0d0)) then
        tmp = ((-1.0d0) / sin(b)) - t_0
    else if (f <= 100000000.0d0) then
        tmp = ((f * (((f * f) + (2.0d0 + (x * 2.0d0))) ** (-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 <= -1000000000.0) {
		tmp = (-1.0 / Math.sin(B)) - t_0;
	} else if (F <= 100000000.0) {
		tmp = ((F * Math.pow(((F * F) + (2.0 + (x * 2.0))), -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 <= -1000000000.0:
		tmp = (-1.0 / math.sin(B)) - t_0
	elif F <= 100000000.0:
		tmp = ((F * math.pow(((F * F) + (2.0 + (x * 2.0))), -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 <= -1000000000.0)
		tmp = Float64(Float64(-1.0 / sin(B)) - t_0);
	elseif (F <= 100000000.0)
		tmp = Float64(Float64(Float64(F * (Float64(Float64(F * F) + Float64(2.0 + Float64(x * 2.0))) ^ -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 <= -1000000000.0)
		tmp = (-1.0 / sin(B)) - t_0;
	elseif (F <= 100000000.0)
		tmp = ((F * (((F * F) + (2.0 + (x * 2.0))) ^ -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, -1000000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 100000000.0], N[(N[(N[(F * N[Power[N[(N[(F * F), $MachinePrecision] + N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[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 -1000000000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\

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

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


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

    1. Initial program 60.0%

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \color{blue}{\left(x \cdot \frac{1}{\tan B}\right)}\right) \]
    3. Simplified75.1%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(\frac{-1}{\sin B}\right)}, \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \sin B\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      2. sin-lowering-sin.f6499.8%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    7. Simplified99.8%

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

    if -1e9 < F < 1e8

    1. Initial program 99.5%

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

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

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

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

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

    if 1e8 < F

    1. Initial program 63.4%

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \color{blue}{\left(x \cdot \frac{1}{\tan B}\right)}\right) \]
    3. Simplified80.5%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(\frac{1}{\sin B}\right)}, \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(1, \sin B\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      2. sin-lowering-sin.f6499.9%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    7. Simplified99.9%

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

Alternative 2: 99.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -1 \cdot 10^{+155}:\\ \;\;\;\;\frac{-1}{\sin B} - t\_0\\ \mathbf{elif}\;F \leq 10000000:\\ \;\;\;\;\frac{\frac{F}{\sqrt{F \cdot F + \left(2 + x \cdot 2\right)}}}{\sin B} - t\_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - t\_0\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (let* ((t_0 (/ x (tan B))))
   (if (<= F -1e+155)
     (- (/ -1.0 (sin B)) t_0)
     (if (<= F 10000000.0)
       (- (/ (/ F (sqrt (+ (* F F) (+ 2.0 (* x 2.0))))) (sin B)) t_0)
       (- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
	double t_0 = x / tan(B);
	double tmp;
	if (F <= -1e+155) {
		tmp = (-1.0 / sin(B)) - t_0;
	} else if (F <= 10000000.0) {
		tmp = ((F / sqrt(((F * F) + (2.0 + (x * 2.0))))) / 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 <= (-1d+155)) then
        tmp = ((-1.0d0) / sin(b)) - t_0
    else if (f <= 10000000.0d0) then
        tmp = ((f / sqrt(((f * f) + (2.0d0 + (x * 2.0d0))))) / 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 <= -1e+155) {
		tmp = (-1.0 / Math.sin(B)) - t_0;
	} else if (F <= 10000000.0) {
		tmp = ((F / Math.sqrt(((F * F) + (2.0 + (x * 2.0))))) / 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 <= -1e+155:
		tmp = (-1.0 / math.sin(B)) - t_0
	elif F <= 10000000.0:
		tmp = ((F / math.sqrt(((F * F) + (2.0 + (x * 2.0))))) / 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 <= -1e+155)
		tmp = Float64(Float64(-1.0 / sin(B)) - t_0);
	elseif (F <= 10000000.0)
		tmp = Float64(Float64(Float64(F / sqrt(Float64(Float64(F * F) + Float64(2.0 + Float64(x * 2.0))))) / 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 <= -1e+155)
		tmp = (-1.0 / sin(B)) - t_0;
	elseif (F <= 10000000.0)
		tmp = ((F / sqrt(((F * F) + (2.0 + (x * 2.0))))) / 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, -1e+155], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 10000000.0], N[(N[(N[(F / N[Sqrt[N[(N[(F * F), $MachinePrecision] + N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sin[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 -1 \cdot 10^{+155}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\

\mathbf{elif}\;F \leq 10000000:\\
\;\;\;\;\frac{\frac{F}{\sqrt{F \cdot F + \left(2 + x \cdot 2\right)}}}{\sin B} - t\_0\\

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


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

    1. Initial program 36.3%

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \color{blue}{\left(x \cdot \frac{1}{\tan B}\right)}\right) \]
    3. Simplified53.9%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(\frac{-1}{\sin B}\right)}, \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \sin B\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      2. sin-lowering-sin.f6499.8%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    7. Simplified99.8%

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

    if -1.00000000000000001e155 < F < 1e7

    1. Initial program 97.0%

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

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

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

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

      \[\leadsto \color{blue}{\frac{F \cdot {\left(F \cdot F + \left(2 + x \cdot 2\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-+r+N/A

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      5. associate-*l/N/A

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1}{\frac{\sin B}{F}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      7. associate-*l/N/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{\sin B}{F}}\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      8. div-invN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B \cdot \frac{1}{F}}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      9. times-fracN/A

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \left(\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{1}{F}}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(\left({\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \left(\frac{1}{F}\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Applied egg-rr99.6%

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

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

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

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

    if 1e7 < F

    1. Initial program 63.4%

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \color{blue}{\left(x \cdot \frac{1}{\tan B}\right)}\right) \]
    3. Simplified80.5%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(\frac{1}{\sin B}\right)}, \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(1, \sin B\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      2. sin-lowering-sin.f6499.9%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    7. Simplified99.9%

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

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

Alternative 3: 99.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -50000000000:\\ \;\;\;\;\frac{-1}{\sin B} - t\_0\\ \mathbf{elif}\;F \leq 100000000:\\ \;\;\;\;\frac{F \cdot \sqrt{\frac{1}{F \cdot F + 2}}}{\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 -50000000000.0)
     (- (/ -1.0 (sin B)) t_0)
     (if (<= F 100000000.0)
       (- (/ (* F (sqrt (/ 1.0 (+ (* F F) 2.0)))) (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 <= -50000000000.0) {
		tmp = (-1.0 / sin(B)) - t_0;
	} else if (F <= 100000000.0) {
		tmp = ((F * sqrt((1.0 / ((F * F) + 2.0)))) / 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 <= (-50000000000.0d0)) then
        tmp = ((-1.0d0) / sin(b)) - t_0
    else if (f <= 100000000.0d0) then
        tmp = ((f * sqrt((1.0d0 / ((f * f) + 2.0d0)))) / 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 <= -50000000000.0) {
		tmp = (-1.0 / Math.sin(B)) - t_0;
	} else if (F <= 100000000.0) {
		tmp = ((F * Math.sqrt((1.0 / ((F * F) + 2.0)))) / 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 <= -50000000000.0:
		tmp = (-1.0 / math.sin(B)) - t_0
	elif F <= 100000000.0:
		tmp = ((F * math.sqrt((1.0 / ((F * F) + 2.0)))) / 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 <= -50000000000.0)
		tmp = Float64(Float64(-1.0 / sin(B)) - t_0);
	elseif (F <= 100000000.0)
		tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(Float64(F * F) + 2.0)))) / 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 <= -50000000000.0)
		tmp = (-1.0 / sin(B)) - t_0;
	elseif (F <= 100000000.0)
		tmp = ((F * sqrt((1.0 / ((F * F) + 2.0)))) / 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, -50000000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 100000000.0], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sin[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 -50000000000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\

\mathbf{elif}\;F \leq 100000000:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{F \cdot F + 2}}}{\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 < -5e10

    1. Initial program 60.0%

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \color{blue}{\left(x \cdot \frac{1}{\tan B}\right)}\right) \]
    3. Simplified75.1%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(\frac{-1}{\sin B}\right)}, \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \sin B\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      2. sin-lowering-sin.f6499.8%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    7. Simplified99.8%

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

    if -5e10 < F < 1e8

    1. Initial program 99.5%

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

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

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

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

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

      \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\color{blue}{\left(F \cdot \sqrt{\frac{1}{2 + {F}^{2}}}\right)}, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(F, \left(\sqrt{\frac{1}{2 + {F}^{2}}}\right)\right), \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      2. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\left(\frac{1}{2 + {F}^{2}}\right)\right)\right), \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(2 + {F}^{2}\right)\right)\right)\right), \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left({F}^{2}\right)\right)\right)\right)\right), \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left(F \cdot F\right)\right)\right)\right)\right), \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      6. *-lowering-*.f6499.2%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(F, F\right)\right)\right)\right)\right), \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    7. Simplified99.2%

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

    if 1e8 < F

    1. Initial program 63.4%

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \color{blue}{\left(x \cdot \frac{1}{\tan B}\right)}\right) \]
    3. Simplified80.5%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(\frac{1}{\sin B}\right)}, \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(1, \sin B\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      2. sin-lowering-sin.f6499.9%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    7. Simplified99.9%

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

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

Alternative 4: 99.7% accurate, 1.0× speedup?

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

\mathbf{elif}\;F \leq 120000000:\\
\;\;\;\;\frac{{\left(F \cdot F + 2\right)}^{-0.5}}{\frac{\sin B}{F}} - 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.12e8

    1. Initial program 60.0%

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \color{blue}{\left(x \cdot \frac{1}{\tan B}\right)}\right) \]
    3. Simplified75.1%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(\frac{-1}{\sin B}\right)}, \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \sin B\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      2. sin-lowering-sin.f6499.8%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    7. Simplified99.8%

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

    if -1.12e8 < F < 1.2e8

    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. Step-by-step derivation
      1. +-commutativeN/A

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \color{blue}{\left(\frac{x}{\tan B}\right)}\right) \]
    4. Applied egg-rr99.6%

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(2, \left({F}^{2}\right)\right), \frac{-1}{2}\right), \mathsf{/.f64}\left(\mathsf{sin.f64}\left(B\right), F\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(2, \left(F \cdot F\right)\right), \frac{-1}{2}\right), \mathsf{/.f64}\left(\mathsf{sin.f64}\left(B\right), F\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      3. *-lowering-*.f6499.2%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(F, F\right)\right), \frac{-1}{2}\right), \mathsf{/.f64}\left(\mathsf{sin.f64}\left(B\right), F\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    7. Simplified99.2%

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

    if 1.2e8 < F

    1. Initial program 63.4%

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \color{blue}{\left(x \cdot \frac{1}{\tan B}\right)}\right) \]
    3. Simplified80.5%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(\frac{1}{\sin B}\right)}, \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(1, \sin B\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      2. sin-lowering-sin.f6499.9%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    7. Simplified99.9%

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

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

Alternative 5: 99.0% accurate, 1.0× speedup?

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

\mathbf{elif}\;F \leq 0.00072:\\
\;\;\;\;\frac{\frac{F}{\sqrt{2 + x \cdot 2}}}{\sin B} - t\_0\\

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


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

    1. Initial program 61.2%

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

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

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

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

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(\frac{-1}{\sin B}\right)}, \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \sin B\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      2. sin-lowering-sin.f6498.8%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    7. Simplified98.8%

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

    if -1.3999999999999999 < F < 7.20000000000000045e-4

    1. Initial program 99.5%

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

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

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

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

      \[\leadsto \color{blue}{\frac{F \cdot {\left(F \cdot F + \left(2 + x \cdot 2\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-+r+N/A

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      5. associate-*l/N/A

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1}{\frac{\sin B}{F}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      7. associate-*l/N/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{\sin B}{F}}\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      8. div-invN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B \cdot \frac{1}{F}}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      9. times-fracN/A

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \left(\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{1}{F}}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(\left({\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \left(\frac{1}{F}\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Applied egg-rr99.6%

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

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

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

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

      \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(F, \color{blue}{\left(\sqrt{2 + 2 \cdot x}\right)}\right), \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    10. Step-by-step derivation
      1. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(F, \mathsf{sqrt.f64}\left(\left(2 + 2 \cdot x\right)\right)\right), \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(2, \left(2 \cdot x\right)\right)\right)\right), \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(2, \left(x \cdot 2\right)\right)\right)\right), \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      4. *-lowering-*.f6499.0%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(x, 2\right)\right)\right)\right), \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    11. Simplified99.0%

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

    if 7.20000000000000045e-4 < F

    1. Initial program 65.8%

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

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

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

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

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(\frac{1}{\sin B}\right)}, \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(1, \sin B\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      2. sin-lowering-sin.f6498.5%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    7. Simplified98.5%

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

Alternative 6: 88.5% accurate, 1.4× speedup?

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

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

\mathbf{elif}\;F \leq -2.1 \cdot 10^{-185}:\\
\;\;\;\;\frac{\frac{F}{\sqrt{t\_0}}}{\sin B} - \frac{x}{B}\\

\mathbf{elif}\;F \leq 1.45 \cdot 10^{-270}:\\
\;\;\;\;\frac{x}{0 - \tan B}\\

\mathbf{elif}\;F \leq 7500000:\\
\;\;\;\;\frac{F \cdot {t\_0}^{-0.5}}{\sin B} - \frac{x}{B}\\

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


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

    1. Initial program 58.8%

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \color{blue}{\left(x \cdot \frac{1}{\tan B}\right)}\right) \]
    3. Simplified74.3%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(\frac{-1}{\sin B}\right)}, \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \sin B\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      2. sin-lowering-sin.f6499.8%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    7. Simplified99.8%

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

    if -9.5e10 < F < -2.1e-185

    1. Initial program 99.5%

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \color{blue}{\left(x \cdot \frac{1}{\tan B}\right)}\right) \]
    3. Simplified99.5%

      \[\leadsto \color{blue}{\frac{F \cdot {\left(F \cdot F + \left(2 + x \cdot 2\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-+r+N/A

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      5. associate-*l/N/A

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1}{\frac{\sin B}{F}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      7. associate-*l/N/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{\sin B}{F}}\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      8. div-invN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B \cdot \frac{1}{F}}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      9. times-fracN/A

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \left(\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{1}{F}}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(\left({\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \left(\frac{1}{F}\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Applied egg-rr99.5%

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

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

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

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

      \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right)\right)\right)\right), \mathsf{sin.f64}\left(B\right)\right), \color{blue}{\left(\frac{x}{B}\right)}\right) \]
    10. Step-by-step derivation
      1. /-lowering-/.f6487.3%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right)\right)\right)\right), \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(x, \color{blue}{B}\right)\right) \]
    11. Simplified87.3%

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

    if -2.1e-185 < F < 1.44999999999999991e-270

    1. Initial program 99.7%

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

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

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

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

      \[\leadsto \color{blue}{\frac{F \cdot {\left(F \cdot F + \left(2 + x \cdot 2\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-+r+N/A

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      5. associate-*l/N/A

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1}{\frac{\sin B}{F}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      7. associate-*l/N/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{\sin B}{F}}\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      8. div-invN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B \cdot \frac{1}{F}}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      9. times-fracN/A

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \left(\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{1}{F}}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(\left({\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \left(\frac{1}{F}\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Applied egg-rr99.9%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
    8. Step-by-step derivation
      1. associate-*r/N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \left(x \cdot \cos B\right)\right), \color{blue}{\sin B}\right) \]
      3. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{*.f64}\left(x, \cos B\right)\right), \sin B\right) \]
      5. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{*.f64}\left(x, \mathsf{cos.f64}\left(B\right)\right)\right), \sin B\right) \]
      6. sin-lowering-sin.f6484.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{*.f64}\left(x, \mathsf{cos.f64}\left(B\right)\right)\right), \mathsf{sin.f64}\left(B\right)\right) \]
    9. Simplified84.4%

      \[\leadsto \color{blue}{\frac{-1 \cdot \left(x \cdot \cos B\right)}{\sin B}} \]
    10. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \frac{\mathsf{neg}\left(x \cdot \cos B\right)}{\sin \color{blue}{B}} \]
      2. distribute-frac-negN/A

        \[\leadsto \mathsf{neg}\left(\frac{x \cdot \cos B}{\sin B}\right) \]
      3. clear-numN/A

        \[\leadsto \mathsf{neg}\left(\frac{1}{\frac{\sin B}{x \cdot \cos B}}\right) \]
      4. associate-/l/N/A

        \[\leadsto \mathsf{neg}\left(\frac{1}{\frac{\frac{\sin B}{\cos B}}{x}}\right) \]
      5. tan-quotN/A

        \[\leadsto \mathsf{neg}\left(\frac{1}{\frac{\tan B}{x}}\right) \]
      6. clear-numN/A

        \[\leadsto \mathsf{neg}\left(\frac{x}{\tan B}\right) \]
      7. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{x}{\tan B}\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(x, \tan B\right)\right) \]
      9. tan-lowering-tan.f6484.7%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    11. Applied egg-rr84.7%

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

    if 1.44999999999999991e-270 < F < 7.5e6

    1. Initial program 99.4%

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

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

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

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

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

      \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(F, \mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(x, 2\right)\right)\right), \frac{-1}{2}\right)\right), \mathsf{sin.f64}\left(B\right)\right), \color{blue}{\left(\frac{x}{B}\right)}\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f6476.9%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(F, \mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(x, 2\right)\right)\right), \frac{-1}{2}\right)\right), \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(x, \color{blue}{B}\right)\right) \]
    7. Simplified76.9%

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

    if 7.5e6 < F

    1. Initial program 63.4%

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \color{blue}{\left(x \cdot \frac{1}{\tan B}\right)}\right) \]
    3. Simplified80.5%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(\frac{1}{\sin B}\right)}, \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(1, \sin B\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      2. sin-lowering-sin.f6499.9%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    7. Simplified99.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -95000000000:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -2.1 \cdot 10^{-185}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{F \cdot F + \left(2 + x \cdot 2\right)}}}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 1.45 \cdot 10^{-270}:\\ \;\;\;\;\frac{x}{0 - \tan B}\\ \mathbf{elif}\;F \leq 7500000:\\ \;\;\;\;\frac{F \cdot {\left(F \cdot F + \left(2 + x \cdot 2\right)\right)}^{-0.5}}{\sin B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 88.6% accurate, 1.4× speedup?

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

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

\mathbf{elif}\;F \leq -1.55 \cdot 10^{-180}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;F \leq 1.45 \cdot 10^{-270}:\\
\;\;\;\;\frac{x}{0 - \tan B}\\

\mathbf{elif}\;F \leq 8400000:\\
\;\;\;\;t\_0\\

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


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

    1. Initial program 58.8%

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \color{blue}{\left(x \cdot \frac{1}{\tan B}\right)}\right) \]
    3. Simplified74.3%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(\frac{-1}{\sin B}\right)}, \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \sin B\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      2. sin-lowering-sin.f6499.8%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    7. Simplified99.8%

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

    if -9.5e10 < F < -1.5499999999999999e-180 or 1.44999999999999991e-270 < F < 8.4e6

    1. Initial program 99.4%

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

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

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

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

      \[\leadsto \color{blue}{\frac{F \cdot {\left(F \cdot F + \left(2 + x \cdot 2\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-+r+N/A

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      5. associate-*l/N/A

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1}{\frac{\sin B}{F}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      7. associate-*l/N/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{\sin B}{F}}\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      8. div-invN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B \cdot \frac{1}{F}}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      9. times-fracN/A

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \left(\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{1}{F}}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(\left({\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \left(\frac{1}{F}\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Applied egg-rr99.5%

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

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

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

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

      \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right)\right)\right)\right), \mathsf{sin.f64}\left(B\right)\right), \color{blue}{\left(\frac{x}{B}\right)}\right) \]
    10. Step-by-step derivation
      1. /-lowering-/.f6481.5%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right)\right)\right)\right), \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(x, \color{blue}{B}\right)\right) \]
    11. Simplified81.5%

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

    if -1.5499999999999999e-180 < F < 1.44999999999999991e-270

    1. Initial program 99.7%

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

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

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

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

      \[\leadsto \color{blue}{\frac{F \cdot {\left(F \cdot F + \left(2 + x \cdot 2\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-+r+N/A

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      5. associate-*l/N/A

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1}{\frac{\sin B}{F}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      7. associate-*l/N/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{\sin B}{F}}\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      8. div-invN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B \cdot \frac{1}{F}}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      9. times-fracN/A

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \left(\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{1}{F}}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(\left({\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \left(\frac{1}{F}\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Applied egg-rr99.9%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
    8. Step-by-step derivation
      1. associate-*r/N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \left(x \cdot \cos B\right)\right), \color{blue}{\sin B}\right) \]
      3. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{*.f64}\left(x, \cos B\right)\right), \sin B\right) \]
      5. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{*.f64}\left(x, \mathsf{cos.f64}\left(B\right)\right)\right), \sin B\right) \]
      6. sin-lowering-sin.f6484.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{*.f64}\left(x, \mathsf{cos.f64}\left(B\right)\right)\right), \mathsf{sin.f64}\left(B\right)\right) \]
    9. Simplified84.4%

      \[\leadsto \color{blue}{\frac{-1 \cdot \left(x \cdot \cos B\right)}{\sin B}} \]
    10. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \frac{\mathsf{neg}\left(x \cdot \cos B\right)}{\sin \color{blue}{B}} \]
      2. distribute-frac-negN/A

        \[\leadsto \mathsf{neg}\left(\frac{x \cdot \cos B}{\sin B}\right) \]
      3. clear-numN/A

        \[\leadsto \mathsf{neg}\left(\frac{1}{\frac{\sin B}{x \cdot \cos B}}\right) \]
      4. associate-/l/N/A

        \[\leadsto \mathsf{neg}\left(\frac{1}{\frac{\frac{\sin B}{\cos B}}{x}}\right) \]
      5. tan-quotN/A

        \[\leadsto \mathsf{neg}\left(\frac{1}{\frac{\tan B}{x}}\right) \]
      6. clear-numN/A

        \[\leadsto \mathsf{neg}\left(\frac{x}{\tan B}\right) \]
      7. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{x}{\tan B}\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(x, \tan B\right)\right) \]
      9. tan-lowering-tan.f6484.7%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    11. Applied egg-rr84.7%

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

    if 8.4e6 < F

    1. Initial program 63.4%

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \color{blue}{\left(x \cdot \frac{1}{\tan B}\right)}\right) \]
    3. Simplified80.5%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(\frac{1}{\sin B}\right)}, \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(1, \sin B\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      2. sin-lowering-sin.f6499.9%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    7. Simplified99.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -95000000000:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -1.55 \cdot 10^{-180}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{F \cdot F + \left(2 + x \cdot 2\right)}}}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 1.45 \cdot 10^{-270}:\\ \;\;\;\;\frac{x}{0 - \tan B}\\ \mathbf{elif}\;F \leq 8400000:\\ \;\;\;\;\frac{\frac{F}{\sqrt{F \cdot F + \left(2 + x \cdot 2\right)}}}{\sin B} - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 92.2% accurate, 1.4× speedup?

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

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

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

\mathbf{elif}\;F \leq 6400000:\\
\;\;\;\;\sqrt{\frac{1}{2 + \left(F \cdot F + x \cdot 2\right)}} \cdot \frac{F}{B} - t\_0\\

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


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

    1. Initial program 58.8%

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \color{blue}{\left(x \cdot \frac{1}{\tan B}\right)}\right) \]
    3. Simplified74.3%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(\frac{-1}{\sin B}\right)}, \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \sin B\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      2. sin-lowering-sin.f6499.8%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    7. Simplified99.8%

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

    if -2e11 < F < -4.99999999999999962e-66

    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. Step-by-step derivation
      1. +-commutativeN/A

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \color{blue}{\left(x \cdot \frac{1}{\tan B}\right)}\right) \]
    3. Simplified99.3%

      \[\leadsto \color{blue}{\frac{F \cdot {\left(F \cdot F + \left(2 + x \cdot 2\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-+r+N/A

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      5. associate-*l/N/A

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1}{\frac{\sin B}{F}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      7. associate-*l/N/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{\sin B}{F}}\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      8. div-invN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B \cdot \frac{1}{F}}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      9. times-fracN/A

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \left(\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{1}{F}}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(\left({\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \left(\frac{1}{F}\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Applied egg-rr99.4%

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

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

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

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

      \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right)\right)\right)\right), \mathsf{sin.f64}\left(B\right)\right), \color{blue}{\left(\frac{x}{B}\right)}\right) \]
    10. Step-by-step derivation
      1. /-lowering-/.f6499.6%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right)\right)\right)\right), \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(x, \color{blue}{B}\right)\right) \]
    11. Simplified99.6%

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

    if -4.99999999999999962e-66 < F < 6.4e6

    1. Initial program 99.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. Step-by-step derivation
      1. +-commutativeN/A

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \color{blue}{\left(x \cdot \frac{1}{\tan B}\right)}\right) \]
    3. Simplified99.7%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)}, \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot \frac{F}{B}\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      3. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(2 + \left(2 \cdot x + {F}^{2}\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      5. +-lowering-+.f64N/A

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left({F}^{2} + 2 \cdot x\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left({F}^{2}\right), \left(2 \cdot x\right)\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left(F \cdot F\right), \left(2 \cdot x\right)\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \left(2 \cdot x\right)\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \mathsf{*.f64}\left(2, x\right)\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      11. /-lowering-/.f6486.5%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \mathsf{*.f64}\left(2, x\right)\right)\right)\right)\right), \mathsf{/.f64}\left(F, B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    7. Simplified86.5%

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

    if 6.4e6 < F

    1. Initial program 63.4%

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \color{blue}{\left(x \cdot \frac{1}{\tan B}\right)}\right) \]
    3. Simplified80.5%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(\frac{1}{\sin B}\right)}, \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(1, \sin B\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      2. sin-lowering-sin.f6499.9%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    7. Simplified99.9%

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

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

Alternative 9: 86.5% accurate, 1.4× speedup?

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

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

\mathbf{elif}\;F \leq -1.25 \cdot 10^{-67}:\\
\;\;\;\;F \cdot \frac{t\_0}{\sin B}\\

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

\mathbf{elif}\;F \leq 0.00065:\\
\;\;\;\;t\_0 \cdot \frac{F}{\sin B}\\

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


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

    1. Initial program 61.7%

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \color{blue}{\left(x \cdot \frac{1}{\tan B}\right)}\right) \]
    3. Simplified76.1%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(\frac{-1}{\sin B}\right)}, \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \sin B\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      2. sin-lowering-sin.f6498.9%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    7. Simplified98.9%

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

    if -1.19999999999999996 < F < -1.25e-67

    1. Initial program 99.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 x around 0

      \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + {F}^{2}}}} \]
    4. Step-by-step derivation
      1. associate-*l/N/A

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

        \[\leadsto F \cdot \color{blue}{\frac{\sqrt{\frac{1}{2 + {F}^{2}}}}{\sin B}} \]
      3. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{*.f64}\left(F, \mathsf{/.f64}\left(\left(\sqrt{\frac{1}{2 + {F}^{2}}}\right), \color{blue}{\sin B}\right)\right) \]
      5. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(F, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1}{2 + {F}^{2}}\right)\right), \sin \color{blue}{B}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(F, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(2 + {F}^{2}\right)\right)\right), \sin B\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(F, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left({F}^{2}\right)\right)\right)\right), \sin B\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(F, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left(F \cdot F\right)\right)\right)\right), \sin B\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(F, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(F, F\right)\right)\right)\right), \sin B\right)\right) \]
      10. sin-lowering-sin.f6477.4%

        \[\leadsto \mathsf{*.f64}\left(F, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(F, F\right)\right)\right)\right), \mathsf{sin.f64}\left(B\right)\right)\right) \]
    5. Simplified77.4%

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

    if -1.25e-67 < F < 1.50000000000000006e-61

    1. Initial program 99.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. Step-by-step derivation
      1. +-commutativeN/A

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \color{blue}{\left(x \cdot \frac{1}{\tan B}\right)}\right) \]
    3. Simplified99.7%

      \[\leadsto \color{blue}{\frac{F \cdot {\left(F \cdot F + \left(2 + x \cdot 2\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-+r+N/A

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      5. associate-*l/N/A

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1}{\frac{\sin B}{F}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      7. associate-*l/N/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{\sin B}{F}}\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      8. div-invN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B \cdot \frac{1}{F}}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      9. times-fracN/A

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \left(\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{1}{F}}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(\left({\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \left(\frac{1}{F}\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Applied egg-rr99.6%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
    8. Step-by-step derivation
      1. associate-*r/N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \left(x \cdot \cos B\right)\right), \color{blue}{\sin B}\right) \]
      3. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{*.f64}\left(x, \cos B\right)\right), \sin B\right) \]
      5. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{*.f64}\left(x, \mathsf{cos.f64}\left(B\right)\right)\right), \sin B\right) \]
      6. sin-lowering-sin.f6472.7%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{*.f64}\left(x, \mathsf{cos.f64}\left(B\right)\right)\right), \mathsf{sin.f64}\left(B\right)\right) \]
    9. Simplified72.7%

      \[\leadsto \color{blue}{\frac{-1 \cdot \left(x \cdot \cos B\right)}{\sin B}} \]
    10. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \frac{\mathsf{neg}\left(x \cdot \cos B\right)}{\sin \color{blue}{B}} \]
      2. distribute-frac-negN/A

        \[\leadsto \mathsf{neg}\left(\frac{x \cdot \cos B}{\sin B}\right) \]
      3. clear-numN/A

        \[\leadsto \mathsf{neg}\left(\frac{1}{\frac{\sin B}{x \cdot \cos B}}\right) \]
      4. associate-/l/N/A

        \[\leadsto \mathsf{neg}\left(\frac{1}{\frac{\frac{\sin B}{\cos B}}{x}}\right) \]
      5. tan-quotN/A

        \[\leadsto \mathsf{neg}\left(\frac{1}{\frac{\tan B}{x}}\right) \]
      6. clear-numN/A

        \[\leadsto \mathsf{neg}\left(\frac{x}{\tan B}\right) \]
      7. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{x}{\tan B}\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(x, \tan B\right)\right) \]
      9. tan-lowering-tan.f6472.8%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    11. Applied egg-rr72.8%

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

    if 1.50000000000000006e-61 < F < 6.4999999999999997e-4

    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. Step-by-step derivation
      1. +-commutativeN/A

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

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

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

      \[\leadsto \color{blue}{\frac{F \cdot {\left(F \cdot F + \left(2 + x \cdot 2\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-+r+N/A

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      5. associate-*l/N/A

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1}{\frac{\sin B}{F}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      7. associate-*l/N/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{\sin B}{F}}\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      8. div-invN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B \cdot \frac{1}{F}}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      9. times-fracN/A

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \left(\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{1}{F}}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(\left({\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \left(\frac{1}{F}\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Applied egg-rr99.3%

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

      \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + {F}^{2}}}} \]
    8. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{F}{\sin B}\right), \color{blue}{\left(\sqrt{\frac{1}{2 + {F}^{2}}}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(F, \sin B\right), \left(\sqrt{\color{blue}{\frac{1}{2 + {F}^{2}}}}\right)\right) \]
      3. sin-lowering-sin.f64N/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(F, \mathsf{sin.f64}\left(B\right)\right), \mathsf{sqrt.f64}\left(\left(\frac{1}{2 + {F}^{2}}\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(F, \mathsf{sin.f64}\left(B\right)\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(2 + {F}^{2}\right)\right)\right)\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(F, \mathsf{sin.f64}\left(B\right)\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left({F}^{2}\right)\right)\right)\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(F, \mathsf{sin.f64}\left(B\right)\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left(F \cdot F\right)\right)\right)\right)\right) \]
      8. *-lowering-*.f6490.6%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(F, \mathsf{sin.f64}\left(B\right)\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(F, F\right)\right)\right)\right)\right) \]
    9. Simplified90.6%

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

    if 6.4999999999999997e-4 < F

    1. Initial program 65.8%

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

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

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

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

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(\frac{1}{\sin B}\right)}, \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(1, \sin B\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      2. sin-lowering-sin.f6498.5%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    7. Simplified98.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1.2:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -1.25 \cdot 10^{-67}:\\ \;\;\;\;F \cdot \frac{\sqrt{\frac{1}{F \cdot F + 2}}}{\sin B}\\ \mathbf{elif}\;F \leq 1.5 \cdot 10^{-61}:\\ \;\;\;\;\frac{x}{0 - \tan B}\\ \mathbf{elif}\;F \leq 0.00065:\\ \;\;\;\;\sqrt{\frac{1}{F \cdot F + 2}} \cdot \frac{F}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 86.7% accurate, 1.4× speedup?

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

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

\mathbf{elif}\;F \leq -1.82 \cdot 10^{-68}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;F \leq 8.8 \cdot 10^{-54}:\\
\;\;\;\;\frac{x}{0 - \tan B}\\

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

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


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

    1. Initial program 61.7%

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \color{blue}{\left(x \cdot \frac{1}{\tan B}\right)}\right) \]
    3. Simplified76.1%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(\frac{-1}{\sin B}\right)}, \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \sin B\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      2. sin-lowering-sin.f6498.9%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    7. Simplified98.9%

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

    if -1.19999999999999996 < F < -1.81999999999999994e-68 or 8.7999999999999998e-54 < F < 5.5000000000000002e-5

    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. Add Preprocessing
    3. Taylor expanded in x around 0

      \[\leadsto \color{blue}{\frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + {F}^{2}}}} \]
    4. Step-by-step derivation
      1. associate-*l/N/A

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

        \[\leadsto F \cdot \color{blue}{\frac{\sqrt{\frac{1}{2 + {F}^{2}}}}{\sin B}} \]
      3. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{*.f64}\left(F, \mathsf{/.f64}\left(\left(\sqrt{\frac{1}{2 + {F}^{2}}}\right), \color{blue}{\sin B}\right)\right) \]
      5. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(F, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1}{2 + {F}^{2}}\right)\right), \sin \color{blue}{B}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(F, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(2 + {F}^{2}\right)\right)\right), \sin B\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(F, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left({F}^{2}\right)\right)\right)\right), \sin B\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(F, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left(F \cdot F\right)\right)\right)\right), \sin B\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(F, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(F, F\right)\right)\right)\right), \sin B\right)\right) \]
      10. sin-lowering-sin.f6483.4%

        \[\leadsto \mathsf{*.f64}\left(F, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(F, F\right)\right)\right)\right), \mathsf{sin.f64}\left(B\right)\right)\right) \]
    5. Simplified83.4%

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

    if -1.81999999999999994e-68 < F < 8.7999999999999998e-54

    1. Initial program 99.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. Step-by-step derivation
      1. +-commutativeN/A

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \color{blue}{\left(x \cdot \frac{1}{\tan B}\right)}\right) \]
    3. Simplified99.7%

      \[\leadsto \color{blue}{\frac{F \cdot {\left(F \cdot F + \left(2 + x \cdot 2\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-+r+N/A

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      5. associate-*l/N/A

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1}{\frac{\sin B}{F}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      7. associate-*l/N/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{\sin B}{F}}\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      8. div-invN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B \cdot \frac{1}{F}}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      9. times-fracN/A

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \left(\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{1}{F}}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(\left({\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \left(\frac{1}{F}\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Applied egg-rr99.6%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
    8. Step-by-step derivation
      1. associate-*r/N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \left(x \cdot \cos B\right)\right), \color{blue}{\sin B}\right) \]
      3. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{*.f64}\left(x, \cos B\right)\right), \sin B\right) \]
      5. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{*.f64}\left(x, \mathsf{cos.f64}\left(B\right)\right)\right), \sin B\right) \]
      6. sin-lowering-sin.f6472.7%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{*.f64}\left(x, \mathsf{cos.f64}\left(B\right)\right)\right), \mathsf{sin.f64}\left(B\right)\right) \]
    9. Simplified72.7%

      \[\leadsto \color{blue}{\frac{-1 \cdot \left(x \cdot \cos B\right)}{\sin B}} \]
    10. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \frac{\mathsf{neg}\left(x \cdot \cos B\right)}{\sin \color{blue}{B}} \]
      2. distribute-frac-negN/A

        \[\leadsto \mathsf{neg}\left(\frac{x \cdot \cos B}{\sin B}\right) \]
      3. clear-numN/A

        \[\leadsto \mathsf{neg}\left(\frac{1}{\frac{\sin B}{x \cdot \cos B}}\right) \]
      4. associate-/l/N/A

        \[\leadsto \mathsf{neg}\left(\frac{1}{\frac{\frac{\sin B}{\cos B}}{x}}\right) \]
      5. tan-quotN/A

        \[\leadsto \mathsf{neg}\left(\frac{1}{\frac{\tan B}{x}}\right) \]
      6. clear-numN/A

        \[\leadsto \mathsf{neg}\left(\frac{x}{\tan B}\right) \]
      7. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{x}{\tan B}\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(x, \tan B\right)\right) \]
      9. tan-lowering-tan.f6472.8%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    11. Applied egg-rr72.8%

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

    if 5.5000000000000002e-5 < F

    1. Initial program 65.8%

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

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

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

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

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(\frac{1}{\sin B}\right)}, \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(1, \sin B\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      2. sin-lowering-sin.f6498.5%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    7. Simplified98.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1.2:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -1.82 \cdot 10^{-68}:\\ \;\;\;\;F \cdot \frac{\sqrt{\frac{1}{F \cdot F + 2}}}{\sin B}\\ \mathbf{elif}\;F \leq 8.8 \cdot 10^{-54}:\\ \;\;\;\;\frac{x}{0 - \tan B}\\ \mathbf{elif}\;F \leq 5.5 \cdot 10^{-5}:\\ \;\;\;\;F \cdot \frac{\sqrt{\frac{1}{F \cdot F + 2}}}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 84.2% accurate, 1.4× speedup?

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

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

\mathbf{elif}\;F \leq -2.2 \cdot 10^{-185}:\\
\;\;\;\;\frac{\frac{F}{\sqrt{F \cdot F + t\_0}} - x}{B}\\

\mathbf{elif}\;F \leq 1.12 \cdot 10^{-129}:\\
\;\;\;\;\frac{x}{0 - \tan B}\\

\mathbf{elif}\;F \leq 3.6 \cdot 10^{-29}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{t\_0}} - x}{B}\\

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


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

    1. Initial program 60.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. Step-by-step derivation
      1. +-commutativeN/A

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \color{blue}{\left(x \cdot \frac{1}{\tan B}\right)}\right) \]
    3. Simplified75.4%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(\frac{-1}{\sin B}\right)}, \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \sin B\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      2. sin-lowering-sin.f6499.7%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    7. Simplified99.7%

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

    if -175 < F < -2.2e-185

    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 B around 0

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right), x\right), B\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right), x\right), B\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\left(\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}\right)\right)\right), x\right), B\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(2 + \left(2 \cdot x + {F}^{2}\right)\right)\right)\right)\right), x\right), B\right) \]
      6. +-lowering-+.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left({F}^{2} + 2 \cdot x\right)\right)\right)\right)\right), x\right), B\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left({F}^{2}\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left(F \cdot F\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      11. *-lowering-*.f6466.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \mathsf{*.f64}\left(2, x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
    5. Simplified66.9%

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

        \[\leadsto \mathsf{/.f64}\left(\left(F \cdot \sqrt{\frac{1}{2 + \left(F \cdot F + 2 \cdot x\right)}} - x\right), \color{blue}{B}\right) \]
    7. Applied egg-rr67.0%

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

    if -2.2e-185 < F < 1.12000000000000006e-129

    1. Initial program 99.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. Step-by-step derivation
      1. +-commutativeN/A

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \color{blue}{\left(x \cdot \frac{1}{\tan B}\right)}\right) \]
    3. Simplified99.7%

      \[\leadsto \color{blue}{\frac{F \cdot {\left(F \cdot F + \left(2 + x \cdot 2\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-+r+N/A

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      5. associate-*l/N/A

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1}{\frac{\sin B}{F}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      7. associate-*l/N/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{\sin B}{F}}\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      8. div-invN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B \cdot \frac{1}{F}}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      9. times-fracN/A

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \left(\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{1}{F}}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(\left({\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \left(\frac{1}{F}\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Applied egg-rr99.7%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
    8. Step-by-step derivation
      1. associate-*r/N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \left(x \cdot \cos B\right)\right), \color{blue}{\sin B}\right) \]
      3. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{*.f64}\left(x, \cos B\right)\right), \sin B\right) \]
      5. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{*.f64}\left(x, \mathsf{cos.f64}\left(B\right)\right)\right), \sin B\right) \]
      6. sin-lowering-sin.f6477.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{*.f64}\left(x, \mathsf{cos.f64}\left(B\right)\right)\right), \mathsf{sin.f64}\left(B\right)\right) \]
    9. Simplified77.4%

      \[\leadsto \color{blue}{\frac{-1 \cdot \left(x \cdot \cos B\right)}{\sin B}} \]
    10. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \frac{\mathsf{neg}\left(x \cdot \cos B\right)}{\sin \color{blue}{B}} \]
      2. distribute-frac-negN/A

        \[\leadsto \mathsf{neg}\left(\frac{x \cdot \cos B}{\sin B}\right) \]
      3. clear-numN/A

        \[\leadsto \mathsf{neg}\left(\frac{1}{\frac{\sin B}{x \cdot \cos B}}\right) \]
      4. associate-/l/N/A

        \[\leadsto \mathsf{neg}\left(\frac{1}{\frac{\frac{\sin B}{\cos B}}{x}}\right) \]
      5. tan-quotN/A

        \[\leadsto \mathsf{neg}\left(\frac{1}{\frac{\tan B}{x}}\right) \]
      6. clear-numN/A

        \[\leadsto \mathsf{neg}\left(\frac{x}{\tan B}\right) \]
      7. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{x}{\tan B}\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(x, \tan B\right)\right) \]
      9. tan-lowering-tan.f6477.5%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    11. Applied egg-rr77.5%

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

    if 1.12000000000000006e-129 < F < 3.59999999999999974e-29

    1. Initial program 99.4%

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right), x\right), B\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right), x\right), B\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\left(\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}\right)\right)\right), x\right), B\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(2 + \left(2 \cdot x + {F}^{2}\right)\right)\right)\right)\right), x\right), B\right) \]
      6. +-lowering-+.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left({F}^{2} + 2 \cdot x\right)\right)\right)\right)\right), x\right), B\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left({F}^{2}\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left(F \cdot F\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      11. *-lowering-*.f6481.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \mathsf{*.f64}\left(2, x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
    5. Simplified81.9%

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

      \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(F \cdot \sqrt{\frac{1}{2 + 2 \cdot x}} - x\right)}, B\right) \]
    7. Step-by-step derivation
      1. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(F \cdot \sqrt{\frac{1}{2 + 2 \cdot x}}\right), x\right), B\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \left(\sqrt{\frac{1}{2 + 2 \cdot x}}\right)\right), x\right), B\right) \]
      3. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\left(\frac{1}{2 + 2 \cdot x}\right)\right)\right), x\right), B\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(2 + 2 \cdot x\right)\right)\right)\right), x\right), B\right) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left(2 \cdot x\right)\right)\right)\right)\right), x\right), B\right) \]
      6. *-lowering-*.f6481.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right)\right)\right)\right), x\right), B\right) \]
    8. Simplified81.9%

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

    if 3.59999999999999974e-29 < F

    1. Initial program 68.2%

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \color{blue}{\left(x \cdot \frac{1}{\tan B}\right)}\right) \]
    3. Simplified83.0%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(\frac{1}{\sin B}\right)}, \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(1, \sin B\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      2. sin-lowering-sin.f6493.3%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    7. Simplified93.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -175:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -2.2 \cdot 10^{-185}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{F \cdot F + \left(2 + x \cdot 2\right)}} - x}{B}\\ \mathbf{elif}\;F \leq 1.12 \cdot 10^{-129}:\\ \;\;\;\;\frac{x}{0 - \tan B}\\ \mathbf{elif}\;F \leq 3.6 \cdot 10^{-29}:\\ \;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 77.1% accurate, 1.5× speedup?

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

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

\mathbf{elif}\;F \leq -1.85 \cdot 10^{-180}:\\
\;\;\;\;\frac{\frac{F}{\sqrt{F \cdot F + t\_0}} - x}{B}\\

\mathbf{elif}\;F \leq 2.8 \cdot 10^{-132}:\\
\;\;\;\;\frac{x}{0 - \tan B}\\

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

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


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

    1. Initial program 60.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. Step-by-step derivation
      1. +-commutativeN/A

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \color{blue}{\left(x \cdot \frac{1}{\tan B}\right)}\right) \]
    3. Simplified75.4%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(\frac{-1}{\sin B}\right)}, \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \sin B\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      2. sin-lowering-sin.f6499.7%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    7. Simplified99.7%

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

    if -330 < F < -1.85000000000000008e-180

    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 B around 0

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right), x\right), B\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right), x\right), B\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\left(\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}\right)\right)\right), x\right), B\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(2 + \left(2 \cdot x + {F}^{2}\right)\right)\right)\right)\right), x\right), B\right) \]
      6. +-lowering-+.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left({F}^{2} + 2 \cdot x\right)\right)\right)\right)\right), x\right), B\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left({F}^{2}\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left(F \cdot F\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      11. *-lowering-*.f6466.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \mathsf{*.f64}\left(2, x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
    5. Simplified66.9%

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

        \[\leadsto \mathsf{/.f64}\left(\left(F \cdot \sqrt{\frac{1}{2 + \left(F \cdot F + 2 \cdot x\right)}} - x\right), \color{blue}{B}\right) \]
    7. Applied egg-rr67.0%

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

    if -1.85000000000000008e-180 < F < 2.80000000000000002e-132

    1. Initial program 99.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. Step-by-step derivation
      1. +-commutativeN/A

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \color{blue}{\left(x \cdot \frac{1}{\tan B}\right)}\right) \]
    3. Simplified99.7%

      \[\leadsto \color{blue}{\frac{F \cdot {\left(F \cdot F + \left(2 + x \cdot 2\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-+r+N/A

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      5. associate-*l/N/A

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1}{\frac{\sin B}{F}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      7. associate-*l/N/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{\sin B}{F}}\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      8. div-invN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B \cdot \frac{1}{F}}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      9. times-fracN/A

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \left(\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{1}{F}}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(\left({\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \left(\frac{1}{F}\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Applied egg-rr99.7%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
    8. Step-by-step derivation
      1. associate-*r/N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \left(x \cdot \cos B\right)\right), \color{blue}{\sin B}\right) \]
      3. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{*.f64}\left(x, \cos B\right)\right), \sin B\right) \]
      5. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{*.f64}\left(x, \mathsf{cos.f64}\left(B\right)\right)\right), \sin B\right) \]
      6. sin-lowering-sin.f6477.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{*.f64}\left(x, \mathsf{cos.f64}\left(B\right)\right)\right), \mathsf{sin.f64}\left(B\right)\right) \]
    9. Simplified77.4%

      \[\leadsto \color{blue}{\frac{-1 \cdot \left(x \cdot \cos B\right)}{\sin B}} \]
    10. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \frac{\mathsf{neg}\left(x \cdot \cos B\right)}{\sin \color{blue}{B}} \]
      2. distribute-frac-negN/A

        \[\leadsto \mathsf{neg}\left(\frac{x \cdot \cos B}{\sin B}\right) \]
      3. clear-numN/A

        \[\leadsto \mathsf{neg}\left(\frac{1}{\frac{\sin B}{x \cdot \cos B}}\right) \]
      4. associate-/l/N/A

        \[\leadsto \mathsf{neg}\left(\frac{1}{\frac{\frac{\sin B}{\cos B}}{x}}\right) \]
      5. tan-quotN/A

        \[\leadsto \mathsf{neg}\left(\frac{1}{\frac{\tan B}{x}}\right) \]
      6. clear-numN/A

        \[\leadsto \mathsf{neg}\left(\frac{x}{\tan B}\right) \]
      7. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{x}{\tan B}\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(x, \tan B\right)\right) \]
      9. tan-lowering-tan.f6477.5%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    11. Applied egg-rr77.5%

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

    if 2.80000000000000002e-132 < F < 1.99999999999999989e-29

    1. Initial program 99.4%

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right), x\right), B\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right), x\right), B\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\left(\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}\right)\right)\right), x\right), B\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(2 + \left(2 \cdot x + {F}^{2}\right)\right)\right)\right)\right), x\right), B\right) \]
      6. +-lowering-+.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left({F}^{2} + 2 \cdot x\right)\right)\right)\right)\right), x\right), B\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left({F}^{2}\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left(F \cdot F\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      11. *-lowering-*.f6481.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \mathsf{*.f64}\left(2, x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
    5. Simplified81.9%

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

      \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(F \cdot \sqrt{\frac{1}{2 + 2 \cdot x}} - x\right)}, B\right) \]
    7. Step-by-step derivation
      1. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(F \cdot \sqrt{\frac{1}{2 + 2 \cdot x}}\right), x\right), B\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \left(\sqrt{\frac{1}{2 + 2 \cdot x}}\right)\right), x\right), B\right) \]
      3. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\left(\frac{1}{2 + 2 \cdot x}\right)\right)\right), x\right), B\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(2 + 2 \cdot x\right)\right)\right)\right), x\right), B\right) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left(2 \cdot x\right)\right)\right)\right)\right), x\right), B\right) \]
      6. *-lowering-*.f6481.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right)\right)\right)\right), x\right), B\right) \]
    8. Simplified81.9%

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

    if 1.99999999999999989e-29 < F

    1. Initial program 68.2%

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \color{blue}{\left(x \cdot \frac{1}{\tan B}\right)}\right) \]
    3. Simplified83.0%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(\frac{1}{\sin B}\right)}, \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(1, \sin B\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      2. sin-lowering-sin.f6493.3%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    7. Simplified93.3%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(\frac{1}{B}\right)}, \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    9. Step-by-step derivation
      1. /-lowering-/.f6467.8%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    10. Simplified67.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -330:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -1.85 \cdot 10^{-180}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{F \cdot F + \left(2 + x \cdot 2\right)}} - x}{B}\\ \mathbf{elif}\;F \leq 2.8 \cdot 10^{-132}:\\ \;\;\;\;\frac{x}{0 - \tan B}\\ \mathbf{elif}\;F \leq 2 \cdot 10^{-29}:\\ \;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 56.9% accurate, 2.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq 0.19:\\ \;\;\;\;\frac{\left(B \cdot B\right) \cdot \left(x \cdot 0.3333333333333333 + \left(B \cdot B\right) \cdot \left(x \cdot 0.022222222222222223 + \left(B \cdot B\right) \cdot \left(\left(x \cdot 0.022222222222222223\right) \cdot -0.3333333333333333 + x \cdot 0.009523809523809525\right)\right)\right) + \left(F \cdot \sqrt{\frac{1}{x \cdot 2 + \left(F \cdot F + 2\right)}} - x\right)}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{0 - \tan B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (if (<= B 0.19)
   (/
    (+
     (*
      (* B B)
      (+
       (* x 0.3333333333333333)
       (*
        (* B B)
        (+
         (* x 0.022222222222222223)
         (*
          (* B B)
          (+
           (* (* x 0.022222222222222223) -0.3333333333333333)
           (* x 0.009523809523809525)))))))
     (- (* F (sqrt (/ 1.0 (+ (* x 2.0) (+ (* F F) 2.0))))) x))
    B)
   (/ x (- 0.0 (tan B)))))
double code(double F, double B, double x) {
	double tmp;
	if (B <= 0.19) {
		tmp = (((B * B) * ((x * 0.3333333333333333) + ((B * B) * ((x * 0.022222222222222223) + ((B * B) * (((x * 0.022222222222222223) * -0.3333333333333333) + (x * 0.009523809523809525))))))) + ((F * sqrt((1.0 / ((x * 2.0) + ((F * F) + 2.0))))) - x)) / B;
	} else {
		tmp = x / (0.0 - tan(B));
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: tmp
    if (b <= 0.19d0) then
        tmp = (((b * b) * ((x * 0.3333333333333333d0) + ((b * b) * ((x * 0.022222222222222223d0) + ((b * b) * (((x * 0.022222222222222223d0) * (-0.3333333333333333d0)) + (x * 0.009523809523809525d0))))))) + ((f * sqrt((1.0d0 / ((x * 2.0d0) + ((f * f) + 2.0d0))))) - x)) / b
    else
        tmp = x / (0.0d0 - tan(b))
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double tmp;
	if (B <= 0.19) {
		tmp = (((B * B) * ((x * 0.3333333333333333) + ((B * B) * ((x * 0.022222222222222223) + ((B * B) * (((x * 0.022222222222222223) * -0.3333333333333333) + (x * 0.009523809523809525))))))) + ((F * Math.sqrt((1.0 / ((x * 2.0) + ((F * F) + 2.0))))) - x)) / B;
	} else {
		tmp = x / (0.0 - Math.tan(B));
	}
	return tmp;
}
def code(F, B, x):
	tmp = 0
	if B <= 0.19:
		tmp = (((B * B) * ((x * 0.3333333333333333) + ((B * B) * ((x * 0.022222222222222223) + ((B * B) * (((x * 0.022222222222222223) * -0.3333333333333333) + (x * 0.009523809523809525))))))) + ((F * math.sqrt((1.0 / ((x * 2.0) + ((F * F) + 2.0))))) - x)) / B
	else:
		tmp = x / (0.0 - math.tan(B))
	return tmp
function code(F, B, x)
	tmp = 0.0
	if (B <= 0.19)
		tmp = Float64(Float64(Float64(Float64(B * B) * Float64(Float64(x * 0.3333333333333333) + Float64(Float64(B * B) * Float64(Float64(x * 0.022222222222222223) + Float64(Float64(B * B) * Float64(Float64(Float64(x * 0.022222222222222223) * -0.3333333333333333) + Float64(x * 0.009523809523809525))))))) + Float64(Float64(F * sqrt(Float64(1.0 / Float64(Float64(x * 2.0) + Float64(Float64(F * F) + 2.0))))) - x)) / B);
	else
		tmp = Float64(x / Float64(0.0 - tan(B)));
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	tmp = 0.0;
	if (B <= 0.19)
		tmp = (((B * B) * ((x * 0.3333333333333333) + ((B * B) * ((x * 0.022222222222222223) + ((B * B) * (((x * 0.022222222222222223) * -0.3333333333333333) + (x * 0.009523809523809525))))))) + ((F * sqrt((1.0 / ((x * 2.0) + ((F * F) + 2.0))))) - x)) / B;
	else
		tmp = x / (0.0 - tan(B));
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := If[LessEqual[B, 0.19], N[(N[(N[(N[(B * B), $MachinePrecision] * N[(N[(x * 0.3333333333333333), $MachinePrecision] + N[(N[(B * B), $MachinePrecision] * N[(N[(x * 0.022222222222222223), $MachinePrecision] + N[(N[(B * B), $MachinePrecision] * N[(N[(N[(x * 0.022222222222222223), $MachinePrecision] * -0.3333333333333333), $MachinePrecision] + N[(x * 0.009523809523809525), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(F * N[Sqrt[N[(1.0 / N[(N[(x * 2.0), $MachinePrecision] + N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], N[(x / N[(0.0 - N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;B \leq 0.19:\\
\;\;\;\;\frac{\left(B \cdot B\right) \cdot \left(x \cdot 0.3333333333333333 + \left(B \cdot B\right) \cdot \left(x \cdot 0.022222222222222223 + \left(B \cdot B\right) \cdot \left(\left(x \cdot 0.022222222222222223\right) \cdot -0.3333333333333333 + x \cdot 0.009523809523809525\right)\right)\right) + \left(F \cdot \sqrt{\frac{1}{x \cdot 2 + \left(F \cdot F + 2\right)}} - x\right)}{B}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if B < 0.19

    1. Initial program 75.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. Step-by-step derivation
      1. +-commutativeN/A

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \color{blue}{\left(x \cdot \frac{1}{\tan B}\right)}\right) \]
    3. Simplified87.1%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)}, \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot \frac{F}{B}\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      3. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(2 + \left(2 \cdot x + {F}^{2}\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      5. +-lowering-+.f64N/A

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left({F}^{2} + 2 \cdot x\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left({F}^{2}\right), \left(2 \cdot x\right)\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left(F \cdot F\right), \left(2 \cdot x\right)\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \left(2 \cdot x\right)\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \mathsf{*.f64}\left(2, x\right)\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      11. /-lowering-/.f6464.1%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \mathsf{*.f64}\left(2, x\right)\right)\right)\right)\right), \mathsf{/.f64}\left(F, B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    7. Simplified64.1%

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

      \[\leadsto \color{blue}{\frac{\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} + {B}^{2} \cdot \left(\frac{1}{3} \cdot x + {B}^{2} \cdot \left(\frac{-1}{9} \cdot x + \left(\frac{2}{15} \cdot x + {B}^{2} \cdot \left(\frac{-1}{3} \cdot \left(\frac{-1}{9} \cdot x + \frac{2}{15} \cdot x\right) + \left(\frac{-2}{45} \cdot x + \frac{17}{315} \cdot x\right)\right)\right)\right)\right)\right) - x}{B}} \]
    9. Simplified60.0%

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

    if 0.19 < B

    1. Initial program 89.8%

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \color{blue}{\left(x \cdot \frac{1}{\tan B}\right)}\right) \]
    3. Simplified90.0%

      \[\leadsto \color{blue}{\frac{F \cdot {\left(F \cdot F + \left(2 + x \cdot 2\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-+r+N/A

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      5. associate-*l/N/A

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1}{\frac{\sin B}{F}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      7. associate-*l/N/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{\sin B}{F}}\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      8. div-invN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B \cdot \frac{1}{F}}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      9. times-fracN/A

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \left(\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{1}{F}}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(\left({\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \left(\frac{1}{F}\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Applied egg-rr89.9%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
    8. Step-by-step derivation
      1. associate-*r/N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \left(x \cdot \cos B\right)\right), \color{blue}{\sin B}\right) \]
      3. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{*.f64}\left(x, \cos B\right)\right), \sin B\right) \]
      5. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{*.f64}\left(x, \mathsf{cos.f64}\left(B\right)\right)\right), \sin B\right) \]
      6. sin-lowering-sin.f6453.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{*.f64}\left(x, \mathsf{cos.f64}\left(B\right)\right)\right), \mathsf{sin.f64}\left(B\right)\right) \]
    9. Simplified53.3%

      \[\leadsto \color{blue}{\frac{-1 \cdot \left(x \cdot \cos B\right)}{\sin B}} \]
    10. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \frac{\mathsf{neg}\left(x \cdot \cos B\right)}{\sin \color{blue}{B}} \]
      2. distribute-frac-negN/A

        \[\leadsto \mathsf{neg}\left(\frac{x \cdot \cos B}{\sin B}\right) \]
      3. clear-numN/A

        \[\leadsto \mathsf{neg}\left(\frac{1}{\frac{\sin B}{x \cdot \cos B}}\right) \]
      4. associate-/l/N/A

        \[\leadsto \mathsf{neg}\left(\frac{1}{\frac{\frac{\sin B}{\cos B}}{x}}\right) \]
      5. tan-quotN/A

        \[\leadsto \mathsf{neg}\left(\frac{1}{\frac{\tan B}{x}}\right) \]
      6. clear-numN/A

        \[\leadsto \mathsf{neg}\left(\frac{x}{\tan B}\right) \]
      7. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{x}{\tan B}\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(x, \tan B\right)\right) \]
      9. tan-lowering-tan.f6453.5%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    11. Applied egg-rr53.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 0.19:\\ \;\;\;\;\frac{\left(B \cdot B\right) \cdot \left(x \cdot 0.3333333333333333 + \left(B \cdot B\right) \cdot \left(x \cdot 0.022222222222222223 + \left(B \cdot B\right) \cdot \left(\left(x \cdot 0.022222222222222223\right) \cdot -0.3333333333333333 + x \cdot 0.009523809523809525\right)\right)\right) + \left(F \cdot \sqrt{\frac{1}{x \cdot 2 + \left(F \cdot F + 2\right)}} - x\right)}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{0 - \tan B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 69.7% accurate, 2.4× speedup?

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

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

\mathbf{elif}\;F \leq -1.35 \cdot 10^{-180}:\\
\;\;\;\;\frac{F}{B} \cdot t\_0 - \frac{x}{B}\\

\mathbf{elif}\;F \leq 4.8 \cdot 10^{-133}:\\
\;\;\;\;\frac{x}{0 - \tan B}\\

\mathbf{elif}\;F \leq 3.2 \cdot 10^{-29}:\\
\;\;\;\;\frac{F \cdot t\_0 - x}{B}\\

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


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

    1. Initial program 61.2%

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

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

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

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

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)}, \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot \frac{F}{B}\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      3. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(2 + \left(2 \cdot x + {F}^{2}\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      5. +-lowering-+.f64N/A

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left({F}^{2} + 2 \cdot x\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left({F}^{2}\right), \left(2 \cdot x\right)\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left(F \cdot F\right), \left(2 \cdot x\right)\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \left(2 \cdot x\right)\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \mathsf{*.f64}\left(2, x\right)\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      11. /-lowering-/.f6442.1%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \mathsf{*.f64}\left(2, x\right)\right)\right)\right)\right), \mathsf{/.f64}\left(F, B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    7. Simplified42.1%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(\frac{-1}{B}\right)}, \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    9. Step-by-step derivation
      1. /-lowering-/.f6470.2%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, B\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    10. Simplified70.2%

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

    if -1.25 < F < -1.35000000000000007e-180

    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 B around 0

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right), x\right), B\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right), x\right), B\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\left(\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}\right)\right)\right), x\right), B\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(2 + \left(2 \cdot x + {F}^{2}\right)\right)\right)\right)\right), x\right), B\right) \]
      6. +-lowering-+.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left({F}^{2} + 2 \cdot x\right)\right)\right)\right)\right), x\right), B\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left({F}^{2}\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left(F \cdot F\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      11. *-lowering-*.f6465.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \mathsf{*.f64}\left(2, x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
    5. Simplified65.9%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{B} + \frac{F}{B} \cdot \sqrt{\frac{1}{2 + 2 \cdot x}}} \]
    7. Step-by-step derivation
      1. +-commutativeN/A

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

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

        \[\leadsto \frac{F}{B} \cdot \sqrt{\frac{1}{2 + 2 \cdot x}} - \color{blue}{\frac{x}{B}} \]
      4. --lowering--.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F}{B} \cdot \sqrt{\frac{1}{2 + 2 \cdot x}}\right), \color{blue}{\left(\frac{x}{B}\right)}\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\left(\frac{F}{B}\right), \left(\sqrt{\frac{1}{2 + 2 \cdot x}}\right)\right), \left(\frac{\color{blue}{x}}{B}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(F, B\right), \left(\sqrt{\frac{1}{2 + 2 \cdot x}}\right)\right), \left(\frac{x}{B}\right)\right) \]
      7. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(F, B\right), \mathsf{sqrt.f64}\left(\left(\frac{1}{2 + 2 \cdot x}\right)\right)\right), \left(\frac{x}{B}\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(F, B\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(2 + 2 \cdot x\right)\right)\right)\right), \left(\frac{x}{B}\right)\right) \]
      9. +-lowering-+.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(F, B\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left(2 \cdot x\right)\right)\right)\right)\right), \left(\frac{x}{B}\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(F, B\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right)\right)\right)\right), \left(\frac{x}{B}\right)\right) \]
      11. /-lowering-/.f6463.9%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(F, B\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right)\right)\right)\right), \mathsf{/.f64}\left(x, \color{blue}{B}\right)\right) \]
    8. Simplified63.9%

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

    if -1.35000000000000007e-180 < F < 4.8e-133

    1. Initial program 99.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. Step-by-step derivation
      1. +-commutativeN/A

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \color{blue}{\left(x \cdot \frac{1}{\tan B}\right)}\right) \]
    3. Simplified99.7%

      \[\leadsto \color{blue}{\frac{F \cdot {\left(F \cdot F + \left(2 + x \cdot 2\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-+r+N/A

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      5. associate-*l/N/A

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1}{\frac{\sin B}{F}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      7. associate-*l/N/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{\sin B}{F}}\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      8. div-invN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B \cdot \frac{1}{F}}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      9. times-fracN/A

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \left(\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{1}{F}}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(\left({\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \left(\frac{1}{F}\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Applied egg-rr99.7%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
    8. Step-by-step derivation
      1. associate-*r/N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \left(x \cdot \cos B\right)\right), \color{blue}{\sin B}\right) \]
      3. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{*.f64}\left(x, \cos B\right)\right), \sin B\right) \]
      5. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{*.f64}\left(x, \mathsf{cos.f64}\left(B\right)\right)\right), \sin B\right) \]
      6. sin-lowering-sin.f6477.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{*.f64}\left(x, \mathsf{cos.f64}\left(B\right)\right)\right), \mathsf{sin.f64}\left(B\right)\right) \]
    9. Simplified77.4%

      \[\leadsto \color{blue}{\frac{-1 \cdot \left(x \cdot \cos B\right)}{\sin B}} \]
    10. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \frac{\mathsf{neg}\left(x \cdot \cos B\right)}{\sin \color{blue}{B}} \]
      2. distribute-frac-negN/A

        \[\leadsto \mathsf{neg}\left(\frac{x \cdot \cos B}{\sin B}\right) \]
      3. clear-numN/A

        \[\leadsto \mathsf{neg}\left(\frac{1}{\frac{\sin B}{x \cdot \cos B}}\right) \]
      4. associate-/l/N/A

        \[\leadsto \mathsf{neg}\left(\frac{1}{\frac{\frac{\sin B}{\cos B}}{x}}\right) \]
      5. tan-quotN/A

        \[\leadsto \mathsf{neg}\left(\frac{1}{\frac{\tan B}{x}}\right) \]
      6. clear-numN/A

        \[\leadsto \mathsf{neg}\left(\frac{x}{\tan B}\right) \]
      7. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{x}{\tan B}\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(x, \tan B\right)\right) \]
      9. tan-lowering-tan.f6477.5%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    11. Applied egg-rr77.5%

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

    if 4.8e-133 < F < 3.2e-29

    1. Initial program 99.4%

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right), x\right), B\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right), x\right), B\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\left(\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}\right)\right)\right), x\right), B\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(2 + \left(2 \cdot x + {F}^{2}\right)\right)\right)\right)\right), x\right), B\right) \]
      6. +-lowering-+.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left({F}^{2} + 2 \cdot x\right)\right)\right)\right)\right), x\right), B\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left({F}^{2}\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left(F \cdot F\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      11. *-lowering-*.f6481.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \mathsf{*.f64}\left(2, x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
    5. Simplified81.9%

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

      \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(F \cdot \sqrt{\frac{1}{2 + 2 \cdot x}} - x\right)}, B\right) \]
    7. Step-by-step derivation
      1. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(F \cdot \sqrt{\frac{1}{2 + 2 \cdot x}}\right), x\right), B\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \left(\sqrt{\frac{1}{2 + 2 \cdot x}}\right)\right), x\right), B\right) \]
      3. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\left(\frac{1}{2 + 2 \cdot x}\right)\right)\right), x\right), B\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(2 + 2 \cdot x\right)\right)\right)\right), x\right), B\right) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left(2 \cdot x\right)\right)\right)\right)\right), x\right), B\right) \]
      6. *-lowering-*.f6481.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right)\right)\right)\right), x\right), B\right) \]
    8. Simplified81.9%

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

    if 3.2e-29 < F

    1. Initial program 68.2%

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \color{blue}{\left(x \cdot \frac{1}{\tan B}\right)}\right) \]
    3. Simplified83.0%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(\frac{1}{\sin B}\right)}, \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(1, \sin B\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      2. sin-lowering-sin.f6493.3%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    7. Simplified93.3%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(\frac{1}{B}\right)}, \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    9. Step-by-step derivation
      1. /-lowering-/.f6467.8%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    10. Simplified67.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1.25:\\ \;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -1.35 \cdot 10^{-180}:\\ \;\;\;\;\frac{F}{B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 4.8 \cdot 10^{-133}:\\ \;\;\;\;\frac{x}{0 - \tan B}\\ \mathbf{elif}\;F \leq 3.2 \cdot 10^{-29}:\\ \;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\ \end{array} \]
  5. Add Preprocessing

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

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

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

\mathbf{elif}\;F \leq 2.6 \cdot 10^{-132}:\\
\;\;\;\;\frac{x}{0 - \tan B}\\

\mathbf{elif}\;F \leq 2 \cdot 10^{-29}:\\
\;\;\;\;t\_0\\

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


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

    1. Initial program 61.2%

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

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

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

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

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)}, \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot \frac{F}{B}\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      3. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(2 + \left(2 \cdot x + {F}^{2}\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      5. +-lowering-+.f64N/A

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left({F}^{2} + 2 \cdot x\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left({F}^{2}\right), \left(2 \cdot x\right)\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left(F \cdot F\right), \left(2 \cdot x\right)\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \left(2 \cdot x\right)\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \mathsf{*.f64}\left(2, x\right)\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      11. /-lowering-/.f6442.1%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \mathsf{*.f64}\left(2, x\right)\right)\right)\right)\right), \mathsf{/.f64}\left(F, B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    7. Simplified42.1%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(\frac{-1}{B}\right)}, \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    9. Step-by-step derivation
      1. /-lowering-/.f6470.2%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, B\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    10. Simplified70.2%

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

    if -1.25 < F < -1.35000000000000007e-180 or 2.6000000000000001e-132 < F < 1.99999999999999989e-29

    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 B around 0

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right), x\right), B\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right), x\right), B\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\left(\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}\right)\right)\right), x\right), B\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(2 + \left(2 \cdot x + {F}^{2}\right)\right)\right)\right)\right), x\right), B\right) \]
      6. +-lowering-+.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left({F}^{2} + 2 \cdot x\right)\right)\right)\right)\right), x\right), B\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left({F}^{2}\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left(F \cdot F\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      11. *-lowering-*.f6471.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \mathsf{*.f64}\left(2, x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
    5. Simplified71.0%

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

      \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(F \cdot \sqrt{\frac{1}{2 + 2 \cdot x}} - x\right)}, B\right) \]
    7. Step-by-step derivation
      1. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(F \cdot \sqrt{\frac{1}{2 + 2 \cdot x}}\right), x\right), B\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \left(\sqrt{\frac{1}{2 + 2 \cdot x}}\right)\right), x\right), B\right) \]
      3. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\left(\frac{1}{2 + 2 \cdot x}\right)\right)\right), x\right), B\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(2 + 2 \cdot x\right)\right)\right)\right), x\right), B\right) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left(2 \cdot x\right)\right)\right)\right)\right), x\right), B\right) \]
      6. *-lowering-*.f6469.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right)\right)\right)\right), x\right), B\right) \]
    8. Simplified69.6%

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

    if -1.35000000000000007e-180 < F < 2.6000000000000001e-132

    1. Initial program 99.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. Step-by-step derivation
      1. +-commutativeN/A

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \color{blue}{\left(x \cdot \frac{1}{\tan B}\right)}\right) \]
    3. Simplified99.7%

      \[\leadsto \color{blue}{\frac{F \cdot {\left(F \cdot F + \left(2 + x \cdot 2\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-+r+N/A

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      5. associate-*l/N/A

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1}{\frac{\sin B}{F}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      7. associate-*l/N/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{\sin B}{F}}\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      8. div-invN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B \cdot \frac{1}{F}}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      9. times-fracN/A

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \left(\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{1}{F}}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(\left({\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \left(\frac{1}{F}\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Applied egg-rr99.7%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
    8. Step-by-step derivation
      1. associate-*r/N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \left(x \cdot \cos B\right)\right), \color{blue}{\sin B}\right) \]
      3. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{*.f64}\left(x, \cos B\right)\right), \sin B\right) \]
      5. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{*.f64}\left(x, \mathsf{cos.f64}\left(B\right)\right)\right), \sin B\right) \]
      6. sin-lowering-sin.f6477.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{*.f64}\left(x, \mathsf{cos.f64}\left(B\right)\right)\right), \mathsf{sin.f64}\left(B\right)\right) \]
    9. Simplified77.4%

      \[\leadsto \color{blue}{\frac{-1 \cdot \left(x \cdot \cos B\right)}{\sin B}} \]
    10. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \frac{\mathsf{neg}\left(x \cdot \cos B\right)}{\sin \color{blue}{B}} \]
      2. distribute-frac-negN/A

        \[\leadsto \mathsf{neg}\left(\frac{x \cdot \cos B}{\sin B}\right) \]
      3. clear-numN/A

        \[\leadsto \mathsf{neg}\left(\frac{1}{\frac{\sin B}{x \cdot \cos B}}\right) \]
      4. associate-/l/N/A

        \[\leadsto \mathsf{neg}\left(\frac{1}{\frac{\frac{\sin B}{\cos B}}{x}}\right) \]
      5. tan-quotN/A

        \[\leadsto \mathsf{neg}\left(\frac{1}{\frac{\tan B}{x}}\right) \]
      6. clear-numN/A

        \[\leadsto \mathsf{neg}\left(\frac{x}{\tan B}\right) \]
      7. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{x}{\tan B}\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(x, \tan B\right)\right) \]
      9. tan-lowering-tan.f6477.5%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    11. Applied egg-rr77.5%

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

    if 1.99999999999999989e-29 < F

    1. Initial program 68.2%

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \color{blue}{\left(x \cdot \frac{1}{\tan B}\right)}\right) \]
    3. Simplified83.0%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(\frac{1}{\sin B}\right)}, \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(1, \sin B\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      2. sin-lowering-sin.f6493.3%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    7. Simplified93.3%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(\frac{1}{B}\right)}, \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    9. Step-by-step derivation
      1. /-lowering-/.f6467.8%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    10. Simplified67.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1.25:\\ \;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -1.35 \cdot 10^{-180}:\\ \;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\ \mathbf{elif}\;F \leq 2.6 \cdot 10^{-132}:\\ \;\;\;\;\frac{x}{0 - \tan B}\\ \mathbf{elif}\;F \leq 2 \cdot 10^{-29}:\\ \;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 70.0% accurate, 2.6× speedup?

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

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

\mathbf{elif}\;F \leq 3.4 \cdot 10^{-55}:\\
\;\;\;\;\frac{x}{0 - \tan B}\\

\mathbf{elif}\;F \leq 8.5 \cdot 10^{-30}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{F \cdot F + 2}}}{B}\\

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


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

    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. Step-by-step derivation
      1. +-commutativeN/A

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \color{blue}{\left(x \cdot \frac{1}{\tan B}\right)}\right) \]
    3. Simplified77.9%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)}, \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot \frac{F}{B}\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      3. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(2 + \left(2 \cdot x + {F}^{2}\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      5. +-lowering-+.f64N/A

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left({F}^{2} + 2 \cdot x\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left({F}^{2}\right), \left(2 \cdot x\right)\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left(F \cdot F\right), \left(2 \cdot x\right)\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \left(2 \cdot x\right)\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \mathsf{*.f64}\left(2, x\right)\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      11. /-lowering-/.f6444.9%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \mathsf{*.f64}\left(2, x\right)\right)\right)\right)\right), \mathsf{/.f64}\left(F, B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    7. Simplified44.9%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(\frac{-1}{B}\right)}, \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    9. Step-by-step derivation
      1. /-lowering-/.f6467.0%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, B\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    10. Simplified67.0%

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

    if -8.4000000000000004e-16 < F < 3.39999999999999973e-55

    1. Initial program 99.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. Step-by-step derivation
      1. +-commutativeN/A

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \color{blue}{\left(x \cdot \frac{1}{\tan B}\right)}\right) \]
    3. Simplified99.7%

      \[\leadsto \color{blue}{\frac{F \cdot {\left(F \cdot F + \left(2 + x \cdot 2\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-+r+N/A

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      5. associate-*l/N/A

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1}{\frac{\sin B}{F}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      7. associate-*l/N/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{\sin B}{F}}\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      8. div-invN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B \cdot \frac{1}{F}}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      9. times-fracN/A

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \left(\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{1}{F}}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(\left({\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \left(\frac{1}{F}\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Applied egg-rr99.7%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
    8. Step-by-step derivation
      1. associate-*r/N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \left(x \cdot \cos B\right)\right), \color{blue}{\sin B}\right) \]
      3. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{*.f64}\left(x, \cos B\right)\right), \sin B\right) \]
      5. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{*.f64}\left(x, \mathsf{cos.f64}\left(B\right)\right)\right), \sin B\right) \]
      6. sin-lowering-sin.f6469.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{*.f64}\left(x, \mathsf{cos.f64}\left(B\right)\right)\right), \mathsf{sin.f64}\left(B\right)\right) \]
    9. Simplified69.6%

      \[\leadsto \color{blue}{\frac{-1 \cdot \left(x \cdot \cos B\right)}{\sin B}} \]
    10. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \frac{\mathsf{neg}\left(x \cdot \cos B\right)}{\sin \color{blue}{B}} \]
      2. distribute-frac-negN/A

        \[\leadsto \mathsf{neg}\left(\frac{x \cdot \cos B}{\sin B}\right) \]
      3. clear-numN/A

        \[\leadsto \mathsf{neg}\left(\frac{1}{\frac{\sin B}{x \cdot \cos B}}\right) \]
      4. associate-/l/N/A

        \[\leadsto \mathsf{neg}\left(\frac{1}{\frac{\frac{\sin B}{\cos B}}{x}}\right) \]
      5. tan-quotN/A

        \[\leadsto \mathsf{neg}\left(\frac{1}{\frac{\tan B}{x}}\right) \]
      6. clear-numN/A

        \[\leadsto \mathsf{neg}\left(\frac{x}{\tan B}\right) \]
      7. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{x}{\tan B}\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(x, \tan B\right)\right) \]
      9. tan-lowering-tan.f6469.7%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    11. Applied egg-rr69.7%

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

    if 3.39999999999999973e-55 < F < 8.49999999999999931e-30

    1. Initial program 99.1%

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right), x\right), B\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right), x\right), B\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\left(\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}\right)\right)\right), x\right), B\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(2 + \left(2 \cdot x + {F}^{2}\right)\right)\right)\right)\right), x\right), B\right) \]
      6. +-lowering-+.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left({F}^{2} + 2 \cdot x\right)\right)\right)\right)\right), x\right), B\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left({F}^{2}\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left(F \cdot F\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      11. *-lowering-*.f64100.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \mathsf{*.f64}\left(2, x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
    5. Simplified100.0%

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

      \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(F \cdot \sqrt{\frac{1}{2 + {F}^{2}}}\right)}, B\right) \]
    7. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(F, \left(\sqrt{\frac{1}{2 + {F}^{2}}}\right)\right), B\right) \]
      2. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\left(\frac{1}{2 + {F}^{2}}\right)\right)\right), B\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(2 + {F}^{2}\right)\right)\right)\right), B\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left({F}^{2}\right)\right)\right)\right)\right), B\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left(F \cdot F\right)\right)\right)\right)\right), B\right) \]
      6. *-lowering-*.f64100.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(F, F\right)\right)\right)\right)\right), B\right) \]
    8. Simplified100.0%

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

    if 8.49999999999999931e-30 < F

    1. Initial program 68.2%

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \color{blue}{\left(x \cdot \frac{1}{\tan B}\right)}\right) \]
    3. Simplified83.0%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(\frac{1}{\sin B}\right)}, \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(1, \sin B\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      2. sin-lowering-sin.f6493.3%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    7. Simplified93.3%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(\frac{1}{B}\right)}, \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    9. Step-by-step derivation
      1. /-lowering-/.f6467.8%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    10. Simplified67.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -8.4 \cdot 10^{-16}:\\ \;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 3.4 \cdot 10^{-55}:\\ \;\;\;\;\frac{x}{0 - \tan B}\\ \mathbf{elif}\;F \leq 8.5 \cdot 10^{-30}:\\ \;\;\;\;\frac{F \cdot \sqrt{\frac{1}{F \cdot F + 2}}}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 70.1% accurate, 2.6× speedup?

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

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

\mathbf{elif}\;F \leq 2.5 \cdot 10^{-53}:\\
\;\;\;\;\frac{x}{0 - \tan B}\\

\mathbf{elif}\;F \leq 1.05 \cdot 10^{-29}:\\
\;\;\;\;\sqrt{\frac{1}{F \cdot F + 2}} \cdot \frac{F}{B}\\

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


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

    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. Step-by-step derivation
      1. +-commutativeN/A

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \color{blue}{\left(x \cdot \frac{1}{\tan B}\right)}\right) \]
    3. Simplified77.9%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)}, \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot \frac{F}{B}\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      3. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(2 + \left(2 \cdot x + {F}^{2}\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      5. +-lowering-+.f64N/A

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left({F}^{2} + 2 \cdot x\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left({F}^{2}\right), \left(2 \cdot x\right)\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left(F \cdot F\right), \left(2 \cdot x\right)\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \left(2 \cdot x\right)\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \mathsf{*.f64}\left(2, x\right)\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      11. /-lowering-/.f6444.9%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \mathsf{*.f64}\left(2, x\right)\right)\right)\right)\right), \mathsf{/.f64}\left(F, B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    7. Simplified44.9%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(\frac{-1}{B}\right)}, \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    9. Step-by-step derivation
      1. /-lowering-/.f6467.0%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, B\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    10. Simplified67.0%

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

    if -8.5e-17 < F < 2.5e-53

    1. Initial program 99.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. Step-by-step derivation
      1. +-commutativeN/A

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \color{blue}{\left(x \cdot \frac{1}{\tan B}\right)}\right) \]
    3. Simplified99.7%

      \[\leadsto \color{blue}{\frac{F \cdot {\left(F \cdot F + \left(2 + x \cdot 2\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-+r+N/A

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      5. associate-*l/N/A

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1}{\frac{\sin B}{F}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      7. associate-*l/N/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{\sin B}{F}}\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      8. div-invN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B \cdot \frac{1}{F}}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      9. times-fracN/A

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \left(\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{1}{F}}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(\left({\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \left(\frac{1}{F}\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Applied egg-rr99.7%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
    8. Step-by-step derivation
      1. associate-*r/N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \left(x \cdot \cos B\right)\right), \color{blue}{\sin B}\right) \]
      3. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{*.f64}\left(x, \cos B\right)\right), \sin B\right) \]
      5. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{*.f64}\left(x, \mathsf{cos.f64}\left(B\right)\right)\right), \sin B\right) \]
      6. sin-lowering-sin.f6469.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{*.f64}\left(x, \mathsf{cos.f64}\left(B\right)\right)\right), \mathsf{sin.f64}\left(B\right)\right) \]
    9. Simplified69.6%

      \[\leadsto \color{blue}{\frac{-1 \cdot \left(x \cdot \cos B\right)}{\sin B}} \]
    10. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \frac{\mathsf{neg}\left(x \cdot \cos B\right)}{\sin \color{blue}{B}} \]
      2. distribute-frac-negN/A

        \[\leadsto \mathsf{neg}\left(\frac{x \cdot \cos B}{\sin B}\right) \]
      3. clear-numN/A

        \[\leadsto \mathsf{neg}\left(\frac{1}{\frac{\sin B}{x \cdot \cos B}}\right) \]
      4. associate-/l/N/A

        \[\leadsto \mathsf{neg}\left(\frac{1}{\frac{\frac{\sin B}{\cos B}}{x}}\right) \]
      5. tan-quotN/A

        \[\leadsto \mathsf{neg}\left(\frac{1}{\frac{\tan B}{x}}\right) \]
      6. clear-numN/A

        \[\leadsto \mathsf{neg}\left(\frac{x}{\tan B}\right) \]
      7. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{x}{\tan B}\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(x, \tan B\right)\right) \]
      9. tan-lowering-tan.f6469.7%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    11. Applied egg-rr69.7%

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

    if 2.5e-53 < F < 1.04999999999999995e-29

    1. Initial program 99.1%

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right), x\right), B\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right), x\right), B\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\left(\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}\right)\right)\right), x\right), B\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(2 + \left(2 \cdot x + {F}^{2}\right)\right)\right)\right)\right), x\right), B\right) \]
      6. +-lowering-+.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left({F}^{2} + 2 \cdot x\right)\right)\right)\right)\right), x\right), B\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left({F}^{2}\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left(F \cdot F\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      11. *-lowering-*.f64100.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \mathsf{*.f64}\left(2, x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
    5. Simplified100.0%

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

      \[\leadsto \color{blue}{\frac{F}{B} \cdot \sqrt{\frac{1}{2 + {F}^{2}}}} \]
    7. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{F}{B}\right), \color{blue}{\left(\sqrt{\frac{1}{2 + {F}^{2}}}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(F, B\right), \left(\sqrt{\color{blue}{\frac{1}{2 + {F}^{2}}}}\right)\right) \]
      3. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(F, B\right), \mathsf{sqrt.f64}\left(\left(\frac{1}{2 + {F}^{2}}\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(F, B\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(2 + {F}^{2}\right)\right)\right)\right) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(F, B\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left({F}^{2}\right)\right)\right)\right)\right) \]
      6. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(F, B\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left(F \cdot F\right)\right)\right)\right)\right) \]
      7. *-lowering-*.f6499.1%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(F, B\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(F, F\right)\right)\right)\right)\right) \]
    8. Simplified99.1%

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

    if 1.04999999999999995e-29 < F

    1. Initial program 68.2%

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \color{blue}{\left(x \cdot \frac{1}{\tan B}\right)}\right) \]
    3. Simplified83.0%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(\frac{1}{\sin B}\right)}, \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(1, \sin B\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      2. sin-lowering-sin.f6493.3%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    7. Simplified93.3%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(\frac{1}{B}\right)}, \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    9. Step-by-step derivation
      1. /-lowering-/.f6467.8%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    10. Simplified67.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -8.5 \cdot 10^{-17}:\\ \;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 2.5 \cdot 10^{-53}:\\ \;\;\;\;\frac{x}{0 - \tan B}\\ \mathbf{elif}\;F \leq 1.05 \cdot 10^{-29}:\\ \;\;\;\;\sqrt{\frac{1}{F \cdot F + 2}} \cdot \frac{F}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 58.3% accurate, 2.6× speedup?

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

\\
\begin{array}{l}
t_0 := \frac{x}{0 - \tan B}\\
t_1 := 2 + \frac{x}{0.5}\\
\mathbf{if}\;F \leq -6.3 \cdot 10^{+217}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;F \leq -3.9 \cdot 10^{-13}:\\
\;\;\;\;\frac{\left(-1 + 0.5 \cdot \left(\frac{2 + x \cdot 2}{F \cdot F} + \frac{t\_1}{F \cdot F} \cdot \frac{t\_1 \cdot -0.75}{F \cdot F}\right)\right) - x}{B}\\

\mathbf{elif}\;F \leq 25:\\
\;\;\;\;t\_0\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if F < -6.30000000000000023e217 or -3.90000000000000004e-13 < F < 25 or 2.5e128 < F

    1. Initial program 79.7%

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \color{blue}{\left(x \cdot \frac{1}{\tan B}\right)}\right) \]
    3. Simplified87.9%

      \[\leadsto \color{blue}{\frac{F \cdot {\left(F \cdot F + \left(2 + x \cdot 2\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-+r+N/A

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      5. associate-*l/N/A

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1}{\frac{\sin B}{F}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      7. associate-*l/N/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{\sin B}{F}}\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      8. div-invN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B \cdot \frac{1}{F}}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      9. times-fracN/A

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \left(\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{1}{F}}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(\left({\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \left(\frac{1}{F}\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Applied egg-rr87.9%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
    8. Step-by-step derivation
      1. associate-*r/N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \left(x \cdot \cos B\right)\right), \color{blue}{\sin B}\right) \]
      3. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{*.f64}\left(x, \cos B\right)\right), \sin B\right) \]
      5. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{*.f64}\left(x, \mathsf{cos.f64}\left(B\right)\right)\right), \sin B\right) \]
      6. sin-lowering-sin.f6465.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{*.f64}\left(x, \mathsf{cos.f64}\left(B\right)\right)\right), \mathsf{sin.f64}\left(B\right)\right) \]
    9. Simplified65.3%

      \[\leadsto \color{blue}{\frac{-1 \cdot \left(x \cdot \cos B\right)}{\sin B}} \]
    10. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \frac{\mathsf{neg}\left(x \cdot \cos B\right)}{\sin \color{blue}{B}} \]
      2. distribute-frac-negN/A

        \[\leadsto \mathsf{neg}\left(\frac{x \cdot \cos B}{\sin B}\right) \]
      3. clear-numN/A

        \[\leadsto \mathsf{neg}\left(\frac{1}{\frac{\sin B}{x \cdot \cos B}}\right) \]
      4. associate-/l/N/A

        \[\leadsto \mathsf{neg}\left(\frac{1}{\frac{\frac{\sin B}{\cos B}}{x}}\right) \]
      5. tan-quotN/A

        \[\leadsto \mathsf{neg}\left(\frac{1}{\frac{\tan B}{x}}\right) \]
      6. clear-numN/A

        \[\leadsto \mathsf{neg}\left(\frac{x}{\tan B}\right) \]
      7. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{x}{\tan B}\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(x, \tan B\right)\right) \]
      9. tan-lowering-tan.f6465.4%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    11. Applied egg-rr65.4%

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

    if -6.30000000000000023e217 < F < -3.90000000000000004e-13

    1. Initial program 71.0%

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right), x\right), B\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right), x\right), B\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\left(\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}\right)\right)\right), x\right), B\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(2 + \left(2 \cdot x + {F}^{2}\right)\right)\right)\right)\right), x\right), B\right) \]
      6. +-lowering-+.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left({F}^{2} + 2 \cdot x\right)\right)\right)\right)\right), x\right), B\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left({F}^{2}\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left(F \cdot F\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      11. *-lowering-*.f6443.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \mathsf{*.f64}\left(2, x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
    5. Simplified43.3%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\color{blue}{\left(\left(\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}} + \frac{1}{2} \cdot \frac{-1 \cdot {\left(2 + 2 \cdot x\right)}^{2} + \frac{1}{4} \cdot {\left(2 + 2 \cdot x\right)}^{2}}{{F}^{4}}\right) - 1\right)}, x\right), B\right) \]
    7. Step-by-step derivation
      1. sub-negN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\left(\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}} + \frac{1}{2} \cdot \frac{-1 \cdot {\left(2 + 2 \cdot x\right)}^{2} + \frac{1}{4} \cdot {\left(2 + 2 \cdot x\right)}^{2}}{{F}^{4}}\right), -1\right), x\right), B\right) \]
    8. Simplified45.4%

      \[\leadsto \frac{\color{blue}{\left(0.5 \cdot \left(\frac{2 + 2 \cdot x}{F \cdot F} + \frac{\left(\left(2 + 2 \cdot x\right) \cdot \left(2 + 2 \cdot x\right)\right) \cdot -0.75}{{F}^{4}}\right) + -1\right)} - x}{B} \]
    9. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \left(\frac{\left(2 + 2 \cdot x\right) \cdot \left(\left(2 + 2 \cdot x\right) \cdot \frac{-3}{4}\right)}{{F}^{4}}\right)\right)\right), -1\right), x\right), B\right) \]
      2. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \left(\frac{\left(2 + 2 \cdot x\right) \cdot \left(\left(2 + 2 \cdot x\right) \cdot \frac{-3}{4}\right)}{{F}^{\left(2 + 2\right)}}\right)\right)\right), -1\right), x\right), B\right) \]
      3. pow-prod-upN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \left(\frac{\left(2 + 2 \cdot x\right) \cdot \left(\left(2 + 2 \cdot x\right) \cdot \frac{-3}{4}\right)}{{F}^{2} \cdot {F}^{2}}\right)\right)\right), -1\right), x\right), B\right) \]
      4. pow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \left(\frac{\left(2 + 2 \cdot x\right) \cdot \left(\left(2 + 2 \cdot x\right) \cdot \frac{-3}{4}\right)}{\left(F \cdot F\right) \cdot {F}^{2}}\right)\right)\right), -1\right), x\right), B\right) \]
      5. pow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \left(\frac{\left(2 + 2 \cdot x\right) \cdot \left(\left(2 + 2 \cdot x\right) \cdot \frac{-3}{4}\right)}{\left(F \cdot F\right) \cdot \left(F \cdot F\right)}\right)\right)\right), -1\right), x\right), B\right) \]
      6. times-fracN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \left(\frac{2 + 2 \cdot x}{F \cdot F} \cdot \frac{\left(2 + 2 \cdot x\right) \cdot \frac{-3}{4}}{F \cdot F}\right)\right)\right), -1\right), x\right), B\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{*.f64}\left(\left(\frac{2 + 2 \cdot x}{F \cdot F}\right), \left(\frac{\left(2 + 2 \cdot x\right) \cdot \frac{-3}{4}}{F \cdot F}\right)\right)\right)\right), -1\right), x\right), B\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(2 + 2 \cdot x\right), \left(F \cdot F\right)\right), \left(\frac{\left(2 + 2 \cdot x\right) \cdot \frac{-3}{4}}{F \cdot F}\right)\right)\right)\right), -1\right), x\right), B\right) \]
      9. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(2 \cdot x\right)\right), \left(F \cdot F\right)\right), \left(\frac{\left(2 + 2 \cdot x\right) \cdot \frac{-3}{4}}{F \cdot F}\right)\right)\right)\right), -1\right), x\right), B\right) \]
      10. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(x \cdot 2\right)\right), \left(F \cdot F\right)\right), \left(\frac{\left(2 + 2 \cdot x\right) \cdot \frac{-3}{4}}{F \cdot F}\right)\right)\right)\right), -1\right), x\right), B\right) \]
      11. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(x \cdot \frac{1}{\frac{1}{2}}\right)\right), \left(F \cdot F\right)\right), \left(\frac{\left(2 + 2 \cdot x\right) \cdot \frac{-3}{4}}{F \cdot F}\right)\right)\right)\right), -1\right), x\right), B\right) \]
      12. div-invN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(\frac{x}{\frac{1}{2}}\right)\right), \left(F \cdot F\right)\right), \left(\frac{\left(2 + 2 \cdot x\right) \cdot \frac{-3}{4}}{F \cdot F}\right)\right)\right)\right), -1\right), x\right), B\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(x, \frac{1}{2}\right)\right), \left(F \cdot F\right)\right), \left(\frac{\left(2 + 2 \cdot x\right) \cdot \frac{-3}{4}}{F \cdot F}\right)\right)\right)\right), -1\right), x\right), B\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(x, \frac{1}{2}\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \left(\frac{\left(2 + 2 \cdot x\right) \cdot \frac{-3}{4}}{F \cdot F}\right)\right)\right)\right), -1\right), x\right), B\right) \]
      15. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(x, \frac{1}{2}\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{/.f64}\left(\left(\left(2 + 2 \cdot x\right) \cdot \frac{-3}{4}\right), \left(F \cdot F\right)\right)\right)\right)\right), -1\right), x\right), B\right) \]
      16. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(x, \frac{1}{2}\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(2 + 2 \cdot x\right), \frac{-3}{4}\right), \left(F \cdot F\right)\right)\right)\right)\right), -1\right), x\right), B\right) \]
      17. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(x, \frac{1}{2}\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \left(2 \cdot x\right)\right), \frac{-3}{4}\right), \left(F \cdot F\right)\right)\right)\right)\right), -1\right), x\right), B\right) \]
      18. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(x, \frac{1}{2}\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \left(x \cdot 2\right)\right), \frac{-3}{4}\right), \left(F \cdot F\right)\right)\right)\right)\right), -1\right), x\right), B\right) \]
      19. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(x, \frac{1}{2}\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \left(x \cdot \frac{1}{\frac{1}{2}}\right)\right), \frac{-3}{4}\right), \left(F \cdot F\right)\right)\right)\right)\right), -1\right), x\right), B\right) \]
      20. div-invN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(x, \frac{1}{2}\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \left(\frac{x}{\frac{1}{2}}\right)\right), \frac{-3}{4}\right), \left(F \cdot F\right)\right)\right)\right)\right), -1\right), x\right), B\right) \]
      21. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(x, \frac{1}{2}\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(x, \frac{1}{2}\right)\right), \frac{-3}{4}\right), \left(F \cdot F\right)\right)\right)\right)\right), -1\right), x\right), B\right) \]
      22. *-lowering-*.f6451.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(x, \frac{1}{2}\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(x, \frac{1}{2}\right)\right), \frac{-3}{4}\right), \mathsf{*.f64}\left(F, F\right)\right)\right)\right)\right), -1\right), x\right), B\right) \]
    10. Applied egg-rr51.0%

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

    if 25 < F < 2.5e128

    1. Initial program 87.9%

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \color{blue}{\left(x \cdot \frac{1}{\tan B}\right)}\right) \]
    3. Simplified99.9%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(\frac{1}{\sin B}\right)}, \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(1, \sin B\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      2. sin-lowering-sin.f6496.6%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    7. Simplified96.6%

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

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

        \[\leadsto \mathsf{/.f64}\left(1, \color{blue}{\sin B}\right) \]
      2. sin-lowering-sin.f6464.0%

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right) \]
    10. Simplified64.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -6.3 \cdot 10^{+217}:\\ \;\;\;\;\frac{x}{0 - \tan B}\\ \mathbf{elif}\;F \leq -3.9 \cdot 10^{-13}:\\ \;\;\;\;\frac{\left(-1 + 0.5 \cdot \left(\frac{2 + x \cdot 2}{F \cdot F} + \frac{2 + \frac{x}{0.5}}{F \cdot F} \cdot \frac{\left(2 + \frac{x}{0.5}\right) \cdot -0.75}{F \cdot F}\right)\right) - x}{B}\\ \mathbf{elif}\;F \leq 25:\\ \;\;\;\;\frac{x}{0 - \tan B}\\ \mathbf{elif}\;F \leq 2.5 \cdot 10^{+128}:\\ \;\;\;\;\frac{1}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{0 - \tan B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 57.0% accurate, 2.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq 0.0013:\\ \;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + \left(F \cdot F + x \cdot 2\right)}} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{0 - \tan B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (if (<= B 0.0013)
   (/ (- (* F (sqrt (/ 1.0 (+ 2.0 (+ (* F F) (* x 2.0)))))) x) B)
   (/ x (- 0.0 (tan B)))))
double code(double F, double B, double x) {
	double tmp;
	if (B <= 0.0013) {
		tmp = ((F * sqrt((1.0 / (2.0 + ((F * F) + (x * 2.0)))))) - x) / B;
	} else {
		tmp = x / (0.0 - tan(B));
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: tmp
    if (b <= 0.0013d0) then
        tmp = ((f * sqrt((1.0d0 / (2.0d0 + ((f * f) + (x * 2.0d0)))))) - x) / b
    else
        tmp = x / (0.0d0 - tan(b))
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double tmp;
	if (B <= 0.0013) {
		tmp = ((F * Math.sqrt((1.0 / (2.0 + ((F * F) + (x * 2.0)))))) - x) / B;
	} else {
		tmp = x / (0.0 - Math.tan(B));
	}
	return tmp;
}
def code(F, B, x):
	tmp = 0
	if B <= 0.0013:
		tmp = ((F * math.sqrt((1.0 / (2.0 + ((F * F) + (x * 2.0)))))) - x) / B
	else:
		tmp = x / (0.0 - math.tan(B))
	return tmp
function code(F, B, x)
	tmp = 0.0
	if (B <= 0.0013)
		tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(Float64(F * F) + Float64(x * 2.0)))))) - x) / B);
	else
		tmp = Float64(x / Float64(0.0 - tan(B)));
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	tmp = 0.0;
	if (B <= 0.0013)
		tmp = ((F * sqrt((1.0 / (2.0 + ((F * F) + (x * 2.0)))))) - x) / B;
	else
		tmp = x / (0.0 - tan(B));
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := If[LessEqual[B, 0.0013], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(N[(F * F), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(x / N[(0.0 - N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;B \leq 0.0013:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + \left(F \cdot F + x \cdot 2\right)}} - x}{B}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if B < 0.0012999999999999999

    1. Initial program 75.6%

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right), x\right), B\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right), x\right), B\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\left(\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}\right)\right)\right), x\right), B\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(2 + \left(2 \cdot x + {F}^{2}\right)\right)\right)\right)\right), x\right), B\right) \]
      6. +-lowering-+.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left({F}^{2} + 2 \cdot x\right)\right)\right)\right)\right), x\right), B\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left({F}^{2}\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left(F \cdot F\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      11. *-lowering-*.f6460.1%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \mathsf{*.f64}\left(2, x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
    5. Simplified60.1%

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

    if 0.0012999999999999999 < B

    1. Initial program 89.8%

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \color{blue}{\left(x \cdot \frac{1}{\tan B}\right)}\right) \]
    3. Simplified90.0%

      \[\leadsto \color{blue}{\frac{F \cdot {\left(F \cdot F + \left(2 + x \cdot 2\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-+r+N/A

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      5. associate-*l/N/A

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1}{\frac{\sin B}{F}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      7. associate-*l/N/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{\sin B}{F}}\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      8. div-invN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B \cdot \frac{1}{F}}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      9. times-fracN/A

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \left(\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{1}{F}}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(\left({\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \left(\frac{1}{F}\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Applied egg-rr89.9%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
    8. Step-by-step derivation
      1. associate-*r/N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \left(x \cdot \cos B\right)\right), \color{blue}{\sin B}\right) \]
      3. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{*.f64}\left(x, \cos B\right)\right), \sin B\right) \]
      5. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{*.f64}\left(x, \mathsf{cos.f64}\left(B\right)\right)\right), \sin B\right) \]
      6. sin-lowering-sin.f6453.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{*.f64}\left(x, \mathsf{cos.f64}\left(B\right)\right)\right), \mathsf{sin.f64}\left(B\right)\right) \]
    9. Simplified53.3%

      \[\leadsto \color{blue}{\frac{-1 \cdot \left(x \cdot \cos B\right)}{\sin B}} \]
    10. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \frac{\mathsf{neg}\left(x \cdot \cos B\right)}{\sin \color{blue}{B}} \]
      2. distribute-frac-negN/A

        \[\leadsto \mathsf{neg}\left(\frac{x \cdot \cos B}{\sin B}\right) \]
      3. clear-numN/A

        \[\leadsto \mathsf{neg}\left(\frac{1}{\frac{\sin B}{x \cdot \cos B}}\right) \]
      4. associate-/l/N/A

        \[\leadsto \mathsf{neg}\left(\frac{1}{\frac{\frac{\sin B}{\cos B}}{x}}\right) \]
      5. tan-quotN/A

        \[\leadsto \mathsf{neg}\left(\frac{1}{\frac{\tan B}{x}}\right) \]
      6. clear-numN/A

        \[\leadsto \mathsf{neg}\left(\frac{x}{\tan B}\right) \]
      7. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{x}{\tan B}\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(x, \tan B\right)\right) \]
      9. tan-lowering-tan.f6453.5%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    11. Applied egg-rr53.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 0.0013:\\ \;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + \left(F \cdot F + x \cdot 2\right)}} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{0 - \tan B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 64.7% accurate, 2.7× speedup?

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

\\
\begin{array}{l}
t_0 := \frac{x}{0 - \tan B}\\
\mathbf{if}\;F \leq -1.35 \cdot 10^{-15}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\

\mathbf{elif}\;F \leq 53:\\
\;\;\;\;t\_0\\

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

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


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

    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. Step-by-step derivation
      1. +-commutativeN/A

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \color{blue}{\left(x \cdot \frac{1}{\tan B}\right)}\right) \]
    3. Simplified77.9%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)}, \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot \frac{F}{B}\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      3. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(2 + \left(2 \cdot x + {F}^{2}\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      5. +-lowering-+.f64N/A

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left({F}^{2} + 2 \cdot x\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left({F}^{2}\right), \left(2 \cdot x\right)\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left(F \cdot F\right), \left(2 \cdot x\right)\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \left(2 \cdot x\right)\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \mathsf{*.f64}\left(2, x\right)\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      11. /-lowering-/.f6444.9%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \mathsf{*.f64}\left(2, x\right)\right)\right)\right)\right), \mathsf{/.f64}\left(F, B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    7. Simplified44.9%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(\frac{-1}{B}\right)}, \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    9. Step-by-step derivation
      1. /-lowering-/.f6467.0%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, B\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    10. Simplified67.0%

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

    if -1.35000000000000005e-15 < F < 53 or 2.20000000000000017e128 < F

    1. Initial program 84.2%

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \color{blue}{\left(x \cdot \frac{1}{\tan B}\right)}\right) \]
    3. Simplified90.1%

      \[\leadsto \color{blue}{\frac{F \cdot {\left(F \cdot F + \left(2 + x \cdot 2\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-+r+N/A

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      5. associate-*l/N/A

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1}{\frac{\sin B}{F}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      7. associate-*l/N/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{\sin B}{F}}\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      8. div-invN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B \cdot \frac{1}{F}}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      9. times-fracN/A

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \left(\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{1}{F}}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(\left({\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \left(\frac{1}{F}\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Applied egg-rr90.1%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
    8. Step-by-step derivation
      1. associate-*r/N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \left(x \cdot \cos B\right)\right), \color{blue}{\sin B}\right) \]
      3. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{*.f64}\left(x, \cos B\right)\right), \sin B\right) \]
      5. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{*.f64}\left(x, \mathsf{cos.f64}\left(B\right)\right)\right), \sin B\right) \]
      6. sin-lowering-sin.f6464.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{*.f64}\left(x, \mathsf{cos.f64}\left(B\right)\right)\right), \mathsf{sin.f64}\left(B\right)\right) \]
    9. Simplified64.3%

      \[\leadsto \color{blue}{\frac{-1 \cdot \left(x \cdot \cos B\right)}{\sin B}} \]
    10. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \frac{\mathsf{neg}\left(x \cdot \cos B\right)}{\sin \color{blue}{B}} \]
      2. distribute-frac-negN/A

        \[\leadsto \mathsf{neg}\left(\frac{x \cdot \cos B}{\sin B}\right) \]
      3. clear-numN/A

        \[\leadsto \mathsf{neg}\left(\frac{1}{\frac{\sin B}{x \cdot \cos B}}\right) \]
      4. associate-/l/N/A

        \[\leadsto \mathsf{neg}\left(\frac{1}{\frac{\frac{\sin B}{\cos B}}{x}}\right) \]
      5. tan-quotN/A

        \[\leadsto \mathsf{neg}\left(\frac{1}{\frac{\tan B}{x}}\right) \]
      6. clear-numN/A

        \[\leadsto \mathsf{neg}\left(\frac{x}{\tan B}\right) \]
      7. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{x}{\tan B}\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(x, \tan B\right)\right) \]
      9. tan-lowering-tan.f6464.4%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    11. Applied egg-rr64.4%

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

    if 53 < F < 2.20000000000000017e128

    1. Initial program 87.9%

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \color{blue}{\left(x \cdot \frac{1}{\tan B}\right)}\right) \]
    3. Simplified99.9%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(\frac{1}{\sin B}\right)}, \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(1, \sin B\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      2. sin-lowering-sin.f6496.6%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    7. Simplified96.6%

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

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

        \[\leadsto \mathsf{/.f64}\left(1, \color{blue}{\sin B}\right) \]
      2. sin-lowering-sin.f6464.0%

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right) \]
    10. Simplified64.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1.35 \cdot 10^{-15}:\\ \;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 53:\\ \;\;\;\;\frac{x}{0 - \tan B}\\ \mathbf{elif}\;F \leq 2.2 \cdot 10^{+128}:\\ \;\;\;\;\frac{1}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{0 - \tan B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 57.0% accurate, 2.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq 3.8 \cdot 10^{-5}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{F \cdot F + \left(2 + x \cdot 2\right)}} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{0 - \tan B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (if (<= B 3.8e-5)
   (/ (- (/ F (sqrt (+ (* F F) (+ 2.0 (* x 2.0))))) x) B)
   (/ x (- 0.0 (tan B)))))
double code(double F, double B, double x) {
	double tmp;
	if (B <= 3.8e-5) {
		tmp = ((F / sqrt(((F * F) + (2.0 + (x * 2.0))))) - x) / B;
	} else {
		tmp = x / (0.0 - tan(B));
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: tmp
    if (b <= 3.8d-5) then
        tmp = ((f / sqrt(((f * f) + (2.0d0 + (x * 2.0d0))))) - x) / b
    else
        tmp = x / (0.0d0 - tan(b))
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double tmp;
	if (B <= 3.8e-5) {
		tmp = ((F / Math.sqrt(((F * F) + (2.0 + (x * 2.0))))) - x) / B;
	} else {
		tmp = x / (0.0 - Math.tan(B));
	}
	return tmp;
}
def code(F, B, x):
	tmp = 0
	if B <= 3.8e-5:
		tmp = ((F / math.sqrt(((F * F) + (2.0 + (x * 2.0))))) - x) / B
	else:
		tmp = x / (0.0 - math.tan(B))
	return tmp
function code(F, B, x)
	tmp = 0.0
	if (B <= 3.8e-5)
		tmp = Float64(Float64(Float64(F / sqrt(Float64(Float64(F * F) + Float64(2.0 + Float64(x * 2.0))))) - x) / B);
	else
		tmp = Float64(x / Float64(0.0 - tan(B)));
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	tmp = 0.0;
	if (B <= 3.8e-5)
		tmp = ((F / sqrt(((F * F) + (2.0 + (x * 2.0))))) - x) / B;
	else
		tmp = x / (0.0 - tan(B));
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := If[LessEqual[B, 3.8e-5], N[(N[(N[(F / N[Sqrt[N[(N[(F * F), $MachinePrecision] + N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(x / N[(0.0 - N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;B \leq 3.8 \cdot 10^{-5}:\\
\;\;\;\;\frac{\frac{F}{\sqrt{F \cdot F + \left(2 + x \cdot 2\right)}} - x}{B}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if B < 3.8000000000000002e-5

    1. Initial program 75.6%

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right), x\right), B\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right), x\right), B\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\left(\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}\right)\right)\right), x\right), B\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(2 + \left(2 \cdot x + {F}^{2}\right)\right)\right)\right)\right), x\right), B\right) \]
      6. +-lowering-+.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left({F}^{2} + 2 \cdot x\right)\right)\right)\right)\right), x\right), B\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left({F}^{2}\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left(F \cdot F\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      11. *-lowering-*.f6460.1%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \mathsf{*.f64}\left(2, x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
    5. Simplified60.1%

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

        \[\leadsto \mathsf{/.f64}\left(\left(F \cdot \sqrt{\frac{1}{2 + \left(F \cdot F + 2 \cdot x\right)}} - x\right), \color{blue}{B}\right) \]
    7. Applied egg-rr60.1%

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

    if 3.8000000000000002e-5 < B

    1. Initial program 89.8%

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \color{blue}{\left(x \cdot \frac{1}{\tan B}\right)}\right) \]
    3. Simplified90.0%

      \[\leadsto \color{blue}{\frac{F \cdot {\left(F \cdot F + \left(2 + x \cdot 2\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-+r+N/A

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      5. associate-*l/N/A

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1}{\frac{\sin B}{F}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      7. associate-*l/N/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{\sin B}{F}}\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      8. div-invN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B \cdot \frac{1}{F}}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      9. times-fracN/A

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \left(\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{1}{F}}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(\left({\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \left(\frac{1}{F}\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Applied egg-rr89.9%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
    8. Step-by-step derivation
      1. associate-*r/N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \left(x \cdot \cos B\right)\right), \color{blue}{\sin B}\right) \]
      3. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{*.f64}\left(x, \cos B\right)\right), \sin B\right) \]
      5. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{*.f64}\left(x, \mathsf{cos.f64}\left(B\right)\right)\right), \sin B\right) \]
      6. sin-lowering-sin.f6453.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{*.f64}\left(x, \mathsf{cos.f64}\left(B\right)\right)\right), \mathsf{sin.f64}\left(B\right)\right) \]
    9. Simplified53.3%

      \[\leadsto \color{blue}{\frac{-1 \cdot \left(x \cdot \cos B\right)}{\sin B}} \]
    10. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \frac{\mathsf{neg}\left(x \cdot \cos B\right)}{\sin \color{blue}{B}} \]
      2. distribute-frac-negN/A

        \[\leadsto \mathsf{neg}\left(\frac{x \cdot \cos B}{\sin B}\right) \]
      3. clear-numN/A

        \[\leadsto \mathsf{neg}\left(\frac{1}{\frac{\sin B}{x \cdot \cos B}}\right) \]
      4. associate-/l/N/A

        \[\leadsto \mathsf{neg}\left(\frac{1}{\frac{\frac{\sin B}{\cos B}}{x}}\right) \]
      5. tan-quotN/A

        \[\leadsto \mathsf{neg}\left(\frac{1}{\frac{\tan B}{x}}\right) \]
      6. clear-numN/A

        \[\leadsto \mathsf{neg}\left(\frac{x}{\tan B}\right) \]
      7. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{x}{\tan B}\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(x, \tan B\right)\right) \]
      9. tan-lowering-tan.f6453.5%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    11. Applied egg-rr53.5%

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

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

Alternative 22: 44.9% accurate, 2.7× speedup?

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

\\
\begin{array}{l}
t_0 := 2 + \frac{x}{0.5}\\
\mathbf{if}\;F \leq -4.3 \cdot 10^{-16}:\\
\;\;\;\;\frac{\left(-1 + 0.5 \cdot \left(\frac{2 + x \cdot 2}{F \cdot F} + \frac{t\_0}{F \cdot F} \cdot \frac{t\_0 \cdot -0.75}{F \cdot F}\right)\right) - x}{B}\\

\mathbf{elif}\;F \leq 0.0032:\\
\;\;\;\;\frac{x}{0 - B}\\

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

\mathbf{else}:\\
\;\;\;\;\frac{1 + x \cdot \left(-1 - \left(B \cdot B\right) \cdot -0.3333333333333333\right)}{B}\\


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

    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. Add Preprocessing
    3. Taylor expanded in B around 0

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right), x\right), B\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right), x\right), B\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\left(\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}\right)\right)\right), x\right), B\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(2 + \left(2 \cdot x + {F}^{2}\right)\right)\right)\right)\right), x\right), B\right) \]
      6. +-lowering-+.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left({F}^{2} + 2 \cdot x\right)\right)\right)\right)\right), x\right), B\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left({F}^{2}\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left(F \cdot F\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      11. *-lowering-*.f6441.8%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \mathsf{*.f64}\left(2, x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
    5. Simplified41.8%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\color{blue}{\left(\left(\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}} + \frac{1}{2} \cdot \frac{-1 \cdot {\left(2 + 2 \cdot x\right)}^{2} + \frac{1}{4} \cdot {\left(2 + 2 \cdot x\right)}^{2}}{{F}^{4}}\right) - 1\right)}, x\right), B\right) \]
    7. Step-by-step derivation
      1. sub-negN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\left(\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}} + \frac{1}{2} \cdot \frac{-1 \cdot {\left(2 + 2 \cdot x\right)}^{2} + \frac{1}{4} \cdot {\left(2 + 2 \cdot x\right)}^{2}}{{F}^{4}}\right), -1\right), x\right), B\right) \]
    8. Simplified39.8%

      \[\leadsto \frac{\color{blue}{\left(0.5 \cdot \left(\frac{2 + 2 \cdot x}{F \cdot F} + \frac{\left(\left(2 + 2 \cdot x\right) \cdot \left(2 + 2 \cdot x\right)\right) \cdot -0.75}{{F}^{4}}\right) + -1\right)} - x}{B} \]
    9. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \left(\frac{\left(2 + 2 \cdot x\right) \cdot \left(\left(2 + 2 \cdot x\right) \cdot \frac{-3}{4}\right)}{{F}^{4}}\right)\right)\right), -1\right), x\right), B\right) \]
      2. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \left(\frac{\left(2 + 2 \cdot x\right) \cdot \left(\left(2 + 2 \cdot x\right) \cdot \frac{-3}{4}\right)}{{F}^{\left(2 + 2\right)}}\right)\right)\right), -1\right), x\right), B\right) \]
      3. pow-prod-upN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \left(\frac{\left(2 + 2 \cdot x\right) \cdot \left(\left(2 + 2 \cdot x\right) \cdot \frac{-3}{4}\right)}{{F}^{2} \cdot {F}^{2}}\right)\right)\right), -1\right), x\right), B\right) \]
      4. pow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \left(\frac{\left(2 + 2 \cdot x\right) \cdot \left(\left(2 + 2 \cdot x\right) \cdot \frac{-3}{4}\right)}{\left(F \cdot F\right) \cdot {F}^{2}}\right)\right)\right), -1\right), x\right), B\right) \]
      5. pow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \left(\frac{\left(2 + 2 \cdot x\right) \cdot \left(\left(2 + 2 \cdot x\right) \cdot \frac{-3}{4}\right)}{\left(F \cdot F\right) \cdot \left(F \cdot F\right)}\right)\right)\right), -1\right), x\right), B\right) \]
      6. times-fracN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \left(\frac{2 + 2 \cdot x}{F \cdot F} \cdot \frac{\left(2 + 2 \cdot x\right) \cdot \frac{-3}{4}}{F \cdot F}\right)\right)\right), -1\right), x\right), B\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{*.f64}\left(\left(\frac{2 + 2 \cdot x}{F \cdot F}\right), \left(\frac{\left(2 + 2 \cdot x\right) \cdot \frac{-3}{4}}{F \cdot F}\right)\right)\right)\right), -1\right), x\right), B\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(2 + 2 \cdot x\right), \left(F \cdot F\right)\right), \left(\frac{\left(2 + 2 \cdot x\right) \cdot \frac{-3}{4}}{F \cdot F}\right)\right)\right)\right), -1\right), x\right), B\right) \]
      9. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(2 \cdot x\right)\right), \left(F \cdot F\right)\right), \left(\frac{\left(2 + 2 \cdot x\right) \cdot \frac{-3}{4}}{F \cdot F}\right)\right)\right)\right), -1\right), x\right), B\right) \]
      10. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(x \cdot 2\right)\right), \left(F \cdot F\right)\right), \left(\frac{\left(2 + 2 \cdot x\right) \cdot \frac{-3}{4}}{F \cdot F}\right)\right)\right)\right), -1\right), x\right), B\right) \]
      11. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(x \cdot \frac{1}{\frac{1}{2}}\right)\right), \left(F \cdot F\right)\right), \left(\frac{\left(2 + 2 \cdot x\right) \cdot \frac{-3}{4}}{F \cdot F}\right)\right)\right)\right), -1\right), x\right), B\right) \]
      12. div-invN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(\frac{x}{\frac{1}{2}}\right)\right), \left(F \cdot F\right)\right), \left(\frac{\left(2 + 2 \cdot x\right) \cdot \frac{-3}{4}}{F \cdot F}\right)\right)\right)\right), -1\right), x\right), B\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(x, \frac{1}{2}\right)\right), \left(F \cdot F\right)\right), \left(\frac{\left(2 + 2 \cdot x\right) \cdot \frac{-3}{4}}{F \cdot F}\right)\right)\right)\right), -1\right), x\right), B\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(x, \frac{1}{2}\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \left(\frac{\left(2 + 2 \cdot x\right) \cdot \frac{-3}{4}}{F \cdot F}\right)\right)\right)\right), -1\right), x\right), B\right) \]
      15. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(x, \frac{1}{2}\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{/.f64}\left(\left(\left(2 + 2 \cdot x\right) \cdot \frac{-3}{4}\right), \left(F \cdot F\right)\right)\right)\right)\right), -1\right), x\right), B\right) \]
      16. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(x, \frac{1}{2}\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(2 + 2 \cdot x\right), \frac{-3}{4}\right), \left(F \cdot F\right)\right)\right)\right)\right), -1\right), x\right), B\right) \]
      17. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(x, \frac{1}{2}\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \left(2 \cdot x\right)\right), \frac{-3}{4}\right), \left(F \cdot F\right)\right)\right)\right)\right), -1\right), x\right), B\right) \]
      18. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(x, \frac{1}{2}\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \left(x \cdot 2\right)\right), \frac{-3}{4}\right), \left(F \cdot F\right)\right)\right)\right)\right), -1\right), x\right), B\right) \]
      19. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(x, \frac{1}{2}\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \left(x \cdot \frac{1}{\frac{1}{2}}\right)\right), \frac{-3}{4}\right), \left(F \cdot F\right)\right)\right)\right)\right), -1\right), x\right), B\right) \]
      20. div-invN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(x, \frac{1}{2}\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \left(\frac{x}{\frac{1}{2}}\right)\right), \frac{-3}{4}\right), \left(F \cdot F\right)\right)\right)\right)\right), -1\right), x\right), B\right) \]
      21. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(x, \frac{1}{2}\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(x, \frac{1}{2}\right)\right), \frac{-3}{4}\right), \left(F \cdot F\right)\right)\right)\right)\right), -1\right), x\right), B\right) \]
      22. *-lowering-*.f6451.2%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(x, \frac{1}{2}\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(x, \frac{1}{2}\right)\right), \frac{-3}{4}\right), \mathsf{*.f64}\left(F, F\right)\right)\right)\right)\right), -1\right), x\right), B\right) \]
    10. Applied egg-rr51.2%

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

    if -4.2999999999999999e-16 < F < 0.00320000000000000015

    1. Initial program 99.6%

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right), x\right), B\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right), x\right), B\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\left(\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}\right)\right)\right), x\right), B\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(2 + \left(2 \cdot x + {F}^{2}\right)\right)\right)\right)\right), x\right), B\right) \]
      6. +-lowering-+.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left({F}^{2} + 2 \cdot x\right)\right)\right)\right)\right), x\right), B\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left({F}^{2}\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left(F \cdot F\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      11. *-lowering-*.f6459.2%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \mathsf{*.f64}\left(2, x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
    5. Simplified59.2%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{B}} \]
    7. Step-by-step derivation
      1. associate-*r/N/A

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

        \[\leadsto \frac{\mathsf{neg}\left(x\right)}{B} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\mathsf{neg}\left(x\right)\right), \color{blue}{B}\right) \]
      4. neg-sub0N/A

        \[\leadsto \mathsf{/.f64}\left(\left(0 - x\right), B\right) \]
      5. --lowering--.f6438.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, x\right), B\right) \]
    8. Simplified38.0%

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

    if 0.00320000000000000015 < F < 3.3000000000000002e175

    1. Initial program 79.0%

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \color{blue}{\left(x \cdot \frac{1}{\tan B}\right)}\right) \]
    3. Simplified89.9%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(\frac{1}{\sin B}\right)}, \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(1, \sin B\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      2. sin-lowering-sin.f6497.6%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    7. Simplified97.6%

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

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

        \[\leadsto \mathsf{/.f64}\left(1, \color{blue}{\sin B}\right) \]
      2. sin-lowering-sin.f6457.0%

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right) \]
    10. Simplified57.0%

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

    if 3.3000000000000002e175 < F

    1. Initial program 43.8%

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \color{blue}{\left(x \cdot \frac{1}{\tan B}\right)}\right) \]
    3. Simplified68.4%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(\frac{1}{\sin B}\right)}, \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(1, \sin B\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      2. sin-lowering-sin.f6499.9%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    7. Simplified99.9%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(\frac{1}{B}\right)}, \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    9. Step-by-step derivation
      1. /-lowering-/.f6484.0%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    10. Simplified84.0%

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\left(1 + \frac{1}{3} \cdot \left({B}^{2} \cdot x\right)\right) - x\right), \color{blue}{B}\right) \]
    13. Simplified52.3%

      \[\leadsto \color{blue}{\frac{1 + -1 \cdot \left(\left(-0.3333333333333333 \cdot \left(B \cdot B\right) + 1\right) \cdot x\right)}{B}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification47.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -4.3 \cdot 10^{-16}:\\ \;\;\;\;\frac{\left(-1 + 0.5 \cdot \left(\frac{2 + x \cdot 2}{F \cdot F} + \frac{2 + \frac{x}{0.5}}{F \cdot F} \cdot \frac{\left(2 + \frac{x}{0.5}\right) \cdot -0.75}{F \cdot F}\right)\right) - x}{B}\\ \mathbf{elif}\;F \leq 0.0032:\\ \;\;\;\;\frac{x}{0 - B}\\ \mathbf{elif}\;F \leq 3.3 \cdot 10^{+175}:\\ \;\;\;\;\frac{1}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 + x \cdot \left(-1 - \left(B \cdot B\right) \cdot -0.3333333333333333\right)}{B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 23: 69.7% accurate, 2.8× speedup?

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

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

\mathbf{elif}\;F \leq 1.8 \cdot 10^{-125}:\\
\;\;\;\;\frac{x}{0 - \tan B}\\

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


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

    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. Step-by-step derivation
      1. +-commutativeN/A

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \color{blue}{\left(x \cdot \frac{1}{\tan B}\right)}\right) \]
    3. Simplified77.9%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)}, \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot \frac{F}{B}\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      3. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(2 + \left(2 \cdot x + {F}^{2}\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      5. +-lowering-+.f64N/A

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left({F}^{2} + 2 \cdot x\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left({F}^{2}\right), \left(2 \cdot x\right)\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left(F \cdot F\right), \left(2 \cdot x\right)\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \left(2 \cdot x\right)\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \mathsf{*.f64}\left(2, x\right)\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      11. /-lowering-/.f6444.9%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \mathsf{*.f64}\left(2, x\right)\right)\right)\right)\right), \mathsf{/.f64}\left(F, B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    7. Simplified44.9%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(\frac{-1}{B}\right)}, \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    9. Step-by-step derivation
      1. /-lowering-/.f6467.0%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, B\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    10. Simplified67.0%

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

    if -7.19999999999999965e-16 < F < 1.8000000000000001e-125

    1. Initial program 99.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. Step-by-step derivation
      1. +-commutativeN/A

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \color{blue}{\left(x \cdot \frac{1}{\tan B}\right)}\right) \]
    3. Simplified99.7%

      \[\leadsto \color{blue}{\frac{F \cdot {\left(F \cdot F + \left(2 + x \cdot 2\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-+r+N/A

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      5. associate-*l/N/A

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1}{\frac{\sin B}{F}} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      7. associate-*l/N/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{\sin B}{F}}\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      8. div-invN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1 \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\sin B \cdot \frac{1}{F}}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      9. times-fracN/A

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \left(\frac{{\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{\frac{1}{F}}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(\left({\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \left(\frac{1}{F}\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Applied egg-rr99.7%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
    8. Step-by-step derivation
      1. associate-*r/N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \left(x \cdot \cos B\right)\right), \color{blue}{\sin B}\right) \]
      3. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{*.f64}\left(x, \cos B\right)\right), \sin B\right) \]
      5. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{*.f64}\left(x, \mathsf{cos.f64}\left(B\right)\right)\right), \sin B\right) \]
      6. sin-lowering-sin.f6469.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{*.f64}\left(x, \mathsf{cos.f64}\left(B\right)\right)\right), \mathsf{sin.f64}\left(B\right)\right) \]
    9. Simplified69.4%

      \[\leadsto \color{blue}{\frac{-1 \cdot \left(x \cdot \cos B\right)}{\sin B}} \]
    10. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \frac{\mathsf{neg}\left(x \cdot \cos B\right)}{\sin \color{blue}{B}} \]
      2. distribute-frac-negN/A

        \[\leadsto \mathsf{neg}\left(\frac{x \cdot \cos B}{\sin B}\right) \]
      3. clear-numN/A

        \[\leadsto \mathsf{neg}\left(\frac{1}{\frac{\sin B}{x \cdot \cos B}}\right) \]
      4. associate-/l/N/A

        \[\leadsto \mathsf{neg}\left(\frac{1}{\frac{\frac{\sin B}{\cos B}}{x}}\right) \]
      5. tan-quotN/A

        \[\leadsto \mathsf{neg}\left(\frac{1}{\frac{\tan B}{x}}\right) \]
      6. clear-numN/A

        \[\leadsto \mathsf{neg}\left(\frac{x}{\tan B}\right) \]
      7. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{x}{\tan B}\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(x, \tan B\right)\right) \]
      9. tan-lowering-tan.f6469.5%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    11. Applied egg-rr69.5%

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

    if 1.8000000000000001e-125 < F

    1. Initial program 72.9%

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \color{blue}{\left(x \cdot \frac{1}{\tan B}\right)}\right) \]
    3. Simplified85.6%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(\frac{1}{\sin B}\right)}, \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(1, \sin B\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      2. sin-lowering-sin.f6484.8%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    7. Simplified84.8%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(\frac{1}{B}\right)}, \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    9. Step-by-step derivation
      1. /-lowering-/.f6465.2%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    10. Simplified65.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -7.2 \cdot 10^{-16}:\\ \;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 1.8 \cdot 10^{-125}:\\ \;\;\;\;\frac{x}{0 - \tan B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 24: 44.1% accurate, 7.4× speedup?

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

\\
\begin{array}{l}
t_0 := 2 + \frac{x}{0.5}\\
\mathbf{if}\;F \leq -3.9 \cdot 10^{-13}:\\
\;\;\;\;\frac{\left(-1 + 0.5 \cdot \left(\frac{2 + x \cdot 2}{F \cdot F} + \frac{t\_0}{F \cdot F} \cdot \frac{t\_0 \cdot -0.75}{F \cdot F}\right)\right) - x}{B}\\

\mathbf{elif}\;F \leq 0.00072:\\
\;\;\;\;\frac{x}{0 - B}\\

\mathbf{else}:\\
\;\;\;\;\frac{1 + \frac{-1 - x}{F \cdot F}}{B} - \frac{x}{B}\\


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

    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. Add Preprocessing
    3. Taylor expanded in B around 0

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right), x\right), B\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right), x\right), B\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\left(\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}\right)\right)\right), x\right), B\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(2 + \left(2 \cdot x + {F}^{2}\right)\right)\right)\right)\right), x\right), B\right) \]
      6. +-lowering-+.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left({F}^{2} + 2 \cdot x\right)\right)\right)\right)\right), x\right), B\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left({F}^{2}\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left(F \cdot F\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      11. *-lowering-*.f6441.8%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \mathsf{*.f64}\left(2, x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
    5. Simplified41.8%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\color{blue}{\left(\left(\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}} + \frac{1}{2} \cdot \frac{-1 \cdot {\left(2 + 2 \cdot x\right)}^{2} + \frac{1}{4} \cdot {\left(2 + 2 \cdot x\right)}^{2}}{{F}^{4}}\right) - 1\right)}, x\right), B\right) \]
    7. Step-by-step derivation
      1. sub-negN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\left(\frac{1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}} + \frac{1}{2} \cdot \frac{-1 \cdot {\left(2 + 2 \cdot x\right)}^{2} + \frac{1}{4} \cdot {\left(2 + 2 \cdot x\right)}^{2}}{{F}^{4}}\right), -1\right), x\right), B\right) \]
    8. Simplified39.8%

      \[\leadsto \frac{\color{blue}{\left(0.5 \cdot \left(\frac{2 + 2 \cdot x}{F \cdot F} + \frac{\left(\left(2 + 2 \cdot x\right) \cdot \left(2 + 2 \cdot x\right)\right) \cdot -0.75}{{F}^{4}}\right) + -1\right)} - x}{B} \]
    9. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \left(\frac{\left(2 + 2 \cdot x\right) \cdot \left(\left(2 + 2 \cdot x\right) \cdot \frac{-3}{4}\right)}{{F}^{4}}\right)\right)\right), -1\right), x\right), B\right) \]
      2. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \left(\frac{\left(2 + 2 \cdot x\right) \cdot \left(\left(2 + 2 \cdot x\right) \cdot \frac{-3}{4}\right)}{{F}^{\left(2 + 2\right)}}\right)\right)\right), -1\right), x\right), B\right) \]
      3. pow-prod-upN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \left(\frac{\left(2 + 2 \cdot x\right) \cdot \left(\left(2 + 2 \cdot x\right) \cdot \frac{-3}{4}\right)}{{F}^{2} \cdot {F}^{2}}\right)\right)\right), -1\right), x\right), B\right) \]
      4. pow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \left(\frac{\left(2 + 2 \cdot x\right) \cdot \left(\left(2 + 2 \cdot x\right) \cdot \frac{-3}{4}\right)}{\left(F \cdot F\right) \cdot {F}^{2}}\right)\right)\right), -1\right), x\right), B\right) \]
      5. pow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \left(\frac{\left(2 + 2 \cdot x\right) \cdot \left(\left(2 + 2 \cdot x\right) \cdot \frac{-3}{4}\right)}{\left(F \cdot F\right) \cdot \left(F \cdot F\right)}\right)\right)\right), -1\right), x\right), B\right) \]
      6. times-fracN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \left(\frac{2 + 2 \cdot x}{F \cdot F} \cdot \frac{\left(2 + 2 \cdot x\right) \cdot \frac{-3}{4}}{F \cdot F}\right)\right)\right), -1\right), x\right), B\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{*.f64}\left(\left(\frac{2 + 2 \cdot x}{F \cdot F}\right), \left(\frac{\left(2 + 2 \cdot x\right) \cdot \frac{-3}{4}}{F \cdot F}\right)\right)\right)\right), -1\right), x\right), B\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(2 + 2 \cdot x\right), \left(F \cdot F\right)\right), \left(\frac{\left(2 + 2 \cdot x\right) \cdot \frac{-3}{4}}{F \cdot F}\right)\right)\right)\right), -1\right), x\right), B\right) \]
      9. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(2 \cdot x\right)\right), \left(F \cdot F\right)\right), \left(\frac{\left(2 + 2 \cdot x\right) \cdot \frac{-3}{4}}{F \cdot F}\right)\right)\right)\right), -1\right), x\right), B\right) \]
      10. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(x \cdot 2\right)\right), \left(F \cdot F\right)\right), \left(\frac{\left(2 + 2 \cdot x\right) \cdot \frac{-3}{4}}{F \cdot F}\right)\right)\right)\right), -1\right), x\right), B\right) \]
      11. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(x \cdot \frac{1}{\frac{1}{2}}\right)\right), \left(F \cdot F\right)\right), \left(\frac{\left(2 + 2 \cdot x\right) \cdot \frac{-3}{4}}{F \cdot F}\right)\right)\right)\right), -1\right), x\right), B\right) \]
      12. div-invN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \left(\frac{x}{\frac{1}{2}}\right)\right), \left(F \cdot F\right)\right), \left(\frac{\left(2 + 2 \cdot x\right) \cdot \frac{-3}{4}}{F \cdot F}\right)\right)\right)\right), -1\right), x\right), B\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(x, \frac{1}{2}\right)\right), \left(F \cdot F\right)\right), \left(\frac{\left(2 + 2 \cdot x\right) \cdot \frac{-3}{4}}{F \cdot F}\right)\right)\right)\right), -1\right), x\right), B\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(x, \frac{1}{2}\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \left(\frac{\left(2 + 2 \cdot x\right) \cdot \frac{-3}{4}}{F \cdot F}\right)\right)\right)\right), -1\right), x\right), B\right) \]
      15. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(x, \frac{1}{2}\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{/.f64}\left(\left(\left(2 + 2 \cdot x\right) \cdot \frac{-3}{4}\right), \left(F \cdot F\right)\right)\right)\right)\right), -1\right), x\right), B\right) \]
      16. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(x, \frac{1}{2}\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(2 + 2 \cdot x\right), \frac{-3}{4}\right), \left(F \cdot F\right)\right)\right)\right)\right), -1\right), x\right), B\right) \]
      17. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(x, \frac{1}{2}\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \left(2 \cdot x\right)\right), \frac{-3}{4}\right), \left(F \cdot F\right)\right)\right)\right)\right), -1\right), x\right), B\right) \]
      18. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(x, \frac{1}{2}\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \left(x \cdot 2\right)\right), \frac{-3}{4}\right), \left(F \cdot F\right)\right)\right)\right)\right), -1\right), x\right), B\right) \]
      19. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(x, \frac{1}{2}\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \left(x \cdot \frac{1}{\frac{1}{2}}\right)\right), \frac{-3}{4}\right), \left(F \cdot F\right)\right)\right)\right)\right), -1\right), x\right), B\right) \]
      20. div-invN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(x, \frac{1}{2}\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \left(\frac{x}{\frac{1}{2}}\right)\right), \frac{-3}{4}\right), \left(F \cdot F\right)\right)\right)\right)\right), -1\right), x\right), B\right) \]
      21. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(x, \frac{1}{2}\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(x, \frac{1}{2}\right)\right), \frac{-3}{4}\right), \left(F \cdot F\right)\right)\right)\right)\right), -1\right), x\right), B\right) \]
      22. *-lowering-*.f6451.2%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(x, \frac{1}{2}\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(2, \mathsf{/.f64}\left(x, \frac{1}{2}\right)\right), \frac{-3}{4}\right), \mathsf{*.f64}\left(F, F\right)\right)\right)\right)\right), -1\right), x\right), B\right) \]
    10. Applied egg-rr51.2%

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

    if -3.90000000000000004e-13 < F < 7.20000000000000045e-4

    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 B around 0

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right), x\right), B\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right), x\right), B\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\left(\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}\right)\right)\right), x\right), B\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(2 + \left(2 \cdot x + {F}^{2}\right)\right)\right)\right)\right), x\right), B\right) \]
      6. +-lowering-+.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left({F}^{2} + 2 \cdot x\right)\right)\right)\right)\right), x\right), B\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left({F}^{2}\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left(F \cdot F\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      11. *-lowering-*.f6458.8%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \mathsf{*.f64}\left(2, x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
    5. Simplified58.8%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{B}} \]
    7. Step-by-step derivation
      1. associate-*r/N/A

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

        \[\leadsto \frac{\mathsf{neg}\left(x\right)}{B} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\mathsf{neg}\left(x\right)\right), \color{blue}{B}\right) \]
      4. neg-sub0N/A

        \[\leadsto \mathsf{/.f64}\left(\left(0 - x\right), B\right) \]
      5. --lowering--.f6437.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, x\right), B\right) \]
    8. Simplified37.3%

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

    if 7.20000000000000045e-4 < F

    1. Initial program 65.8%

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

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

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

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

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)}, \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot \frac{F}{B}\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      3. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(2 + \left(2 \cdot x + {F}^{2}\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      5. +-lowering-+.f64N/A

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left({F}^{2} + 2 \cdot x\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left({F}^{2}\right), \left(2 \cdot x\right)\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left(F \cdot F\right), \left(2 \cdot x\right)\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \left(2 \cdot x\right)\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \mathsf{*.f64}\left(2, x\right)\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      11. /-lowering-/.f6447.7%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \mathsf{*.f64}\left(2, x\right)\right)\right)\right)\right), \mathsf{/.f64}\left(F, B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    7. Simplified47.7%

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

      \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\left(\frac{1 + \frac{-1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}}}{F}\right)}, \mathsf{/.f64}\left(F, B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    9. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(1 + \frac{-1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}}\right), F\right), \mathsf{/.f64}\left(F, B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{-1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}}\right)\right), F\right), \mathsf{/.f64}\left(F, B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      3. associate-*r/N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{\frac{-1}{2} \cdot \left(2 + 2 \cdot x\right)}{{F}^{2}}\right)\right), F\right), \mathsf{/.f64}\left(F, B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{-1}{2} \cdot \left(2 + 2 \cdot x\right)\right), \left({F}^{2}\right)\right)\right), F\right), \mathsf{/.f64}\left(F, B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(2 + 2 \cdot x\right)\right), \left({F}^{2}\right)\right)\right), F\right), \mathsf{/.f64}\left(F, B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{+.f64}\left(2, \left(2 \cdot x\right)\right)\right), \left({F}^{2}\right)\right)\right), F\right), \mathsf{/.f64}\left(F, B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right)\right), \left({F}^{2}\right)\right)\right), F\right), \mathsf{/.f64}\left(F, B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right)\right), \left(F \cdot F\right)\right)\right), F\right), \mathsf{/.f64}\left(F, B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      9. *-lowering-*.f6454.7%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right)\right), \mathsf{*.f64}\left(F, F\right)\right)\right), F\right), \mathsf{/.f64}\left(F, B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    10. Simplified54.7%

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\left(\frac{-1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}} + 1\right) - x\right), B\right) \]
      3. associate--l+N/A

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(\frac{-1}{2} \cdot \left(2 + 2 \cdot x\right)\right), \left({F}^{2}\right)\right), \left(1 - x\right)\right), B\right) \]
      7. distribute-lft-inN/A

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(-1 + -1 \cdot x\right), \left({F}^{2}\right)\right), \left(1 - x\right)\right), B\right) \]
      11. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(-1 + \left(\mathsf{neg}\left(x\right)\right)\right), \left({F}^{2}\right)\right), \left(1 - x\right)\right), B\right) \]
      12. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(-1, \left(\mathsf{neg}\left(x\right)\right)\right), \left({F}^{2}\right)\right), \left(1 - x\right)\right), B\right) \]
      13. neg-sub0N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(-1, \left(0 - x\right)\right), \left({F}^{2}\right)\right), \left(1 - x\right)\right), B\right) \]
      14. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(-1, \mathsf{\_.f64}\left(0, x\right)\right), \left({F}^{2}\right)\right), \left(1 - x\right)\right), B\right) \]
      15. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(-1, \mathsf{\_.f64}\left(0, x\right)\right), \left(F \cdot F\right)\right), \left(1 - x\right)\right), B\right) \]
      16. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(-1, \mathsf{\_.f64}\left(0, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \left(1 - x\right)\right), B\right) \]
      17. --lowering--.f6445.5%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(-1, \mathsf{\_.f64}\left(0, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{\_.f64}\left(1, x\right)\right), B\right) \]
    13. Simplified45.5%

      \[\leadsto \color{blue}{\frac{\frac{-1 + \left(0 - x\right)}{F \cdot F} + \left(1 - x\right)}{B}} \]
    14. Step-by-step derivation
      1. associate-+r-N/A

        \[\leadsto \frac{\left(\frac{-1 + \left(0 - x\right)}{F \cdot F} + 1\right) - x}{B} \]
      2. div-subN/A

        \[\leadsto \frac{\frac{-1 + \left(0 - x\right)}{F \cdot F} + 1}{B} - \color{blue}{\frac{x}{B}} \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{\frac{-1 + \left(0 - x\right)}{F \cdot F} + 1}{B}\right), \color{blue}{\left(\frac{x}{B}\right)}\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\left(\frac{-1 + \left(0 - x\right)}{F \cdot F} + 1\right), B\right), \left(\frac{\color{blue}{x}}{B}\right)\right) \]
      5. +-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\left(1 + \frac{-1 + \left(0 - x\right)}{F \cdot F}\right), B\right), \left(\frac{x}{B}\right)\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{-1 + \left(0 - x\right)}{F \cdot F}\right)\right), B\right), \left(\frac{x}{B}\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(-1 + \left(0 - x\right)\right), \left(F \cdot F\right)\right)\right), B\right), \left(\frac{x}{B}\right)\right) \]
      8. associate-+r-N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\left(-1 + 0\right) - x\right), \left(F \cdot F\right)\right)\right), B\right), \left(\frac{x}{B}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(-1 - x\right), \left(F \cdot F\right)\right)\right), B\right), \left(\frac{x}{B}\right)\right) \]
      10. --lowering--.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(-1, x\right), \left(F \cdot F\right)\right)\right), B\right), \left(\frac{x}{B}\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(-1, x\right), \mathsf{*.f64}\left(F, F\right)\right)\right), B\right), \left(\frac{x}{B}\right)\right) \]
      12. /-lowering-/.f6445.5%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(-1, x\right), \mathsf{*.f64}\left(F, F\right)\right)\right), B\right), \mathsf{/.f64}\left(x, \color{blue}{B}\right)\right) \]
    15. Applied egg-rr45.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -3.9 \cdot 10^{-13}:\\ \;\;\;\;\frac{\left(-1 + 0.5 \cdot \left(\frac{2 + x \cdot 2}{F \cdot F} + \frac{2 + \frac{x}{0.5}}{F \cdot F} \cdot \frac{\left(2 + \frac{x}{0.5}\right) \cdot -0.75}{F \cdot F}\right)\right) - x}{B}\\ \mathbf{elif}\;F \leq 0.00072:\\ \;\;\;\;\frac{x}{0 - B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 + \frac{-1 - x}{F \cdot F}}{B} - \frac{x}{B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 25: 44.2% accurate, 12.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -4 \cdot 10^{-16}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 0.0007:\\ \;\;\;\;\frac{x}{0 - B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 + \frac{-1 - x}{F \cdot F}}{B} - \frac{x}{B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (if (<= F -4e-16)
   (/ (- -1.0 x) B)
   (if (<= F 0.0007)
     (/ x (- 0.0 B))
     (- (/ (+ 1.0 (/ (- -1.0 x) (* F F))) B) (/ x B)))))
double code(double F, double B, double x) {
	double tmp;
	if (F <= -4e-16) {
		tmp = (-1.0 - x) / B;
	} else if (F <= 0.0007) {
		tmp = x / (0.0 - B);
	} else {
		tmp = ((1.0 + ((-1.0 - x) / (F * F))) / B) - (x / B);
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: tmp
    if (f <= (-4d-16)) then
        tmp = ((-1.0d0) - x) / b
    else if (f <= 0.0007d0) then
        tmp = x / (0.0d0 - b)
    else
        tmp = ((1.0d0 + (((-1.0d0) - x) / (f * f))) / b) - (x / b)
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double tmp;
	if (F <= -4e-16) {
		tmp = (-1.0 - x) / B;
	} else if (F <= 0.0007) {
		tmp = x / (0.0 - B);
	} else {
		tmp = ((1.0 + ((-1.0 - x) / (F * F))) / B) - (x / B);
	}
	return tmp;
}
def code(F, B, x):
	tmp = 0
	if F <= -4e-16:
		tmp = (-1.0 - x) / B
	elif F <= 0.0007:
		tmp = x / (0.0 - B)
	else:
		tmp = ((1.0 + ((-1.0 - x) / (F * F))) / B) - (x / B)
	return tmp
function code(F, B, x)
	tmp = 0.0
	if (F <= -4e-16)
		tmp = Float64(Float64(-1.0 - x) / B);
	elseif (F <= 0.0007)
		tmp = Float64(x / Float64(0.0 - B));
	else
		tmp = Float64(Float64(Float64(1.0 + Float64(Float64(-1.0 - x) / Float64(F * F))) / B) - Float64(x / B));
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	tmp = 0.0;
	if (F <= -4e-16)
		tmp = (-1.0 - x) / B;
	elseif (F <= 0.0007)
		tmp = x / (0.0 - B);
	else
		tmp = ((1.0 + ((-1.0 - x) / (F * F))) / B) - (x / B);
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := If[LessEqual[F, -4e-16], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 0.0007], N[(x / N[(0.0 - B), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + N[(N[(-1.0 - x), $MachinePrecision] / N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;F \leq -4 \cdot 10^{-16}:\\
\;\;\;\;\frac{-1 - x}{B}\\

\mathbf{elif}\;F \leq 0.0007:\\
\;\;\;\;\frac{x}{0 - B}\\

\mathbf{else}:\\
\;\;\;\;\frac{1 + \frac{-1 - x}{F \cdot F}}{B} - \frac{x}{B}\\


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

    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. Add Preprocessing
    3. Taylor expanded in B around 0

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right), x\right), B\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right), x\right), B\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\left(\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}\right)\right)\right), x\right), B\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(2 + \left(2 \cdot x + {F}^{2}\right)\right)\right)\right)\right), x\right), B\right) \]
      6. +-lowering-+.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left({F}^{2} + 2 \cdot x\right)\right)\right)\right)\right), x\right), B\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left({F}^{2}\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left(F \cdot F\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      11. *-lowering-*.f6441.8%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \mathsf{*.f64}\left(2, x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
    5. Simplified41.8%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{1 + x}{B}} \]
    7. Step-by-step derivation
      1. associate-*r/N/A

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

        \[\leadsto \frac{\mathsf{neg}\left(\left(1 + x\right)\right)}{B} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\mathsf{neg}\left(\left(1 + x\right)\right)\right), \color{blue}{B}\right) \]
      4. distribute-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(\mathsf{neg}\left(1\right)\right) + \left(\mathsf{neg}\left(x\right)\right)\right), B\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\left(-1 + \left(\mathsf{neg}\left(x\right)\right)\right), B\right) \]
      6. unsub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\left(-1 - x\right), B\right) \]
      7. --lowering--.f6450.8%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(-1, x\right), B\right) \]
    8. Simplified50.8%

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

    if -3.9999999999999999e-16 < F < 6.99999999999999993e-4

    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 B around 0

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right), x\right), B\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right), x\right), B\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\left(\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}\right)\right)\right), x\right), B\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(2 + \left(2 \cdot x + {F}^{2}\right)\right)\right)\right)\right), x\right), B\right) \]
      6. +-lowering-+.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left({F}^{2} + 2 \cdot x\right)\right)\right)\right)\right), x\right), B\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left({F}^{2}\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left(F \cdot F\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      11. *-lowering-*.f6458.8%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \mathsf{*.f64}\left(2, x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
    5. Simplified58.8%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{B}} \]
    7. Step-by-step derivation
      1. associate-*r/N/A

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

        \[\leadsto \frac{\mathsf{neg}\left(x\right)}{B} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\mathsf{neg}\left(x\right)\right), \color{blue}{B}\right) \]
      4. neg-sub0N/A

        \[\leadsto \mathsf{/.f64}\left(\left(0 - x\right), B\right) \]
      5. --lowering--.f6437.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, x\right), B\right) \]
    8. Simplified37.3%

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

    if 6.99999999999999993e-4 < F

    1. Initial program 65.8%

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

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

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

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

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)}, \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot \frac{F}{B}\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      3. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(2 + \left(2 \cdot x + {F}^{2}\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      5. +-lowering-+.f64N/A

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left({F}^{2} + 2 \cdot x\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left({F}^{2}\right), \left(2 \cdot x\right)\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left(F \cdot F\right), \left(2 \cdot x\right)\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \left(2 \cdot x\right)\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \mathsf{*.f64}\left(2, x\right)\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      11. /-lowering-/.f6447.7%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \mathsf{*.f64}\left(2, x\right)\right)\right)\right)\right), \mathsf{/.f64}\left(F, B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    7. Simplified47.7%

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

      \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\left(\frac{1 + \frac{-1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}}}{F}\right)}, \mathsf{/.f64}\left(F, B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    9. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(1 + \frac{-1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}}\right), F\right), \mathsf{/.f64}\left(F, B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{-1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}}\right)\right), F\right), \mathsf{/.f64}\left(F, B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      3. associate-*r/N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{\frac{-1}{2} \cdot \left(2 + 2 \cdot x\right)}{{F}^{2}}\right)\right), F\right), \mathsf{/.f64}\left(F, B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{-1}{2} \cdot \left(2 + 2 \cdot x\right)\right), \left({F}^{2}\right)\right)\right), F\right), \mathsf{/.f64}\left(F, B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(2 + 2 \cdot x\right)\right), \left({F}^{2}\right)\right)\right), F\right), \mathsf{/.f64}\left(F, B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{+.f64}\left(2, \left(2 \cdot x\right)\right)\right), \left({F}^{2}\right)\right)\right), F\right), \mathsf{/.f64}\left(F, B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right)\right), \left({F}^{2}\right)\right)\right), F\right), \mathsf{/.f64}\left(F, B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right)\right), \left(F \cdot F\right)\right)\right), F\right), \mathsf{/.f64}\left(F, B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      9. *-lowering-*.f6454.7%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right)\right), \mathsf{*.f64}\left(F, F\right)\right)\right), F\right), \mathsf{/.f64}\left(F, B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    10. Simplified54.7%

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\left(\frac{-1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}} + 1\right) - x\right), B\right) \]
      3. associate--l+N/A

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(\frac{-1}{2} \cdot \left(2 + 2 \cdot x\right)\right), \left({F}^{2}\right)\right), \left(1 - x\right)\right), B\right) \]
      7. distribute-lft-inN/A

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(-1 + -1 \cdot x\right), \left({F}^{2}\right)\right), \left(1 - x\right)\right), B\right) \]
      11. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(-1 + \left(\mathsf{neg}\left(x\right)\right)\right), \left({F}^{2}\right)\right), \left(1 - x\right)\right), B\right) \]
      12. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(-1, \left(\mathsf{neg}\left(x\right)\right)\right), \left({F}^{2}\right)\right), \left(1 - x\right)\right), B\right) \]
      13. neg-sub0N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(-1, \left(0 - x\right)\right), \left({F}^{2}\right)\right), \left(1 - x\right)\right), B\right) \]
      14. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(-1, \mathsf{\_.f64}\left(0, x\right)\right), \left({F}^{2}\right)\right), \left(1 - x\right)\right), B\right) \]
      15. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(-1, \mathsf{\_.f64}\left(0, x\right)\right), \left(F \cdot F\right)\right), \left(1 - x\right)\right), B\right) \]
      16. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(-1, \mathsf{\_.f64}\left(0, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \left(1 - x\right)\right), B\right) \]
      17. --lowering--.f6445.5%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(-1, \mathsf{\_.f64}\left(0, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{\_.f64}\left(1, x\right)\right), B\right) \]
    13. Simplified45.5%

      \[\leadsto \color{blue}{\frac{\frac{-1 + \left(0 - x\right)}{F \cdot F} + \left(1 - x\right)}{B}} \]
    14. Step-by-step derivation
      1. associate-+r-N/A

        \[\leadsto \frac{\left(\frac{-1 + \left(0 - x\right)}{F \cdot F} + 1\right) - x}{B} \]
      2. div-subN/A

        \[\leadsto \frac{\frac{-1 + \left(0 - x\right)}{F \cdot F} + 1}{B} - \color{blue}{\frac{x}{B}} \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{\frac{-1 + \left(0 - x\right)}{F \cdot F} + 1}{B}\right), \color{blue}{\left(\frac{x}{B}\right)}\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\left(\frac{-1 + \left(0 - x\right)}{F \cdot F} + 1\right), B\right), \left(\frac{\color{blue}{x}}{B}\right)\right) \]
      5. +-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\left(1 + \frac{-1 + \left(0 - x\right)}{F \cdot F}\right), B\right), \left(\frac{x}{B}\right)\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{-1 + \left(0 - x\right)}{F \cdot F}\right)\right), B\right), \left(\frac{x}{B}\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(-1 + \left(0 - x\right)\right), \left(F \cdot F\right)\right)\right), B\right), \left(\frac{x}{B}\right)\right) \]
      8. associate-+r-N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\left(-1 + 0\right) - x\right), \left(F \cdot F\right)\right)\right), B\right), \left(\frac{x}{B}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(-1 - x\right), \left(F \cdot F\right)\right)\right), B\right), \left(\frac{x}{B}\right)\right) \]
      10. --lowering--.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(-1, x\right), \left(F \cdot F\right)\right)\right), B\right), \left(\frac{x}{B}\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(-1, x\right), \mathsf{*.f64}\left(F, F\right)\right)\right), B\right), \left(\frac{x}{B}\right)\right) \]
      12. /-lowering-/.f6445.5%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(-1, x\right), \mathsf{*.f64}\left(F, F\right)\right)\right), B\right), \mathsf{/.f64}\left(x, \color{blue}{B}\right)\right) \]
    15. Applied egg-rr45.5%

      \[\leadsto \color{blue}{\frac{1 + \frac{-1 - x}{F \cdot F}}{B} - \frac{x}{B}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification43.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -4 \cdot 10^{-16}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 0.0007:\\ \;\;\;\;\frac{x}{0 - B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 + \frac{-1 - x}{F \cdot F}}{B} - \frac{x}{B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 26: 44.2% accurate, 14.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -7.2 \cdot 10^{-17}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 0.0006:\\ \;\;\;\;\frac{x}{0 - B}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\frac{-1 - x}{F}}{F} + \left(1 - x\right)}{B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (if (<= F -7.2e-17)
   (/ (- -1.0 x) B)
   (if (<= F 0.0006)
     (/ x (- 0.0 B))
     (/ (+ (/ (/ (- -1.0 x) F) F) (- 1.0 x)) B))))
double code(double F, double B, double x) {
	double tmp;
	if (F <= -7.2e-17) {
		tmp = (-1.0 - x) / B;
	} else if (F <= 0.0006) {
		tmp = x / (0.0 - B);
	} else {
		tmp = ((((-1.0 - x) / F) / F) + (1.0 - x)) / B;
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: tmp
    if (f <= (-7.2d-17)) then
        tmp = ((-1.0d0) - x) / b
    else if (f <= 0.0006d0) then
        tmp = x / (0.0d0 - b)
    else
        tmp = (((((-1.0d0) - x) / f) / f) + (1.0d0 - x)) / b
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double tmp;
	if (F <= -7.2e-17) {
		tmp = (-1.0 - x) / B;
	} else if (F <= 0.0006) {
		tmp = x / (0.0 - B);
	} else {
		tmp = ((((-1.0 - x) / F) / F) + (1.0 - x)) / B;
	}
	return tmp;
}
def code(F, B, x):
	tmp = 0
	if F <= -7.2e-17:
		tmp = (-1.0 - x) / B
	elif F <= 0.0006:
		tmp = x / (0.0 - B)
	else:
		tmp = ((((-1.0 - x) / F) / F) + (1.0 - x)) / B
	return tmp
function code(F, B, x)
	tmp = 0.0
	if (F <= -7.2e-17)
		tmp = Float64(Float64(-1.0 - x) / B);
	elseif (F <= 0.0006)
		tmp = Float64(x / Float64(0.0 - B));
	else
		tmp = Float64(Float64(Float64(Float64(Float64(-1.0 - x) / F) / F) + Float64(1.0 - x)) / B);
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	tmp = 0.0;
	if (F <= -7.2e-17)
		tmp = (-1.0 - x) / B;
	elseif (F <= 0.0006)
		tmp = x / (0.0 - B);
	else
		tmp = ((((-1.0 - x) / F) / F) + (1.0 - x)) / B;
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := If[LessEqual[F, -7.2e-17], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 0.0006], N[(x / N[(0.0 - B), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(-1.0 - x), $MachinePrecision] / F), $MachinePrecision] / F), $MachinePrecision] + N[(1.0 - x), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;F \leq -7.2 \cdot 10^{-17}:\\
\;\;\;\;\frac{-1 - x}{B}\\

\mathbf{elif}\;F \leq 0.0006:\\
\;\;\;\;\frac{x}{0 - B}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{\frac{-1 - x}{F}}{F} + \left(1 - x\right)}{B}\\


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

    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. Add Preprocessing
    3. Taylor expanded in B around 0

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right), x\right), B\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right), x\right), B\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\left(\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}\right)\right)\right), x\right), B\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(2 + \left(2 \cdot x + {F}^{2}\right)\right)\right)\right)\right), x\right), B\right) \]
      6. +-lowering-+.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left({F}^{2} + 2 \cdot x\right)\right)\right)\right)\right), x\right), B\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left({F}^{2}\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left(F \cdot F\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      11. *-lowering-*.f6441.8%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \mathsf{*.f64}\left(2, x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
    5. Simplified41.8%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{1 + x}{B}} \]
    7. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{-1 \cdot \left(1 + x\right)}{\color{blue}{B}} \]
      2. mul-1-negN/A

        \[\leadsto \frac{\mathsf{neg}\left(\left(1 + x\right)\right)}{B} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\mathsf{neg}\left(\left(1 + x\right)\right)\right), \color{blue}{B}\right) \]
      4. distribute-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(\mathsf{neg}\left(1\right)\right) + \left(\mathsf{neg}\left(x\right)\right)\right), B\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\left(-1 + \left(\mathsf{neg}\left(x\right)\right)\right), B\right) \]
      6. unsub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\left(-1 - x\right), B\right) \]
      7. --lowering--.f6450.8%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(-1, x\right), B\right) \]
    8. Simplified50.8%

      \[\leadsto \color{blue}{\frac{-1 - x}{B}} \]

    if -7.1999999999999999e-17 < F < 5.99999999999999947e-4

    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 B around 0

      \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x\right), \color{blue}{B}\right) \]
      2. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right), x\right), B\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right), x\right), B\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\left(\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}\right)\right)\right), x\right), B\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(2 + \left(2 \cdot x + {F}^{2}\right)\right)\right)\right)\right), x\right), B\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left(2 \cdot x + {F}^{2}\right)\right)\right)\right)\right), x\right), B\right) \]
      7. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left({F}^{2} + 2 \cdot x\right)\right)\right)\right)\right), x\right), B\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left({F}^{2}\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left(F \cdot F\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      11. *-lowering-*.f6458.8%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \mathsf{*.f64}\left(2, x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
    5. Simplified58.8%

      \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(F \cdot F + 2 \cdot x\right)}} - x}{B}} \]
    6. Taylor expanded in F around 0

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{B}} \]
    7. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{-1 \cdot x}{\color{blue}{B}} \]
      2. mul-1-negN/A

        \[\leadsto \frac{\mathsf{neg}\left(x\right)}{B} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\mathsf{neg}\left(x\right)\right), \color{blue}{B}\right) \]
      4. neg-sub0N/A

        \[\leadsto \mathsf{/.f64}\left(\left(0 - x\right), B\right) \]
      5. --lowering--.f6437.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, x\right), B\right) \]
    8. Simplified37.3%

      \[\leadsto \color{blue}{\frac{0 - x}{B}} \]

    if 5.99999999999999947e-4 < F

    1. Initial program 65.8%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} + \color{blue}{\left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)} \]
      2. unsub-negN/A

        \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} - \color{blue}{x \cdot \frac{1}{\tan B}} \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \color{blue}{\left(x \cdot \frac{1}{\tan B}\right)}\right) \]
    3. Simplified81.8%

      \[\leadsto \color{blue}{\frac{F \cdot {\left(F \cdot F + \left(2 + x \cdot 2\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Add Preprocessing
    5. Taylor expanded in B around 0

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)}, \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} \cdot \frac{F}{B}\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      3. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(2 + \left(2 \cdot x + {F}^{2}\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left(2 \cdot x + {F}^{2}\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      6. +-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left({F}^{2} + 2 \cdot x\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left({F}^{2}\right), \left(2 \cdot x\right)\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left(F \cdot F\right), \left(2 \cdot x\right)\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \left(2 \cdot x\right)\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \mathsf{*.f64}\left(2, x\right)\right)\right)\right)\right), \left(\frac{F}{B}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      11. /-lowering-/.f6447.7%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \mathsf{*.f64}\left(2, x\right)\right)\right)\right)\right), \mathsf{/.f64}\left(F, B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    7. Simplified47.7%

      \[\leadsto \color{blue}{\sqrt{\frac{1}{2 + \left(F \cdot F + 2 \cdot x\right)}} \cdot \frac{F}{B}} - \frac{x}{\tan B} \]
    8. Taylor expanded in F around inf

      \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\left(\frac{1 + \frac{-1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}}}{F}\right)}, \mathsf{/.f64}\left(F, B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    9. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(1 + \frac{-1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}}\right), F\right), \mathsf{/.f64}\left(F, B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{-1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}}\right)\right), F\right), \mathsf{/.f64}\left(F, B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      3. associate-*r/N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{\frac{-1}{2} \cdot \left(2 + 2 \cdot x\right)}{{F}^{2}}\right)\right), F\right), \mathsf{/.f64}\left(F, B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{-1}{2} \cdot \left(2 + 2 \cdot x\right)\right), \left({F}^{2}\right)\right)\right), F\right), \mathsf{/.f64}\left(F, B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(2 + 2 \cdot x\right)\right), \left({F}^{2}\right)\right)\right), F\right), \mathsf{/.f64}\left(F, B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{+.f64}\left(2, \left(2 \cdot x\right)\right)\right), \left({F}^{2}\right)\right)\right), F\right), \mathsf{/.f64}\left(F, B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right)\right), \left({F}^{2}\right)\right)\right), F\right), \mathsf{/.f64}\left(F, B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right)\right), \left(F \cdot F\right)\right)\right), F\right), \mathsf{/.f64}\left(F, B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      9. *-lowering-*.f6454.7%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(2, x\right)\right)\right), \mathsf{*.f64}\left(F, F\right)\right)\right), F\right), \mathsf{/.f64}\left(F, B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    10. Simplified54.7%

      \[\leadsto \color{blue}{\frac{1 + \frac{-0.5 \cdot \left(2 + 2 \cdot x\right)}{F \cdot F}}{F}} \cdot \frac{F}{B} - \frac{x}{\tan B} \]
    11. Taylor expanded in B around 0

      \[\leadsto \color{blue}{\frac{\left(1 + \frac{-1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}}\right) - x}{B}} \]
    12. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(1 + \frac{-1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}}\right) - x\right), \color{blue}{B}\right) \]
      2. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(\frac{-1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}} + 1\right) - x\right), B\right) \]
      3. associate--l+N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{-1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}} + \left(1 - x\right)\right), B\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\left(\frac{-1}{2} \cdot \frac{2 + 2 \cdot x}{{F}^{2}}\right), \left(1 - x\right)\right), B\right) \]
      5. associate-*r/N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\left(\frac{\frac{-1}{2} \cdot \left(2 + 2 \cdot x\right)}{{F}^{2}}\right), \left(1 - x\right)\right), B\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(\frac{-1}{2} \cdot \left(2 + 2 \cdot x\right)\right), \left({F}^{2}\right)\right), \left(1 - x\right)\right), B\right) \]
      7. distribute-lft-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(\frac{-1}{2} \cdot 2 + \frac{-1}{2} \cdot \left(2 \cdot x\right)\right), \left({F}^{2}\right)\right), \left(1 - x\right)\right), B\right) \]
      8. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(-1 + \frac{-1}{2} \cdot \left(2 \cdot x\right)\right), \left({F}^{2}\right)\right), \left(1 - x\right)\right), B\right) \]
      9. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(-1 + \left(\frac{-1}{2} \cdot 2\right) \cdot x\right), \left({F}^{2}\right)\right), \left(1 - x\right)\right), B\right) \]
      10. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(-1 + -1 \cdot x\right), \left({F}^{2}\right)\right), \left(1 - x\right)\right), B\right) \]
      11. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(-1 + \left(\mathsf{neg}\left(x\right)\right)\right), \left({F}^{2}\right)\right), \left(1 - x\right)\right), B\right) \]
      12. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(-1, \left(\mathsf{neg}\left(x\right)\right)\right), \left({F}^{2}\right)\right), \left(1 - x\right)\right), B\right) \]
      13. neg-sub0N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(-1, \left(0 - x\right)\right), \left({F}^{2}\right)\right), \left(1 - x\right)\right), B\right) \]
      14. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(-1, \mathsf{\_.f64}\left(0, x\right)\right), \left({F}^{2}\right)\right), \left(1 - x\right)\right), B\right) \]
      15. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(-1, \mathsf{\_.f64}\left(0, x\right)\right), \left(F \cdot F\right)\right), \left(1 - x\right)\right), B\right) \]
      16. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(-1, \mathsf{\_.f64}\left(0, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \left(1 - x\right)\right), B\right) \]
      17. --lowering--.f6445.5%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(-1, \mathsf{\_.f64}\left(0, x\right)\right), \mathsf{*.f64}\left(F, F\right)\right), \mathsf{\_.f64}\left(1, x\right)\right), B\right) \]
    13. Simplified45.5%

      \[\leadsto \color{blue}{\frac{\frac{-1 + \left(0 - x\right)}{F \cdot F} + \left(1 - x\right)}{B}} \]
    14. Step-by-step derivation
      1. associate-/r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\left(\frac{\frac{-1 + \left(0 - x\right)}{F}}{F}\right), \mathsf{\_.f64}\left(1, x\right)\right), B\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(\frac{-1 + \left(0 - x\right)}{F}\right), F\right), \mathsf{\_.f64}\left(1, x\right)\right), B\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(-1 + \left(0 - x\right)\right), F\right), F\right), \mathsf{\_.f64}\left(1, x\right)\right), B\right) \]
      4. associate-+r-N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(-1 + 0\right) - x\right), F\right), F\right), \mathsf{\_.f64}\left(1, x\right)\right), B\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(-1 - x\right), F\right), F\right), \mathsf{\_.f64}\left(1, x\right)\right), B\right) \]
      6. --lowering--.f6445.5%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(-1, x\right), F\right), F\right), \mathsf{\_.f64}\left(1, x\right)\right), B\right) \]
    15. Applied egg-rr45.5%

      \[\leadsto \frac{\color{blue}{\frac{\frac{-1 - x}{F}}{F}} + \left(1 - x\right)}{B} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification43.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -7.2 \cdot 10^{-17}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 0.0006:\\ \;\;\;\;\frac{x}{0 - B}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\frac{-1 - x}{F}}{F} + \left(1 - x\right)}{B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 27: 43.8% accurate, 19.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -7.2 \cdot 10^{-17}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 1.75 \cdot 10^{-125}:\\ \;\;\;\;\frac{x}{0 - B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - \frac{x}{B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (if (<= F -7.2e-17)
   (/ (- -1.0 x) B)
   (if (<= F 1.75e-125) (/ x (- 0.0 B)) (- (/ 1.0 B) (/ x B)))))
double code(double F, double B, double x) {
	double tmp;
	if (F <= -7.2e-17) {
		tmp = (-1.0 - x) / B;
	} else if (F <= 1.75e-125) {
		tmp = x / (0.0 - B);
	} else {
		tmp = (1.0 / B) - (x / B);
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: tmp
    if (f <= (-7.2d-17)) then
        tmp = ((-1.0d0) - x) / b
    else if (f <= 1.75d-125) then
        tmp = x / (0.0d0 - b)
    else
        tmp = (1.0d0 / b) - (x / b)
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double tmp;
	if (F <= -7.2e-17) {
		tmp = (-1.0 - x) / B;
	} else if (F <= 1.75e-125) {
		tmp = x / (0.0 - B);
	} else {
		tmp = (1.0 / B) - (x / B);
	}
	return tmp;
}
def code(F, B, x):
	tmp = 0
	if F <= -7.2e-17:
		tmp = (-1.0 - x) / B
	elif F <= 1.75e-125:
		tmp = x / (0.0 - B)
	else:
		tmp = (1.0 / B) - (x / B)
	return tmp
function code(F, B, x)
	tmp = 0.0
	if (F <= -7.2e-17)
		tmp = Float64(Float64(-1.0 - x) / B);
	elseif (F <= 1.75e-125)
		tmp = Float64(x / Float64(0.0 - B));
	else
		tmp = Float64(Float64(1.0 / B) - Float64(x / B));
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	tmp = 0.0;
	if (F <= -7.2e-17)
		tmp = (-1.0 - x) / B;
	elseif (F <= 1.75e-125)
		tmp = x / (0.0 - B);
	else
		tmp = (1.0 / B) - (x / B);
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := If[LessEqual[F, -7.2e-17], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.75e-125], N[(x / N[(0.0 - B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;F \leq -7.2 \cdot 10^{-17}:\\
\;\;\;\;\frac{-1 - x}{B}\\

\mathbf{elif}\;F \leq 1.75 \cdot 10^{-125}:\\
\;\;\;\;\frac{x}{0 - B}\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{B}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if F < -7.1999999999999999e-17

    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. Add Preprocessing
    3. Taylor expanded in B around 0

      \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x\right), \color{blue}{B}\right) \]
      2. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right), x\right), B\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right), x\right), B\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\left(\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}\right)\right)\right), x\right), B\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(2 + \left(2 \cdot x + {F}^{2}\right)\right)\right)\right)\right), x\right), B\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left(2 \cdot x + {F}^{2}\right)\right)\right)\right)\right), x\right), B\right) \]
      7. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left({F}^{2} + 2 \cdot x\right)\right)\right)\right)\right), x\right), B\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left({F}^{2}\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left(F \cdot F\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      11. *-lowering-*.f6441.8%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \mathsf{*.f64}\left(2, x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
    5. Simplified41.8%

      \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(F \cdot F + 2 \cdot x\right)}} - x}{B}} \]
    6. Taylor expanded in F around -inf

      \[\leadsto \color{blue}{-1 \cdot \frac{1 + x}{B}} \]
    7. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{-1 \cdot \left(1 + x\right)}{\color{blue}{B}} \]
      2. mul-1-negN/A

        \[\leadsto \frac{\mathsf{neg}\left(\left(1 + x\right)\right)}{B} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\mathsf{neg}\left(\left(1 + x\right)\right)\right), \color{blue}{B}\right) \]
      4. distribute-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(\mathsf{neg}\left(1\right)\right) + \left(\mathsf{neg}\left(x\right)\right)\right), B\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\left(-1 + \left(\mathsf{neg}\left(x\right)\right)\right), B\right) \]
      6. unsub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\left(-1 - x\right), B\right) \]
      7. --lowering--.f6450.8%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(-1, x\right), B\right) \]
    8. Simplified50.8%

      \[\leadsto \color{blue}{\frac{-1 - x}{B}} \]

    if -7.1999999999999999e-17 < F < 1.74999999999999999e-125

    1. Initial program 99.6%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in B around 0

      \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x\right), \color{blue}{B}\right) \]
      2. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right), x\right), B\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right), x\right), B\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\left(\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}\right)\right)\right), x\right), B\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(2 + \left(2 \cdot x + {F}^{2}\right)\right)\right)\right)\right), x\right), B\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left(2 \cdot x + {F}^{2}\right)\right)\right)\right)\right), x\right), B\right) \]
      7. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left({F}^{2} + 2 \cdot x\right)\right)\right)\right)\right), x\right), B\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left({F}^{2}\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left(F \cdot F\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      11. *-lowering-*.f6457.5%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \mathsf{*.f64}\left(2, x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
    5. Simplified57.5%

      \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(F \cdot F + 2 \cdot x\right)}} - x}{B}} \]
    6. Taylor expanded in F around 0

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{B}} \]
    7. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{-1 \cdot x}{\color{blue}{B}} \]
      2. mul-1-negN/A

        \[\leadsto \frac{\mathsf{neg}\left(x\right)}{B} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\mathsf{neg}\left(x\right)\right), \color{blue}{B}\right) \]
      4. neg-sub0N/A

        \[\leadsto \mathsf{/.f64}\left(\left(0 - x\right), B\right) \]
      5. --lowering--.f6441.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, x\right), B\right) \]
    8. Simplified41.4%

      \[\leadsto \color{blue}{\frac{0 - x}{B}} \]

    if 1.74999999999999999e-125 < F

    1. Initial program 72.9%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} + \color{blue}{\left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)} \]
      2. unsub-negN/A

        \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} - \color{blue}{x \cdot \frac{1}{\tan B}} \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \color{blue}{\left(x \cdot \frac{1}{\tan B}\right)}\right) \]
    3. Simplified85.6%

      \[\leadsto \color{blue}{\frac{F \cdot {\left(F \cdot F + \left(2 + x \cdot 2\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Add Preprocessing
    5. Taylor expanded in F around inf

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(\frac{1}{\sin B}\right)}, \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(1, \sin B\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      2. sin-lowering-sin.f6484.8%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    7. Simplified84.8%

      \[\leadsto \color{blue}{\frac{1}{\sin B}} - \frac{x}{\tan B} \]
    8. Taylor expanded in B around 0

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(\frac{1}{B}\right)}, \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    9. Step-by-step derivation
      1. /-lowering-/.f6465.2%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    10. Simplified65.2%

      \[\leadsto \color{blue}{\frac{1}{B}} - \frac{x}{\tan B} \]
    11. Taylor expanded in B around 0

      \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(1, B\right), \color{blue}{\left(\frac{x}{B}\right)}\right) \]
    12. Step-by-step derivation
      1. /-lowering-/.f6440.5%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{/.f64}\left(x, \color{blue}{B}\right)\right) \]
    13. Simplified40.5%

      \[\leadsto \frac{1}{B} - \color{blue}{\frac{x}{B}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification43.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -7.2 \cdot 10^{-17}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 1.75 \cdot 10^{-125}:\\ \;\;\;\;\frac{x}{0 - B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B} - \frac{x}{B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 28: 43.8% accurate, 21.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -7.2 \cdot 10^{-17}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 1.8 \cdot 10^{-125}:\\ \;\;\;\;\frac{x}{0 - B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (if (<= F -7.2e-17)
   (/ (- -1.0 x) B)
   (if (<= F 1.8e-125) (/ x (- 0.0 B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
	double tmp;
	if (F <= -7.2e-17) {
		tmp = (-1.0 - x) / B;
	} else if (F <= 1.8e-125) {
		tmp = x / (0.0 - B);
	} else {
		tmp = (1.0 - x) / B;
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: tmp
    if (f <= (-7.2d-17)) then
        tmp = ((-1.0d0) - x) / b
    else if (f <= 1.8d-125) then
        tmp = x / (0.0d0 - b)
    else
        tmp = (1.0d0 - x) / b
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double tmp;
	if (F <= -7.2e-17) {
		tmp = (-1.0 - x) / B;
	} else if (F <= 1.8e-125) {
		tmp = x / (0.0 - B);
	} else {
		tmp = (1.0 - x) / B;
	}
	return tmp;
}
def code(F, B, x):
	tmp = 0
	if F <= -7.2e-17:
		tmp = (-1.0 - x) / B
	elif F <= 1.8e-125:
		tmp = x / (0.0 - B)
	else:
		tmp = (1.0 - x) / B
	return tmp
function code(F, B, x)
	tmp = 0.0
	if (F <= -7.2e-17)
		tmp = Float64(Float64(-1.0 - x) / B);
	elseif (F <= 1.8e-125)
		tmp = Float64(x / Float64(0.0 - B));
	else
		tmp = Float64(Float64(1.0 - x) / B);
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	tmp = 0.0;
	if (F <= -7.2e-17)
		tmp = (-1.0 - x) / B;
	elseif (F <= 1.8e-125)
		tmp = x / (0.0 - B);
	else
		tmp = (1.0 - x) / B;
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := If[LessEqual[F, -7.2e-17], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.8e-125], N[(x / N[(0.0 - B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;F \leq -7.2 \cdot 10^{-17}:\\
\;\;\;\;\frac{-1 - x}{B}\\

\mathbf{elif}\;F \leq 1.8 \cdot 10^{-125}:\\
\;\;\;\;\frac{x}{0 - B}\\

\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if F < -7.1999999999999999e-17

    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. Add Preprocessing
    3. Taylor expanded in B around 0

      \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x\right), \color{blue}{B}\right) \]
      2. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right), x\right), B\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right), x\right), B\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\left(\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}\right)\right)\right), x\right), B\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(2 + \left(2 \cdot x + {F}^{2}\right)\right)\right)\right)\right), x\right), B\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left(2 \cdot x + {F}^{2}\right)\right)\right)\right)\right), x\right), B\right) \]
      7. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left({F}^{2} + 2 \cdot x\right)\right)\right)\right)\right), x\right), B\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left({F}^{2}\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left(F \cdot F\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      11. *-lowering-*.f6441.8%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \mathsf{*.f64}\left(2, x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
    5. Simplified41.8%

      \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(F \cdot F + 2 \cdot x\right)}} - x}{B}} \]
    6. Taylor expanded in F around -inf

      \[\leadsto \color{blue}{-1 \cdot \frac{1 + x}{B}} \]
    7. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{-1 \cdot \left(1 + x\right)}{\color{blue}{B}} \]
      2. mul-1-negN/A

        \[\leadsto \frac{\mathsf{neg}\left(\left(1 + x\right)\right)}{B} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\mathsf{neg}\left(\left(1 + x\right)\right)\right), \color{blue}{B}\right) \]
      4. distribute-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(\mathsf{neg}\left(1\right)\right) + \left(\mathsf{neg}\left(x\right)\right)\right), B\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\left(-1 + \left(\mathsf{neg}\left(x\right)\right)\right), B\right) \]
      6. unsub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\left(-1 - x\right), B\right) \]
      7. --lowering--.f6450.8%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(-1, x\right), B\right) \]
    8. Simplified50.8%

      \[\leadsto \color{blue}{\frac{-1 - x}{B}} \]

    if -7.1999999999999999e-17 < F < 1.8000000000000001e-125

    1. Initial program 99.6%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in B around 0

      \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x\right), \color{blue}{B}\right) \]
      2. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right), x\right), B\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right), x\right), B\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\left(\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}\right)\right)\right), x\right), B\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(2 + \left(2 \cdot x + {F}^{2}\right)\right)\right)\right)\right), x\right), B\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left(2 \cdot x + {F}^{2}\right)\right)\right)\right)\right), x\right), B\right) \]
      7. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left({F}^{2} + 2 \cdot x\right)\right)\right)\right)\right), x\right), B\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left({F}^{2}\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left(F \cdot F\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      11. *-lowering-*.f6457.5%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \mathsf{*.f64}\left(2, x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
    5. Simplified57.5%

      \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(F \cdot F + 2 \cdot x\right)}} - x}{B}} \]
    6. Taylor expanded in F around 0

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{B}} \]
    7. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{-1 \cdot x}{\color{blue}{B}} \]
      2. mul-1-negN/A

        \[\leadsto \frac{\mathsf{neg}\left(x\right)}{B} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\mathsf{neg}\left(x\right)\right), \color{blue}{B}\right) \]
      4. neg-sub0N/A

        \[\leadsto \mathsf{/.f64}\left(\left(0 - x\right), B\right) \]
      5. --lowering--.f6441.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, x\right), B\right) \]
    8. Simplified41.4%

      \[\leadsto \color{blue}{\frac{0 - x}{B}} \]

    if 1.8000000000000001e-125 < F

    1. Initial program 72.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 B around 0

      \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x\right), \color{blue}{B}\right) \]
      2. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right), x\right), B\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right), x\right), B\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\left(\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}\right)\right)\right), x\right), B\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(2 + \left(2 \cdot x + {F}^{2}\right)\right)\right)\right)\right), x\right), B\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left(2 \cdot x + {F}^{2}\right)\right)\right)\right)\right), x\right), B\right) \]
      7. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left({F}^{2} + 2 \cdot x\right)\right)\right)\right)\right), x\right), B\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left({F}^{2}\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left(F \cdot F\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      11. *-lowering-*.f6442.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \mathsf{*.f64}\left(2, x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
    5. Simplified42.6%

      \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(F \cdot F + 2 \cdot x\right)}} - x}{B}} \]
    6. Taylor expanded in F around inf

      \[\leadsto \color{blue}{\frac{1 - x}{B}} \]
    7. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(1 - x\right), \color{blue}{B}\right) \]
      2. --lowering--.f6440.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(1, x\right), B\right) \]
    8. Simplified40.4%

      \[\leadsto \color{blue}{\frac{1 - x}{B}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification43.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -7.2 \cdot 10^{-17}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 1.8 \cdot 10^{-125}:\\ \;\;\;\;\frac{x}{0 - B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 29: 36.9% accurate, 32.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -2.3 \cdot 10^{-14}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{0 - B}\\ \end{array} \end{array} \]
(FPCore (F B x)
 :precision binary64
 (if (<= F -2.3e-14) (/ (- -1.0 x) B) (/ x (- 0.0 B))))
double code(double F, double B, double x) {
	double tmp;
	if (F <= -2.3e-14) {
		tmp = (-1.0 - x) / B;
	} else {
		tmp = x / (0.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 <= (-2.3d-14)) then
        tmp = ((-1.0d0) - x) / b
    else
        tmp = x / (0.0d0 - b)
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double tmp;
	if (F <= -2.3e-14) {
		tmp = (-1.0 - x) / B;
	} else {
		tmp = x / (0.0 - B);
	}
	return tmp;
}
def code(F, B, x):
	tmp = 0
	if F <= -2.3e-14:
		tmp = (-1.0 - x) / B
	else:
		tmp = x / (0.0 - B)
	return tmp
function code(F, B, x)
	tmp = 0.0
	if (F <= -2.3e-14)
		tmp = Float64(Float64(-1.0 - x) / B);
	else
		tmp = Float64(x / Float64(0.0 - B));
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	tmp = 0.0;
	if (F <= -2.3e-14)
		tmp = (-1.0 - x) / B;
	else
		tmp = x / (0.0 - B);
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := If[LessEqual[F, -2.3e-14], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[(x / N[(0.0 - B), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.3 \cdot 10^{-14}:\\
\;\;\;\;\frac{-1 - x}{B}\\

\mathbf{else}:\\
\;\;\;\;\frac{x}{0 - B}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if F < -2.29999999999999998e-14

    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. Add Preprocessing
    3. Taylor expanded in B around 0

      \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x\right), \color{blue}{B}\right) \]
      2. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right), x\right), B\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right), x\right), B\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\left(\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}\right)\right)\right), x\right), B\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(2 + \left(2 \cdot x + {F}^{2}\right)\right)\right)\right)\right), x\right), B\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left(2 \cdot x + {F}^{2}\right)\right)\right)\right)\right), x\right), B\right) \]
      7. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left({F}^{2} + 2 \cdot x\right)\right)\right)\right)\right), x\right), B\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left({F}^{2}\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left(F \cdot F\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      11. *-lowering-*.f6441.8%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \mathsf{*.f64}\left(2, x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
    5. Simplified41.8%

      \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(F \cdot F + 2 \cdot x\right)}} - x}{B}} \]
    6. Taylor expanded in F around -inf

      \[\leadsto \color{blue}{-1 \cdot \frac{1 + x}{B}} \]
    7. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{-1 \cdot \left(1 + x\right)}{\color{blue}{B}} \]
      2. mul-1-negN/A

        \[\leadsto \frac{\mathsf{neg}\left(\left(1 + x\right)\right)}{B} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\mathsf{neg}\left(\left(1 + x\right)\right)\right), \color{blue}{B}\right) \]
      4. distribute-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(\mathsf{neg}\left(1\right)\right) + \left(\mathsf{neg}\left(x\right)\right)\right), B\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\left(-1 + \left(\mathsf{neg}\left(x\right)\right)\right), B\right) \]
      6. unsub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\left(-1 - x\right), B\right) \]
      7. --lowering--.f6450.8%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(-1, x\right), B\right) \]
    8. Simplified50.8%

      \[\leadsto \color{blue}{\frac{-1 - x}{B}} \]

    if -2.29999999999999998e-14 < F

    1. Initial program 84.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 B around 0

      \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x\right), \color{blue}{B}\right) \]
      2. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right), x\right), B\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right), x\right), B\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\left(\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}\right)\right)\right), x\right), B\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(2 + \left(2 \cdot x + {F}^{2}\right)\right)\right)\right)\right), x\right), B\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left(2 \cdot x + {F}^{2}\right)\right)\right)\right)\right), x\right), B\right) \]
      7. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left({F}^{2} + 2 \cdot x\right)\right)\right)\right)\right), x\right), B\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left({F}^{2}\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left(F \cdot F\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      11. *-lowering-*.f6449.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \mathsf{*.f64}\left(2, x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
    5. Simplified49.4%

      \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(F \cdot F + 2 \cdot x\right)}} - x}{B}} \]
    6. Taylor expanded in F around 0

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{B}} \]
    7. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{-1 \cdot x}{\color{blue}{B}} \]
      2. mul-1-negN/A

        \[\leadsto \frac{\mathsf{neg}\left(x\right)}{B} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\mathsf{neg}\left(x\right)\right), \color{blue}{B}\right) \]
      4. neg-sub0N/A

        \[\leadsto \mathsf{/.f64}\left(\left(0 - x\right), B\right) \]
      5. --lowering--.f6433.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, x\right), B\right) \]
    8. Simplified33.0%

      \[\leadsto \color{blue}{\frac{0 - x}{B}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification38.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -2.3 \cdot 10^{-14}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{0 - B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 30: 17.6% accurate, 40.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq 1.45 \cdot 10^{-67}:\\ \;\;\;\;\frac{-1}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{B}\\ \end{array} \end{array} \]
(FPCore (F B x) :precision binary64 (if (<= F 1.45e-67) (/ -1.0 B) (/ 1.0 B)))
double code(double F, double B, double x) {
	double tmp;
	if (F <= 1.45e-67) {
		tmp = -1.0 / B;
	} else {
		tmp = 1.0 / B;
	}
	return tmp;
}
real(8) function code(f, b, x)
    real(8), intent (in) :: f
    real(8), intent (in) :: b
    real(8), intent (in) :: x
    real(8) :: tmp
    if (f <= 1.45d-67) then
        tmp = (-1.0d0) / b
    else
        tmp = 1.0d0 / b
    end if
    code = tmp
end function
public static double code(double F, double B, double x) {
	double tmp;
	if (F <= 1.45e-67) {
		tmp = -1.0 / B;
	} else {
		tmp = 1.0 / B;
	}
	return tmp;
}
def code(F, B, x):
	tmp = 0
	if F <= 1.45e-67:
		tmp = -1.0 / B
	else:
		tmp = 1.0 / B
	return tmp
function code(F, B, x)
	tmp = 0.0
	if (F <= 1.45e-67)
		tmp = Float64(-1.0 / B);
	else
		tmp = Float64(1.0 / B);
	end
	return tmp
end
function tmp_2 = code(F, B, x)
	tmp = 0.0;
	if (F <= 1.45e-67)
		tmp = -1.0 / B;
	else
		tmp = 1.0 / B;
	end
	tmp_2 = tmp;
end
code[F_, B_, x_] := If[LessEqual[F, 1.45e-67], N[(-1.0 / B), $MachinePrecision], N[(1.0 / B), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;F \leq 1.45 \cdot 10^{-67}:\\
\;\;\;\;\frac{-1}{B}\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{B}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if F < 1.45000000000000002e-67

    1. Initial program 83.7%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in B around 0

      \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x\right), \color{blue}{B}\right) \]
      2. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right), x\right), B\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right), x\right), B\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\left(\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}\right)\right)\right), x\right), B\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(2 + \left(2 \cdot x + {F}^{2}\right)\right)\right)\right)\right), x\right), B\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left(2 \cdot x + {F}^{2}\right)\right)\right)\right)\right), x\right), B\right) \]
      7. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left({F}^{2} + 2 \cdot x\right)\right)\right)\right)\right), x\right), B\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left({F}^{2}\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left(F \cdot F\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
      11. *-lowering-*.f6451.2%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \mathsf{*.f64}\left(2, x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
    5. Simplified51.2%

      \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(F \cdot F + 2 \cdot x\right)}} - x}{B}} \]
    6. Taylor expanded in F around -inf

      \[\leadsto \color{blue}{-1 \cdot \frac{1 + x}{B}} \]
    7. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{-1 \cdot \left(1 + x\right)}{\color{blue}{B}} \]
      2. mul-1-negN/A

        \[\leadsto \frac{\mathsf{neg}\left(\left(1 + x\right)\right)}{B} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\mathsf{neg}\left(\left(1 + x\right)\right)\right), \color{blue}{B}\right) \]
      4. distribute-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(\mathsf{neg}\left(1\right)\right) + \left(\mathsf{neg}\left(x\right)\right)\right), B\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\left(-1 + \left(\mathsf{neg}\left(x\right)\right)\right), B\right) \]
      6. unsub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\left(-1 - x\right), B\right) \]
      7. --lowering--.f6433.5%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(-1, x\right), B\right) \]
    8. Simplified33.5%

      \[\leadsto \color{blue}{\frac{-1 - x}{B}} \]
    9. Taylor expanded in x around 0

      \[\leadsto \color{blue}{\frac{-1}{B}} \]
    10. Step-by-step derivation
      1. /-lowering-/.f6415.9%

        \[\leadsto \mathsf{/.f64}\left(-1, \color{blue}{B}\right) \]
    11. Simplified15.9%

      \[\leadsto \color{blue}{\frac{-1}{B}} \]

    if 1.45000000000000002e-67 < F

    1. Initial program 69.9%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} + \color{blue}{\left(\mathsf{neg}\left(x \cdot \frac{1}{\tan B}\right)\right)} \]
      2. unsub-negN/A

        \[\leadsto \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} - \color{blue}{x \cdot \frac{1}{\tan B}} \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right), \color{blue}{\left(x \cdot \frac{1}{\tan B}\right)}\right) \]
    3. Simplified84.0%

      \[\leadsto \color{blue}{\frac{F \cdot {\left(F \cdot F + \left(2 + x \cdot 2\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}} \]
    4. Add Preprocessing
    5. Taylor expanded in F around inf

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(\frac{1}{\sin B}\right)}, \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(1, \sin B\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      2. sin-lowering-sin.f6488.5%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    7. Simplified88.5%

      \[\leadsto \color{blue}{\frac{1}{\sin B}} - \frac{x}{\tan B} \]
    8. Taylor expanded in B around 0

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(\frac{1}{B}\right)}, \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    9. Step-by-step derivation
      1. /-lowering-/.f6464.4%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(1, B\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    10. Simplified64.4%

      \[\leadsto \color{blue}{\frac{1}{B}} - \frac{x}{\tan B} \]
    11. Taylor expanded in x around 0

      \[\leadsto \color{blue}{\frac{1}{B}} \]
    12. Step-by-step derivation
      1. /-lowering-/.f6418.8%

        \[\leadsto \mathsf{/.f64}\left(1, \color{blue}{B}\right) \]
    13. Simplified18.8%

      \[\leadsto \color{blue}{\frac{1}{B}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 31: 29.6% accurate, 64.8× speedup?

\[\begin{array}{l} \\ \frac{-1 - x}{B} \end{array} \]
(FPCore (F B x) :precision binary64 (/ (- -1.0 x) B))
double code(double F, double B, double x) {
	return (-1.0 - x) / 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) - x) / b
end function
public static double code(double F, double B, double x) {
	return (-1.0 - x) / B;
}
def code(F, B, x):
	return (-1.0 - x) / B
function code(F, B, x)
	return Float64(Float64(-1.0 - x) / B)
end
function tmp = code(F, B, x)
	tmp = (-1.0 - x) / B;
end
code[F_, B_, x_] := N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision]
\begin{array}{l}

\\
\frac{-1 - x}{B}
\end{array}
Derivation
  1. Initial program 78.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 B around 0

    \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
  4. Step-by-step derivation
    1. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x\right), \color{blue}{B}\right) \]
    2. --lowering--.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right), x\right), B\right) \]
    3. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right), x\right), B\right) \]
    4. sqrt-lowering-sqrt.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\left(\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}\right)\right)\right), x\right), B\right) \]
    5. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(2 + \left(2 \cdot x + {F}^{2}\right)\right)\right)\right)\right), x\right), B\right) \]
    6. +-lowering-+.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left(2 \cdot x + {F}^{2}\right)\right)\right)\right)\right), x\right), B\right) \]
    7. +-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left({F}^{2} + 2 \cdot x\right)\right)\right)\right)\right), x\right), B\right) \]
    8. +-lowering-+.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left({F}^{2}\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
    9. unpow2N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left(F \cdot F\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
    10. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
    11. *-lowering-*.f6447.1%

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \mathsf{*.f64}\left(2, x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
  5. Simplified47.1%

    \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(F \cdot F + 2 \cdot x\right)}} - x}{B}} \]
  6. Taylor expanded in F around -inf

    \[\leadsto \color{blue}{-1 \cdot \frac{1 + x}{B}} \]
  7. Step-by-step derivation
    1. associate-*r/N/A

      \[\leadsto \frac{-1 \cdot \left(1 + x\right)}{\color{blue}{B}} \]
    2. mul-1-negN/A

      \[\leadsto \frac{\mathsf{neg}\left(\left(1 + x\right)\right)}{B} \]
    3. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\left(\mathsf{neg}\left(\left(1 + x\right)\right)\right), \color{blue}{B}\right) \]
    4. distribute-neg-inN/A

      \[\leadsto \mathsf{/.f64}\left(\left(\left(\mathsf{neg}\left(1\right)\right) + \left(\mathsf{neg}\left(x\right)\right)\right), B\right) \]
    5. metadata-evalN/A

      \[\leadsto \mathsf{/.f64}\left(\left(-1 + \left(\mathsf{neg}\left(x\right)\right)\right), B\right) \]
    6. unsub-negN/A

      \[\leadsto \mathsf{/.f64}\left(\left(-1 - x\right), B\right) \]
    7. --lowering--.f6429.9%

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(-1, x\right), B\right) \]
  8. Simplified29.9%

    \[\leadsto \color{blue}{\frac{-1 - x}{B}} \]
  9. Add Preprocessing

Alternative 32: 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 78.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 B around 0

    \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x}{B}} \]
  4. Step-by-step derivation
    1. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}} - x\right), \color{blue}{B}\right) \]
    2. --lowering--.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(F \cdot \sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right), x\right), B\right) \]
    3. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \left(\sqrt{\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}}\right)\right), x\right), B\right) \]
    4. sqrt-lowering-sqrt.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\left(\frac{1}{2 + \left(2 \cdot x + {F}^{2}\right)}\right)\right)\right), x\right), B\right) \]
    5. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(2 + \left(2 \cdot x + {F}^{2}\right)\right)\right)\right)\right), x\right), B\right) \]
    6. +-lowering-+.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left(2 \cdot x + {F}^{2}\right)\right)\right)\right)\right), x\right), B\right) \]
    7. +-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left({F}^{2} + 2 \cdot x\right)\right)\right)\right)\right), x\right), B\right) \]
    8. +-lowering-+.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left({F}^{2}\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
    9. unpow2N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\left(F \cdot F\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
    10. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \left(2 \cdot x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
    11. *-lowering-*.f6447.1%

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), \mathsf{*.f64}\left(2, x\right)\right)\right)\right)\right)\right), x\right), B\right) \]
  5. Simplified47.1%

    \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + \left(F \cdot F + 2 \cdot x\right)}} - x}{B}} \]
  6. Taylor expanded in F around -inf

    \[\leadsto \color{blue}{-1 \cdot \frac{1 + x}{B}} \]
  7. Step-by-step derivation
    1. associate-*r/N/A

      \[\leadsto \frac{-1 \cdot \left(1 + x\right)}{\color{blue}{B}} \]
    2. mul-1-negN/A

      \[\leadsto \frac{\mathsf{neg}\left(\left(1 + x\right)\right)}{B} \]
    3. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\left(\mathsf{neg}\left(\left(1 + x\right)\right)\right), \color{blue}{B}\right) \]
    4. distribute-neg-inN/A

      \[\leadsto \mathsf{/.f64}\left(\left(\left(\mathsf{neg}\left(1\right)\right) + \left(\mathsf{neg}\left(x\right)\right)\right), B\right) \]
    5. metadata-evalN/A

      \[\leadsto \mathsf{/.f64}\left(\left(-1 + \left(\mathsf{neg}\left(x\right)\right)\right), B\right) \]
    6. unsub-negN/A

      \[\leadsto \mathsf{/.f64}\left(\left(-1 - x\right), B\right) \]
    7. --lowering--.f6429.9%

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(-1, x\right), B\right) \]
  8. Simplified29.9%

    \[\leadsto \color{blue}{\frac{-1 - x}{B}} \]
  9. Taylor expanded in x around 0

    \[\leadsto \color{blue}{\frac{-1}{B}} \]
  10. Step-by-step derivation
    1. /-lowering-/.f6411.3%

      \[\leadsto \mathsf{/.f64}\left(-1, \color{blue}{B}\right) \]
  11. Simplified11.3%

    \[\leadsto \color{blue}{\frac{-1}{B}} \]
  12. Add Preprocessing

Reproduce

?
herbie shell --seed 2024163 
(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))))))