VandenBroeck and Keller, Equation (23)

Percentage Accurate: 76.0% → 99.7%
Time: 21.0s
Alternatives: 33
Speedup: 1.4×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 33 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.0% accurate, 1.0× speedup?

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

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

Alternative 1: 99.7% accurate, 1.0× speedup?

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

\mathbf{elif}\;F \leq 200000000:\\
\;\;\;\;\frac{\frac{{\left(F \cdot F + 2 \cdot \left(x + 1\right)\right)}^{-0.5}}{\sin B}}{\frac{1}{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 < -9e18

    1. Initial program 56.3%

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

      \[\leadsto \color{blue}{-1 \cdot \left(\frac{1}{\sin B} + \frac{x \cdot \cos B}{\sin B}\right)} \]
    4. Step-by-step derivation
      1. distribute-lft-inN/A

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

        \[\leadsto -1 \cdot \frac{1}{\sin B} + \left(\mathsf{neg}\left(\frac{x \cdot \cos B}{\sin B}\right)\right) \]
      3. unsub-negN/A

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\mathsf{neg}\left(\frac{1}{\sin B}\right)\right), \color{blue}{\left(\frac{x \cdot \cos B}{\sin B}\right)}\right) \]
      6. distribute-neg-fracN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{\mathsf{neg}\left(1\right)}{\sin B}\right), \left(\frac{\color{blue}{x \cdot \cos B}}{\sin B}\right)\right) \]
      7. metadata-evalN/A

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

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

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{cos.f64}\left(B\right)\right), \sin B\right)\right) \]
      13. sin-lowering-sin.f6499.8%

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

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

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

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(x, \mathsf{sin.f64}\left(B\right)\right), \mathsf{cos.f64}\left(B\right)\right)\right) \]
    7. Applied egg-rr99.8%

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

    if -9e18 < F < 2e8

    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. clear-numN/A

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

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

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

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1}{\frac{\frac{\sin B}{F}}{{\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) \]
      8. metadata-evalN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{1}{\frac{\frac{\sin B}{F}}{{\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) \]
      9. clear-numN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{{\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) \]
      10. div-invN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{{\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) \]
      11. associate-/r*N/A

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

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

    if 2e8 < F

    1. Initial program 56.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. Simplified74.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} \]
  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 -2 \cdot 10^{+23}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\sin B} \cdot \cos B\\ \mathbf{elif}\;F \leq 135000000:\\ \;\;\;\;F \cdot \frac{{\left(F \cdot F + 2 \cdot \left(x + 1\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 -2e+23)
     (- (/ -1.0 (sin B)) (* (/ x (sin B)) (cos B)))
     (if (<= F 135000000.0)
       (- (* F (/ (pow (+ (* F F) (* 2.0 (+ x 1.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 <= -2e+23) {
		tmp = (-1.0 / sin(B)) - ((x / sin(B)) * cos(B));
	} else if (F <= 135000000.0) {
		tmp = (F * (pow(((F * F) + (2.0 * (x + 1.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 <= (-2d+23)) then
        tmp = ((-1.0d0) / sin(b)) - ((x / sin(b)) * cos(b))
    else if (f <= 135000000.0d0) then
        tmp = (f * ((((f * f) + (2.0d0 * (x + 1.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 <= -2e+23) {
		tmp = (-1.0 / Math.sin(B)) - ((x / Math.sin(B)) * Math.cos(B));
	} else if (F <= 135000000.0) {
		tmp = (F * (Math.pow(((F * F) + (2.0 * (x + 1.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 <= -2e+23:
		tmp = (-1.0 / math.sin(B)) - ((x / math.sin(B)) * math.cos(B))
	elif F <= 135000000.0:
		tmp = (F * (math.pow(((F * F) + (2.0 * (x + 1.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 <= -2e+23)
		tmp = Float64(Float64(-1.0 / sin(B)) - Float64(Float64(x / sin(B)) * cos(B)));
	elseif (F <= 135000000.0)
		tmp = Float64(Float64(F * Float64((Float64(Float64(F * F) + Float64(2.0 * Float64(x + 1.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 <= -2e+23)
		tmp = (-1.0 / sin(B)) - ((x / sin(B)) * cos(B));
	elseif (F <= 135000000.0)
		tmp = (F * ((((F * F) + (2.0 * (x + 1.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, -2e+23], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(N[(x / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 135000000.0], N[(N[(F * N[(N[Power[N[(N[(F * F), $MachinePrecision] + N[(2.0 * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}

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

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

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


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

    1. Initial program 56.3%

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

      \[\leadsto \color{blue}{-1 \cdot \left(\frac{1}{\sin B} + \frac{x \cdot \cos B}{\sin B}\right)} \]
    4. Step-by-step derivation
      1. distribute-lft-inN/A

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

        \[\leadsto -1 \cdot \frac{1}{\sin B} + \left(\mathsf{neg}\left(\frac{x \cdot \cos B}{\sin B}\right)\right) \]
      3. unsub-negN/A

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\mathsf{neg}\left(\frac{1}{\sin B}\right)\right), \color{blue}{\left(\frac{x \cdot \cos B}{\sin B}\right)}\right) \]
      6. distribute-neg-fracN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{\mathsf{neg}\left(1\right)}{\sin B}\right), \left(\frac{\color{blue}{x \cdot \cos B}}{\sin B}\right)\right) \]
      7. metadata-evalN/A

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

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

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{cos.f64}\left(B\right)\right), \sin B\right)\right) \]
      13. sin-lowering-sin.f6499.8%

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

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

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

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(x, \mathsf{sin.f64}\left(B\right)\right), \mathsf{cos.f64}\left(B\right)\right)\right) \]
    7. Applied egg-rr99.8%

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

    if -1.9999999999999998e23 < F < 1.35e8

    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-/l*N/A

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

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

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

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

    if 1.35e8 < F

    1. Initial program 56.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. Simplified74.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} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification99.7%

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

Alternative 3: 99.6% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;F \leq 105000000:\\
\;\;\;\;\frac{t\_0}{\frac{\sqrt{F \cdot F + 2}}{F}} - t\_1\\

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


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

    1. Initial program 42.6%

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

      \[\leadsto \color{blue}{-1 \cdot \left(\frac{1}{\sin B} + \frac{x \cdot \cos B}{\sin B}\right)} \]
    4. Step-by-step derivation
      1. distribute-lft-inN/A

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

        \[\leadsto -1 \cdot \frac{1}{\sin B} + \left(\mathsf{neg}\left(\frac{x \cdot \cos B}{\sin B}\right)\right) \]
      3. unsub-negN/A

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\mathsf{neg}\left(\frac{1}{\sin B}\right)\right), \color{blue}{\left(\frac{x \cdot \cos B}{\sin B}\right)}\right) \]
      6. distribute-neg-fracN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{\mathsf{neg}\left(1\right)}{\sin B}\right), \left(\frac{\color{blue}{x \cdot \cos B}}{\sin B}\right)\right) \]
      7. metadata-evalN/A

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

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

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{cos.f64}\left(B\right)\right), \sin B\right)\right) \]
      13. sin-lowering-sin.f6499.8%

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

      \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x \cdot \cos B}{\sin B}} \]
    6. Step-by-step derivation
      1. sub-divN/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(-1 - x \cdot \cos B\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.f6499.8%

        \[\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) \]
    7. Applied egg-rr99.8%

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

    if -3.5000000000000001e124 < F < 1.05e8

    1. Initial program 96.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. 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. clear-numN/A

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

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \sin B\right), \left(\frac{1}{F \cdot {\left(F \cdot F + \left(2 - x \cdot -2\right)\right)}^{\frac{-1}{2}}}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      6. 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{1}{F \cdot {\left(F \cdot F + \left(2 - x \cdot -2\right)\right)}^{\frac{-1}{2}}}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      7. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(2 + {F}^{2}\right)\right), F\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(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(2, \left({F}^{2}\right)\right)\right), F\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      3. unpow2N/A

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

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

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

    if 1.05e8 < F

    1. Initial program 56.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. Simplified74.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} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification99.7%

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

Alternative 4: 99.6% accurate, 1.0× speedup?

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

\mathbf{elif}\;F \leq 500:\\
\;\;\;\;\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 < -1.9999999999999999e124

    1. Initial program 42.6%

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

      \[\leadsto \color{blue}{-1 \cdot \left(\frac{1}{\sin B} + \frac{x \cdot \cos B}{\sin B}\right)} \]
    4. Step-by-step derivation
      1. distribute-lft-inN/A

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

        \[\leadsto -1 \cdot \frac{1}{\sin B} + \left(\mathsf{neg}\left(\frac{x \cdot \cos B}{\sin B}\right)\right) \]
      3. unsub-negN/A

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\mathsf{neg}\left(\frac{1}{\sin B}\right)\right), \color{blue}{\left(\frac{x \cdot \cos B}{\sin B}\right)}\right) \]
      6. distribute-neg-fracN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{\mathsf{neg}\left(1\right)}{\sin B}\right), \left(\frac{\color{blue}{x \cdot \cos B}}{\sin B}\right)\right) \]
      7. metadata-evalN/A

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

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

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{cos.f64}\left(B\right)\right), \sin B\right)\right) \]
      13. sin-lowering-sin.f6499.8%

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

      \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x \cdot \cos B}{\sin B}} \]
    6. Step-by-step derivation
      1. sub-divN/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(-1 - x \cdot \cos B\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.f6499.8%

        \[\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) \]
    7. Applied egg-rr99.8%

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

    if -1.9999999999999999e124 < F < 500

    1. Initial program 96.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. 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(\color{blue}{\left(\frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + {F}^{2}}}\right)}, \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    6. Step-by-step derivation
      1. associate-*l/N/A

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(F, \left(\sqrt{\frac{1}{2 + {F}^{2}}}\right)\right), \sin B\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\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 + {F}^{2}}\right)\right)\right), \sin B\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(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(2 + {F}^{2}\right)\right)\right)\right), \sin B\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(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(2, \left({F}^{2}\right)\right)\right)\right)\right), \sin B\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      7. 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), \sin B\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\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(F, F\right)\right)\right)\right)\right), \sin B\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      9. sin-lowering-sin.f6499.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(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.6%

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

    if 500 < F

    1. Initial program 56.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. Simplified74.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} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification99.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -2 \cdot 10^{+124}:\\ \;\;\;\;\frac{-1 - x \cdot \cos B}{\sin B}\\ \mathbf{elif}\;F \leq 500:\\ \;\;\;\;\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 5: 98.4% accurate, 1.0× speedup?

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

\mathbf{elif}\;F \leq 1.4:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B} - t\_0\\

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


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

    1. Initial program 56.3%

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

      \[\leadsto \color{blue}{-1 \cdot \left(\frac{1}{\sin B} + \frac{x \cdot \cos B}{\sin B}\right)} \]
    4. Step-by-step derivation
      1. distribute-lft-inN/A

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

        \[\leadsto -1 \cdot \frac{1}{\sin B} + \left(\mathsf{neg}\left(\frac{x \cdot \cos B}{\sin B}\right)\right) \]
      3. unsub-negN/A

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\mathsf{neg}\left(\frac{1}{\sin B}\right)\right), \color{blue}{\left(\frac{x \cdot \cos B}{\sin B}\right)}\right) \]
      6. distribute-neg-fracN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{\mathsf{neg}\left(1\right)}{\sin B}\right), \left(\frac{\color{blue}{x \cdot \cos B}}{\sin B}\right)\right) \]
      7. metadata-evalN/A

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

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

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{cos.f64}\left(B\right)\right), \sin B\right)\right) \]
      13. sin-lowering-sin.f6499.8%

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

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

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

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(x, \mathsf{sin.f64}\left(B\right)\right), \mathsf{cos.f64}\left(B\right)\right)\right) \]
    7. Applied egg-rr99.8%

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

    if -8.6e18 < F < 1.3999999999999999

    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. clear-numN/A

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

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \sin B\right), \left(\frac{1}{F \cdot {\left(F \cdot F + \left(2 - x \cdot -2\right)\right)}^{\frac{-1}{2}}}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      6. 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{1}{F \cdot {\left(F \cdot F + \left(2 - x \cdot -2\right)\right)}^{\frac{-1}{2}}}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      7. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(2 + {F}^{2}\right)\right), F\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(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(2, \left({F}^{2}\right)\right)\right), F\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      3. unpow2N/A

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

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\left(F \cdot \sqrt{\frac{1}{2}}\right), \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(\mathsf{*.f64}\left(F, \left(\sqrt{\frac{1}{2}}\right)\right), \sin B\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      3. sqrt-lowering-sqrt.f64N/A

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

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

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

    if 1.3999999999999999 < F

    1. Initial program 56.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. Simplified74.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} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 6: 90.9% accurate, 1.4× speedup?

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

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

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

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

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

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


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

    1. Initial program 61.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. Simplified74.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. clear-numN/A

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

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \sin B\right), \left(\frac{1}{F \cdot {\left(F \cdot F + \left(2 - x \cdot -2\right)\right)}^{\frac{-1}{2}}}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      6. 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{1}{F \cdot {\left(F \cdot F + \left(2 - x \cdot -2\right)\right)}^{\frac{-1}{2}}}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      7. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \left(-1 \cdot \frac{1 + x}{{F}^{2}} + -1\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(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{+.f64}\left(\left(-1 \cdot \frac{1 + x}{{F}^{2}}\right), -1\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      4. associate-*r/N/A

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{+.f64}\left(\left(\frac{\mathsf{neg}\left(\left(1 + x\right)\right)}{{F}^{2}}\right), -1\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(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{neg}\left(\left(1 + x\right)\right)\right), \left({F}^{2}\right)\right), -1\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      7. distribute-neg-inN/A

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(-1 - x\right), \left({F}^{2}\right)\right), -1\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{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(-1, x\right), \left({F}^{2}\right)\right), -1\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      11. unpow2N/A

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

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

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

    if -1.35e-39 < F < -3.7999999999999999e-185

    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 \mathsf{+.f64}\left(\mathsf{neg.f64}\left(\color{blue}{\left(\frac{x}{B}\right)}\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(F, \mathsf{sin.f64}\left(B\right)\right), \mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), 2\right), \mathsf{*.f64}\left(2, x\right)\right), \mathsf{neg.f64}\left(\mathsf{/.f64}\left(1, 2\right)\right)\right)\right)\right) \]
    4. Step-by-step derivation
      1. /-lowering-/.f6482.7%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(x, B\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\color{blue}{F}, \mathsf{sin.f64}\left(B\right)\right), \mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), 2\right), \mathsf{*.f64}\left(2, x\right)\right), \mathsf{neg.f64}\left(\mathsf{/.f64}\left(1, 2\right)\right)\right)\right)\right) \]
    5. Simplified82.7%

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

    if -3.7999999999999999e-185 < F < 4.2000000000000001e-78

    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.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}{\left(2 + {F}^{2}\right) - -2 \cdot x}}\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}{\left(2 + {F}^{2}\right) - -2 \cdot x}} \cdot \frac{F}{B}\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      2. cancel-sign-sub-invN/A

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\sqrt{\frac{1}{2 + \left({F}^{2} + 2 \cdot x\right)}} \cdot \frac{F}{B}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      5. +-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(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      6. *-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) \]
      7. 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) \]
      8. /-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) \]
      9. +-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) \]
      10. +-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) \]
      11. +-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) \]
      12. 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) \]
      13. *-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) \]
      14. *-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) \]
      15. /-lowering-/.f6493.4%

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

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

    if 4.2000000000000001e-78 < F < 20500

    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.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 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-/.f6499.5%

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

      \[\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 20500 < F

    1. Initial program 56.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. Simplified74.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} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification95.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1.35 \cdot 10^{-39}:\\ \;\;\;\;\frac{\frac{1}{\sin B}}{-1 + \frac{-1 - x}{F \cdot F}} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -3.8 \cdot 10^{-185}:\\ \;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{\left(\frac{-1}{2}\right)} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 4.2 \cdot 10^{-78}:\\ \;\;\;\;\sqrt{\frac{1}{2 + \left(F \cdot F + x \cdot 2\right)}} \cdot \frac{F}{B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 20500:\\ \;\;\;\;\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: 90.9% accurate, 1.4× speedup?

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

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

\mathbf{elif}\;F \leq -3.8 \cdot 10^{-185}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;F \leq 37000:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 61.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. Simplified74.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. clear-numN/A

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

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \sin B\right), \left(\frac{1}{F \cdot {\left(F \cdot F + \left(2 - x \cdot -2\right)\right)}^{\frac{-1}{2}}}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      6. 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{1}{F \cdot {\left(F \cdot F + \left(2 - x \cdot -2\right)\right)}^{\frac{-1}{2}}}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      7. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \left(-1 \cdot \frac{1 + x}{{F}^{2}} + -1\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(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{+.f64}\left(\left(-1 \cdot \frac{1 + x}{{F}^{2}}\right), -1\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      4. associate-*r/N/A

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{+.f64}\left(\left(\frac{\mathsf{neg}\left(\left(1 + x\right)\right)}{{F}^{2}}\right), -1\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(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{neg}\left(\left(1 + x\right)\right)\right), \left({F}^{2}\right)\right), -1\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      7. distribute-neg-inN/A

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(-1 - x\right), \left({F}^{2}\right)\right), -1\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{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(-1, x\right), \left({F}^{2}\right)\right), -1\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      11. unpow2N/A

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

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

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

    if -1.3799999999999999e-39 < F < -3.7999999999999999e-185 or 1.65e-80 < F < 37000

    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.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 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-/.f6489.1%

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

      \[\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 -3.7999999999999999e-185 < F < 1.65e-80

    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.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}{\left(2 + {F}^{2}\right) - -2 \cdot x}}\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}{\left(2 + {F}^{2}\right) - -2 \cdot x}} \cdot \frac{F}{B}\right), \mathsf{/.f64}\left(\color{blue}{x}, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      2. cancel-sign-sub-invN/A

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\sqrt{\frac{1}{2 + \left({F}^{2} + 2 \cdot x\right)}} \cdot \frac{F}{B}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      5. +-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(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      6. *-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) \]
      7. 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) \]
      8. /-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) \]
      9. +-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) \]
      10. +-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) \]
      11. +-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) \]
      12. 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) \]
      13. *-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) \]
      14. *-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) \]
      15. /-lowering-/.f6493.4%

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

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

    if 37000 < F

    1. Initial program 56.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. Simplified74.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} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification95.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1.38 \cdot 10^{-39}:\\ \;\;\;\;\frac{\frac{1}{\sin B}}{-1 + \frac{-1 - x}{F \cdot F}} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -3.8 \cdot 10^{-185}:\\ \;\;\;\;\frac{F \cdot {\left(F \cdot F + \left(2 - x \cdot -2\right)\right)}^{-0.5}}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 1.65 \cdot 10^{-80}:\\ \;\;\;\;\sqrt{\frac{1}{2 + \left(F \cdot F + x \cdot 2\right)}} \cdot \frac{F}{B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 37000:\\ \;\;\;\;\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 8: 88.5% accurate, 1.4× speedup?

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

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

\mathbf{elif}\;F \leq -2.8 \cdot 10^{-203}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;F \leq 5 \cdot 10^{-81}:\\
\;\;\;\;\frac{t\_2}{1 + \frac{1}{F \cdot F}} - t\_0\\

\mathbf{elif}\;F \leq 270:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 61.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. Simplified74.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. clear-numN/A

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

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \sin B\right), \left(\frac{1}{F \cdot {\left(F \cdot F + \left(2 - x \cdot -2\right)\right)}^{\frac{-1}{2}}}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      6. 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{1}{F \cdot {\left(F \cdot F + \left(2 - x \cdot -2\right)\right)}^{\frac{-1}{2}}}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      7. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \left(-1 \cdot \frac{1 + x}{{F}^{2}} + -1\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(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{+.f64}\left(\left(-1 \cdot \frac{1 + x}{{F}^{2}}\right), -1\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      4. associate-*r/N/A

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{+.f64}\left(\left(\frac{\mathsf{neg}\left(\left(1 + x\right)\right)}{{F}^{2}}\right), -1\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(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{neg}\left(\left(1 + x\right)\right)\right), \left({F}^{2}\right)\right), -1\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      7. distribute-neg-inN/A

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(-1 - x\right), \left({F}^{2}\right)\right), -1\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{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(-1, x\right), \left({F}^{2}\right)\right), -1\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      11. unpow2N/A

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

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

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

    if -9.0000000000000002e-40 < F < -2.80000000000000022e-203 or 4.99999999999999981e-81 < F < 270

    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.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 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-/.f6490.2%

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

      \[\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 -2.80000000000000022e-203 < F < 4.99999999999999981e-81

    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. clear-numN/A

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

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \sin B\right), \left(\frac{1}{F \cdot {\left(F \cdot F + \left(2 - x \cdot -2\right)\right)}^{\frac{-1}{2}}}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      6. 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{1}{F \cdot {\left(F \cdot F + \left(2 - x \cdot -2\right)\right)}^{\frac{-1}{2}}}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      7. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(2 + {F}^{2}\right)\right), F\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(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(2, \left({F}^{2}\right)\right)\right), F\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      3. unpow2N/A

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

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

      \[\leadsto \frac{\frac{1}{\sin B}}{\frac{\color{blue}{\sqrt{2 + F \cdot F}}}{F}} - \frac{x}{\tan B} \]
    10. Taylor expanded in F around inf

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{+.f64}\left(1, \left(\frac{1}{{F}^{2}}\right)\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(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \left({F}^{2}\right)\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      3. unpow2N/A

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(F, F\right)\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    12. Simplified80.8%

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

    if 270 < F

    1. Initial program 56.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. Simplified74.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} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification92.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -9 \cdot 10^{-40}:\\ \;\;\;\;\frac{\frac{1}{\sin B}}{-1 + \frac{-1 - x}{F \cdot F}} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -2.8 \cdot 10^{-203}:\\ \;\;\;\;\frac{F \cdot {\left(F \cdot F + \left(2 - x \cdot -2\right)\right)}^{-0.5}}{\sin B} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 5 \cdot 10^{-81}:\\ \;\;\;\;\frac{\frac{1}{\sin B}}{1 + \frac{1}{F \cdot F}} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 270:\\ \;\;\;\;\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 9: 84.8% accurate, 1.4× speedup?

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

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

\mathbf{elif}\;F \leq -8.5 \cdot 10^{-179}:\\
\;\;\;\;F \cdot \frac{{t\_2}^{-0.5}}{\sin B}\\

\mathbf{elif}\;F \leq 5.8 \cdot 10^{-60}:\\
\;\;\;\;\frac{t\_1}{1 + \frac{1}{F \cdot F}} - t\_0\\

\mathbf{elif}\;F \leq 10000:\\
\;\;\;\;\frac{\frac{F}{\sqrt{t\_2}}}{\sin B}\\

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


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

    1. Initial program 61.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. Simplified74.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. clear-numN/A

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

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \sin B\right), \left(\frac{1}{F \cdot {\left(F \cdot F + \left(2 - x \cdot -2\right)\right)}^{\frac{-1}{2}}}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      6. 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{1}{F \cdot {\left(F \cdot F + \left(2 - x \cdot -2\right)\right)}^{\frac{-1}{2}}}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      7. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \left(-1 \cdot \frac{1 + x}{{F}^{2}} + -1\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(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{+.f64}\left(\left(-1 \cdot \frac{1 + x}{{F}^{2}}\right), -1\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      4. associate-*r/N/A

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{+.f64}\left(\left(\frac{\mathsf{neg}\left(\left(1 + x\right)\right)}{{F}^{2}}\right), -1\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(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{neg}\left(\left(1 + x\right)\right)\right), \left({F}^{2}\right)\right), -1\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      7. distribute-neg-inN/A

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(-1 - x\right), \left({F}^{2}\right)\right), -1\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{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(-1, x\right), \left({F}^{2}\right)\right), -1\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      11. unpow2N/A

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

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

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

    if -9.0000000000000002e-40 < F < -8.49999999999999932e-179

    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 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. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(F, \left(\sqrt{\frac{1}{2 + {F}^{2}}}\right)\right), \sin \color{blue}{B}\right) \]
      4. 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), \sin B\right) \]
      5. /-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), \sin B\right) \]
      6. +-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), \sin B\right) \]
      7. 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), \sin B\right) \]
      8. *-lowering-*.f64N/A

        \[\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), \sin B\right) \]
      9. sin-lowering-sin.f6471.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), \mathsf{sin.f64}\left(B\right)\right) \]
    5. Simplified71.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), 2\right), \frac{-1}{2}\right), \sin B\right), F\right) \]
      12. sin-lowering-sin.f6471.4%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), 2\right), \frac{-1}{2}\right), \mathsf{sin.f64}\left(B\right)\right), F\right) \]
    7. Applied egg-rr71.4%

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

    if -8.49999999999999932e-179 < F < 5.7999999999999999e-60

    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.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. clear-numN/A

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

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \sin B\right), \left(\frac{1}{F \cdot {\left(F \cdot F + \left(2 - x \cdot -2\right)\right)}^{\frac{-1}{2}}}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      6. 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{1}{F \cdot {\left(F \cdot F + \left(2 - x \cdot -2\right)\right)}^{\frac{-1}{2}}}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      7. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(2 + {F}^{2}\right)\right), F\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(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(2, \left({F}^{2}\right)\right)\right), F\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      3. unpow2N/A

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

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

      \[\leadsto \frac{\frac{1}{\sin B}}{\frac{\color{blue}{\sqrt{2 + F \cdot F}}}{F}} - \frac{x}{\tan B} \]
    10. Taylor expanded in F around inf

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{+.f64}\left(1, \left(\frac{1}{{F}^{2}}\right)\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(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \left({F}^{2}\right)\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      3. unpow2N/A

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(F, F\right)\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    12. Simplified82.4%

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

    if 5.7999999999999999e-60 < F < 1e4

    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 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. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(F, \left(\sqrt{\frac{1}{2 + {F}^{2}}}\right)\right), \sin \color{blue}{B}\right) \]
      4. 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), \sin B\right) \]
      5. /-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), \sin B\right) \]
      6. +-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), \sin B\right) \]
      7. 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), \sin B\right) \]
      8. *-lowering-*.f64N/A

        \[\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), \sin B\right) \]
      9. sin-lowering-sin.f6490.9%

        \[\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), \mathsf{sin.f64}\left(B\right)\right) \]
    5. Simplified90.9%

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(F \cdot \frac{1}{\sqrt{2 + F \cdot F}}\right), \sin B\right) \]
      4. un-div-invN/A

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), 2\right)\right)\right), \mathsf{sin.f64}\left(B\right)\right) \]
    7. Applied egg-rr91.2%

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

    if 1e4 < F

    1. Initial program 56.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. Simplified74.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} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification90.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -9 \cdot 10^{-40}:\\ \;\;\;\;\frac{\frac{1}{\sin B}}{-1 + \frac{-1 - x}{F \cdot F}} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -8.5 \cdot 10^{-179}:\\ \;\;\;\;F \cdot \frac{{\left(F \cdot F + 2\right)}^{-0.5}}{\sin B}\\ \mathbf{elif}\;F \leq 5.8 \cdot 10^{-60}:\\ \;\;\;\;\frac{\frac{1}{\sin B}}{1 + \frac{1}{F \cdot F}} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 10000:\\ \;\;\;\;\frac{\frac{F}{\sqrt{F \cdot F + 2}}}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 84.7% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
