ABCF->ab-angle a

Percentage Accurate: 19.6% → 48.0%
Time: 28.8s
Alternatives: 18
Speedup: 4.9×

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

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

Initial Program: 19.6% 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: 48.0% accurate, 0.3× speedup?

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

\mathbf{elif}\;t_4 \leq -2 \cdot 10^{-216}:\\
\;\;\;\;\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(C + \mathsf{hypot}\left(B, C\right)\right)\right)} \cdot \frac{-1}{t_0}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 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))) < -inf.0

    1. Initial program 3.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*3.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. unpow23.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. +-commutative3.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. unpow23.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*3.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. unpow23.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. Simplified3.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-prod18.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. *-commutative18.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. *-commutative18.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+18.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}{A + \left(C + \sqrt{B \cdot B + {\left(A - C\right)}^{2}}\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
      5. unpow218.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 + \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-udef40.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+38.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}{\left(A + C\right) + \mathsf{hypot}\left(B, A - C\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
      8. +-commutative38.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}{\left(C + A\right)} + \mathsf{hypot}\left(B, A - C\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
      9. associate-+r+39.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-rr39.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 20.3%

      \[\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 -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))) < -2.0000000000000001e-216

    1. Initial program 96.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*96.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. unpow296.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. +-commutative96.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. unpow296.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*96.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. unpow296.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. Simplified96.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 78.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. unpow278.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. unpow278.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-def78.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. Simplified78.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)} \]
    7. Step-by-step derivation
      1. div-inv78.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(C + \mathsf{hypot}\left(B, C\right)\right)}\right) \cdot \frac{1}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
      2. associate-*l*78.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(C + \mathsf{hypot}\left(B, C\right)\right)\right)}}\right) \cdot \frac{1}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
      3. *-commutative78.7%

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

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

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

        \[\leadsto \left(-\sqrt{2 \cdot \left(\left(F \cdot \left(B \cdot B + -4 \cdot \color{blue}{\left(C \cdot A\right)}\right)\right) \cdot \left(C + \mathsf{hypot}\left(B, C\right)\right)\right)}\right) \cdot \frac{1}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
      7. cancel-sign-sub-inv78.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(C + \mathsf{hypot}\left(B, C\right)\right)\right)}\right) \cdot \frac{1}{\color{blue}{B \cdot B + \left(-4\right) \cdot \left(A \cdot C\right)}} \]
      8. metadata-eval78.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(C + \mathsf{hypot}\left(B, C\right)\right)\right)}\right) \cdot \frac{1}{B \cdot B + \color{blue}{-4} \cdot \left(A \cdot C\right)} \]
      9. *-commutative78.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(C + \mathsf{hypot}\left(B, C\right)\right)\right)}\right) \cdot \frac{1}{B \cdot B + -4 \cdot \color{blue}{\left(C \cdot A\right)}} \]
    8. Applied egg-rr78.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(C + \mathsf{hypot}\left(B, C\right)\right)\right)}\right) \cdot \frac{1}{B \cdot B + -4 \cdot \left(C \cdot A\right)}} \]

    if -2.0000000000000001e-216 < (/.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 12.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*12.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. unpow212.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. +-commutative12.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. unpow212.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*12.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. unpow212.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. Simplified12.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-prod16.7%

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

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

        \[\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+18.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. unpow218.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-udef26.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+24.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}{\left(A + C\right) + \mathsf{hypot}\left(B, A - C\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
      8. +-commutative24.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}{\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.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}{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.8%

      \[\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 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{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. unpow231.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 + \left(C + -0.5 \cdot \frac{\color{blue}{B \cdot B}}{A}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
    8. Simplified31.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}{\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.6%

        \[\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 1.6%

        \[\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-neg1.6%

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

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

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

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

          \[\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-def20.6%

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

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

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

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

      \[\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 -\infty:\\ \;\;\;\;\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}\;\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^{-216}:\\ \;\;\;\;\sqrt{2 \cdot \left(\left(F \cdot \left(B \cdot B + \left(A \cdot C\right) \cdot -4\right)\right) \cdot \left(C + \mathsf{hypot}\left(B, C\right)\right)\right)} \cdot \frac{-1}{B \cdot B + \left(A \cdot C\right) \cdot -4}\\ \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}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(\sqrt{A + \mathsf{hypot}\left(B, A\right)} \cdot \left(-\sqrt{F}\right)\right)\\ \end{array} \]

    Alternative 2: 42.1% accurate, 1.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)\\ t_1 := 2 \cdot \left(F \cdot t_0\right)\\ \mathbf{if}\;A \leq -1.16 \cdot 10^{+33}:\\ \;\;\;\;-\frac{\sqrt{t_1 \cdot \mathsf{fma}\left(2, C, -0.5 \cdot \frac{B \cdot B}{A}\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{t_1} \cdot \left(-\sqrt{C + \left(A + \mathsf{hypot}\left(B, A - 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)))) (t_1 (* 2.0 (* F t_0))))
       (if (<= A -1.16e+33)
         (- (/ (sqrt (* t_1 (fma 2.0 C (* -0.5 (/ (* B B) A))))) t_0))
         (/ (* (sqrt t_1) (- (sqrt (+ C (+ A (hypot 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 = 2.0 * (F * t_0);
    	double tmp;
    	if (A <= -1.16e+33) {
    		tmp = -(sqrt((t_1 * fma(2.0, C, (-0.5 * ((B * B) / A))))) / t_0);
    	} else {
    		tmp = (sqrt(t_1) * -sqrt((C + (A + hypot(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(2.0 * Float64(F * t_0))
    	tmp = 0.0
    	if (A <= -1.16e+33)
    		tmp = Float64(-Float64(sqrt(Float64(t_1 * fma(2.0, C, Float64(-0.5 * Float64(Float64(B * B) / A))))) / t_0));
    	else
    		tmp = Float64(Float64(sqrt(t_1) * Float64(-sqrt(Float64(C + Float64(A + hypot(B, Float64(A - C))))))) / t_0);
    	end
    	return 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[A, -1.16e+33], (-N[(N[Sqrt[N[(t$95$1 * N[(2.0 * C + N[(-0.5 * N[(N[(B * B), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision]), N[(N[(N[Sqrt[t$95$1], $MachinePrecision] * (-N[Sqrt[N[(C + N[(A + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $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)\\
    t_1 := 2 \cdot \left(F \cdot t_0\right)\\
    \mathbf{if}\;A \leq -1.16 \cdot 10^{+33}:\\
    \;\;\;\;-\frac{\sqrt{t_1 \cdot \mathsf{fma}\left(2, C, -0.5 \cdot \frac{B \cdot B}{A}\right)}}{t_0}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{\sqrt{t_1} \cdot \left(-\sqrt{C + \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}\right)}{t_0}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if A < -1.16000000000000001e33

      1. Initial program 4.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*4.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. unpow24.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. +-commutative4.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. unpow24.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*4.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. unpow24.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. Simplified4.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 30.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(2 \cdot C + -0.5 \cdot \frac{{B}^{2}}{A}\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
      5. Step-by-step derivation
        1. fma-def30.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}{\mathsf{fma}\left(2, C, -0.5 \cdot \frac{{B}^{2}}{A}\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
        2. unpow230.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 \mathsf{fma}\left(2, C, -0.5 \cdot \frac{\color{blue}{B \cdot B}}{A}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
      6. Simplified30.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}{\mathsf{fma}\left(2, C, -0.5 \cdot \frac{B \cdot B}{A}\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]

      if -1.16000000000000001e33 < A

      1. Initial program 25.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*25.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. unpow225.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. +-commutative25.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. unpow225.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*25.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. unpow225.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. Simplified25.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-prod30.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. *-commutative30.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. *-commutative30.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+31.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. unpow231.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-udef39.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+38.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. +-commutative38.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+38.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-rr38.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)} \]
    3. Recombined 2 regimes into one program.
    4. Final simplification36.3%

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

    Alternative 3: 40.0% accurate, 1.9× speedup?

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

      1. Initial program 13.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*13.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. unpow213.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. +-commutative13.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. unpow213.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*13.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. unpow213.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. Simplified13.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.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. *-commutative20.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. *-commutative20.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+20.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}{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.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 + \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-udef25.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+24.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. +-commutative24.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+25.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-rr25.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 B around inf 23.6%

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

          \[\leadsto \frac{-\sqrt{2 \cdot \left(F \cdot \color{blue}{\left(B \cdot B\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)} \]
      8. Simplified23.6%

        \[\leadsto \frac{-\sqrt{2 \cdot \color{blue}{\left(F \cdot \left(B \cdot B\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 -0.00339999999999999981 < B < 1.9999999999999999e-147

      1. Initial program 25.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*25.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. unpow225.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. +-commutative25.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. unpow225.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*25.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. unpow225.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. Simplified25.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-prod26.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. *-commutative26.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. *-commutative26.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+27.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. unpow227.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-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+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}{\left(A + C\right) + \mathsf{hypot}\left(B, A - C\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
        8. +-commutative30.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+31.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}{C + \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
      5. Applied egg-rr31.9%

        \[\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 25.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}{\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. unpow225.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 + \left(C + -0.5 \cdot \frac{\color{blue}{B \cdot B}}{A}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
      8. Simplified25.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}{\left(C + -0.5 \cdot \frac{B \cdot B}{A}\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]

      if 1.9999999999999999e-147 < B < 2.6000000000000001e-78

      1. Initial program 21.8%

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

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

          \[\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.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(\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.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(\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.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(\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.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(\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.8%

        \[\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 41.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-inv41.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*41.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. *-commutative41.2%

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

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

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

          \[\leadsto \left(-\sqrt{2 \cdot \left(\left(F \cdot \left(B \cdot B + -4 \cdot \color{blue}{\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)} \]
        7. cancel-sign-sub-inv41.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}{\color{blue}{B \cdot B + \left(-4\right) \cdot \left(A \cdot C\right)}} \]
        8. metadata-eval41.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 + \color{blue}{-4} \cdot \left(A \cdot C\right)} \]
        9. *-commutative41.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-rr41.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.6000000000000001e-78 < B < 1.7199999999999999e27

      1. Initial program 33.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*33.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. unpow233.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. +-commutative33.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. unpow233.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*33.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. unpow233.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. Simplified33.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.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(C + \sqrt{{B}^{2} + {C}^{2}}\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
      5. Step-by-step derivation
        1. unpow235.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(C + \sqrt{\color{blue}{B \cdot B} + {C}^{2}}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
        2. unpow235.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(C + \sqrt{B \cdot B + \color{blue}{C \cdot C}}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
        3. hypot-def44.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(C + \color{blue}{\mathsf{hypot}\left(B, C\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
      6. Simplified44.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(C + \mathsf{hypot}\left(B, C\right)\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]

      if 1.7199999999999999e27 < B

      1. Initial program 12.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. Simplified16.3%

          \[\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 18.9%

          \[\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-neg18.9%

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{\sqrt{F \cdot \left(C + \mathsf{hypot}\left(B, C\right)\right)} \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 -0.0034:\\ \;\;\;\;\frac{\sqrt{C + \left(A + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \left(-\sqrt{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 \cdot 10^{-147}:\\ \;\;\;\;\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 2.6 \cdot 10^{-78}:\\ \;\;\;\;\sqrt{2 \cdot \left(\left(F \cdot \left(B \cdot B + \left(A \cdot C\right) \cdot -4\right)\right) \cdot \left(2 \cdot C\right)\right)} \cdot \frac{-1}{B \cdot B + \left(A \cdot C\right) \cdot -4}\\ \mathbf{elif}\;B \leq 1.72 \cdot 10^{+27}:\\ \;\;\;\;\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{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(C + \mathsf{hypot}\left(B, C\right)\right)}\right)\\ \end{array} \]

      Alternative 4: 38.8% accurate, 2.0× speedup?

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

        1. Initial program 13.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*13.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. unpow213.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. +-commutative13.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. unpow213.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*13.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. unpow213.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. Simplified13.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.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. *-commutative20.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. *-commutative20.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+20.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}{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.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 + \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-udef25.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+24.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. +-commutative24.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+25.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-rr25.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 B around -inf 17.3%

          \[\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}{-1 \cdot B}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
        7. Step-by-step derivation
          1. mul-1-neg17.3%

            \[\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(-B\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
        8. Simplified17.3%

          \[\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(-B\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]

        if -74000 < B < 8.80000000000000068e-148

        1. Initial program 25.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*25.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. unpow225.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. +-commutative25.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. unpow225.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*25.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. unpow225.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. Simplified25.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-prod26.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. *-commutative26.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. *-commutative26.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+27.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. unpow227.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-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+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}{\left(A + C\right) + \mathsf{hypot}\left(B, A - C\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
          8. +-commutative30.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+31.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}{C + \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
        5. Applied egg-rr31.9%

          \[\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 25.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}{\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. unpow225.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 + \left(C + -0.5 \cdot \frac{\color{blue}{B \cdot B}}{A}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
        8. Simplified25.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}{\left(C + -0.5 \cdot \frac{B \cdot B}{A}\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]

        if 8.80000000000000068e-148 < B < 4.5000000000000003e-79

        1. Initial program 21.8%

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

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

            \[\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.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(\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.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(\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.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(\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.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(\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.8%

          \[\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 41.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-inv41.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*41.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. *-commutative41.2%

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

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

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

            \[\leadsto \left(-\sqrt{2 \cdot \left(\left(F \cdot \left(B \cdot B + -4 \cdot \color{blue}{\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)} \]
          7. cancel-sign-sub-inv41.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}{\color{blue}{B \cdot B + \left(-4\right) \cdot \left(A \cdot C\right)}} \]
          8. metadata-eval41.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 + \color{blue}{-4} \cdot \left(A \cdot C\right)} \]
          9. *-commutative41.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-rr41.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 4.5000000000000003e-79 < B < 1.26e13

        1. Initial program 33.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*33.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. unpow233.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. +-commutative33.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. unpow233.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*33.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. unpow233.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. Simplified33.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.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(C + \sqrt{{B}^{2} + {C}^{2}}\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
        5. Step-by-step derivation
          1. unpow235.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(C + \sqrt{\color{blue}{B \cdot B} + {C}^{2}}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
          2. unpow235.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(C + \sqrt{B \cdot B + \color{blue}{C \cdot C}}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
          3. hypot-def44.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(C + \color{blue}{\mathsf{hypot}\left(B, C\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
        6. Simplified44.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(C + \mathsf{hypot}\left(B, C\right)\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]

        if 1.26e13 < B

        1. Initial program 12.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. Simplified16.3%

            \[\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 18.9%

            \[\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-neg18.9%

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

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

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

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

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

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

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

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

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

        Alternative 5: 33.6% 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 := -0.5 \cdot \frac{B \cdot B}{A}\\ t_2 := 2 \cdot \left(F \cdot t_0\right)\\ t_3 := \sqrt{t_2}\\ \mathbf{if}\;C \leq -3.1 \cdot 10^{-83}:\\ \;\;\;\;-\frac{\sqrt{t_2 \cdot \mathsf{fma}\left(2, C, t_1\right)}}{t_0}\\ \mathbf{elif}\;C \leq -3.3 \cdot 10^{-300}:\\ \;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\ \mathbf{elif}\;C \leq 1.86 \cdot 10^{-112}:\\ \;\;\;\;\frac{\sqrt{C + \left(C + t_1\right)} \cdot \left(-t_3\right)}{t_0}\\ \mathbf{elif}\;C \leq 1.35 \cdot 10^{-49}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{B \cdot F}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{t_3 \cdot \left(-\sqrt{C + C}\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 (* -0.5 (/ (* B B) A)))
                (t_2 (* 2.0 (* F t_0)))
                (t_3 (sqrt t_2)))
           (if (<= C -3.1e-83)
             (- (/ (sqrt (* t_2 (fma 2.0 C t_1))) t_0))
             (if (<= C -3.3e-300)
               (* (sqrt 2.0) (- (sqrt (/ F B))))
               (if (<= C 1.86e-112)
                 (/ (* (sqrt (+ C (+ C t_1))) (- t_3)) t_0)
                 (if (<= C 1.35e-49)
                   (* (/ (sqrt 2.0) B) (- (sqrt (* B F))))
                   (/ (* t_3 (- (sqrt (+ 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 t_1 = -0.5 * ((B * B) / A);
        	double t_2 = 2.0 * (F * t_0);
        	double t_3 = sqrt(t_2);
        	double tmp;
        	if (C <= -3.1e-83) {
        		tmp = -(sqrt((t_2 * fma(2.0, C, t_1))) / t_0);
        	} else if (C <= -3.3e-300) {
        		tmp = sqrt(2.0) * -sqrt((F / B));
        	} else if (C <= 1.86e-112) {
        		tmp = (sqrt((C + (C + t_1))) * -t_3) / t_0;
        	} else if (C <= 1.35e-49) {
        		tmp = (sqrt(2.0) / B) * -sqrt((B * F));
        	} else {
        		tmp = (t_3 * -sqrt((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)))
        	t_1 = Float64(-0.5 * Float64(Float64(B * B) / A))
        	t_2 = Float64(2.0 * Float64(F * t_0))
        	t_3 = sqrt(t_2)
        	tmp = 0.0
        	if (C <= -3.1e-83)
        		tmp = Float64(-Float64(sqrt(Float64(t_2 * fma(2.0, C, t_1))) / t_0));
        	elseif (C <= -3.3e-300)
        		tmp = Float64(sqrt(2.0) * Float64(-sqrt(Float64(F / B))));
        	elseif (C <= 1.86e-112)
        		tmp = Float64(Float64(sqrt(Float64(C + Float64(C + t_1))) * Float64(-t_3)) / t_0);
        	elseif (C <= 1.35e-49)
        		tmp = Float64(Float64(sqrt(2.0) / B) * Float64(-sqrt(Float64(B * F))));
        	else
        		tmp = Float64(Float64(t_3 * Float64(-sqrt(Float64(C + C)))) / t_0);
        	end
        	return 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[(-0.5 * N[(N[(B * B), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(F * t$95$0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[t$95$2], $MachinePrecision]}, If[LessEqual[C, -3.1e-83], (-N[(N[Sqrt[N[(t$95$2 * N[(2.0 * C + t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision]), If[LessEqual[C, -3.3e-300], N[(N[Sqrt[2.0], $MachinePrecision] * (-N[Sqrt[N[(F / B), $MachinePrecision]], $MachinePrecision])), $MachinePrecision], If[LessEqual[C, 1.86e-112], N[(N[(N[Sqrt[N[(C + N[(C + t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-t$95$3)), $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[C, 1.35e-49], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B), $MachinePrecision] * (-N[Sqrt[N[(B * F), $MachinePrecision]], $MachinePrecision])), $MachinePrecision], N[(N[(t$95$3 * (-N[Sqrt[N[(C + C), $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 := -0.5 \cdot \frac{B \cdot B}{A}\\
        t_2 := 2 \cdot \left(F \cdot t_0\right)\\
        t_3 := \sqrt{t_2}\\
        \mathbf{if}\;C \leq -3.1 \cdot 10^{-83}:\\
        \;\;\;\;-\frac{\sqrt{t_2 \cdot \mathsf{fma}\left(2, C, t_1\right)}}{t_0}\\
        
        \mathbf{elif}\;C \leq -3.3 \cdot 10^{-300}:\\
        \;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\
        
        \mathbf{elif}\;C \leq 1.86 \cdot 10^{-112}:\\
        \;\;\;\;\frac{\sqrt{C + \left(C + t_1\right)} \cdot \left(-t_3\right)}{t_0}\\
        
        \mathbf{elif}\;C \leq 1.35 \cdot 10^{-49}:\\
        \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{B \cdot F}\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{t_3 \cdot \left(-\sqrt{C + C}\right)}{t_0}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 5 regimes
        2. if C < -3.09999999999999992e-83

          1. Initial program 8.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*8.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. unpow28.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. +-commutative8.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. unpow28.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*8.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. unpow28.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. Simplified8.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 -inf 7.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(2 \cdot C + -0.5 \cdot \frac{{B}^{2}}{A}\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
          5. Step-by-step derivation
            1. fma-def7.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}{\mathsf{fma}\left(2, C, -0.5 \cdot \frac{{B}^{2}}{A}\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
            2. unpow27.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 \mathsf{fma}\left(2, C, -0.5 \cdot \frac{\color{blue}{B \cdot B}}{A}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
          6. Simplified7.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}{\mathsf{fma}\left(2, C, -0.5 \cdot \frac{B \cdot B}{A}\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]

          if -3.09999999999999992e-83 < C < -3.3000000000000002e-300

          1. Initial program 38.8%

            \[\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*38.8%

              \[\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. unpow238.8%

              \[\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. +-commutative38.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(\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. unpow238.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(\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*38.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(\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. unpow238.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(\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. Simplified38.8%

            \[\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 31.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. unpow231.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. unpow231.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-def30.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(C + \color{blue}{\mathsf{hypot}\left(B, C\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
          6. Simplified30.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(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 21.7%

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

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

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

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

          if -3.3000000000000002e-300 < C < 1.86e-112

          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-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+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-udef27.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 + \color{blue}{\mathsf{hypot}\left(B, A - C\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
            7. associate-+r+27.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. +-commutative27.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+30.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-rr30.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.8%

            \[\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. 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{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. Simplified22.8%

            \[\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.86e-112 < C < 1.35e-49

          1. Initial program 1.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. Simplified1.6%

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

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

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

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

                \[\leadsto \sqrt{\left(A + \sqrt{\color{blue}{B \cdot B} + {A}^{2}}\right) \cdot F} \cdot \left(-\frac{\sqrt{2}}{B}\right) \]
              5. unpow22.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-def51.2%

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

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

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

            if 1.35e-49 < C

            1. Initial program 27.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*27.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. unpow227.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. +-commutative27.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. unpow227.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*27.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. unpow227.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. Simplified27.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-prod33.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. *-commutative33.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. *-commutative33.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+33.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}{A + \left(C + \sqrt{B \cdot B + {\left(A - C\right)}^{2}}\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
              5. unpow233.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 + \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-udef45.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+45.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. +-commutative45.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+46.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}{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.8%

              \[\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 46.5%

              \[\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)} \]
          3. Recombined 5 regimes into one program.
          4. Final simplification25.1%

            \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -3.1 \cdot 10^{-83}:\\ \;\;\;\;-\frac{\sqrt{\left(2 \cdot \left(F \cdot \left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right)\right)\right) \cdot \mathsf{fma}\left(2, C, -0.5 \cdot \frac{B \cdot B}{A}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \mathbf{elif}\;C \leq -3.3 \cdot 10^{-300}:\\ \;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\ \mathbf{elif}\;C \leq 1.86 \cdot 10^{-112}:\\ \;\;\;\;\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}\;C \leq 1.35 \cdot 10^{-49}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{B \cdot F}\right)\\ \mathbf{else}:\\ \;\;\;\;\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)}\\ \end{array} \]

          Alternative 6: 37.1% 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 := 2 \cdot t_1\\ \mathbf{if}\;A \leq -3.4 \cdot 10^{-43}:\\ \;\;\;\;-\frac{\sqrt{t_2 \cdot \mathsf{fma}\left(2, C, -0.5 \cdot \frac{B \cdot B}{A}\right)}}{t_0}\\ \mathbf{elif}\;A \leq 1.85 \cdot 10^{-288}:\\ \;\;\;\;\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{else}:\\ \;\;\;\;\frac{\sqrt{t_2} \cdot \left(-\sqrt{C + C}\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 (<= A -3.4e-43)
               (- (/ (sqrt (* t_2 (fma 2.0 C (* -0.5 (/ (* B B) A))))) t_0))
               (if (<= A 1.85e-288)
                 (* (sqrt (* 2.0 (* t_1 (+ C (+ A (hypot B (- A C))))))) (/ -1.0 t_0))
                 (/ (* (sqrt t_2) (- (sqrt (+ 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 t_1 = F * t_0;
          	double t_2 = 2.0 * t_1;
          	double tmp;
          	if (A <= -3.4e-43) {
          		tmp = -(sqrt((t_2 * fma(2.0, C, (-0.5 * ((B * B) / A))))) / t_0);
          	} else if (A <= 1.85e-288) {
          		tmp = sqrt((2.0 * (t_1 * (C + (A + hypot(B, (A - C))))))) * (-1.0 / t_0);
          	} else {
          		tmp = (sqrt(t_2) * -sqrt((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)))
          	t_1 = Float64(F * t_0)
          	t_2 = Float64(2.0 * t_1)
          	tmp = 0.0
          	if (A <= -3.4e-43)
          		tmp = Float64(-Float64(sqrt(Float64(t_2 * fma(2.0, C, Float64(-0.5 * Float64(Float64(B * B) / A))))) / t_0));
          	elseif (A <= 1.85e-288)
          		tmp = Float64(sqrt(Float64(2.0 * Float64(t_1 * Float64(C + Float64(A + hypot(B, Float64(A - C))))))) * Float64(-1.0 / t_0));
          	else
          		tmp = Float64(Float64(sqrt(t_2) * Float64(-sqrt(Float64(C + C)))) / t_0);
          	end
          	return 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[A, -3.4e-43], (-N[(N[Sqrt[N[(t$95$2 * N[(2.0 * C + N[(-0.5 * N[(N[(B * B), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision]), If[LessEqual[A, 1.85e-288], 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], N[(N[(N[Sqrt[t$95$2], $MachinePrecision] * (-N[Sqrt[N[(C + C), $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}\;A \leq -3.4 \cdot 10^{-43}:\\
          \;\;\;\;-\frac{\sqrt{t_2 \cdot \mathsf{fma}\left(2, C, -0.5 \cdot \frac{B \cdot B}{A}\right)}}{t_0}\\
          
          \mathbf{elif}\;A \leq 1.85 \cdot 10^{-288}:\\
          \;\;\;\;\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{else}:\\
          \;\;\;\;\frac{\sqrt{t_2} \cdot \left(-\sqrt{C + C}\right)}{t_0}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if A < -3.4000000000000001e-43

            1. Initial program 5.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*5.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. unpow25.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. +-commutative5.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. unpow25.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*5.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. unpow25.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. Simplified5.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 -inf 28.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 + -0.5 \cdot \frac{{B}^{2}}{A}\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
            5. Step-by-step derivation
              1. fma-def28.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}{\mathsf{fma}\left(2, C, -0.5 \cdot \frac{{B}^{2}}{A}\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
              2. unpow228.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 \mathsf{fma}\left(2, C, -0.5 \cdot \frac{\color{blue}{B \cdot B}}{A}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
            6. Simplified28.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}{\mathsf{fma}\left(2, C, -0.5 \cdot \frac{B \cdot B}{A}\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]

            if -3.4000000000000001e-43 < A < 1.85e-288

            1. Initial program 38.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*38.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. unpow238.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. +-commutative38.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. unpow238.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*38.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. unpow238.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. Simplified38.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. div-inv38.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(\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-rr40.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(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 1.85e-288 < A

            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. Step-by-step derivation
              1. sqrt-prod26.3%

                \[\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. *-commutative26.3%

                \[\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. *-commutative26.3%

                \[\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+27.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. unpow227.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-udef36.7%

                \[\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+35.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}{\left(A + C\right) + \mathsf{hypot}\left(B, A - C\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
              8. +-commutative35.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}{\left(C + A\right)} + \mathsf{hypot}\left(B, A - C\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
              9. associate-+r+35.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-rr35.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 9.8%

              \[\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)} \]
          3. Recombined 3 regimes into one program.
          4. Final simplification22.1%

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

          Alternative 7: 32.0% 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)\\ \mathbf{if}\;C \leq -6.5 \cdot 10^{-116}:\\ \;\;\;\;\sqrt{2 \cdot \left(-8 \cdot \left(A \cdot \left(F \cdot \left(C \cdot C\right)\right)\right)\right)} \cdot \frac{-1}{\mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)}\\ \mathbf{elif}\;C \leq 2.3 \cdot 10^{-296} \lor \neg \left(C \leq 2.75 \cdot 10^{-111}\right) \land C \leq 4.5 \cdot 10^{-50}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{B \cdot F}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2 \cdot \left(F \cdot t_0\right)} \cdot \left(-\sqrt{C + C}\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 (<= C -6.5e-116)
               (*
                (sqrt (* 2.0 (* -8.0 (* A (* F (* C C))))))
                (/ -1.0 (fma B B (* C (* A -4.0)))))
               (if (or (<= C 2.3e-296) (and (not (<= C 2.75e-111)) (<= C 4.5e-50)))
                 (* (/ (sqrt 2.0) B) (- (sqrt (* B F))))
                 (/ (* (sqrt (* 2.0 (* F t_0))) (- (sqrt (+ 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 (C <= -6.5e-116) {
          		tmp = sqrt((2.0 * (-8.0 * (A * (F * (C * C)))))) * (-1.0 / fma(B, B, (C * (A * -4.0))));
          	} else if ((C <= 2.3e-296) || (!(C <= 2.75e-111) && (C <= 4.5e-50))) {
          		tmp = (sqrt(2.0) / B) * -sqrt((B * F));
          	} else {
          		tmp = (sqrt((2.0 * (F * t_0))) * -sqrt((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 (C <= -6.5e-116)
          		tmp = Float64(sqrt(Float64(2.0 * Float64(-8.0 * Float64(A * Float64(F * Float64(C * C)))))) * Float64(-1.0 / fma(B, B, Float64(C * Float64(A * -4.0)))));
          	elseif ((C <= 2.3e-296) || (!(C <= 2.75e-111) && (C <= 4.5e-50)))
          		tmp = Float64(Float64(sqrt(2.0) / B) * Float64(-sqrt(Float64(B * F))));
          	else
          		tmp = Float64(Float64(sqrt(Float64(2.0 * Float64(F * t_0))) * Float64(-sqrt(Float64(C + C)))) / t_0);
          	end
          	return 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[C, -6.5e-116], N[(N[Sqrt[N[(2.0 * N[(-8.0 * N[(A * N[(F * N[(C * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(-1.0 / N[(B * B + N[(C * N[(A * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[C, 2.3e-296], And[N[Not[LessEqual[C, 2.75e-111]], $MachinePrecision], LessEqual[C, 4.5e-50]]], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B), $MachinePrecision] * (-N[Sqrt[N[(B * F), $MachinePrecision]], $MachinePrecision])), $MachinePrecision], N[(N[(N[Sqrt[N[(2.0 * N[(F * t$95$0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-N[Sqrt[N[(C + C), $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}\;C \leq -6.5 \cdot 10^{-116}:\\
          \;\;\;\;\sqrt{2 \cdot \left(-8 \cdot \left(A \cdot \left(F \cdot \left(C \cdot C\right)\right)\right)\right)} \cdot \frac{-1}{\mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)}\\
          
          \mathbf{elif}\;C \leq 2.3 \cdot 10^{-296} \lor \neg \left(C \leq 2.75 \cdot 10^{-111}\right) \land C \leq 4.5 \cdot 10^{-50}:\\
          \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{B \cdot F}\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{\sqrt{2 \cdot \left(F \cdot t_0\right)} \cdot \left(-\sqrt{C + C}\right)}{t_0}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if C < -6.5000000000000001e-116

            1. Initial program 10.8%

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

                \[\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. Step-by-step derivation
                1. div-inv13.1%

                  \[\leadsto \color{blue}{\left(-\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)}\right) \cdot \frac{1}{\mathsf{fma}\left(C, A \cdot -4, B \cdot B\right)}} \]
                2. associate-*l*13.2%

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

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

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

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

                  \[\leadsto -\sqrt{2 \cdot \left(-8 \cdot \left(A \cdot \left(\color{blue}{\left(C \cdot C\right)} \cdot F\right)\right)\right)} \cdot \frac{1}{\mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)} \]
              7. Simplified7.1%

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

              if -6.5000000000000001e-116 < C < 2.30000000000000004e-296 or 2.7499999999999999e-111 < C < 4.49999999999999962e-50

              1. Initial program 27.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. Simplified27.8%

                  \[\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 15.7%

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

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

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

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

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

                    \[\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-def29.8%

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

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

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

                if 2.30000000000000004e-296 < C < 2.7499999999999999e-111 or 4.49999999999999962e-50 < C

                1. Initial program 25.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*25.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. unpow225.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. +-commutative25.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. unpow225.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*25.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. unpow225.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. Simplified25.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-prod29.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. *-commutative29.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. *-commutative29.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+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}{A + \left(C + \sqrt{B \cdot B + {\left(A - C\right)}^{2}}\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                  5. unpow229.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-udef39.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 + \color{blue}{\mathsf{hypot}\left(B, A - C\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                  7. associate-+r+39.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. +-commutative39.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+41.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-rr41.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 35.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)} \]
              3. Recombined 3 regimes into one program.
              4. Final simplification23.4%

                \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -6.5 \cdot 10^{-116}:\\ \;\;\;\;\sqrt{2 \cdot \left(-8 \cdot \left(A \cdot \left(F \cdot \left(C \cdot C\right)\right)\right)\right)} \cdot \frac{-1}{\mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)}\\ \mathbf{elif}\;C \leq 2.3 \cdot 10^{-296} \lor \neg \left(C \leq 2.75 \cdot 10^{-111}\right) \land C \leq 4.5 \cdot 10^{-50}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{B \cdot F}\right)\\ \mathbf{else}:\\ \;\;\;\;\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)}\\ \end{array} \]

              Alternative 8: 37.1% 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 := B \cdot B + \left(A \cdot C\right) \cdot -4\\ t_2 := 2 \cdot \left(F \cdot t_0\right)\\ \mathbf{if}\;A \leq -2.8 \cdot 10^{-43}:\\ \;\;\;\;-\frac{\sqrt{t_2 \cdot \mathsf{fma}\left(2, C, -0.5 \cdot \frac{B \cdot B}{A}\right)}}{t_0}\\ \mathbf{elif}\;A \leq 4.6 \cdot 10^{-288}:\\ \;\;\;\;\sqrt{2 \cdot \left(\left(F \cdot t_1\right) \cdot \left(C + \mathsf{hypot}\left(B, C\right)\right)\right)} \cdot \frac{-1}{t_1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{t_2} \cdot \left(-\sqrt{C + C}\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 (+ (* B B) (* (* A C) -4.0)))
                      (t_2 (* 2.0 (* F t_0))))
                 (if (<= A -2.8e-43)
                   (- (/ (sqrt (* t_2 (fma 2.0 C (* -0.5 (/ (* B B) A))))) t_0))
                   (if (<= A 4.6e-288)
                     (* (sqrt (* 2.0 (* (* F t_1) (+ C (hypot B C))))) (/ -1.0 t_1))
                     (/ (* (sqrt t_2) (- (sqrt (+ 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 t_1 = (B * B) + ((A * C) * -4.0);
              	double t_2 = 2.0 * (F * t_0);
              	double tmp;
              	if (A <= -2.8e-43) {
              		tmp = -(sqrt((t_2 * fma(2.0, C, (-0.5 * ((B * B) / A))))) / t_0);
              	} else if (A <= 4.6e-288) {
              		tmp = sqrt((2.0 * ((F * t_1) * (C + hypot(B, C))))) * (-1.0 / t_1);
              	} else {
              		tmp = (sqrt(t_2) * -sqrt((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)))
              	t_1 = Float64(Float64(B * B) + Float64(Float64(A * C) * -4.0))
              	t_2 = Float64(2.0 * Float64(F * t_0))
              	tmp = 0.0
              	if (A <= -2.8e-43)
              		tmp = Float64(-Float64(sqrt(Float64(t_2 * fma(2.0, C, Float64(-0.5 * Float64(Float64(B * B) / A))))) / t_0));
              	elseif (A <= 4.6e-288)
              		tmp = Float64(sqrt(Float64(2.0 * Float64(Float64(F * t_1) * Float64(C + hypot(B, C))))) * Float64(-1.0 / t_1));
              	else
              		tmp = Float64(Float64(sqrt(t_2) * Float64(-sqrt(Float64(C + C)))) / t_0);
              	end
              	return 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[(B * B), $MachinePrecision] + N[(N[(A * C), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(F * t$95$0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -2.8e-43], (-N[(N[Sqrt[N[(t$95$2 * N[(2.0 * C + N[(-0.5 * N[(N[(B * B), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision]), If[LessEqual[A, 4.6e-288], N[(N[Sqrt[N[(2.0 * N[(N[(F * t$95$1), $MachinePrecision] * N[(C + N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(-1.0 / t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[t$95$2], $MachinePrecision] * (-N[Sqrt[N[(C + C), $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 := B \cdot B + \left(A \cdot C\right) \cdot -4\\
              t_2 := 2 \cdot \left(F \cdot t_0\right)\\
              \mathbf{if}\;A \leq -2.8 \cdot 10^{-43}:\\
              \;\;\;\;-\frac{\sqrt{t_2 \cdot \mathsf{fma}\left(2, C, -0.5 \cdot \frac{B \cdot B}{A}\right)}}{t_0}\\
              
              \mathbf{elif}\;A \leq 4.6 \cdot 10^{-288}:\\
              \;\;\;\;\sqrt{2 \cdot \left(\left(F \cdot t_1\right) \cdot \left(C + \mathsf{hypot}\left(B, C\right)\right)\right)} \cdot \frac{-1}{t_1}\\
              
              \mathbf{else}:\\
              \;\;\;\;\frac{\sqrt{t_2} \cdot \left(-\sqrt{C + C}\right)}{t_0}\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 3 regimes
              2. if A < -2.7999999999999998e-43

                1. Initial program 5.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*5.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. unpow25.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. +-commutative5.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. unpow25.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*5.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. unpow25.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. Simplified5.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 -inf 28.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 + -0.5 \cdot \frac{{B}^{2}}{A}\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                5. Step-by-step derivation
                  1. fma-def28.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}{\mathsf{fma}\left(2, C, -0.5 \cdot \frac{{B}^{2}}{A}\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                  2. unpow228.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 \mathsf{fma}\left(2, C, -0.5 \cdot \frac{\color{blue}{B \cdot B}}{A}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                6. Simplified28.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}{\mathsf{fma}\left(2, C, -0.5 \cdot \frac{B \cdot B}{A}\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]

                if -2.7999999999999998e-43 < A < 4.6e-288

                1. Initial program 38.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*38.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. unpow238.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. +-commutative38.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. unpow238.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*38.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. unpow238.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. Simplified38.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 38.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(C + \sqrt{{B}^{2} + {C}^{2}}\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                5. Step-by-step derivation
                  1. unpow238.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(C + \sqrt{\color{blue}{B \cdot B} + {C}^{2}}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                  2. unpow238.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(C + \sqrt{B \cdot B + \color{blue}{C \cdot C}}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                  3. hypot-def40.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. Simplified40.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. Step-by-step derivation
                  1. div-inv40.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(C + \mathsf{hypot}\left(B, C\right)\right)}\right) \cdot \frac{1}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
                  2. associate-*l*40.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(C + \mathsf{hypot}\left(B, C\right)\right)\right)}}\right) \cdot \frac{1}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                  3. *-commutative40.2%

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

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

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

                    \[\leadsto \left(-\sqrt{2 \cdot \left(\left(F \cdot \left(B \cdot B + -4 \cdot \color{blue}{\left(C \cdot A\right)}\right)\right) \cdot \left(C + \mathsf{hypot}\left(B, C\right)\right)\right)}\right) \cdot \frac{1}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                  7. cancel-sign-sub-inv40.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(C + \mathsf{hypot}\left(B, C\right)\right)\right)}\right) \cdot \frac{1}{\color{blue}{B \cdot B + \left(-4\right) \cdot \left(A \cdot C\right)}} \]
                  8. metadata-eval40.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(C + \mathsf{hypot}\left(B, C\right)\right)\right)}\right) \cdot \frac{1}{B \cdot B + \color{blue}{-4} \cdot \left(A \cdot C\right)} \]
                  9. *-commutative40.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(C + \mathsf{hypot}\left(B, C\right)\right)\right)}\right) \cdot \frac{1}{B \cdot B + -4 \cdot \color{blue}{\left(C \cdot A\right)}} \]
                8. Applied egg-rr40.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(C + \mathsf{hypot}\left(B, C\right)\right)\right)}\right) \cdot \frac{1}{B \cdot B + -4 \cdot \left(C \cdot A\right)}} \]

                if 4.6e-288 < A

                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. Step-by-step derivation
                  1. sqrt-prod26.3%

                    \[\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. *-commutative26.3%

                    \[\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. *-commutative26.3%

                    \[\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+27.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. unpow227.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-udef36.7%

                    \[\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+35.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}{\left(A + C\right) + \mathsf{hypot}\left(B, A - C\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                  8. +-commutative35.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}{\left(C + A\right)} + \mathsf{hypot}\left(B, A - C\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                  9. associate-+r+35.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-rr35.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 9.8%

                  \[\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)} \]
              3. Recombined 3 regimes into one program.
              4. Final simplification22.1%

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

              Alternative 9: 33.3% accurate, 2.8× speedup?

              \[\begin{array}{l} [A, C] = \mathsf{sort}([A, C])\\ \\ \begin{array}{l} \mathbf{if}\;B \leq -5.9 \cdot 10^{+31}:\\ \;\;\;\;2 \cdot \left(\sqrt{C \cdot F} \cdot \frac{1}{B}\right)\\ \mathbf{elif}\;B \leq 2 \cdot 10^{-30}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(F \cdot \left(\left(2 \cdot C\right) \cdot \mathsf{fma}\left(B, 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}}{B} \cdot \left(-\sqrt{B \cdot F}\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
               (if (<= B -5.9e+31)
                 (* 2.0 (* (sqrt (* C F)) (/ 1.0 B)))
                 (if (<= B 2e-30)
                   (/
                    (- (sqrt (* 2.0 (* F (* (* 2.0 C) (fma B B (* (* A C) -4.0)))))))
                    (- (* B B) (* 4.0 (* A C))))
                   (* (/ (sqrt 2.0) B) (- (sqrt (* B F)))))))
              assert(A < C);
              double code(double A, double B, double C, double F) {
              	double tmp;
              	if (B <= -5.9e+31) {
              		tmp = 2.0 * (sqrt((C * F)) * (1.0 / B));
              	} else if (B <= 2e-30) {
              		tmp = -sqrt((2.0 * (F * ((2.0 * C) * fma(B, B, ((A * C) * -4.0)))))) / ((B * B) - (4.0 * (A * C)));
              	} else {
              		tmp = (sqrt(2.0) / B) * -sqrt((B * F));
              	}
              	return tmp;
              }
              
              A, C = sort([A, C])
              function code(A, B, C, F)
              	tmp = 0.0
              	if (B <= -5.9e+31)
              		tmp = Float64(2.0 * Float64(sqrt(Float64(C * F)) * Float64(1.0 / B)));
              	elseif (B <= 2e-30)
              		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(F * Float64(Float64(2.0 * C) * fma(B, B, Float64(Float64(A * C) * -4.0))))))) / Float64(Float64(B * B) - Float64(4.0 * Float64(A * C))));
              	else
              		tmp = Float64(Float64(sqrt(2.0) / B) * Float64(-sqrt(Float64(B * F))));
              	end
              	return tmp
              end
              
              NOTE: A and C should be sorted in increasing order before calling this function.
              code[A_, B_, C_, F_] := If[LessEqual[B, -5.9e+31], N[(2.0 * N[(N[Sqrt[N[(C * F), $MachinePrecision]], $MachinePrecision] * N[(1.0 / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2e-30], N[((-N[Sqrt[N[(2.0 * N[(F * N[(N[(2.0 * C), $MachinePrecision] * N[(B * B + N[(N[(A * C), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / N[(N[(B * B), $MachinePrecision] - N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B), $MachinePrecision] * (-N[Sqrt[N[(B * F), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]]]
              
              \begin{array}{l}
              [A, C] = \mathsf{sort}([A, C])\\
              \\
              \begin{array}{l}
              \mathbf{if}\;B \leq -5.9 \cdot 10^{+31}:\\
              \;\;\;\;2 \cdot \left(\sqrt{C \cdot F} \cdot \frac{1}{B}\right)\\
              
              \mathbf{elif}\;B \leq 2 \cdot 10^{-30}:\\
              \;\;\;\;\frac{-\sqrt{2 \cdot \left(F \cdot \left(\left(2 \cdot C\right) \cdot \mathsf{fma}\left(B, 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}}{B} \cdot \left(-\sqrt{B \cdot F}\right)\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 3 regimes
              2. if B < -5.9000000000000004e31

                1. Initial program 9.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*9.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. unpow29.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. +-commutative9.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. unpow29.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*9.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. unpow29.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. Simplified9.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 2.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(2 \cdot C\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                5. Taylor expanded in B around -inf 3.8%

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

                if -5.9000000000000004e31 < B < 2e-30

                1. Initial program 26.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*26.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. unpow226.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. +-commutative26.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. unpow226.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*26.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. unpow226.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. Simplified26.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 -inf 23.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. *-un-lft-identity23.2%

                    \[\leadsto \frac{-\color{blue}{1 \cdot \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)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                  2. associate-*l*23.2%

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

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

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

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

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

                  \[\leadsto \frac{-\color{blue}{1 \cdot \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)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                7. Step-by-step derivation
                  1. *-lft-identity23.2%

                    \[\leadsto \frac{-\color{blue}{\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)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                  2. associate-*l*22.8%

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

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

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

                if 2e-30 < B

                1. Initial program 16.5%

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

                    \[\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 19.3%

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

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

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

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

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

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

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

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

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

                  \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -5.9 \cdot 10^{+31}:\\ \;\;\;\;2 \cdot \left(\sqrt{C \cdot F} \cdot \frac{1}{B}\right)\\ \mathbf{elif}\;B \leq 2 \cdot 10^{-30}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(F \cdot \left(\left(2 \cdot C\right) \cdot \mathsf{fma}\left(B, 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}}{B} \cdot \left(-\sqrt{B \cdot F}\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)\\ \mathbf{if}\;B \leq -1.6 \cdot 10^{+31}:\\ \;\;\;\;2 \cdot \left(\sqrt{C \cdot F} \cdot \frac{1}{B}\right)\\ \mathbf{elif}\;B \leq 2.4 \cdot 10^{-35}:\\ \;\;\;\;\frac{-\sqrt{\left(2 \cdot \left(F \cdot t_0\right)\right) \cdot \left(2 \cdot C\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{B \cdot F}\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.6e+31)
                     (* 2.0 (* (sqrt (* C F)) (/ 1.0 B)))
                     (if (<= B 2.4e-35)
                       (/ (- (sqrt (* (* 2.0 (* F t_0)) (* 2.0 C)))) t_0)
                       (* (/ (sqrt 2.0) B) (- (sqrt (* B F))))))))
                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.6e+31) {
                		tmp = 2.0 * (sqrt((C * F)) * (1.0 / B));
                	} else if (B <= 2.4e-35) {
                		tmp = -sqrt(((2.0 * (F * t_0)) * (2.0 * C))) / t_0;
                	} else {
                		tmp = (sqrt(2.0) / B) * -sqrt((B * F));
                	}
                	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 <= (-1.6d+31)) then
                        tmp = 2.0d0 * (sqrt((c * f)) * (1.0d0 / b))
                    else if (b <= 2.4d-35) then
                        tmp = -sqrt(((2.0d0 * (f * t_0)) * (2.0d0 * c))) / t_0
                    else
                        tmp = (sqrt(2.0d0) / b) * -sqrt((b * f))
                    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 <= -1.6e+31) {
                		tmp = 2.0 * (Math.sqrt((C * F)) * (1.0 / B));
                	} else if (B <= 2.4e-35) {
                		tmp = -Math.sqrt(((2.0 * (F * t_0)) * (2.0 * C))) / t_0;
                	} else {
                		tmp = (Math.sqrt(2.0) / B) * -Math.sqrt((B * F));
                	}
                	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.6e+31:
                		tmp = 2.0 * (math.sqrt((C * F)) * (1.0 / B))
                	elif B <= 2.4e-35:
                		tmp = -math.sqrt(((2.0 * (F * t_0)) * (2.0 * C))) / t_0
                	else:
                		tmp = (math.sqrt(2.0) / B) * -math.sqrt((B * F))
                	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.6e+31)
                		tmp = Float64(2.0 * Float64(sqrt(Float64(C * F)) * Float64(1.0 / B)));
                	elseif (B <= 2.4e-35)
                		tmp = Float64(Float64(-sqrt(Float64(Float64(2.0 * Float64(F * t_0)) * Float64(2.0 * C)))) / t_0);
                	else
                		tmp = Float64(Float64(sqrt(2.0) / B) * Float64(-sqrt(Float64(B * F))));
                	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.6e+31)
                		tmp = 2.0 * (sqrt((C * F)) * (1.0 / B));
                	elseif (B <= 2.4e-35)
                		tmp = -sqrt(((2.0 * (F * t_0)) * (2.0 * C))) / t_0;
                	else
                		tmp = (sqrt(2.0) / B) * -sqrt((B * F));
                	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.6e+31], N[(2.0 * N[(N[Sqrt[N[(C * F), $MachinePrecision]], $MachinePrecision] * N[(1.0 / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.4e-35], N[((-N[Sqrt[N[(N[(2.0 * N[(F * t$95$0), $MachinePrecision]), $MachinePrecision] * N[(2.0 * C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B), $MachinePrecision] * (-N[Sqrt[N[(B * F), $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.6 \cdot 10^{+31}:\\
                \;\;\;\;2 \cdot \left(\sqrt{C \cdot F} \cdot \frac{1}{B}\right)\\
                
                \mathbf{elif}\;B \leq 2.4 \cdot 10^{-35}:\\
                \;\;\;\;\frac{-\sqrt{\left(2 \cdot \left(F \cdot t_0\right)\right) \cdot \left(2 \cdot C\right)}}{t_0}\\
                
                \mathbf{else}:\\
                \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{B \cdot F}\right)\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 3 regimes
                2. if B < -1.6e31

                  1. Initial program 9.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*9.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. unpow29.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. +-commutative9.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. unpow29.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*9.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. unpow29.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. Simplified9.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 2.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(2 \cdot C\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                  5. Taylor expanded in B around -inf 3.8%

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

                  if -1.6e31 < B < 2.4000000000000001e-35

                  1. Initial program 26.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*26.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. unpow226.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. +-commutative26.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. unpow226.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*26.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. unpow226.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. Simplified26.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 23.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(2 \cdot C\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]

                  if 2.4000000000000001e-35 < B

                  1. Initial program 16.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. Simplified20.8%

                      \[\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 19.1%

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

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

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

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

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

                        \[\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-def49.8%

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

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

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

                    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -1.6 \cdot 10^{+31}:\\ \;\;\;\;2 \cdot \left(\sqrt{C \cdot F} \cdot \frac{1}{B}\right)\\ \mathbf{elif}\;B \leq 2.4 \cdot 10^{-35}:\\ \;\;\;\;\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}}{B} \cdot \left(-\sqrt{B \cdot F}\right)\\ \end{array} \]

                  Alternative 11: 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)\\ \mathbf{if}\;B \leq -3 \cdot 10^{+32}:\\ \;\;\;\;2 \cdot \left(\sqrt{C \cdot F} \cdot \frac{1}{B}\right)\\ \mathbf{elif}\;B \leq 8.5 \cdot 10^{-35}:\\ \;\;\;\;\frac{-\sqrt{\left(2 \cdot \left(F \cdot t_0\right)\right) \cdot \left(2 \cdot C\right)}}{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)))))
                     (if (<= B -3e+32)
                       (* 2.0 (* (sqrt (* C F)) (/ 1.0 B)))
                       (if (<= B 8.5e-35)
                         (/ (- (sqrt (* (* 2.0 (* F t_0)) (* 2.0 C)))) 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 tmp;
                  	if (B <= -3e+32) {
                  		tmp = 2.0 * (sqrt((C * F)) * (1.0 / B));
                  	} else if (B <= 8.5e-35) {
                  		tmp = -sqrt(((2.0 * (F * t_0)) * (2.0 * C))) / 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) :: tmp
                      t_0 = (b * b) - (4.0d0 * (a * c))
                      if (b <= (-3d+32)) then
                          tmp = 2.0d0 * (sqrt((c * f)) * (1.0d0 / b))
                      else if (b <= 8.5d-35) then
                          tmp = -sqrt(((2.0d0 * (f * t_0)) * (2.0d0 * c))) / 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 tmp;
                  	if (B <= -3e+32) {
                  		tmp = 2.0 * (Math.sqrt((C * F)) * (1.0 / B));
                  	} else if (B <= 8.5e-35) {
                  		tmp = -Math.sqrt(((2.0 * (F * t_0)) * (2.0 * C))) / 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))
                  	tmp = 0
                  	if B <= -3e+32:
                  		tmp = 2.0 * (math.sqrt((C * F)) * (1.0 / B))
                  	elif B <= 8.5e-35:
                  		tmp = -math.sqrt(((2.0 * (F * t_0)) * (2.0 * C))) / 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)))
                  	tmp = 0.0
                  	if (B <= -3e+32)
                  		tmp = Float64(2.0 * Float64(sqrt(Float64(C * F)) * Float64(1.0 / B)));
                  	elseif (B <= 8.5e-35)
                  		tmp = Float64(Float64(-sqrt(Float64(Float64(2.0 * Float64(F * t_0)) * Float64(2.0 * C)))) / 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));
                  	tmp = 0.0;
                  	if (B <= -3e+32)
                  		tmp = 2.0 * (sqrt((C * F)) * (1.0 / B));
                  	elseif (B <= 8.5e-35)
                  		tmp = -sqrt(((2.0 * (F * t_0)) * (2.0 * C))) / 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]}, If[LessEqual[B, -3e+32], N[(2.0 * N[(N[Sqrt[N[(C * F), $MachinePrecision]], $MachinePrecision] * N[(1.0 / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 8.5e-35], N[((-N[Sqrt[N[(N[(2.0 * N[(F * t$95$0), $MachinePrecision]), $MachinePrecision] * N[(2.0 * C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $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)\\
                  \mathbf{if}\;B \leq -3 \cdot 10^{+32}:\\
                  \;\;\;\;2 \cdot \left(\sqrt{C \cdot F} \cdot \frac{1}{B}\right)\\
                  
                  \mathbf{elif}\;B \leq 8.5 \cdot 10^{-35}:\\
                  \;\;\;\;\frac{-\sqrt{\left(2 \cdot \left(F \cdot t_0\right)\right) \cdot \left(2 \cdot C\right)}}{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 < -3e32

                    1. Initial program 9.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*9.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. unpow29.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. +-commutative9.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. unpow29.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*9.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. unpow29.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. Simplified9.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 2.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(2 \cdot C\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                    5. Taylor expanded in B around -inf 3.8%

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

                    if -3e32 < B < 8.5000000000000001e-35

                    1. Initial program 26.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*26.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. unpow226.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. +-commutative26.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. unpow226.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*26.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. unpow226.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. Simplified26.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 23.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(2 \cdot C\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]

                    if 8.5000000000000001e-35 < B

                    1. Initial program 16.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*16.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. unpow216.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. +-commutative16.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. unpow216.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*16.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. unpow216.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. Simplified16.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 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 \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. 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(C + \sqrt{\color{blue}{B \cdot B} + {C}^{2}}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                      2. 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(C + \sqrt{B \cdot B + \color{blue}{C \cdot C}}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                      3. hypot-def18.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(C + \color{blue}{\mathsf{hypot}\left(B, C\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                    6. Simplified18.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(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 45.3%

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

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

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

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

                    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -3 \cdot 10^{+32}:\\ \;\;\;\;2 \cdot \left(\sqrt{C \cdot F} \cdot \frac{1}{B}\right)\\ \mathbf{elif}\;B \leq 8.5 \cdot 10^{-35}:\\ \;\;\;\;\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}:\\ \;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\ \end{array} \]

                  Alternative 12: 28.5% 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 := 2 \cdot \left(F \cdot t_0\right)\\ \mathbf{if}\;B \leq -3 \cdot 10^{+32}:\\ \;\;\;\;2 \cdot \left(\sqrt{C \cdot F} \cdot \frac{1}{B}\right)\\ \mathbf{elif}\;B \leq 4.4 \cdot 10^{-36}:\\ \;\;\;\;\frac{-\sqrt{t_1 \cdot \left(2 \cdot C\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{t_1 \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 (* 2.0 (* F t_0))))
                     (if (<= B -3e+32)
                       (* 2.0 (* (sqrt (* C F)) (/ 1.0 B)))
                       (if (<= B 4.4e-36)
                         (/ (- (sqrt (* t_1 (* 2.0 C)))) t_0)
                         (/ (- (sqrt (* t_1 (+ 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 = 2.0 * (F * t_0);
                  	double tmp;
                  	if (B <= -3e+32) {
                  		tmp = 2.0 * (sqrt((C * F)) * (1.0 / B));
                  	} else if (B <= 4.4e-36) {
                  		tmp = -sqrt((t_1 * (2.0 * C))) / t_0;
                  	} else {
                  		tmp = -sqrt((t_1 * (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) :: tmp
                      t_0 = (b * b) - (4.0d0 * (a * c))
                      t_1 = 2.0d0 * (f * t_0)
                      if (b <= (-3d+32)) then
                          tmp = 2.0d0 * (sqrt((c * f)) * (1.0d0 / b))
                      else if (b <= 4.4d-36) then
                          tmp = -sqrt((t_1 * (2.0d0 * c))) / t_0
                      else
                          tmp = -sqrt((t_1 * (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 = 2.0 * (F * t_0);
                  	double tmp;
                  	if (B <= -3e+32) {
                  		tmp = 2.0 * (Math.sqrt((C * F)) * (1.0 / B));
                  	} else if (B <= 4.4e-36) {
                  		tmp = -Math.sqrt((t_1 * (2.0 * C))) / t_0;
                  	} else {
                  		tmp = -Math.sqrt((t_1 * (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 = 2.0 * (F * t_0)
                  	tmp = 0
                  	if B <= -3e+32:
                  		tmp = 2.0 * (math.sqrt((C * F)) * (1.0 / B))
                  	elif B <= 4.4e-36:
                  		tmp = -math.sqrt((t_1 * (2.0 * C))) / t_0
                  	else:
                  		tmp = -math.sqrt((t_1 * (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(2.0 * Float64(F * t_0))
                  	tmp = 0.0
                  	if (B <= -3e+32)
                  		tmp = Float64(2.0 * Float64(sqrt(Float64(C * F)) * Float64(1.0 / B)));
                  	elseif (B <= 4.4e-36)
                  		tmp = Float64(Float64(-sqrt(Float64(t_1 * Float64(2.0 * C)))) / t_0);
                  	else
                  		tmp = Float64(Float64(-sqrt(Float64(t_1 * 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 = 2.0 * (F * t_0);
                  	tmp = 0.0;
                  	if (B <= -3e+32)
                  		tmp = 2.0 * (sqrt((C * F)) * (1.0 / B));
                  	elseif (B <= 4.4e-36)
                  		tmp = -sqrt((t_1 * (2.0 * C))) / t_0;
                  	else
                  		tmp = -sqrt((t_1 * (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[(2.0 * N[(F * t$95$0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -3e+32], N[(2.0 * N[(N[Sqrt[N[(C * F), $MachinePrecision]], $MachinePrecision] * N[(1.0 / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4.4e-36], N[((-N[Sqrt[N[(t$95$1 * N[(2.0 * C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], N[((-N[Sqrt[N[(t$95$1 * 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 := 2 \cdot \left(F \cdot t_0\right)\\
                  \mathbf{if}\;B \leq -3 \cdot 10^{+32}:\\
                  \;\;\;\;2 \cdot \left(\sqrt{C \cdot F} \cdot \frac{1}{B}\right)\\
                  
                  \mathbf{elif}\;B \leq 4.4 \cdot 10^{-36}:\\
                  \;\;\;\;\frac{-\sqrt{t_1 \cdot \left(2 \cdot C\right)}}{t_0}\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\frac{-\sqrt{t_1 \cdot \left(B + \left(A + C\right)\right)}}{t_0}\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 3 regimes
                  2. if B < -3e32

                    1. Initial program 9.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*9.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. unpow29.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. +-commutative9.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. unpow29.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*9.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. unpow29.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. Simplified9.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 2.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(2 \cdot C\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                    5. Taylor expanded in B around -inf 3.8%

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

                    if -3e32 < B < 4.3999999999999999e-36

                    1. Initial program 26.8%

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

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

                        \[\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.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(\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.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(\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.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(\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.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(\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.8%

                      \[\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 23.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(2 \cdot C\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]

                    if 4.3999999999999999e-36 < B

                    1. Initial program 16.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*16.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. unpow216.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. +-commutative16.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. unpow216.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*16.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. unpow216.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. Simplified16.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 15.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)} \]
                    5. Step-by-step derivation
                      1. associate-+r+15.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(\left(A + C\right) + B\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                    6. Simplified15.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(\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 simplification17.1%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -3 \cdot 10^{+32}:\\ \;\;\;\;2 \cdot \left(\sqrt{C \cdot F} \cdot \frac{1}{B}\right)\\ \mathbf{elif}\;B \leq 4.4 \cdot 10^{-36}:\\ \;\;\;\;\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{\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 13: 28.1% accurate, 4.8× speedup?

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

                    1. Initial program 9.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*9.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. unpow29.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. +-commutative9.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. unpow29.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*9.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. unpow29.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. Simplified9.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 2.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(2 \cdot C\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                    5. Taylor expanded in B around -inf 3.8%

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

                    if -2.74999999999999992e32 < B < 1.35e7

                    1. Initial program 26.8%

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

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

                        \[\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.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(\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.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(\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.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(\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.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(\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.8%

                      \[\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 23.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(2 \cdot C\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]

                    if 1.35e7 < B

                    1. Initial program 14.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*14.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. unpow214.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. +-commutative14.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. unpow214.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*14.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. unpow214.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. Simplified14.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 1.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 inf 8.7%

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

                    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -2.75 \cdot 10^{+32}:\\ \;\;\;\;2 \cdot \left(\sqrt{C \cdot F} \cdot \frac{1}{B}\right)\\ \mathbf{elif}\;B \leq 13500000:\\ \;\;\;\;\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}:\\ \;\;\;\;\left(\sqrt{C \cdot F} \cdot \frac{1}{B}\right) \cdot -2\\ \end{array} \]

                  Alternative 14: 28.1% accurate, 4.9× speedup?

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

                    1. Initial program 9.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*9.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. unpow29.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. +-commutative9.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. unpow29.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*9.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. unpow29.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. Simplified9.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 2.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(2 \cdot C\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                    5. Taylor expanded in B around -inf 3.8%

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

                    if -3e32 < B < 1.8e8

                    1. Initial program 26.8%

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

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

                        \[\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.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(\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.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(\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.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(\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.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(\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.8%

                      \[\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 23.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(2 \cdot C\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                    5. Taylor expanded in F around 0 23.5%

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

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

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

                        \[\leadsto \frac{-\sqrt{4 \cdot \left(C \cdot \left(\left(\color{blue}{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)} \]
                    7. Simplified23.5%

                      \[\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 1.8e8 < B

                    1. Initial program 14.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*14.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. unpow214.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. +-commutative14.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. unpow214.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*14.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. unpow214.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. Simplified14.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 1.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 inf 8.7%

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

                    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -3 \cdot 10^{+32}:\\ \;\;\;\;2 \cdot \left(\sqrt{C \cdot F} \cdot \frac{1}{B}\right)\\ \mathbf{elif}\;B \leq 180000000:\\ \;\;\;\;\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}:\\ \;\;\;\;\left(\sqrt{C \cdot F} \cdot \frac{1}{B}\right) \cdot -2\\ \end{array} \]

                  Alternative 15: 19.1% accurate, 5.1× speedup?

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

                    1. Initial program 11.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*11.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. unpow211.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. +-commutative11.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. unpow211.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*11.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. unpow211.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. Simplified11.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 -inf 2.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. Taylor expanded in B around -inf 3.9%

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

                    if -1.5499999999999999e25 < B < 7.2000000000000005e-57

                    1. Initial program 26.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*26.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. unpow226.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. +-commutative26.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. unpow226.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*26.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. unpow226.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. Simplified26.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 22.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 20.7%

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

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

                      \[\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 7.2000000000000005e-57 < B

                    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 6.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. Taylor expanded in B around inf 7.5%

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

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

                  Alternative 16: 8.9% accurate, 5.7× speedup?

                  \[\begin{array}{l} [A, C] = \mathsf{sort}([A, C])\\ \\ \begin{array}{l} t_0 := \sqrt{C \cdot F} \cdot \frac{1}{B}\\ \mathbf{if}\;B \leq -5 \cdot 10^{-311}:\\ \;\;\;\;2 \cdot t_0\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot -2\\ \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)) (/ 1.0 B))))
                     (if (<= B -5e-311) (* 2.0 t_0) (* t_0 -2.0))))
                  assert(A < C);
                  double code(double A, double B, double C, double F) {
                  	double t_0 = sqrt((C * F)) * (1.0 / B);
                  	double tmp;
                  	if (B <= -5e-311) {
                  		tmp = 2.0 * t_0;
                  	} else {
                  		tmp = t_0 * -2.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 = sqrt((c * f)) * (1.0d0 / b)
                      if (b <= (-5d-311)) then
                          tmp = 2.0d0 * t_0
                      else
                          tmp = t_0 * (-2.0d0)
                      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)) * (1.0 / B);
                  	double tmp;
                  	if (B <= -5e-311) {
                  		tmp = 2.0 * t_0;
                  	} else {
                  		tmp = t_0 * -2.0;
                  	}
                  	return tmp;
                  }
                  
                  [A, C] = sort([A, C])
                  def code(A, B, C, F):
                  	t_0 = math.sqrt((C * F)) * (1.0 / B)
                  	tmp = 0
                  	if B <= -5e-311:
                  		tmp = 2.0 * t_0
                  	else:
                  		tmp = t_0 * -2.0
                  	return tmp
                  
                  A, C = sort([A, C])
                  function code(A, B, C, F)
                  	t_0 = Float64(sqrt(Float64(C * F)) * Float64(1.0 / B))
                  	tmp = 0.0
                  	if (B <= -5e-311)
                  		tmp = Float64(2.0 * t_0);
                  	else
                  		tmp = Float64(t_0 * -2.0);
                  	end
                  	return tmp
                  end
                  
                  A, C = num2cell(sort([A, C])){:}
                  function tmp_2 = code(A, B, C, F)
                  	t_0 = sqrt((C * F)) * (1.0 / B);
                  	tmp = 0.0;
                  	if (B <= -5e-311)
                  		tmp = 2.0 * t_0;
                  	else
                  		tmp = t_0 * -2.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[Sqrt[N[(C * F), $MachinePrecision]], $MachinePrecision] * N[(1.0 / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -5e-311], N[(2.0 * t$95$0), $MachinePrecision], N[(t$95$0 * -2.0), $MachinePrecision]]]
                  
                  \begin{array}{l}
                  [A, C] = \mathsf{sort}([A, C])\\
                  \\
                  \begin{array}{l}
                  t_0 := \sqrt{C \cdot F} \cdot \frac{1}{B}\\
                  \mathbf{if}\;B \leq -5 \cdot 10^{-311}:\\
                  \;\;\;\;2 \cdot t_0\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;t_0 \cdot -2\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if B < -5.00000000000023e-311

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

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

                    if -5.00000000000023e-311 < B

                    1. Initial program 20.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*20.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. unpow220.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. +-commutative20.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. unpow220.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*20.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. unpow220.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. Simplified20.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 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 \color{blue}{\left(2 \cdot C\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                    5. Taylor expanded in B around inf 5.6%

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

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

                  Alternative 17: 5.1% accurate, 5.8× speedup?

                  \[\begin{array}{l} [A, C] = \mathsf{sort}([A, C])\\ \\ \left(\sqrt{C \cdot F} \cdot \frac{1}{B}\right) \cdot -2 \end{array} \]
                  NOTE: A and C should be sorted in increasing order before calling this function.
                  (FPCore (A B C F) :precision binary64 (* (* (sqrt (* C F)) (/ 1.0 B)) -2.0))
                  assert(A < C);
                  double code(double A, double B, double C, double F) {
                  	return (sqrt((C * F)) * (1.0 / B)) * -2.0;
                  }
                  
                  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((c * f)) * (1.0d0 / b)) * (-2.0d0)
                  end function
                  
                  assert A < C;
                  public static double code(double A, double B, double C, double F) {
                  	return (Math.sqrt((C * F)) * (1.0 / B)) * -2.0;
                  }
                  
                  [A, C] = sort([A, C])
                  def code(A, B, C, F):
                  	return (math.sqrt((C * F)) * (1.0 / B)) * -2.0
                  
                  A, C = sort([A, C])
                  function code(A, B, C, F)
                  	return Float64(Float64(sqrt(Float64(C * F)) * Float64(1.0 / B)) * -2.0)
                  end
                  
                  A, C = num2cell(sort([A, C])){:}
                  function tmp = code(A, B, C, F)
                  	tmp = (sqrt((C * F)) * (1.0 / B)) * -2.0;
                  end
                  
                  NOTE: A and C should be sorted in increasing order before calling this function.
                  code[A_, B_, C_, F_] := N[(N[(N[Sqrt[N[(C * F), $MachinePrecision]], $MachinePrecision] * N[(1.0 / B), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision]
                  
                  \begin{array}{l}
                  [A, C] = \mathsf{sort}([A, C])\\
                  \\
                  \left(\sqrt{C \cdot F} \cdot \frac{1}{B}\right) \cdot -2
                  \end{array}
                  
                  Derivation
                  1. Initial program 20.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*20.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. unpow220.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. +-commutative20.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. unpow220.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*20.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. unpow220.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. Simplified20.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 -inf 13.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. Taylor expanded in B around inf 3.4%

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

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

                  Alternative 18: 0.8% accurate, 5.9× speedup?

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

                      \[\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 7.9%

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto -\frac{\color{blue}{\sqrt{2} \cdot \sqrt{2}}}{B} \cdot \sqrt{A \cdot F} \]
                      3. rem-square-sqrt3.2%

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

                      \[\leadsto \color{blue}{-\frac{2}{B} \cdot \sqrt{A \cdot F}} \]
                    8. Final simplification3.2%

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

                    Reproduce

                    ?
                    herbie shell --seed 2023193 
                    (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))))