ABCF->ab-angle b

Percentage Accurate: 18.9% → 41.9%
Time: 35.4s
Alternatives: 22
Speedup: 5.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 22 alternatives:

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

Initial Program: 18.9% 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: 41.9% accurate, 0.9× speedup?

\[\begin{array}{l} [A, C] = \mathsf{sort}([A, C])\\ \\ \begin{array}{l} t_0 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;{B}^{2} \leq 5 \cdot 10^{-141}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(t_0 \cdot F\right) \cdot \left(2 \cdot A\right)\right)}}{t_0}\\ \mathbf{elif}\;{B}^{2} \leq 10^{+305}:\\ \;\;\;\;\frac{\sqrt{2 \cdot \left(F \cdot \left(A + \left(C - \mathsf{hypot}\left(A - C, B\right)\right)\right)\right)} \cdot \left(-\sqrt{\mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)}\right)}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{F \cdot \left(A - \mathsf{hypot}\left(B, A\right)\right)} \cdot \left(-\sqrt{2}\right)}{B}\\ \end{array} \end{array} \]
NOTE: A and C should be sorted in increasing order before calling this function.
(FPCore (A B C F)
 :precision binary64
 (let* ((t_0 (- (* B B) (* 4.0 (* A C)))))
   (if (<= (pow B 2.0) 5e-141)
     (/ (- (sqrt (* 2.0 (* (* t_0 F) (* 2.0 A))))) t_0)
     (if (<= (pow B 2.0) 1e+305)
       (/
        (*
         (sqrt (* 2.0 (* F (+ A (- C (hypot (- A C) B))))))
         (- (sqrt (fma B B (* C (* A -4.0))))))
        (fma B B (* A (* C -4.0))))
       (/ (* (sqrt (* F (- A (hypot B A)))) (- (sqrt 2.0))) B)))))