t_1 := F \cdot F + 2\\
t_2 := \frac{1}{\sin B}\\
\mathbf{if}\;F \leq -9 \cdot 10^{-40}:\\
\;\;\;\;\frac{-1 - x \cdot \cos B}{\sin B}\\

\mathbf{elif}\;F \leq -4.3 \cdot 10^{-178}:\\
\;\;\;\;F \cdot \frac{{t\_1}^{-0.5}}{\sin B}\\

\mathbf{elif}\;F \leq 1.85 \cdot 10^{-59}:\\
\;\;\;\;\frac{t\_2}{1 + \frac{1}{F \cdot F}} - t\_0\\

\mathbf{elif}\;F \leq 125:\\
\;\;\;\;\frac{\frac{F}{\sqrt{t\_1}}}{\sin B}\\

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


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

    1. Initial program 61.4%

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

      \[\leadsto \color{blue}{-1 \cdot \left(\frac{1}{\sin B} + \frac{x \cdot \cos B}{\sin B}\right)} \]
    4. Step-by-step derivation
      1. distribute-lft-inN/A

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

        \[\leadsto -1 \cdot \frac{1}{\sin B} + \left(\mathsf{neg}\left(\frac{x \cdot \cos B}{\sin B}\right)\right) \]
      3. unsub-negN/A

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\mathsf{neg}\left(\frac{1}{\sin B}\right)\right), \color{blue}{\left(\frac{x \cdot \cos B}{\sin B}\right)}\right) \]
      6. distribute-neg-fracN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{\mathsf{neg}\left(1\right)}{\sin B}\right), \left(\frac{\color{blue}{x \cdot \cos B}}{\sin B}\right)\right) \]
      7. metadata-evalN/A

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

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

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

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{cos.f64}\left(B\right)\right), \mathsf{sin.f64}\left(B\right)\right)\right) \]
    5. Simplified95.1%

      \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x \cdot \cos B}{\sin B}} \]
    6. Step-by-step derivation
      1. sub-divN/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(-1 - x \cdot \cos B\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.f6495.1%

        \[\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) \]
    7. Applied egg-rr95.1%

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

    if -9.0000000000000002e-40 < F < -4.3e-178

    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 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. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(F, \left(\sqrt{\frac{1}{2 + {F}^{2}}}\right)\right), \sin \color{blue}{B}\right) \]
      4. 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), \sin B\right) \]
      5. /-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), \sin B\right) \]
      6. +-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), \sin B\right) \]
      7. 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), \sin B\right) \]
      8. *-lowering-*.f64N/A

        \[\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), \sin B\right) \]
      9. sin-lowering-sin.f6471.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), \mathsf{sin.f64}\left(B\right)\right) \]
    5. Simplified71.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), 2\right), \frac{-1}{2}\right), \sin B\right), F\right) \]
      12. sin-lowering-sin.f6471.4%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), 2\right), \frac{-1}{2}\right), \mathsf{sin.f64}\left(B\right)\right), F\right) \]
    7. Applied egg-rr71.4%

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

    if -4.3e-178 < F < 1.85e-59

    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.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. clear-numN/A

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

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \sin B\right), \left(\frac{1}{F \cdot {\left(F \cdot F + \left(2 - x \cdot -2\right)\right)}^{\frac{-1}{2}}}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      6. 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{1}{F \cdot {\left(F \cdot F + \left(2 - x \cdot -2\right)\right)}^{\frac{-1}{2}}}\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      7. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(2 + {F}^{2}\right)\right), F\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(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(2, \left({F}^{2}\right)\right)\right), F\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      3. unpow2N/A

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

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

      \[\leadsto \frac{\frac{1}{\sin B}}{\frac{\color{blue}{\sqrt{2 + F \cdot F}}}{F}} - \frac{x}{\tan B} \]
    10. Taylor expanded in F around inf

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{+.f64}\left(1, \left(\frac{1}{{F}^{2}}\right)\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(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \left({F}^{2}\right)\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      3. unpow2N/A

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(F, F\right)\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    12. Simplified82.4%

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

    if 1.85e-59 < F < 125

    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 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. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(F, \left(\sqrt{\frac{1}{2 + {F}^{2}}}\right)\right), \sin \color{blue}{B}\right) \]
      4. 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), \sin B\right) \]
      5. /-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), \sin B\right) \]
      6. +-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), \sin B\right) \]
      7. 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), \sin B\right) \]
      8. *-lowering-*.f64N/A

        \[\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), \sin B\right) \]
      9. sin-lowering-sin.f6490.9%

        \[\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), \mathsf{sin.f64}\left(B\right)\right) \]
    5. Simplified90.9%

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(F \cdot \frac{1}{\sqrt{2 + F \cdot F}}\right), \sin B\right) \]
      4. un-div-invN/A

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), 2\right)\right)\right), \mathsf{sin.f64}\left(B\right)\right) \]
    7. Applied egg-rr91.2%

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

    if 125 < F

    1. Initial program 56.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. Simplified74.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} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification90.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -9 \cdot 10^{-40}:\\ \;\;\;\;\frac{-1 - x \cdot \cos B}{\sin B}\\ \mathbf{elif}\;F \leq -4.3 \cdot 10^{-178}:\\ \;\;\;\;F \cdot \frac{{\left(F \cdot F + 2\right)}^{-0.5}}{\sin B}\\ \mathbf{elif}\;F \leq 1.85 \cdot 10^{-59}:\\ \;\;\;\;\frac{\frac{1}{\sin B}}{1 + \frac{1}{F \cdot F}} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq 125:\\ \;\;\;\;\frac{\frac{F}{\sqrt{F \cdot F + 2}}}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 84.6% accurate, 1.4× speedup?

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

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

\mathbf{elif}\;F \leq -4.3 \cdot 10^{-178}:\\
\;\;\;\;F \cdot \frac{{t\_0}^{-0.5}}{\sin B}\\

\mathbf{elif}\;F \leq 1.05 \cdot 10^{-59}:\\
\;\;\;\;\frac{t\_1}{0 - \sin B}\\

