ABCF->ab-angle b

Percentage Accurate: 19.1% → 45.1%
Time: 22.8s
Alternatives: 10
Speedup: 5.8×

Specification

?
\[\begin{array}{l} \\ \begin{array}{l} t_0 := {B}^{2} - \left(4 \cdot A\right) \cdot C\\ \frac{-\sqrt{\left(2 \cdot \left(t_0 \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{t_0} \end{array} \end{array} \]
(FPCore (A B C F)
 :precision binary64
 (let* ((t_0 (- (pow B 2.0) (* (* 4.0 A) C))))
   (/
    (-
     (sqrt
      (*
       (* 2.0 (* t_0 F))
       (- (+ A C) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))))
    t_0)))
double code(double A, double B, double C, double F) {
	double t_0 = pow(B, 2.0) - ((4.0 * A) * C);
	return -sqrt(((2.0 * (t_0 * F)) * ((A + C) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / t_0;
}
real(8) function code(a, b, c, f)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: f
    real(8) :: t_0
    t_0 = (b ** 2.0d0) - ((4.0d0 * a) * c)
    code = -sqrt(((2.0d0 * (t_0 * f)) * ((a + c) - sqrt((((a - c) ** 2.0d0) + (b ** 2.0d0)))))) / t_0
end function
public static double code(double A, double B, double C, double F) {
	double t_0 = Math.pow(B, 2.0) - ((4.0 * A) * C);
	return -Math.sqrt(((2.0 * (t_0 * F)) * ((A + C) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / t_0;
}
def code(A, B, C, F):
	t_0 = math.pow(B, 2.0) - ((4.0 * A) * C)
	return -math.sqrt(((2.0 * (t_0 * F)) * ((A + C) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / t_0
function code(A, B, C, F)
	t_0 = Float64((B ^ 2.0) - Float64(Float64(4.0 * A) * C))
	return Float64(Float64(-sqrt(Float64(Float64(2.0 * Float64(t_0 * F)) * Float64(Float64(A + C) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0))))))) / t_0)
end
function tmp = code(A, B, C, F)
	t_0 = (B ^ 2.0) - ((4.0 * A) * C);
	tmp = -sqrt(((2.0 * (t_0 * F)) * ((A + C) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / t_0;
end
code[A_, B_, C_, F_] := Block[{t$95$0 = N[(N[Power[B, 2.0], $MachinePrecision] - N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision]), $MachinePrecision]}, N[((-N[Sqrt[N[(N[(2.0 * N[(t$95$0 * F), $MachinePrecision]), $MachinePrecision] * N[(N[(A + C), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := {B}^{2} - \left(4 \cdot A\right) \cdot C\\
\frac{-\sqrt{\left(2 \cdot \left(t_0 \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{t_0}
\end{array}
\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 10 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: 19.1% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := {B}^{2} - \left(4 \cdot A\right) \cdot C\\ \frac{-\sqrt{\left(2 \cdot \left(t_0 \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{t_0} \end{array} \end{array} \]
(FPCore (A B C F)
 :precision binary64
 (let* ((t_0 (- (pow B 2.0) (* (* 4.0 A) C))))
   (/
    (-
     (sqrt
      (*
       (* 2.0 (* t_0 F))
       (- (+ A C) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))))
    t_0)))
double code(double A, double B, double C, double F) {
	double t_0 = pow(B, 2.0) - ((4.0 * A) * C);
	return -sqrt(((2.0 * (t_0 * F)) * ((A + C) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / t_0;
}
real(8) function code(a, b, c, f)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: f
    real(8) :: t_0
    t_0 = (b ** 2.0d0) - ((4.0d0 * a) * c)
    code = -sqrt(((2.0d0 * (t_0 * f)) * ((a + c) - sqrt((((a - c) ** 2.0d0) + (b ** 2.0d0)))))) / t_0
end function
public static double code(double A, double B, double C, double F) {
	double t_0 = Math.pow(B, 2.0) - ((4.0 * A) * C);
	return -Math.sqrt(((2.0 * (t_0 * F)) * ((A + C) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / t_0;
}
def code(A, B, C, F):
	t_0 = math.pow(B, 2.0) - ((4.0 * A) * C)
	return -math.sqrt(((2.0 * (t_0 * F)) * ((A + C) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / t_0
function code(A, B, C, F)
	t_0 = Float64((B ^ 2.0) - Float64(Float64(4.0 * A) * C))
	return Float64(Float64(-sqrt(Float64(Float64(2.0 * Float64(t_0 * F)) * Float64(Float64(A + C) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0))))))) / t_0)
end
function tmp = code(A, B, C, F)
	t_0 = (B ^ 2.0) - ((4.0 * A) * C);
	tmp = -sqrt(((2.0 * (t_0 * F)) * ((A + C) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / t_0;
end
code[A_, B_, C_, F_] := Block[{t$95$0 = N[(N[Power[B, 2.0], $MachinePrecision] - N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision]), $MachinePrecision]}, N[((-N[Sqrt[N[(N[(2.0 * N[(t$95$0 * F), $MachinePrecision]), $MachinePrecision] * N[(N[(A + C), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := {B}^{2} - \left(4 \cdot A\right) \cdot C\\
\frac{-\sqrt{\left(2 \cdot \left(t_0 \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{t_0}
\end{array}
\end{array}

Alternative 1: 45.1% accurate, 2.9× speedup?

\[\begin{array}{l} B = |B|\\ [A, C] = \mathsf{sort}([A, C])\\ \\ \begin{array}{l} t_0 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;B \leq 5.5 \cdot 10^{-61}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(t_0 \cdot F\right) \cdot \left(2 \cdot A\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 5.5 \cdot 10^{+39}:\\ \;\;\;\;\frac{\sqrt{2} \cdot \left(-\sqrt{F \cdot \left(-0.5 \cdot \frac{B \cdot B}{C}\right)}\right)}{B}\\ \mathbf{elif}\;B \leq 9.5 \cdot 10^{+260}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(F \cdot \left(A - \mathsf{hypot}\left(A, B\right)\right)\right)}}{B}\\ \mathbf{else}:\\ \;\;\;\;-\sqrt{\frac{2 \cdot F}{B} \cdot \frac{C - \mathsf{hypot}\left(B, C\right)}{B}}\\ \end{array} \end{array} \]
NOTE: B should be positive before calling this function
NOTE: A and C should be sorted in increasing order before calling this function.
(FPCore (A B C F)
 :precision binary64
 (let* ((t_0 (- (* B B) (* 4.0 (* A C)))))
   (if (<= B 5.5e-61)
     (/ (- (sqrt (* 2.0 (* (* t_0 F) (* 2.0 A))))) t_0)
     (if (<= B 5.5e+39)
       (/ (* (sqrt 2.0) (- (sqrt (* F (* -0.5 (/ (* B B) C)))))) B)
       (if (<= B 9.5e+260)
         (/ (- (sqrt (* 2.0 (* F (- A (hypot A B)))))) B)
         (- (sqrt (* (/ (* 2.0 F) B) (/ (- C (hypot B C)) B)))))))))
B = abs(B);
assert(A < C);
double code(double A, double B, double C, double F) {
	double t_0 = (B * B) - (4.0 * (A * C));
	double tmp;
	if (B <= 5.5e-61) {
		tmp = -sqrt((2.0 * ((t_0 * F) * (2.0 * A)))) / t_0;
	} else if (B <= 5.5e+39) {
		tmp = (sqrt(2.0) * -sqrt((F * (-0.5 * ((B * B) / C))))) / B;
	} else if (B <= 9.5e+260) {
		tmp = -sqrt((2.0 * (F * (A - hypot(A, B))))) / B;
	} else {
		tmp = -sqrt((((2.0 * F) / B) * ((C - hypot(B, C)) / B)));
	}
	return tmp;
}
B = Math.abs(B);
assert A < C;
public static double code(double A, double B, double C, double F) {
	double t_0 = (B * B) - (4.0 * (A * C));
	double tmp;
	if (B <= 5.5e-61) {
		tmp = -Math.sqrt((2.0 * ((t_0 * F) * (2.0 * A)))) / t_0;
	} else if (B <= 5.5e+39) {
		tmp = (Math.sqrt(2.0) * -Math.sqrt((F * (-0.5 * ((B * B) / C))))) / B;
	} else if (B <= 9.5e+260) {
		tmp = -Math.sqrt((2.0 * (F * (A - Math.hypot(A, B))))) / B;
	} else {
		tmp = -Math.sqrt((((2.0 * F) / B) * ((C - Math.hypot(B, C)) / B)));
	}
	return tmp;
}
B = abs(B)
[A, C] = sort([A, C])
def code(A, B, C, F):
	t_0 = (B * B) - (4.0 * (A * C))
	tmp = 0
	if B <= 5.5e-61:
		tmp = -math.sqrt((2.0 * ((t_0 * F) * (2.0 * A)))) / t_0
	elif B <= 5.5e+39:
		tmp = (math.sqrt(2.0) * -math.sqrt((F * (-0.5 * ((B * B) / C))))) / B
	elif B <= 9.5e+260:
		tmp = -math.sqrt((2.0 * (F * (A - math.hypot(A, B))))) / B
	else:
		tmp = -math.sqrt((((2.0 * F) / B) * ((C - math.hypot(B, C)) / B)))
	return tmp
B = abs(B)
A, C = sort([A, C])
function code(A, B, C, F)
	t_0 = Float64(Float64(B * B) - Float64(4.0 * Float64(A * C)))
	tmp = 0.0
	if (B <= 5.5e-61)
		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(Float64(t_0 * F) * Float64(2.0 * A))))) / t_0);
	elseif (B <= 5.5e+39)
		tmp = Float64(Float64(sqrt(2.0) * Float64(-sqrt(Float64(F * Float64(-0.5 * Float64(Float64(B * B) / C)))))) / B);
	elseif (B <= 9.5e+260)
		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(F * Float64(A - hypot(A, B)))))) / B);
	else
		tmp = Float64(-sqrt(Float64(Float64(Float64(2.0 * F) / B) * Float64(Float64(C - hypot(B, C)) / B))));
	end
	return tmp
end
B = abs(B)
A, C = num2cell(sort([A, C])){:}
function tmp_2 = code(A, B, C, F)
	t_0 = (B * B) - (4.0 * (A * C));
	tmp = 0.0;
	if (B <= 5.5e-61)
		tmp = -sqrt((2.0 * ((t_0 * F) * (2.0 * A)))) / t_0;
	elseif (B <= 5.5e+39)
		tmp = (sqrt(2.0) * -sqrt((F * (-0.5 * ((B * B) / C))))) / B;
	elseif (B <= 9.5e+260)
		tmp = -sqrt((2.0 * (F * (A - hypot(A, B))))) / B;
	else
		tmp = -sqrt((((2.0 * F) / B) * ((C - hypot(B, C)) / B)));
	end
	tmp_2 = tmp;
end
NOTE: B should be positive before calling this function
NOTE: A and C should be sorted in increasing order before calling this function.
code[A_, B_, C_, F_] := Block[{t$95$0 = N[(N[(B * B), $MachinePrecision] - N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, 5.5e-61], N[((-N[Sqrt[N[(2.0 * N[(N[(t$95$0 * F), $MachinePrecision] * N[(2.0 * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], If[LessEqual[B, 5.5e+39], N[(N[(N[Sqrt[2.0], $MachinePrecision] * (-N[Sqrt[N[(F * N[(-0.5 * N[(N[(B * B), $MachinePrecision] / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[B, 9.5e+260], N[((-N[Sqrt[N[(2.0 * N[(F * N[(A - N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / B), $MachinePrecision], (-N[Sqrt[N[(N[(N[(2.0 * F), $MachinePrecision] / B), $MachinePrecision] * N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])]]]]
\begin{array}{l}
B = |B|\\
[A, C] = \mathsf{sort}([A, C])\\
\\
\begin{array}{l}
t_0 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\
\mathbf{if}\;B \leq 5.5 \cdot 10^{-61}:\\
\;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(t_0 \cdot F\right) \cdot \left(2 \cdot A\right)\right)}}{t_0}\\

\mathbf{elif}\;B \leq 5.5 \cdot 10^{+39}:\\
\;\;\;\;\frac{\sqrt{2} \cdot \left(-\sqrt{F \cdot \left(-0.5 \cdot \frac{B \cdot B}{C}\right)}\right)}{B}\\

\mathbf{elif}\;B \leq 9.5 \cdot 10^{+260}:\\
\;\;\;\;\frac{-\sqrt{2 \cdot \left(F \cdot \left(A - \mathsf{hypot}\left(A, B\right)\right)\right)}}{B}\\

\mathbf{else}:\\
\;\;\;\;-\sqrt{\frac{2 \cdot F}{B} \cdot \frac{C - \mathsf{hypot}\left(B, C\right)}{B}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if B < 5.4999999999999997e-61

    1. Initial program 19.6%

      \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
    2. Step-by-step derivation
      1. Simplified19.5%

        \[\leadsto \color{blue}{\frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(\left(A + C\right) - \sqrt{B \cdot B + {\left(A - C\right)}^{2}}\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
      2. Taylor expanded in A around -inf 19.6%

        \[\leadsto \frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \color{blue}{\left(2 \cdot A\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]

      if 5.4999999999999997e-61 < B < 5.4999999999999997e39

      1. Initial program 21.0%

        \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
      2. Step-by-step derivation
        1. Simplified21.0%

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

            \[\leadsto \frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(\left(A + C\right) - \sqrt{B \cdot B + \color{blue}{\left(A - C\right) \cdot \left(A - C\right)}}\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
          2. hypot-udef21.0%

            \[\leadsto \frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(\left(A + C\right) - \color{blue}{\mathsf{hypot}\left(B, A - C\right)}\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
          3. add-exp-log20.4%

            \[\leadsto \frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(\left(A + C\right) - \color{blue}{e^{\log \left(\mathsf{hypot}\left(B, A - C\right)\right)}}\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
        3. Applied egg-rr20.4%

          \[\leadsto \frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(\left(A + C\right) - \color{blue}{e^{\log \left(\mathsf{hypot}\left(B, A - C\right)\right)}}\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
        4. Taylor expanded in A around 0 16.1%

          \[\leadsto \color{blue}{-1 \cdot \left(\frac{\sqrt{2}}{B} \cdot \sqrt{\left(C - \sqrt{{B}^{2} + {C}^{2}}\right) \cdot F}\right)} \]
        5. Step-by-step derivation
          1. mul-1-neg16.1%

            \[\leadsto \color{blue}{-\frac{\sqrt{2}}{B} \cdot \sqrt{\left(C - \sqrt{{B}^{2} + {C}^{2}}\right) \cdot F}} \]
          2. associate-*l/16.1%

            \[\leadsto -\color{blue}{\frac{\sqrt{2} \cdot \sqrt{\left(C - \sqrt{{B}^{2} + {C}^{2}}\right) \cdot F}}{B}} \]
          3. *-commutative16.1%

            \[\leadsto -\frac{\sqrt{2} \cdot \sqrt{\color{blue}{F \cdot \left(C - \sqrt{{B}^{2} + {C}^{2}}\right)}}}{B} \]
          4. unpow216.1%

            \[\leadsto -\frac{\sqrt{2} \cdot \sqrt{F \cdot \left(C - \sqrt{\color{blue}{B \cdot B} + {C}^{2}}\right)}}{B} \]
          5. unpow216.1%

            \[\leadsto -\frac{\sqrt{2} \cdot \sqrt{F \cdot \left(C - \sqrt{B \cdot B + \color{blue}{C \cdot C}}\right)}}{B} \]
          6. hypot-def16.5%

            \[\leadsto -\frac{\sqrt{2} \cdot \sqrt{F \cdot \left(C - \color{blue}{\mathsf{hypot}\left(B, C\right)}\right)}}{B} \]
        6. Simplified16.5%

          \[\leadsto \color{blue}{-\frac{\sqrt{2} \cdot \sqrt{F \cdot \left(C - \mathsf{hypot}\left(B, C\right)\right)}}{B}} \]
        7. Taylor expanded in C around inf 13.7%

          \[\leadsto -\frac{\sqrt{2} \cdot \sqrt{F \cdot \color{blue}{\left(-0.5 \cdot \frac{{B}^{2}}{C}\right)}}}{B} \]
        8. Step-by-step derivation
          1. unpow213.7%

            \[\leadsto -\frac{\sqrt{2} \cdot \sqrt{F \cdot \left(-0.5 \cdot \frac{\color{blue}{B \cdot B}}{C}\right)}}{B} \]
        9. Simplified13.7%

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

        if 5.4999999999999997e39 < B < 9.5000000000000004e260

        1. Initial program 30.1%

          \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
        2. Step-by-step derivation
          1. Simplified30.1%

            \[\leadsto \color{blue}{\frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(\left(A + C\right) - \sqrt{B \cdot B + {\left(A - C\right)}^{2}}\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
          2. Taylor expanded in C around 0 29.3%

            \[\leadsto \color{blue}{-1 \cdot \left(\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \sqrt{{B}^{2} + {A}^{2}}\right) \cdot F}\right)} \]
          3. Step-by-step derivation
            1. mul-1-neg29.3%

              \[\leadsto \color{blue}{-\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \sqrt{{B}^{2} + {A}^{2}}\right) \cdot F}} \]
            2. +-commutative29.3%

              \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \sqrt{\color{blue}{{A}^{2} + {B}^{2}}}\right) \cdot F} \]
            3. unpow229.3%

              \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \sqrt{\color{blue}{A \cdot A} + {B}^{2}}\right) \cdot F} \]
            4. unpow229.3%

              \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \sqrt{A \cdot A + \color{blue}{B \cdot B}}\right) \cdot F} \]
            5. hypot-def73.4%

              \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \color{blue}{\mathsf{hypot}\left(A, B\right)}\right) \cdot F} \]
          4. Simplified73.4%

            \[\leadsto \color{blue}{-\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F}} \]
          5. Step-by-step derivation
            1. associate-*l/73.4%

              \[\leadsto -\color{blue}{\frac{\sqrt{2} \cdot \sqrt{\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F}}{B}} \]
          6. Applied egg-rr73.4%

            \[\leadsto -\color{blue}{\frac{\sqrt{2} \cdot \sqrt{\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F}}{B}} \]
          7. Step-by-step derivation
            1. sqrt-unprod73.5%

              \[\leadsto -\frac{\color{blue}{\sqrt{2 \cdot \left(\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F\right)}}}{B} \]
          8. Applied egg-rr73.5%

            \[\leadsto -\frac{\color{blue}{\sqrt{2 \cdot \left(\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F\right)}}}{B} \]

          if 9.5000000000000004e260 < B

          1. Initial program 0.0%

            \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
          2. Step-by-step derivation
            1. Simplified0.0%

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

                \[\leadsto \frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(\left(A + C\right) - \sqrt{B \cdot B + \color{blue}{\left(A - C\right) \cdot \left(A - C\right)}}\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
              2. hypot-udef0.0%

                \[\leadsto \frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(\left(A + C\right) - \color{blue}{\mathsf{hypot}\left(B, A - C\right)}\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
              3. add-exp-log0.0%

                \[\leadsto \frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(\left(A + C\right) - \color{blue}{e^{\log \left(\mathsf{hypot}\left(B, A - C\right)\right)}}\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
            3. Applied egg-rr0.0%

              \[\leadsto \frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(\left(A + C\right) - \color{blue}{e^{\log \left(\mathsf{hypot}\left(B, A - C\right)\right)}}\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
            4. Taylor expanded in A around 0 2.4%

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

                \[\leadsto \color{blue}{-\frac{\sqrt{2}}{B} \cdot \sqrt{\left(C - \sqrt{{B}^{2} + {C}^{2}}\right) \cdot F}} \]
              2. associate-*l/2.4%

                \[\leadsto -\color{blue}{\frac{\sqrt{2} \cdot \sqrt{\left(C - \sqrt{{B}^{2} + {C}^{2}}\right) \cdot F}}{B}} \]
              3. *-commutative2.4%

                \[\leadsto -\frac{\sqrt{2} \cdot \sqrt{\color{blue}{F \cdot \left(C - \sqrt{{B}^{2} + {C}^{2}}\right)}}}{B} \]
              4. unpow22.4%

                \[\leadsto -\frac{\sqrt{2} \cdot \sqrt{F \cdot \left(C - \sqrt{\color{blue}{B \cdot B} + {C}^{2}}\right)}}{B} \]
              5. unpow22.4%

                \[\leadsto -\frac{\sqrt{2} \cdot \sqrt{F \cdot \left(C - \sqrt{B \cdot B + \color{blue}{C \cdot C}}\right)}}{B} \]
              6. hypot-def39.6%

                \[\leadsto -\frac{\sqrt{2} \cdot \sqrt{F \cdot \left(C - \color{blue}{\mathsf{hypot}\left(B, C\right)}\right)}}{B} \]
            6. Simplified39.6%

              \[\leadsto \color{blue}{-\frac{\sqrt{2} \cdot \sqrt{F \cdot \left(C - \mathsf{hypot}\left(B, C\right)\right)}}{B}} \]
            7. Step-by-step derivation
              1. add-sqr-sqrt39.5%

                \[\leadsto -\color{blue}{\sqrt{\frac{\sqrt{2} \cdot \sqrt{F \cdot \left(C - \mathsf{hypot}\left(B, C\right)\right)}}{B}} \cdot \sqrt{\frac{\sqrt{2} \cdot \sqrt{F \cdot \left(C - \mathsf{hypot}\left(B, C\right)\right)}}{B}}} \]
              2. sqrt-unprod15.7%

                \[\leadsto -\color{blue}{\sqrt{\frac{\sqrt{2} \cdot \sqrt{F \cdot \left(C - \mathsf{hypot}\left(B, C\right)\right)}}{B} \cdot \frac{\sqrt{2} \cdot \sqrt{F \cdot \left(C - \mathsf{hypot}\left(B, C\right)\right)}}{B}}} \]
              3. frac-times2.5%

                \[\leadsto -\sqrt{\color{blue}{\frac{\left(\sqrt{2} \cdot \sqrt{F \cdot \left(C - \mathsf{hypot}\left(B, C\right)\right)}\right) \cdot \left(\sqrt{2} \cdot \sqrt{F \cdot \left(C - \mathsf{hypot}\left(B, C\right)\right)}\right)}{B \cdot B}}} \]
              4. sqrt-unprod2.5%

                \[\leadsto -\sqrt{\frac{\color{blue}{\sqrt{2 \cdot \left(F \cdot \left(C - \mathsf{hypot}\left(B, C\right)\right)\right)}} \cdot \left(\sqrt{2} \cdot \sqrt{F \cdot \left(C - \mathsf{hypot}\left(B, C\right)\right)}\right)}{B \cdot B}} \]
              5. sqrt-unprod2.5%

                \[\leadsto -\sqrt{\frac{\sqrt{2 \cdot \left(F \cdot \left(C - \mathsf{hypot}\left(B, C\right)\right)\right)} \cdot \color{blue}{\sqrt{2 \cdot \left(F \cdot \left(C - \mathsf{hypot}\left(B, C\right)\right)\right)}}}{B \cdot B}} \]
              6. add-sqr-sqrt2.5%

                \[\leadsto -\sqrt{\frac{\color{blue}{2 \cdot \left(F \cdot \left(C - \mathsf{hypot}\left(B, C\right)\right)\right)}}{B \cdot B}} \]
            8. Applied egg-rr2.5%

              \[\leadsto -\color{blue}{\sqrt{\frac{2 \cdot \left(F \cdot \left(C - \mathsf{hypot}\left(B, C\right)\right)\right)}{B \cdot B}}} \]
            9. Step-by-step derivation
              1. associate-*r*2.5%

                \[\leadsto -\sqrt{\frac{\color{blue}{\left(2 \cdot F\right) \cdot \left(C - \mathsf{hypot}\left(B, C\right)\right)}}{B \cdot B}} \]
              2. times-frac75.7%

                \[\leadsto -\sqrt{\color{blue}{\frac{2 \cdot F}{B} \cdot \frac{C - \mathsf{hypot}\left(B, C\right)}{B}}} \]
            10. Simplified75.7%

              \[\leadsto -\color{blue}{\sqrt{\frac{2 \cdot F}{B} \cdot \frac{C - \mathsf{hypot}\left(B, C\right)}{B}}} \]
          3. Recombined 4 regimes into one program.
          4. Final simplification28.2%

            \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 5.5 \cdot 10^{-61}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(2 \cdot A\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \mathbf{elif}\;B \leq 5.5 \cdot 10^{+39}:\\ \;\;\;\;\frac{\sqrt{2} \cdot \left(-\sqrt{F \cdot \left(-0.5 \cdot \frac{B \cdot B}{C}\right)}\right)}{B}\\ \mathbf{elif}\;B \leq 9.5 \cdot 10^{+260}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(F \cdot \left(A - \mathsf{hypot}\left(A, B\right)\right)\right)}}{B}\\ \mathbf{else}:\\ \;\;\;\;-\sqrt{\frac{2 \cdot F}{B} \cdot \frac{C - \mathsf{hypot}\left(B, C\right)}{B}}\\ \end{array} \]

          Alternative 2: 47.1% accurate, 2.9× speedup?

          \[\begin{array}{l} B = |B|\\ [A, C] = \mathsf{sort}([A, C])\\ \\ \begin{array}{l} t_0 := B \cdot B + \left(A \cdot C\right) \cdot -4\\ \mathbf{if}\;B \leq 1.45 \cdot 10^{+25}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 7.6 \cdot 10^{+260}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(F \cdot \left(A - \mathsf{hypot}\left(A, B\right)\right)\right)}}{B}\\ \mathbf{else}:\\ \;\;\;\;-\sqrt{\frac{2 \cdot F}{B} \cdot \frac{C - \mathsf{hypot}\left(B, C\right)}{B}}\\ \end{array} \end{array} \]
          NOTE: B should be positive before calling this function
          NOTE: A and C should be sorted in increasing order before calling this function.
          (FPCore (A B C F)
           :precision binary64
           (let* ((t_0 (+ (* B B) (* (* A C) -4.0))))
             (if (<= B 1.45e+25)
               (/ (- (sqrt (* 2.0 (* t_0 (* F (* 2.0 A)))))) t_0)
               (if (<= B 7.6e+260)
                 (/ (- (sqrt (* 2.0 (* F (- A (hypot A B)))))) B)
                 (- (sqrt (* (/ (* 2.0 F) B) (/ (- C (hypot B C)) B))))))))
          B = abs(B);
          assert(A < C);
          double code(double A, double B, double C, double F) {
          	double t_0 = (B * B) + ((A * C) * -4.0);
          	double tmp;
          	if (B <= 1.45e+25) {
          		tmp = -sqrt((2.0 * (t_0 * (F * (2.0 * A))))) / t_0;
          	} else if (B <= 7.6e+260) {
          		tmp = -sqrt((2.0 * (F * (A - hypot(A, B))))) / B;
          	} else {
          		tmp = -sqrt((((2.0 * F) / B) * ((C - hypot(B, C)) / B)));
          	}
          	return tmp;
          }
          
          B = Math.abs(B);
          assert A < C;
          public static double code(double A, double B, double C, double F) {
          	double t_0 = (B * B) + ((A * C) * -4.0);
          	double tmp;
          	if (B <= 1.45e+25) {
          		tmp = -Math.sqrt((2.0 * (t_0 * (F * (2.0 * A))))) / t_0;
          	} else if (B <= 7.6e+260) {
          		tmp = -Math.sqrt((2.0 * (F * (A - Math.hypot(A, B))))) / B;
          	} else {
          		tmp = -Math.sqrt((((2.0 * F) / B) * ((C - Math.hypot(B, C)) / B)));
          	}
          	return tmp;
          }
          
          B = abs(B)
          [A, C] = sort([A, C])
          def code(A, B, C, F):
          	t_0 = (B * B) + ((A * C) * -4.0)
          	tmp = 0
          	if B <= 1.45e+25:
          		tmp = -math.sqrt((2.0 * (t_0 * (F * (2.0 * A))))) / t_0
          	elif B <= 7.6e+260:
          		tmp = -math.sqrt((2.0 * (F * (A - math.hypot(A, B))))) / B
          	else:
          		tmp = -math.sqrt((((2.0 * F) / B) * ((C - math.hypot(B, C)) / B)))
          	return tmp
          
          B = abs(B)
          A, C = sort([A, C])
          function code(A, B, C, F)
          	t_0 = Float64(Float64(B * B) + Float64(Float64(A * C) * -4.0))
          	tmp = 0.0
          	if (B <= 1.45e+25)
          		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(t_0 * Float64(F * Float64(2.0 * A)))))) / t_0);
          	elseif (B <= 7.6e+260)
          		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(F * Float64(A - hypot(A, B)))))) / B);
          	else
          		tmp = Float64(-sqrt(Float64(Float64(Float64(2.0 * F) / B) * Float64(Float64(C - hypot(B, C)) / B))));
          	end
          	return tmp
          end
          
          B = abs(B)
          A, C = num2cell(sort([A, C])){:}
          function tmp_2 = code(A, B, C, F)
          	t_0 = (B * B) + ((A * C) * -4.0);
          	tmp = 0.0;
          	if (B <= 1.45e+25)
          		tmp = -sqrt((2.0 * (t_0 * (F * (2.0 * A))))) / t_0;
          	elseif (B <= 7.6e+260)
          		tmp = -sqrt((2.0 * (F * (A - hypot(A, B))))) / B;
          	else
          		tmp = -sqrt((((2.0 * F) / B) * ((C - hypot(B, C)) / B)));
          	end
          	tmp_2 = tmp;
          end
          
          NOTE: B should be positive before calling this function
          NOTE: A and C should be sorted in increasing order before calling this function.
          code[A_, B_, C_, F_] := Block[{t$95$0 = N[(N[(B * B), $MachinePrecision] + N[(N[(A * C), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, 1.45e+25], N[((-N[Sqrt[N[(2.0 * N[(t$95$0 * N[(F * N[(2.0 * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], If[LessEqual[B, 7.6e+260], N[((-N[Sqrt[N[(2.0 * N[(F * N[(A - N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / B), $MachinePrecision], (-N[Sqrt[N[(N[(N[(2.0 * F), $MachinePrecision] / B), $MachinePrecision] * N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])]]]
          
          \begin{array}{l}
          B = |B|\\
          [A, C] = \mathsf{sort}([A, C])\\
          \\
          \begin{array}{l}
          t_0 := B \cdot B + \left(A \cdot C\right) \cdot -4\\
          \mathbf{if}\;B \leq 1.45 \cdot 10^{+25}:\\
          \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}{t_0}\\
          
          \mathbf{elif}\;B \leq 7.6 \cdot 10^{+260}:\\
          \;\;\;\;\frac{-\sqrt{2 \cdot \left(F \cdot \left(A - \mathsf{hypot}\left(A, B\right)\right)\right)}}{B}\\
          
          \mathbf{else}:\\
          \;\;\;\;-\sqrt{\frac{2 \cdot F}{B} \cdot \frac{C - \mathsf{hypot}\left(B, C\right)}{B}}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if B < 1.44999999999999995e25

            1. Initial program 19.5%

              \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
            2. Step-by-step derivation
              1. Simplified19.5%

                \[\leadsto \color{blue}{\frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(\left(A + C\right) - \sqrt{B \cdot B + {\left(A - C\right)}^{2}}\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
              2. Taylor expanded in A around -inf 19.0%

                \[\leadsto \frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \color{blue}{\left(2 \cdot A\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
              3. Step-by-step derivation
                1. distribute-frac-neg19.0%

                  \[\leadsto \color{blue}{-\frac{\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(2 \cdot A\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
                2. associate-*l*18.6%

                  \[\leadsto -\frac{\sqrt{2 \cdot \color{blue}{\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                3. cancel-sign-sub-inv18.6%

                  \[\leadsto -\frac{\sqrt{2 \cdot \left(\color{blue}{\left(B \cdot B + \left(-4\right) \cdot \left(A \cdot C\right)\right)} \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                4. metadata-eval18.6%

                  \[\leadsto -\frac{\sqrt{2 \cdot \left(\left(B \cdot B + \color{blue}{-4} \cdot \left(A \cdot C\right)\right) \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                5. *-commutative18.6%

                  \[\leadsto -\frac{\sqrt{2 \cdot \left(\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right) \cdot \left(F \cdot \color{blue}{\left(A \cdot 2\right)}\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                6. cancel-sign-sub-inv18.6%

                  \[\leadsto -\frac{\sqrt{2 \cdot \left(\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right) \cdot \left(F \cdot \left(A \cdot 2\right)\right)\right)}}{\color{blue}{B \cdot B + \left(-4\right) \cdot \left(A \cdot C\right)}} \]
                7. metadata-eval18.6%

                  \[\leadsto -\frac{\sqrt{2 \cdot \left(\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right) \cdot \left(F \cdot \left(A \cdot 2\right)\right)\right)}}{B \cdot B + \color{blue}{-4} \cdot \left(A \cdot C\right)} \]
              4. Applied egg-rr18.6%

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

              if 1.44999999999999995e25 < B < 7.5999999999999995e260

              1. Initial program 30.6%

                \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
              2. Step-by-step derivation
                1. Simplified30.6%

                  \[\leadsto \color{blue}{\frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(\left(A + C\right) - \sqrt{B \cdot B + {\left(A - C\right)}^{2}}\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
                2. Taylor expanded in C around 0 28.1%

                  \[\leadsto \color{blue}{-1 \cdot \left(\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \sqrt{{B}^{2} + {A}^{2}}\right) \cdot F}\right)} \]
                3. Step-by-step derivation
                  1. mul-1-neg28.1%

                    \[\leadsto \color{blue}{-\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \sqrt{{B}^{2} + {A}^{2}}\right) \cdot F}} \]
                  2. +-commutative28.1%

                    \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \sqrt{\color{blue}{{A}^{2} + {B}^{2}}}\right) \cdot F} \]
                  3. unpow228.1%

                    \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \sqrt{\color{blue}{A \cdot A} + {B}^{2}}\right) \cdot F} \]
                  4. unpow228.1%

                    \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \sqrt{A \cdot A + \color{blue}{B \cdot B}}\right) \cdot F} \]
                  5. hypot-def68.2%

                    \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \color{blue}{\mathsf{hypot}\left(A, B\right)}\right) \cdot F} \]
                4. Simplified68.2%

                  \[\leadsto \color{blue}{-\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F}} \]
                5. Step-by-step derivation
                  1. associate-*l/68.2%

                    \[\leadsto -\color{blue}{\frac{\sqrt{2} \cdot \sqrt{\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F}}{B}} \]
                6. Applied egg-rr68.2%

                  \[\leadsto -\color{blue}{\frac{\sqrt{2} \cdot \sqrt{\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F}}{B}} \]
                7. Step-by-step derivation
                  1. sqrt-unprod68.3%

                    \[\leadsto -\frac{\color{blue}{\sqrt{2 \cdot \left(\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F\right)}}}{B} \]
                8. Applied egg-rr68.3%

                  \[\leadsto -\frac{\color{blue}{\sqrt{2 \cdot \left(\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F\right)}}}{B} \]

                if 7.5999999999999995e260 < B

                1. Initial program 0.0%

                  \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
                2. Step-by-step derivation
                  1. Simplified0.0%

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

                      \[\leadsto \frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(\left(A + C\right) - \sqrt{B \cdot B + \color{blue}{\left(A - C\right) \cdot \left(A - C\right)}}\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                    2. hypot-udef0.0%

                      \[\leadsto \frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(\left(A + C\right) - \color{blue}{\mathsf{hypot}\left(B, A - C\right)}\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                    3. add-exp-log0.0%

                      \[\leadsto \frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(\left(A + C\right) - \color{blue}{e^{\log \left(\mathsf{hypot}\left(B, A - C\right)\right)}}\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                  3. Applied egg-rr0.0%

                    \[\leadsto \frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(\left(A + C\right) - \color{blue}{e^{\log \left(\mathsf{hypot}\left(B, A - C\right)\right)}}\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                  4. Taylor expanded in A around 0 2.4%

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

                      \[\leadsto \color{blue}{-\frac{\sqrt{2}}{B} \cdot \sqrt{\left(C - \sqrt{{B}^{2} + {C}^{2}}\right) \cdot F}} \]
                    2. associate-*l/2.4%

                      \[\leadsto -\color{blue}{\frac{\sqrt{2} \cdot \sqrt{\left(C - \sqrt{{B}^{2} + {C}^{2}}\right) \cdot F}}{B}} \]
                    3. *-commutative2.4%

                      \[\leadsto -\frac{\sqrt{2} \cdot \sqrt{\color{blue}{F \cdot \left(C - \sqrt{{B}^{2} + {C}^{2}}\right)}}}{B} \]
                    4. unpow22.4%

                      \[\leadsto -\frac{\sqrt{2} \cdot \sqrt{F \cdot \left(C - \sqrt{\color{blue}{B \cdot B} + {C}^{2}}\right)}}{B} \]
                    5. unpow22.4%

                      \[\leadsto -\frac{\sqrt{2} \cdot \sqrt{F \cdot \left(C - \sqrt{B \cdot B + \color{blue}{C \cdot C}}\right)}}{B} \]
                    6. hypot-def39.6%

                      \[\leadsto -\frac{\sqrt{2} \cdot \sqrt{F \cdot \left(C - \color{blue}{\mathsf{hypot}\left(B, C\right)}\right)}}{B} \]
                  6. Simplified39.6%

                    \[\leadsto \color{blue}{-\frac{\sqrt{2} \cdot \sqrt{F \cdot \left(C - \mathsf{hypot}\left(B, C\right)\right)}}{B}} \]
                  7. Step-by-step derivation
                    1. add-sqr-sqrt39.5%

                      \[\leadsto -\color{blue}{\sqrt{\frac{\sqrt{2} \cdot \sqrt{F \cdot \left(C - \mathsf{hypot}\left(B, C\right)\right)}}{B}} \cdot \sqrt{\frac{\sqrt{2} \cdot \sqrt{F \cdot \left(C - \mathsf{hypot}\left(B, C\right)\right)}}{B}}} \]
                    2. sqrt-unprod15.7%

                      \[\leadsto -\color{blue}{\sqrt{\frac{\sqrt{2} \cdot \sqrt{F \cdot \left(C - \mathsf{hypot}\left(B, C\right)\right)}}{B} \cdot \frac{\sqrt{2} \cdot \sqrt{F \cdot \left(C - \mathsf{hypot}\left(B, C\right)\right)}}{B}}} \]
                    3. frac-times2.5%

                      \[\leadsto -\sqrt{\color{blue}{\frac{\left(\sqrt{2} \cdot \sqrt{F \cdot \left(C - \mathsf{hypot}\left(B, C\right)\right)}\right) \cdot \left(\sqrt{2} \cdot \sqrt{F \cdot \left(C - \mathsf{hypot}\left(B, C\right)\right)}\right)}{B \cdot B}}} \]
                    4. sqrt-unprod2.5%

                      \[\leadsto -\sqrt{\frac{\color{blue}{\sqrt{2 \cdot \left(F \cdot \left(C - \mathsf{hypot}\left(B, C\right)\right)\right)}} \cdot \left(\sqrt{2} \cdot \sqrt{F \cdot \left(C - \mathsf{hypot}\left(B, C\right)\right)}\right)}{B \cdot B}} \]
                    5. sqrt-unprod2.5%

                      \[\leadsto -\sqrt{\frac{\sqrt{2 \cdot \left(F \cdot \left(C - \mathsf{hypot}\left(B, C\right)\right)\right)} \cdot \color{blue}{\sqrt{2 \cdot \left(F \cdot \left(C - \mathsf{hypot}\left(B, C\right)\right)\right)}}}{B \cdot B}} \]
                    6. add-sqr-sqrt2.5%

                      \[\leadsto -\sqrt{\frac{\color{blue}{2 \cdot \left(F \cdot \left(C - \mathsf{hypot}\left(B, C\right)\right)\right)}}{B \cdot B}} \]
                  8. Applied egg-rr2.5%

                    \[\leadsto -\color{blue}{\sqrt{\frac{2 \cdot \left(F \cdot \left(C - \mathsf{hypot}\left(B, C\right)\right)\right)}{B \cdot B}}} \]
                  9. Step-by-step derivation
                    1. associate-*r*2.5%

                      \[\leadsto -\sqrt{\frac{\color{blue}{\left(2 \cdot F\right) \cdot \left(C - \mathsf{hypot}\left(B, C\right)\right)}}{B \cdot B}} \]
                    2. times-frac75.7%

                      \[\leadsto -\sqrt{\color{blue}{\frac{2 \cdot F}{B} \cdot \frac{C - \mathsf{hypot}\left(B, C\right)}{B}}} \]
                  10. Simplified75.7%

                    \[\leadsto -\color{blue}{\sqrt{\frac{2 \cdot F}{B} \cdot \frac{C - \mathsf{hypot}\left(B, C\right)}{B}}} \]
                3. Recombined 3 regimes into one program.
                4. Final simplification27.9%

                  \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 1.45 \cdot 10^{+25}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(B \cdot B + \left(A \cdot C\right) \cdot -4\right) \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}{B \cdot B + \left(A \cdot C\right) \cdot -4}\\ \mathbf{elif}\;B \leq 7.6 \cdot 10^{+260}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(F \cdot \left(A - \mathsf{hypot}\left(A, B\right)\right)\right)}}{B}\\ \mathbf{else}:\\ \;\;\;\;-\sqrt{\frac{2 \cdot F}{B} \cdot \frac{C - \mathsf{hypot}\left(B, C\right)}{B}}\\ \end{array} \]

                Alternative 3: 47.1% accurate, 3.0× speedup?

                \[\begin{array}{l} B = |B|\\ [A, C] = \mathsf{sort}([A, C])\\ \\ \begin{array}{l} t_0 := B \cdot B + \left(A \cdot C\right) \cdot -4\\ \mathbf{if}\;B \leq 3.6 \cdot 10^{+23}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(F \cdot \left(A - \mathsf{hypot}\left(A, B\right)\right)\right)}}{B}\\ \end{array} \end{array} \]
                NOTE: B should be positive before calling this function
                NOTE: A and C should be sorted in increasing order before calling this function.
                (FPCore (A B C F)
                 :precision binary64
                 (let* ((t_0 (+ (* B B) (* (* A C) -4.0))))
                   (if (<= B 3.6e+23)
                     (/ (- (sqrt (* 2.0 (* t_0 (* F (* 2.0 A)))))) t_0)
                     (/ (- (sqrt (* 2.0 (* F (- A (hypot A B)))))) B))))
                B = abs(B);
                assert(A < C);
                double code(double A, double B, double C, double F) {
                	double t_0 = (B * B) + ((A * C) * -4.0);
                	double tmp;
                	if (B <= 3.6e+23) {
                		tmp = -sqrt((2.0 * (t_0 * (F * (2.0 * A))))) / t_0;
                	} else {
                		tmp = -sqrt((2.0 * (F * (A - hypot(A, B))))) / B;
                	}
                	return tmp;
                }
                
                B = Math.abs(B);
                assert A < C;
                public static double code(double A, double B, double C, double F) {
                	double t_0 = (B * B) + ((A * C) * -4.0);
                	double tmp;
                	if (B <= 3.6e+23) {
                		tmp = -Math.sqrt((2.0 * (t_0 * (F * (2.0 * A))))) / t_0;
                	} else {
                		tmp = -Math.sqrt((2.0 * (F * (A - Math.hypot(A, B))))) / B;
                	}
                	return tmp;
                }
                
                B = abs(B)
                [A, C] = sort([A, C])
                def code(A, B, C, F):
                	t_0 = (B * B) + ((A * C) * -4.0)
                	tmp = 0
                	if B <= 3.6e+23:
                		tmp = -math.sqrt((2.0 * (t_0 * (F * (2.0 * A))))) / t_0
                	else:
                		tmp = -math.sqrt((2.0 * (F * (A - math.hypot(A, B))))) / B
                	return tmp
                
                B = abs(B)
                A, C = sort([A, C])
                function code(A, B, C, F)
                	t_0 = Float64(Float64(B * B) + Float64(Float64(A * C) * -4.0))
                	tmp = 0.0
                	if (B <= 3.6e+23)
                		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(t_0 * Float64(F * Float64(2.0 * A)))))) / t_0);
                	else
                		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(F * Float64(A - hypot(A, B)))))) / B);
                	end
                	return tmp
                end
                
                B = abs(B)
                A, C = num2cell(sort([A, C])){:}
                function tmp_2 = code(A, B, C, F)
                	t_0 = (B * B) + ((A * C) * -4.0);
                	tmp = 0.0;
                	if (B <= 3.6e+23)
                		tmp = -sqrt((2.0 * (t_0 * (F * (2.0 * A))))) / t_0;
                	else
                		tmp = -sqrt((2.0 * (F * (A - hypot(A, B))))) / B;
                	end
                	tmp_2 = tmp;
                end
                
                NOTE: B should be positive before calling this function
                NOTE: A and C should be sorted in increasing order before calling this function.
                code[A_, B_, C_, F_] := Block[{t$95$0 = N[(N[(B * B), $MachinePrecision] + N[(N[(A * C), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, 3.6e+23], N[((-N[Sqrt[N[(2.0 * N[(t$95$0 * N[(F * N[(2.0 * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], N[((-N[Sqrt[N[(2.0 * N[(F * N[(A - N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / B), $MachinePrecision]]]
                
                \begin{array}{l}
                B = |B|\\
                [A, C] = \mathsf{sort}([A, C])\\
                \\
                \begin{array}{l}
                t_0 := B \cdot B + \left(A \cdot C\right) \cdot -4\\
                \mathbf{if}\;B \leq 3.6 \cdot 10^{+23}:\\
                \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}{t_0}\\
                
                \mathbf{else}:\\
                \;\;\;\;\frac{-\sqrt{2 \cdot \left(F \cdot \left(A - \mathsf{hypot}\left(A, B\right)\right)\right)}}{B}\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if B < 3.5999999999999998e23

                  1. Initial program 19.5%

                    \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
                  2. Step-by-step derivation
                    1. Simplified19.5%

                      \[\leadsto \color{blue}{\frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(\left(A + C\right) - \sqrt{B \cdot B + {\left(A - C\right)}^{2}}\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
                    2. Taylor expanded in A around -inf 19.0%

                      \[\leadsto \frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \color{blue}{\left(2 \cdot A\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                    3. Step-by-step derivation
                      1. distribute-frac-neg19.0%

                        \[\leadsto \color{blue}{-\frac{\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(2 \cdot A\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
                      2. associate-*l*18.6%

                        \[\leadsto -\frac{\sqrt{2 \cdot \color{blue}{\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                      3. cancel-sign-sub-inv18.6%

                        \[\leadsto -\frac{\sqrt{2 \cdot \left(\color{blue}{\left(B \cdot B + \left(-4\right) \cdot \left(A \cdot C\right)\right)} \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                      4. metadata-eval18.6%

                        \[\leadsto -\frac{\sqrt{2 \cdot \left(\left(B \cdot B + \color{blue}{-4} \cdot \left(A \cdot C\right)\right) \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                      5. *-commutative18.6%

                        \[\leadsto -\frac{\sqrt{2 \cdot \left(\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right) \cdot \left(F \cdot \color{blue}{\left(A \cdot 2\right)}\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                      6. cancel-sign-sub-inv18.6%

                        \[\leadsto -\frac{\sqrt{2 \cdot \left(\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right) \cdot \left(F \cdot \left(A \cdot 2\right)\right)\right)}}{\color{blue}{B \cdot B + \left(-4\right) \cdot \left(A \cdot C\right)}} \]
                      7. metadata-eval18.6%

                        \[\leadsto -\frac{\sqrt{2 \cdot \left(\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right) \cdot \left(F \cdot \left(A \cdot 2\right)\right)\right)}}{B \cdot B + \color{blue}{-4} \cdot \left(A \cdot C\right)} \]
                    4. Applied egg-rr18.6%

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

                    if 3.5999999999999998e23 < B

                    1. Initial program 21.9%

                      \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
                    2. Step-by-step derivation
                      1. Simplified21.9%

                        \[\leadsto \color{blue}{\frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(\left(A + C\right) - \sqrt{B \cdot B + {\left(A - C\right)}^{2}}\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
                      2. Taylor expanded in C around 0 20.9%

                        \[\leadsto \color{blue}{-1 \cdot \left(\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \sqrt{{B}^{2} + {A}^{2}}\right) \cdot F}\right)} \]
                      3. Step-by-step derivation
                        1. mul-1-neg20.9%

                          \[\leadsto \color{blue}{-\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \sqrt{{B}^{2} + {A}^{2}}\right) \cdot F}} \]
                        2. +-commutative20.9%

                          \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \sqrt{\color{blue}{{A}^{2} + {B}^{2}}}\right) \cdot F} \]
                        3. unpow220.9%

                          \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \sqrt{\color{blue}{A \cdot A} + {B}^{2}}\right) \cdot F} \]
                        4. unpow220.9%

                          \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \sqrt{A \cdot A + \color{blue}{B \cdot B}}\right) \cdot F} \]
                        5. hypot-def60.1%

                          \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \color{blue}{\mathsf{hypot}\left(A, B\right)}\right) \cdot F} \]
                      4. Simplified60.1%

                        \[\leadsto \color{blue}{-\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F}} \]
                      5. Step-by-step derivation
                        1. associate-*l/60.1%

                          \[\leadsto -\color{blue}{\frac{\sqrt{2} \cdot \sqrt{\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F}}{B}} \]
                      6. Applied egg-rr60.1%

                        \[\leadsto -\color{blue}{\frac{\sqrt{2} \cdot \sqrt{\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F}}{B}} \]
                      7. Step-by-step derivation
                        1. sqrt-unprod60.3%

                          \[\leadsto -\frac{\color{blue}{\sqrt{2 \cdot \left(\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F\right)}}}{B} \]
                      8. Applied egg-rr60.3%

                        \[\leadsto -\frac{\color{blue}{\sqrt{2 \cdot \left(\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F\right)}}}{B} \]
                    3. Recombined 2 regimes into one program.
                    4. Final simplification26.1%

                      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 3.6 \cdot 10^{+23}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(B \cdot B + \left(A \cdot C\right) \cdot -4\right) \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}{B \cdot B + \left(A \cdot C\right) \cdot -4}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(F \cdot \left(A - \mathsf{hypot}\left(A, B\right)\right)\right)}}{B}\\ \end{array} \]

                    Alternative 4: 44.5% accurate, 4.9× speedup?

                    \[\begin{array}{l} B = |B|\\ [A, C] = \mathsf{sort}([A, C])\\ \\ \begin{array}{l} t_0 := B \cdot B + \left(A \cdot C\right) \cdot -4\\ \mathbf{if}\;B \leq 8.2 \cdot 10^{+23}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(F \cdot \left(A - B\right)\right)}}{B}\\ \end{array} \end{array} \]
                    NOTE: B should be positive before calling this function
                    NOTE: A and C should be sorted in increasing order before calling this function.
                    (FPCore (A B C F)
                     :precision binary64
                     (let* ((t_0 (+ (* B B) (* (* A C) -4.0))))
                       (if (<= B 8.2e+23)
                         (/ (- (sqrt (* 2.0 (* t_0 (* F (* 2.0 A)))))) t_0)
                         (/ (- (sqrt (* 2.0 (* F (- A B))))) B))))
                    B = abs(B);
                    assert(A < C);
                    double code(double A, double B, double C, double F) {
                    	double t_0 = (B * B) + ((A * C) * -4.0);
                    	double tmp;
                    	if (B <= 8.2e+23) {
                    		tmp = -sqrt((2.0 * (t_0 * (F * (2.0 * A))))) / t_0;
                    	} else {
                    		tmp = -sqrt((2.0 * (F * (A - B)))) / B;
                    	}
                    	return tmp;
                    }
                    
                    NOTE: B should be positive before calling this function
                    NOTE: A and C should be sorted in increasing order before calling this function.
                    real(8) function code(a, b, c, f)
                        real(8), intent (in) :: a
                        real(8), intent (in) :: b
                        real(8), intent (in) :: c
                        real(8), intent (in) :: f
                        real(8) :: t_0
                        real(8) :: tmp
                        t_0 = (b * b) + ((a * c) * (-4.0d0))
                        if (b <= 8.2d+23) then
                            tmp = -sqrt((2.0d0 * (t_0 * (f * (2.0d0 * a))))) / t_0
                        else
                            tmp = -sqrt((2.0d0 * (f * (a - b)))) / b
                        end if
                        code = tmp
                    end function
                    
                    B = Math.abs(B);
                    assert A < C;
                    public static double code(double A, double B, double C, double F) {
                    	double t_0 = (B * B) + ((A * C) * -4.0);
                    	double tmp;
                    	if (B <= 8.2e+23) {
                    		tmp = -Math.sqrt((2.0 * (t_0 * (F * (2.0 * A))))) / t_0;
                    	} else {
                    		tmp = -Math.sqrt((2.0 * (F * (A - B)))) / B;
                    	}
                    	return tmp;
                    }
                    
                    B = abs(B)
                    [A, C] = sort([A, C])
                    def code(A, B, C, F):
                    	t_0 = (B * B) + ((A * C) * -4.0)
                    	tmp = 0
                    	if B <= 8.2e+23:
                    		tmp = -math.sqrt((2.0 * (t_0 * (F * (2.0 * A))))) / t_0
                    	else:
                    		tmp = -math.sqrt((2.0 * (F * (A - B)))) / B
                    	return tmp
                    
                    B = abs(B)
                    A, C = sort([A, C])
                    function code(A, B, C, F)
                    	t_0 = Float64(Float64(B * B) + Float64(Float64(A * C) * -4.0))
                    	tmp = 0.0
                    	if (B <= 8.2e+23)
                    		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(t_0 * Float64(F * Float64(2.0 * A)))))) / t_0);
                    	else
                    		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(F * Float64(A - B))))) / B);
                    	end
                    	return tmp
                    end
                    
                    B = abs(B)
                    A, C = num2cell(sort([A, C])){:}
                    function tmp_2 = code(A, B, C, F)
                    	t_0 = (B * B) + ((A * C) * -4.0);
                    	tmp = 0.0;
                    	if (B <= 8.2e+23)
                    		tmp = -sqrt((2.0 * (t_0 * (F * (2.0 * A))))) / t_0;
                    	else
                    		tmp = -sqrt((2.0 * (F * (A - B)))) / B;
                    	end
                    	tmp_2 = tmp;
                    end
                    
                    NOTE: B should be positive before calling this function
                    NOTE: A and C should be sorted in increasing order before calling this function.
                    code[A_, B_, C_, F_] := Block[{t$95$0 = N[(N[(B * B), $MachinePrecision] + N[(N[(A * C), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, 8.2e+23], N[((-N[Sqrt[N[(2.0 * N[(t$95$0 * N[(F * N[(2.0 * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], N[((-N[Sqrt[N[(2.0 * N[(F * N[(A - B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / B), $MachinePrecision]]]
                    
                    \begin{array}{l}
                    B = |B|\\
                    [A, C] = \mathsf{sort}([A, C])\\
                    \\
                    \begin{array}{l}
                    t_0 := B \cdot B + \left(A \cdot C\right) \cdot -4\\
                    \mathbf{if}\;B \leq 8.2 \cdot 10^{+23}:\\
                    \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}{t_0}\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\frac{-\sqrt{2 \cdot \left(F \cdot \left(A - B\right)\right)}}{B}\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if B < 8.19999999999999992e23

                      1. Initial program 19.5%

                        \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
                      2. Step-by-step derivation
                        1. Simplified19.5%

                          \[\leadsto \color{blue}{\frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(\left(A + C\right) - \sqrt{B \cdot B + {\left(A - C\right)}^{2}}\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
                        2. Taylor expanded in A around -inf 19.0%

                          \[\leadsto \frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \color{blue}{\left(2 \cdot A\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                        3. Step-by-step derivation
                          1. distribute-frac-neg19.0%

                            \[\leadsto \color{blue}{-\frac{\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(2 \cdot A\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
                          2. associate-*l*18.6%

                            \[\leadsto -\frac{\sqrt{2 \cdot \color{blue}{\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                          3. cancel-sign-sub-inv18.6%

                            \[\leadsto -\frac{\sqrt{2 \cdot \left(\color{blue}{\left(B \cdot B + \left(-4\right) \cdot \left(A \cdot C\right)\right)} \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                          4. metadata-eval18.6%

                            \[\leadsto -\frac{\sqrt{2 \cdot \left(\left(B \cdot B + \color{blue}{-4} \cdot \left(A \cdot C\right)\right) \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                          5. *-commutative18.6%

                            \[\leadsto -\frac{\sqrt{2 \cdot \left(\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right) \cdot \left(F \cdot \color{blue}{\left(A \cdot 2\right)}\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                          6. cancel-sign-sub-inv18.6%

                            \[\leadsto -\frac{\sqrt{2 \cdot \left(\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right) \cdot \left(F \cdot \left(A \cdot 2\right)\right)\right)}}{\color{blue}{B \cdot B + \left(-4\right) \cdot \left(A \cdot C\right)}} \]
                          7. metadata-eval18.6%

                            \[\leadsto -\frac{\sqrt{2 \cdot \left(\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right) \cdot \left(F \cdot \left(A \cdot 2\right)\right)\right)}}{B \cdot B + \color{blue}{-4} \cdot \left(A \cdot C\right)} \]
                        4. Applied egg-rr18.6%

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

                        if 8.19999999999999992e23 < B

                        1. Initial program 21.9%

                          \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
                        2. Step-by-step derivation
                          1. Simplified21.9%

                            \[\leadsto \color{blue}{\frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(\left(A + C\right) - \sqrt{B \cdot B + {\left(A - C\right)}^{2}}\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
                          2. Taylor expanded in C around 0 20.9%

                            \[\leadsto \color{blue}{-1 \cdot \left(\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \sqrt{{B}^{2} + {A}^{2}}\right) \cdot F}\right)} \]
                          3. Step-by-step derivation
                            1. mul-1-neg20.9%

                              \[\leadsto \color{blue}{-\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \sqrt{{B}^{2} + {A}^{2}}\right) \cdot F}} \]
                            2. +-commutative20.9%

                              \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \sqrt{\color{blue}{{A}^{2} + {B}^{2}}}\right) \cdot F} \]
                            3. unpow220.9%

                              \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \sqrt{\color{blue}{A \cdot A} + {B}^{2}}\right) \cdot F} \]
                            4. unpow220.9%

                              \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \sqrt{A \cdot A + \color{blue}{B \cdot B}}\right) \cdot F} \]
                            5. hypot-def60.1%

                              \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \color{blue}{\mathsf{hypot}\left(A, B\right)}\right) \cdot F} \]
                          4. Simplified60.1%

                            \[\leadsto \color{blue}{-\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F}} \]
                          5. Step-by-step derivation
                            1. associate-*l/60.1%

                              \[\leadsto -\color{blue}{\frac{\sqrt{2} \cdot \sqrt{\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F}}{B}} \]
                          6. Applied egg-rr60.1%

                            \[\leadsto -\color{blue}{\frac{\sqrt{2} \cdot \sqrt{\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F}}{B}} \]
                          7. Step-by-step derivation
                            1. sqrt-unprod60.3%

                              \[\leadsto -\frac{\color{blue}{\sqrt{2 \cdot \left(\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F\right)}}}{B} \]
                          8. Applied egg-rr60.3%

                            \[\leadsto -\frac{\color{blue}{\sqrt{2 \cdot \left(\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F\right)}}}{B} \]
                          9. Taylor expanded in A around 0 59.1%

                            \[\leadsto -\frac{\sqrt{2 \cdot \left(\color{blue}{\left(A + -1 \cdot B\right)} \cdot F\right)}}{B} \]
                          10. Step-by-step derivation
                            1. mul-1-neg59.1%

                              \[\leadsto -\frac{\sqrt{2 \cdot \left(\left(A + \color{blue}{\left(-B\right)}\right) \cdot F\right)}}{B} \]
                            2. unsub-neg59.1%

                              \[\leadsto -\frac{\sqrt{2 \cdot \left(\color{blue}{\left(A - B\right)} \cdot F\right)}}{B} \]
                          11. Simplified59.1%

                            \[\leadsto -\frac{\sqrt{2 \cdot \left(\color{blue}{\left(A - B\right)} \cdot F\right)}}{B} \]
                        3. Recombined 2 regimes into one program.
                        4. Final simplification25.9%

                          \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 8.2 \cdot 10^{+23}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(B \cdot B + \left(A \cdot C\right) \cdot -4\right) \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}{B \cdot B + \left(A \cdot C\right) \cdot -4}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(F \cdot \left(A - B\right)\right)}}{B}\\ \end{array} \]

                        Alternative 5: 42.6% accurate, 5.1× speedup?

                        \[\begin{array}{l} B = |B|\\ [A, C] = \mathsf{sort}([A, C])\\ \\ \begin{array}{l} \mathbf{if}\;B \leq 1.38 \cdot 10^{-5}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(-8 \cdot \left(A \cdot \left(\left(A \cdot C\right) \cdot F\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(F \cdot \left(A - B\right)\right)}}{B}\\ \end{array} \end{array} \]
                        NOTE: B should be positive before calling this function
                        NOTE: A and C should be sorted in increasing order before calling this function.
                        (FPCore (A B C F)
                         :precision binary64
                         (if (<= B 1.38e-5)
                           (/
                            (- (sqrt (* 2.0 (* -8.0 (* A (* (* A C) F))))))
                            (- (* B B) (* 4.0 (* A C))))
                           (/ (- (sqrt (* 2.0 (* F (- A B))))) B)))
                        B = abs(B);
                        assert(A < C);
                        double code(double A, double B, double C, double F) {
                        	double tmp;
                        	if (B <= 1.38e-5) {
                        		tmp = -sqrt((2.0 * (-8.0 * (A * ((A * C) * F))))) / ((B * B) - (4.0 * (A * C)));
                        	} else {
                        		tmp = -sqrt((2.0 * (F * (A - B)))) / B;
                        	}
                        	return tmp;
                        }
                        
                        NOTE: B should be positive before calling this function
                        NOTE: A and C should be sorted in increasing order before calling this function.
                        real(8) function code(a, b, c, f)
                            real(8), intent (in) :: a
                            real(8), intent (in) :: b
                            real(8), intent (in) :: c
                            real(8), intent (in) :: f
                            real(8) :: tmp
                            if (b <= 1.38d-5) then
                                tmp = -sqrt((2.0d0 * ((-8.0d0) * (a * ((a * c) * f))))) / ((b * b) - (4.0d0 * (a * c)))
                            else
                                tmp = -sqrt((2.0d0 * (f * (a - b)))) / b
                            end if
                            code = tmp
                        end function
                        
                        B = Math.abs(B);
                        assert A < C;
                        public static double code(double A, double B, double C, double F) {
                        	double tmp;
                        	if (B <= 1.38e-5) {
                        		tmp = -Math.sqrt((2.0 * (-8.0 * (A * ((A * C) * F))))) / ((B * B) - (4.0 * (A * C)));
                        	} else {
                        		tmp = -Math.sqrt((2.0 * (F * (A - B)))) / B;
                        	}
                        	return tmp;
                        }
                        
                        B = abs(B)
                        [A, C] = sort([A, C])
                        def code(A, B, C, F):
                        	tmp = 0
                        	if B <= 1.38e-5:
                        		tmp = -math.sqrt((2.0 * (-8.0 * (A * ((A * C) * F))))) / ((B * B) - (4.0 * (A * C)))
                        	else:
                        		tmp = -math.sqrt((2.0 * (F * (A - B)))) / B
                        	return tmp
                        
                        B = abs(B)
                        A, C = sort([A, C])
                        function code(A, B, C, F)
                        	tmp = 0.0
                        	if (B <= 1.38e-5)
                        		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(-8.0 * Float64(A * Float64(Float64(A * C) * F)))))) / Float64(Float64(B * B) - Float64(4.0 * Float64(A * C))));
                        	else
                        		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(F * Float64(A - B))))) / B);
                        	end
                        	return tmp
                        end
                        
                        B = abs(B)
                        A, C = num2cell(sort([A, C])){:}
                        function tmp_2 = code(A, B, C, F)
                        	tmp = 0.0;
                        	if (B <= 1.38e-5)
                        		tmp = -sqrt((2.0 * (-8.0 * (A * ((A * C) * F))))) / ((B * B) - (4.0 * (A * C)));
                        	else
                        		tmp = -sqrt((2.0 * (F * (A - B)))) / B;
                        	end
                        	tmp_2 = tmp;
                        end
                        
                        NOTE: B should be positive before calling this function
                        NOTE: A and C should be sorted in increasing order before calling this function.
                        code[A_, B_, C_, F_] := If[LessEqual[B, 1.38e-5], N[((-N[Sqrt[N[(2.0 * N[(-8.0 * N[(A * N[(N[(A * C), $MachinePrecision] * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / N[(N[(B * B), $MachinePrecision] - N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-N[Sqrt[N[(2.0 * N[(F * N[(A - B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / B), $MachinePrecision]]
                        
                        \begin{array}{l}
                        B = |B|\\
                        [A, C] = \mathsf{sort}([A, C])\\
                        \\
                        \begin{array}{l}
                        \mathbf{if}\;B \leq 1.38 \cdot 10^{-5}:\\
                        \;\;\;\;\frac{-\sqrt{2 \cdot \left(-8 \cdot \left(A \cdot \left(\left(A \cdot C\right) \cdot F\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;\frac{-\sqrt{2 \cdot \left(F \cdot \left(A - B\right)\right)}}{B}\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 2 regimes
                        2. if B < 1.38e-5

                          1. Initial program 19.9%

                            \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
                          2. Step-by-step derivation
                            1. Simplified19.9%

                              \[\leadsto \color{blue}{\frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(\left(A + C\right) - \sqrt{B \cdot B + {\left(A - C\right)}^{2}}\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
                            2. Taylor expanded in A around -inf 19.4%

                              \[\leadsto \frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \color{blue}{\left(2 \cdot A\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                            3. Taylor expanded in B around 0 11.5%

                              \[\leadsto \frac{-\sqrt{2 \cdot \color{blue}{\left(-8 \cdot \left({A}^{2} \cdot \left(C \cdot F\right)\right)\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                            4. Step-by-step derivation
                              1. *-commutative11.5%

                                \[\leadsto \frac{-\sqrt{2 \cdot \left(-8 \cdot \left({A}^{2} \cdot \color{blue}{\left(F \cdot C\right)}\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                              2. unpow211.5%

                                \[\leadsto \frac{-\sqrt{2 \cdot \left(-8 \cdot \left(\color{blue}{\left(A \cdot A\right)} \cdot \left(F \cdot C\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                              3. associate-*l*15.2%

                                \[\leadsto \frac{-\sqrt{2 \cdot \left(-8 \cdot \color{blue}{\left(A \cdot \left(A \cdot \left(F \cdot C\right)\right)\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                              4. *-commutative15.2%

                                \[\leadsto \frac{-\sqrt{2 \cdot \left(-8 \cdot \left(A \cdot \left(A \cdot \color{blue}{\left(C \cdot F\right)}\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                              5. associate-*r*18.9%

                                \[\leadsto \frac{-\sqrt{2 \cdot \left(-8 \cdot \left(A \cdot \color{blue}{\left(\left(A \cdot C\right) \cdot F\right)}\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                            5. Simplified18.9%

                              \[\leadsto \frac{-\sqrt{2 \cdot \color{blue}{\left(-8 \cdot \left(A \cdot \left(\left(A \cdot C\right) \cdot F\right)\right)\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]

                            if 1.38e-5 < B

                            1. Initial program 20.0%

                              \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
                            2. Step-by-step derivation
                              1. Simplified20.0%

                                \[\leadsto \color{blue}{\frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(\left(A + C\right) - \sqrt{B \cdot B + {\left(A - C\right)}^{2}}\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
                              2. Taylor expanded in C around 0 19.2%

                                \[\leadsto \color{blue}{-1 \cdot \left(\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \sqrt{{B}^{2} + {A}^{2}}\right) \cdot F}\right)} \]
                              3. Step-by-step derivation
                                1. mul-1-neg19.2%

                                  \[\leadsto \color{blue}{-\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \sqrt{{B}^{2} + {A}^{2}}\right) \cdot F}} \]
                                2. +-commutative19.2%

                                  \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \sqrt{\color{blue}{{A}^{2} + {B}^{2}}}\right) \cdot F} \]
                                3. unpow219.2%

                                  \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \sqrt{\color{blue}{A \cdot A} + {B}^{2}}\right) \cdot F} \]
                                4. unpow219.2%

                                  \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \sqrt{A \cdot A + \color{blue}{B \cdot B}}\right) \cdot F} \]
                                5. hypot-def51.6%

                                  \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \color{blue}{\mathsf{hypot}\left(A, B\right)}\right) \cdot F} \]
                              4. Simplified51.6%

                                \[\leadsto \color{blue}{-\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F}} \]
                              5. Step-by-step derivation
                                1. associate-*l/51.6%

                                  \[\leadsto -\color{blue}{\frac{\sqrt{2} \cdot \sqrt{\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F}}{B}} \]
                              6. Applied egg-rr51.6%

                                \[\leadsto -\color{blue}{\frac{\sqrt{2} \cdot \sqrt{\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F}}{B}} \]
                              7. Step-by-step derivation
                                1. sqrt-unprod51.8%

                                  \[\leadsto -\frac{\color{blue}{\sqrt{2 \cdot \left(\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F\right)}}}{B} \]
                              8. Applied egg-rr51.8%

                                \[\leadsto -\frac{\color{blue}{\sqrt{2 \cdot \left(\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F\right)}}}{B} \]
                              9. Taylor expanded in A around 0 50.3%

                                \[\leadsto -\frac{\sqrt{2 \cdot \left(\color{blue}{\left(A + -1 \cdot B\right)} \cdot F\right)}}{B} \]
                              10. Step-by-step derivation
                                1. mul-1-neg50.3%

                                  \[\leadsto -\frac{\sqrt{2 \cdot \left(\left(A + \color{blue}{\left(-B\right)}\right) \cdot F\right)}}{B} \]
                                2. unsub-neg50.3%

                                  \[\leadsto -\frac{\sqrt{2 \cdot \left(\color{blue}{\left(A - B\right)} \cdot F\right)}}{B} \]
                              11. Simplified50.3%

                                \[\leadsto -\frac{\sqrt{2 \cdot \left(\color{blue}{\left(A - B\right)} \cdot F\right)}}{B} \]
                            3. Recombined 2 regimes into one program.
                            4. Final simplification25.8%

                              \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 1.38 \cdot 10^{-5}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(-8 \cdot \left(A \cdot \left(\left(A \cdot C\right) \cdot F\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(F \cdot \left(A - B\right)\right)}}{B}\\ \end{array} \]

                            Alternative 6: 28.3% accurate, 5.7× speedup?

                            \[\begin{array}{l} B = |B|\\ [A, C] = \mathsf{sort}([A, C])\\ \\ \begin{array}{l} \mathbf{if}\;A \leq -1.3 \cdot 10^{+185}:\\ \;\;\;\;-2 \cdot \sqrt{\frac{F}{B} \cdot \frac{A}{B}}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(F \cdot \left(A - B\right)\right)}}{B}\\ \end{array} \end{array} \]
                            NOTE: B should be positive before calling this function
                            NOTE: A and C should be sorted in increasing order before calling this function.
                            (FPCore (A B C F)
                             :precision binary64
                             (if (<= A -1.3e+185)
                               (* -2.0 (sqrt (* (/ F B) (/ A B))))
                               (/ (- (sqrt (* 2.0 (* F (- A B))))) B)))
                            B = abs(B);
                            assert(A < C);
                            double code(double A, double B, double C, double F) {
                            	double tmp;
                            	if (A <= -1.3e+185) {
                            		tmp = -2.0 * sqrt(((F / B) * (A / B)));
                            	} else {
                            		tmp = -sqrt((2.0 * (F * (A - B)))) / B;
                            	}
                            	return tmp;
                            }
                            
                            NOTE: B should be positive before calling this function
                            NOTE: A and C should be sorted in increasing order before calling this function.
                            real(8) function code(a, b, c, f)
                                real(8), intent (in) :: a
                                real(8), intent (in) :: b
                                real(8), intent (in) :: c
                                real(8), intent (in) :: f
                                real(8) :: tmp
                                if (a <= (-1.3d+185)) then
                                    tmp = (-2.0d0) * sqrt(((f / b) * (a / b)))
                                else
                                    tmp = -sqrt((2.0d0 * (f * (a - b)))) / b
                                end if
                                code = tmp
                            end function
                            
                            B = Math.abs(B);
                            assert A < C;
                            public static double code(double A, double B, double C, double F) {
                            	double tmp;
                            	if (A <= -1.3e+185) {
                            		tmp = -2.0 * Math.sqrt(((F / B) * (A / B)));
                            	} else {
                            		tmp = -Math.sqrt((2.0 * (F * (A - B)))) / B;
                            	}
                            	return tmp;
                            }
                            
                            B = abs(B)
                            [A, C] = sort([A, C])
                            def code(A, B, C, F):
                            	tmp = 0
                            	if A <= -1.3e+185:
                            		tmp = -2.0 * math.sqrt(((F / B) * (A / B)))
                            	else:
                            		tmp = -math.sqrt((2.0 * (F * (A - B)))) / B
                            	return tmp
                            
                            B = abs(B)
                            A, C = sort([A, C])
                            function code(A, B, C, F)
                            	tmp = 0.0
                            	if (A <= -1.3e+185)
                            		tmp = Float64(-2.0 * sqrt(Float64(Float64(F / B) * Float64(A / B))));
                            	else
                            		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(F * Float64(A - B))))) / B);
                            	end
                            	return tmp
                            end
                            
                            B = abs(B)
                            A, C = num2cell(sort([A, C])){:}
                            function tmp_2 = code(A, B, C, F)
                            	tmp = 0.0;
                            	if (A <= -1.3e+185)
                            		tmp = -2.0 * sqrt(((F / B) * (A / B)));
                            	else
                            		tmp = -sqrt((2.0 * (F * (A - B)))) / B;
                            	end
                            	tmp_2 = tmp;
                            end
                            
                            NOTE: B should be positive before calling this function
                            NOTE: A and C should be sorted in increasing order before calling this function.
                            code[A_, B_, C_, F_] := If[LessEqual[A, -1.3e+185], N[(-2.0 * N[Sqrt[N[(N[(F / B), $MachinePrecision] * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[((-N[Sqrt[N[(2.0 * N[(F * N[(A - B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / B), $MachinePrecision]]
                            
                            \begin{array}{l}
                            B = |B|\\
                            [A, C] = \mathsf{sort}([A, C])\\
                            \\
                            \begin{array}{l}
                            \mathbf{if}\;A \leq -1.3 \cdot 10^{+185}:\\
                            \;\;\;\;-2 \cdot \sqrt{\frac{F}{B} \cdot \frac{A}{B}}\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\frac{-\sqrt{2 \cdot \left(F \cdot \left(A - B\right)\right)}}{B}\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if A < -1.3e185

                              1. Initial program 2.1%

                                \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
                              2. Step-by-step derivation
                                1. Simplified2.1%

                                  \[\leadsto \color{blue}{\frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(\left(A + C\right) - \sqrt{B \cdot B + {\left(A - C\right)}^{2}}\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
                                2. Taylor expanded in A around -inf 20.4%

                                  \[\leadsto \frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \color{blue}{\left(2 \cdot A\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                3. Taylor expanded in B around inf 5.0%

                                  \[\leadsto \color{blue}{-2 \cdot \left(\sqrt{A \cdot F} \cdot \frac{1}{B}\right)} \]
                                4. Step-by-step derivation
                                  1. associate-*r/5.0%

                                    \[\leadsto -2 \cdot \color{blue}{\frac{\sqrt{A \cdot F} \cdot 1}{B}} \]
                                  2. *-rgt-identity5.0%

                                    \[\leadsto -2 \cdot \frac{\color{blue}{\sqrt{A \cdot F}}}{B} \]
                                  3. *-commutative5.0%

                                    \[\leadsto -2 \cdot \frac{\sqrt{\color{blue}{F \cdot A}}}{B} \]
                                5. Simplified5.0%

                                  \[\leadsto \color{blue}{-2 \cdot \frac{\sqrt{F \cdot A}}{B}} \]
                                6. Step-by-step derivation
                                  1. add-sqr-sqrt4.5%

                                    \[\leadsto -2 \cdot \color{blue}{\left(\sqrt{\frac{\sqrt{F \cdot A}}{B}} \cdot \sqrt{\frac{\sqrt{F \cdot A}}{B}}\right)} \]
                                  2. sqrt-unprod6.6%

                                    \[\leadsto -2 \cdot \color{blue}{\sqrt{\frac{\sqrt{F \cdot A}}{B} \cdot \frac{\sqrt{F \cdot A}}{B}}} \]
                                  3. frac-times2.9%

                                    \[\leadsto -2 \cdot \sqrt{\color{blue}{\frac{\sqrt{F \cdot A} \cdot \sqrt{F \cdot A}}{B \cdot B}}} \]
                                  4. add-sqr-sqrt2.9%

                                    \[\leadsto -2 \cdot \sqrt{\frac{\color{blue}{F \cdot A}}{B \cdot B}} \]
                                  5. *-commutative2.9%

                                    \[\leadsto -2 \cdot \sqrt{\frac{\color{blue}{A \cdot F}}{B \cdot B}} \]
                                7. Applied egg-rr2.9%

                                  \[\leadsto -2 \cdot \color{blue}{\sqrt{\frac{A \cdot F}{B \cdot B}}} \]
                                8. Step-by-step derivation
                                  1. *-commutative2.9%

                                    \[\leadsto -2 \cdot \sqrt{\frac{\color{blue}{F \cdot A}}{B \cdot B}} \]
                                  2. times-frac29.4%

                                    \[\leadsto -2 \cdot \sqrt{\color{blue}{\frac{F}{B} \cdot \frac{A}{B}}} \]
                                9. Simplified29.4%

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

                                if -1.3e185 < A

                                1. Initial program 21.5%

                                  \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
                                2. Step-by-step derivation
                                  1. Simplified21.5%

                                    \[\leadsto \color{blue}{\frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(\left(A + C\right) - \sqrt{B \cdot B + {\left(A - C\right)}^{2}}\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
                                  2. Taylor expanded in C around 0 8.4%

                                    \[\leadsto \color{blue}{-1 \cdot \left(\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \sqrt{{B}^{2} + {A}^{2}}\right) \cdot F}\right)} \]
                                  3. Step-by-step derivation
                                    1. mul-1-neg8.4%

                                      \[\leadsto \color{blue}{-\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \sqrt{{B}^{2} + {A}^{2}}\right) \cdot F}} \]
                                    2. +-commutative8.4%

                                      \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \sqrt{\color{blue}{{A}^{2} + {B}^{2}}}\right) \cdot F} \]
                                    3. unpow28.4%

                                      \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \sqrt{\color{blue}{A \cdot A} + {B}^{2}}\right) \cdot F} \]
                                    4. unpow28.4%

                                      \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \sqrt{A \cdot A + \color{blue}{B \cdot B}}\right) \cdot F} \]
                                    5. hypot-def16.4%

                                      \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \color{blue}{\mathsf{hypot}\left(A, B\right)}\right) \cdot F} \]
                                  4. Simplified16.4%

                                    \[\leadsto \color{blue}{-\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F}} \]
                                  5. Step-by-step derivation
                                    1. associate-*l/16.3%

                                      \[\leadsto -\color{blue}{\frac{\sqrt{2} \cdot \sqrt{\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F}}{B}} \]
                                  6. Applied egg-rr16.3%

                                    \[\leadsto -\color{blue}{\frac{\sqrt{2} \cdot \sqrt{\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F}}{B}} \]
                                  7. Step-by-step derivation
                                    1. sqrt-unprod16.4%

                                      \[\leadsto -\frac{\color{blue}{\sqrt{2 \cdot \left(\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F\right)}}}{B} \]
                                  8. Applied egg-rr16.4%

                                    \[\leadsto -\frac{\color{blue}{\sqrt{2 \cdot \left(\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F\right)}}}{B} \]
                                  9. Taylor expanded in A around 0 14.0%

                                    \[\leadsto -\frac{\sqrt{2 \cdot \left(\color{blue}{\left(A + -1 \cdot B\right)} \cdot F\right)}}{B} \]
                                  10. Step-by-step derivation
                                    1. mul-1-neg14.0%

                                      \[\leadsto -\frac{\sqrt{2 \cdot \left(\left(A + \color{blue}{\left(-B\right)}\right) \cdot F\right)}}{B} \]
                                    2. unsub-neg14.0%

                                      \[\leadsto -\frac{\sqrt{2 \cdot \left(\color{blue}{\left(A - B\right)} \cdot F\right)}}{B} \]
                                  11. Simplified14.0%

                                    \[\leadsto -\frac{\sqrt{2 \cdot \left(\color{blue}{\left(A - B\right)} \cdot F\right)}}{B} \]
                                3. Recombined 2 regimes into one program.
                                4. Final simplification15.2%

                                  \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -1.3 \cdot 10^{+185}:\\ \;\;\;\;-2 \cdot \sqrt{\frac{F}{B} \cdot \frac{A}{B}}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(F \cdot \left(A - B\right)\right)}}{B}\\ \end{array} \]

                                Alternative 7: 28.1% accurate, 5.7× speedup?

                                \[\begin{array}{l} B = |B|\\ [A, C] = \mathsf{sort}([A, C])\\ \\ \begin{array}{l} \mathbf{if}\;A \leq -3.2 \cdot 10^{+199}:\\ \;\;\;\;-2 \cdot \sqrt{\frac{F}{B} \cdot \frac{A}{B}}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(F \cdot \left(-B\right)\right)}}{B}\\ \end{array} \end{array} \]
                                NOTE: B should be positive before calling this function
                                NOTE: A and C should be sorted in increasing order before calling this function.
                                (FPCore (A B C F)
                                 :precision binary64
                                 (if (<= A -3.2e+199)
                                   (* -2.0 (sqrt (* (/ F B) (/ A B))))
                                   (/ (- (sqrt (* 2.0 (* F (- B))))) B)))
                                B = abs(B);
                                assert(A < C);
                                double code(double A, double B, double C, double F) {
                                	double tmp;
                                	if (A <= -3.2e+199) {
                                		tmp = -2.0 * sqrt(((F / B) * (A / B)));
                                	} else {
                                		tmp = -sqrt((2.0 * (F * -B))) / B;
                                	}
                                	return tmp;
                                }
                                
                                NOTE: B should be positive before calling this function
                                NOTE: A and C should be sorted in increasing order before calling this function.
                                real(8) function code(a, b, c, f)
                                    real(8), intent (in) :: a
                                    real(8), intent (in) :: b
                                    real(8), intent (in) :: c
                                    real(8), intent (in) :: f
                                    real(8) :: tmp
                                    if (a <= (-3.2d+199)) then
                                        tmp = (-2.0d0) * sqrt(((f / b) * (a / b)))
                                    else
                                        tmp = -sqrt((2.0d0 * (f * -b))) / b
                                    end if
                                    code = tmp
                                end function
                                
                                B = Math.abs(B);
                                assert A < C;
                                public static double code(double A, double B, double C, double F) {
                                	double tmp;
                                	if (A <= -3.2e+199) {
                                		tmp = -2.0 * Math.sqrt(((F / B) * (A / B)));
                                	} else {
                                		tmp = -Math.sqrt((2.0 * (F * -B))) / B;
                                	}
                                	return tmp;
                                }
                                
                                B = abs(B)
                                [A, C] = sort([A, C])
                                def code(A, B, C, F):
                                	tmp = 0
                                	if A <= -3.2e+199:
                                		tmp = -2.0 * math.sqrt(((F / B) * (A / B)))
                                	else:
                                		tmp = -math.sqrt((2.0 * (F * -B))) / B
                                	return tmp
                                
                                B = abs(B)
                                A, C = sort([A, C])
                                function code(A, B, C, F)
                                	tmp = 0.0
                                	if (A <= -3.2e+199)
                                		tmp = Float64(-2.0 * sqrt(Float64(Float64(F / B) * Float64(A / B))));
                                	else
                                		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(F * Float64(-B))))) / B);
                                	end
                                	return tmp
                                end
                                
                                B = abs(B)
                                A, C = num2cell(sort([A, C])){:}
                                function tmp_2 = code(A, B, C, F)
                                	tmp = 0.0;
                                	if (A <= -3.2e+199)
                                		tmp = -2.0 * sqrt(((F / B) * (A / B)));
                                	else
                                		tmp = -sqrt((2.0 * (F * -B))) / B;
                                	end
                                	tmp_2 = tmp;
                                end
                                
                                NOTE: B should be positive before calling this function
                                NOTE: A and C should be sorted in increasing order before calling this function.
                                code[A_, B_, C_, F_] := If[LessEqual[A, -3.2e+199], N[(-2.0 * N[Sqrt[N[(N[(F / B), $MachinePrecision] * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[((-N[Sqrt[N[(2.0 * N[(F * (-B)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / B), $MachinePrecision]]
                                
                                \begin{array}{l}
                                B = |B|\\
                                [A, C] = \mathsf{sort}([A, C])\\
                                \\
                                \begin{array}{l}
                                \mathbf{if}\;A \leq -3.2 \cdot 10^{+199}:\\
                                \;\;\;\;-2 \cdot \sqrt{\frac{F}{B} \cdot \frac{A}{B}}\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;\frac{-\sqrt{2 \cdot \left(F \cdot \left(-B\right)\right)}}{B}\\
                                
                                
                                \end{array}
                                \end{array}
                                
                                Derivation
                                1. Split input into 2 regimes
                                2. if A < -3.20000000000000006e199

                                  1. Initial program 1.9%

                                    \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
                                  2. Step-by-step derivation
                                    1. Simplified1.9%

                                      \[\leadsto \color{blue}{\frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(\left(A + C\right) - \sqrt{B \cdot B + {\left(A - C\right)}^{2}}\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
                                    2. Taylor expanded in A around -inf 17.3%

                                      \[\leadsto \frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \color{blue}{\left(2 \cdot A\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                    3. Taylor expanded in B around inf 5.0%

                                      \[\leadsto \color{blue}{-2 \cdot \left(\sqrt{A \cdot F} \cdot \frac{1}{B}\right)} \]
                                    4. Step-by-step derivation
                                      1. associate-*r/5.0%

                                        \[\leadsto -2 \cdot \color{blue}{\frac{\sqrt{A \cdot F} \cdot 1}{B}} \]
                                      2. *-rgt-identity5.0%

                                        \[\leadsto -2 \cdot \frac{\color{blue}{\sqrt{A \cdot F}}}{B} \]
                                      3. *-commutative5.0%

                                        \[\leadsto -2 \cdot \frac{\sqrt{\color{blue}{F \cdot A}}}{B} \]
                                    5. Simplified5.0%

                                      \[\leadsto \color{blue}{-2 \cdot \frac{\sqrt{F \cdot A}}{B}} \]
                                    6. Step-by-step derivation
                                      1. add-sqr-sqrt4.4%

                                        \[\leadsto -2 \cdot \color{blue}{\left(\sqrt{\frac{\sqrt{F \cdot A}}{B}} \cdot \sqrt{\frac{\sqrt{F \cdot A}}{B}}\right)} \]
                                      2. sqrt-unprod6.8%

                                        \[\leadsto -2 \cdot \color{blue}{\sqrt{\frac{\sqrt{F \cdot A}}{B} \cdot \frac{\sqrt{F \cdot A}}{B}}} \]
                                      3. frac-times2.7%

                                        \[\leadsto -2 \cdot \sqrt{\color{blue}{\frac{\sqrt{F \cdot A} \cdot \sqrt{F \cdot A}}{B \cdot B}}} \]
                                      4. add-sqr-sqrt2.7%

                                        \[\leadsto -2 \cdot \sqrt{\frac{\color{blue}{F \cdot A}}{B \cdot B}} \]
                                      5. *-commutative2.7%

                                        \[\leadsto -2 \cdot \sqrt{\frac{\color{blue}{A \cdot F}}{B \cdot B}} \]
                                    7. Applied egg-rr2.7%

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

                                        \[\leadsto -2 \cdot \sqrt{\frac{\color{blue}{F \cdot A}}{B \cdot B}} \]
                                      2. times-frac32.1%

                                        \[\leadsto -2 \cdot \sqrt{\color{blue}{\frac{F}{B} \cdot \frac{A}{B}}} \]
                                    9. Simplified32.1%

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

                                    if -3.20000000000000006e199 < A

                                    1. Initial program 21.4%

                                      \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
                                    2. Step-by-step derivation
                                      1. Simplified21.4%

                                        \[\leadsto \color{blue}{\frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(\left(A + C\right) - \sqrt{B \cdot B + {\left(A - C\right)}^{2}}\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
                                      2. Taylor expanded in C around 0 8.3%

                                        \[\leadsto \color{blue}{-1 \cdot \left(\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \sqrt{{B}^{2} + {A}^{2}}\right) \cdot F}\right)} \]
                                      3. Step-by-step derivation
                                        1. mul-1-neg8.3%

                                          \[\leadsto \color{blue}{-\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \sqrt{{B}^{2} + {A}^{2}}\right) \cdot F}} \]
                                        2. +-commutative8.3%

                                          \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \sqrt{\color{blue}{{A}^{2} + {B}^{2}}}\right) \cdot F} \]
                                        3. unpow28.3%

                                          \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \sqrt{\color{blue}{A \cdot A} + {B}^{2}}\right) \cdot F} \]
                                        4. unpow28.3%

                                          \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \sqrt{A \cdot A + \color{blue}{B \cdot B}}\right) \cdot F} \]
                                        5. hypot-def16.3%

                                          \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \color{blue}{\mathsf{hypot}\left(A, B\right)}\right) \cdot F} \]
                                      4. Simplified16.3%

                                        \[\leadsto \color{blue}{-\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F}} \]
                                      5. Step-by-step derivation
                                        1. associate-*l/16.2%

                                          \[\leadsto -\color{blue}{\frac{\sqrt{2} \cdot \sqrt{\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F}}{B}} \]
                                      6. Applied egg-rr16.2%

                                        \[\leadsto -\color{blue}{\frac{\sqrt{2} \cdot \sqrt{\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F}}{B}} \]
                                      7. Step-by-step derivation
                                        1. sqrt-unprod16.3%

                                          \[\leadsto -\frac{\color{blue}{\sqrt{2 \cdot \left(\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F\right)}}}{B} \]
                                      8. Applied egg-rr16.3%

                                        \[\leadsto -\frac{\color{blue}{\sqrt{2 \cdot \left(\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F\right)}}}{B} \]
                                      9. Taylor expanded in A around 0 14.6%

                                        \[\leadsto -\frac{\sqrt{2 \cdot \color{blue}{\left(-1 \cdot \left(F \cdot B\right)\right)}}}{B} \]
                                      10. Step-by-step derivation
                                        1. associate-*r*14.6%

                                          \[\leadsto -\frac{\sqrt{2 \cdot \color{blue}{\left(\left(-1 \cdot F\right) \cdot B\right)}}}{B} \]
                                        2. mul-1-neg14.6%

                                          \[\leadsto -\frac{\sqrt{2 \cdot \left(\color{blue}{\left(-F\right)} \cdot B\right)}}{B} \]
                                      11. Simplified14.6%

                                        \[\leadsto -\frac{\sqrt{2 \cdot \color{blue}{\left(\left(-F\right) \cdot B\right)}}}{B} \]
                                    3. Recombined 2 regimes into one program.
                                    4. Final simplification15.9%

                                      \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -3.2 \cdot 10^{+199}:\\ \;\;\;\;-2 \cdot \sqrt{\frac{F}{B} \cdot \frac{A}{B}}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(F \cdot \left(-B\right)\right)}}{B}\\ \end{array} \]

                                    Alternative 8: 26.7% accurate, 5.8× speedup?

                                    \[\begin{array}{l} B = |B|\\ [A, C] = \mathsf{sort}([A, C])\\ \\ \frac{-\sqrt{2 \cdot \left(F \cdot \left(-B\right)\right)}}{B} \end{array} \]
                                    NOTE: B should be positive before calling this function
                                    NOTE: A and C should be sorted in increasing order before calling this function.
                                    (FPCore (A B C F) :precision binary64 (/ (- (sqrt (* 2.0 (* F (- B))))) B))
                                    B = abs(B);
                                    assert(A < C);
                                    double code(double A, double B, double C, double F) {
                                    	return -sqrt((2.0 * (F * -B))) / B;
                                    }
                                    
                                    NOTE: B should be positive before calling this function
                                    NOTE: A and C should be sorted in increasing order before calling this function.
                                    real(8) function code(a, b, c, f)
                                        real(8), intent (in) :: a
                                        real(8), intent (in) :: b
                                        real(8), intent (in) :: c
                                        real(8), intent (in) :: f
                                        code = -sqrt((2.0d0 * (f * -b))) / b
                                    end function
                                    
                                    B = Math.abs(B);
                                    assert A < C;
                                    public static double code(double A, double B, double C, double F) {
                                    	return -Math.sqrt((2.0 * (F * -B))) / B;
                                    }
                                    
                                    B = abs(B)
                                    [A, C] = sort([A, C])
                                    def code(A, B, C, F):
                                    	return -math.sqrt((2.0 * (F * -B))) / B
                                    
                                    B = abs(B)
                                    A, C = sort([A, C])
                                    function code(A, B, C, F)
                                    	return Float64(Float64(-sqrt(Float64(2.0 * Float64(F * Float64(-B))))) / B)
                                    end
                                    
                                    B = abs(B)
                                    A, C = num2cell(sort([A, C])){:}
                                    function tmp = code(A, B, C, F)
                                    	tmp = -sqrt((2.0 * (F * -B))) / B;
                                    end
                                    
                                    NOTE: B should be positive before calling this function
                                    NOTE: A and C should be sorted in increasing order before calling this function.
                                    code[A_, B_, C_, F_] := N[((-N[Sqrt[N[(2.0 * N[(F * (-B)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / B), $MachinePrecision]
                                    
                                    \begin{array}{l}
                                    B = |B|\\
                                    [A, C] = \mathsf{sort}([A, C])\\
                                    \\
                                    \frac{-\sqrt{2 \cdot \left(F \cdot \left(-B\right)\right)}}{B}
                                    \end{array}
                                    
                                    Derivation
                                    1. Initial program 19.9%

                                      \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
                                    2. Step-by-step derivation
                                      1. Simplified19.9%

                                        \[\leadsto \color{blue}{\frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(\left(A + C\right) - \sqrt{B \cdot B + {\left(A - C\right)}^{2}}\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
                                      2. Taylor expanded in C around 0 7.8%

                                        \[\leadsto \color{blue}{-1 \cdot \left(\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \sqrt{{B}^{2} + {A}^{2}}\right) \cdot F}\right)} \]
                                      3. Step-by-step derivation
                                        1. mul-1-neg7.8%

                                          \[\leadsto \color{blue}{-\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \sqrt{{B}^{2} + {A}^{2}}\right) \cdot F}} \]
                                        2. +-commutative7.8%

                                          \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \sqrt{\color{blue}{{A}^{2} + {B}^{2}}}\right) \cdot F} \]
                                        3. unpow27.8%

                                          \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \sqrt{\color{blue}{A \cdot A} + {B}^{2}}\right) \cdot F} \]
                                        4. unpow27.8%

                                          \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \sqrt{A \cdot A + \color{blue}{B \cdot B}}\right) \cdot F} \]
                                        5. hypot-def15.4%

                                          \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \color{blue}{\mathsf{hypot}\left(A, B\right)}\right) \cdot F} \]
                                      4. Simplified15.4%

                                        \[\leadsto \color{blue}{-\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F}} \]
                                      5. Step-by-step derivation
                                        1. associate-*l/15.4%

                                          \[\leadsto -\color{blue}{\frac{\sqrt{2} \cdot \sqrt{\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F}}{B}} \]
                                      6. Applied egg-rr15.4%

                                        \[\leadsto -\color{blue}{\frac{\sqrt{2} \cdot \sqrt{\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F}}{B}} \]
                                      7. Step-by-step derivation
                                        1. sqrt-unprod15.5%

                                          \[\leadsto -\frac{\color{blue}{\sqrt{2 \cdot \left(\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F\right)}}}{B} \]
                                      8. Applied egg-rr15.5%

                                        \[\leadsto -\frac{\color{blue}{\sqrt{2 \cdot \left(\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F\right)}}}{B} \]
                                      9. Taylor expanded in A around 0 13.7%

                                        \[\leadsto -\frac{\sqrt{2 \cdot \color{blue}{\left(-1 \cdot \left(F \cdot B\right)\right)}}}{B} \]
                                      10. Step-by-step derivation
                                        1. associate-*r*13.7%

                                          \[\leadsto -\frac{\sqrt{2 \cdot \color{blue}{\left(\left(-1 \cdot F\right) \cdot B\right)}}}{B} \]
                                        2. mul-1-neg13.7%

                                          \[\leadsto -\frac{\sqrt{2 \cdot \left(\color{blue}{\left(-F\right)} \cdot B\right)}}{B} \]
                                      11. Simplified13.7%

                                        \[\leadsto -\frac{\sqrt{2 \cdot \color{blue}{\left(\left(-F\right) \cdot B\right)}}}{B} \]
                                      12. Final simplification13.7%

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

                                      Alternative 9: 8.8% accurate, 5.9× speedup?

                                      \[\begin{array}{l} B = |B|\\ [A, C] = \mathsf{sort}([A, C])\\ \\ -2 \cdot \frac{{\left(A \cdot F\right)}^{0.5}}{B} \end{array} \]
                                      NOTE: B should be positive before calling this function
                                      NOTE: A and C should be sorted in increasing order before calling this function.
                                      (FPCore (A B C F) :precision binary64 (* -2.0 (/ (pow (* A F) 0.5) B)))
                                      B = abs(B);
                                      assert(A < C);
                                      double code(double A, double B, double C, double F) {
                                      	return -2.0 * (pow((A * F), 0.5) / B);
                                      }
                                      
                                      NOTE: B should be positive before calling this function
                                      NOTE: A and C should be sorted in increasing order before calling this function.
                                      real(8) function code(a, b, c, f)
                                          real(8), intent (in) :: a
                                          real(8), intent (in) :: b
                                          real(8), intent (in) :: c
                                          real(8), intent (in) :: f
                                          code = (-2.0d0) * (((a * f) ** 0.5d0) / b)
                                      end function
                                      
                                      B = Math.abs(B);
                                      assert A < C;
                                      public static double code(double A, double B, double C, double F) {
                                      	return -2.0 * (Math.pow((A * F), 0.5) / B);
                                      }
                                      
                                      B = abs(B)
                                      [A, C] = sort([A, C])
                                      def code(A, B, C, F):
                                      	return -2.0 * (math.pow((A * F), 0.5) / B)
                                      
                                      B = abs(B)
                                      A, C = sort([A, C])
                                      function code(A, B, C, F)
                                      	return Float64(-2.0 * Float64((Float64(A * F) ^ 0.5) / B))
                                      end
                                      
                                      B = abs(B)
                                      A, C = num2cell(sort([A, C])){:}
                                      function tmp = code(A, B, C, F)
                                      	tmp = -2.0 * (((A * F) ^ 0.5) / B);
                                      end
                                      
                                      NOTE: B should be positive before calling this function
                                      NOTE: A and C should be sorted in increasing order before calling this function.
                                      code[A_, B_, C_, F_] := N[(-2.0 * N[(N[Power[N[(A * F), $MachinePrecision], 0.5], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]
                                      
                                      \begin{array}{l}
                                      B = |B|\\
                                      [A, C] = \mathsf{sort}([A, C])\\
                                      \\
                                      -2 \cdot \frac{{\left(A \cdot F\right)}^{0.5}}{B}
                                      \end{array}
                                      
                                      Derivation
                                      1. Initial program 19.9%

                                        \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
                                      2. Step-by-step derivation
                                        1. Simplified19.9%

                                          \[\leadsto \color{blue}{\frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(\left(A + C\right) - \sqrt{B \cdot B + {\left(A - C\right)}^{2}}\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
                                        2. Taylor expanded in A around -inf 15.7%

                                          \[\leadsto \frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \color{blue}{\left(2 \cdot A\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                        3. Taylor expanded in B around inf 2.9%

                                          \[\leadsto \color{blue}{-2 \cdot \left(\sqrt{A \cdot F} \cdot \frac{1}{B}\right)} \]
                                        4. Step-by-step derivation
                                          1. associate-*r/2.9%

                                            \[\leadsto -2 \cdot \color{blue}{\frac{\sqrt{A \cdot F} \cdot 1}{B}} \]
                                          2. *-rgt-identity2.9%

                                            \[\leadsto -2 \cdot \frac{\color{blue}{\sqrt{A \cdot F}}}{B} \]
                                          3. *-commutative2.9%

                                            \[\leadsto -2 \cdot \frac{\sqrt{\color{blue}{F \cdot A}}}{B} \]
                                        5. Simplified2.9%

                                          \[\leadsto \color{blue}{-2 \cdot \frac{\sqrt{F \cdot A}}{B}} \]
                                        6. Step-by-step derivation
                                          1. pow1/23.0%

                                            \[\leadsto -2 \cdot \frac{\color{blue}{{\left(F \cdot A\right)}^{0.5}}}{B} \]
                                          2. *-commutative3.0%

                                            \[\leadsto -2 \cdot \frac{{\color{blue}{\left(A \cdot F\right)}}^{0.5}}{B} \]
                                        7. Applied egg-rr3.0%

                                          \[\leadsto -2 \cdot \frac{\color{blue}{{\left(A \cdot F\right)}^{0.5}}}{B} \]
                                        8. Final simplification3.0%

                                          \[\leadsto -2 \cdot \frac{{\left(A \cdot F\right)}^{0.5}}{B} \]

                                        Alternative 10: 8.8% accurate, 5.9× speedup?

                                        \[\begin{array}{l} B = |B|\\ [A, C] = \mathsf{sort}([A, C])\\ \\ -2 \cdot \frac{\sqrt{A \cdot F}}{B} \end{array} \]
                                        NOTE: B should be positive before calling this function
                                        NOTE: A and C should be sorted in increasing order before calling this function.
                                        (FPCore (A B C F) :precision binary64 (* -2.0 (/ (sqrt (* A F)) B)))
                                        B = abs(B);
                                        assert(A < C);
                                        double code(double A, double B, double C, double F) {
                                        	return -2.0 * (sqrt((A * F)) / B);
                                        }
                                        
                                        NOTE: B should be positive before calling this function
                                        NOTE: A and C should be sorted in increasing order before calling this function.
                                        real(8) function code(a, b, c, f)
                                            real(8), intent (in) :: a
                                            real(8), intent (in) :: b
                                            real(8), intent (in) :: c
                                            real(8), intent (in) :: f
                                            code = (-2.0d0) * (sqrt((a * f)) / b)
                                        end function
                                        
                                        B = Math.abs(B);
                                        assert A < C;
                                        public static double code(double A, double B, double C, double F) {
                                        	return -2.0 * (Math.sqrt((A * F)) / B);
                                        }
                                        
                                        B = abs(B)
                                        [A, C] = sort([A, C])
                                        def code(A, B, C, F):
                                        	return -2.0 * (math.sqrt((A * F)) / B)
                                        
                                        B = abs(B)
                                        A, C = sort([A, C])
                                        function code(A, B, C, F)
                                        	return Float64(-2.0 * Float64(sqrt(Float64(A * F)) / B))
                                        end
                                        
                                        B = abs(B)
                                        A, C = num2cell(sort([A, C])){:}
                                        function tmp = code(A, B, C, F)
                                        	tmp = -2.0 * (sqrt((A * F)) / B);
                                        end
                                        
                                        NOTE: B should be positive before calling this function
                                        NOTE: A and C should be sorted in increasing order before calling this function.
                                        code[A_, B_, C_, F_] := N[(-2.0 * N[(N[Sqrt[N[(A * F), $MachinePrecision]], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]
                                        
                                        \begin{array}{l}
                                        B = |B|\\
                                        [A, C] = \mathsf{sort}([A, C])\\
                                        \\
                                        -2 \cdot \frac{\sqrt{A \cdot F}}{B}
                                        \end{array}
                                        
                                        Derivation
                                        1. Initial program 19.9%

                                          \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
                                        2. Step-by-step derivation
                                          1. Simplified19.9%

                                            \[\leadsto \color{blue}{\frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(\left(A + C\right) - \sqrt{B \cdot B + {\left(A - C\right)}^{2}}\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
                                          2. Taylor expanded in A around -inf 15.7%

                                            \[\leadsto \frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \color{blue}{\left(2 \cdot A\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                          3. Taylor expanded in B around inf 2.9%

                                            \[\leadsto \color{blue}{-2 \cdot \left(\sqrt{A \cdot F} \cdot \frac{1}{B}\right)} \]
                                          4. Step-by-step derivation
                                            1. associate-*r/2.9%

                                              \[\leadsto -2 \cdot \color{blue}{\frac{\sqrt{A \cdot F} \cdot 1}{B}} \]
                                            2. *-rgt-identity2.9%

                                              \[\leadsto -2 \cdot \frac{\color{blue}{\sqrt{A \cdot F}}}{B} \]
                                            3. *-commutative2.9%

                                              \[\leadsto -2 \cdot \frac{\sqrt{\color{blue}{F \cdot A}}}{B} \]
                                          5. Simplified2.9%

                                            \[\leadsto \color{blue}{-2 \cdot \frac{\sqrt{F \cdot A}}{B}} \]
                                          6. Final simplification2.9%

                                            \[\leadsto -2 \cdot \frac{\sqrt{A \cdot F}}{B} \]

                                          Reproduce

                                          ?
                                          herbie shell --seed 2023214 
                                          (FPCore (A B C F)
                                            :name "ABCF->ab-angle b"
                                            :precision binary64
                                            (/ (- (sqrt (* (* 2.0 (* (- (pow B 2.0) (* (* 4.0 A) C)) F)) (- (+ A C) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0))))))) (- (pow B 2.0) (* (* 4.0 A) C))))