assert(A < C);
double code(double A, double B, double C, double F) {
	double t_0 = (B * B) - (4.0 * (A * C));
	double tmp;
	if (pow(B, 2.0) <= 5e-141) {
		tmp = -sqrt((2.0 * ((t_0 * F) * (2.0 * A)))) / t_0;
	} else if (pow(B, 2.0) <= 1e+305) {
		tmp = (sqrt((2.0 * (F * (A + (C - hypot((A - C), B)))))) * -sqrt(fma(B, B, (C * (A * -4.0))))) / fma(B, B, (A * (C * -4.0)));
	} else {
		tmp = (sqrt((F * (A - hypot(B, A)))) * -sqrt(2.0)) / B;
	}
	return tmp;
}
A, C = sort([A, C])
function code(A, B, C, F)
	t_0 = Float64(Float64(B * B) - Float64(4.0 * Float64(A * C)))
	tmp = 0.0
	if ((B ^ 2.0) <= 5e-141)
		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(Float64(t_0 * F) * Float64(2.0 * A))))) / t_0);
	elseif ((B ^ 2.0) <= 1e+305)
		tmp = Float64(Float64(sqrt(Float64(2.0 * Float64(F * Float64(A + Float64(C - hypot(Float64(A - C), B)))))) * Float64(-sqrt(fma(B, B, Float64(C * Float64(A * -4.0)))))) / fma(B, B, Float64(A * Float64(C * -4.0))));
	else
		tmp = Float64(Float64(sqrt(Float64(F * Float64(A - hypot(B, A)))) * Float64(-sqrt(2.0))) / B);
	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[N[Power[B, 2.0], $MachinePrecision], 5e-141], N[((-N[Sqrt[N[(2.0 * N[(N[(t$95$0 * F), $MachinePrecision] * N[(2.0 * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], If[LessEqual[N[Power[B, 2.0], $MachinePrecision], 1e+305], N[(N[(N[Sqrt[N[(2.0 * N[(F * N[(A + N[(C - N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-N[Sqrt[N[(B * B + N[(C * N[(A * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision] / N[(B * B + N[(A * N[(C * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[N[(F * N[(A - N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-N[Sqrt[2.0], $MachinePrecision])), $MachinePrecision] / B), $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}^{2} \leq 5 \cdot 10^{-141}:\\
\;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(t_0 \cdot F\right) \cdot \left(2 \cdot A\right)\right)}}{t_0}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (pow.f64 B 2) < 4.9999999999999999e-141

    1. Initial program 18.3%

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

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

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

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

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

      if 4.9999999999999999e-141 < (pow.f64 B 2) < 9.9999999999999994e304

      1. Initial program 39.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. Simplified44.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 9.9999999999999994e304 < (pow.f64 B 2)

        1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 2: 40.7% accurate, 1.2× 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 := \sqrt{F \cdot \left(A - \mathsf{hypot}\left(B, A\right)\right)}\\ \mathbf{if}\;B \leq -8 \cdot 10^{-71}:\\ \;\;\;\;\left(\sqrt{2} \cdot \left(t_1 \cdot \sqrt{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}\right)\right) \cdot \frac{-1}{B \cdot B + \left(A \cdot C\right) \cdot -4}\\ \mathbf{elif}\;B \leq 5.6 \cdot 10^{-76}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(t_0 \cdot F\right) \cdot \left(2 \cdot A\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{t_1 \cdot \left(-\sqrt{2}\right)}{B}\\ \end{array} \end{array} \]
        NOTE: A and C should be sorted in increasing order before calling this function.
        (FPCore (A B C F)
         :precision binary64
         (let* ((t_0 (- (* B B) (* 4.0 (* A C)))) (t_1 (sqrt (* F (- A (hypot B A))))))
           (if (<= B -8e-71)
             (*
              (* (sqrt 2.0) (* t_1 (sqrt (fma B B (* A (* C -4.0))))))
              (/ -1.0 (+ (* B B) (* (* A C) -4.0))))
             (if (<= B 5.6e-76)
               (/ (- (sqrt (* 2.0 (* (* t_0 F) (* 2.0 A))))) t_0)
               (/ (* t_1 (- (sqrt 2.0))) B)))))
        assert(A < C);
        double code(double A, double B, double C, double F) {
        	double t_0 = (B * B) - (4.0 * (A * C));
        	double t_1 = sqrt((F * (A - hypot(B, A))));
        	double tmp;
        	if (B <= -8e-71) {
        		tmp = (sqrt(2.0) * (t_1 * sqrt(fma(B, B, (A * (C * -4.0)))))) * (-1.0 / ((B * B) + ((A * C) * -4.0)));
        	} else if (B <= 5.6e-76) {
        		tmp = -sqrt((2.0 * ((t_0 * F) * (2.0 * A)))) / t_0;
        	} else {
        		tmp = (t_1 * -sqrt(2.0)) / B;
        	}
        	return tmp;
        }
        
        A, C = sort([A, C])
        function code(A, B, C, F)
        	t_0 = Float64(Float64(B * B) - Float64(4.0 * Float64(A * C)))
        	t_1 = sqrt(Float64(F * Float64(A - hypot(B, A))))
        	tmp = 0.0
        	if (B <= -8e-71)
        		tmp = Float64(Float64(sqrt(2.0) * Float64(t_1 * sqrt(fma(B, B, Float64(A * Float64(C * -4.0)))))) * Float64(-1.0 / Float64(Float64(B * B) + Float64(Float64(A * C) * -4.0))));
        	elseif (B <= 5.6e-76)
        		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(Float64(t_0 * F) * Float64(2.0 * A))))) / t_0);
        	else
        		tmp = Float64(Float64(t_1 * Float64(-sqrt(2.0))) / B);
        	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[Sqrt[N[(F * N[(A - N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[B, -8e-71], N[(N[(N[Sqrt[2.0], $MachinePrecision] * N[(t$95$1 * N[Sqrt[N[(B * B + N[(A * N[(C * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(-1.0 / N[(N[(B * B), $MachinePrecision] + N[(N[(A * C), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5.6e-76], N[((-N[Sqrt[N[(2.0 * N[(N[(t$95$0 * F), $MachinePrecision] * N[(2.0 * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], N[(N[(t$95$1 * (-N[Sqrt[2.0], $MachinePrecision])), $MachinePrecision] / B), $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 := \sqrt{F \cdot \left(A - \mathsf{hypot}\left(B, A\right)\right)}\\
        \mathbf{if}\;B \leq -8 \cdot 10^{-71}:\\
        \;\;\;\;\left(\sqrt{2} \cdot \left(t_1 \cdot \sqrt{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}\right)\right) \cdot \frac{-1}{B \cdot B + \left(A \cdot C\right) \cdot -4}\\
        
        \mathbf{elif}\;B \leq 5.6 \cdot 10^{-76}:\\
        \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(t_0 \cdot F\right) \cdot \left(2 \cdot A\right)\right)}}{t_0}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{t_1 \cdot \left(-\sqrt{2}\right)}{B}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if B < -7.9999999999999993e-71

          1. Initial program 21.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if -7.9999999999999993e-71 < B < 5.6000000000000002e-76

            1. Initial program 17.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. Simplified17.8%

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

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

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

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

              if 5.6000000000000002e-76 < B

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                1. Initial program 0.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. Simplified0.1%

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

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

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

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

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

                  if -2.99999999999999991e152 < B < -3.99999999999999995e-92

                  1. Initial program 31.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. Simplified31.7%

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

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

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

                    if -3.99999999999999995e-92 < B < 2.75000000000000013e-75

                    1. Initial program 19.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. Simplified19.2%

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

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

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

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

                      if 2.75000000000000013e-75 < B

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

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

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

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

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

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

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

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

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

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

                      Alternative 4: 39.9% 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)\\ \mathbf{if}\;B \leq -7 \cdot 10^{+142}:\\ \;\;\;\;2 \cdot \left(\sqrt{A \cdot F} \cdot \frac{1}{B}\right)\\ \mathbf{elif}\;B \leq -4.8 \cdot 10^{-93}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 2.4 \cdot 10^{-75}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(t_1 \cdot F\right) \cdot \left(2 \cdot A\right)\right)}}{t_1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{F \cdot \left(A - \mathsf{hypot}\left(B, A\right)\right)} \cdot \left(-\sqrt{2}\right)}{B}\\ \end{array} \end{array} \]
                      NOTE: A and C should be sorted in increasing order before calling this function.
                      (FPCore (A B C F)
                       :precision binary64
                       (let* ((t_0 (+ (* B B) (* (* A C) -4.0))) (t_1 (- (* B B) (* 4.0 (* A C)))))
                         (if (<= B -7e+142)
                           (* 2.0 (* (sqrt (* A F)) (/ 1.0 B)))
                           (if (<= B -4.8e-93)
                             (/ (- (sqrt (* 2.0 (* t_0 (* F (+ A (- C (hypot B (- A C))))))))) t_0)
                             (if (<= B 2.4e-75)
                               (/ (- (sqrt (* 2.0 (* (* t_1 F) (* 2.0 A))))) t_1)
                               (/ (* (sqrt (* F (- A (hypot B A)))) (- (sqrt 2.0))) B))))))
                      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 tmp;
                      	if (B <= -7e+142) {
                      		tmp = 2.0 * (sqrt((A * F)) * (1.0 / B));
                      	} else if (B <= -4.8e-93) {
                      		tmp = -sqrt((2.0 * (t_0 * (F * (A + (C - hypot(B, (A - C)))))))) / t_0;
                      	} else if (B <= 2.4e-75) {
                      		tmp = -sqrt((2.0 * ((t_1 * F) * (2.0 * A)))) / t_1;
                      	} else {
                      		tmp = (sqrt((F * (A - hypot(B, A)))) * -sqrt(2.0)) / B;
                      	}
                      	return tmp;
                      }
                      
                      assert A < C;
                      public static double code(double A, double B, double C, double F) {
                      	double t_0 = (B * B) + ((A * C) * -4.0);
                      	double t_1 = (B * B) - (4.0 * (A * C));
                      	double tmp;
                      	if (B <= -7e+142) {
                      		tmp = 2.0 * (Math.sqrt((A * F)) * (1.0 / B));
                      	} else if (B <= -4.8e-93) {
                      		tmp = -Math.sqrt((2.0 * (t_0 * (F * (A + (C - Math.hypot(B, (A - C)))))))) / t_0;
                      	} else if (B <= 2.4e-75) {
                      		tmp = -Math.sqrt((2.0 * ((t_1 * F) * (2.0 * A)))) / t_1;
                      	} else {
                      		tmp = (Math.sqrt((F * (A - Math.hypot(B, A)))) * -Math.sqrt(2.0)) / B;
                      	}
                      	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))
                      	tmp = 0
                      	if B <= -7e+142:
                      		tmp = 2.0 * (math.sqrt((A * F)) * (1.0 / B))
                      	elif B <= -4.8e-93:
                      		tmp = -math.sqrt((2.0 * (t_0 * (F * (A + (C - math.hypot(B, (A - C)))))))) / t_0
                      	elif B <= 2.4e-75:
                      		tmp = -math.sqrt((2.0 * ((t_1 * F) * (2.0 * A)))) / t_1
                      	else:
                      		tmp = (math.sqrt((F * (A - math.hypot(B, A)))) * -math.sqrt(2.0)) / B
                      	return tmp
                      
                      A, C = sort([A, C])
                      function code(A, B, C, F)
                      	t_0 = Float64(Float64(B * B) + Float64(Float64(A * C) * -4.0))
                      	t_1 = Float64(Float64(B * B) - Float64(4.0 * Float64(A * C)))
                      	tmp = 0.0
                      	if (B <= -7e+142)
                      		tmp = Float64(2.0 * Float64(sqrt(Float64(A * F)) * Float64(1.0 / B)));
                      	elseif (B <= -4.8e-93)
                      		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(t_0 * Float64(F * Float64(A + Float64(C - hypot(B, Float64(A - C))))))))) / t_0);
                      	elseif (B <= 2.4e-75)
                      		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(Float64(t_1 * F) * Float64(2.0 * A))))) / t_1);
                      	else
                      		tmp = Float64(Float64(sqrt(Float64(F * Float64(A - hypot(B, A)))) * Float64(-sqrt(2.0))) / B);
                      	end
                      	return tmp
                      end
                      
                      A, C = num2cell(sort([A, C])){:}
                      function tmp_2 = code(A, B, C, F)
                      	t_0 = (B * B) + ((A * C) * -4.0);
                      	t_1 = (B * B) - (4.0 * (A * C));
                      	tmp = 0.0;
                      	if (B <= -7e+142)
                      		tmp = 2.0 * (sqrt((A * F)) * (1.0 / B));
                      	elseif (B <= -4.8e-93)
                      		tmp = -sqrt((2.0 * (t_0 * (F * (A + (C - hypot(B, (A - C)))))))) / t_0;
                      	elseif (B <= 2.4e-75)
                      		tmp = -sqrt((2.0 * ((t_1 * F) * (2.0 * A)))) / t_1;
                      	else
                      		tmp = (sqrt((F * (A - hypot(B, A)))) * -sqrt(2.0)) / B;
                      	end
                      	tmp_2 = tmp;
                      end
                      
                      NOTE: A and C should be sorted in increasing order before calling this function.
                      code[A_, B_, C_, F_] := Block[{t$95$0 = N[(N[(B * B), $MachinePrecision] + N[(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]}, If[LessEqual[B, -7e+142], N[(2.0 * N[(N[Sqrt[N[(A * F), $MachinePrecision]], $MachinePrecision] * N[(1.0 / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -4.8e-93], N[((-N[Sqrt[N[(2.0 * N[(t$95$0 * N[(F * N[(A + N[(C - N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], If[LessEqual[B, 2.4e-75], N[((-N[Sqrt[N[(2.0 * N[(N[(t$95$1 * F), $MachinePrecision] * N[(2.0 * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$1), $MachinePrecision], N[(N[(N[Sqrt[N[(F * N[(A - N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-N[Sqrt[2.0], $MachinePrecision])), $MachinePrecision] / B), $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)\\
                      \mathbf{if}\;B \leq -7 \cdot 10^{+142}:\\
                      \;\;\;\;2 \cdot \left(\sqrt{A \cdot F} \cdot \frac{1}{B}\right)\\
                      
                      \mathbf{elif}\;B \leq -4.8 \cdot 10^{-93}:\\
                      \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)\right)}}{t_0}\\
                      
                      \mathbf{elif}\;B \leq 2.4 \cdot 10^{-75}:\\
                      \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(t_1 \cdot F\right) \cdot \left(2 \cdot A\right)\right)}}{t_1}\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;\frac{\sqrt{F \cdot \left(A - \mathsf{hypot}\left(B, A\right)\right)} \cdot \left(-\sqrt{2}\right)}{B}\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 4 regimes
                      2. if B < -6.99999999999999995e142

                        1. Initial program 0.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. Simplified0.1%

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

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

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

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

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

                          if -6.99999999999999995e142 < B < -4.8000000000000002e-93

                          1. Initial program 31.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. Simplified31.7%

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

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

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

                            if -4.8000000000000002e-93 < B < 2.40000000000000019e-75

                            1. Initial program 19.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. Simplified19.2%

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

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

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

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

                              if 2.40000000000000019e-75 < B

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              Alternative 5: 37.8% accurate, 2.7× 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)\\ \mathbf{if}\;B \leq -2.4 \cdot 10^{+148}:\\ \;\;\;\;2 \cdot \left(\sqrt{A \cdot F} \cdot \frac{1}{B}\right)\\ \mathbf{elif}\;B \leq -3.6 \cdot 10^{-92}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 2.75 \cdot 10^{-75}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(t_1 \cdot F\right) \cdot \left(2 \cdot A\right)\right)}}{t_1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(A - B\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)))))
                                 (if (<= B -2.4e+148)
                                   (* 2.0 (* (sqrt (* A F)) (/ 1.0 B)))
                                   (if (<= B -3.6e-92)
                                     (/ (- (sqrt (* 2.0 (* t_0 (* F (+ A (- C (hypot B (- A C))))))))) t_0)
                                     (if (<= B 2.75e-75)
                                       (/ (- (sqrt (* 2.0 (* (* t_1 F) (* 2.0 A))))) t_1)
                                       (* (/ (sqrt 2.0) B) (- (sqrt (* F (- A B))))))))))
                              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 tmp;
                              	if (B <= -2.4e+148) {
                              		tmp = 2.0 * (sqrt((A * F)) * (1.0 / B));
                              	} else if (B <= -3.6e-92) {
                              		tmp = -sqrt((2.0 * (t_0 * (F * (A + (C - hypot(B, (A - C)))))))) / t_0;
                              	} else if (B <= 2.75e-75) {
                              		tmp = -sqrt((2.0 * ((t_1 * F) * (2.0 * A)))) / t_1;
                              	} else {
                              		tmp = (sqrt(2.0) / B) * -sqrt((F * (A - B)));
                              	}
                              	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 tmp;
                              	if (B <= -2.4e+148) {
                              		tmp = 2.0 * (Math.sqrt((A * F)) * (1.0 / B));
                              	} else if (B <= -3.6e-92) {
                              		tmp = -Math.sqrt((2.0 * (t_0 * (F * (A + (C - Math.hypot(B, (A - C)))))))) / t_0;
                              	} else if (B <= 2.75e-75) {
                              		tmp = -Math.sqrt((2.0 * ((t_1 * F) * (2.0 * A)))) / t_1;
                              	} else {
                              		tmp = (Math.sqrt(2.0) / B) * -Math.sqrt((F * (A - B)));
                              	}
                              	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))
                              	tmp = 0
                              	if B <= -2.4e+148:
                              		tmp = 2.0 * (math.sqrt((A * F)) * (1.0 / B))
                              	elif B <= -3.6e-92:
                              		tmp = -math.sqrt((2.0 * (t_0 * (F * (A + (C - math.hypot(B, (A - C)))))))) / t_0
                              	elif B <= 2.75e-75:
                              		tmp = -math.sqrt((2.0 * ((t_1 * F) * (2.0 * A)))) / t_1
                              	else:
                              		tmp = (math.sqrt(2.0) / B) * -math.sqrt((F * (A - B)))
                              	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)))
                              	tmp = 0.0
                              	if (B <= -2.4e+148)
                              		tmp = Float64(2.0 * Float64(sqrt(Float64(A * F)) * Float64(1.0 / B)));
                              	elseif (B <= -3.6e-92)
                              		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(t_0 * Float64(F * Float64(A + Float64(C - hypot(B, Float64(A - C))))))))) / t_0);
                              	elseif (B <= 2.75e-75)
                              		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(Float64(t_1 * F) * Float64(2.0 * A))))) / t_1);
                              	else
                              		tmp = Float64(Float64(sqrt(2.0) / B) * Float64(-sqrt(Float64(F * Float64(A - B)))));
                              	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));
                              	tmp = 0.0;
                              	if (B <= -2.4e+148)
                              		tmp = 2.0 * (sqrt((A * F)) * (1.0 / B));
                              	elseif (B <= -3.6e-92)
                              		tmp = -sqrt((2.0 * (t_0 * (F * (A + (C - hypot(B, (A - C)))))))) / t_0;
                              	elseif (B <= 2.75e-75)
                              		tmp = -sqrt((2.0 * ((t_1 * F) * (2.0 * A)))) / t_1;
                              	else
                              		tmp = (sqrt(2.0) / B) * -sqrt((F * (A - 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[(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]}, If[LessEqual[B, -2.4e+148], N[(2.0 * N[(N[Sqrt[N[(A * F), $MachinePrecision]], $MachinePrecision] * N[(1.0 / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -3.6e-92], N[((-N[Sqrt[N[(2.0 * N[(t$95$0 * N[(F * N[(A + N[(C - N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], If[LessEqual[B, 2.75e-75], N[((-N[Sqrt[N[(2.0 * N[(N[(t$95$1 * F), $MachinePrecision] * N[(2.0 * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$1), $MachinePrecision], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B), $MachinePrecision] * (-N[Sqrt[N[(F * N[(A - B), $MachinePrecision]), $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)\\
                              \mathbf{if}\;B \leq -2.4 \cdot 10^{+148}:\\
                              \;\;\;\;2 \cdot \left(\sqrt{A \cdot F} \cdot \frac{1}{B}\right)\\
                              
                              \mathbf{elif}\;B \leq -3.6 \cdot 10^{-92}:\\
                              \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)\right)}}{t_0}\\
                              
                              \mathbf{elif}\;B \leq 2.75 \cdot 10^{-75}:\\
                              \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(t_1 \cdot F\right) \cdot \left(2 \cdot A\right)\right)}}{t_1}\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(A - B\right)}\right)\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 4 regimes
                              2. if B < -2.39999999999999995e148

                                1. Initial program 0.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. Simplified0.1%

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

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

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

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

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

                                  if -2.39999999999999995e148 < B < -3.60000000000000016e-92

                                  1. Initial program 31.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. Simplified31.7%

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

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

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

                                    if -3.60000000000000016e-92 < B < 2.75000000000000013e-75

                                    1. Initial program 19.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. Simplified19.2%

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

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

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

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

                                      if 2.75000000000000013e-75 < B

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      Alternative 6: 37.7% accurate, 2.7× speedup?

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

                                        1. Initial program 0.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. Simplified0.1%

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

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

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

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

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

                                          if -1.6500000000000001e152 < B < -7.5000000000000004e-71

                                          1. Initial program 38.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. Simplified38.0%

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

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

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

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

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

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

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

                                            if -7.5000000000000004e-71 < B < 2.75000000000000013e-75

                                            1. Initial program 17.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. Simplified17.8%

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

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

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

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

                                              if 2.75000000000000013e-75 < B

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                              Alternative 7: 36.5% accurate, 2.8× speedup?

                                              \[\begin{array}{l} [A, C] = \mathsf{sort}([A, C])\\ \\ \begin{array}{l} t_0 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;B \leq -2.5 \cdot 10^{+152}:\\ \;\;\;\;2 \cdot \left(\sqrt{A \cdot F} \cdot \frac{1}{B}\right)\\ \mathbf{elif}\;B \leq -8.5 \cdot 10^{-71}:\\ \;\;\;\;\sqrt{2 \cdot \left(\left(A - \mathsf{hypot}\left(B, A\right)\right) \cdot \left(\left(B \cdot B\right) \cdot F\right)\right)} \cdot \frac{-1}{B \cdot B + \left(A \cdot C\right) \cdot -4}\\ \mathbf{elif}\;B \leq 1.7 \cdot 10^{-75}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(t_0 \cdot F\right) \cdot \left(2 \cdot A\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(A - B\right)}\right)\\ \end{array} \end{array} \]
                                              NOTE: A and C should be sorted in increasing order before calling this function.
                                              (FPCore (A B C F)
                                               :precision binary64
                                               (let* ((t_0 (- (* B B) (* 4.0 (* A C)))))
                                                 (if (<= B -2.5e+152)
                                                   (* 2.0 (* (sqrt (* A F)) (/ 1.0 B)))
                                                   (if (<= B -8.5e-71)
                                                     (*
                                                      (sqrt (* 2.0 (* (- A (hypot B A)) (* (* B B) F))))
                                                      (/ -1.0 (+ (* B B) (* (* A C) -4.0))))
                                                     (if (<= B 1.7e-75)
                                                       (/ (- (sqrt (* 2.0 (* (* t_0 F) (* 2.0 A))))) t_0)
                                                       (* (/ (sqrt 2.0) B) (- (sqrt (* F (- A 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 <= -2.5e+152) {
                                              		tmp = 2.0 * (sqrt((A * F)) * (1.0 / B));
                                              	} else if (B <= -8.5e-71) {
                                              		tmp = sqrt((2.0 * ((A - hypot(B, A)) * ((B * B) * F)))) * (-1.0 / ((B * B) + ((A * C) * -4.0)));
                                              	} else if (B <= 1.7e-75) {
                                              		tmp = -sqrt((2.0 * ((t_0 * F) * (2.0 * A)))) / t_0;
                                              	} else {
                                              		tmp = (sqrt(2.0) / B) * -sqrt((F * (A - B)));
                                              	}
                                              	return tmp;
                                              }
                                              
                                              assert A < C;
                                              public static double code(double A, double B, double C, double F) {
                                              	double t_0 = (B * B) - (4.0 * (A * C));
                                              	double tmp;
                                              	if (B <= -2.5e+152) {
                                              		tmp = 2.0 * (Math.sqrt((A * F)) * (1.0 / B));
                                              	} else if (B <= -8.5e-71) {
                                              		tmp = Math.sqrt((2.0 * ((A - Math.hypot(B, A)) * ((B * B) * F)))) * (-1.0 / ((B * B) + ((A * C) * -4.0)));
                                              	} else if (B <= 1.7e-75) {
                                              		tmp = -Math.sqrt((2.0 * ((t_0 * F) * (2.0 * A)))) / t_0;
                                              	} else {
                                              		tmp = (Math.sqrt(2.0) / B) * -Math.sqrt((F * (A - 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 <= -2.5e+152:
                                              		tmp = 2.0 * (math.sqrt((A * F)) * (1.0 / B))
                                              	elif B <= -8.5e-71:
                                              		tmp = math.sqrt((2.0 * ((A - math.hypot(B, A)) * ((B * B) * F)))) * (-1.0 / ((B * B) + ((A * C) * -4.0)))
                                              	elif B <= 1.7e-75:
                                              		tmp = -math.sqrt((2.0 * ((t_0 * F) * (2.0 * A)))) / t_0
                                              	else:
                                              		tmp = (math.sqrt(2.0) / B) * -math.sqrt((F * (A - 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 <= -2.5e+152)
                                              		tmp = Float64(2.0 * Float64(sqrt(Float64(A * F)) * Float64(1.0 / B)));
                                              	elseif (B <= -8.5e-71)
                                              		tmp = Float64(sqrt(Float64(2.0 * Float64(Float64(A - hypot(B, A)) * Float64(Float64(B * B) * F)))) * Float64(-1.0 / Float64(Float64(B * B) + Float64(Float64(A * C) * -4.0))));
                                              	elseif (B <= 1.7e-75)
                                              		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(Float64(t_0 * F) * Float64(2.0 * A))))) / t_0);
                                              	else
                                              		tmp = Float64(Float64(sqrt(2.0) / B) * Float64(-sqrt(Float64(F * Float64(A - 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 <= -2.5e+152)
                                              		tmp = 2.0 * (sqrt((A * F)) * (1.0 / B));
                                              	elseif (B <= -8.5e-71)
                                              		tmp = sqrt((2.0 * ((A - hypot(B, A)) * ((B * B) * F)))) * (-1.0 / ((B * B) + ((A * C) * -4.0)));
                                              	elseif (B <= 1.7e-75)
                                              		tmp = -sqrt((2.0 * ((t_0 * F) * (2.0 * A)))) / t_0;
                                              	else
                                              		tmp = (sqrt(2.0) / B) * -sqrt((F * (A - 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, -2.5e+152], N[(2.0 * N[(N[Sqrt[N[(A * F), $MachinePrecision]], $MachinePrecision] * N[(1.0 / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -8.5e-71], N[(N[Sqrt[N[(2.0 * N[(N[(A - N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision] * N[(N[(B * B), $MachinePrecision] * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(-1.0 / N[(N[(B * B), $MachinePrecision] + N[(N[(A * C), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.7e-75], N[((-N[Sqrt[N[(2.0 * N[(N[(t$95$0 * F), $MachinePrecision] * N[(2.0 * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B), $MachinePrecision] * (-N[Sqrt[N[(F * N[(A - B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]]]]]
                                              
                                              \begin{array}{l}
                                              [A, C] = \mathsf{sort}([A, C])\\
                                              \\
                                              \begin{array}{l}
                                              t_0 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\
                                              \mathbf{if}\;B \leq -2.5 \cdot 10^{+152}:\\
                                              \;\;\;\;2 \cdot \left(\sqrt{A \cdot F} \cdot \frac{1}{B}\right)\\
                                              
                                              \mathbf{elif}\;B \leq -8.5 \cdot 10^{-71}:\\
                                              \;\;\;\;\sqrt{2 \cdot \left(\left(A - \mathsf{hypot}\left(B, A\right)\right) \cdot \left(\left(B \cdot B\right) \cdot F\right)\right)} \cdot \frac{-1}{B \cdot B + \left(A \cdot C\right) \cdot -4}\\
                                              
                                              \mathbf{elif}\;B \leq 1.7 \cdot 10^{-75}:\\
                                              \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(t_0 \cdot F\right) \cdot \left(2 \cdot A\right)\right)}}{t_0}\\
                                              
                                              \mathbf{else}:\\
                                              \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(A - B\right)}\right)\\
                                              
                                              
                                              \end{array}
                                              \end{array}
                                              
                                              Derivation
                                              1. Split input into 4 regimes
                                              2. if B < -2.5e152

                                                1. Initial program 0.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. Simplified0.1%

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

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

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

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

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

                                                  if -2.5e152 < B < -8.49999999999999988e-71

                                                  1. Initial program 38.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. Simplified38.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                    if -8.49999999999999988e-71 < B < 1.70000000000000008e-75

                                                    1. Initial program 17.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. Simplified17.8%

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

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

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

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

                                                      if 1.70000000000000008e-75 < B

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                      Alternative 8: 36.5% accurate, 2.8× speedup?

                                                      \[\begin{array}{l} [A, C] = \mathsf{sort}([A, C])\\ \\ \begin{array}{l} t_0 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;B \leq -5.7 \cdot 10^{+144}:\\ \;\;\;\;2 \cdot \left(\sqrt{A \cdot F} \cdot \frac{1}{B}\right)\\ \mathbf{elif}\;B \leq -8.5 \cdot 10^{-71}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot \left(\left(B \cdot B\right) \cdot F\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 1.25 \cdot 10^{-75}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(t_0 \cdot F\right) \cdot \left(2 \cdot A\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(A - B\right)}\right)\\ \end{array} \end{array} \]
                                                      NOTE: A and C should be sorted in increasing order before calling this function.
                                                      (FPCore (A B C F)
                                                       :precision binary64
                                                       (let* ((t_0 (- (* B B) (* 4.0 (* A C)))))
                                                         (if (<= B -5.7e+144)
                                                           (* 2.0 (* (sqrt (* A F)) (/ 1.0 B)))
                                                           (if (<= B -8.5e-71)
                                                             (/ (- (sqrt (* 2.0 (* (- A (hypot A B)) (* (* B B) F))))) t_0)
                                                             (if (<= B 1.25e-75)
                                                               (/ (- (sqrt (* 2.0 (* (* t_0 F) (* 2.0 A))))) t_0)
                                                               (* (/ (sqrt 2.0) B) (- (sqrt (* F (- A B))))))))))
                                                      assert(A < C);
                                                      double code(double A, double B, double C, double F) {
                                                      	double t_0 = (B * B) - (4.0 * (A * C));
                                                      	double tmp;
                                                      	if (B <= -5.7e+144) {
                                                      		tmp = 2.0 * (sqrt((A * F)) * (1.0 / B));
                                                      	} else if (B <= -8.5e-71) {
                                                      		tmp = -sqrt((2.0 * ((A - hypot(A, B)) * ((B * B) * F)))) / t_0;
                                                      	} else if (B <= 1.25e-75) {
                                                      		tmp = -sqrt((2.0 * ((t_0 * F) * (2.0 * A)))) / t_0;
                                                      	} else {
                                                      		tmp = (sqrt(2.0) / B) * -sqrt((F * (A - B)));
                                                      	}
                                                      	return tmp;
                                                      }
                                                      
                                                      assert A < C;
                                                      public static double code(double A, double B, double C, double F) {
                                                      	double t_0 = (B * B) - (4.0 * (A * C));
                                                      	double tmp;
                                                      	if (B <= -5.7e+144) {
                                                      		tmp = 2.0 * (Math.sqrt((A * F)) * (1.0 / B));
                                                      	} else if (B <= -8.5e-71) {
                                                      		tmp = -Math.sqrt((2.0 * ((A - Math.hypot(A, B)) * ((B * B) * F)))) / t_0;
                                                      	} else if (B <= 1.25e-75) {
                                                      		tmp = -Math.sqrt((2.0 * ((t_0 * F) * (2.0 * A)))) / t_0;
                                                      	} else {
                                                      		tmp = (Math.sqrt(2.0) / B) * -Math.sqrt((F * (A - 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 <= -5.7e+144:
                                                      		tmp = 2.0 * (math.sqrt((A * F)) * (1.0 / B))
                                                      	elif B <= -8.5e-71:
                                                      		tmp = -math.sqrt((2.0 * ((A - math.hypot(A, B)) * ((B * B) * F)))) / t_0
                                                      	elif B <= 1.25e-75:
                                                      		tmp = -math.sqrt((2.0 * ((t_0 * F) * (2.0 * A)))) / t_0
                                                      	else:
                                                      		tmp = (math.sqrt(2.0) / B) * -math.sqrt((F * (A - 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 <= -5.7e+144)
                                                      		tmp = Float64(2.0 * Float64(sqrt(Float64(A * F)) * Float64(1.0 / B)));
                                                      	elseif (B <= -8.5e-71)
                                                      		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(Float64(A - hypot(A, B)) * Float64(Float64(B * B) * F))))) / t_0);
                                                      	elseif (B <= 1.25e-75)
                                                      		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(Float64(t_0 * F) * Float64(2.0 * A))))) / t_0);
                                                      	else
                                                      		tmp = Float64(Float64(sqrt(2.0) / B) * Float64(-sqrt(Float64(F * Float64(A - 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 <= -5.7e+144)
                                                      		tmp = 2.0 * (sqrt((A * F)) * (1.0 / B));
                                                      	elseif (B <= -8.5e-71)
                                                      		tmp = -sqrt((2.0 * ((A - hypot(A, B)) * ((B * B) * F)))) / t_0;
                                                      	elseif (B <= 1.25e-75)
                                                      		tmp = -sqrt((2.0 * ((t_0 * F) * (2.0 * A)))) / t_0;
                                                      	else
                                                      		tmp = (sqrt(2.0) / B) * -sqrt((F * (A - 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, -5.7e+144], N[(2.0 * N[(N[Sqrt[N[(A * F), $MachinePrecision]], $MachinePrecision] * N[(1.0 / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -8.5e-71], N[((-N[Sqrt[N[(2.0 * N[(N[(A - N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] * N[(N[(B * B), $MachinePrecision] * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], If[LessEqual[B, 1.25e-75], N[((-N[Sqrt[N[(2.0 * N[(N[(t$95$0 * F), $MachinePrecision] * N[(2.0 * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B), $MachinePrecision] * (-N[Sqrt[N[(F * N[(A - B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]]]]]
                                                      
                                                      \begin{array}{l}
                                                      [A, C] = \mathsf{sort}([A, C])\\
                                                      \\
                                                      \begin{array}{l}
                                                      t_0 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\
                                                      \mathbf{if}\;B \leq -5.7 \cdot 10^{+144}:\\
                                                      \;\;\;\;2 \cdot \left(\sqrt{A \cdot F} \cdot \frac{1}{B}\right)\\
                                                      
                                                      \mathbf{elif}\;B \leq -8.5 \cdot 10^{-71}:\\
                                                      \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot \left(\left(B \cdot B\right) \cdot F\right)\right)}}{t_0}\\
                                                      
                                                      \mathbf{elif}\;B \leq 1.25 \cdot 10^{-75}:\\
                                                      \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(t_0 \cdot F\right) \cdot \left(2 \cdot A\right)\right)}}{t_0}\\
                                                      
                                                      \mathbf{else}:\\
                                                      \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(A - B\right)}\right)\\
                                                      
                                                      
                                                      \end{array}
                                                      \end{array}
                                                      
                                                      Derivation
                                                      1. Split input into 4 regimes
                                                      2. if B < -5.70000000000000005e144

                                                        1. Initial program 0.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. Simplified0.1%

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

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

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

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

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

                                                          if -5.70000000000000005e144 < B < -8.49999999999999988e-71

                                                          1. Initial program 38.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. Simplified38.0%

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

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

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

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

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

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

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

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

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

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

                                                            if -8.49999999999999988e-71 < B < 1.24999999999999995e-75

                                                            1. Initial program 17.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. Simplified17.8%

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

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

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

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

                                                              if 1.24999999999999995e-75 < B

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                1. Initial program 0.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. Simplified0.1%

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

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

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

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

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

                                                                  if -1.89999999999999985e147 < B < -8.49999999999999988e-71

                                                                  1. Initial program 38.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. Simplified38.0%

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

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

                                                                    if -8.49999999999999988e-71 < B < 2.40000000000000019e-75

                                                                    1. Initial program 17.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. Simplified17.8%

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

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

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

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

                                                                      if 2.40000000000000019e-75 < B

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                        \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -1.9 \cdot 10^{+147}:\\ \;\;\;\;2 \cdot \left(\sqrt{A \cdot F} \cdot \frac{1}{B}\right)\\ \mathbf{elif}\;B \leq -8.5 \cdot 10^{-71}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(A + \left(B + C\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \mathbf{elif}\;B \leq 2.4 \cdot 10^{-75}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(2 \cdot A\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(A - B\right)}\right)\\ \end{array} \]

                                                                      Alternative 10: 35.2% accurate, 2.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 := t_0 \cdot F\\ \mathbf{if}\;B \leq -9.8 \cdot 10^{+151}:\\ \;\;\;\;2 \cdot \left(\sqrt{A \cdot F} \cdot \frac{1}{B}\right)\\ \mathbf{elif}\;B \leq -8.5 \cdot 10^{-71}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(t_1 \cdot \left(A + \left(B + C\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 2.75 \cdot 10^{-75}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(2 \cdot A\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{B \cdot \left(-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) (* 4.0 (* A C)))) (t_1 (* t_0 F)))
                                                                         (if (<= B -9.8e+151)
                                                                           (* 2.0 (* (sqrt (* A F)) (/ 1.0 B)))
                                                                           (if (<= B -8.5e-71)
                                                                             (- (/ (sqrt (* 2.0 (* t_1 (+ A (+ B C))))) t_0))
                                                                             (if (<= B 2.75e-75)
                                                                               (/ (- (sqrt (* 2.0 (* t_1 (* 2.0 A))))) 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 t_1 = t_0 * F;
                                                                      	double tmp;
                                                                      	if (B <= -9.8e+151) {
                                                                      		tmp = 2.0 * (sqrt((A * F)) * (1.0 / B));
                                                                      	} else if (B <= -8.5e-71) {
                                                                      		tmp = -(sqrt((2.0 * (t_1 * (A + (B + C))))) / t_0);
                                                                      	} else if (B <= 2.75e-75) {
                                                                      		tmp = -sqrt((2.0 * (t_1 * (2.0 * A)))) / 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) :: t_1
                                                                          real(8) :: tmp
                                                                          t_0 = (b * b) - (4.0d0 * (a * c))
                                                                          t_1 = t_0 * f
                                                                          if (b <= (-9.8d+151)) then
                                                                              tmp = 2.0d0 * (sqrt((a * f)) * (1.0d0 / b))
                                                                          else if (b <= (-8.5d-71)) then
                                                                              tmp = -(sqrt((2.0d0 * (t_1 * (a + (b + c))))) / t_0)
                                                                          else if (b <= 2.75d-75) then
                                                                              tmp = -sqrt((2.0d0 * (t_1 * (2.0d0 * a)))) / 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 t_1 = t_0 * F;
                                                                      	double tmp;
                                                                      	if (B <= -9.8e+151) {
                                                                      		tmp = 2.0 * (Math.sqrt((A * F)) * (1.0 / B));
                                                                      	} else if (B <= -8.5e-71) {
                                                                      		tmp = -(Math.sqrt((2.0 * (t_1 * (A + (B + C))))) / t_0);
                                                                      	} else if (B <= 2.75e-75) {
                                                                      		tmp = -Math.sqrt((2.0 * (t_1 * (2.0 * A)))) / 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))
                                                                      	t_1 = t_0 * F
                                                                      	tmp = 0
                                                                      	if B <= -9.8e+151:
                                                                      		tmp = 2.0 * (math.sqrt((A * F)) * (1.0 / B))
                                                                      	elif B <= -8.5e-71:
                                                                      		tmp = -(math.sqrt((2.0 * (t_1 * (A + (B + C))))) / t_0)
                                                                      	elif B <= 2.75e-75:
                                                                      		tmp = -math.sqrt((2.0 * (t_1 * (2.0 * A)))) / 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)))
                                                                      	t_1 = Float64(t_0 * F)
                                                                      	tmp = 0.0
                                                                      	if (B <= -9.8e+151)
                                                                      		tmp = Float64(2.0 * Float64(sqrt(Float64(A * F)) * Float64(1.0 / B)));
                                                                      	elseif (B <= -8.5e-71)
                                                                      		tmp = Float64(-Float64(sqrt(Float64(2.0 * Float64(t_1 * Float64(A + Float64(B + C))))) / t_0));
                                                                      	elseif (B <= 2.75e-75)
                                                                      		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(t_1 * Float64(2.0 * A))))) / t_0);
                                                                      	else
                                                                      		tmp = Float64(Float64(sqrt(2.0) / B) * Float64(-sqrt(Float64(B * Float64(-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));
                                                                      	t_1 = t_0 * F;
                                                                      	tmp = 0.0;
                                                                      	if (B <= -9.8e+151)
                                                                      		tmp = 2.0 * (sqrt((A * F)) * (1.0 / B));
                                                                      	elseif (B <= -8.5e-71)
                                                                      		tmp = -(sqrt((2.0 * (t_1 * (A + (B + C))))) / t_0);
                                                                      	elseif (B <= 2.75e-75)
                                                                      		tmp = -sqrt((2.0 * (t_1 * (2.0 * A)))) / 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]}, Block[{t$95$1 = N[(t$95$0 * F), $MachinePrecision]}, If[LessEqual[B, -9.8e+151], N[(2.0 * N[(N[Sqrt[N[(A * F), $MachinePrecision]], $MachinePrecision] * N[(1.0 / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -8.5e-71], (-N[(N[Sqrt[N[(2.0 * N[(t$95$1 * N[(A + N[(B + C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision]), If[LessEqual[B, 2.75e-75], N[((-N[Sqrt[N[(2.0 * N[(t$95$1 * N[(2.0 * A), $MachinePrecision]), $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)\\
                                                                      t_1 := t_0 \cdot F\\
                                                                      \mathbf{if}\;B \leq -9.8 \cdot 10^{+151}:\\
                                                                      \;\;\;\;2 \cdot \left(\sqrt{A \cdot F} \cdot \frac{1}{B}\right)\\
                                                                      
                                                                      \mathbf{elif}\;B \leq -8.5 \cdot 10^{-71}:\\
                                                                      \;\;\;\;-\frac{\sqrt{2 \cdot \left(t_1 \cdot \left(A + \left(B + C\right)\right)\right)}}{t_0}\\
                                                                      
                                                                      \mathbf{elif}\;B \leq 2.75 \cdot 10^{-75}:\\
                                                                      \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(2 \cdot A\right)\right)}}{t_0}\\
                                                                      
                                                                      \mathbf{else}:\\
                                                                      \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{B \cdot \left(-F\right)}\right)\\
                                                                      
                                                                      
                                                                      \end{array}
                                                                      \end{array}
                                                                      
                                                                      Derivation
                                                                      1. Split input into 4 regimes
                                                                      2. if B < -9.7999999999999998e151

                                                                        1. Initial program 0.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. Simplified0.1%

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

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

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

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

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

                                                                          if -9.7999999999999998e151 < B < -8.49999999999999988e-71

                                                                          1. Initial program 38.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. Simplified38.0%

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

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

                                                                            if -8.49999999999999988e-71 < B < 2.75000000000000013e-75

                                                                            1. Initial program 17.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. Simplified17.8%

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

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

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

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

                                                                              if 2.75000000000000013e-75 < B

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -9.8 \cdot 10^{+151}:\\ \;\;\;\;2 \cdot \left(\sqrt{A \cdot F} \cdot \frac{1}{B}\right)\\ \mathbf{elif}\;B \leq -8.5 \cdot 10^{-71}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(A + \left(B + C\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \mathbf{elif}\;B \leq 2.75 \cdot 10^{-75}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(2 \cdot A\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{B \cdot \left(-F\right)}\right)\\ \end{array} \]

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

                                                                                1. Initial program 0.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. Simplified0.1%

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

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

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

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

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

                                                                                  if -2.70000000000000015e152 < B < -8.19999999999999987e-71

                                                                                  1. Initial program 38.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. Simplified38.0%

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

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

                                                                                    if -8.19999999999999987e-71 < B < 5.6000000000000002e-76

                                                                                    1. Initial program 17.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. Simplified17.8%

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

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

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

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

                                                                                      if 5.6000000000000002e-76 < B

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

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

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

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

                                                                                      Alternative 12: 27.5% accurate, 4.7× speedup?

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

                                                                                        1. Initial program 0.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. Simplified0.1%

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

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

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

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

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

                                                                                          if -5.0999999999999999e144 < B < -6.80000000000000007e-71

                                                                                          1. Initial program 37.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. Simplified37.2%

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

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

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

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

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

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

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

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

                                                                                            if -6.80000000000000007e-71 < B < 1.85000000000000012e-75

                                                                                            1. Initial program 17.9%

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

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

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

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

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

                                                                                              if 1.85000000000000012e-75 < B

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

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

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

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

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

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

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

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

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

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

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

                                                                                                \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -5.1 \cdot 10^{+144}:\\ \;\;\;\;2 \cdot \left(\sqrt{A \cdot F} \cdot \frac{1}{B}\right)\\ \mathbf{elif}\;B \leq -6.8 \cdot 10^{-71}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(B \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)}\\ \mathbf{elif}\;B \leq 1.85 \cdot 10^{-75}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(2 \cdot A\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \mathbf{else}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(B \cdot \left(F \cdot \left(4 \cdot \left(A \cdot C\right) - B \cdot B\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \end{array} \]

                                                                                              Alternative 13: 27.3% accurate, 4.7× speedup?

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

                                                                                                1. Initial program 0.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. Simplified0.1%

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

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

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

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

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

                                                                                                  if -3.55000000000000021e143 < B < -6.80000000000000007e-71

                                                                                                  1. Initial program 37.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. Simplified37.2%

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

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

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

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

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

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

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

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

                                                                                                    if -6.80000000000000007e-71 < B < 2.75000000000000013e-75

                                                                                                    1. Initial program 17.9%

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

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

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

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

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

                                                                                                      if 2.75000000000000013e-75 < B

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

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

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

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

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

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

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

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

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

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

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

                                                                                                        \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -3.55 \cdot 10^{+143}:\\ \;\;\;\;2 \cdot \left(\sqrt{A \cdot F} \cdot \frac{1}{B}\right)\\ \mathbf{elif}\;B \leq -6.8 \cdot 10^{-71}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(B + C\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \mathbf{elif}\;B \leq 2.75 \cdot 10^{-75}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(2 \cdot A\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \mathbf{else}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(B \cdot \left(F \cdot \left(4 \cdot \left(A \cdot C\right) - B \cdot B\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \end{array} \]

                                                                                                      Alternative 14: 27.6% accurate, 4.7× speedup?

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

                                                                                                        1. Initial program 0.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. Simplified0.1%

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

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

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

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

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

                                                                                                          if -2.1000000000000002e152 < B < -8.49999999999999988e-71

                                                                                                          1. Initial program 38.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. Simplified38.0%

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

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

                                                                                                            if -8.49999999999999988e-71 < B < 1.24999999999999995e-75

                                                                                                            1. Initial program 17.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. Simplified17.8%

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

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

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

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

                                                                                                              if 1.24999999999999995e-75 < B

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                              Alternative 15: 27.2% accurate, 4.8× speedup?

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

                                                                                                                1. Initial program 0.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. Simplified0.1%

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

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

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

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

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

                                                                                                                  if -2.39999999999999995e148 < B < -6.80000000000000007e-71

                                                                                                                  1. Initial program 37.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. Simplified37.2%

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

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

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

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

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

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

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

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

                                                                                                                    if -6.80000000000000007e-71 < B < 2.49999999999999989e-75

                                                                                                                    1. Initial program 17.9%

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

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

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

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

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

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

                                                                                                                      if 2.49999999999999989e-75 < B

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

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

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

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

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

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

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

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

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

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

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

                                                                                                                        \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -2.4 \cdot 10^{+148}:\\ \;\;\;\;2 \cdot \left(\sqrt{A \cdot F} \cdot \frac{1}{B}\right)\\ \mathbf{elif}\;B \leq -6.8 \cdot 10^{-71}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(B \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)}\\ \mathbf{elif}\;B \leq 2.5 \cdot 10^{-75}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(\left(2 \cdot A\right) \cdot \left(F \cdot \left(\left(A \cdot C\right) \cdot -4\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \mathbf{else}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(B \cdot \left(F \cdot \left(4 \cdot \left(A \cdot C\right) - B \cdot B\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \end{array} \]

                                                                                                                      Alternative 16: 28.1% accurate, 4.9× speedup?

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

                                                                                                                        1. Initial program 0.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. Simplified0.1%

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

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

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

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

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

                                                                                                                          if -1.6999999999999999e149 < B < -5.90000000000000002e-71

                                                                                                                          1. Initial program 37.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. Simplified37.2%

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

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

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

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

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

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

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

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

                                                                                                                            if -5.90000000000000002e-71 < B < 1.66e22

                                                                                                                            1. Initial program 20.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. Simplified20.4%

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

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

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

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

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

                                                                                                                              if 1.66e22 < B

                                                                                                                              1. Initial program 20.0%

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                                                  \[\leadsto \frac{-\color{blue}{\sqrt[3]{\left(\left(2 \cdot \left(\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right) \cdot F\right)\right) \cdot \left(2 \cdot A\right)\right) \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 A\right)}}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                                                                                                                7. Step-by-step derivation
                                                                                                                                  1. associate-*l*1.0%

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

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

                                                                                                                                    \[\leadsto \frac{-\sqrt[3]{\left(2 \cdot \left(\mathsf{fma}\left(B, B, -4 \cdot \left(A \cdot C\right)\right) \cdot F\right)\right) \cdot \left(\left(2 \cdot A\right) \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 A\right)\right)}}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                                                                                                                  4. associate-*r*1.2%

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

                                                                                                                                    \[\leadsto \frac{-\sqrt[3]{\left(2 \cdot \left(\mathsf{fma}\left(B, B, -4 \cdot \left(A \cdot C\right)\right) \cdot F\right)\right) \cdot \left(\left(2 \cdot A\right) \cdot \sqrt{2 \cdot \left(\color{blue}{\mathsf{fma}\left(B, B, -4 \cdot \left(A \cdot C\right)\right)} \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                                                                                                                  6. associate-*r*1.2%

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

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

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

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

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

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

                                                                                                                                \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -1.7 \cdot 10^{+149}:\\ \;\;\;\;2 \cdot \left(\sqrt{A \cdot F} \cdot \frac{1}{B}\right)\\ \mathbf{elif}\;B \leq -5.9 \cdot 10^{-71}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(B \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)}\\ \mathbf{elif}\;B \leq 1.66 \cdot 10^{+22}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(\left(2 \cdot A\right) \cdot \left(F \cdot \left(\left(A \cdot C\right) \cdot -4\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \frac{\sqrt{A \cdot F}}{B}\\ \end{array} \]

                                                                                                                              Alternative 17: 27.0% accurate, 4.9× speedup?

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

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

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

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

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

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

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

                                                                                                                                  if -8.1999999999999993e44 < B < 1.89999999999999987e23

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

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

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

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

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

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

                                                                                                                                    if 1.89999999999999987e23 < B

                                                                                                                                    1. Initial program 20.0%

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                                                        \[\leadsto \frac{-\color{blue}{\sqrt[3]{\left(\left(2 \cdot \left(\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right) \cdot F\right)\right) \cdot \left(2 \cdot A\right)\right) \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 A\right)}}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                                                                                                                      7. Step-by-step derivation
                                                                                                                                        1. associate-*l*1.0%

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

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

                                                                                                                                          \[\leadsto \frac{-\sqrt[3]{\left(2 \cdot \left(\mathsf{fma}\left(B, B, -4 \cdot \left(A \cdot C\right)\right) \cdot F\right)\right) \cdot \left(\left(2 \cdot A\right) \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 A\right)\right)}}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                                                                                                                        4. associate-*r*1.2%

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

                                                                                                                                          \[\leadsto \frac{-\sqrt[3]{\left(2 \cdot \left(\mathsf{fma}\left(B, B, -4 \cdot \left(A \cdot C\right)\right) \cdot F\right)\right) \cdot \left(\left(2 \cdot A\right) \cdot \sqrt{2 \cdot \left(\color{blue}{\mathsf{fma}\left(B, B, -4 \cdot \left(A \cdot C\right)\right)} \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                                                                                                                        6. associate-*r*1.2%

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

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

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

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

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

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

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

                                                                                                                                    Alternative 18: 19.2% accurate, 5.0× speedup?

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

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

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

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

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

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

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

                                                                                                                                        if -8.7999999999999999e30 < B < 1.55000000000000005e-40

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                                                          if 1.55000000000000005e-40 < B

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                                                              \[\leadsto \frac{-\color{blue}{\sqrt[3]{\left(\left(2 \cdot \left(\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right) \cdot F\right)\right) \cdot \left(2 \cdot A\right)\right) \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 A\right)}}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                                                                                                                            7. Step-by-step derivation
                                                                                                                                              1. associate-*l*4.3%

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

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

                                                                                                                                                \[\leadsto \frac{-\sqrt[3]{\left(2 \cdot \left(\mathsf{fma}\left(B, B, -4 \cdot \left(A \cdot C\right)\right) \cdot F\right)\right) \cdot \left(\left(2 \cdot A\right) \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 A\right)\right)}}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                                                                                                                              4. associate-*r*4.5%

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

                                                                                                                                                \[\leadsto \frac{-\sqrt[3]{\left(2 \cdot \left(\mathsf{fma}\left(B, B, -4 \cdot \left(A \cdot C\right)\right) \cdot F\right)\right) \cdot \left(\left(2 \cdot A\right) \cdot \sqrt{2 \cdot \left(\color{blue}{\mathsf{fma}\left(B, B, -4 \cdot \left(A \cdot C\right)\right)} \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                                                                                                                              6. associate-*r*4.5%

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

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

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

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

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

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

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

                                                                                                                                          Alternative 19: 8.6% accurate, 5.7× speedup?

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

                                                                                                                                            1. Initial program 17.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. Simplified17.1%

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

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

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

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

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

                                                                                                                                              if -1.999999999999994e-310 < B

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                                                                  \[\leadsto \frac{-\color{blue}{\sqrt[3]{\left(\left(2 \cdot \left(\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right) \cdot F\right)\right) \cdot \left(2 \cdot A\right)\right) \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 A\right)}}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                                                                                                                                7. Step-by-step derivation
                                                                                                                                                  1. associate-*l*13.6%

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

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

                                                                                                                                                    \[\leadsto \frac{-\sqrt[3]{\left(2 \cdot \left(\mathsf{fma}\left(B, B, -4 \cdot \left(A \cdot C\right)\right) \cdot F\right)\right) \cdot \left(\left(2 \cdot A\right) \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 A\right)\right)}}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                                                                                                                                  4. associate-*r*13.7%

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

                                                                                                                                                    \[\leadsto \frac{-\sqrt[3]{\left(2 \cdot \left(\mathsf{fma}\left(B, B, -4 \cdot \left(A \cdot C\right)\right) \cdot F\right)\right) \cdot \left(\left(2 \cdot A\right) \cdot \sqrt{2 \cdot \left(\color{blue}{\mathsf{fma}\left(B, B, -4 \cdot \left(A \cdot C\right)\right)} \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                                                                                                                                  6. associate-*r*13.7%

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

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

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

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

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

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

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

                                                                                                                                              Alternative 20: 8.6% accurate, 5.8× speedup?

                                                                                                                                              \[\begin{array}{l} [A, C] = \mathsf{sort}([A, C])\\ \\ \begin{array}{l} t_0 := \frac{\sqrt{A \cdot F}}{B}\\ \mathbf{if}\;B \leq -2 \cdot 10^{-310}:\\ \;\;\;\;2 \cdot t_0\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot 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 (/ (sqrt (* A F)) B)))
                                                                                                                                                 (if (<= B -2e-310) (* 2.0 t_0) (* -2.0 t_0))))
                                                                                                                                              assert(A < C);
                                                                                                                                              double code(double A, double B, double C, double F) {
                                                                                                                                              	double t_0 = sqrt((A * F)) / B;
                                                                                                                                              	double tmp;
                                                                                                                                              	if (B <= -2e-310) {
                                                                                                                                              		tmp = 2.0 * t_0;
                                                                                                                                              	} else {
                                                                                                                                              		tmp = -2.0 * t_0;
                                                                                                                                              	}
                                                                                                                                              	return tmp;
                                                                                                                                              }
                                                                                                                                              
                                                                                                                                              NOTE: A and C should be sorted in increasing order before calling this function.
                                                                                                                                              real(8) function code(a, b, c, f)
                                                                                                                                                  real(8), intent (in) :: a
                                                                                                                                                  real(8), intent (in) :: b
                                                                                                                                                  real(8), intent (in) :: c
                                                                                                                                                  real(8), intent (in) :: f
                                                                                                                                                  real(8) :: t_0
                                                                                                                                                  real(8) :: tmp
                                                                                                                                                  t_0 = sqrt((a * f)) / b
                                                                                                                                                  if (b <= (-2d-310)) then
                                                                                                                                                      tmp = 2.0d0 * t_0
                                                                                                                                                  else
                                                                                                                                                      tmp = (-2.0d0) * 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 = Math.sqrt((A * F)) / B;
                                                                                                                                              	double tmp;
                                                                                                                                              	if (B <= -2e-310) {
                                                                                                                                              		tmp = 2.0 * t_0;
                                                                                                                                              	} else {
                                                                                                                                              		tmp = -2.0 * t_0;
                                                                                                                                              	}
                                                                                                                                              	return tmp;
                                                                                                                                              }
                                                                                                                                              
                                                                                                                                              [A, C] = sort([A, C])
                                                                                                                                              def code(A, B, C, F):
                                                                                                                                              	t_0 = math.sqrt((A * F)) / B
                                                                                                                                              	tmp = 0
                                                                                                                                              	if B <= -2e-310:
                                                                                                                                              		tmp = 2.0 * t_0
                                                                                                                                              	else:
                                                                                                                                              		tmp = -2.0 * t_0
                                                                                                                                              	return tmp
                                                                                                                                              
                                                                                                                                              A, C = sort([A, C])
                                                                                                                                              function code(A, B, C, F)
                                                                                                                                              	t_0 = Float64(sqrt(Float64(A * F)) / B)
                                                                                                                                              	tmp = 0.0
                                                                                                                                              	if (B <= -2e-310)
                                                                                                                                              		tmp = Float64(2.0 * t_0);
                                                                                                                                              	else
                                                                                                                                              		tmp = Float64(-2.0 * t_0);
                                                                                                                                              	end
                                                                                                                                              	return tmp
                                                                                                                                              end
                                                                                                                                              
                                                                                                                                              A, C = num2cell(sort([A, C])){:}
                                                                                                                                              function tmp_2 = code(A, B, C, F)
                                                                                                                                              	t_0 = sqrt((A * F)) / B;
                                                                                                                                              	tmp = 0.0;
                                                                                                                                              	if (B <= -2e-310)
                                                                                                                                              		tmp = 2.0 * t_0;
                                                                                                                                              	else
                                                                                                                                              		tmp = -2.0 * 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[Sqrt[N[(A * F), $MachinePrecision]], $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[B, -2e-310], N[(2.0 * t$95$0), $MachinePrecision], N[(-2.0 * t$95$0), $MachinePrecision]]]
                                                                                                                                              
                                                                                                                                              \begin{array}{l}
                                                                                                                                              [A, C] = \mathsf{sort}([A, C])\\
                                                                                                                                              \\
                                                                                                                                              \begin{array}{l}
                                                                                                                                              t_0 := \frac{\sqrt{A \cdot F}}{B}\\
                                                                                                                                              \mathbf{if}\;B \leq -2 \cdot 10^{-310}:\\
                                                                                                                                              \;\;\;\;2 \cdot t_0\\
                                                                                                                                              
                                                                                                                                              \mathbf{else}:\\
                                                                                                                                              \;\;\;\;-2 \cdot t_0\\
                                                                                                                                              
                                                                                                                                              
                                                                                                                                              \end{array}
                                                                                                                                              \end{array}
                                                                                                                                              
                                                                                                                                              Derivation
                                                                                                                                              1. Split input into 2 regimes
                                                                                                                                              2. if B < -1.999999999999994e-310

                                                                                                                                                1. Initial program 17.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. Simplified17.1%

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

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

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

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

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

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

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

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

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

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

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

                                                                                                                                                    \[\leadsto \frac{-\color{blue}{\sqrt[3]{\left(\left(2 \cdot \left(\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right) \cdot F\right)\right) \cdot \left(2 \cdot A\right)\right) \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 A\right)}}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                                                                                                                                  7. Step-by-step derivation
                                                                                                                                                    1. associate-*l*9.9%

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

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

                                                                                                                                                      \[\leadsto \frac{-\sqrt[3]{\left(2 \cdot \left(\mathsf{fma}\left(B, B, -4 \cdot \left(A \cdot C\right)\right) \cdot F\right)\right) \cdot \left(\left(2 \cdot A\right) \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 A\right)\right)}}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                                                                                                                                    4. associate-*r*10.0%

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

                                                                                                                                                      \[\leadsto \frac{-\sqrt[3]{\left(2 \cdot \left(\mathsf{fma}\left(B, B, -4 \cdot \left(A \cdot C\right)\right) \cdot F\right)\right) \cdot \left(\left(2 \cdot A\right) \cdot \sqrt{2 \cdot \left(\color{blue}{\mathsf{fma}\left(B, B, -4 \cdot \left(A \cdot C\right)\right)} \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                                                                                                                                    6. associate-*r*10.0%

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

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

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

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

                                                                                                                                                      \[\leadsto 2 \cdot \frac{\color{blue}{\sqrt{A \cdot F}}}{B} \]
                                                                                                                                                  11. Simplified4.3%

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

                                                                                                                                                  if -1.999999999999994e-310 < B

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                                                                      \[\leadsto \frac{-\color{blue}{\sqrt[3]{\left(\left(2 \cdot \left(\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right) \cdot F\right)\right) \cdot \left(2 \cdot A\right)\right) \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 A\right)}}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                                                                                                                                    7. Step-by-step derivation
                                                                                                                                                      1. associate-*l*13.6%

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

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

                                                                                                                                                        \[\leadsto \frac{-\sqrt[3]{\left(2 \cdot \left(\mathsf{fma}\left(B, B, -4 \cdot \left(A \cdot C\right)\right) \cdot F\right)\right) \cdot \left(\left(2 \cdot A\right) \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 A\right)\right)}}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                                                                                                                                      4. associate-*r*13.7%

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

                                                                                                                                                        \[\leadsto \frac{-\sqrt[3]{\left(2 \cdot \left(\mathsf{fma}\left(B, B, -4 \cdot \left(A \cdot C\right)\right) \cdot F\right)\right) \cdot \left(\left(2 \cdot A\right) \cdot \sqrt{2 \cdot \left(\color{blue}{\mathsf{fma}\left(B, B, -4 \cdot \left(A \cdot C\right)\right)} \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                                                                                                                                      6. associate-*r*13.7%

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

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

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

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

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

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

                                                                                                                                                    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -2 \cdot 10^{-310}:\\ \;\;\;\;2 \cdot \frac{\sqrt{A \cdot F}}{B}\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \frac{\sqrt{A \cdot F}}{B}\\ \end{array} \]

                                                                                                                                                  Alternative 21: 5.3% accurate, 5.9× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                                                                      \[\leadsto \frac{-\color{blue}{\sqrt[3]{\left(\left(2 \cdot \left(\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right) \cdot F\right)\right) \cdot \left(2 \cdot A\right)\right) \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 A\right)}}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                                                                                                                                    7. Step-by-step derivation
                                                                                                                                                      1. associate-*l*11.7%

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

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

                                                                                                                                                        \[\leadsto \frac{-\sqrt[3]{\left(2 \cdot \left(\mathsf{fma}\left(B, B, -4 \cdot \left(A \cdot C\right)\right) \cdot F\right)\right) \cdot \left(\left(2 \cdot A\right) \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 A\right)\right)}}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                                                                                                                                      4. associate-*r*11.8%

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

                                                                                                                                                        \[\leadsto \frac{-\sqrt[3]{\left(2 \cdot \left(\mathsf{fma}\left(B, B, -4 \cdot \left(A \cdot C\right)\right) \cdot F\right)\right) \cdot \left(\left(2 \cdot A\right) \cdot \sqrt{2 \cdot \left(\color{blue}{\mathsf{fma}\left(B, B, -4 \cdot \left(A \cdot C\right)\right)} \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                                                                                                                                      6. associate-*r*11.8%

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

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

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

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

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

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

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

                                                                                                                                                    Alternative 22: 1.9% accurate, 6.0× speedup?

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

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

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

                                                                                                                                                          \[\leadsto \frac{-\sqrt{F \cdot \left(\left(A - \left(A + \color{blue}{\mathsf{fma}\left(-2, C, -0.5 \cdot \frac{{B}^{2}}{C} + -0.5 \cdot \frac{A \cdot {B}^{2}}{{C}^{2}}\right)}\right)\right) \cdot \mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]
                                                                                                                                                        2. distribute-lft-out4.7%

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

                                                                                                                                                          \[\leadsto \frac{-\sqrt{F \cdot \left(\left(A - \left(A + \mathsf{fma}\left(-2, C, -0.5 \cdot \left(\frac{\color{blue}{B \cdot B}}{C} + \frac{A \cdot {B}^{2}}{{C}^{2}}\right)\right)\right)\right) \cdot \mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]
                                                                                                                                                        4. associate-/l*4.8%

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

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

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

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

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

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

                                                                                                                                                          \[\leadsto -\sqrt{A \cdot F} \cdot \frac{\color{blue}{\sqrt{-1} \cdot \sqrt{-1}}}{C} \]
                                                                                                                                                        3. rem-square-sqrt1.6%

                                                                                                                                                          \[\leadsto -\sqrt{A \cdot F} \cdot \frac{\color{blue}{-1}}{C} \]
                                                                                                                                                      7. Simplified1.6%

                                                                                                                                                        \[\leadsto \color{blue}{-\sqrt{A \cdot F} \cdot \frac{-1}{C}} \]
                                                                                                                                                      8. Taylor expanded in C around 0 1.6%

                                                                                                                                                        \[\leadsto -\color{blue}{-1 \cdot \left(\sqrt{A \cdot F} \cdot \frac{1}{C}\right)} \]
                                                                                                                                                      9. Step-by-step derivation
                                                                                                                                                        1. mul-1-neg1.6%

                                                                                                                                                          \[\leadsto -\color{blue}{\left(-\sqrt{A \cdot F} \cdot \frac{1}{C}\right)} \]
                                                                                                                                                        2. associate-*r/1.6%

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

                                                                                                                                                          \[\leadsto -\left(-\frac{\color{blue}{\sqrt{A \cdot F}}}{C}\right) \]
                                                                                                                                                        4. distribute-neg-frac1.6%

                                                                                                                                                          \[\leadsto -\color{blue}{\frac{-\sqrt{A \cdot F}}{C}} \]
                                                                                                                                                      10. Simplified1.6%

                                                                                                                                                        \[\leadsto -\color{blue}{\frac{-\sqrt{A \cdot F}}{C}} \]
                                                                                                                                                      11. Final simplification1.6%

                                                                                                                                                        \[\leadsto \frac{\sqrt{A \cdot F}}{C} \]

                                                                                                                                                      Reproduce

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