\mathbf{elif}\;F \leq 7000:\\
\;\;\;\;\frac{\frac{F}{\sqrt{t\_0}}}{\sin B}\\

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


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

    1. Initial program 61.4%

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

      \[\leadsto \color{blue}{-1 \cdot \left(\frac{1}{\sin B} + \frac{x \cdot \cos B}{\sin B}\right)} \]
    4. Step-by-step derivation
      1. distribute-lft-inN/A

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

        \[\leadsto -1 \cdot \frac{1}{\sin B} + \left(\mathsf{neg}\left(\frac{x \cdot \cos B}{\sin B}\right)\right) \]
      3. unsub-negN/A

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\mathsf{neg}\left(\frac{1}{\sin B}\right)\right), \color{blue}{\left(\frac{x \cdot \cos B}{\sin B}\right)}\right) \]
      6. distribute-neg-fracN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{\mathsf{neg}\left(1\right)}{\sin B}\right), \left(\frac{\color{blue}{x \cdot \cos B}}{\sin B}\right)\right) \]
      7. metadata-evalN/A

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

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

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

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{cos.f64}\left(B\right)\right), \mathsf{sin.f64}\left(B\right)\right)\right) \]
    5. Simplified95.1%

      \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x \cdot \cos B}{\sin B}} \]
    6. Step-by-step derivation
      1. sub-divN/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(-1 - x \cdot \cos B\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.f6495.1%

        \[\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) \]
    7. Applied egg-rr95.1%

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

    if -1.4000000000000001e-39 < F < -4.3e-178

    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 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. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(F, \left(\sqrt{\frac{1}{2 + {F}^{2}}}\right)\right), \sin \color{blue}{B}\right) \]
      4. 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), \sin B\right) \]
      5. /-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), \sin B\right) \]
      6. +-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), \sin B\right) \]
      7. 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), \sin B\right) \]
      8. *-lowering-*.f64N/A

        \[\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), \sin B\right) \]
      9. sin-lowering-sin.f6471.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), \mathsf{sin.f64}\left(B\right)\right) \]
    5. Simplified71.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), 2\right), \frac{-1}{2}\right), \sin B\right), F\right) \]
      12. sin-lowering-sin.f6471.4%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), 2\right), \frac{-1}{2}\right), \mathsf{sin.f64}\left(B\right)\right), F\right) \]
    7. Applied egg-rr71.4%

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

    if -4.3e-178 < F < 1.04999999999999998e-59

    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 x around inf

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
    4. 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.f6482.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) \]
    5. Simplified82.3%

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

    if 1.04999999999999998e-59 < F < 7e3

    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 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. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(F, \left(\sqrt{\frac{1}{2 + {F}^{2}}}\right)\right), \sin \color{blue}{B}\right) \]
      4. 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), \sin B\right) \]
      5. /-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), \sin B\right) \]
      6. +-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), \sin B\right) \]
      7. 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), \sin B\right) \]
      8. *-lowering-*.f64N/A

        \[\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), \sin B\right) \]
      9. sin-lowering-sin.f6490.9%

        \[\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), \mathsf{sin.f64}\left(B\right)\right) \]
    5. Simplified90.9%

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(F \cdot \frac{1}{\sqrt{2 + F \cdot F}}\right), \sin B\right) \]
      4. un-div-invN/A

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), 2\right)\right)\right), \mathsf{sin.f64}\left(B\right)\right) \]
    7. Applied egg-rr91.2%

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

    if 7e3 < F

    1. Initial program 56.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. Simplified74.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} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification90.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1.4 \cdot 10^{-39}:\\ \;\;\;\;\frac{-1 - x \cdot \cos B}{\sin B}\\ \mathbf{elif}\;F \leq -4.3 \cdot 10^{-178}:\\ \;\;\;\;F \cdot \frac{{\left(F \cdot F + 2\right)}^{-0.5}}{\sin B}\\ \mathbf{elif}\;F \leq 1.05 \cdot 10^{-59}:\\ \;\;\;\;\frac{x \cdot \cos B}{0 - \sin B}\\ \mathbf{elif}\;F \leq 7000:\\ \;\;\;\;\frac{\frac{F}{\sqrt{F \cdot F + 2}}}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 84.6% accurate, 1.4× speedup?

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

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

\mathbf{elif}\;F \leq -4.3 \cdot 10^{-178}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;F \leq 3.5 \cdot 10^{-60}:\\
\;\;\;\;\frac{t\_1}{0 - \sin B}\\

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

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


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

    1. Initial program 61.4%

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

      \[\leadsto \color{blue}{-1 \cdot \left(\frac{1}{\sin B} + \frac{x \cdot \cos B}{\sin B}\right)} \]
    4. Step-by-step derivation
      1. distribute-lft-inN/A

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

        \[\leadsto -1 \cdot \frac{1}{\sin B} + \left(\mathsf{neg}\left(\frac{x \cdot \cos B}{\sin B}\right)\right) \]
      3. unsub-negN/A

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\mathsf{neg}\left(\frac{1}{\sin B}\right)\right), \color{blue}{\left(\frac{x \cdot \cos B}{\sin B}\right)}\right) \]
      6. distribute-neg-fracN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{\mathsf{neg}\left(1\right)}{\sin B}\right), \left(\frac{\color{blue}{x \cdot \cos B}}{\sin B}\right)\right) \]
      7. metadata-evalN/A

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

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

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

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{cos.f64}\left(B\right)\right), \mathsf{sin.f64}\left(B\right)\right)\right) \]
    5. Simplified95.1%

      \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x \cdot \cos B}{\sin B}} \]
    6. Step-by-step derivation
      1. sub-divN/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(-1 - x \cdot \cos B\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.f6495.1%

        \[\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) \]
    7. Applied egg-rr95.1%

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

    if -1.24999999999999991e-40 < F < -4.3e-178 or 3.49999999999999976e-60 < F < 13

    1. Initial program 99.3%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in 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. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(F, \left(\sqrt{\frac{1}{2 + {F}^{2}}}\right)\right), \sin \color{blue}{B}\right) \]
      4. 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), \sin B\right) \]
      5. /-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), \sin B\right) \]
      6. +-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), \sin B\right) \]
      7. 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), \sin B\right) \]
      8. *-lowering-*.f64N/A

        \[\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), \sin B\right) \]
      9. sin-lowering-sin.f6477.7%

        \[\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), \mathsf{sin.f64}\left(B\right)\right) \]
    5. Simplified77.7%

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(F \cdot \frac{1}{\sqrt{2 + F \cdot F}}\right), \sin B\right) \]
      4. un-div-invN/A

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), 2\right)\right)\right), \mathsf{sin.f64}\left(B\right)\right) \]
    7. Applied egg-rr77.9%

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

    if -4.3e-178 < F < 3.49999999999999976e-60

    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 x around inf

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
    4. 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.f6482.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) \]
    5. Simplified82.3%

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

    if 13 < F

    1. Initial program 56.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. Simplified74.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} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification90.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1.25 \cdot 10^{-40}:\\ \;\;\;\;\frac{-1 - x \cdot \cos B}{\sin B}\\ \mathbf{elif}\;F \leq -4.3 \cdot 10^{-178}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{F \cdot F + 2}}}{\sin B}\\ \mathbf{elif}\;F \leq 3.5 \cdot 10^{-60}:\\ \;\;\;\;\frac{x \cdot \cos B}{0 - \sin B}\\ \mathbf{elif}\;F \leq 13:\\ \;\;\;\;\frac{\frac{F}{\sqrt{F \cdot F + 2}}}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 84.6% accurate, 1.4× speedup?

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

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

\mathbf{elif}\;F \leq -4.3 \cdot 10^{-178}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;F \leq 5.2 \cdot 10^{-60}:\\
\;\;\;\;\frac{t\_1}{0 - \sin B}\\

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

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


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

    1. Initial program 61.4%

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

      \[\leadsto \color{blue}{-1 \cdot \left(\frac{1}{\sin B} + \frac{x \cdot \cos B}{\sin B}\right)} \]
    4. Step-by-step derivation
      1. distribute-lft-inN/A

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

        \[\leadsto -1 \cdot \frac{1}{\sin B} + \left(\mathsf{neg}\left(\frac{x \cdot \cos B}{\sin B}\right)\right) \]
      3. unsub-negN/A

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\mathsf{neg}\left(\frac{1}{\sin B}\right)\right), \color{blue}{\left(\frac{x \cdot \cos B}{\sin B}\right)}\right) \]
      6. distribute-neg-fracN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{\mathsf{neg}\left(1\right)}{\sin B}\right), \left(\frac{\color{blue}{x \cdot \cos B}}{\sin B}\right)\right) \]
      7. metadata-evalN/A

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

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

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

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{cos.f64}\left(B\right)\right), \mathsf{sin.f64}\left(B\right)\right)\right) \]
    5. Simplified95.1%

      \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x \cdot \cos B}{\sin B}} \]
    6. Step-by-step derivation
      1. sub-divN/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(-1 - x \cdot \cos B\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.f6495.1%

        \[\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) \]
    7. Applied egg-rr95.1%

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

    if -1.15000000000000004e-39 < F < -4.3e-178 or 5.1999999999999995e-60 < F < 23000

    1. Initial program 99.3%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in 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. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(F, \left(\sqrt{\frac{1}{2 + {F}^{2}}}\right)\right), \sin \color{blue}{B}\right) \]
      4. 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), \sin B\right) \]
      5. /-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), \sin B\right) \]
      6. +-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), \sin B\right) \]
      7. 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), \sin B\right) \]
      8. *-lowering-*.f64N/A

        \[\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), \sin B\right) \]
      9. sin-lowering-sin.f6477.7%

        \[\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), \mathsf{sin.f64}\left(B\right)\right) \]
    5. Simplified77.7%

      \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + F \cdot F}}}{\sin B}} \]
    6. Step-by-step derivation
      1. div-invN/A

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

        \[\leadsto \left(F \cdot \frac{\sqrt{1}}{\sqrt{2 + F \cdot F}}\right) \cdot \frac{1}{\sin B} \]
      3. metadata-evalN/A

        \[\leadsto \left(F \cdot \frac{1}{\sqrt{2 + F \cdot F}}\right) \cdot \frac{1}{\sin B} \]
      4. un-div-invN/A

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

        \[\leadsto \frac{F \cdot \frac{1}{\sin B}}{\color{blue}{\sqrt{2 + F \cdot F}}} \]
      6. div-invN/A

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(F, \mathsf{sin.f64}\left(B\right)\right), \left(\sqrt{2 + \color{blue}{F \cdot F}}\right)\right) \]
      10. 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(2 + F \cdot F\right)\right)\right) \]
      11. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(F, \mathsf{sin.f64}\left(B\right)\right), \mathsf{sqrt.f64}\left(\left(F \cdot F + 2\right)\right)\right) \]
      12. +-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(\left(F \cdot F\right), 2\right)\right)\right) \]
      13. *-lowering-*.f6477.8%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(F, \mathsf{sin.f64}\left(B\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(F, F\right), 2\right)\right)\right) \]
    7. Applied egg-rr77.8%

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

    if -4.3e-178 < F < 5.1999999999999995e-60

    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 x around inf

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
    4. 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.f6482.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) \]
    5. Simplified82.3%

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

    if 23000 < F

    1. Initial program 56.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. Simplified74.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} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification90.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1.15 \cdot 10^{-39}:\\ \;\;\;\;\frac{-1 - x \cdot \cos B}{\sin B}\\ \mathbf{elif}\;F \leq -4.3 \cdot 10^{-178}:\\ \;\;\;\;\frac{\frac{F}{\sin B}}{\sqrt{F \cdot F + 2}}\\ \mathbf{elif}\;F \leq 5.2 \cdot 10^{-60}:\\ \;\;\;\;\frac{x \cdot \cos B}{0 - \sin B}\\ \mathbf{elif}\;F \leq 23000:\\ \;\;\;\;\frac{\frac{F}{\sin B}}{\sqrt{F \cdot F + 2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 84.5% accurate, 1.4× speedup?

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

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

\mathbf{elif}\;F \leq -4.3 \cdot 10^{-178}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;F \leq 2.15 \cdot 10^{-60}:\\
\;\;\;\;\frac{t\_1}{0 - \sin B}\\

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

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


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

    1. Initial program 61.4%

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

      \[\leadsto \color{blue}{-1 \cdot \left(\frac{1}{\sin B} + \frac{x \cdot \cos B}{\sin B}\right)} \]
    4. Step-by-step derivation
      1. distribute-lft-inN/A

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

        \[\leadsto -1 \cdot \frac{1}{\sin B} + \left(\mathsf{neg}\left(\frac{x \cdot \cos B}{\sin B}\right)\right) \]
      3. unsub-negN/A

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\mathsf{neg}\left(\frac{1}{\sin B}\right)\right), \color{blue}{\left(\frac{x \cdot \cos B}{\sin B}\right)}\right) \]
      6. distribute-neg-fracN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{\mathsf{neg}\left(1\right)}{\sin B}\right), \left(\frac{\color{blue}{x \cdot \cos B}}{\sin B}\right)\right) \]
      7. metadata-evalN/A

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

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

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

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{sin.f64}\left(B\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, \mathsf{cos.f64}\left(B\right)\right), \mathsf{sin.f64}\left(B\right)\right)\right) \]
    5. Simplified95.1%

      \[\leadsto \color{blue}{\frac{-1}{\sin B} - \frac{x \cdot \cos B}{\sin B}} \]
    6. Step-by-step derivation
      1. sub-divN/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(-1 - x \cdot \cos B\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.f6495.1%

        \[\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) \]
    7. Applied egg-rr95.1%

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

    if -1.15000000000000004e-39 < F < -4.3e-178 or 2.15e-60 < F < 0.0128000000000000006

    1. Initial program 99.3%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in 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. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(F, \left(\sqrt{\frac{1}{2 + {F}^{2}}}\right)\right), \sin \color{blue}{B}\right) \]
      4. 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), \sin B\right) \]
      5. /-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), \sin B\right) \]
      6. +-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), \sin B\right) \]
      7. 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), \sin B\right) \]
      8. *-lowering-*.f64N/A

        \[\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), \sin B\right) \]
      9. sin-lowering-sin.f6477.7%

        \[\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), \mathsf{sin.f64}\left(B\right)\right) \]
    5. Simplified77.7%

      \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + F \cdot F}}}{\sin B}} \]
    6. Taylor expanded in F around 0

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

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

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

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

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

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

    if -4.3e-178 < F < 2.15e-60

    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 x around inf

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
    4. 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.f6482.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) \]
    5. Simplified82.3%

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

    if 0.0128000000000000006 < F

    1. Initial program 56.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. Simplified74.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} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification90.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1.15 \cdot 10^{-39}:\\ \;\;\;\;\frac{-1 - x \cdot \cos B}{\sin B}\\ \mathbf{elif}\;F \leq -4.3 \cdot 10^{-178}:\\ \;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\ \mathbf{elif}\;F \leq 2.15 \cdot 10^{-60}:\\ \;\;\;\;\frac{x \cdot \cos B}{0 - \sin B}\\ \mathbf{elif}\;F \leq 0.0128:\\ \;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 84.5% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{F \cdot \sqrt{0.5}}{\sin B}\\ t_1 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -5.8 \cdot 10^{-40}:\\ \;\;\;\;\frac{-1}{\sin B} - t\_1\\ \mathbf{elif}\;F \leq -4.3 \cdot 10^{-178}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;F \leq 1.8 \cdot 10^{-59}:\\ \;\;\;\;\frac{x \cdot \cos B}{0 - \sin B}\\ \mathbf{elif}\;F \leq 1.34 \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 0.5)) (sin B))) (t_1 (/ x (tan B))))
   (if (<= F -5.8e-40)
     (- (/ -1.0 (sin B)) t_1)
     (if (<= F -4.3e-178)
       t_0
       (if (<= F 1.8e-59)
         (/ (* x (cos B)) (- 0.0 (sin B)))
         (if (<= F 1.34e-5) t_0 (- (/ 1.0 (sin B)) t_1)))))))
