ABCF->ab-angle a

Percentage Accurate: 18.7% → 43.1%
Time: 38.5s
Alternatives: 22
Speedup: 5.0×

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 22 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: 18.7% 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: 43.1% accurate, 0.4× speedup?

\[\begin{array}{l} [A, C] = \mathsf{sort}([A, C])\\ \\ \begin{array}{l} t_0 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\ t_1 := {B}^{2} - \left(4 \cdot A\right) \cdot C\\ t_2 := -\frac{\sqrt{\left(2 \cdot \left(t_1 \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}}{t_1}\\ t_3 := \sqrt{2 \cdot \left(F \cdot t_0\right)}\\ \mathbf{if}\;t_2 \leq -2 \cdot 10^{-198}:\\ \;\;\;\;\frac{t_3 \cdot \left(-\sqrt{C + \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}\right)}{t_0}\\ \mathbf{elif}\;t_2 \leq \infty:\\ \;\;\;\;\frac{\sqrt{C + \left(C + -0.5 \cdot \frac{B \cdot B}{A}\right)} \cdot \left(-t_3\right)}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{F \cdot \left(C + \mathsf{hypot}\left(B, C\right)\right)} \cdot \frac{-\sqrt{2}}{B}\\ \end{array} \end{array} \]
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))))
        (t_1 (- (pow B 2.0) (* (* 4.0 A) C)))
        (t_2
         (-
          (/
           (sqrt
            (*
             (* 2.0 (* t_1 F))
             (+ (+ A C) (sqrt (+ (pow B 2.0) (pow (- A C) 2.0))))))
           t_1)))
        (t_3 (sqrt (* 2.0 (* F t_0)))))
   (if (<= t_2 -2e-198)
     (/ (* t_3 (- (sqrt (+ C (+ A (hypot B (- A C))))))) t_0)
     (if (<= t_2 INFINITY)
       (/ (* (sqrt (+ C (+ C (* -0.5 (/ (* B B) A))))) (- t_3)) t_0)
       (* (sqrt (* F (+ C (hypot B C)))) (/ (- (sqrt 2.0)) B))))))
assert(A < C);
double code(double A, double B, double C, double F) {
	double t_0 = (B * B) - (4.0 * (A * C));
	double t_1 = pow(B, 2.0) - ((4.0 * A) * C);
	double t_2 = -(sqrt(((2.0 * (t_1 * F)) * ((A + C) + sqrt((pow(B, 2.0) + pow((A - C), 2.0)))))) / t_1);
	double t_3 = sqrt((2.0 * (F * t_0)));
	double tmp;
	if (t_2 <= -2e-198) {
		tmp = (t_3 * -sqrt((C + (A + hypot(B, (A - C)))))) / t_0;
	} else if (t_2 <= ((double) INFINITY)) {
		tmp = (sqrt((C + (C + (-0.5 * ((B * B) / A))))) * -t_3) / t_0;
	} else {
		tmp = sqrt((F * (C + hypot(B, C)))) * (-sqrt(2.0) / B);
	}
	return tmp;
}
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 t_1 = Math.pow(B, 2.0) - ((4.0 * A) * C);
	double t_2 = -(Math.sqrt(((2.0 * (t_1 * F)) * ((A + C) + Math.sqrt((Math.pow(B, 2.0) + Math.pow((A - C), 2.0)))))) / t_1);
	double t_3 = Math.sqrt((2.0 * (F * t_0)));
	double tmp;
	if (t_2 <= -2e-198) {
		tmp = (t_3 * -Math.sqrt((C + (A + Math.hypot(B, (A - C)))))) / t_0;
	} else if (t_2 <= Double.POSITIVE_INFINITY) {
		tmp = (Math.sqrt((C + (C + (-0.5 * ((B * B) / A))))) * -t_3) / t_0;
	} else {
		tmp = Math.sqrt((F * (C + Math.hypot(B, C)))) * (-Math.sqrt(2.0) / B);
	}
	return tmp;
}
[A, C] = sort([A, C])
def code(A, B, C, F):
	t_0 = (B * B) - (4.0 * (A * C))
	t_1 = math.pow(B, 2.0) - ((4.0 * A) * C)
	t_2 = -(math.sqrt(((2.0 * (t_1 * F)) * ((A + C) + math.sqrt((math.pow(B, 2.0) + math.pow((A - C), 2.0)))))) / t_1)
	t_3 = math.sqrt((2.0 * (F * t_0)))
	tmp = 0
	if t_2 <= -2e-198:
		tmp = (t_3 * -math.sqrt((C + (A + math.hypot(B, (A - C)))))) / t_0
	elif t_2 <= math.inf:
		tmp = (math.sqrt((C + (C + (-0.5 * ((B * B) / A))))) * -t_3) / t_0
	else:
		tmp = math.sqrt((F * (C + math.hypot(B, C)))) * (-math.sqrt(2.0) / B)
	return tmp
A, C = sort([A, C])
function code(A, B, C, F)
	t_0 = Float64(Float64(B * B) - Float64(4.0 * Float64(A * C)))
	t_1 = Float64((B ^ 2.0) - Float64(Float64(4.0 * A) * C))
	t_2 = Float64(-Float64(sqrt(Float64(Float64(2.0 * Float64(t_1 * F)) * Float64(Float64(A + C) + sqrt(Float64((B ^ 2.0) + (Float64(A - C) ^ 2.0)))))) / t_1))
	t_3 = sqrt(Float64(2.0 * Float64(F * t_0)))
	tmp = 0.0
	if (t_2 <= -2e-198)
		tmp = Float64(Float64(t_3 * Float64(-sqrt(Float64(C + Float64(A + hypot(B, Float64(A - C))))))) / t_0);
	elseif (t_2 <= Inf)
		tmp = Float64(Float64(sqrt(Float64(C + Float64(C + Float64(-0.5 * Float64(Float64(B * B) / A))))) * Float64(-t_3)) / t_0);
	else
		tmp = Float64(sqrt(Float64(F * Float64(C + hypot(B, C)))) * Float64(Float64(-sqrt(2.0)) / B));
	end
	return tmp
end
A, C = num2cell(sort([A, C])){:}
function tmp_2 = code(A, B, C, F)
	t_0 = (B * B) - (4.0 * (A * C));
	t_1 = (B ^ 2.0) - ((4.0 * A) * C);
	t_2 = -(sqrt(((2.0 * (t_1 * F)) * ((A + C) + sqrt(((B ^ 2.0) + ((A - C) ^ 2.0)))))) / t_1);
	t_3 = sqrt((2.0 * (F * t_0)));
	tmp = 0.0;
	if (t_2 <= -2e-198)
		tmp = (t_3 * -sqrt((C + (A + hypot(B, (A - C)))))) / t_0;
	elseif (t_2 <= Inf)
		tmp = (sqrt((C + (C + (-0.5 * ((B * B) / A))))) * -t_3) / t_0;
	else
		tmp = sqrt((F * (C + hypot(B, C)))) * (-sqrt(2.0) / B);
	end
	tmp_2 = tmp;