double code(double F, double B, double x) {
	double t_0 = (F * sqrt(0.5)) / sin(B);
	double t_1 = x / tan(B);
	double tmp;
	if (F <= -5.8e-40) {
		tmp = (-1.0 / sin(B)) - t_1;
	} else if (F <= -4.3e-178) {
		tmp = t_0;
	} else if (F <= 1.8e-59) {
		tmp = (x * cos(B)) / (0.0 - sin(B));
	} else if (F <= 1.34e-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(0.5d0)) / sin(b)
    t_1 = x / tan(b)
    if (f <= (-5.8d-40)) then
        tmp = ((-1.0d0) / sin(b)) - t_1
    else if (f <= (-4.3d-178)) then
        tmp = t_0
    else if (f <= 1.8d-59) then
        tmp = (x * cos(b)) / (0.0d0 - sin(b))
    else if (f <= 1.34d-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(0.5)) / Math.sin(B);
	double t_1 = x / Math.tan(B);
	double tmp;
	if (F <= -5.8e-40) {
		tmp = (-1.0 / Math.sin(B)) - t_1;
	} else if (F <= -4.3e-178) {
		tmp = t_0;
	} else if (F <= 1.8e-59) {
		tmp = (x * Math.cos(B)) / (0.0 - Math.sin(B));
	} else if (F <= 1.34e-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(0.5)) / math.sin(B)
	t_1 = x / math.tan(B)
	tmp = 0
	if F <= -5.8e-40:
		tmp = (-1.0 / math.sin(B)) - t_1
	elif F <= -4.3e-178:
		tmp = t_0
	elif F <= 1.8e-59:
		tmp = (x * math.cos(B)) / (0.0 - math.sin(B))
	elif F <= 1.34e-5:
		tmp = t_0
	else:
		tmp = (1.0 / math.sin(B)) - t_1
	return tmp
function code(F, B, x)
	t_0 = Float64(Float64(F * sqrt(0.5)) / sin(B))
	t_1 = Float64(x / tan(B))
	tmp = 0.0
	if (F <= -5.8e-40)
		tmp = Float64(Float64(-1.0 / sin(B)) - t_1);
	elseif (F <= -4.3e-178)
		tmp = t_0;
	elseif (F <= 1.8e-59)
		tmp = Float64(Float64(x * cos(B)) / Float64(0.0 - sin(B)));
	elseif (F <= 1.34e-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(0.5)) / sin(B);
	t_1 = x / tan(B);
	tmp = 0.0;
	if (F <= -5.8e-40)
		tmp = (-1.0 / sin(B)) - t_1;
	elseif (F <= -4.3e-178)
		tmp = t_0;
	elseif (F <= 1.8e-59)
		tmp = (x * cos(B)) / (0.0 - sin(B));
	elseif (F <= 1.34e-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[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -5.8e-40], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -4.3e-178], t$95$0, If[LessEqual[F, 1.8e-59], N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[(0.0 - N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.34e-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 := \frac{F \cdot \sqrt{0.5}}{\sin B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -5.8 \cdot 10^{-40}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\

\mathbf{elif}\;F \leq -4.3 \cdot 10^{-178}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;F \leq 1.8 \cdot 10^{-59}:\\
\;\;\;\;\frac{x \cdot \cos B}{0 - \sin B}\\

\mathbf{elif}\;F \leq 1.34 \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 < -5.7999999999999998e-40

    1. Initial program 61.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. Simplified74.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.f6495.1%

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

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

    if -5.7999999999999998e-40 < F < -4.3e-178 or 1.8e-59 < F < 1.34e-5

    1. Initial program 99.3%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in 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. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(F, \left(\sqrt{\frac{1}{2 + {F}^{2}}}\right)\right), \sin \color{blue}{B}\right) \]
      4. 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), \sin B\right) \]
      5. /-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), \sin B\right) \]
      6. +-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), \sin B\right) \]
      7. 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), \sin B\right) \]
      8. *-lowering-*.f64N/A

        \[\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), \sin B\right) \]
      9. sin-lowering-sin.f6477.7%

        \[\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), \mathsf{sin.f64}\left(B\right)\right) \]
    5. Simplified77.7%

      \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + F \cdot F}}}{\sin B}} \]
    6. Taylor expanded in F around 0

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

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

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

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

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

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

    if -4.3e-178 < F < 1.8e-59

    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 x around inf

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \cos B}{\sin B}} \]
    4. 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.f6482.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) \]
    5. Simplified82.3%

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

    if 1.34e-5 < F

    1. Initial program 56.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. Simplified74.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} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification90.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -5.8 \cdot 10^{-40}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -4.3 \cdot 10^{-178}:\\ \;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\ \mathbf{elif}\;F \leq 1.8 \cdot 10^{-59}:\\ \;\;\;\;\frac{x \cdot \cos B}{0 - \sin B}\\ \mathbf{elif}\;F \leq 1.34 \cdot 10^{-5}:\\ \;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 77.5% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{F \cdot \sqrt{0.5}}{\sin B}\\ t_1 := \frac{x}{\tan B}\\ \mathbf{if}\;F \leq -1.9 \cdot 10^{-40}:\\ \;\;\;\;\frac{-1}{\sin B} - t\_1\\ \mathbf{elif}\;F \leq -2.3 \cdot 10^{-178}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;F \leq 5.5 \cdot 10^{-60}:\\ \;\;\;\;\frac{F}{B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 4.9 \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 0.5)) (sin B))) (t_1 (/ x (tan B))))
   (if (<= F -1.9e-40)
     (- (/ -1.0 (sin B)) t_1)
     (if (<= F -2.3e-178)
       t_0
       (if (<= F 5.5e-60)
         (- (* (/ F B) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) (/ x B))
         (if (<= F 4.9e-5) t_0 (- (/ 1.0 (sin B)) t_1)))))))