end
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]}, Block[{t$95$1 = N[(N[Power[B, 2.0], $MachinePrecision] - N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = (-N[(N[Sqrt[N[(N[(2.0 * N[(t$95$1 * F), $MachinePrecision]), $MachinePrecision] * N[(N[(A + C), $MachinePrecision] + N[Sqrt[N[(N[Power[B, 2.0], $MachinePrecision] + N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$1), $MachinePrecision])}, Block[{t$95$3 = N[Sqrt[N[(2.0 * N[(F * t$95$0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$2, -2e-198], N[(N[(t$95$3 * (-N[Sqrt[N[(C + N[(A + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[(N[(N[Sqrt[N[(C + N[(C + N[(-0.5 * N[(N[(B * B), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-t$95$3)), $MachinePrecision] / t$95$0), $MachinePrecision], N[(N[Sqrt[N[(F * N[(C + N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[((-N[Sqrt[2.0], $MachinePrecision]) / B), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[A, C] = \mathsf{sort}([A, C])\\
\\
\begin{array}{l}
t_0 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\
t_1 := {B}^{2} - \left(4 \cdot A\right) \cdot C\\
t_2 := -\frac{\sqrt{\left(2 \cdot \left(t_1 \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}}{t_1}\\
t_3 := \sqrt{2 \cdot \left(F \cdot t_0\right)}\\
\mathbf{if}\;t_2 \leq -2 \cdot 10^{-198}:\\
\;\;\;\;\frac{t_3 \cdot \left(-\sqrt{C + \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}\right)}{t_0}\\

\mathbf{elif}\;t_2 \leq \infty:\\
\;\;\;\;\frac{\sqrt{C + \left(C + -0.5 \cdot \frac{B \cdot B}{A}\right)} \cdot \left(-t_3\right)}{t_0}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 2 (*.f64 (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C)) F)) (+.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))))) (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C))) < -1.9999999999999998e-198

    1. Initial program 47.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. associate-*l*47.0%

        \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}\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. unpow247.0%

        \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(\color{blue}{B \cdot B} - 4 \cdot \left(A \cdot C\right)\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} \]
      3. +-commutative47.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-\sqrt{2 \cdot \left(F \cdot \left(B \cdot B - 4 \cdot \left(C \cdot A\right)\right)\right)} \cdot \sqrt{A + \left(C + \color{blue}{\mathsf{hypot}\left(B, A - C\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
      7. associate-+r+67.5%

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

        \[\leadsto \frac{-\sqrt{2 \cdot \left(F \cdot \left(B \cdot B - 4 \cdot \left(C \cdot A\right)\right)\right)} \cdot \sqrt{\color{blue}{\left(C + A\right)} + \mathsf{hypot}\left(B, A - C\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
      9. associate-+r+68.0%

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

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

    if -1.9999999999999998e-198 < (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 2 (*.f64 (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C)) F)) (+.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))))) (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C))) < +inf.0

    1. Initial program 17.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. associate-*l*17.4%

        \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}\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. unpow217.4%

        \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(\color{blue}{B \cdot B} - 4 \cdot \left(A \cdot C\right)\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} \]
      3. +-commutative17.4%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-\sqrt{2 \cdot \left(F \cdot \left(B \cdot B - 4 \cdot \left(C \cdot A\right)\right)\right)} \cdot \sqrt{A + \left(C + \color{blue}{\mathsf{hypot}\left(B, A - C\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
      7. associate-+r+25.4%

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

        \[\leadsto \frac{-\sqrt{2 \cdot \left(F \cdot \left(B \cdot B - 4 \cdot \left(C \cdot A\right)\right)\right)} \cdot \sqrt{\color{blue}{\left(C + A\right)} + \mathsf{hypot}\left(B, A - C\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
      9. associate-+r+26.6%

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

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

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

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

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

    if +inf.0 < (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 2 (*.f64 (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C)) F)) (+.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))))) (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C)))

    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.9%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;-\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{{B}^{2} + {\left(A - C\right)}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \leq -2 \cdot 10^{-198}:\\ \;\;\;\;\frac{\sqrt{2 \cdot \left(F \cdot \left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right)\right)} \cdot \left(-\sqrt{C + \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}\right)}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \mathbf{elif}\;-\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{{B}^{2} + {\left(A - C\right)}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \leq \infty:\\ \;\;\;\;\frac{\sqrt{C + \left(C + -0.5 \cdot \frac{B \cdot B}{A}\right)} \cdot \left(-\sqrt{2 \cdot \left(F \cdot \left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right)\right)}\right)}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{F \cdot \left(C + \mathsf{hypot}\left(B, C\right)\right)} \cdot \frac{-\sqrt{2}}{B}\\ \end{array} \]

    Alternative 2: 38.2% accurate, 2.0× speedup?

    \[\begin{array}{l} [A, C] = \mathsf{sort}([A, C])\\ \\ \begin{array}{l} t_0 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\ t_1 := \frac{-1}{t_0}\\ t_2 := F \cdot t_0\\ t_3 := \frac{\sqrt{C + \left(C + -0.5 \cdot \frac{B \cdot B}{A}\right)} \cdot \left(-\sqrt{2 \cdot t_2}\right)}{t_0}\\ \mathbf{if}\;B \leq -3.9 \cdot 10^{+34}:\\ \;\;\;\;\sqrt{2 \cdot \left(t_2 \cdot \left(C + \left(A + \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)} \cdot t_1\\ \mathbf{elif}\;B \leq -1.7 \cdot 10^{-27}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;B \leq -5.8 \cdot 10^{-156}:\\ \;\;\;\;\sqrt{2 \cdot \left(t_2 \cdot \left(2 \cdot C\right)\right)} \cdot t_1\\ \mathbf{elif}\;B \leq 8.5 \cdot 10^{-17}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;\sqrt{F \cdot \left(C + \mathsf{hypot}\left(B, C\right)\right)} \cdot \frac{-\sqrt{2}}{B}\\ \end{array} \end{array} \]
    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))))
            (t_1 (/ -1.0 t_0))
            (t_2 (* F t_0))
            (t_3
             (/
              (* (sqrt (+ C (+ C (* -0.5 (/ (* B B) A))))) (- (sqrt (* 2.0 t_2))))
              t_0)))
       (if (<= B -3.9e+34)
         (* (sqrt (* 2.0 (* t_2 (+ C (+ A (hypot B (- A C))))))) t_1)
         (if (<= B -1.7e-27)
           t_3
           (if (<= B -5.8e-156)
             (* (sqrt (* 2.0 (* t_2 (* 2.0 C)))) t_1)
             (if (<= B 8.5e-17)
               t_3
               (* (sqrt (* F (+ C (hypot B C)))) (/ (- (sqrt 2.0)) B))))))))
    assert(A < C);
    double code(double A, double B, double C, double F) {
    	double t_0 = (B * B) - (4.0 * (A * C));
    	double t_1 = -1.0 / t_0;
    	double t_2 = F * t_0;
    	double t_3 = (sqrt((C + (C + (-0.5 * ((B * B) / A))))) * -sqrt((2.0 * t_2))) / t_0;
    	double tmp;
    	if (B <= -3.9e+34) {
    		tmp = sqrt((2.0 * (t_2 * (C + (A + hypot(B, (A - C))))))) * t_1;
    	} else if (B <= -1.7e-27) {
    		tmp = t_3;
    	} else if (B <= -5.8e-156) {
    		tmp = sqrt((2.0 * (t_2 * (2.0 * C)))) * t_1;
    	} else if (B <= 8.5e-17) {
    		tmp = t_3;
    	} else {
    		tmp = sqrt((F * (C + hypot(B, C)))) * (-sqrt(2.0) / B);
    	}
    	return tmp;
    }
    
    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 t_1 = -1.0 / t_0;
    	double t_2 = F * t_0;
    	double t_3 = (Math.sqrt((C + (C + (-0.5 * ((B * B) / A))))) * -Math.sqrt((2.0 * t_2))) / t_0;
    	double tmp;
    	if (B <= -3.9e+34) {
    		tmp = Math.sqrt((2.0 * (t_2 * (C + (A + Math.hypot(B, (A - C))))))) * t_1;
    	} else if (B <= -1.7e-27) {
    		tmp = t_3;
    	} else if (B <= -5.8e-156) {
    		tmp = Math.sqrt((2.0 * (t_2 * (2.0 * C)))) * t_1;
    	} else if (B <= 8.5e-17) {
    		tmp = t_3;
    	} else {
    		tmp = Math.sqrt((F * (C + Math.hypot(B, C)))) * (-Math.sqrt(2.0) / B);
    	}
    	return tmp;
    }
    
    [A, C] = sort([A, C])
    def code(A, B, C, F):
    	t_0 = (B * B) - (4.0 * (A * C))
    	t_1 = -1.0 / t_0
    	t_2 = F * t_0
    	t_3 = (math.sqrt((C + (C + (-0.5 * ((B * B) / A))))) * -math.sqrt((2.0 * t_2))) / t_0
    	tmp = 0
    	if B <= -3.9e+34:
    		tmp = math.sqrt((2.0 * (t_2 * (C + (A + math.hypot(B, (A - C))))))) * t_1
    	elif B <= -1.7e-27:
    		tmp = t_3
    	elif B <= -5.8e-156:
    		tmp = math.sqrt((2.0 * (t_2 * (2.0 * C)))) * t_1
    	elif B <= 8.5e-17:
    		tmp = t_3
    	else:
    		tmp = math.sqrt((F * (C + math.hypot(B, C)))) * (-math.sqrt(2.0) / B)
    	return tmp
    
    A, C = sort([A, C])
    function code(A, B, C, F)
    	t_0 = Float64(Float64(B * B) - Float64(4.0 * Float64(A * C)))
    	t_1 = Float64(-1.0 / t_0)
    	t_2 = Float64(F * t_0)
    	t_3 = Float64(Float64(sqrt(Float64(C + Float64(C + Float64(-0.5 * Float64(Float64(B * B) / A))))) * Float64(-sqrt(Float64(2.0 * t_2)))) / t_0)
    	tmp = 0.0
    	if (B <= -3.9e+34)
    		tmp = Float64(sqrt(Float64(2.0 * Float64(t_2 * Float64(C + Float64(A + hypot(B, Float64(A - C))))))) * t_1);
    	elseif (B <= -1.7e-27)
    		tmp = t_3;
    	elseif (B <= -5.8e-156)
    		tmp = Float64(sqrt(Float64(2.0 * Float64(t_2 * Float64(2.0 * C)))) * t_1);
    	elseif (B <= 8.5e-17)
    		tmp = t_3;
    	else
    		tmp = Float64(sqrt(Float64(F * Float64(C + hypot(B, C)))) * Float64(Float64(-sqrt(2.0)) / B));
    	end
    	return tmp
    end
    
    A, C = num2cell(sort([A, C])){:}
    function tmp_2 = code(A, B, C, F)
    	t_0 = (B * B) - (4.0 * (A * C));
    	t_1 = -1.0 / t_0;
    	t_2 = F * t_0;
    	t_3 = (sqrt((C + (C + (-0.5 * ((B * B) / A))))) * -sqrt((2.0 * t_2))) / t_0;
    	tmp = 0.0;
    	if (B <= -3.9e+34)
    		tmp = sqrt((2.0 * (t_2 * (C + (A + hypot(B, (A - C))))))) * t_1;
    	elseif (B <= -1.7e-27)
    		tmp = t_3;
    	elseif (B <= -5.8e-156)
    		tmp = sqrt((2.0 * (t_2 * (2.0 * C)))) * t_1;
    	elseif (B <= 8.5e-17)
    		tmp = t_3;
    	else
    		tmp = sqrt((F * (C + hypot(B, C)))) * (-sqrt(2.0) / B);
    	end
    	tmp_2 = tmp;
    end
    
    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]}, Block[{t$95$1 = N[(-1.0 / t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[(F * t$95$0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[Sqrt[N[(C + N[(C + N[(-0.5 * N[(N[(B * B), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-N[Sqrt[N[(2.0 * t$95$2), $MachinePrecision]], $MachinePrecision])), $MachinePrecision] / t$95$0), $MachinePrecision]}, If[LessEqual[B, -3.9e+34], N[(N[Sqrt[N[(2.0 * N[(t$95$2 * N[(C + N[(A + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[B, -1.7e-27], t$95$3, If[LessEqual[B, -5.8e-156], N[(N[Sqrt[N[(2.0 * N[(t$95$2 * N[(2.0 * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[B, 8.5e-17], t$95$3, N[(N[Sqrt[N[(F * N[(C + N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[((-N[Sqrt[2.0], $MachinePrecision]) / B), $MachinePrecision]), $MachinePrecision]]]]]]]]]
    
    \begin{array}{l}
    [A, C] = \mathsf{sort}([A, C])\\
    \\
    \begin{array}{l}
    t_0 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\
    t_1 := \frac{-1}{t_0}\\
    t_2 := F \cdot t_0\\
    t_3 := \frac{\sqrt{C + \left(C + -0.5 \cdot \frac{B \cdot B}{A}\right)} \cdot \left(-\sqrt{2 \cdot t_2}\right)}{t_0}\\
    \mathbf{if}\;B \leq -3.9 \cdot 10^{+34}:\\
    \;\;\;\;\sqrt{2 \cdot \left(t_2 \cdot \left(C + \left(A + \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)} \cdot t_1\\
    
    \mathbf{elif}\;B \leq -1.7 \cdot 10^{-27}:\\
    \;\;\;\;t_3\\
    
    \mathbf{elif}\;B \leq -5.8 \cdot 10^{-156}:\\
    \;\;\;\;\sqrt{2 \cdot \left(t_2 \cdot \left(2 \cdot C\right)\right)} \cdot t_1\\
    
    \mathbf{elif}\;B \leq 8.5 \cdot 10^{-17}:\\
    \;\;\;\;t_3\\
    
    \mathbf{else}:\\
    \;\;\;\;\sqrt{F \cdot \left(C + \mathsf{hypot}\left(B, C\right)\right)} \cdot \frac{-\sqrt{2}}{B}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 4 regimes
    2. if B < -3.90000000000000019e34

      1. Initial program 26.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. associate-*l*26.1%

          \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}\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. unpow226.1%

          \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(\color{blue}{B \cdot B} - 4 \cdot \left(A \cdot C\right)\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} \]
        3. +-commutative26.1%

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

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

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

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

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

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

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

      if -3.90000000000000019e34 < B < -1.69999999999999985e-27 or -5.80000000000000041e-156 < B < 8.5e-17

      1. Initial program 17.7%

        \[\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. associate-*l*17.7%

          \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}\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. unpow217.7%

          \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(\color{blue}{B \cdot B} - 4 \cdot \left(A \cdot C\right)\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} \]
        3. +-commutative17.7%

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{-\sqrt{2 \cdot \left(F \cdot \left(B \cdot B - 4 \cdot \left(C \cdot A\right)\right)\right)} \cdot \sqrt{A + \left(C + \color{blue}{\mathsf{hypot}\left(B, A - C\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
        7. associate-+r+32.5%

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

          \[\leadsto \frac{-\sqrt{2 \cdot \left(F \cdot \left(B \cdot B - 4 \cdot \left(C \cdot A\right)\right)\right)} \cdot \sqrt{\color{blue}{\left(C + A\right)} + \mathsf{hypot}\left(B, A - C\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
        9. associate-+r+33.3%

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

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

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

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

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

      if -1.69999999999999985e-27 < B < -5.80000000000000041e-156

      1. Initial program 20.2%

        \[\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. associate-*l*20.2%

          \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}\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. unpow220.2%

          \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(\color{blue}{B \cdot B} - 4 \cdot \left(A \cdot C\right)\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} \]
        3. +-commutative20.2%

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

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

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

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

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

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

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

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

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

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

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

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

      if 8.5e-17 < B

      1. Initial program 22.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. Simplified23.9%

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

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

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

            \[\leadsto -\color{blue}{\sqrt{\left(C + \sqrt{{B}^{2} + {C}^{2}}\right) \cdot F} \cdot \frac{\sqrt{2}}{B}} \]
          3. distribute-rgt-neg-in31.8%

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

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

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -3.9 \cdot 10^{+34}:\\ \;\;\;\;\sqrt{2 \cdot \left(\left(F \cdot \left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right)\right) \cdot \left(C + \left(A + \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)} \cdot \frac{-1}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \mathbf{elif}\;B \leq -1.7 \cdot 10^{-27}:\\ \;\;\;\;\frac{\sqrt{C + \left(C + -0.5 \cdot \frac{B \cdot B}{A}\right)} \cdot \left(-\sqrt{2 \cdot \left(F \cdot \left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right)\right)}\right)}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \mathbf{elif}\;B \leq -5.8 \cdot 10^{-156}:\\ \;\;\;\;\sqrt{2 \cdot \left(\left(F \cdot \left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right)\right) \cdot \left(2 \cdot C\right)\right)} \cdot \frac{-1}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \mathbf{elif}\;B \leq 8.5 \cdot 10^{-17}:\\ \;\;\;\;\frac{\sqrt{C + \left(C + -0.5 \cdot \frac{B \cdot B}{A}\right)} \cdot \left(-\sqrt{2 \cdot \left(F \cdot \left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right)\right)}\right)}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{F \cdot \left(C + \mathsf{hypot}\left(B, C\right)\right)} \cdot \frac{-\sqrt{2}}{B}\\ \end{array} \]

      Alternative 3: 36.4% accurate, 2.0× speedup?

      \[\begin{array}{l} [A, C] = \mathsf{sort}([A, C])\\ \\ \begin{array}{l} t_0 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\ t_1 := \frac{-1}{t_0}\\ t_2 := F \cdot t_0\\ t_3 := 2 \cdot t_2\\ \mathbf{if}\;B \leq -4.2 \cdot 10^{+34}:\\ \;\;\;\;\sqrt{2 \cdot \left(t_2 \cdot \left(C + \left(A + \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)} \cdot t_1\\ \mathbf{elif}\;B \leq -2.4 \cdot 10^{-22}:\\ \;\;\;\;\frac{\sqrt{C + \left(C + -0.5 \cdot \frac{B \cdot B}{A}\right)} \cdot \left(-\sqrt{t_3}\right)}{t_0}\\ \mathbf{elif}\;B \leq -7.5 \cdot 10^{-77}:\\ \;\;\;\;-\frac{\sqrt{\left(C + \mathsf{hypot}\left(B, C\right)\right) \cdot t_3}}{t_0}\\ \mathbf{elif}\;B \leq 9.5 \cdot 10^{+17}:\\ \;\;\;\;\sqrt{2 \cdot \left(t_2 \cdot \left(2 \cdot C\right)\right)} \cdot t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(A + \mathsf{hypot}\left(B, A\right)\right)}\right)\\ \end{array} \end{array} \]
      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))))
              (t_1 (/ -1.0 t_0))
              (t_2 (* F t_0))
              (t_3 (* 2.0 t_2)))
         (if (<= B -4.2e+34)
           (* (sqrt (* 2.0 (* t_2 (+ C (+ A (hypot B (- A C))))))) t_1)
           (if (<= B -2.4e-22)
             (/ (* (sqrt (+ C (+ C (* -0.5 (/ (* B B) A))))) (- (sqrt t_3))) t_0)
             (if (<= B -7.5e-77)
               (- (/ (sqrt (* (+ C (hypot B C)) t_3)) t_0))
               (if (<= B 9.5e+17)
                 (* (sqrt (* 2.0 (* t_2 (* 2.0 C)))) t_1)
                 (* (/ (sqrt 2.0) B) (- (sqrt (* F (+ A (hypot B A))))))))))))
      assert(A < C);
      double code(double A, double B, double C, double F) {
      	double t_0 = (B * B) - (4.0 * (A * C));
      	double t_1 = -1.0 / t_0;
      	double t_2 = F * t_0;
      	double t_3 = 2.0 * t_2;
      	double tmp;
      	if (B <= -4.2e+34) {
      		tmp = sqrt((2.0 * (t_2 * (C + (A + hypot(B, (A - C))))))) * t_1;
      	} else if (B <= -2.4e-22) {
      		tmp = (sqrt((C + (C + (-0.5 * ((B * B) / A))))) * -sqrt(t_3)) / t_0;
      	} else if (B <= -7.5e-77) {
      		tmp = -(sqrt(((C + hypot(B, C)) * t_3)) / t_0);
      	} else if (B <= 9.5e+17) {
      		tmp = sqrt((2.0 * (t_2 * (2.0 * C)))) * t_1;
      	} else {
      		tmp = (sqrt(2.0) / B) * -sqrt((F * (A + hypot(B, A))));
      	}
      	return tmp;
      }
      
      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 t_1 = -1.0 / t_0;
      	double t_2 = F * t_0;
      	double t_3 = 2.0 * t_2;
      	double tmp;
      	if (B <= -4.2e+34) {
      		tmp = Math.sqrt((2.0 * (t_2 * (C + (A + Math.hypot(B, (A - C))))))) * t_1;
      	} else if (B <= -2.4e-22) {
      		tmp = (Math.sqrt((C + (C + (-0.5 * ((B * B) / A))))) * -Math.sqrt(t_3)) / t_0;
      	} else if (B <= -7.5e-77) {
      		tmp = -(Math.sqrt(((C + Math.hypot(B, C)) * t_3)) / t_0);
      	} else if (B <= 9.5e+17) {
      		tmp = Math.sqrt((2.0 * (t_2 * (2.0 * C)))) * t_1;
      	} else {
      		tmp = (Math.sqrt(2.0) / B) * -Math.sqrt((F * (A + Math.hypot(B, A))));
      	}
      	return tmp;
      }
      
      [A, C] = sort([A, C])
      def code(A, B, C, F):
      	t_0 = (B * B) - (4.0 * (A * C))
      	t_1 = -1.0 / t_0
      	t_2 = F * t_0
      	t_3 = 2.0 * t_2
      	tmp = 0
      	if B <= -4.2e+34:
      		tmp = math.sqrt((2.0 * (t_2 * (C + (A + math.hypot(B, (A - C))))))) * t_1
      	elif B <= -2.4e-22:
      		tmp = (math.sqrt((C + (C + (-0.5 * ((B * B) / A))))) * -math.sqrt(t_3)) / t_0
      	elif B <= -7.5e-77:
      		tmp = -(math.sqrt(((C + math.hypot(B, C)) * t_3)) / t_0)
      	elif B <= 9.5e+17:
      		tmp = math.sqrt((2.0 * (t_2 * (2.0 * C)))) * t_1
      	else:
      		tmp = (math.sqrt(2.0) / B) * -math.sqrt((F * (A + math.hypot(B, A))))
      	return tmp
      
      A, C = sort([A, C])
      function code(A, B, C, F)
      	t_0 = Float64(Float64(B * B) - Float64(4.0 * Float64(A * C)))
      	t_1 = Float64(-1.0 / t_0)
      	t_2 = Float64(F * t_0)
      	t_3 = Float64(2.0 * t_2)
      	tmp = 0.0
      	if (B <= -4.2e+34)
      		tmp = Float64(sqrt(Float64(2.0 * Float64(t_2 * Float64(C + Float64(A + hypot(B, Float64(A - C))))))) * t_1);
      	elseif (B <= -2.4e-22)
      		tmp = Float64(Float64(sqrt(Float64(C + Float64(C + Float64(-0.5 * Float64(Float64(B * B) / A))))) * Float64(-sqrt(t_3))) / t_0);
      	elseif (B <= -7.5e-77)
      		tmp = Float64(-Float64(sqrt(Float64(Float64(C + hypot(B, C)) * t_3)) / t_0));
      	elseif (B <= 9.5e+17)
      		tmp = Float64(sqrt(Float64(2.0 * Float64(t_2 * Float64(2.0 * C)))) * t_1);
      	else
      		tmp = Float64(Float64(sqrt(2.0) / B) * Float64(-sqrt(Float64(F * Float64(A + hypot(B, A))))));
      	end
      	return tmp
      end
      
      A, C = num2cell(sort([A, C])){:}
      function tmp_2 = code(A, B, C, F)
      	t_0 = (B * B) - (4.0 * (A * C));
      	t_1 = -1.0 / t_0;
      	t_2 = F * t_0;
      	t_3 = 2.0 * t_2;
      	tmp = 0.0;
      	if (B <= -4.2e+34)
      		tmp = sqrt((2.0 * (t_2 * (C + (A + hypot(B, (A - C))))))) * t_1;
      	elseif (B <= -2.4e-22)
      		tmp = (sqrt((C + (C + (-0.5 * ((B * B) / A))))) * -sqrt(t_3)) / t_0;
      	elseif (B <= -7.5e-77)
      		tmp = -(sqrt(((C + hypot(B, C)) * t_3)) / t_0);
      	elseif (B <= 9.5e+17)
      		tmp = sqrt((2.0 * (t_2 * (2.0 * C)))) * t_1;
      	else
      		tmp = (sqrt(2.0) / B) * -sqrt((F * (A + hypot(B, A))));
      	end
      	tmp_2 = tmp;
      end
      
      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]}, Block[{t$95$1 = N[(-1.0 / t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[(F * t$95$0), $MachinePrecision]}, Block[{t$95$3 = N[(2.0 * t$95$2), $MachinePrecision]}, If[LessEqual[B, -4.2e+34], N[(N[Sqrt[N[(2.0 * N[(t$95$2 * N[(C + N[(A + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[B, -2.4e-22], N[(N[(N[Sqrt[N[(C + N[(C + N[(-0.5 * N[(N[(B * B), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-N[Sqrt[t$95$3], $MachinePrecision])), $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[B, -7.5e-77], (-N[(N[Sqrt[N[(N[(C + N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] * t$95$3), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision]), If[LessEqual[B, 9.5e+17], N[(N[Sqrt[N[(2.0 * N[(t$95$2 * N[(2.0 * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B), $MachinePrecision] * (-N[Sqrt[N[(F * N[(A + N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]]]]]]]]]
      
      \begin{array}{l}
      [A, C] = \mathsf{sort}([A, C])\\
      \\
      \begin{array}{l}
      t_0 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\
      t_1 := \frac{-1}{t_0}\\
      t_2 := F \cdot t_0\\
      t_3 := 2 \cdot t_2\\
      \mathbf{if}\;B \leq -4.2 \cdot 10^{+34}:\\
      \;\;\;\;\sqrt{2 \cdot \left(t_2 \cdot \left(C + \left(A + \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)} \cdot t_1\\
      
      \mathbf{elif}\;B \leq -2.4 \cdot 10^{-22}:\\
      \;\;\;\;\frac{\sqrt{C + \left(C + -0.5 \cdot \frac{B \cdot B}{A}\right)} \cdot \left(-\sqrt{t_3}\right)}{t_0}\\
      
      \mathbf{elif}\;B \leq -7.5 \cdot 10^{-77}:\\
      \;\;\;\;-\frac{\sqrt{\left(C + \mathsf{hypot}\left(B, C\right)\right) \cdot t_3}}{t_0}\\
      
      \mathbf{elif}\;B \leq 9.5 \cdot 10^{+17}:\\
      \;\;\;\;\sqrt{2 \cdot \left(t_2 \cdot \left(2 \cdot C\right)\right)} \cdot t_1\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(A + \mathsf{hypot}\left(B, A\right)\right)}\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 5 regimes
      2. if B < -4.20000000000000035e34

        1. Initial program 26.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. associate-*l*26.1%

            \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}\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. unpow226.1%

            \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(\color{blue}{B \cdot B} - 4 \cdot \left(A \cdot C\right)\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} \]
          3. +-commutative26.1%

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

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

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

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

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

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

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

        if -4.20000000000000035e34 < B < -2.40000000000000002e-22

        1. Initial program 11.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. associate-*l*11.9%

            \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}\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. unpow211.9%

            \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(\color{blue}{B \cdot B} - 4 \cdot \left(A \cdot C\right)\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} \]
          3. +-commutative11.9%

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{-\sqrt{2 \cdot \left(F \cdot \left(B \cdot B - 4 \cdot \left(C \cdot A\right)\right)\right)} \cdot \sqrt{A + \left(C + \color{blue}{\mathsf{hypot}\left(B, A - C\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
          7. associate-+r+47.2%

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

            \[\leadsto \frac{-\sqrt{2 \cdot \left(F \cdot \left(B \cdot B - 4 \cdot \left(C \cdot A\right)\right)\right)} \cdot \sqrt{\color{blue}{\left(C + A\right)} + \mathsf{hypot}\left(B, A - C\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
          9. associate-+r+46.4%

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

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

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

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

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

        if -2.40000000000000002e-22 < B < -7.5000000000000006e-77

        1. Initial program 28.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. associate-*l*28.5%

            \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}\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. unpow228.5%

            \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(\color{blue}{B \cdot B} - 4 \cdot \left(A \cdot C\right)\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} \]
          3. +-commutative28.5%

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

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

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

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

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

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

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

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

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

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

        if -7.5000000000000006e-77 < B < 9.5e17

        1. Initial program 18.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. associate-*l*18.4%

            \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}\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. unpow218.4%

            \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(\color{blue}{B \cdot B} - 4 \cdot \left(A \cdot C\right)\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} \]
          3. +-commutative18.4%

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

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

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

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

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

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

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

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

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

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

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

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

        if 9.5e17 < B

        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. Simplified22.5%

            \[\leadsto \color{blue}{\frac{-\sqrt{2 \cdot \left(\left(\mathsf{fma}\left(C, A \cdot -4, B \cdot B\right) \cdot F\right) \cdot \left(C + \left(A + \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)}}{\mathsf{fma}\left(C, A \cdot -4, B \cdot B\right)}} \]
          2. Taylor expanded in C around 0 31.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-neg31.2%

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

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

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

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

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

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

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -4.2 \cdot 10^{+34}:\\ \;\;\;\;\sqrt{2 \cdot \left(\left(F \cdot \left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right)\right) \cdot \left(C + \left(A + \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)} \cdot \frac{-1}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \mathbf{elif}\;B \leq -2.4 \cdot 10^{-22}:\\ \;\;\;\;\frac{\sqrt{C + \left(C + -0.5 \cdot \frac{B \cdot B}{A}\right)} \cdot \left(-\sqrt{2 \cdot \left(F \cdot \left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right)\right)}\right)}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \mathbf{elif}\;B \leq -7.5 \cdot 10^{-77}:\\ \;\;\;\;-\frac{\sqrt{\left(C + \mathsf{hypot}\left(B, C\right)\right) \cdot \left(2 \cdot \left(F \cdot \left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \mathbf{elif}\;B \leq 9.5 \cdot 10^{+17}:\\ \;\;\;\;\sqrt{2 \cdot \left(\left(F \cdot \left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right)\right) \cdot \left(2 \cdot C\right)\right)} \cdot \frac{-1}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(A + \mathsf{hypot}\left(B, A\right)\right)}\right)\\ \end{array} \]

        Alternative 4: 36.1% accurate, 2.6× speedup?

        \[\begin{array}{l} [A, C] = \mathsf{sort}([A, C])\\ \\ \begin{array}{l} t_0 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\ t_1 := \frac{-1}{t_0}\\ t_2 := F \cdot t_0\\ t_3 := 2 \cdot t_2\\ \mathbf{if}\;B \leq -6.6 \cdot 10^{+34}:\\ \;\;\;\;\sqrt{2 \cdot \left(t_2 \cdot \left(C + \left(A + \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)} \cdot t_1\\ \mathbf{elif}\;B \leq -5.8 \cdot 10^{-22}:\\ \;\;\;\;\frac{\sqrt{C + \left(C + -0.5 \cdot \frac{B \cdot B}{A}\right)} \cdot \left(-\sqrt{t_3}\right)}{t_0}\\ \mathbf{elif}\;B \leq -6.8 \cdot 10^{-77}:\\ \;\;\;\;-\frac{\sqrt{\left(C + \mathsf{hypot}\left(B, C\right)\right) \cdot t_3}}{t_0}\\ \mathbf{elif}\;B \leq 2.3 \cdot 10^{+18}:\\ \;\;\;\;\sqrt{2 \cdot \left(t_2 \cdot \left(2 \cdot C\right)\right)} \cdot t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(B + A\right)}\right)\\ \end{array} \end{array} \]
        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))))
                (t_1 (/ -1.0 t_0))
                (t_2 (* F t_0))
                (t_3 (* 2.0 t_2)))
           (if (<= B -6.6e+34)
             (* (sqrt (* 2.0 (* t_2 (+ C (+ A (hypot B (- A C))))))) t_1)
             (if (<= B -5.8e-22)
               (/ (* (sqrt (+ C (+ C (* -0.5 (/ (* B B) A))))) (- (sqrt t_3))) t_0)
               (if (<= B -6.8e-77)
                 (- (/ (sqrt (* (+ C (hypot B C)) t_3)) t_0))
                 (if (<= B 2.3e+18)
                   (* (sqrt (* 2.0 (* t_2 (* 2.0 C)))) t_1)
                   (* (/ (sqrt 2.0) B) (- (sqrt (* F (+ B A)))))))))))
        assert(A < C);
        double code(double A, double B, double C, double F) {
        	double t_0 = (B * B) - (4.0 * (A * C));
        	double t_1 = -1.0 / t_0;
        	double t_2 = F * t_0;
        	double t_3 = 2.0 * t_2;
        	double tmp;
        	if (B <= -6.6e+34) {
        		tmp = sqrt((2.0 * (t_2 * (C + (A + hypot(B, (A - C))))))) * t_1;
        	} else if (B <= -5.8e-22) {
        		tmp = (sqrt((C + (C + (-0.5 * ((B * B) / A))))) * -sqrt(t_3)) / t_0;
        	} else if (B <= -6.8e-77) {
        		tmp = -(sqrt(((C + hypot(B, C)) * t_3)) / t_0);
        	} else if (B <= 2.3e+18) {
        		tmp = sqrt((2.0 * (t_2 * (2.0 * C)))) * t_1;
        	} else {
        		tmp = (sqrt(2.0) / B) * -sqrt((F * (B + A)));
        	}
        	return tmp;
        }
        
        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 t_1 = -1.0 / t_0;
        	double t_2 = F * t_0;
        	double t_3 = 2.0 * t_2;
        	double tmp;
        	if (B <= -6.6e+34) {
        		tmp = Math.sqrt((2.0 * (t_2 * (C + (A + Math.hypot(B, (A - C))))))) * t_1;
        	} else if (B <= -5.8e-22) {
        		tmp = (Math.sqrt((C + (C + (-0.5 * ((B * B) / A))))) * -Math.sqrt(t_3)) / t_0;
        	} else if (B <= -6.8e-77) {
        		tmp = -(Math.sqrt(((C + Math.hypot(B, C)) * t_3)) / t_0);
        	} else if (B <= 2.3e+18) {
        		tmp = Math.sqrt((2.0 * (t_2 * (2.0 * C)))) * t_1;
        	} else {
        		tmp = (Math.sqrt(2.0) / B) * -Math.sqrt((F * (B + A)));
        	}
        	return tmp;
        }
        
        [A, C] = sort([A, C])
        def code(A, B, C, F):
        	t_0 = (B * B) - (4.0 * (A * C))
        	t_1 = -1.0 / t_0
        	t_2 = F * t_0
        	t_3 = 2.0 * t_2
        	tmp = 0
        	if B <= -6.6e+34:
        		tmp = math.sqrt((2.0 * (t_2 * (C + (A + math.hypot(B, (A - C))))))) * t_1
        	elif B <= -5.8e-22:
        		tmp = (math.sqrt((C + (C + (-0.5 * ((B * B) / A))))) * -math.sqrt(t_3)) / t_0
        	elif B <= -6.8e-77:
        		tmp = -(math.sqrt(((C + math.hypot(B, C)) * t_3)) / t_0)
        	elif B <= 2.3e+18:
        		tmp = math.sqrt((2.0 * (t_2 * (2.0 * C)))) * t_1
        	else:
        		tmp = (math.sqrt(2.0) / B) * -math.sqrt((F * (B + A)))
        	return tmp
        
        A, C = sort([A, C])
        function code(A, B, C, F)
        	t_0 = Float64(Float64(B * B) - Float64(4.0 * Float64(A * C)))
        	t_1 = Float64(-1.0 / t_0)
        	t_2 = Float64(F * t_0)
        	t_3 = Float64(2.0 * t_2)
        	tmp = 0.0
        	if (B <= -6.6e+34)
        		tmp = Float64(sqrt(Float64(2.0 * Float64(t_2 * Float64(C + Float64(A + hypot(B, Float64(A - C))))))) * t_1);
        	elseif (B <= -5.8e-22)
        		tmp = Float64(Float64(sqrt(Float64(C + Float64(C + Float64(-0.5 * Float64(Float64(B * B) / A))))) * Float64(-sqrt(t_3))) / t_0);
        	elseif (B <= -6.8e-77)
        		tmp = Float64(-Float64(sqrt(Float64(Float64(C + hypot(B, C)) * t_3)) / t_0));
        	elseif (B <= 2.3e+18)
        		tmp = Float64(sqrt(Float64(2.0 * Float64(t_2 * Float64(2.0 * C)))) * t_1);
        	else
        		tmp = Float64(Float64(sqrt(2.0) / B) * Float64(-sqrt(Float64(F * Float64(B + A)))));
        	end
        	return tmp
        end
        
        A, C = num2cell(sort([A, C])){:}
        function tmp_2 = code(A, B, C, F)
        	t_0 = (B * B) - (4.0 * (A * C));
        	t_1 = -1.0 / t_0;
        	t_2 = F * t_0;
        	t_3 = 2.0 * t_2;
        	tmp = 0.0;
        	if (B <= -6.6e+34)
        		tmp = sqrt((2.0 * (t_2 * (C + (A + hypot(B, (A - C))))))) * t_1;
        	elseif (B <= -5.8e-22)
        		tmp = (sqrt((C + (C + (-0.5 * ((B * B) / A))))) * -sqrt(t_3)) / t_0;
        	elseif (B <= -6.8e-77)
        		tmp = -(sqrt(((C + hypot(B, C)) * t_3)) / t_0);
        	elseif (B <= 2.3e+18)
        		tmp = sqrt((2.0 * (t_2 * (2.0 * C)))) * t_1;
        	else
        		tmp = (sqrt(2.0) / B) * -sqrt((F * (B + A)));
        	end
        	tmp_2 = tmp;
        end
        
        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]}, Block[{t$95$1 = N[(-1.0 / t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[(F * t$95$0), $MachinePrecision]}, Block[{t$95$3 = N[(2.0 * t$95$2), $MachinePrecision]}, If[LessEqual[B, -6.6e+34], N[(N[Sqrt[N[(2.0 * N[(t$95$2 * N[(C + N[(A + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[B, -5.8e-22], N[(N[(N[Sqrt[N[(C + N[(C + N[(-0.5 * N[(N[(B * B), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-N[Sqrt[t$95$3], $MachinePrecision])), $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[B, -6.8e-77], (-N[(N[Sqrt[N[(N[(C + N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] * t$95$3), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision]), If[LessEqual[B, 2.3e+18], N[(N[Sqrt[N[(2.0 * N[(t$95$2 * N[(2.0 * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B), $MachinePrecision] * (-N[Sqrt[N[(F * N[(B + A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]]]]]]]]]
        
        \begin{array}{l}
        [A, C] = \mathsf{sort}([A, C])\\
        \\
        \begin{array}{l}
        t_0 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\
        t_1 := \frac{-1}{t_0}\\
        t_2 := F \cdot t_0\\
        t_3 := 2 \cdot t_2\\
        \mathbf{if}\;B \leq -6.6 \cdot 10^{+34}:\\
        \;\;\;\;\sqrt{2 \cdot \left(t_2 \cdot \left(C + \left(A + \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)} \cdot t_1\\
        
        \mathbf{elif}\;B \leq -5.8 \cdot 10^{-22}:\\
        \;\;\;\;\frac{\sqrt{C + \left(C + -0.5 \cdot \frac{B \cdot B}{A}\right)} \cdot \left(-\sqrt{t_3}\right)}{t_0}\\
        
        \mathbf{elif}\;B \leq -6.8 \cdot 10^{-77}:\\
        \;\;\;\;-\frac{\sqrt{\left(C + \mathsf{hypot}\left(B, C\right)\right) \cdot t_3}}{t_0}\\
        
        \mathbf{elif}\;B \leq 2.3 \cdot 10^{+18}:\\
        \;\;\;\;\sqrt{2 \cdot \left(t_2 \cdot \left(2 \cdot C\right)\right)} \cdot t_1\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(B + A\right)}\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 5 regimes
        2. if B < -6.59999999999999976e34

          1. Initial program 26.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. associate-*l*26.1%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}\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. unpow226.1%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(\color{blue}{B \cdot B} - 4 \cdot \left(A \cdot C\right)\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} \]
            3. +-commutative26.1%

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

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

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

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

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

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

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

          if -6.59999999999999976e34 < B < -5.8000000000000003e-22

          1. Initial program 11.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. associate-*l*11.9%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}\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. unpow211.9%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(\color{blue}{B \cdot B} - 4 \cdot \left(A \cdot C\right)\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} \]
            3. +-commutative11.9%

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{-\sqrt{2 \cdot \left(F \cdot \left(B \cdot B - 4 \cdot \left(C \cdot A\right)\right)\right)} \cdot \sqrt{A + \left(C + \color{blue}{\mathsf{hypot}\left(B, A - C\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
            7. associate-+r+47.2%

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

              \[\leadsto \frac{-\sqrt{2 \cdot \left(F \cdot \left(B \cdot B - 4 \cdot \left(C \cdot A\right)\right)\right)} \cdot \sqrt{\color{blue}{\left(C + A\right)} + \mathsf{hypot}\left(B, A - C\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
            9. associate-+r+46.4%

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

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

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

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

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

          if -5.8000000000000003e-22 < B < -6.79999999999999966e-77

          1. Initial program 28.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. associate-*l*28.5%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}\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. unpow228.5%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(\color{blue}{B \cdot B} - 4 \cdot \left(A \cdot C\right)\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} \]
            3. +-commutative28.5%

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

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

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

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

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

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

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

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

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

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

          if -6.79999999999999966e-77 < B < 2.3e18

          1. Initial program 18.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. associate-*l*18.4%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}\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. unpow218.4%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(\color{blue}{B \cdot B} - 4 \cdot \left(A \cdot C\right)\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} \]
            3. +-commutative18.4%

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

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

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

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

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

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

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

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

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

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

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

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

          if 2.3e18 < B

          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. associate-*l*21.0%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}\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. unpow221.0%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(\color{blue}{B \cdot B} - 4 \cdot \left(A \cdot C\right)\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} \]
            3. +-commutative21.0%

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -6.6 \cdot 10^{+34}:\\ \;\;\;\;\sqrt{2 \cdot \left(\left(F \cdot \left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right)\right) \cdot \left(C + \left(A + \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)} \cdot \frac{-1}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \mathbf{elif}\;B \leq -5.8 \cdot 10^{-22}:\\ \;\;\;\;\frac{\sqrt{C + \left(C + -0.5 \cdot \frac{B \cdot B}{A}\right)} \cdot \left(-\sqrt{2 \cdot \left(F \cdot \left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right)\right)}\right)}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \mathbf{elif}\;B \leq -6.8 \cdot 10^{-77}:\\ \;\;\;\;-\frac{\sqrt{\left(C + \mathsf{hypot}\left(B, C\right)\right) \cdot \left(2 \cdot \left(F \cdot \left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \mathbf{elif}\;B \leq 2.3 \cdot 10^{+18}:\\ \;\;\;\;\sqrt{2 \cdot \left(\left(F \cdot \left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right)\right) \cdot \left(2 \cdot C\right)\right)} \cdot \frac{-1}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(B + A\right)}\right)\\ \end{array} \]

        Alternative 5: 35.5% accurate, 2.7× speedup?

        \[\begin{array}{l} [A, C] = \mathsf{sort}([A, C])\\ \\ \begin{array}{l} t_0 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\ t_1 := F \cdot t_0\\ t_2 := \frac{-\sqrt{2 \cdot \left(\left(C + \mathsf{hypot}\left(C, B\right)\right) \cdot \left(F \cdot \left(B \cdot B\right)\right)\right)}}{t_0}\\ t_3 := \frac{\sqrt{2 \cdot t_1} \cdot \left(-\sqrt{C + C}\right)}{t_0}\\ \mathbf{if}\;B \leq -2.8 \cdot 10^{+28}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;B \leq -2.5 \cdot 10^{-17}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;B \leq -6.2 \cdot 10^{-28}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;B \leq -7.5 \cdot 10^{-157}:\\ \;\;\;\;\sqrt{2 \cdot \left(t_1 \cdot \left(2 \cdot C\right)\right)} \cdot \frac{-1}{t_0}\\ \mathbf{elif}\;B \leq 1.65 \cdot 10^{-21}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(B + A\right)}\right)\\ \end{array} \end{array} \]
        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))))
                (t_1 (* F t_0))
                (t_2 (/ (- (sqrt (* 2.0 (* (+ C (hypot C B)) (* F (* B B)))))) t_0))
                (t_3 (/ (* (sqrt (* 2.0 t_1)) (- (sqrt (+ C C)))) t_0)))
           (if (<= B -2.8e+28)
             t_2
             (if (<= B -2.5e-17)
               t_3
               (if (<= B -6.2e-28)
                 t_2
                 (if (<= B -7.5e-157)
                   (* (sqrt (* 2.0 (* t_1 (* 2.0 C)))) (/ -1.0 t_0))
                   (if (<= B 1.65e-21)
                     t_3
                     (* (/ (sqrt 2.0) B) (- (sqrt (* F (+ B A))))))))))))
        assert(A < C);
        double code(double A, double B, double C, double F) {
        	double t_0 = (B * B) - (4.0 * (A * C));
        	double t_1 = F * t_0;
        	double t_2 = -sqrt((2.0 * ((C + hypot(C, B)) * (F * (B * B))))) / t_0;
        	double t_3 = (sqrt((2.0 * t_1)) * -sqrt((C + C))) / t_0;
        	double tmp;
        	if (B <= -2.8e+28) {
        		tmp = t_2;
        	} else if (B <= -2.5e-17) {
        		tmp = t_3;
        	} else if (B <= -6.2e-28) {
        		tmp = t_2;
        	} else if (B <= -7.5e-157) {
        		tmp = sqrt((2.0 * (t_1 * (2.0 * C)))) * (-1.0 / t_0);
        	} else if (B <= 1.65e-21) {
        		tmp = t_3;
        	} else {
        		tmp = (sqrt(2.0) / B) * -sqrt((F * (B + A)));
        	}
        	return tmp;
        }
        
        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 t_1 = F * t_0;
        	double t_2 = -Math.sqrt((2.0 * ((C + Math.hypot(C, B)) * (F * (B * B))))) / t_0;
        	double t_3 = (Math.sqrt((2.0 * t_1)) * -Math.sqrt((C + C))) / t_0;
        	double tmp;
        	if (B <= -2.8e+28) {
        		tmp = t_2;
        	} else if (B <= -2.5e-17) {
        		tmp = t_3;
        	} else if (B <= -6.2e-28) {
        		tmp = t_2;
        	} else if (B <= -7.5e-157) {
        		tmp = Math.sqrt((2.0 * (t_1 * (2.0 * C)))) * (-1.0 / t_0);
        	} else if (B <= 1.65e-21) {
        		tmp = t_3;
        	} else {
        		tmp = (Math.sqrt(2.0) / B) * -Math.sqrt((F * (B + A)));
        	}
        	return tmp;
        }
        
        [A, C] = sort([A, C])
        def code(A, B, C, F):
        	t_0 = (B * B) - (4.0 * (A * C))
        	t_1 = F * t_0
        	t_2 = -math.sqrt((2.0 * ((C + math.hypot(C, B)) * (F * (B * B))))) / t_0
        	t_3 = (math.sqrt((2.0 * t_1)) * -math.sqrt((C + C))) / t_0
        	tmp = 0
        	if B <= -2.8e+28:
        		tmp = t_2
        	elif B <= -2.5e-17:
        		tmp = t_3
        	elif B <= -6.2e-28:
        		tmp = t_2
        	elif B <= -7.5e-157:
        		tmp = math.sqrt((2.0 * (t_1 * (2.0 * C)))) * (-1.0 / t_0)
        	elif B <= 1.65e-21:
        		tmp = t_3
        	else:
        		tmp = (math.sqrt(2.0) / B) * -math.sqrt((F * (B + A)))
        	return tmp
        
        A, C = sort([A, C])
        function code(A, B, C, F)
        	t_0 = Float64(Float64(B * B) - Float64(4.0 * Float64(A * C)))
        	t_1 = Float64(F * t_0)
        	t_2 = Float64(Float64(-sqrt(Float64(2.0 * Float64(Float64(C + hypot(C, B)) * Float64(F * Float64(B * B)))))) / t_0)
        	t_3 = Float64(Float64(sqrt(Float64(2.0 * t_1)) * Float64(-sqrt(Float64(C + C)))) / t_0)
        	tmp = 0.0
        	if (B <= -2.8e+28)
        		tmp = t_2;
        	elseif (B <= -2.5e-17)
        		tmp = t_3;
        	elseif (B <= -6.2e-28)
        		tmp = t_2;
        	elseif (B <= -7.5e-157)
        		tmp = Float64(sqrt(Float64(2.0 * Float64(t_1 * Float64(2.0 * C)))) * Float64(-1.0 / t_0));
        	elseif (B <= 1.65e-21)
        		tmp = t_3;
        	else
        		tmp = Float64(Float64(sqrt(2.0) / B) * Float64(-sqrt(Float64(F * Float64(B + A)))));
        	end
        	return tmp
        end
        
        A, C = num2cell(sort([A, C])){:}
        function tmp_2 = code(A, B, C, F)
        	t_0 = (B * B) - (4.0 * (A * C));
        	t_1 = F * t_0;
        	t_2 = -sqrt((2.0 * ((C + hypot(C, B)) * (F * (B * B))))) / t_0;
        	t_3 = (sqrt((2.0 * t_1)) * -sqrt((C + C))) / t_0;
        	tmp = 0.0;
        	if (B <= -2.8e+28)
        		tmp = t_2;
        	elseif (B <= -2.5e-17)
        		tmp = t_3;
        	elseif (B <= -6.2e-28)
        		tmp = t_2;
        	elseif (B <= -7.5e-157)
        		tmp = sqrt((2.0 * (t_1 * (2.0 * C)))) * (-1.0 / t_0);
        	elseif (B <= 1.65e-21)
        		tmp = t_3;
        	else
        		tmp = (sqrt(2.0) / B) * -sqrt((F * (B + A)));
        	end
        	tmp_2 = tmp;
        end
        
        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]}, Block[{t$95$1 = N[(F * t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[((-N[Sqrt[N[(2.0 * N[(N[(C + N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] * N[(F * N[(B * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[Sqrt[N[(2.0 * t$95$1), $MachinePrecision]], $MachinePrecision] * (-N[Sqrt[N[(C + C), $MachinePrecision]], $MachinePrecision])), $MachinePrecision] / t$95$0), $MachinePrecision]}, If[LessEqual[B, -2.8e+28], t$95$2, If[LessEqual[B, -2.5e-17], t$95$3, If[LessEqual[B, -6.2e-28], t$95$2, If[LessEqual[B, -7.5e-157], N[(N[Sqrt[N[(2.0 * N[(t$95$1 * N[(2.0 * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(-1.0 / t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.65e-21], t$95$3, N[(N[(N[Sqrt[2.0], $MachinePrecision] / B), $MachinePrecision] * (-N[Sqrt[N[(F * N[(B + A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]]]]]]]]]]
        
        \begin{array}{l}
        [A, C] = \mathsf{sort}([A, C])\\
        \\
        \begin{array}{l}
        t_0 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\
        t_1 := F \cdot t_0\\
        t_2 := \frac{-\sqrt{2 \cdot \left(\left(C + \mathsf{hypot}\left(C, B\right)\right) \cdot \left(F \cdot \left(B \cdot B\right)\right)\right)}}{t_0}\\
        t_3 := \frac{\sqrt{2 \cdot t_1} \cdot \left(-\sqrt{C + C}\right)}{t_0}\\
        \mathbf{if}\;B \leq -2.8 \cdot 10^{+28}:\\
        \;\;\;\;t_2\\
        
        \mathbf{elif}\;B \leq -2.5 \cdot 10^{-17}:\\
        \;\;\;\;t_3\\
        
        \mathbf{elif}\;B \leq -6.2 \cdot 10^{-28}:\\
        \;\;\;\;t_2\\
        
        \mathbf{elif}\;B \leq -7.5 \cdot 10^{-157}:\\
        \;\;\;\;\sqrt{2 \cdot \left(t_1 \cdot \left(2 \cdot C\right)\right)} \cdot \frac{-1}{t_0}\\
        
        \mathbf{elif}\;B \leq 1.65 \cdot 10^{-21}:\\
        \;\;\;\;t_3\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(B + A\right)}\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 4 regimes
        2. if B < -2.8000000000000001e28 or -2.4999999999999999e-17 < B < -6.19999999999999984e-28

          1. Initial program 28.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. associate-*l*28.1%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}\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. unpow228.1%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(\color{blue}{B \cdot B} - 4 \cdot \left(A \cdot C\right)\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} \]
            3. +-commutative28.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if -2.8000000000000001e28 < B < -2.4999999999999999e-17 or -7.500000000000001e-157 < B < 1.65000000000000004e-21

          1. Initial program 16.7%

            \[\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. associate-*l*16.7%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}\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. unpow216.7%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(\color{blue}{B \cdot B} - 4 \cdot \left(A \cdot C\right)\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} \]
            3. +-commutative16.7%

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{-\sqrt{2 \cdot \left(F \cdot \left(B \cdot B - 4 \cdot \left(C \cdot A\right)\right)\right)} \cdot \sqrt{A + \left(C + \color{blue}{\mathsf{hypot}\left(B, A - C\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
            7. associate-+r+32.3%

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

              \[\leadsto \frac{-\sqrt{2 \cdot \left(F \cdot \left(B \cdot B - 4 \cdot \left(C \cdot A\right)\right)\right)} \cdot \sqrt{\color{blue}{\left(C + A\right)} + \mathsf{hypot}\left(B, A - C\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
            9. associate-+r+33.1%

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

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

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

          if -6.19999999999999984e-28 < B < -7.500000000000001e-157

          1. Initial program 16.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. associate-*l*16.4%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}\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. unpow216.4%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(\color{blue}{B \cdot B} - 4 \cdot \left(A \cdot C\right)\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} \]
            3. +-commutative16.4%

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

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

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

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

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

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

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

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

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

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

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

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

          if 1.65000000000000004e-21 < B

          1. Initial program 22.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. associate-*l*22.4%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}\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. unpow222.4%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(\color{blue}{B \cdot B} - 4 \cdot \left(A \cdot C\right)\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} \]
            3. +-commutative22.4%

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -2.8 \cdot 10^{+28}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(C + \mathsf{hypot}\left(C, B\right)\right) \cdot \left(F \cdot \left(B \cdot B\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \mathbf{elif}\;B \leq -2.5 \cdot 10^{-17}:\\ \;\;\;\;\frac{\sqrt{2 \cdot \left(F \cdot \left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right)\right)} \cdot \left(-\sqrt{C + C}\right)}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \mathbf{elif}\;B \leq -6.2 \cdot 10^{-28}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(C + \mathsf{hypot}\left(C, B\right)\right) \cdot \left(F \cdot \left(B \cdot B\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \mathbf{elif}\;B \leq -7.5 \cdot 10^{-157}:\\ \;\;\;\;\sqrt{2 \cdot \left(\left(F \cdot \left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right)\right) \cdot \left(2 \cdot C\right)\right)} \cdot \frac{-1}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \mathbf{elif}\;B \leq 1.65 \cdot 10^{-21}:\\ \;\;\;\;\frac{\sqrt{2 \cdot \left(F \cdot \left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right)\right)} \cdot \left(-\sqrt{C + C}\right)}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(B + A\right)}\right)\\ \end{array} \]

        Alternative 6: 35.7% accurate, 2.7× speedup?

        \[\begin{array}{l} [A, C] = \mathsf{sort}([A, C])\\ \\ \begin{array}{l} t_0 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\ t_1 := F \cdot t_0\\ \mathbf{if}\;B \leq -5 \cdot 10^{+34}:\\ \;\;\;\;\sqrt{2 \cdot \left(t_1 \cdot \left(C + \left(A + \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)} \cdot \frac{-1}{t_0}\\ \mathbf{elif}\;B \leq 4.2 \cdot 10^{-10}:\\ \;\;\;\;\frac{\sqrt{2 \cdot t_1} \cdot \left(-\sqrt{C + C}\right)}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(B + A\right)}\right)\\ \end{array} \end{array} \]
        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)))) (t_1 (* F t_0)))
           (if (<= B -5e+34)
             (* (sqrt (* 2.0 (* t_1 (+ C (+ A (hypot B (- A C))))))) (/ -1.0 t_0))
             (if (<= B 4.2e-10)
               (/ (* (sqrt (* 2.0 t_1)) (- (sqrt (+ C C)))) t_0)
               (* (/ (sqrt 2.0) B) (- (sqrt (* F (+ B A)))))))))
        assert(A < C);
        double code(double A, double B, double C, double F) {
        	double t_0 = (B * B) - (4.0 * (A * C));
        	double t_1 = F * t_0;
        	double tmp;
        	if (B <= -5e+34) {
        		tmp = sqrt((2.0 * (t_1 * (C + (A + hypot(B, (A - C))))))) * (-1.0 / t_0);
        	} else if (B <= 4.2e-10) {
        		tmp = (sqrt((2.0 * t_1)) * -sqrt((C + C))) / t_0;
        	} else {
        		tmp = (sqrt(2.0) / B) * -sqrt((F * (B + A)));
        	}
        	return tmp;
        }
        
        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 t_1 = F * t_0;
        	double tmp;
        	if (B <= -5e+34) {
        		tmp = Math.sqrt((2.0 * (t_1 * (C + (A + Math.hypot(B, (A - C))))))) * (-1.0 / t_0);
        	} else if (B <= 4.2e-10) {
        		tmp = (Math.sqrt((2.0 * t_1)) * -Math.sqrt((C + C))) / t_0;
        	} else {
        		tmp = (Math.sqrt(2.0) / B) * -Math.sqrt((F * (B + A)));
        	}
        	return tmp;
        }
        
        [A, C] = sort([A, C])
        def code(A, B, C, F):
        	t_0 = (B * B) - (4.0 * (A * C))
        	t_1 = F * t_0
        	tmp = 0
        	if B <= -5e+34:
        		tmp = math.sqrt((2.0 * (t_1 * (C + (A + math.hypot(B, (A - C))))))) * (-1.0 / t_0)
        	elif B <= 4.2e-10:
        		tmp = (math.sqrt((2.0 * t_1)) * -math.sqrt((C + C))) / t_0
        	else:
        		tmp = (math.sqrt(2.0) / B) * -math.sqrt((F * (B + A)))
        	return tmp
        
        A, C = sort([A, C])
        function code(A, B, C, F)
        	t_0 = Float64(Float64(B * B) - Float64(4.0 * Float64(A * C)))
        	t_1 = Float64(F * t_0)
        	tmp = 0.0
        	if (B <= -5e+34)
        		tmp = Float64(sqrt(Float64(2.0 * Float64(t_1 * Float64(C + Float64(A + hypot(B, Float64(A - C))))))) * Float64(-1.0 / t_0));
        	elseif (B <= 4.2e-10)
        		tmp = Float64(Float64(sqrt(Float64(2.0 * t_1)) * Float64(-sqrt(Float64(C + C)))) / t_0);
        	else
        		tmp = Float64(Float64(sqrt(2.0) / B) * Float64(-sqrt(Float64(F * Float64(B + A)))));
        	end
        	return tmp
        end
        
        A, C = num2cell(sort([A, C])){:}
        function tmp_2 = code(A, B, C, F)
        	t_0 = (B * B) - (4.0 * (A * C));
        	t_1 = F * t_0;
        	tmp = 0.0;
        	if (B <= -5e+34)
        		tmp = sqrt((2.0 * (t_1 * (C + (A + hypot(B, (A - C))))))) * (-1.0 / t_0);
        	elseif (B <= 4.2e-10)
        		tmp = (sqrt((2.0 * t_1)) * -sqrt((C + C))) / t_0;
        	else
        		tmp = (sqrt(2.0) / B) * -sqrt((F * (B + A)));
        	end
        	tmp_2 = tmp;
        end
        
        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]}, Block[{t$95$1 = N[(F * t$95$0), $MachinePrecision]}, If[LessEqual[B, -5e+34], N[(N[Sqrt[N[(2.0 * N[(t$95$1 * N[(C + N[(A + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(-1.0 / t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4.2e-10], N[(N[(N[Sqrt[N[(2.0 * t$95$1), $MachinePrecision]], $MachinePrecision] * (-N[Sqrt[N[(C + C), $MachinePrecision]], $MachinePrecision])), $MachinePrecision] / t$95$0), $MachinePrecision], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B), $MachinePrecision] * (-N[Sqrt[N[(F * N[(B + A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]]]]]
        
        \begin{array}{l}
        [A, C] = \mathsf{sort}([A, C])\\
        \\
        \begin{array}{l}
        t_0 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\
        t_1 := F \cdot t_0\\
        \mathbf{if}\;B \leq -5 \cdot 10^{+34}:\\
        \;\;\;\;\sqrt{2 \cdot \left(t_1 \cdot \left(C + \left(A + \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)} \cdot \frac{-1}{t_0}\\
        
        \mathbf{elif}\;B \leq 4.2 \cdot 10^{-10}:\\
        \;\;\;\;\frac{\sqrt{2 \cdot t_1} \cdot \left(-\sqrt{C + C}\right)}{t_0}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(B + A\right)}\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if B < -4.9999999999999998e34

          1. Initial program 26.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. associate-*l*26.1%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}\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. unpow226.1%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(\color{blue}{B \cdot B} - 4 \cdot \left(A \cdot C\right)\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} \]
            3. +-commutative26.1%

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

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

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

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

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

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

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

          if -4.9999999999999998e34 < B < 4.2e-10

          1. Initial program 18.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. associate-*l*18.1%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}\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. unpow218.1%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(\color{blue}{B \cdot B} - 4 \cdot \left(A \cdot C\right)\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} \]
            3. +-commutative18.1%

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{-\sqrt{2 \cdot \left(F \cdot \left(B \cdot B - 4 \cdot \left(C \cdot A\right)\right)\right)} \cdot \sqrt{A + \left(C + \color{blue}{\mathsf{hypot}\left(B, A - C\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
            7. associate-+r+31.2%

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

              \[\leadsto \frac{-\sqrt{2 \cdot \left(F \cdot \left(B \cdot B - 4 \cdot \left(C \cdot A\right)\right)\right)} \cdot \sqrt{\color{blue}{\left(C + A\right)} + \mathsf{hypot}\left(B, A - C\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
            9. associate-+r+32.0%

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

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

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

          if 4.2e-10 < B

          1. Initial program 22.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. associate-*l*22.4%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}\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. unpow222.4%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(\color{blue}{B \cdot B} - 4 \cdot \left(A \cdot C\right)\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} \]
            3. +-commutative22.4%

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 7: 35.8% accurate, 2.7× speedup?

        \[\begin{array}{l} [A, C] = \mathsf{sort}([A, C])\\ \\ \begin{array}{l} t_0 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\ t_1 := 2 \cdot \left(F \cdot t_0\right)\\ \mathbf{if}\;B \leq -9 \cdot 10^{+25}:\\ \;\;\;\;-\frac{\sqrt{\left(C + \mathsf{hypot}\left(B, C\right)\right) \cdot t_1}}{t_0}\\ \mathbf{elif}\;B \leq 5.2 \cdot 10^{-11}:\\ \;\;\;\;\frac{\sqrt{t_1} \cdot \left(-\sqrt{C + C}\right)}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(B + A\right)}\right)\\ \end{array} \end{array} \]
        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)))) (t_1 (* 2.0 (* F t_0))))
           (if (<= B -9e+25)
             (- (/ (sqrt (* (+ C (hypot B C)) t_1)) t_0))
             (if (<= B 5.2e-11)
               (/ (* (sqrt t_1) (- (sqrt (+ C C)))) t_0)
               (* (/ (sqrt 2.0) B) (- (sqrt (* F (+ B A)))))))))
        assert(A < C);
        double code(double A, double B, double C, double F) {
        	double t_0 = (B * B) - (4.0 * (A * C));
        	double t_1 = 2.0 * (F * t_0);
        	double tmp;
        	if (B <= -9e+25) {
        		tmp = -(sqrt(((C + hypot(B, C)) * t_1)) / t_0);
        	} else if (B <= 5.2e-11) {
        		tmp = (sqrt(t_1) * -sqrt((C + C))) / t_0;
        	} else {
        		tmp = (sqrt(2.0) / B) * -sqrt((F * (B + A)));
        	}
        	return tmp;
        }
        
        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 t_1 = 2.0 * (F * t_0);
        	double tmp;
        	if (B <= -9e+25) {
        		tmp = -(Math.sqrt(((C + Math.hypot(B, C)) * t_1)) / t_0);
        	} else if (B <= 5.2e-11) {
        		tmp = (Math.sqrt(t_1) * -Math.sqrt((C + C))) / t_0;
        	} else {
        		tmp = (Math.sqrt(2.0) / B) * -Math.sqrt((F * (B + A)));
        	}
        	return tmp;
        }
        
        [A, C] = sort([A, C])
        def code(A, B, C, F):
        	t_0 = (B * B) - (4.0 * (A * C))
        	t_1 = 2.0 * (F * t_0)
        	tmp = 0
        	if B <= -9e+25:
        		tmp = -(math.sqrt(((C + math.hypot(B, C)) * t_1)) / t_0)
        	elif B <= 5.2e-11:
        		tmp = (math.sqrt(t_1) * -math.sqrt((C + C))) / t_0
        	else:
        		tmp = (math.sqrt(2.0) / B) * -math.sqrt((F * (B + A)))
        	return tmp
        
        A, C = sort([A, C])
        function code(A, B, C, F)
        	t_0 = Float64(Float64(B * B) - Float64(4.0 * Float64(A * C)))
        	t_1 = Float64(2.0 * Float64(F * t_0))
        	tmp = 0.0
        	if (B <= -9e+25)
        		tmp = Float64(-Float64(sqrt(Float64(Float64(C + hypot(B, C)) * t_1)) / t_0));
        	elseif (B <= 5.2e-11)
        		tmp = Float64(Float64(sqrt(t_1) * Float64(-sqrt(Float64(C + C)))) / t_0);
        	else
        		tmp = Float64(Float64(sqrt(2.0) / B) * Float64(-sqrt(Float64(F * Float64(B + A)))));
        	end
        	return tmp
        end
        
        A, C = num2cell(sort([A, C])){:}
        function tmp_2 = code(A, B, C, F)
        	t_0 = (B * B) - (4.0 * (A * C));
        	t_1 = 2.0 * (F * t_0);
        	tmp = 0.0;
        	if (B <= -9e+25)
        		tmp = -(sqrt(((C + hypot(B, C)) * t_1)) / t_0);
        	elseif (B <= 5.2e-11)
        		tmp = (sqrt(t_1) * -sqrt((C + C))) / t_0;
        	else
        		tmp = (sqrt(2.0) / B) * -sqrt((F * (B + A)));
        	end
        	tmp_2 = tmp;
        end
        
        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]}, Block[{t$95$1 = N[(2.0 * N[(F * t$95$0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -9e+25], (-N[(N[Sqrt[N[(N[(C + N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision]), If[LessEqual[B, 5.2e-11], N[(N[(N[Sqrt[t$95$1], $MachinePrecision] * (-N[Sqrt[N[(C + C), $MachinePrecision]], $MachinePrecision])), $MachinePrecision] / t$95$0), $MachinePrecision], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B), $MachinePrecision] * (-N[Sqrt[N[(F * N[(B + A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]]]]]
        
        \begin{array}{l}
        [A, C] = \mathsf{sort}([A, C])\\
        \\
        \begin{array}{l}
        t_0 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\
        t_1 := 2 \cdot \left(F \cdot t_0\right)\\
        \mathbf{if}\;B \leq -9 \cdot 10^{+25}:\\
        \;\;\;\;-\frac{\sqrt{\left(C + \mathsf{hypot}\left(B, C\right)\right) \cdot t_1}}{t_0}\\
        
        \mathbf{elif}\;B \leq 5.2 \cdot 10^{-11}:\\
        \;\;\;\;\frac{\sqrt{t_1} \cdot \left(-\sqrt{C + C}\right)}{t_0}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(B + A\right)}\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if B < -9.0000000000000006e25

          1. Initial program 25.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. associate-*l*25.6%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}\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. unpow225.6%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(\color{blue}{B \cdot B} - 4 \cdot \left(A \cdot C\right)\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} \]
            3. +-commutative25.6%

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

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

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

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

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

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

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

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

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

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

          if -9.0000000000000006e25 < B < 5.2000000000000001e-11

          1. Initial program 18.3%

            \[\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. associate-*l*18.3%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}\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. unpow218.3%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(\color{blue}{B \cdot B} - 4 \cdot \left(A \cdot C\right)\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} \]
            3. +-commutative18.3%

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{-\sqrt{2 \cdot \left(F \cdot \left(B \cdot B - 4 \cdot \left(C \cdot A\right)\right)\right)} \cdot \sqrt{A + \left(C + \color{blue}{\mathsf{hypot}\left(B, A - C\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
            7. associate-+r+31.4%

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

              \[\leadsto \frac{-\sqrt{2 \cdot \left(F \cdot \left(B \cdot B - 4 \cdot \left(C \cdot A\right)\right)\right)} \cdot \sqrt{\color{blue}{\left(C + A\right)} + \mathsf{hypot}\left(B, A - C\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
            9. associate-+r+32.2%

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

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

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

          if 5.2000000000000001e-11 < B

          1. Initial program 22.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. associate-*l*22.4%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}\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. unpow222.4%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(\color{blue}{B \cdot B} - 4 \cdot \left(A \cdot C\right)\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} \]
            3. +-commutative22.4%

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 8: 36.1% accurate, 2.8× speedup?

        \[\begin{array}{l} [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 -1.25 \cdot 10^{-27}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(C + \mathsf{hypot}\left(C, B\right)\right) \cdot \left(F \cdot \left(B \cdot B\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 7.8 \cdot 10^{+17}:\\ \;\;\;\;\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(2 \cdot C\right)\right)} \cdot \frac{-1}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(B + A\right)}\right)\\ \end{array} \end{array} \]
        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 -1.25e-27)
             (/ (- (sqrt (* 2.0 (* (+ C (hypot C B)) (* F (* B B)))))) t_0)
             (if (<= B 7.8e+17)
               (* (sqrt (* 2.0 (* (* F t_0) (* 2.0 C)))) (/ -1.0 t_0))
               (* (/ (sqrt 2.0) B) (- (sqrt (* F (+ B A)))))))))
        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 <= -1.25e-27) {
        		tmp = -sqrt((2.0 * ((C + hypot(C, B)) * (F * (B * B))))) / t_0;
        	} else if (B <= 7.8e+17) {
        		tmp = sqrt((2.0 * ((F * t_0) * (2.0 * C)))) * (-1.0 / t_0);
        	} else {
        		tmp = (sqrt(2.0) / B) * -sqrt((F * (B + A)));
        	}
        	return tmp;
        }
        
        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 <= -1.25e-27) {
        		tmp = -Math.sqrt((2.0 * ((C + Math.hypot(C, B)) * (F * (B * B))))) / t_0;
        	} else if (B <= 7.8e+17) {
        		tmp = Math.sqrt((2.0 * ((F * t_0) * (2.0 * C)))) * (-1.0 / t_0);
        	} else {
        		tmp = (Math.sqrt(2.0) / B) * -Math.sqrt((F * (B + A)));
        	}
        	return tmp;
        }
        
        [A, C] = sort([A, C])
        def code(A, B, C, F):
        	t_0 = (B * B) - (4.0 * (A * C))
        	tmp = 0
        	if B <= -1.25e-27:
        		tmp = -math.sqrt((2.0 * ((C + math.hypot(C, B)) * (F * (B * B))))) / t_0
        	elif B <= 7.8e+17:
        		tmp = math.sqrt((2.0 * ((F * t_0) * (2.0 * C)))) * (-1.0 / t_0)
        	else:
        		tmp = (math.sqrt(2.0) / B) * -math.sqrt((F * (B + A)))
        	return tmp
        
        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 <= -1.25e-27)
        		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(Float64(C + hypot(C, B)) * Float64(F * Float64(B * B)))))) / t_0);
        	elseif (B <= 7.8e+17)
        		tmp = Float64(sqrt(Float64(2.0 * Float64(Float64(F * t_0) * Float64(2.0 * C)))) * Float64(-1.0 / t_0));
        	else
        		tmp = Float64(Float64(sqrt(2.0) / B) * Float64(-sqrt(Float64(F * Float64(B + A)))));
        	end
        	return tmp
        end
        
        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 <= -1.25e-27)
        		tmp = -sqrt((2.0 * ((C + hypot(C, B)) * (F * (B * B))))) / t_0;
        	elseif (B <= 7.8e+17)
        		tmp = sqrt((2.0 * ((F * t_0) * (2.0 * C)))) * (-1.0 / t_0);
        	else
        		tmp = (sqrt(2.0) / B) * -sqrt((F * (B + A)));
        	end
        	tmp_2 = tmp;
        end
        
        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, -1.25e-27], N[((-N[Sqrt[N[(2.0 * N[(N[(C + N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] * N[(F * N[(B * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], If[LessEqual[B, 7.8e+17], N[(N[Sqrt[N[(2.0 * N[(N[(F * t$95$0), $MachinePrecision] * N[(2.0 * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(-1.0 / t$95$0), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B), $MachinePrecision] * (-N[Sqrt[N[(F * N[(B + A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]]]]
        
        \begin{array}{l}
        [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 -1.25 \cdot 10^{-27}:\\
        \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(C + \mathsf{hypot}\left(C, B\right)\right) \cdot \left(F \cdot \left(B \cdot B\right)\right)\right)}}{t_0}\\
        
        \mathbf{elif}\;B \leq 7.8 \cdot 10^{+17}:\\
        \;\;\;\;\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(2 \cdot C\right)\right)} \cdot \frac{-1}{t_0}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(B + A\right)}\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if B < -1.25e-27

          1. Initial program 26.3%

            \[\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. associate-*l*26.3%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}\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. unpow226.3%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(\color{blue}{B \cdot B} - 4 \cdot \left(A \cdot C\right)\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} \]
            3. +-commutative26.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if -1.25e-27 < B < 7.8e17

          1. Initial program 17.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. associate-*l*17.9%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}\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. unpow217.9%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(\color{blue}{B \cdot B} - 4 \cdot \left(A \cdot C\right)\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} \]
            3. +-commutative17.9%

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

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

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

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

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

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

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

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

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

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

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

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

          if 7.8e17 < B

          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. associate-*l*21.0%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}\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. unpow221.0%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(\color{blue}{B \cdot B} - 4 \cdot \left(A \cdot C\right)\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} \]
            3. +-commutative21.0%

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 9: 35.3% accurate, 3.0× speedup?

        \[\begin{array}{l} [A, C] = \mathsf{sort}([A, C])\\ \\ \begin{array}{l} t_0 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\ t_1 := F \cdot t_0\\ \mathbf{if}\;B \leq -5.8 \cdot 10^{+34}:\\ \;\;\;\;-\frac{\sqrt{\left(2 \cdot t_1\right) \cdot \left(A + \left(C - B\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 1.3 \cdot 10^{+18}:\\ \;\;\;\;\sqrt{2 \cdot \left(t_1 \cdot \left(2 \cdot C\right)\right)} \cdot \frac{-1}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(B + A\right)}\right)\\ \end{array} \end{array} \]
        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)))) (t_1 (* F t_0)))
           (if (<= B -5.8e+34)
             (- (/ (sqrt (* (* 2.0 t_1) (+ A (- C B)))) t_0))
             (if (<= B 1.3e+18)
               (* (sqrt (* 2.0 (* t_1 (* 2.0 C)))) (/ -1.0 t_0))
               (* (/ (sqrt 2.0) B) (- (sqrt (* F (+ B A)))))))))
        assert(A < C);
        double code(double A, double B, double C, double F) {
        	double t_0 = (B * B) - (4.0 * (A * C));
        	double t_1 = F * t_0;
        	double tmp;
        	if (B <= -5.8e+34) {
        		tmp = -(sqrt(((2.0 * t_1) * (A + (C - B)))) / t_0);
        	} else if (B <= 1.3e+18) {
        		tmp = sqrt((2.0 * (t_1 * (2.0 * C)))) * (-1.0 / t_0);
        	} else {
        		tmp = (sqrt(2.0) / B) * -sqrt((F * (B + A)));
        	}
        	return tmp;
        }
        
        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) :: t_1
            real(8) :: tmp
            t_0 = (b * b) - (4.0d0 * (a * c))
            t_1 = f * t_0
            if (b <= (-5.8d+34)) then
                tmp = -(sqrt(((2.0d0 * t_1) * (a + (c - b)))) / t_0)
            else if (b <= 1.3d+18) then
                tmp = sqrt((2.0d0 * (t_1 * (2.0d0 * c)))) * ((-1.0d0) / t_0)
            else
                tmp = (sqrt(2.0d0) / b) * -sqrt((f * (b + a)))
            end if
            code = tmp
        end function
        
        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 t_1 = F * t_0;
        	double tmp;
        	if (B <= -5.8e+34) {
        		tmp = -(Math.sqrt(((2.0 * t_1) * (A + (C - B)))) / t_0);
        	} else if (B <= 1.3e+18) {
        		tmp = Math.sqrt((2.0 * (t_1 * (2.0 * C)))) * (-1.0 / t_0);
        	} else {
        		tmp = (Math.sqrt(2.0) / B) * -Math.sqrt((F * (B + A)));
        	}
        	return tmp;
        }
        
        [A, C] = sort([A, C])
        def code(A, B, C, F):
        	t_0 = (B * B) - (4.0 * (A * C))
        	t_1 = F * t_0
        	tmp = 0
        	if B <= -5.8e+34:
        		tmp = -(math.sqrt(((2.0 * t_1) * (A + (C - B)))) / t_0)
        	elif B <= 1.3e+18:
        		tmp = math.sqrt((2.0 * (t_1 * (2.0 * C)))) * (-1.0 / t_0)
        	else:
        		tmp = (math.sqrt(2.0) / B) * -math.sqrt((F * (B + A)))
        	return tmp
        
        A, C = sort([A, C])
        function code(A, B, C, F)
        	t_0 = Float64(Float64(B * B) - Float64(4.0 * Float64(A * C)))
        	t_1 = Float64(F * t_0)
        	tmp = 0.0
        	if (B <= -5.8e+34)
        		tmp = Float64(-Float64(sqrt(Float64(Float64(2.0 * t_1) * Float64(A + Float64(C - B)))) / t_0));
        	elseif (B <= 1.3e+18)
        		tmp = Float64(sqrt(Float64(2.0 * Float64(t_1 * Float64(2.0 * C)))) * Float64(-1.0 / t_0));
        	else
        		tmp = Float64(Float64(sqrt(2.0) / B) * Float64(-sqrt(Float64(F * Float64(B + A)))));
        	end
        	return tmp
        end
        
        A, C = num2cell(sort([A, C])){:}
        function tmp_2 = code(A, B, C, F)
        	t_0 = (B * B) - (4.0 * (A * C));
        	t_1 = F * t_0;
        	tmp = 0.0;
        	if (B <= -5.8e+34)
        		tmp = -(sqrt(((2.0 * t_1) * (A + (C - B)))) / t_0);
        	elseif (B <= 1.3e+18)
        		tmp = sqrt((2.0 * (t_1 * (2.0 * C)))) * (-1.0 / t_0);
        	else
        		tmp = (sqrt(2.0) / B) * -sqrt((F * (B + A)));
        	end
        	tmp_2 = tmp;
        end
        
        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]}, Block[{t$95$1 = N[(F * t$95$0), $MachinePrecision]}, If[LessEqual[B, -5.8e+34], (-N[(N[Sqrt[N[(N[(2.0 * t$95$1), $MachinePrecision] * N[(A + N[(C - B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision]), If[LessEqual[B, 1.3e+18], N[(N[Sqrt[N[(2.0 * N[(t$95$1 * N[(2.0 * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(-1.0 / t$95$0), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B), $MachinePrecision] * (-N[Sqrt[N[(F * N[(B + A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]]]]]
        
        \begin{array}{l}
        [A, C] = \mathsf{sort}([A, C])\\
        \\
        \begin{array}{l}
        t_0 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\
        t_1 := F \cdot t_0\\
        \mathbf{if}\;B \leq -5.8 \cdot 10^{+34}:\\
        \;\;\;\;-\frac{\sqrt{\left(2 \cdot t_1\right) \cdot \left(A + \left(C - B\right)\right)}}{t_0}\\
        
        \mathbf{elif}\;B \leq 1.3 \cdot 10^{+18}:\\
        \;\;\;\;\sqrt{2 \cdot \left(t_1 \cdot \left(2 \cdot C\right)\right)} \cdot \frac{-1}{t_0}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(B + A\right)}\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if B < -5.8000000000000003e34

          1. Initial program 26.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. associate-*l*26.1%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}\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. unpow226.1%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(\color{blue}{B \cdot B} - 4 \cdot \left(A \cdot C\right)\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} \]
            3. +-commutative26.1%

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

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

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

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

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

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

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

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

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

          if -5.8000000000000003e34 < B < 1.3e18

          1. Initial program 19.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. associate-*l*19.0%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}\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. unpow219.0%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(\color{blue}{B \cdot B} - 4 \cdot \left(A \cdot C\right)\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} \]
            3. +-commutative19.0%

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

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

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

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

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

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

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

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

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

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

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

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

          if 1.3e18 < B

          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. associate-*l*21.0%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}\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. unpow221.0%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(\color{blue}{B \cdot B} - 4 \cdot \left(A \cdot C\right)\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} \]
            3. +-commutative21.0%

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 10: 35.8% accurate, 3.0× speedup?

        \[\begin{array}{l} [A, C] = \mathsf{sort}([A, C])\\ \\ \begin{array}{l} t_0 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\ t_1 := F \cdot t_0\\ \mathbf{if}\;B \leq -7.5 \cdot 10^{+23}:\\ \;\;\;\;-\frac{\sqrt{\left(2 \cdot t_1\right) \cdot \left(A + \left(C - B\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 110000000000:\\ \;\;\;\;\sqrt{2 \cdot \left(t_1 \cdot \left(2 \cdot C\right)\right)} \cdot \frac{-1}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\ \end{array} \end{array} \]
        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)))) (t_1 (* F t_0)))
           (if (<= B -7.5e+23)
             (- (/ (sqrt (* (* 2.0 t_1) (+ A (- C B)))) t_0))
             (if (<= B 110000000000.0)
               (* (sqrt (* 2.0 (* t_1 (* 2.0 C)))) (/ -1.0 t_0))
               (* (sqrt 2.0) (- (sqrt (/ F B))))))))
        assert(A < C);
        double code(double A, double B, double C, double F) {
        	double t_0 = (B * B) - (4.0 * (A * C));
        	double t_1 = F * t_0;
        	double tmp;
        	if (B <= -7.5e+23) {
        		tmp = -(sqrt(((2.0 * t_1) * (A + (C - B)))) / t_0);
        	} else if (B <= 110000000000.0) {
        		tmp = sqrt((2.0 * (t_1 * (2.0 * C)))) * (-1.0 / t_0);
        	} else {
        		tmp = sqrt(2.0) * -sqrt((F / B));
        	}
        	return tmp;
        }
        
        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) :: t_1
            real(8) :: tmp
            t_0 = (b * b) - (4.0d0 * (a * c))
            t_1 = f * t_0
            if (b <= (-7.5d+23)) then
                tmp = -(sqrt(((2.0d0 * t_1) * (a + (c - b)))) / t_0)
            else if (b <= 110000000000.0d0) then
                tmp = sqrt((2.0d0 * (t_1 * (2.0d0 * c)))) * ((-1.0d0) / t_0)
            else
                tmp = sqrt(2.0d0) * -sqrt((f / b))
            end if
            code = tmp
        end function
        
        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 t_1 = F * t_0;
        	double tmp;
        	if (B <= -7.5e+23) {
        		tmp = -(Math.sqrt(((2.0 * t_1) * (A + (C - B)))) / t_0);
        	} else if (B <= 110000000000.0) {
        		tmp = Math.sqrt((2.0 * (t_1 * (2.0 * C)))) * (-1.0 / t_0);
        	} else {
        		tmp = Math.sqrt(2.0) * -Math.sqrt((F / B));
        	}
        	return tmp;
        }
        
        [A, C] = sort([A, C])
        def code(A, B, C, F):
        	t_0 = (B * B) - (4.0 * (A * C))
        	t_1 = F * t_0
        	tmp = 0
        	if B <= -7.5e+23:
        		tmp = -(math.sqrt(((2.0 * t_1) * (A + (C - B)))) / t_0)
        	elif B <= 110000000000.0:
        		tmp = math.sqrt((2.0 * (t_1 * (2.0 * C)))) * (-1.0 / t_0)
        	else:
        		tmp = math.sqrt(2.0) * -math.sqrt((F / B))
        	return tmp
        
        A, C = sort([A, C])
        function code(A, B, C, F)
        	t_0 = Float64(Float64(B * B) - Float64(4.0 * Float64(A * C)))
        	t_1 = Float64(F * t_0)
        	tmp = 0.0
        	if (B <= -7.5e+23)
        		tmp = Float64(-Float64(sqrt(Float64(Float64(2.0 * t_1) * Float64(A + Float64(C - B)))) / t_0));
        	elseif (B <= 110000000000.0)
        		tmp = Float64(sqrt(Float64(2.0 * Float64(t_1 * Float64(2.0 * C)))) * Float64(-1.0 / t_0));
        	else
        		tmp = Float64(sqrt(2.0) * Float64(-sqrt(Float64(F / B))));
        	end
        	return tmp
        end
        
        A, C = num2cell(sort([A, C])){:}
        function tmp_2 = code(A, B, C, F)
        	t_0 = (B * B) - (4.0 * (A * C));
        	t_1 = F * t_0;
        	tmp = 0.0;
        	if (B <= -7.5e+23)
        		tmp = -(sqrt(((2.0 * t_1) * (A + (C - B)))) / t_0);
        	elseif (B <= 110000000000.0)
        		tmp = sqrt((2.0 * (t_1 * (2.0 * C)))) * (-1.0 / t_0);
        	else
        		tmp = sqrt(2.0) * -sqrt((F / B));
        	end
        	tmp_2 = tmp;
        end
        
        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]}, Block[{t$95$1 = N[(F * t$95$0), $MachinePrecision]}, If[LessEqual[B, -7.5e+23], (-N[(N[Sqrt[N[(N[(2.0 * t$95$1), $MachinePrecision] * N[(A + N[(C - B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision]), If[LessEqual[B, 110000000000.0], N[(N[Sqrt[N[(2.0 * N[(t$95$1 * N[(2.0 * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(-1.0 / t$95$0), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[2.0], $MachinePrecision] * (-N[Sqrt[N[(F / B), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]]]]]
        
        \begin{array}{l}
        [A, C] = \mathsf{sort}([A, C])\\
        \\
        \begin{array}{l}
        t_0 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\
        t_1 := F \cdot t_0\\
        \mathbf{if}\;B \leq -7.5 \cdot 10^{+23}:\\
        \;\;\;\;-\frac{\sqrt{\left(2 \cdot t_1\right) \cdot \left(A + \left(C - B\right)\right)}}{t_0}\\
        
        \mathbf{elif}\;B \leq 110000000000:\\
        \;\;\;\;\sqrt{2 \cdot \left(t_1 \cdot \left(2 \cdot C\right)\right)} \cdot \frac{-1}{t_0}\\
        
        \mathbf{else}:\\
        \;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if B < -7.49999999999999987e23

          1. Initial program 25.2%

            \[\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. associate-*l*25.2%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}\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. unpow225.2%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(\color{blue}{B \cdot B} - 4 \cdot \left(A \cdot C\right)\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} \]
            3. +-commutative25.2%

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

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

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

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

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

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

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

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

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

          if -7.49999999999999987e23 < B < 1.1e11

          1. Initial program 19.3%

            \[\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. associate-*l*19.3%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}\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. unpow219.3%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(\color{blue}{B \cdot B} - 4 \cdot \left(A \cdot C\right)\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} \]
            3. +-commutative19.3%

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

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

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

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

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

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

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

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

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

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

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

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

          if 1.1e11 < B

          1. Initial program 20.7%

            \[\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. associate-*l*20.7%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}\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. unpow220.7%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(\color{blue}{B \cdot B} - 4 \cdot \left(A \cdot C\right)\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} \]
            3. +-commutative20.7%

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{-\sqrt{2} \cdot \sqrt{\frac{F}{B}}} \]
        3. Recombined 3 regimes into one program.
        4. Final simplification30.1%

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

        Alternative 11: 27.9% accurate, 4.7× speedup?

        \[\begin{array}{l} [A, C] = \mathsf{sort}([A, C])\\ \\ \begin{array}{l} t_0 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\ t_1 := F \cdot t_0\\ t_2 := 2 \cdot t_1\\ \mathbf{if}\;B \leq -3.9 \cdot 10^{+34}:\\ \;\;\;\;-\frac{\sqrt{t_2 \cdot \left(A + \left(C - B\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 9 \cdot 10^{+17}:\\ \;\;\;\;\sqrt{2 \cdot \left(t_1 \cdot \left(2 \cdot C\right)\right)} \cdot \frac{-1}{t_0}\\ \mathbf{else}:\\ \;\;\;\;-\frac{\sqrt{t_2 \cdot \left(B + \left(A + C\right)\right)}}{t_0}\\ \end{array} \end{array} \]
        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)))) (t_1 (* F t_0)) (t_2 (* 2.0 t_1)))
           (if (<= B -3.9e+34)
             (- (/ (sqrt (* t_2 (+ A (- C B)))) t_0))
             (if (<= B 9e+17)
               (* (sqrt (* 2.0 (* t_1 (* 2.0 C)))) (/ -1.0 t_0))
               (- (/ (sqrt (* t_2 (+ B (+ A C)))) t_0))))))
        assert(A < C);
        double code(double A, double B, double C, double F) {
        	double t_0 = (B * B) - (4.0 * (A * C));
        	double t_1 = F * t_0;
        	double t_2 = 2.0 * t_1;
        	double tmp;
        	if (B <= -3.9e+34) {
        		tmp = -(sqrt((t_2 * (A + (C - B)))) / t_0);
        	} else if (B <= 9e+17) {
        		tmp = sqrt((2.0 * (t_1 * (2.0 * C)))) * (-1.0 / t_0);
        	} else {
        		tmp = -(sqrt((t_2 * (B + (A + C)))) / t_0);
        	}
        	return tmp;
        }
        
        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) :: t_1
            real(8) :: t_2
            real(8) :: tmp
            t_0 = (b * b) - (4.0d0 * (a * c))
            t_1 = f * t_0
            t_2 = 2.0d0 * t_1
            if (b <= (-3.9d+34)) then
                tmp = -(sqrt((t_2 * (a + (c - b)))) / t_0)
            else if (b <= 9d+17) then
                tmp = sqrt((2.0d0 * (t_1 * (2.0d0 * c)))) * ((-1.0d0) / t_0)
            else
                tmp = -(sqrt((t_2 * (b + (a + c)))) / t_0)
            end if
            code = tmp
        end function
        
        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 t_1 = F * t_0;
        	double t_2 = 2.0 * t_1;
        	double tmp;
        	if (B <= -3.9e+34) {
        		tmp = -(Math.sqrt((t_2 * (A + (C - B)))) / t_0);
        	} else if (B <= 9e+17) {
        		tmp = Math.sqrt((2.0 * (t_1 * (2.0 * C)))) * (-1.0 / t_0);
        	} else {
        		tmp = -(Math.sqrt((t_2 * (B + (A + C)))) / t_0);
        	}
        	return tmp;
        }
        
        [A, C] = sort([A, C])
        def code(A, B, C, F):
        	t_0 = (B * B) - (4.0 * (A * C))
        	t_1 = F * t_0
        	t_2 = 2.0 * t_1
        	tmp = 0
        	if B <= -3.9e+34:
        		tmp = -(math.sqrt((t_2 * (A + (C - B)))) / t_0)
        	elif B <= 9e+17:
        		tmp = math.sqrt((2.0 * (t_1 * (2.0 * C)))) * (-1.0 / t_0)
        	else:
        		tmp = -(math.sqrt((t_2 * (B + (A + C)))) / t_0)
        	return tmp
        
        A, C = sort([A, C])
        function code(A, B, C, F)
        	t_0 = Float64(Float64(B * B) - Float64(4.0 * Float64(A * C)))
        	t_1 = Float64(F * t_0)
        	t_2 = Float64(2.0 * t_1)
        	tmp = 0.0
        	if (B <= -3.9e+34)
        		tmp = Float64(-Float64(sqrt(Float64(t_2 * Float64(A + Float64(C - B)))) / t_0));
        	elseif (B <= 9e+17)
        		tmp = Float64(sqrt(Float64(2.0 * Float64(t_1 * Float64(2.0 * C)))) * Float64(-1.0 / t_0));
        	else
        		tmp = Float64(-Float64(sqrt(Float64(t_2 * Float64(B + Float64(A + C)))) / t_0));
        	end
        	return tmp
        end
        
        A, C = num2cell(sort([A, C])){:}
        function tmp_2 = code(A, B, C, F)
        	t_0 = (B * B) - (4.0 * (A * C));
        	t_1 = F * t_0;
        	t_2 = 2.0 * t_1;
        	tmp = 0.0;
        	if (B <= -3.9e+34)
        		tmp = -(sqrt((t_2 * (A + (C - B)))) / t_0);
        	elseif (B <= 9e+17)
        		tmp = sqrt((2.0 * (t_1 * (2.0 * C)))) * (-1.0 / t_0);
        	else
        		tmp = -(sqrt((t_2 * (B + (A + C)))) / t_0);
        	end
        	tmp_2 = tmp;
        end
        
        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]}, Block[{t$95$1 = N[(F * t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * t$95$1), $MachinePrecision]}, If[LessEqual[B, -3.9e+34], (-N[(N[Sqrt[N[(t$95$2 * N[(A + N[(C - B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision]), If[LessEqual[B, 9e+17], N[(N[Sqrt[N[(2.0 * N[(t$95$1 * N[(2.0 * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(-1.0 / t$95$0), $MachinePrecision]), $MachinePrecision], (-N[(N[Sqrt[N[(t$95$2 * N[(B + N[(A + C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision])]]]]]
        
        \begin{array}{l}
        [A, C] = \mathsf{sort}([A, C])\\
        \\
        \begin{array}{l}
        t_0 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\
        t_1 := F \cdot t_0\\
        t_2 := 2 \cdot t_1\\
        \mathbf{if}\;B \leq -3.9 \cdot 10^{+34}:\\
        \;\;\;\;-\frac{\sqrt{t_2 \cdot \left(A + \left(C - B\right)\right)}}{t_0}\\
        
        \mathbf{elif}\;B \leq 9 \cdot 10^{+17}:\\
        \;\;\;\;\sqrt{2 \cdot \left(t_1 \cdot \left(2 \cdot C\right)\right)} \cdot \frac{-1}{t_0}\\
        
        \mathbf{else}:\\
        \;\;\;\;-\frac{\sqrt{t_2 \cdot \left(B + \left(A + C\right)\right)}}{t_0}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if B < -3.90000000000000019e34

          1. Initial program 26.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. associate-*l*26.1%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}\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. unpow226.1%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(\color{blue}{B \cdot B} - 4 \cdot \left(A \cdot C\right)\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} \]
            3. +-commutative26.1%

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

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

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

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

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

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

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

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

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

          if -3.90000000000000019e34 < B < 9e17

          1. Initial program 19.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. associate-*l*19.0%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}\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. unpow219.0%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(\color{blue}{B \cdot B} - 4 \cdot \left(A \cdot C\right)\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} \]
            3. +-commutative19.0%

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

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

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

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

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

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

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

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

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

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

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

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

          if 9e17 < B

          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. associate-*l*21.0%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}\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. unpow221.0%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(\color{blue}{B \cdot B} - 4 \cdot \left(A \cdot C\right)\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} \]
            3. +-commutative21.0%

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

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

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

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

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

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

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

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

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

        Alternative 12: 28.0% accurate, 4.8× speedup?

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

          1. Initial program 24.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. associate-*l*24.4%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}\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. unpow224.4%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(\color{blue}{B \cdot B} - 4 \cdot \left(A \cdot C\right)\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} \]
            3. +-commutative24.4%

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

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

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

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

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

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

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

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

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

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

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

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

          if -9e15 < B < 4.8e13

          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. associate-*l*19.6%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}\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. unpow219.6%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(\color{blue}{B \cdot B} - 4 \cdot \left(A \cdot C\right)\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} \]
            3. +-commutative19.6%

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

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

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

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

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

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

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

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

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

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

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

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

          if 4.8e13 < B

          1. Initial program 20.7%

            \[\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. associate-*l*20.7%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}\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. unpow220.7%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(\color{blue}{B \cdot B} - 4 \cdot \left(A \cdot C\right)\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} \]
            3. +-commutative20.7%

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 13: 28.0% accurate, 4.8× speedup?

        \[\begin{array}{l} [A, C] = \mathsf{sort}([A, C])\\ \\ \begin{array}{l} t_0 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\ t_1 := F \cdot t_0\\ \mathbf{if}\;B \leq -2.1 \cdot 10^{+20}:\\ \;\;\;\;-\frac{\sqrt{\left(2 \cdot t_1\right) \cdot \left(A + \left(C - B\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 6.6 \cdot 10^{+16}:\\ \;\;\;\;\sqrt{2 \cdot \left(t_1 \cdot \left(2 \cdot C\right)\right)} \cdot \frac{-1}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot \left(B \cdot B\right)\right) \cdot \left(B + C\right)\right)}}{t_0}\\ \end{array} \end{array} \]
        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)))) (t_1 (* F t_0)))
           (if (<= B -2.1e+20)
             (- (/ (sqrt (* (* 2.0 t_1) (+ A (- C B)))) t_0))
             (if (<= B 6.6e+16)
               (* (sqrt (* 2.0 (* t_1 (* 2.0 C)))) (/ -1.0 t_0))
               (/ (- (sqrt (* 2.0 (* (* F (* B B)) (+ B C))))) t_0)))))
        assert(A < C);
        double code(double A, double B, double C, double F) {
        	double t_0 = (B * B) - (4.0 * (A * C));
        	double t_1 = F * t_0;
        	double tmp;
        	if (B <= -2.1e+20) {
        		tmp = -(sqrt(((2.0 * t_1) * (A + (C - B)))) / t_0);
        	} else if (B <= 6.6e+16) {
        		tmp = sqrt((2.0 * (t_1 * (2.0 * C)))) * (-1.0 / t_0);
        	} else {
        		tmp = -sqrt((2.0 * ((F * (B * B)) * (B + C)))) / t_0;
        	}
        	return tmp;
        }
        
        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) :: t_1
            real(8) :: tmp
            t_0 = (b * b) - (4.0d0 * (a * c))
            t_1 = f * t_0
            if (b <= (-2.1d+20)) then
                tmp = -(sqrt(((2.0d0 * t_1) * (a + (c - b)))) / t_0)
            else if (b <= 6.6d+16) then
                tmp = sqrt((2.0d0 * (t_1 * (2.0d0 * c)))) * ((-1.0d0) / t_0)
            else
                tmp = -sqrt((2.0d0 * ((f * (b * b)) * (b + c)))) / t_0
            end if
            code = tmp
        end function
        
        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 t_1 = F * t_0;
        	double tmp;
        	if (B <= -2.1e+20) {
        		tmp = -(Math.sqrt(((2.0 * t_1) * (A + (C - B)))) / t_0);
        	} else if (B <= 6.6e+16) {
        		tmp = Math.sqrt((2.0 * (t_1 * (2.0 * C)))) * (-1.0 / t_0);
        	} else {
        		tmp = -Math.sqrt((2.0 * ((F * (B * B)) * (B + C)))) / t_0;
        	}
        	return tmp;
        }
        
        [A, C] = sort([A, C])
        def code(A, B, C, F):
        	t_0 = (B * B) - (4.0 * (A * C))
        	t_1 = F * t_0
        	tmp = 0
        	if B <= -2.1e+20:
        		tmp = -(math.sqrt(((2.0 * t_1) * (A + (C - B)))) / t_0)
        	elif B <= 6.6e+16:
        		tmp = math.sqrt((2.0 * (t_1 * (2.0 * C)))) * (-1.0 / t_0)
        	else:
        		tmp = -math.sqrt((2.0 * ((F * (B * B)) * (B + C)))) / t_0
        	return tmp
        
        A, C = sort([A, C])
        function code(A, B, C, F)
        	t_0 = Float64(Float64(B * B) - Float64(4.0 * Float64(A * C)))
        	t_1 = Float64(F * t_0)
        	tmp = 0.0
        	if (B <= -2.1e+20)
        		tmp = Float64(-Float64(sqrt(Float64(Float64(2.0 * t_1) * Float64(A + Float64(C - B)))) / t_0));
        	elseif (B <= 6.6e+16)
        		tmp = Float64(sqrt(Float64(2.0 * Float64(t_1 * Float64(2.0 * C)))) * Float64(-1.0 / t_0));
        	else
        		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(Float64(F * Float64(B * B)) * Float64(B + C))))) / t_0);
        	end
        	return tmp
        end
        
        A, C = num2cell(sort([A, C])){:}
        function tmp_2 = code(A, B, C, F)
        	t_0 = (B * B) - (4.0 * (A * C));
        	t_1 = F * t_0;
        	tmp = 0.0;
        	if (B <= -2.1e+20)
        		tmp = -(sqrt(((2.0 * t_1) * (A + (C - B)))) / t_0);
        	elseif (B <= 6.6e+16)
        		tmp = sqrt((2.0 * (t_1 * (2.0 * C)))) * (-1.0 / t_0);
        	else
        		tmp = -sqrt((2.0 * ((F * (B * B)) * (B + C)))) / t_0;
        	end
        	tmp_2 = tmp;
        end
        
        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]}, Block[{t$95$1 = N[(F * t$95$0), $MachinePrecision]}, If[LessEqual[B, -2.1e+20], (-N[(N[Sqrt[N[(N[(2.0 * t$95$1), $MachinePrecision] * N[(A + N[(C - B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision]), If[LessEqual[B, 6.6e+16], N[(N[Sqrt[N[(2.0 * N[(t$95$1 * N[(2.0 * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(-1.0 / t$95$0), $MachinePrecision]), $MachinePrecision], N[((-N[Sqrt[N[(2.0 * N[(N[(F * N[(B * B), $MachinePrecision]), $MachinePrecision] * N[(B + C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision]]]]]
        
        \begin{array}{l}
        [A, C] = \mathsf{sort}([A, C])\\
        \\
        \begin{array}{l}
        t_0 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\
        t_1 := F \cdot t_0\\
        \mathbf{if}\;B \leq -2.1 \cdot 10^{+20}:\\
        \;\;\;\;-\frac{\sqrt{\left(2 \cdot t_1\right) \cdot \left(A + \left(C - B\right)\right)}}{t_0}\\
        
        \mathbf{elif}\;B \leq 6.6 \cdot 10^{+16}:\\
        \;\;\;\;\sqrt{2 \cdot \left(t_1 \cdot \left(2 \cdot C\right)\right)} \cdot \frac{-1}{t_0}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot \left(B \cdot B\right)\right) \cdot \left(B + C\right)\right)}}{t_0}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if B < -2.1e20

          1. Initial program 25.2%

            \[\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. associate-*l*25.2%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}\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. unpow225.2%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(\color{blue}{B \cdot B} - 4 \cdot \left(A \cdot C\right)\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} \]
            3. +-commutative25.2%

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

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

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

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

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

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

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

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

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

          if -2.1e20 < B < 6.6e16

          1. Initial program 19.3%

            \[\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. associate-*l*19.3%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}\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. unpow219.3%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(\color{blue}{B \cdot B} - 4 \cdot \left(A \cdot C\right)\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} \]
            3. +-commutative19.3%

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

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

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

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

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

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

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

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

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

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

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

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

          if 6.6e16 < B

          1. Initial program 20.7%

            \[\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. associate-*l*20.7%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}\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. unpow220.7%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(\color{blue}{B \cdot B} - 4 \cdot \left(A \cdot C\right)\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} \]
            3. +-commutative20.7%

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 14: 28.1% accurate, 4.8× speedup?

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

          1. Initial program 24.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. associate-*l*24.4%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}\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. unpow224.4%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(\color{blue}{B \cdot B} - 4 \cdot \left(A \cdot C\right)\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} \]
            3. +-commutative24.4%

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

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

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

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

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

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

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

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

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

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

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

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

          if -6.9e15 < B < 6e13

          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. associate-*l*19.6%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}\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. unpow219.6%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(\color{blue}{B \cdot B} - 4 \cdot \left(A \cdot C\right)\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} \]
            3. +-commutative19.6%

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

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

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

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

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

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

          if 6e13 < B

          1. Initial program 20.7%

            \[\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. associate-*l*20.7%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}\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. unpow220.7%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(\color{blue}{B \cdot B} - 4 \cdot \left(A \cdot C\right)\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} \]
            3. +-commutative20.7%

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 15: 28.1% accurate, 4.9× speedup?

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

          1. Initial program 24.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. associate-*l*24.4%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}\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. unpow224.4%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(\color{blue}{B \cdot B} - 4 \cdot \left(A \cdot C\right)\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} \]
            3. +-commutative24.4%

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

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

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

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

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

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

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

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

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

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

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

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

          if -6.9e15 < B < 2.5e14

          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. associate-*l*19.6%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}\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. unpow219.6%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(\color{blue}{B \cdot B} - 4 \cdot \left(A \cdot C\right)\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} \]
            3. +-commutative19.6%

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

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

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

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

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

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

            \[\leadsto \frac{-\sqrt{\color{blue}{4 \cdot \left(C \cdot \left(\left({B}^{2} - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right)\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
          6. Step-by-step derivation
            1. cancel-sign-sub-inv19.3%

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

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

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

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

          if 2.5e14 < B

          1. Initial program 20.7%

            \[\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. associate-*l*20.7%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}\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. unpow220.7%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(\color{blue}{B \cdot B} - 4 \cdot \left(A \cdot C\right)\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} \]
            3. +-commutative20.7%

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 16: 20.8% accurate, 4.9× speedup?

        \[\begin{array}{l} [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.8 \cdot 10^{+102}:\\ \;\;\;\;\frac{2}{B} \cdot \sqrt{C \cdot F}\\ \mathbf{elif}\;B \leq -9.2 \cdot 10^{-29}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(F \cdot \left(\left(B \cdot B\right) \cdot \left(C - B\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 8.6 \cdot 10^{-9}:\\ \;\;\;\;\frac{-\sqrt{-16 \cdot \left(A \cdot \left(F \cdot \left(C \cdot C\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot \left(B \cdot B\right)\right) \cdot \left(B + C\right)\right)}}{t_0}\\ \end{array} \end{array} \]
        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.8e+102)
             (* (/ 2.0 B) (sqrt (* C F)))
             (if (<= B -9.2e-29)
               (- (/ (sqrt (* 2.0 (* F (* (* B B) (- C B))))) t_0))
               (if (<= B 8.6e-9)
                 (/ (- (sqrt (* -16.0 (* A (* F (* C C)))))) t_0)
                 (/ (- (sqrt (* 2.0 (* (* F (* B B)) (+ B C))))) t_0))))))
        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.8e+102) {
        		tmp = (2.0 / B) * sqrt((C * F));
        	} else if (B <= -9.2e-29) {
        		tmp = -(sqrt((2.0 * (F * ((B * B) * (C - B))))) / t_0);
        	} else if (B <= 8.6e-9) {
        		tmp = -sqrt((-16.0 * (A * (F * (C * C))))) / t_0;
        	} else {
        		tmp = -sqrt((2.0 * ((F * (B * B)) * (B + C)))) / t_0;
        	}
        	return tmp;
        }
        
        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) - (4.0d0 * (a * c))
            if (b <= (-5.8d+102)) then
                tmp = (2.0d0 / b) * sqrt((c * f))
            else if (b <= (-9.2d-29)) then
                tmp = -(sqrt((2.0d0 * (f * ((b * b) * (c - b))))) / t_0)
            else if (b <= 8.6d-9) then
                tmp = -sqrt(((-16.0d0) * (a * (f * (c * c))))) / t_0
            else
                tmp = -sqrt((2.0d0 * ((f * (b * b)) * (b + c)))) / t_0
            end if
            code = tmp
        end function
        
        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.8e+102) {
        		tmp = (2.0 / B) * Math.sqrt((C * F));
        	} else if (B <= -9.2e-29) {
        		tmp = -(Math.sqrt((2.0 * (F * ((B * B) * (C - B))))) / t_0);
        	} else if (B <= 8.6e-9) {
        		tmp = -Math.sqrt((-16.0 * (A * (F * (C * C))))) / t_0;
        	} else {
        		tmp = -Math.sqrt((2.0 * ((F * (B * B)) * (B + C)))) / t_0;
        	}
        	return tmp;
        }
        
        [A, C] = sort([A, C])
        def code(A, B, C, F):
        	t_0 = (B * B) - (4.0 * (A * C))
        	tmp = 0
        	if B <= -5.8e+102:
        		tmp = (2.0 / B) * math.sqrt((C * F))
        	elif B <= -9.2e-29:
        		tmp = -(math.sqrt((2.0 * (F * ((B * B) * (C - B))))) / t_0)
        	elif B <= 8.6e-9:
        		tmp = -math.sqrt((-16.0 * (A * (F * (C * C))))) / t_0
        	else:
        		tmp = -math.sqrt((2.0 * ((F * (B * B)) * (B + C)))) / t_0
        	return tmp
        
        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.8e+102)
        		tmp = Float64(Float64(2.0 / B) * sqrt(Float64(C * F)));
        	elseif (B <= -9.2e-29)
        		tmp = Float64(-Float64(sqrt(Float64(2.0 * Float64(F * Float64(Float64(B * B) * Float64(C - B))))) / t_0));
        	elseif (B <= 8.6e-9)
        		tmp = Float64(Float64(-sqrt(Float64(-16.0 * Float64(A * Float64(F * Float64(C * C)))))) / t_0);
        	else
        		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(Float64(F * Float64(B * B)) * Float64(B + C))))) / t_0);
        	end
        	return tmp
        end
        
        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.8e+102)
        		tmp = (2.0 / B) * sqrt((C * F));
        	elseif (B <= -9.2e-29)
        		tmp = -(sqrt((2.0 * (F * ((B * B) * (C - B))))) / t_0);
        	elseif (B <= 8.6e-9)
        		tmp = -sqrt((-16.0 * (A * (F * (C * C))))) / t_0;
        	else
        		tmp = -sqrt((2.0 * ((F * (B * B)) * (B + C)))) / t_0;
        	end
        	tmp_2 = tmp;
        end
        
        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.8e+102], N[(N[(2.0 / B), $MachinePrecision] * N[Sqrt[N[(C * F), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -9.2e-29], (-N[(N[Sqrt[N[(2.0 * N[(F * N[(N[(B * B), $MachinePrecision] * N[(C - B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision]), If[LessEqual[B, 8.6e-9], N[((-N[Sqrt[N[(-16.0 * N[(A * N[(F * N[(C * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], N[((-N[Sqrt[N[(2.0 * N[(N[(F * N[(B * B), $MachinePrecision]), $MachinePrecision] * N[(B + C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision]]]]]
        
        \begin{array}{l}
        [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.8 \cdot 10^{+102}:\\
        \;\;\;\;\frac{2}{B} \cdot \sqrt{C \cdot F}\\
        
        \mathbf{elif}\;B \leq -9.2 \cdot 10^{-29}:\\
        \;\;\;\;-\frac{\sqrt{2 \cdot \left(F \cdot \left(\left(B \cdot B\right) \cdot \left(C - B\right)\right)\right)}}{t_0}\\
        
        \mathbf{elif}\;B \leq 8.6 \cdot 10^{-9}:\\
        \;\;\;\;\frac{-\sqrt{-16 \cdot \left(A \cdot \left(F \cdot \left(C \cdot C\right)\right)\right)}}{t_0}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot \left(B \cdot B\right)\right) \cdot \left(B + C\right)\right)}}{t_0}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 4 regimes
        2. if B < -5.8000000000000005e102

          1. Initial program 13.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. associate-*l*13.6%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}\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. unpow213.6%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(\color{blue}{B \cdot B} - 4 \cdot \left(A \cdot C\right)\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} \]
            3. +-commutative13.6%

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{-\sqrt{2 \cdot \left(F \cdot \left(B \cdot B - 4 \cdot \left(C \cdot A\right)\right)\right)} \cdot \sqrt{A + \left(C + \color{blue}{\mathsf{hypot}\left(B, A - C\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
            7. associate-+r+18.6%

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

              \[\leadsto \frac{-\sqrt{2 \cdot \left(F \cdot \left(B \cdot B - 4 \cdot \left(C \cdot A\right)\right)\right)} \cdot \sqrt{\color{blue}{\left(C + A\right)} + \mathsf{hypot}\left(B, A - C\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
            9. associate-+r+18.6%

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

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

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

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

              \[\leadsto \frac{\color{blue}{\sqrt{2} \cdot \sqrt{2}}}{B} \cdot \sqrt{C \cdot F} \]
            2. rem-square-sqrt5.0%

              \[\leadsto \frac{\color{blue}{2}}{B} \cdot \sqrt{C \cdot F} \]
          9. Simplified5.0%

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

          if -5.8000000000000005e102 < B < -9.19999999999999965e-29

          1. Initial program 40.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. associate-*l*40.9%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}\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. unpow240.9%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(\color{blue}{B \cdot B} - 4 \cdot \left(A \cdot C\right)\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} \]
            3. +-commutative40.9%

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

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

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

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

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

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

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

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

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

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

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

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

          if -9.19999999999999965e-29 < B < 8.59999999999999925e-9

          1. Initial program 16.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. associate-*l*16.9%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}\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. unpow216.9%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(\color{blue}{B \cdot B} - 4 \cdot \left(A \cdot C\right)\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} \]
            3. +-commutative16.9%

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

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

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

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

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

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

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

              \[\leadsto \frac{-\sqrt{-16 \cdot \left(A \cdot \left(\color{blue}{\left(C \cdot C\right)} \cdot F\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
          7. Simplified10.5%

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

          if 8.59999999999999925e-9 < B

          1. Initial program 22.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. associate-*l*22.4%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}\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. unpow222.4%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(\color{blue}{B \cdot B} - 4 \cdot \left(A \cdot C\right)\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} \]
            3. +-commutative22.4%

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -5.8 \cdot 10^{+102}:\\ \;\;\;\;\frac{2}{B} \cdot \sqrt{C \cdot F}\\ \mathbf{elif}\;B \leq -9.2 \cdot 10^{-29}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(F \cdot \left(\left(B \cdot B\right) \cdot \left(C - B\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \mathbf{elif}\;B \leq 8.6 \cdot 10^{-9}:\\ \;\;\;\;\frac{-\sqrt{-16 \cdot \left(A \cdot \left(F \cdot \left(C \cdot C\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot \left(B \cdot B\right)\right) \cdot \left(B + C\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \end{array} \]

        Alternative 17: 18.7% accurate, 5.0× speedup?

        \[\begin{array}{l} [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.8 \cdot 10^{+102}:\\ \;\;\;\;\frac{2}{B} \cdot \sqrt{C \cdot F}\\ \mathbf{elif}\;B \leq -6.8 \cdot 10^{-31}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(F \cdot \left(\left(B \cdot B\right) \cdot \left(C - B\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{-16 \cdot \left(A \cdot \left(F \cdot \left(C \cdot C\right)\right)\right)}}{t_0}\\ \end{array} \end{array} \]
        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.8e+102)
             (* (/ 2.0 B) (sqrt (* C F)))
             (if (<= B -6.8e-31)
               (- (/ (sqrt (* 2.0 (* F (* (* B B) (- C B))))) t_0))
               (/ (- (sqrt (* -16.0 (* A (* F (* C C)))))) t_0)))))
        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.8e+102) {
        		tmp = (2.0 / B) * sqrt((C * F));
        	} else if (B <= -6.8e-31) {
        		tmp = -(sqrt((2.0 * (F * ((B * B) * (C - B))))) / t_0);
        	} else {
        		tmp = -sqrt((-16.0 * (A * (F * (C * C))))) / t_0;
        	}
        	return tmp;
        }
        
        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) - (4.0d0 * (a * c))
            if (b <= (-5.8d+102)) then
                tmp = (2.0d0 / b) * sqrt((c * f))
            else if (b <= (-6.8d-31)) then
                tmp = -(sqrt((2.0d0 * (f * ((b * b) * (c - b))))) / t_0)
            else
                tmp = -sqrt(((-16.0d0) * (a * (f * (c * c))))) / t_0
            end if
            code = tmp
        end function
        
        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.8e+102) {
        		tmp = (2.0 / B) * Math.sqrt((C * F));
        	} else if (B <= -6.8e-31) {
        		tmp = -(Math.sqrt((2.0 * (F * ((B * B) * (C - B))))) / t_0);
        	} else {
        		tmp = -Math.sqrt((-16.0 * (A * (F * (C * C))))) / t_0;
        	}
        	return tmp;
        }
        
        [A, C] = sort([A, C])
        def code(A, B, C, F):
        	t_0 = (B * B) - (4.0 * (A * C))
        	tmp = 0
        	if B <= -5.8e+102:
        		tmp = (2.0 / B) * math.sqrt((C * F))
        	elif B <= -6.8e-31:
        		tmp = -(math.sqrt((2.0 * (F * ((B * B) * (C - B))))) / t_0)
        	else:
        		tmp = -math.sqrt((-16.0 * (A * (F * (C * C))))) / t_0
        	return tmp
        
        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.8e+102)
        		tmp = Float64(Float64(2.0 / B) * sqrt(Float64(C * F)));
        	elseif (B <= -6.8e-31)
        		tmp = Float64(-Float64(sqrt(Float64(2.0 * Float64(F * Float64(Float64(B * B) * Float64(C - B))))) / t_0));
        	else
        		tmp = Float64(Float64(-sqrt(Float64(-16.0 * Float64(A * Float64(F * Float64(C * C)))))) / t_0);
        	end
        	return tmp
        end
        
        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.8e+102)
        		tmp = (2.0 / B) * sqrt((C * F));
        	elseif (B <= -6.8e-31)
        		tmp = -(sqrt((2.0 * (F * ((B * B) * (C - B))))) / t_0);
        	else
        		tmp = -sqrt((-16.0 * (A * (F * (C * C))))) / t_0;
        	end
        	tmp_2 = tmp;
        end
        
        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.8e+102], N[(N[(2.0 / B), $MachinePrecision] * N[Sqrt[N[(C * F), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -6.8e-31], (-N[(N[Sqrt[N[(2.0 * N[(F * N[(N[(B * B), $MachinePrecision] * N[(C - B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision]), N[((-N[Sqrt[N[(-16.0 * N[(A * N[(F * N[(C * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision]]]]
        
        \begin{array}{l}
        [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.8 \cdot 10^{+102}:\\
        \;\;\;\;\frac{2}{B} \cdot \sqrt{C \cdot F}\\
        
        \mathbf{elif}\;B \leq -6.8 \cdot 10^{-31}:\\
        \;\;\;\;-\frac{\sqrt{2 \cdot \left(F \cdot \left(\left(B \cdot B\right) \cdot \left(C - B\right)\right)\right)}}{t_0}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{-\sqrt{-16 \cdot \left(A \cdot \left(F \cdot \left(C \cdot C\right)\right)\right)}}{t_0}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if B < -5.8000000000000005e102

          1. Initial program 13.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. associate-*l*13.6%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}\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. unpow213.6%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(\color{blue}{B \cdot B} - 4 \cdot \left(A \cdot C\right)\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} \]
            3. +-commutative13.6%

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{-\sqrt{2 \cdot \left(F \cdot \left(B \cdot B - 4 \cdot \left(C \cdot A\right)\right)\right)} \cdot \sqrt{A + \left(C + \color{blue}{\mathsf{hypot}\left(B, A - C\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
            7. associate-+r+18.6%

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

              \[\leadsto \frac{-\sqrt{2 \cdot \left(F \cdot \left(B \cdot B - 4 \cdot \left(C \cdot A\right)\right)\right)} \cdot \sqrt{\color{blue}{\left(C + A\right)} + \mathsf{hypot}\left(B, A - C\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
            9. associate-+r+18.6%

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

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

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

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

              \[\leadsto \frac{\color{blue}{\sqrt{2} \cdot \sqrt{2}}}{B} \cdot \sqrt{C \cdot F} \]
            2. rem-square-sqrt5.0%

              \[\leadsto \frac{\color{blue}{2}}{B} \cdot \sqrt{C \cdot F} \]
          9. Simplified5.0%

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

          if -5.8000000000000005e102 < B < -6.8000000000000002e-31

          1. Initial program 40.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. associate-*l*40.9%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}\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. unpow240.9%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(\color{blue}{B \cdot B} - 4 \cdot \left(A \cdot C\right)\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} \]
            3. +-commutative40.9%

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

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

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

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

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

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

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

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

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

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

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

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

          if -6.8000000000000002e-31 < B

          1. Initial program 19.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. associate-*l*19.0%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}\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. unpow219.0%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(\color{blue}{B \cdot B} - 4 \cdot \left(A \cdot C\right)\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} \]
            3. +-commutative19.0%

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

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

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

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

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

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

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

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

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

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

        Alternative 18: 20.0% accurate, 5.0× speedup?

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

          1. Initial program 26.3%

            \[\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. associate-*l*26.3%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}\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. unpow226.3%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(\color{blue}{B \cdot B} - 4 \cdot \left(A \cdot C\right)\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} \]
            3. +-commutative26.3%

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

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

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

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

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

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

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

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

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

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

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

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

          if -2.2499999999999999e-29 < B < 3.09999999999999995e-25

          1. Initial program 16.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. associate-*l*16.9%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}\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. unpow216.9%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(\color{blue}{B \cdot B} - 4 \cdot \left(A \cdot C\right)\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} \]
            3. +-commutative16.9%

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

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

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

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

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

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

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

              \[\leadsto \frac{-\sqrt{-16 \cdot \left(A \cdot \left(\color{blue}{\left(C \cdot C\right)} \cdot F\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
          7. Simplified10.5%

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

          if 3.09999999999999995e-25 < B

          1. Initial program 22.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. associate-*l*22.4%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}\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. unpow222.4%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(\color{blue}{B \cdot B} - 4 \cdot \left(A \cdot C\right)\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} \]
            3. +-commutative22.4%

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 19: 15.9% accurate, 5.3× speedup?

        \[\begin{array}{l} [A, C] = \mathsf{sort}([A, C])\\ \\ \frac{-\sqrt{-16 \cdot \left(A \cdot \left(F \cdot \left(C \cdot C\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \end{array} \]
        NOTE: A and C should be sorted in increasing order before calling this function.
        (FPCore (A B C F)
         :precision binary64
         (/ (- (sqrt (* -16.0 (* A (* F (* C C)))))) (- (* B B) (* 4.0 (* A C)))))
        assert(A < C);
        double code(double A, double B, double C, double F) {
        	return -sqrt((-16.0 * (A * (F * (C * C))))) / ((B * B) - (4.0 * (A * C)));
        }
        
        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(((-16.0d0) * (a * (f * (c * c))))) / ((b * b) - (4.0d0 * (a * c)))
        end function
        
        assert A < C;
        public static double code(double A, double B, double C, double F) {
        	return -Math.sqrt((-16.0 * (A * (F * (C * C))))) / ((B * B) - (4.0 * (A * C)));
        }
        
        [A, C] = sort([A, C])
        def code(A, B, C, F):
        	return -math.sqrt((-16.0 * (A * (F * (C * C))))) / ((B * B) - (4.0 * (A * C)))
        
        A, C = sort([A, C])
        function code(A, B, C, F)
        	return Float64(Float64(-sqrt(Float64(-16.0 * Float64(A * Float64(F * Float64(C * C)))))) / Float64(Float64(B * B) - Float64(4.0 * Float64(A * C))))
        end
        
        A, C = num2cell(sort([A, C])){:}
        function tmp = code(A, B, C, F)
        	tmp = -sqrt((-16.0 * (A * (F * (C * C))))) / ((B * B) - (4.0 * (A * C)));
        end
        
        NOTE: A and C should be sorted in increasing order before calling this function.
        code[A_, B_, C_, F_] := N[((-N[Sqrt[N[(-16.0 * N[(A * N[(F * N[(C * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / N[(N[(B * B), $MachinePrecision] - N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
        
        \begin{array}{l}
        [A, C] = \mathsf{sort}([A, C])\\
        \\
        \frac{-\sqrt{-16 \cdot \left(A \cdot \left(F \cdot \left(C \cdot C\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
        \end{array}
        
        Derivation
        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. associate-*l*21.0%

            \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}\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. unpow221.0%

            \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(\color{blue}{B \cdot B} - 4 \cdot \left(A \cdot C\right)\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} \]
          3. +-commutative21.0%

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

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

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

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

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

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

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

            \[\leadsto \frac{-\sqrt{-16 \cdot \left(A \cdot \left(\color{blue}{\left(C \cdot C\right)} \cdot F\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
        7. Simplified6.5%

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

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

        Alternative 20: 9.1% accurate, 5.8× speedup?

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

          1. Initial program 20.7%

            \[\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. associate-*l*20.7%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}\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. unpow220.7%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(\color{blue}{B \cdot B} - 4 \cdot \left(A \cdot C\right)\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} \]
            3. +-commutative20.7%

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{-\sqrt{2 \cdot \left(F \cdot \left(B \cdot B - 4 \cdot \left(C \cdot A\right)\right)\right)} \cdot \sqrt{A + \left(C + \color{blue}{\mathsf{hypot}\left(B, A - C\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
            7. associate-+r+29.9%

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

              \[\leadsto \frac{-\sqrt{2 \cdot \left(F \cdot \left(B \cdot B - 4 \cdot \left(C \cdot A\right)\right)\right)} \cdot \sqrt{\color{blue}{\left(C + A\right)} + \mathsf{hypot}\left(B, A - C\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
            9. associate-+r+30.4%

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

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

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

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

              \[\leadsto \frac{\color{blue}{\sqrt{2} \cdot \sqrt{2}}}{B} \cdot \sqrt{C \cdot F} \]
            2. rem-square-sqrt3.5%

              \[\leadsto \frac{\color{blue}{2}}{B} \cdot \sqrt{C \cdot F} \]
          9. Simplified3.5%

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

          if -7.40000000000000053e-296 < B

          1. Initial program 21.3%

            \[\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. associate-*l*21.3%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}\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. unpow221.3%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(\color{blue}{B \cdot B} - 4 \cdot \left(A \cdot C\right)\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} \]
            3. +-commutative21.3%

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

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

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

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

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

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

            \[\leadsto \color{blue}{-2 \cdot \left(\sqrt{C \cdot F} \cdot \frac{1}{B}\right)} \]
          6. Step-by-step derivation
            1. un-div-inv3.4%

              \[\leadsto -2 \cdot \color{blue}{\frac{\sqrt{C \cdot F}}{B}} \]
            2. *-commutative3.4%

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

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

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

            \[\leadsto -2 \cdot \frac{\color{blue}{{\left(F \cdot C\right)}^{0.5}}}{B} \]
        3. Recombined 2 regimes into one program.
        4. Final simplification3.5%

          \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -7.4 \cdot 10^{-296}:\\ \;\;\;\;\frac{2}{B} \cdot \sqrt{C \cdot F}\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \frac{{\left(C \cdot F\right)}^{0.5}}{B}\\ \end{array} \]

        Alternative 21: 9.1% accurate, 5.8× speedup?

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

          1. Initial program 20.7%

            \[\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. associate-*l*20.7%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}\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. unpow220.7%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(\color{blue}{B \cdot B} - 4 \cdot \left(A \cdot C\right)\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} \]
            3. +-commutative20.7%

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{-\sqrt{2 \cdot \left(F \cdot \left(B \cdot B - 4 \cdot \left(C \cdot A\right)\right)\right)} \cdot \sqrt{A + \left(C + \color{blue}{\mathsf{hypot}\left(B, A - C\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
            7. associate-+r+29.9%

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

              \[\leadsto \frac{-\sqrt{2 \cdot \left(F \cdot \left(B \cdot B - 4 \cdot \left(C \cdot A\right)\right)\right)} \cdot \sqrt{\color{blue}{\left(C + A\right)} + \mathsf{hypot}\left(B, A - C\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
            9. associate-+r+30.4%

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

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

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

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

              \[\leadsto \frac{\color{blue}{\sqrt{2} \cdot \sqrt{2}}}{B} \cdot \sqrt{C \cdot F} \]
            2. rem-square-sqrt3.5%

              \[\leadsto \frac{\color{blue}{2}}{B} \cdot \sqrt{C \cdot F} \]
          9. Simplified3.5%

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

          if -7.40000000000000053e-296 < B

          1. Initial program 21.3%

            \[\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. associate-*l*21.3%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}\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. unpow221.3%

              \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(\color{blue}{B \cdot B} - 4 \cdot \left(A \cdot C\right)\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} \]
            3. +-commutative21.3%

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

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

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

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

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

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

            \[\leadsto \color{blue}{-2 \cdot \left(\sqrt{C \cdot F} \cdot \frac{1}{B}\right)} \]
          6. Step-by-step derivation
            1. un-div-inv3.4%

              \[\leadsto -2 \cdot \color{blue}{\frac{\sqrt{C \cdot F}}{B}} \]
            2. *-commutative3.4%

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

            \[\leadsto -2 \cdot \color{blue}{\frac{\sqrt{F \cdot C}}{B}} \]
        3. Recombined 2 regimes into one program.
        4. Final simplification3.5%

          \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -7.4 \cdot 10^{-296}:\\ \;\;\;\;\frac{2}{B} \cdot \sqrt{C \cdot F}\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \frac{\sqrt{C \cdot F}}{B}\\ \end{array} \]

        Alternative 22: 5.4% accurate, 5.9× speedup?

        \[\begin{array}{l} [A, C] = \mathsf{sort}([A, C])\\ \\ -2 \cdot \frac{\sqrt{C \cdot F}}{B} \end{array} \]
        NOTE: A and C should be sorted in increasing order before calling this function.
        (FPCore (A B C F) :precision binary64 (* -2.0 (/ (sqrt (* C F)) B)))
        assert(A < C);
        double code(double A, double B, double C, double F) {
        	return -2.0 * (sqrt((C * F)) / B);
        }
        
        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((c * f)) / b)
        end function
        
        assert A < C;
        public static double code(double A, double B, double C, double F) {
        	return -2.0 * (Math.sqrt((C * F)) / B);
        }
        
        [A, C] = sort([A, C])
        def code(A, B, C, F):
        	return -2.0 * (math.sqrt((C * F)) / B)
        
        A, C = sort([A, C])
        function code(A, B, C, F)
        	return Float64(-2.0 * Float64(sqrt(Float64(C * F)) / B))
        end
        
        A, C = num2cell(sort([A, C])){:}
        function tmp = code(A, B, C, F)
        	tmp = -2.0 * (sqrt((C * F)) / B);
        end
        
        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[(C * F), $MachinePrecision]], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]
        
        \begin{array}{l}
        [A, C] = \mathsf{sort}([A, C])\\
        \\
        -2 \cdot \frac{\sqrt{C \cdot F}}{B}
        \end{array}
        
        Derivation
        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. associate-*l*21.0%

            \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}\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. unpow221.0%

            \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(\color{blue}{B \cdot B} - 4 \cdot \left(A \cdot C\right)\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} \]
          3. +-commutative21.0%

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

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

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

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

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

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

          \[\leadsto \color{blue}{-2 \cdot \left(\sqrt{C \cdot F} \cdot \frac{1}{B}\right)} \]
        6. Step-by-step derivation
          1. un-div-inv2.2%

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

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

          \[\leadsto -2 \cdot \color{blue}{\frac{\sqrt{F \cdot C}}{B}} \]
        8. Final simplification2.2%

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

        Reproduce

        ?
        herbie shell --seed 2023187 
        (FPCore (A B C F)
          :name "ABCF->ab-angle a"
          :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))))