double code(double F, double B, double x) {
	double t_0 = (F * sqrt(0.5)) / sin(B);
	double t_1 = x / tan(B);
	double tmp;
	if (F <= -1.9e-40) {
		tmp = (-1.0 / sin(B)) - t_1;
	} else if (F <= -2.3e-178) {
		tmp = t_0;
	} else if (F <= 5.5e-60) {
		tmp = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
	} else if (F <= 4.9e-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(0.5d0)) / sin(b)
    t_1 = x / tan(b)
    if (f <= (-1.9d-40)) then
        tmp = ((-1.0d0) / sin(b)) - t_1
    else if (f <= (-2.3d-178)) then
        tmp = t_0
    else if (f <= 5.5d-60) then
        tmp = ((f / b) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - (x / b)
    else if (f <= 4.9d-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(0.5)) / Math.sin(B);
	double t_1 = x / Math.tan(B);
	double tmp;
	if (F <= -1.9e-40) {
		tmp = (-1.0 / Math.sin(B)) - t_1;
	} else if (F <= -2.3e-178) {
		tmp = t_0;
	} else if (F <= 5.5e-60) {
		tmp = ((F / B) * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
	} else if (F <= 4.9e-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(0.5)) / math.sin(B)
	t_1 = x / math.tan(B)
	tmp = 0
	if F <= -1.9e-40:
		tmp = (-1.0 / math.sin(B)) - t_1
	elif F <= -2.3e-178:
		tmp = t_0
	elif F <= 5.5e-60:
		tmp = ((F / B) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B)
	elif F <= 4.9e-5:
		tmp = t_0
	else:
		tmp = (1.0 / math.sin(B)) - t_1
	return tmp
function code(F, B, x)
	t_0 = Float64(Float64(F * sqrt(0.5)) / sin(B))
	t_1 = Float64(x / tan(B))
	tmp = 0.0
	if (F <= -1.9e-40)
		tmp = Float64(Float64(-1.0 / sin(B)) - t_1);
	elseif (F <= -2.3e-178)
		tmp = t_0;
	elseif (F <= 5.5e-60)
		tmp = Float64(Float64(Float64(F / B) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - Float64(x / B));
	elseif (F <= 4.9e-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(0.5)) / sin(B);
	t_1 = x / tan(B);
	tmp = 0.0;
	if (F <= -1.9e-40)
		tmp = (-1.0 / sin(B)) - t_1;
	elseif (F <= -2.3e-178)
		tmp = t_0;
	elseif (F <= 5.5e-60)
		tmp = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
	elseif (F <= 4.9e-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[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.9e-40], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -2.3e-178], t$95$0, If[LessEqual[F, 5.5e-60], N[(N[(N[(F / B), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.9e-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 := \frac{F \cdot \sqrt{0.5}}{\sin B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.9 \cdot 10^{-40}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\

\mathbf{elif}\;F \leq -2.3 \cdot 10^{-178}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;F \leq 5.5 \cdot 10^{-60}:\\
\;\;\;\;\frac{F}{B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - \frac{x}{B}\\

\mathbf{elif}\;F \leq 4.9 \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.8999999999999999e-40

    1. Initial program 61.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. Simplified74.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.f6495.1%

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

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

    if -1.8999999999999999e-40 < F < -2.29999999999999994e-178 or 5.4999999999999997e-60 < F < 4.9e-5

    1. Initial program 99.3%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in 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. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(F, \left(\sqrt{\frac{1}{2 + {F}^{2}}}\right)\right), \sin \color{blue}{B}\right) \]
      4. 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), \sin B\right) \]
      5. /-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), \sin B\right) \]
      6. +-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), \sin B\right) \]
      7. 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), \sin B\right) \]
      8. *-lowering-*.f64N/A

        \[\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), \sin B\right) \]
      9. sin-lowering-sin.f6477.7%

        \[\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), \mathsf{sin.f64}\left(B\right)\right) \]
    5. Simplified77.7%

      \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + F \cdot F}}}{\sin B}} \]
    6. Taylor expanded in F around 0

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

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

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

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

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

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

    if -2.29999999999999994e-178 < F < 5.4999999999999997e-60

    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-*.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. 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. metadata-evalN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F}{B} \cdot \sqrt{\frac{1}{2 + \left(\mathsf{neg}\left(-2\right)\right) \cdot x}}\right), \left(\frac{x}{B}\right)\right) \]
      6. cancel-sign-sub-invN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\frac{F}{B} \cdot \sqrt{\frac{1}{2 - -2 \cdot x}}\right), \left(\frac{x}{B}\right)\right) \]
      7. *-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) \]
      8. /-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) \]
      9. cancel-sign-sub-invN/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(F, B\right), \left(\sqrt{\frac{1}{2 + \left(\mathsf{neg}\left(-2\right)\right) \cdot x}}\right)\right), \left(\frac{x}{B}\right)\right) \]
      10. metadata-evalN/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) \]
      11. 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) \]
      12. /-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) \]
      13. +-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) \]
      14. *-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) \]
    8. Simplified60.2%

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

    if 4.9e-5 < F

    1. Initial program 56.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. Simplified74.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} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification84.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1.9 \cdot 10^{-40}:\\ \;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\ \mathbf{elif}\;F \leq -2.3 \cdot 10^{-178}:\\ \;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\ \mathbf{elif}\;F \leq 5.5 \cdot 10^{-60}:\\ \;\;\;\;\frac{F}{B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - \frac{x}{B}\\ \mathbf{elif}\;F \leq 4.9 \cdot 10^{-5}:\\ \;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 56.6% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;B \leq 4 \cdot 10^{-8}:\\
\;\;\;\;\frac{\frac{F}{\sqrt{F \cdot F + \left(2 + x \cdot 2\right)}} - x}{B}\\

\mathbf{elif}\;B \leq 3.2 \cdot 10^{+199}:\\
\;\;\;\;\frac{-1}{B \cdot \left(1 + B \cdot \left(B \cdot \left(-0.16666666666666666 + \left(B \cdot B\right) \cdot \left(0.008333333333333333 + B \cdot \left(B \cdot -0.0001984126984126984\right)\right)\right)\right)\right)} - t\_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if B < 4.0000000000000001e-8

    1. Initial program 71.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-*.f6455.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. Simplified55.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-rr55.2%

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

    if 4.0000000000000001e-8 < B < 3.20000000000000006e199

    1. Initial program 89.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. Simplified89.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.f6458.2%

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

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

      \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \color{blue}{\left(B \cdot \left(1 + {B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {B}^{2}\right) - \frac{1}{6}\right)\right)\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(-1, \mathsf{*.f64}\left(B, \left(1 + {B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {B}^{2}\right) - \frac{1}{6}\right)\right)\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(-1, \mathsf{*.f64}\left(B, \mathsf{+.f64}\left(1, \left({B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {B}^{2}\right) - \frac{1}{6}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{*.f64}\left(B, \mathsf{+.f64}\left(1, \left(\left(B \cdot B\right) \cdot \left({B}^{2} \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {B}^{2}\right) - \frac{1}{6}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{*.f64}\left(B, \mathsf{+.f64}\left(1, \left(B \cdot \left(B \cdot \left({B}^{2} \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {B}^{2}\right) - \frac{1}{6}\right)\right)\right)\right)\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(-1, \mathsf{*.f64}\left(B, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(B, \left(B \cdot \left({B}^{2} \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {B}^{2}\right) - \frac{1}{6}\right)\right)\right)\right)\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(-1, \mathsf{*.f64}\left(B, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(B, \mathsf{*.f64}\left(B, \left({B}^{2} \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {B}^{2}\right) - \frac{1}{6}\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      7. sub-negN/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{*.f64}\left(B, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(B, \mathsf{*.f64}\left(B, \left({B}^{2} \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {B}^{2}\right) + \left(\mathsf{neg}\left(\frac{1}{6}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      8. metadata-evalN/A

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{*.f64}\left(B, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(B, \mathsf{*.f64}\left(B, \left(\frac{-1}{6} + {B}^{2} \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {B}^{2}\right)\right)\right)\right)\right)\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(-1, \mathsf{*.f64}\left(B, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(B, \mathsf{*.f64}\left(B, \mathsf{+.f64}\left(\frac{-1}{6}, \left({B}^{2} \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {B}^{2}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      11. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{*.f64}\left(B, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(B, \mathsf{*.f64}\left(B, \mathsf{+.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(\left(B \cdot B\right), \left(\frac{1}{120} + \frac{-1}{5040} \cdot {B}^{2}\right)\right)\right)\right)\right)\right)\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(-1, \mathsf{*.f64}\left(B, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(B, \mathsf{*.f64}\left(B, \mathsf{+.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(B, B\right), \left(\frac{1}{120} + \frac{-1}{5040} \cdot {B}^{2}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      14. +-lowering-+.f64N/A

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{*.f64}\left(B, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(B, \mathsf{*.f64}\left(B, \mathsf{+.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{+.f64}\left(\frac{1}{120}, \left(\left(B \cdot B\right) \cdot \frac{-1}{5040}\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      17. associate-*l*N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{*.f64}\left(B, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(B, \mathsf{*.f64}\left(B, \mathsf{+.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{+.f64}\left(\frac{1}{120}, \left(B \cdot \left(B \cdot \frac{-1}{5040}\right)\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      18. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{*.f64}\left(B, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(B, \mathsf{*.f64}\left(B, \mathsf{+.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{+.f64}\left(\frac{1}{120}, \mathsf{*.f64}\left(B, \left(B \cdot \frac{-1}{5040}\right)\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      19. *-lowering-*.f6464.8%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{*.f64}\left(B, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(B, \mathsf{*.f64}\left(B, \mathsf{+.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{+.f64}\left(\frac{1}{120}, \mathsf{*.f64}\left(B, \mathsf{*.f64}\left(B, \frac{-1}{5040}\right)\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    10. Simplified64.8%

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

    if 3.20000000000000006e199 < B

    1. Initial program 81.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. Simplified81.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.f6465.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. Simplified65.5%

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

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

Alternative 18: 56.2% accurate, 2.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;B \leq 4 \cdot 10^{-8}:\\
\;\;\;\;\frac{\frac{F}{\sqrt{F \cdot F + \left(2 + x \cdot 2\right)}} - x}{B}\\

\mathbf{else}:\\
\;\;\;\;\frac{-1}{B \cdot \left(1 + B \cdot \left(B \cdot \left(-0.16666666666666666 + \left(B \cdot B\right) \cdot \left(0.008333333333333333 + B \cdot \left(B \cdot -0.0001984126984126984\right)\right)\right)\right)\right)} - \frac{x}{\tan B}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if B < 4.0000000000000001e-8

    1. Initial program 71.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-*.f6455.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. Simplified55.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-rr55.2%

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

    if 4.0000000000000001e-8 < B

    1. Initial program 85.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.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.f6461.4%

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

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

      \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \color{blue}{\left(B \cdot \left(1 + {B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {B}^{2}\right) - \frac{1}{6}\right)\right)\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(-1, \mathsf{*.f64}\left(B, \left(1 + {B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {B}^{2}\right) - \frac{1}{6}\right)\right)\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(-1, \mathsf{*.f64}\left(B, \mathsf{+.f64}\left(1, \left({B}^{2} \cdot \left({B}^{2} \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {B}^{2}\right) - \frac{1}{6}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{*.f64}\left(B, \mathsf{+.f64}\left(1, \left(\left(B \cdot B\right) \cdot \left({B}^{2} \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {B}^{2}\right) - \frac{1}{6}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{*.f64}\left(B, \mathsf{+.f64}\left(1, \left(B \cdot \left(B \cdot \left({B}^{2} \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {B}^{2}\right) - \frac{1}{6}\right)\right)\right)\right)\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(-1, \mathsf{*.f64}\left(B, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(B, \left(B \cdot \left({B}^{2} \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {B}^{2}\right) - \frac{1}{6}\right)\right)\right)\right)\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(-1, \mathsf{*.f64}\left(B, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(B, \mathsf{*.f64}\left(B, \left({B}^{2} \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {B}^{2}\right) - \frac{1}{6}\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      7. sub-negN/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{*.f64}\left(B, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(B, \mathsf{*.f64}\left(B, \left({B}^{2} \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {B}^{2}\right) + \left(\mathsf{neg}\left(\frac{1}{6}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      8. metadata-evalN/A

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{*.f64}\left(B, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(B, \mathsf{*.f64}\left(B, \left(\frac{-1}{6} + {B}^{2} \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {B}^{2}\right)\right)\right)\right)\right)\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(-1, \mathsf{*.f64}\left(B, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(B, \mathsf{*.f64}\left(B, \mathsf{+.f64}\left(\frac{-1}{6}, \left({B}^{2} \cdot \left(\frac{1}{120} + \frac{-1}{5040} \cdot {B}^{2}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      11. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{*.f64}\left(B, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(B, \mathsf{*.f64}\left(B, \mathsf{+.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(\left(B \cdot B\right), \left(\frac{1}{120} + \frac{-1}{5040} \cdot {B}^{2}\right)\right)\right)\right)\right)\right)\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(-1, \mathsf{*.f64}\left(B, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(B, \mathsf{*.f64}\left(B, \mathsf{+.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(B, B\right), \left(\frac{1}{120} + \frac{-1}{5040} \cdot {B}^{2}\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      14. +-lowering-+.f64N/A

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{*.f64}\left(B, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(B, \mathsf{*.f64}\left(B, \mathsf{+.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{+.f64}\left(\frac{1}{120}, \left(\left(B \cdot B\right) \cdot \frac{-1}{5040}\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      17. associate-*l*N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{*.f64}\left(B, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(B, \mathsf{*.f64}\left(B, \mathsf{+.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{+.f64}\left(\frac{1}{120}, \left(B \cdot \left(B \cdot \frac{-1}{5040}\right)\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      18. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{*.f64}\left(B, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(B, \mathsf{*.f64}\left(B, \mathsf{+.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{+.f64}\left(\frac{1}{120}, \mathsf{*.f64}\left(B, \left(B \cdot \frac{-1}{5040}\right)\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      19. *-lowering-*.f6460.9%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{*.f64}\left(B, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(B, \mathsf{*.f64}\left(B, \mathsf{+.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{+.f64}\left(\frac{1}{120}, \mathsf{*.f64}\left(B, \mathsf{*.f64}\left(B, \frac{-1}{5040}\right)\right)\right)\right)\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    10. Simplified60.9%

      \[\leadsto \frac{-1}{\color{blue}{B \cdot \left(1 + B \cdot \left(B \cdot \left(-0.16666666666666666 + \left(B \cdot B\right) \cdot \left(0.008333333333333333 + B \cdot \left(B \cdot -0.0001984126984126984\right)\right)\right)\right)\right)}} - \frac{x}{\tan B} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification56.7%

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

Alternative 19: 56.1% accurate, 2.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;B \leq 2.15 \cdot 10^{-8}:\\
\;\;\;\;\frac{\frac{F}{\sqrt{F \cdot F + \left(2 + x \cdot 2\right)}} - x}{B}\\

\mathbf{else}:\\
\;\;\;\;\frac{-1}{B \cdot \left(1 + B \cdot \left(B \cdot \left(-0.16666666666666666 + \left(B \cdot B\right) \cdot 0.008333333333333333\right)\right)\right)} - \frac{x}{\tan B}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if B < 2.1500000000000001e-8

    1. Initial program 71.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-*.f6455.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. Simplified55.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-rr55.2%

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

    if 2.1500000000000001e-8 < B

    1. Initial program 85.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.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.f6461.4%

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

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

      \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \color{blue}{\left(B \cdot \left(1 + {B}^{2} \cdot \left(\frac{1}{120} \cdot {B}^{2} - \frac{1}{6}\right)\right)\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(-1, \mathsf{*.f64}\left(B, \left(1 + {B}^{2} \cdot \left(\frac{1}{120} \cdot {B}^{2} - \frac{1}{6}\right)\right)\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(-1, \mathsf{*.f64}\left(B, \mathsf{+.f64}\left(1, \left({B}^{2} \cdot \left(\frac{1}{120} \cdot {B}^{2} - \frac{1}{6}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      3. unpow2N/A

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{*.f64}\left(B, \mathsf{+.f64}\left(1, \left(B \cdot \left(B \cdot \left(\frac{1}{120} \cdot {B}^{2} - \frac{1}{6}\right)\right)\right)\right)\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(-1, \mathsf{*.f64}\left(B, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(B, \left(B \cdot \left(\frac{1}{120} \cdot {B}^{2} - \frac{1}{6}\right)\right)\right)\right)\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(-1, \mathsf{*.f64}\left(B, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(B, \mathsf{*.f64}\left(B, \left(\frac{1}{120} \cdot {B}^{2} - \frac{1}{6}\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      7. sub-negN/A

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{*.f64}\left(B, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(B, \mathsf{*.f64}\left(B, \left(\frac{-1}{6} + \frac{1}{120} \cdot {B}^{2}\right)\right)\right)\right)\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(-1, \mathsf{*.f64}\left(B, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(B, \mathsf{*.f64}\left(B, \mathsf{+.f64}\left(\frac{-1}{6}, \left(\frac{1}{120} \cdot {B}^{2}\right)\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      11. *-commutativeN/A

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{*.f64}\left(B, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(B, \mathsf{*.f64}\left(B, \mathsf{+.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(\left(B \cdot B\right), \frac{1}{120}\right)\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      14. *-lowering-*.f6460.7%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{*.f64}\left(B, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(B, \mathsf{*.f64}\left(B, \mathsf{+.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(B, B\right), \frac{1}{120}\right)\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    10. Simplified60.7%

      \[\leadsto \frac{-1}{\color{blue}{B \cdot \left(1 + B \cdot \left(B \cdot \left(-0.16666666666666666 + \left(B \cdot B\right) \cdot 0.008333333333333333\right)\right)\right)}} - \frac{x}{\tan B} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification56.7%

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

Alternative 20: 57.5% accurate, 2.7× speedup?

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

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

\mathbf{elif}\;x \leq 4.6 \cdot 10^{-141}:\\
\;\;\;\;\sqrt{\frac{1}{F \cdot F + 2}} \cdot \frac{F}{B}\\

\mathbf{elif}\;x \leq 10^{-27}:\\
\;\;\;\;\frac{1}{\sin B}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -5.49999999999999977e-133 or 1e-27 < x

    1. Initial program 76.3%

      \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
    2. Step-by-step derivation
      1. +-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. Simplified91.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.f6480.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. Simplified80.3%

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

      \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \color{blue}{B}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
    9. Step-by-step derivation
      1. Simplified82.3%

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

      if -5.49999999999999977e-133 < x < 4.5999999999999999e-141

      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-*.f6442.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. Simplified42.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 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-*.f6429.8%

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

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

      if 4.5999999999999999e-141 < x < 1e-27

      1. Initial program 73.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 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. /-lowering-/.f64N/A

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

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(F, \left(\sqrt{\frac{1}{2 + {F}^{2}}}\right)\right), \sin \color{blue}{B}\right) \]
        4. 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), \sin B\right) \]
        5. /-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), \sin B\right) \]
        6. +-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), \sin B\right) \]
        7. 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), \sin B\right) \]
        8. *-lowering-*.f64N/A

          \[\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), \sin B\right) \]
        9. sin-lowering-sin.f6448.2%

          \[\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), \mathsf{sin.f64}\left(B\right)\right) \]
      5. Simplified48.2%

        \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + F \cdot F}}}{\sin B}} \]
      6. Taylor expanded in F around inf

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

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

          \[\leadsto \mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right) \]
      8. Simplified38.7%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -5.5 \cdot 10^{-133}:\\ \;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{elif}\;x \leq 4.6 \cdot 10^{-141}:\\ \;\;\;\;\sqrt{\frac{1}{F \cdot F + 2}} \cdot \frac{F}{B}\\ \mathbf{elif}\;x \leq 10^{-27}:\\ \;\;\;\;\frac{1}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\ \end{array} \]
    12. Add Preprocessing

    Alternative 21: 55.6% accurate, 2.7× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{if}\;x \leq -4 \cdot 10^{-78}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq -8.8 \cdot 10^{-234}:\\ \;\;\;\;0 - \frac{x}{B}\\ \mathbf{elif}\;x \leq 10^{-95}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
    (FPCore (F B x)
     :precision binary64
     (let* ((t_0 (- (/ -1.0 B) (/ x (tan B)))))
       (if (<= x -4e-78)
         t_0
         (if (<= x -8.8e-234)
           (- 0.0 (/ x B))
           (if (<= x 1e-95) (/ -1.0 (sin B)) t_0)))))
    double code(double F, double B, double x) {
    	double t_0 = (-1.0 / B) - (x / tan(B));
    	double tmp;
    	if (x <= -4e-78) {
    		tmp = t_0;
    	} else if (x <= -8.8e-234) {
    		tmp = 0.0 - (x / B);
    	} else if (x <= 1e-95) {
    		tmp = -1.0 / sin(B);
    	} else {
    		tmp = t_0;
    	}
    	return tmp;
    }
    
    real(8) function code(f, b, x)
        real(8), intent (in) :: f
        real(8), intent (in) :: b
        real(8), intent (in) :: x
        real(8) :: t_0
        real(8) :: tmp
        t_0 = ((-1.0d0) / b) - (x / tan(b))
        if (x <= (-4d-78)) then
            tmp = t_0
        else if (x <= (-8.8d-234)) then
            tmp = 0.0d0 - (x / b)
        else if (x <= 1d-95) then
            tmp = (-1.0d0) / sin(b)
        else
            tmp = t_0
        end if
        code = tmp
    end function
    
    public static double code(double F, double B, double x) {
    	double t_0 = (-1.0 / B) - (x / Math.tan(B));
    	double tmp;
    	if (x <= -4e-78) {
    		tmp = t_0;
    	} else if (x <= -8.8e-234) {
    		tmp = 0.0 - (x / B);
    	} else if (x <= 1e-95) {
    		tmp = -1.0 / Math.sin(B);
    	} else {
    		tmp = t_0;
    	}
    	return tmp;
    }
    
    def code(F, B, x):
    	t_0 = (-1.0 / B) - (x / math.tan(B))
    	tmp = 0
    	if x <= -4e-78:
    		tmp = t_0
    	elif x <= -8.8e-234:
    		tmp = 0.0 - (x / B)
    	elif x <= 1e-95:
    		tmp = -1.0 / math.sin(B)
    	else:
    		tmp = t_0
    	return tmp
    
    function code(F, B, x)
    	t_0 = Float64(Float64(-1.0 / B) - Float64(x / tan(B)))
    	tmp = 0.0
    	if (x <= -4e-78)
    		tmp = t_0;
    	elseif (x <= -8.8e-234)
    		tmp = Float64(0.0 - Float64(x / B));
    	elseif (x <= 1e-95)
    		tmp = Float64(-1.0 / sin(B));
    	else
    		tmp = t_0;
    	end
    	return tmp
    end
    
    function tmp_2 = code(F, B, x)
    	t_0 = (-1.0 / B) - (x / tan(B));
    	tmp = 0.0;
    	if (x <= -4e-78)
    		tmp = t_0;
    	elseif (x <= -8.8e-234)
    		tmp = 0.0 - (x / B);
    	elseif (x <= 1e-95)
    		tmp = -1.0 / sin(B);
    	else
    		tmp = t_0;
    	end
    	tmp_2 = tmp;
    end
    
    code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4e-78], t$95$0, If[LessEqual[x, -8.8e-234], N[(0.0 - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1e-95], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], t$95$0]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\
    \mathbf{if}\;x \leq -4 \cdot 10^{-78}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;x \leq -8.8 \cdot 10^{-234}:\\
    \;\;\;\;0 - \frac{x}{B}\\
    
    \mathbf{elif}\;x \leq 10^{-95}:\\
    \;\;\;\;\frac{-1}{\sin B}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_0\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if x < -4e-78 or 9.99999999999999989e-96 < x

      1. Initial program 75.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. 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. 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.f6478.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. Simplified78.3%

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \color{blue}{B}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
      9. Step-by-step derivation
        1. Simplified81.6%

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

        if -4e-78 < x < -8.7999999999999996e-234

        1. Initial program 84.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-*.f6453.7%

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

          \[\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(-1 \cdot x\right)}, B\right) \]
        7. Step-by-step derivation
          1. mul-1-negN/A

            \[\leadsto \mathsf{/.f64}\left(\left(\mathsf{neg}\left(x\right)\right), B\right) \]
          2. neg-sub0N/A

            \[\leadsto \mathsf{/.f64}\left(\left(0 - x\right), B\right) \]
          3. --lowering--.f6431.0%

            \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, x\right), B\right) \]
        8. Simplified31.0%

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

        if -8.7999999999999996e-234 < x < 9.99999999999999989e-96

        1. Initial program 70.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 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. /-lowering-/.f64N/A

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

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(F, \left(\sqrt{\frac{1}{2 + {F}^{2}}}\right)\right), \sin \color{blue}{B}\right) \]
          4. 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), \sin B\right) \]
          5. /-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), \sin B\right) \]
          6. +-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), \sin B\right) \]
          7. 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), \sin B\right) \]
          8. *-lowering-*.f64N/A

            \[\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), \sin B\right) \]
          9. sin-lowering-sin.f6460.7%

            \[\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), \mathsf{sin.f64}\left(B\right)\right) \]
        5. Simplified60.7%

          \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + F \cdot F}}}{\sin B}} \]
        6. Taylor expanded in F around -inf

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

            \[\leadsto \mathsf{/.f64}\left(-1, \color{blue}{\sin B}\right) \]
          2. sin-lowering-sin.f6430.6%

            \[\leadsto \mathsf{/.f64}\left(-1, \mathsf{sin.f64}\left(B\right)\right) \]
        8. Simplified30.6%

          \[\leadsto \color{blue}{\frac{-1}{\sin B}} \]
      10. Recombined 3 regimes into one program.
      11. Final simplification60.2%

        \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -4 \cdot 10^{-78}:\\ \;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\ \mathbf{elif}\;x \leq -8.8 \cdot 10^{-234}:\\ \;\;\;\;0 - \frac{x}{B}\\ \mathbf{elif}\;x \leq 10^{-95}:\\ \;\;\;\;\frac{-1}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\ \end{array} \]
      12. Add Preprocessing

      Alternative 22: 42.6% accurate, 2.7× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -2.4 \cdot 10^{-151}:\\ \;\;\;\;\frac{\frac{B \cdot \left(-1 - x\right)}{B}}{B}\\ \mathbf{elif}\;F \leq 6.5 \cdot 10^{-9}:\\ \;\;\;\;0 - \frac{x}{B}\\ \mathbf{elif}\;F \leq 3 \cdot 10^{+224}:\\ \;\;\;\;\frac{\frac{F}{\sin B}}{F}\\ \mathbf{else}:\\ \;\;\;\;\frac{F \cdot \frac{1}{F} - x}{B}\\ \end{array} \end{array} \]
      (FPCore (F B x)
       :precision binary64
       (if (<= F -2.4e-151)
         (/ (/ (* B (- -1.0 x)) B) B)
         (if (<= F 6.5e-9)
           (- 0.0 (/ x B))
           (if (<= F 3e+224) (/ (/ F (sin B)) F) (/ (- (* F (/ 1.0 F)) x) B)))))
      double code(double F, double B, double x) {
      	double tmp;
      	if (F <= -2.4e-151) {
      		tmp = ((B * (-1.0 - x)) / B) / B;
      	} else if (F <= 6.5e-9) {
      		tmp = 0.0 - (x / B);
      	} else if (F <= 3e+224) {
      		tmp = (F / sin(B)) / F;
      	} else {
      		tmp = ((F * (1.0 / F)) - x) / B;
      	}
      	return tmp;
      }
      
      real(8) function code(f, b, x)
          real(8), intent (in) :: f
          real(8), intent (in) :: b
          real(8), intent (in) :: x
          real(8) :: tmp
          if (f <= (-2.4d-151)) then
              tmp = ((b * ((-1.0d0) - x)) / b) / b
          else if (f <= 6.5d-9) then
              tmp = 0.0d0 - (x / b)
          else if (f <= 3d+224) then
              tmp = (f / sin(b)) / f
          else
              tmp = ((f * (1.0d0 / f)) - x) / b
          end if
          code = tmp
      end function
      
      public static double code(double F, double B, double x) {
      	double tmp;
      	if (F <= -2.4e-151) {
      		tmp = ((B * (-1.0 - x)) / B) / B;
      	} else if (F <= 6.5e-9) {
      		tmp = 0.0 - (x / B);
      	} else if (F <= 3e+224) {
      		tmp = (F / Math.sin(B)) / F;
      	} else {
      		tmp = ((F * (1.0 / F)) - x) / B;
      	}
      	return tmp;
      }
      
      def code(F, B, x):
      	tmp = 0
      	if F <= -2.4e-151:
      		tmp = ((B * (-1.0 - x)) / B) / B
      	elif F <= 6.5e-9:
      		tmp = 0.0 - (x / B)
      	elif F <= 3e+224:
      		tmp = (F / math.sin(B)) / F
      	else:
      		tmp = ((F * (1.0 / F)) - x) / B
      	return tmp
      
      function code(F, B, x)
      	tmp = 0.0
      	if (F <= -2.4e-151)
      		tmp = Float64(Float64(Float64(B * Float64(-1.0 - x)) / B) / B);
      	elseif (F <= 6.5e-9)
      		tmp = Float64(0.0 - Float64(x / B));
      	elseif (F <= 3e+224)
      		tmp = Float64(Float64(F / sin(B)) / F);
      	else
      		tmp = Float64(Float64(Float64(F * Float64(1.0 / F)) - x) / B);
      	end
      	return tmp
      end
      
      function tmp_2 = code(F, B, x)
      	tmp = 0.0;
      	if (F <= -2.4e-151)
      		tmp = ((B * (-1.0 - x)) / B) / B;
      	elseif (F <= 6.5e-9)
      		tmp = 0.0 - (x / B);
      	elseif (F <= 3e+224)
      		tmp = (F / sin(B)) / F;
      	else
      		tmp = ((F * (1.0 / F)) - x) / B;
      	end
      	tmp_2 = tmp;
      end
      
      code[F_, B_, x_] := If[LessEqual[F, -2.4e-151], N[(N[(N[(B * N[(-1.0 - x), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 6.5e-9], N[(0.0 - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3e+224], N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision], N[(N[(N[(F * N[(1.0 / F), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;F \leq -2.4 \cdot 10^{-151}:\\
      \;\;\;\;\frac{\frac{B \cdot \left(-1 - x\right)}{B}}{B}\\
      
      \mathbf{elif}\;F \leq 6.5 \cdot 10^{-9}:\\
      \;\;\;\;0 - \frac{x}{B}\\
      
      \mathbf{elif}\;F \leq 3 \cdot 10^{+224}:\\
      \;\;\;\;\frac{\frac{F}{\sin B}}{F}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{F \cdot \frac{1}{F} - x}{B}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 4 regimes
      2. if F < -2.4e-151

        1. Initial program 69.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-*.f6437.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. Simplified37.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--.f6441.1%

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

          \[\leadsto \color{blue}{\frac{-1 - x}{B}} \]
        9. Step-by-step derivation
          1. div-subN/A

            \[\leadsto \frac{-1}{B} - \color{blue}{\frac{x}{B}} \]
          2. frac-subN/A

            \[\leadsto \frac{-1 \cdot B - B \cdot x}{\color{blue}{B \cdot B}} \]
          3. fmm-defN/A

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

            \[\leadsto \frac{\mathsf{fma}\left(-1, B, \mathsf{neg}\left(x \cdot B\right)\right)}{B \cdot B} \]
          5. associate-/r*N/A

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

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

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{fma}\left(-1, B, \mathsf{neg}\left(x \cdot B\right)\right)\right), B\right), B\right) \]
          8. *-commutativeN/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{fma}\left(-1, B, \mathsf{neg}\left(B \cdot x\right)\right)\right), B\right), B\right) \]
          9. fmm-defN/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(-1 \cdot B - B \cdot x\right), B\right), B\right) \]
          10. *-commutativeN/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(-1 \cdot B - x \cdot B\right), B\right), B\right) \]
          11. distribute-rgt-out--N/A

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

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \left(-1 - x\right)\right), B\right), B\right) \]
          13. --lowering--.f6441.2%

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \mathsf{\_.f64}\left(-1, x\right)\right), B\right), B\right) \]
        10. Applied egg-rr41.2%

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

        if -2.4e-151 < F < 6.5000000000000003e-9

        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-*.f6458.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. Simplified58.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 0

          \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(-1 \cdot x\right)}, B\right) \]
        7. Step-by-step derivation
          1. mul-1-negN/A

            \[\leadsto \mathsf{/.f64}\left(\left(\mathsf{neg}\left(x\right)\right), B\right) \]
          2. neg-sub0N/A

            \[\leadsto \mathsf{/.f64}\left(\left(0 - x\right), B\right) \]
          3. --lowering--.f6445.3%

            \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, x\right), B\right) \]
        8. Simplified45.3%

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

        if 6.5000000000000003e-9 < F < 3.0000000000000001e224

        1. Initial program 69.8%

          \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
        2. Add Preprocessing
        3. Taylor expanded in 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. /-lowering-/.f64N/A

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

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(F, \left(\sqrt{\frac{1}{2 + {F}^{2}}}\right)\right), \sin \color{blue}{B}\right) \]
          4. 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), \sin B\right) \]
          5. /-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), \sin B\right) \]
          6. +-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), \sin B\right) \]
          7. 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), \sin B\right) \]
          8. *-lowering-*.f64N/A

            \[\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), \sin B\right) \]
          9. sin-lowering-sin.f6438.1%

            \[\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), \mathsf{sin.f64}\left(B\right)\right) \]
        5. Simplified38.1%

          \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + F \cdot F}}}{\sin B}} \]
        6. Taylor expanded in F around inf

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

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

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(F \cdot F\right)\right)\right)\right), \mathsf{sin.f64}\left(B\right)\right) \]
          3. *-lowering-*.f6434.4%

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(F, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(F, F\right)\right)\right)\right), \mathsf{sin.f64}\left(B\right)\right) \]
        8. Simplified34.4%

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

            \[\leadsto F \cdot \color{blue}{\frac{\sqrt{\frac{1}{F \cdot F}}}{\sin B}} \]
          2. sqrt-divN/A

            \[\leadsto F \cdot \frac{\frac{\sqrt{1}}{\sqrt{F \cdot F}}}{\sin \color{blue}{B}} \]
          3. metadata-evalN/A

            \[\leadsto F \cdot \frac{\frac{1}{\sqrt{F \cdot F}}}{\sin B} \]
          4. associate-/l/N/A

            \[\leadsto F \cdot \frac{1}{\color{blue}{\sin B \cdot \sqrt{F \cdot F}}} \]
          5. un-div-invN/A

            \[\leadsto \frac{F}{\color{blue}{\sin B \cdot \sqrt{F \cdot F}}} \]
          6. sqrt-prodN/A

            \[\leadsto \frac{F}{\sin B \cdot \left(\sqrt{F} \cdot \color{blue}{\sqrt{F}}\right)} \]
          7. rem-square-sqrtN/A

            \[\leadsto \frac{F}{\sin B \cdot F} \]
          8. *-lft-identityN/A

            \[\leadsto \frac{1 \cdot F}{\color{blue}{\sin B} \cdot F} \]
          9. frac-timesN/A

            \[\leadsto \frac{1}{\sin B} \cdot \color{blue}{\frac{F}{F}} \]
          10. associate-*r/N/A

            \[\leadsto \frac{\frac{1}{\sin B} \cdot F}{\color{blue}{F}} \]
          11. /-lowering-/.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{\sin B} \cdot F\right), \color{blue}{F}\right) \]
          12. associate-*l/N/A

            \[\leadsto \mathsf{/.f64}\left(\left(\frac{1 \cdot F}{\sin B}\right), F\right) \]
          13. *-lft-identityN/A

            \[\leadsto \mathsf{/.f64}\left(\left(\frac{F}{\sin B}\right), F\right) \]
          14. /-lowering-/.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(F, \sin B\right), F\right) \]
          15. sin-lowering-sin.f6456.1%

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(F, \mathsf{sin.f64}\left(B\right)\right), F\right) \]
        10. Applied egg-rr56.1%

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

        if 3.0000000000000001e224 < F

        1. Initial program 35.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-*.f6433.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. Simplified33.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 inf

          \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \color{blue}{\left(\frac{1}{F}\right)}\right), x\right), B\right) \]
        7. Step-by-step derivation
          1. /-lowering-/.f6451.4%

            \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{/.f64}\left(1, F\right)\right), x\right), B\right) \]
        8. Simplified51.4%

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -2.4 \cdot 10^{-151}:\\ \;\;\;\;\frac{\frac{B \cdot \left(-1 - x\right)}{B}}{B}\\ \mathbf{elif}\;F \leq 6.5 \cdot 10^{-9}:\\ \;\;\;\;0 - \frac{x}{B}\\ \mathbf{elif}\;F \leq 3 \cdot 10^{+224}:\\ \;\;\;\;\frac{\frac{F}{\sin B}}{F}\\ \mathbf{else}:\\ \;\;\;\;\frac{F \cdot \frac{1}{F} - x}{B}\\ \end{array} \]
      5. Add Preprocessing

      Alternative 23: 56.0% accurate, 2.7× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq 4 \cdot 10^{-8}:\\ \;\;\;\;\frac{\frac{F}{\sqrt{F \cdot F + \left(2 + x \cdot 2\right)}} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{-1}{B \cdot \left(1 + -0.16666666666666666 \cdot \left(B \cdot B\right)\right)} - \frac{x}{\tan B}\\ \end{array} \end{array} \]
      (FPCore (F B x)
       :precision binary64
       (if (<= B 4e-8)
         (/ (- (/ F (sqrt (+ (* F F) (+ 2.0 (* x 2.0))))) x) B)
         (- (/ -1.0 (* B (+ 1.0 (* -0.16666666666666666 (* B B))))) (/ x (tan B)))))
      double code(double F, double B, double x) {
      	double tmp;
      	if (B <= 4e-8) {
      		tmp = ((F / sqrt(((F * F) + (2.0 + (x * 2.0))))) - x) / B;
      	} else {
      		tmp = (-1.0 / (B * (1.0 + (-0.16666666666666666 * (B * B))))) - (x / tan(B));
      	}
      	return tmp;
      }
      
      real(8) function code(f, b, x)
          real(8), intent (in) :: f
          real(8), intent (in) :: b
          real(8), intent (in) :: x
          real(8) :: tmp
          if (b <= 4d-8) then
              tmp = ((f / sqrt(((f * f) + (2.0d0 + (x * 2.0d0))))) - x) / b
          else
              tmp = ((-1.0d0) / (b * (1.0d0 + ((-0.16666666666666666d0) * (b * b))))) - (x / tan(b))
          end if
          code = tmp
      end function
      
      public static double code(double F, double B, double x) {
      	double tmp;
      	if (B <= 4e-8) {
      		tmp = ((F / Math.sqrt(((F * F) + (2.0 + (x * 2.0))))) - x) / B;
      	} else {
      		tmp = (-1.0 / (B * (1.0 + (-0.16666666666666666 * (B * B))))) - (x / Math.tan(B));
      	}
      	return tmp;
      }
      
      def code(F, B, x):
      	tmp = 0
      	if B <= 4e-8:
      		tmp = ((F / math.sqrt(((F * F) + (2.0 + (x * 2.0))))) - x) / B
      	else:
      		tmp = (-1.0 / (B * (1.0 + (-0.16666666666666666 * (B * B))))) - (x / math.tan(B))
      	return tmp
      
      function code(F, B, x)
      	tmp = 0.0
      	if (B <= 4e-8)
      		tmp = Float64(Float64(Float64(F / sqrt(Float64(Float64(F * F) + Float64(2.0 + Float64(x * 2.0))))) - x) / B);
      	else
      		tmp = Float64(Float64(-1.0 / Float64(B * Float64(1.0 + Float64(-0.16666666666666666 * Float64(B * B))))) - Float64(x / tan(B)));
      	end
      	return tmp
      end
      
      function tmp_2 = code(F, B, x)
      	tmp = 0.0;
      	if (B <= 4e-8)
      		tmp = ((F / sqrt(((F * F) + (2.0 + (x * 2.0))))) - x) / B;
      	else
      		tmp = (-1.0 / (B * (1.0 + (-0.16666666666666666 * (B * B))))) - (x / tan(B));
      	end
      	tmp_2 = tmp;
      end
      
      code[F_, B_, x_] := If[LessEqual[B, 4e-8], 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[(N[(-1.0 / N[(B * N[(1.0 + N[(-0.16666666666666666 * N[(B * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;B \leq 4 \cdot 10^{-8}:\\
      \;\;\;\;\frac{\frac{F}{\sqrt{F \cdot F + \left(2 + x \cdot 2\right)}} - x}{B}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{-1}{B \cdot \left(1 + -0.16666666666666666 \cdot \left(B \cdot B\right)\right)} - \frac{x}{\tan B}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if B < 4.0000000000000001e-8

        1. Initial program 71.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-*.f6455.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. Simplified55.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-rr55.2%

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

        if 4.0000000000000001e-8 < B

        1. Initial program 85.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.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.f6461.4%

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

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

          \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \color{blue}{\left(B \cdot \left(1 + \frac{-1}{6} \cdot {B}^{2}\right)\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(-1, \mathsf{*.f64}\left(B, \left(1 + \frac{-1}{6} \cdot {B}^{2}\right)\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(-1, \mathsf{*.f64}\left(B, \mathsf{+.f64}\left(1, \left(\frac{-1}{6} \cdot {B}^{2}\right)\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
          3. *-commutativeN/A

            \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{*.f64}\left(B, \mathsf{+.f64}\left(1, \left({B}^{2} \cdot \frac{-1}{6}\right)\right)\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(-1, \mathsf{*.f64}\left(B, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left({B}^{2}\right), \frac{-1}{6}\right)\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
          5. unpow2N/A

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

            \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{*.f64}\left(B, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(B, B\right), \frac{-1}{6}\right)\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
        10. Simplified60.3%

          \[\leadsto \frac{-1}{\color{blue}{B \cdot \left(1 + \left(B \cdot B\right) \cdot -0.16666666666666666\right)}} - \frac{x}{\tan B} \]
      3. Recombined 2 regimes into one program.
      4. Final simplification56.6%

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

      Alternative 24: 56.0% accurate, 2.7× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq 4 \cdot 10^{-8}:\\ \;\;\;\;\frac{F \cdot \sqrt{\frac{1}{F \cdot F + 2}} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{-1}{B \cdot \left(1 + -0.16666666666666666 \cdot \left(B \cdot B\right)\right)} - \frac{x}{\tan B}\\ \end{array} \end{array} \]
      (FPCore (F B x)
       :precision binary64
       (if (<= B 4e-8)
         (/ (- (* F (sqrt (/ 1.0 (+ (* F F) 2.0)))) x) B)
         (- (/ -1.0 (* B (+ 1.0 (* -0.16666666666666666 (* B B))))) (/ x (tan B)))))
      double code(double F, double B, double x) {
      	double tmp;
      	if (B <= 4e-8) {
      		tmp = ((F * sqrt((1.0 / ((F * F) + 2.0)))) - x) / B;
      	} else {
      		tmp = (-1.0 / (B * (1.0 + (-0.16666666666666666 * (B * B))))) - (x / tan(B));
      	}
      	return tmp;
      }
      
      real(8) function code(f, b, x)
          real(8), intent (in) :: f
          real(8), intent (in) :: b
          real(8), intent (in) :: x
          real(8) :: tmp
          if (b <= 4d-8) then
              tmp = ((f * sqrt((1.0d0 / ((f * f) + 2.0d0)))) - x) / b
          else
              tmp = ((-1.0d0) / (b * (1.0d0 + ((-0.16666666666666666d0) * (b * b))))) - (x / tan(b))
          end if
          code = tmp
      end function
      
      public static double code(double F, double B, double x) {
      	double tmp;
      	if (B <= 4e-8) {
      		tmp = ((F * Math.sqrt((1.0 / ((F * F) + 2.0)))) - x) / B;
      	} else {
      		tmp = (-1.0 / (B * (1.0 + (-0.16666666666666666 * (B * B))))) - (x / Math.tan(B));
      	}
      	return tmp;
      }
      
      def code(F, B, x):
      	tmp = 0
      	if B <= 4e-8:
      		tmp = ((F * math.sqrt((1.0 / ((F * F) + 2.0)))) - x) / B
      	else:
      		tmp = (-1.0 / (B * (1.0 + (-0.16666666666666666 * (B * B))))) - (x / math.tan(B))
      	return tmp
      
      function code(F, B, x)
      	tmp = 0.0
      	if (B <= 4e-8)
      		tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(Float64(F * F) + 2.0)))) - x) / B);
      	else
      		tmp = Float64(Float64(-1.0 / Float64(B * Float64(1.0 + Float64(-0.16666666666666666 * Float64(B * B))))) - Float64(x / tan(B)));
      	end
      	return tmp
      end
      
      function tmp_2 = code(F, B, x)
      	tmp = 0.0;
      	if (B <= 4e-8)
      		tmp = ((F * sqrt((1.0 / ((F * F) + 2.0)))) - x) / B;
      	else
      		tmp = (-1.0 / (B * (1.0 + (-0.16666666666666666 * (B * B))))) - (x / tan(B));
      	end
      	tmp_2 = tmp;
      end
      
      code[F_, B_, x_] := If[LessEqual[B, 4e-8], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(-1.0 / N[(B * N[(1.0 + N[(-0.16666666666666666 * N[(B * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;B \leq 4 \cdot 10^{-8}:\\
      \;\;\;\;\frac{F \cdot \sqrt{\frac{1}{F \cdot F + 2}} - x}{B}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{-1}{B \cdot \left(1 + -0.16666666666666666 \cdot \left(B \cdot B\right)\right)} - \frac{x}{\tan B}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if B < 4.0000000000000001e-8

        1. Initial program 71.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-*.f6455.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. Simplified55.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 x around 0

          \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\color{blue}{\left(F \cdot \sqrt{\frac{1}{2 + {F}^{2}}}\right)}, x\right), B\right) \]
        7. 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), x\right), B\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), x\right), B\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), 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, \mathsf{+.f64}\left(2, \left({F}^{2}\right)\right)\right)\right)\right), x\right), B\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), x\right), B\right) \]
          6. *-lowering-*.f6455.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(F, F\right)\right)\right)\right)\right), x\right), B\right) \]
        8. Simplified55.1%

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

        if 4.0000000000000001e-8 < B

        1. Initial program 85.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.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.f6461.4%

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

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

          \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \color{blue}{\left(B \cdot \left(1 + \frac{-1}{6} \cdot {B}^{2}\right)\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(-1, \mathsf{*.f64}\left(B, \left(1 + \frac{-1}{6} \cdot {B}^{2}\right)\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(-1, \mathsf{*.f64}\left(B, \mathsf{+.f64}\left(1, \left(\frac{-1}{6} \cdot {B}^{2}\right)\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
          3. *-commutativeN/A

            \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{*.f64}\left(B, \mathsf{+.f64}\left(1, \left({B}^{2} \cdot \frac{-1}{6}\right)\right)\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(-1, \mathsf{*.f64}\left(B, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left({B}^{2}\right), \frac{-1}{6}\right)\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
          5. unpow2N/A

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

            \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{*.f64}\left(B, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(B, B\right), \frac{-1}{6}\right)\right)\right)\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
        10. Simplified60.3%

          \[\leadsto \frac{-1}{\color{blue}{B \cdot \left(1 + \left(B \cdot B\right) \cdot -0.16666666666666666\right)}} - \frac{x}{\tan B} \]
      3. Recombined 2 regimes into one program.
      4. Final simplification56.5%

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

      Alternative 25: 43.9% accurate, 2.7× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -2.4 \cdot 10^{-151}:\\ \;\;\;\;\frac{\frac{B \cdot \left(-1 - x\right)}{B}}{B}\\ \mathbf{elif}\;F \leq 6.8 \cdot 10^{-9}:\\ \;\;\;\;0 - \frac{x}{B}\\ \mathbf{elif}\;F \leq 2.7 \cdot 10^{+224}:\\ \;\;\;\;\frac{1}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{F \cdot \frac{1}{F} - x}{B}\\ \end{array} \end{array} \]
      (FPCore (F B x)
       :precision binary64
       (if (<= F -2.4e-151)
         (/ (/ (* B (- -1.0 x)) B) B)
         (if (<= F 6.8e-9)
           (- 0.0 (/ x B))
           (if (<= F 2.7e+224) (/ 1.0 (sin B)) (/ (- (* F (/ 1.0 F)) x) B)))))
      double code(double F, double B, double x) {
      	double tmp;
      	if (F <= -2.4e-151) {
      		tmp = ((B * (-1.0 - x)) / B) / B;
      	} else if (F <= 6.8e-9) {
      		tmp = 0.0 - (x / B);
      	} else if (F <= 2.7e+224) {
      		tmp = 1.0 / sin(B);
      	} else {
      		tmp = ((F * (1.0 / F)) - x) / B;
      	}
      	return tmp;
      }
      
      real(8) function code(f, b, x)
          real(8), intent (in) :: f
          real(8), intent (in) :: b
          real(8), intent (in) :: x
          real(8) :: tmp
          if (f <= (-2.4d-151)) then
              tmp = ((b * ((-1.0d0) - x)) / b) / b
          else if (f <= 6.8d-9) then
              tmp = 0.0d0 - (x / b)
          else if (f <= 2.7d+224) then
              tmp = 1.0d0 / sin(b)
          else
              tmp = ((f * (1.0d0 / f)) - x) / b
          end if
          code = tmp
      end function
      
      public static double code(double F, double B, double x) {
      	double tmp;
      	if (F <= -2.4e-151) {
      		tmp = ((B * (-1.0 - x)) / B) / B;
      	} else if (F <= 6.8e-9) {
      		tmp = 0.0 - (x / B);
      	} else if (F <= 2.7e+224) {
      		tmp = 1.0 / Math.sin(B);
      	} else {
      		tmp = ((F * (1.0 / F)) - x) / B;
      	}
      	return tmp;
      }
      
      def code(F, B, x):
      	tmp = 0
      	if F <= -2.4e-151:
      		tmp = ((B * (-1.0 - x)) / B) / B
      	elif F <= 6.8e-9:
      		tmp = 0.0 - (x / B)
      	elif F <= 2.7e+224:
      		tmp = 1.0 / math.sin(B)
      	else:
      		tmp = ((F * (1.0 / F)) - x) / B
      	return tmp
      
      function code(F, B, x)
      	tmp = 0.0
      	if (F <= -2.4e-151)
      		tmp = Float64(Float64(Float64(B * Float64(-1.0 - x)) / B) / B);
      	elseif (F <= 6.8e-9)
      		tmp = Float64(0.0 - Float64(x / B));
      	elseif (F <= 2.7e+224)
      		tmp = Float64(1.0 / sin(B));
      	else
      		tmp = Float64(Float64(Float64(F * Float64(1.0 / F)) - x) / B);
      	end
      	return tmp
      end
      
      function tmp_2 = code(F, B, x)
      	tmp = 0.0;
      	if (F <= -2.4e-151)
      		tmp = ((B * (-1.0 - x)) / B) / B;
      	elseif (F <= 6.8e-9)
      		tmp = 0.0 - (x / B);
      	elseif (F <= 2.7e+224)
      		tmp = 1.0 / sin(B);
      	else
      		tmp = ((F * (1.0 / F)) - x) / B;
      	end
      	tmp_2 = tmp;
      end
      
      code[F_, B_, x_] := If[LessEqual[F, -2.4e-151], N[(N[(N[(B * N[(-1.0 - x), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 6.8e-9], N[(0.0 - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.7e+224], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(N[(F * N[(1.0 / F), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;F \leq -2.4 \cdot 10^{-151}:\\
      \;\;\;\;\frac{\frac{B \cdot \left(-1 - x\right)}{B}}{B}\\
      
      \mathbf{elif}\;F \leq 6.8 \cdot 10^{-9}:\\
      \;\;\;\;0 - \frac{x}{B}\\
      
      \mathbf{elif}\;F \leq 2.7 \cdot 10^{+224}:\\
      \;\;\;\;\frac{1}{\sin B}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{F \cdot \frac{1}{F} - x}{B}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 4 regimes
      2. if F < -2.4e-151

        1. Initial program 69.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-*.f6437.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. Simplified37.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--.f6441.1%

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

          \[\leadsto \color{blue}{\frac{-1 - x}{B}} \]
        9. Step-by-step derivation
          1. div-subN/A

            \[\leadsto \frac{-1}{B} - \color{blue}{\frac{x}{B}} \]
          2. frac-subN/A

            \[\leadsto \frac{-1 \cdot B - B \cdot x}{\color{blue}{B \cdot B}} \]
          3. fmm-defN/A

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

            \[\leadsto \frac{\mathsf{fma}\left(-1, B, \mathsf{neg}\left(x \cdot B\right)\right)}{B \cdot B} \]
          5. associate-/r*N/A

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

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

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{fma}\left(-1, B, \mathsf{neg}\left(x \cdot B\right)\right)\right), B\right), B\right) \]
          8. *-commutativeN/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{fma}\left(-1, B, \mathsf{neg}\left(B \cdot x\right)\right)\right), B\right), B\right) \]
          9. fmm-defN/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(-1 \cdot B - B \cdot x\right), B\right), B\right) \]
          10. *-commutativeN/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(-1 \cdot B - x \cdot B\right), B\right), B\right) \]
          11. distribute-rgt-out--N/A

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

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \left(-1 - x\right)\right), B\right), B\right) \]
          13. --lowering--.f6441.2%

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \mathsf{\_.f64}\left(-1, x\right)\right), B\right), B\right) \]
        10. Applied egg-rr41.2%

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

        if -2.4e-151 < F < 6.7999999999999997e-9

        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-*.f6458.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. Simplified58.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 0

          \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(-1 \cdot x\right)}, B\right) \]
        7. Step-by-step derivation
          1. mul-1-negN/A

            \[\leadsto \mathsf{/.f64}\left(\left(\mathsf{neg}\left(x\right)\right), B\right) \]
          2. neg-sub0N/A

            \[\leadsto \mathsf{/.f64}\left(\left(0 - x\right), B\right) \]
          3. --lowering--.f6445.3%

            \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, x\right), B\right) \]
        8. Simplified45.3%

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

        if 6.7999999999999997e-9 < F < 2.6999999999999999e224

        1. Initial program 69.8%

          \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
        2. Add Preprocessing
        3. Taylor expanded in 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. /-lowering-/.f64N/A

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

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(F, \left(\sqrt{\frac{1}{2 + {F}^{2}}}\right)\right), \sin \color{blue}{B}\right) \]
          4. 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), \sin B\right) \]
          5. /-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), \sin B\right) \]
          6. +-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), \sin B\right) \]
          7. 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), \sin B\right) \]
          8. *-lowering-*.f64N/A

            \[\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), \sin B\right) \]
          9. sin-lowering-sin.f6438.1%

            \[\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), \mathsf{sin.f64}\left(B\right)\right) \]
        5. Simplified38.1%

          \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + F \cdot F}}}{\sin B}} \]
        6. Taylor expanded in F around inf

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

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

            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right) \]
        8. Simplified52.9%

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

        if 2.6999999999999999e224 < F

        1. Initial program 35.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-*.f6433.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. Simplified33.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 inf

          \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \color{blue}{\left(\frac{1}{F}\right)}\right), x\right), B\right) \]
        7. Step-by-step derivation
          1. /-lowering-/.f6451.4%

            \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{/.f64}\left(1, F\right)\right), x\right), B\right) \]
        8. Simplified51.4%

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -2.4 \cdot 10^{-151}:\\ \;\;\;\;\frac{\frac{B \cdot \left(-1 - x\right)}{B}}{B}\\ \mathbf{elif}\;F \leq 6.8 \cdot 10^{-9}:\\ \;\;\;\;0 - \frac{x}{B}\\ \mathbf{elif}\;F \leq 2.7 \cdot 10^{+224}:\\ \;\;\;\;\frac{1}{\sin B}\\ \mathbf{else}:\\ \;\;\;\;\frac{F \cdot \frac{1}{F} - x}{B}\\ \end{array} \]
      5. Add Preprocessing

      Alternative 26: 55.3% accurate, 2.7× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;B \leq 4 \cdot 10^{-8}:\\ \;\;\;\;\frac{F \cdot \sqrt{\frac{1}{F \cdot F + 2}} - x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\ \end{array} \end{array} \]
      (FPCore (F B x)
       :precision binary64
       (if (<= B 4e-8)
         (/ (- (* F (sqrt (/ 1.0 (+ (* F F) 2.0)))) x) B)
         (- (/ -1.0 B) (/ x (tan B)))))
      double code(double F, double B, double x) {
      	double tmp;
      	if (B <= 4e-8) {
      		tmp = ((F * sqrt((1.0 / ((F * F) + 2.0)))) - x) / B;
      	} else {
      		tmp = (-1.0 / B) - (x / tan(B));
      	}
      	return tmp;
      }
      
      real(8) function code(f, b, x)
          real(8), intent (in) :: f
          real(8), intent (in) :: b
          real(8), intent (in) :: x
          real(8) :: tmp
          if (b <= 4d-8) then
              tmp = ((f * sqrt((1.0d0 / ((f * f) + 2.0d0)))) - x) / b
          else
              tmp = ((-1.0d0) / b) - (x / tan(b))
          end if
          code = tmp
      end function
      
      public static double code(double F, double B, double x) {
      	double tmp;
      	if (B <= 4e-8) {
      		tmp = ((F * Math.sqrt((1.0 / ((F * F) + 2.0)))) - x) / B;
      	} else {
      		tmp = (-1.0 / B) - (x / Math.tan(B));
      	}
      	return tmp;
      }
      
      def code(F, B, x):
      	tmp = 0
      	if B <= 4e-8:
      		tmp = ((F * math.sqrt((1.0 / ((F * F) + 2.0)))) - x) / B
      	else:
      		tmp = (-1.0 / B) - (x / math.tan(B))
      	return tmp
      
      function code(F, B, x)
      	tmp = 0.0
      	if (B <= 4e-8)
      		tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(Float64(F * F) + 2.0)))) - x) / B);
      	else
      		tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B)));
      	end
      	return tmp
      end
      
      function tmp_2 = code(F, B, x)
      	tmp = 0.0;
      	if (B <= 4e-8)
      		tmp = ((F * sqrt((1.0 / ((F * F) + 2.0)))) - x) / B;
      	else
      		tmp = (-1.0 / B) - (x / tan(B));
      	end
      	tmp_2 = tmp;
      end
      
      code[F_, B_, x_] := If[LessEqual[B, 4e-8], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;B \leq 4 \cdot 10^{-8}:\\
      \;\;\;\;\frac{F \cdot \sqrt{\frac{1}{F \cdot F + 2}} - x}{B}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if B < 4.0000000000000001e-8

        1. Initial program 71.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-*.f6455.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. Simplified55.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 x around 0

          \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\color{blue}{\left(F \cdot \sqrt{\frac{1}{2 + {F}^{2}}}\right)}, x\right), B\right) \]
        7. 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), x\right), B\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), x\right), B\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), 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, \mathsf{+.f64}\left(2, \left({F}^{2}\right)\right)\right)\right)\right), x\right), B\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), x\right), B\right) \]
          6. *-lowering-*.f6455.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(F, F\right)\right)\right)\right)\right), x\right), B\right) \]
        8. Simplified55.1%

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

        if 4.0000000000000001e-8 < B

        1. Initial program 85.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.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.f6461.4%

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

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

          \[\leadsto \mathsf{\_.f64}\left(\mathsf{/.f64}\left(-1, \color{blue}{B}\right), \mathsf{/.f64}\left(x, \mathsf{tan.f64}\left(B\right)\right)\right) \]
        9. Step-by-step derivation
          1. Simplified55.5%

            \[\leadsto \frac{-1}{\color{blue}{B}} - \frac{x}{\tan B} \]
        10. Recombined 2 regimes into one program.
        11. Final simplification55.2%

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

        Alternative 27: 43.4% accurate, 17.0× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -3.2 \cdot 10^{-153}:\\ \;\;\;\;\frac{\frac{B \cdot \left(-1 - x\right)}{B}}{B}\\ \mathbf{elif}\;F \leq 4.8 \cdot 10^{-66}:\\ \;\;\;\;0 - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{F \cdot \frac{1}{F} - x}{B}\\ \end{array} \end{array} \]
        (FPCore (F B x)
         :precision binary64
         (if (<= F -3.2e-153)
           (/ (/ (* B (- -1.0 x)) B) B)
           (if (<= F 4.8e-66) (- 0.0 (/ x B)) (/ (- (* F (/ 1.0 F)) x) B))))
        double code(double F, double B, double x) {
        	double tmp;
        	if (F <= -3.2e-153) {
        		tmp = ((B * (-1.0 - x)) / B) / B;
        	} else if (F <= 4.8e-66) {
        		tmp = 0.0 - (x / B);
        	} else {
        		tmp = ((F * (1.0 / F)) - x) / B;
        	}
        	return tmp;
        }
        
        real(8) function code(f, b, x)
            real(8), intent (in) :: f
            real(8), intent (in) :: b
            real(8), intent (in) :: x
            real(8) :: tmp
            if (f <= (-3.2d-153)) then
                tmp = ((b * ((-1.0d0) - x)) / b) / b
            else if (f <= 4.8d-66) then
                tmp = 0.0d0 - (x / b)
            else
                tmp = ((f * (1.0d0 / f)) - x) / b
            end if
            code = tmp
        end function
        
        public static double code(double F, double B, double x) {
        	double tmp;
        	if (F <= -3.2e-153) {
        		tmp = ((B * (-1.0 - x)) / B) / B;
        	} else if (F <= 4.8e-66) {
        		tmp = 0.0 - (x / B);
        	} else {
        		tmp = ((F * (1.0 / F)) - x) / B;
        	}
        	return tmp;
        }
        
        def code(F, B, x):
        	tmp = 0
        	if F <= -3.2e-153:
        		tmp = ((B * (-1.0 - x)) / B) / B
        	elif F <= 4.8e-66:
        		tmp = 0.0 - (x / B)
        	else:
        		tmp = ((F * (1.0 / F)) - x) / B
        	return tmp
        
        function code(F, B, x)
        	tmp = 0.0
        	if (F <= -3.2e-153)
        		tmp = Float64(Float64(Float64(B * Float64(-1.0 - x)) / B) / B);
        	elseif (F <= 4.8e-66)
        		tmp = Float64(0.0 - Float64(x / B));
        	else
        		tmp = Float64(Float64(Float64(F * Float64(1.0 / F)) - x) / B);
        	end
        	return tmp
        end
        
        function tmp_2 = code(F, B, x)
        	tmp = 0.0;
        	if (F <= -3.2e-153)
        		tmp = ((B * (-1.0 - x)) / B) / B;
        	elseif (F <= 4.8e-66)
        		tmp = 0.0 - (x / B);
        	else
        		tmp = ((F * (1.0 / F)) - x) / B;
        	end
        	tmp_2 = tmp;
        end
        
        code[F_, B_, x_] := If[LessEqual[F, -3.2e-153], N[(N[(N[(B * N[(-1.0 - x), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 4.8e-66], N[(0.0 - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(N[(F * N[(1.0 / F), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;F \leq -3.2 \cdot 10^{-153}:\\
        \;\;\;\;\frac{\frac{B \cdot \left(-1 - x\right)}{B}}{B}\\
        
        \mathbf{elif}\;F \leq 4.8 \cdot 10^{-66}:\\
        \;\;\;\;0 - \frac{x}{B}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{F \cdot \frac{1}{F} - x}{B}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if F < -3.1999999999999999e-153

          1. Initial program 69.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-*.f6437.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. Simplified37.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--.f6441.1%

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

            \[\leadsto \color{blue}{\frac{-1 - x}{B}} \]
          9. Step-by-step derivation
            1. div-subN/A

              \[\leadsto \frac{-1}{B} - \color{blue}{\frac{x}{B}} \]
            2. frac-subN/A

              \[\leadsto \frac{-1 \cdot B - B \cdot x}{\color{blue}{B \cdot B}} \]
            3. fmm-defN/A

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

              \[\leadsto \frac{\mathsf{fma}\left(-1, B, \mathsf{neg}\left(x \cdot B\right)\right)}{B \cdot B} \]
            5. associate-/r*N/A

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

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

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{fma}\left(-1, B, \mathsf{neg}\left(x \cdot B\right)\right)\right), B\right), B\right) \]
            8. *-commutativeN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{fma}\left(-1, B, \mathsf{neg}\left(B \cdot x\right)\right)\right), B\right), B\right) \]
            9. fmm-defN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(-1 \cdot B - B \cdot x\right), B\right), B\right) \]
            10. *-commutativeN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(-1 \cdot B - x \cdot B\right), B\right), B\right) \]
            11. distribute-rgt-out--N/A

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

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \left(-1 - x\right)\right), B\right), B\right) \]
            13. --lowering--.f6441.2%

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, \mathsf{\_.f64}\left(-1, x\right)\right), B\right), B\right) \]
          10. Applied egg-rr41.2%

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

          if -3.1999999999999999e-153 < F < 4.80000000000000052e-66

          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.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. Simplified58.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(-1 \cdot x\right)}, B\right) \]
          7. Step-by-step derivation
            1. mul-1-negN/A

              \[\leadsto \mathsf{/.f64}\left(\left(\mathsf{neg}\left(x\right)\right), B\right) \]
            2. neg-sub0N/A

              \[\leadsto \mathsf{/.f64}\left(\left(0 - x\right), B\right) \]
            3. --lowering--.f6448.2%

              \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, x\right), B\right) \]
          8. Simplified48.2%

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

          if 4.80000000000000052e-66 < 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. 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-*.f6431.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. Simplified31.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(\mathsf{*.f64}\left(F, \color{blue}{\left(\frac{1}{F}\right)}\right), x\right), B\right) \]
          7. Step-by-step derivation
            1. /-lowering-/.f6436.0%

              \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{/.f64}\left(1, F\right)\right), x\right), B\right) \]
          8. Simplified36.0%

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -3.2 \cdot 10^{-153}:\\ \;\;\;\;\frac{\frac{B \cdot \left(-1 - x\right)}{B}}{B}\\ \mathbf{elif}\;F \leq 4.8 \cdot 10^{-66}:\\ \;\;\;\;0 - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{F \cdot \frac{1}{F} - x}{B}\\ \end{array} \]
        5. Add Preprocessing

        Alternative 28: 43.4% accurate, 17.0× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -2.4 \cdot 10^{-151}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 5.8 \cdot 10^{-66}:\\ \;\;\;\;0 - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{F \cdot \frac{1}{F} - x}{B}\\ \end{array} \end{array} \]
        (FPCore (F B x)
         :precision binary64
         (if (<= F -2.4e-151)
           (/ (- -1.0 x) B)
           (if (<= F 5.8e-66) (- 0.0 (/ x B)) (/ (- (* F (/ 1.0 F)) x) B))))
        double code(double F, double B, double x) {
        	double tmp;
        	if (F <= -2.4e-151) {
        		tmp = (-1.0 - x) / B;
        	} else if (F <= 5.8e-66) {
        		tmp = 0.0 - (x / B);
        	} else {
        		tmp = ((F * (1.0 / F)) - x) / B;
        	}
        	return tmp;
        }
        
        real(8) function code(f, b, x)
            real(8), intent (in) :: f
            real(8), intent (in) :: b
            real(8), intent (in) :: x
            real(8) :: tmp
            if (f <= (-2.4d-151)) then
                tmp = ((-1.0d0) - x) / b
            else if (f <= 5.8d-66) then
                tmp = 0.0d0 - (x / b)
            else
                tmp = ((f * (1.0d0 / f)) - x) / b
            end if
            code = tmp
        end function
        
        public static double code(double F, double B, double x) {
        	double tmp;
        	if (F <= -2.4e-151) {
        		tmp = (-1.0 - x) / B;
        	} else if (F <= 5.8e-66) {
        		tmp = 0.0 - (x / B);
        	} else {
        		tmp = ((F * (1.0 / F)) - x) / B;
        	}
        	return tmp;
        }
        
        def code(F, B, x):
        	tmp = 0
        	if F <= -2.4e-151:
        		tmp = (-1.0 - x) / B
        	elif F <= 5.8e-66:
        		tmp = 0.0 - (x / B)
        	else:
        		tmp = ((F * (1.0 / F)) - x) / B
        	return tmp
        
        function code(F, B, x)
        	tmp = 0.0
        	if (F <= -2.4e-151)
        		tmp = Float64(Float64(-1.0 - x) / B);
        	elseif (F <= 5.8e-66)
        		tmp = Float64(0.0 - Float64(x / B));
        	else
        		tmp = Float64(Float64(Float64(F * Float64(1.0 / F)) - x) / B);
        	end
        	return tmp
        end
        
        function tmp_2 = code(F, B, x)
        	tmp = 0.0;
        	if (F <= -2.4e-151)
        		tmp = (-1.0 - x) / B;
        	elseif (F <= 5.8e-66)
        		tmp = 0.0 - (x / B);
        	else
        		tmp = ((F * (1.0 / F)) - x) / B;
        	end
        	tmp_2 = tmp;
        end
        
        code[F_, B_, x_] := If[LessEqual[F, -2.4e-151], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 5.8e-66], N[(0.0 - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(N[(F * N[(1.0 / F), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;F \leq -2.4 \cdot 10^{-151}:\\
        \;\;\;\;\frac{-1 - x}{B}\\
        
        \mathbf{elif}\;F \leq 5.8 \cdot 10^{-66}:\\
        \;\;\;\;0 - \frac{x}{B}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{F \cdot \frac{1}{F} - x}{B}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if F < -2.4e-151

          1. Initial program 69.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-*.f6437.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. Simplified37.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--.f6441.1%

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

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

          if -2.4e-151 < F < 5.80000000000000023e-66

          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.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. Simplified58.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(-1 \cdot x\right)}, B\right) \]
          7. Step-by-step derivation
            1. mul-1-negN/A

              \[\leadsto \mathsf{/.f64}\left(\left(\mathsf{neg}\left(x\right)\right), B\right) \]
            2. neg-sub0N/A

              \[\leadsto \mathsf{/.f64}\left(\left(0 - x\right), B\right) \]
            3. --lowering--.f6448.2%

              \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, x\right), B\right) \]
          8. Simplified48.2%

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

          if 5.80000000000000023e-66 < 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. 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-*.f6431.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. Simplified31.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(\mathsf{*.f64}\left(F, \color{blue}{\left(\frac{1}{F}\right)}\right), x\right), B\right) \]
          7. Step-by-step derivation
            1. /-lowering-/.f6436.0%

              \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(F, \mathsf{/.f64}\left(1, F\right)\right), x\right), B\right) \]
          8. Simplified36.0%

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -2.4 \cdot 10^{-151}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 5.8 \cdot 10^{-66}:\\ \;\;\;\;0 - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{F \cdot \frac{1}{F} - x}{B}\\ \end{array} \]
        5. Add Preprocessing

        Alternative 29: 43.4% accurate, 21.6× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq -2.4 \cdot 10^{-151}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 4.3 \cdot 10^{-66}:\\ \;\;\;\;0 - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \end{array} \]
        (FPCore (F B x)
         :precision binary64
         (if (<= F -2.4e-151)
           (/ (- -1.0 x) B)
           (if (<= F 4.3e-66) (- 0.0 (/ x B)) (/ (- 1.0 x) B))))
        double code(double F, double B, double x) {
        	double tmp;
        	if (F <= -2.4e-151) {
        		tmp = (-1.0 - x) / B;
        	} else if (F <= 4.3e-66) {
        		tmp = 0.0 - (x / B);
        	} else {
        		tmp = (1.0 - x) / B;
        	}
        	return tmp;
        }
        
        real(8) function code(f, b, x)
            real(8), intent (in) :: f
            real(8), intent (in) :: b
            real(8), intent (in) :: x
            real(8) :: tmp
            if (f <= (-2.4d-151)) then
                tmp = ((-1.0d0) - x) / b
            else if (f <= 4.3d-66) then
                tmp = 0.0d0 - (x / b)
            else
                tmp = (1.0d0 - x) / b
            end if
            code = tmp
        end function
        
        public static double code(double F, double B, double x) {
        	double tmp;
        	if (F <= -2.4e-151) {
        		tmp = (-1.0 - x) / B;
        	} else if (F <= 4.3e-66) {
        		tmp = 0.0 - (x / B);
        	} else {
        		tmp = (1.0 - x) / B;
        	}
        	return tmp;
        }
        
        def code(F, B, x):
        	tmp = 0
        	if F <= -2.4e-151:
        		tmp = (-1.0 - x) / B
        	elif F <= 4.3e-66:
        		tmp = 0.0 - (x / B)
        	else:
        		tmp = (1.0 - x) / B
        	return tmp
        
        function code(F, B, x)
        	tmp = 0.0
        	if (F <= -2.4e-151)
        		tmp = Float64(Float64(-1.0 - x) / B);
        	elseif (F <= 4.3e-66)
        		tmp = Float64(0.0 - Float64(x / B));
        	else
        		tmp = Float64(Float64(1.0 - x) / B);
        	end
        	return tmp
        end
        
        function tmp_2 = code(F, B, x)
        	tmp = 0.0;
        	if (F <= -2.4e-151)
        		tmp = (-1.0 - x) / B;
        	elseif (F <= 4.3e-66)
        		tmp = 0.0 - (x / B);
        	else
        		tmp = (1.0 - x) / B;
        	end
        	tmp_2 = tmp;
        end
        
        code[F_, B_, x_] := If[LessEqual[F, -2.4e-151], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 4.3e-66], N[(0.0 - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;F \leq -2.4 \cdot 10^{-151}:\\
        \;\;\;\;\frac{-1 - x}{B}\\
        
        \mathbf{elif}\;F \leq 4.3 \cdot 10^{-66}:\\
        \;\;\;\;0 - \frac{x}{B}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{1 - x}{B}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if F < -2.4e-151

          1. Initial program 69.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-*.f6437.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. Simplified37.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--.f6441.1%

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

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

          if -2.4e-151 < F < 4.30000000000000013e-66

          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.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. Simplified58.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(-1 \cdot x\right)}, B\right) \]
          7. Step-by-step derivation
            1. mul-1-negN/A

              \[\leadsto \mathsf{/.f64}\left(\left(\mathsf{neg}\left(x\right)\right), B\right) \]
            2. neg-sub0N/A

              \[\leadsto \mathsf{/.f64}\left(\left(0 - x\right), B\right) \]
            3. --lowering--.f6448.2%

              \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, x\right), B\right) \]
          8. Simplified48.2%

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

          if 4.30000000000000013e-66 < 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. 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-*.f6431.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. Simplified31.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 \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--.f6435.9%

              \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(1, x\right), B\right) \]
          8. Simplified35.9%

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -2.4 \cdot 10^{-151}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{elif}\;F \leq 4.3 \cdot 10^{-66}:\\ \;\;\;\;0 - \frac{x}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - x}{B}\\ \end{array} \]
        5. Add Preprocessing

        Alternative 30: 36.1% accurate, 32.3× speedup?

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

          1. Initial program 69.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-*.f6437.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. Simplified37.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--.f6441.1%

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

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

          if -2.4e-151 < F

          1. Initial program 79.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-*.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 0

            \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(-1 \cdot x\right)}, B\right) \]
          7. Step-by-step derivation
            1. mul-1-negN/A

              \[\leadsto \mathsf{/.f64}\left(\left(\mathsf{neg}\left(x\right)\right), B\right) \]
            2. neg-sub0N/A

              \[\leadsto \mathsf{/.f64}\left(\left(0 - x\right), B\right) \]
            3. --lowering--.f6435.2%

              \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, x\right), B\right) \]
          8. Simplified35.2%

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -2.4 \cdot 10^{-151}:\\ \;\;\;\;\frac{-1 - x}{B}\\ \mathbf{else}:\\ \;\;\;\;0 - \frac{x}{B}\\ \end{array} \]
        5. Add Preprocessing

        Alternative 31: 17.6% accurate, 40.4× speedup?

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

          1. Initial program 82.8%

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

            \[\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-*.f6446.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. Simplified46.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--.f6430.1%

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

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

              \[\leadsto \mathsf{/.f64}\left(-1, \color{blue}{B}\right) \]
          11. Simplified13.9%

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

          if 1.39999999999999994e-30 < F

          1. Initial program 60.3%

            \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)} \]
          2. Add Preprocessing
          3. Taylor expanded in 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. /-lowering-/.f64N/A

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

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(F, \left(\sqrt{\frac{1}{2 + {F}^{2}}}\right)\right), \sin \color{blue}{B}\right) \]
            4. 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), \sin B\right) \]
            5. /-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), \sin B\right) \]
            6. +-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), \sin B\right) \]
            7. 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), \sin B\right) \]
            8. *-lowering-*.f64N/A

              \[\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), \sin B\right) \]
            9. sin-lowering-sin.f6429.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), \mathsf{sin.f64}\left(B\right)\right) \]
          5. Simplified29.0%

            \[\leadsto \color{blue}{\frac{F \cdot \sqrt{\frac{1}{2 + F \cdot F}}}{\sin B}} \]
          6. Taylor expanded in F around inf

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

              \[\leadsto \mathsf{/.f64}\left(1, \color{blue}{\sin B}\right) \]
            2. sin-lowering-sin.f6444.6%

              \[\leadsto \mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(B\right)\right) \]
          8. Simplified44.6%

            \[\leadsto \color{blue}{\frac{1}{\sin B}} \]
          9. Taylor expanded in B around 0

            \[\leadsto \color{blue}{\frac{1}{B}} \]
          10. Step-by-step derivation
            1. /-lowering-/.f6414.4%

              \[\leadsto \mathsf{/.f64}\left(1, \color{blue}{B}\right) \]
          11. Simplified14.4%

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

        Alternative 32: 29.8% 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 75.8%

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

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

            \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(-1, x\right), B\right) \]
        8. Simplified28.0%

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

        Alternative 33: 10.3% 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 75.8%

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

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

            \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(-1, x\right), B\right) \]
        8. Simplified28.0%

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

            \[\leadsto \mathsf{/.f64}\left(-1, \color{blue}{B}\right) \]
        11. Simplified10.4%

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

        Reproduce

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