ABCF->ab-angle b

Percentage Accurate: 18.6% → 48.2%
Time: 26.1s
Alternatives: 14
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 14 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.6% accurate, 1.0× speedup?

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

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

Alternative 1: 48.2% accurate, 1.2× speedup?

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

\mathbf{elif}\;B \leq -4.8 \cdot 10^{-21}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;B \leq 2.7 \cdot 10^{-33}:\\
\;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}{B \cdot B - 4 \cdot \left(C \cdot A\right)}\\

\mathbf{elif}\;B \leq 2.5 \cdot 10^{+133}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if B < -7.0000000000000002e146

    1. Initial program 0.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. Simplified0.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. Step-by-step derivation
        1. div-inv0.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(\left(A + C\right) - \sqrt{B \cdot B + {\left(A - C\right)}^{2}}\right)\right)}\right) \cdot \frac{1}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
      3. Applied egg-rr0.3%

        \[\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 + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)\right)}\right) \cdot \frac{1}{B \cdot B + -4 \cdot \left(A \cdot C\right)}} \]
      4. Taylor expanded in B around -inf 0.2%

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

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

          \[\leadsto \color{blue}{-\sqrt{2} \cdot \sqrt{\frac{F}{B}}} \]
        2. distribute-rgt-neg-in72.1%

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

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

      if -7.0000000000000002e146 < B < -4.7999999999999999e-21 or 2.7000000000000001e-33 < B < 2.4999999999999998e133

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\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 -4.7999999999999999e-21 < B < 2.7000000000000001e-33

        1. Initial program 21.8%

          \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
        2. Step-by-step derivation
          1. Simplified21.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 33.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. *-commutative33.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. Simplified33.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. *-un-lft-identity33.0%

              \[\leadsto \frac{-\color{blue}{1 \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. associate-*l*32.3%

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

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

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

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

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

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

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

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

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

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

          if 2.4999999999999998e133 < B

          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 C around 0 2.5%

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

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

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

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

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

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

                \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A - \color{blue}{\mathsf{hypot}\left(A, B\right)}\right)} \]
            4. Simplified40.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 simplification43.0%

            \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -7 \cdot 10^{+146}:\\ \;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\ \mathbf{elif}\;B \leq -4.8 \cdot 10^{-21}:\\ \;\;\;\;\frac{\sqrt{\mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)} \cdot \left(-\sqrt{2 \cdot \left(F \cdot \left(A + \left(C - \mathsf{hypot}\left(A - C, B\right)\right)\right)\right)}\right)}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}\\ \mathbf{elif}\;B \leq 2.7 \cdot 10^{-33}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}{B \cdot B - 4 \cdot \left(C \cdot A\right)}\\ \mathbf{elif}\;B \leq 2.5 \cdot 10^{+133}:\\ \;\;\;\;\frac{\sqrt{\mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)} \cdot \left(-\sqrt{2 \cdot \left(F \cdot \left(A + \left(C - \mathsf{hypot}\left(A - C, B\right)\right)\right)\right)}\right)}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(A - \mathsf{hypot}\left(A, B\right)\right)}\right)\\ \end{array} \]

          Alternative 2: 45.5% accurate, 2.0× speedup?

          \[\begin{array}{l} [A, C] = \mathsf{sort}([A, C])\\ \\ \begin{array}{l} \mathbf{if}\;B \leq -260000000000:\\ \;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\ \mathbf{elif}\;B \leq 2.9 \cdot 10^{-32}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}{B \cdot B - 4 \cdot \left(C \cdot A\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(A - \mathsf{hypot}\left(A, B\right)\right)}\right)\\ \end{array} \end{array} \]
          NOTE: A and C should be sorted in increasing order before calling this function.
          (FPCore (A B C F)
           :precision binary64
           (if (<= B -260000000000.0)
             (* (sqrt 2.0) (- (sqrt (/ F B))))
             (if (<= B 2.9e-32)
               (/
                (- (sqrt (* 2.0 (* (fma B B (* A (* C -4.0))) (* F (* 2.0 A))))))
                (- (* B B) (* 4.0 (* C A))))
               (* (/ (sqrt 2.0) B) (- (sqrt (* F (- A (hypot A B)))))))))
          assert(A < C);
          double code(double A, double B, double C, double F) {
          	double tmp;
          	if (B <= -260000000000.0) {
          		tmp = sqrt(2.0) * -sqrt((F / B));
          	} else if (B <= 2.9e-32) {
          		tmp = -sqrt((2.0 * (fma(B, B, (A * (C * -4.0))) * (F * (2.0 * A))))) / ((B * B) - (4.0 * (C * A)));
          	} else {
          		tmp = (sqrt(2.0) / B) * -sqrt((F * (A - hypot(A, B))));
          	}
          	return tmp;
          }
          
          A, C = sort([A, C])
          function code(A, B, C, F)
          	tmp = 0.0
          	if (B <= -260000000000.0)
          		tmp = Float64(sqrt(2.0) * Float64(-sqrt(Float64(F / B))));
          	elseif (B <= 2.9e-32)
          		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(fma(B, B, Float64(A * Float64(C * -4.0))) * Float64(F * Float64(2.0 * A)))))) / Float64(Float64(B * B) - Float64(4.0 * Float64(C * A))));
          	else
          		tmp = Float64(Float64(sqrt(2.0) / B) * Float64(-sqrt(Float64(F * Float64(A - hypot(A, B))))));
          	end
          	return tmp
          end
          
          NOTE: A and C should be sorted in increasing order before calling this function.
          code[A_, B_, C_, F_] := If[LessEqual[B, -260000000000.0], N[(N[Sqrt[2.0], $MachinePrecision] * (-N[Sqrt[N[(F / B), $MachinePrecision]], $MachinePrecision])), $MachinePrecision], If[LessEqual[B, 2.9e-32], N[((-N[Sqrt[N[(2.0 * N[(N[(B * B + N[(A * N[(C * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(F * N[(2.0 * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / N[(N[(B * B), $MachinePrecision] - N[(4.0 * N[(C * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B), $MachinePrecision] * (-N[Sqrt[N[(F * N[(A - N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]]]
          
          \begin{array}{l}
          [A, C] = \mathsf{sort}([A, C])\\
          \\
          \begin{array}{l}
          \mathbf{if}\;B \leq -260000000000:\\
          \;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\
          
          \mathbf{elif}\;B \leq 2.9 \cdot 10^{-32}:\\
          \;\;\;\;\frac{-\sqrt{2 \cdot \left(\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}{B \cdot B - 4 \cdot \left(C \cdot A\right)}\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(A - \mathsf{hypot}\left(A, B\right)\right)}\right)\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if B < -2.6e11

            1. Initial program 14.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. Simplified14.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. Step-by-step derivation
                1. div-inv14.8%

                  \[\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(\left(A + C\right) - \sqrt{B \cdot B + {\left(A - C\right)}^{2}}\right)\right)}\right) \cdot \frac{1}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
              3. Applied egg-rr15.0%

                \[\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 + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)\right)}\right) \cdot \frac{1}{B \cdot B + -4 \cdot \left(A \cdot C\right)}} \]
              4. Taylor expanded in B around -inf 8.2%

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

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

                  \[\leadsto \color{blue}{-\sqrt{2} \cdot \sqrt{\frac{F}{B}}} \]
                2. distribute-rgt-neg-in52.5%

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

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

              if -2.6e11 < B < 2.89999999999999996e-32

              1. Initial program 21.9%

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

                  \[\leadsto \color{blue}{\frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(\left(A + C\right) - \sqrt{B \cdot B + {\left(A - C\right)}^{2}}\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
                2. Taylor expanded in A around -inf 31.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(2 \cdot A\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                3. Step-by-step derivation
                  1. *-commutative31.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 \cdot 2\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                4. Simplified31.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 \cdot 2\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                5. Step-by-step derivation
                  1. *-un-lft-identity31.5%

                    \[\leadsto \frac{-\color{blue}{1 \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. associate-*l*30.8%

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

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

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

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

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

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

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

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

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

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

                if 2.89999999999999996e-32 < B

                1. Initial program 21.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. Simplified21.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 23.7%

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

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

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

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

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

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

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

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

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

                Alternative 3: 38.0% accurate, 2.7× speedup?

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

                  1. Initial program 14.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. Simplified14.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. Step-by-step derivation
                      1. div-inv14.8%

                        \[\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(\left(A + C\right) - \sqrt{B \cdot B + {\left(A - C\right)}^{2}}\right)\right)}\right) \cdot \frac{1}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
                    3. Applied egg-rr15.0%

                      \[\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 + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)\right)}\right) \cdot \frac{1}{B \cdot B + -4 \cdot \left(A \cdot C\right)}} \]
                    4. Taylor expanded in B around -inf 8.2%

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

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

                        \[\leadsto \color{blue}{-\sqrt{2} \cdot \sqrt{\frac{F}{B}}} \]
                      2. distribute-rgt-neg-in52.5%

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

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

                    if -2.7e11 < B < 2.7999999999999999e-32

                    1. Initial program 21.9%

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

                        \[\leadsto \color{blue}{\frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(\left(A + C\right) - \sqrt{B \cdot B + {\left(A - C\right)}^{2}}\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
                      2. Taylor expanded in A around -inf 31.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(2 \cdot A\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                      3. Step-by-step derivation
                        1. *-commutative31.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 \cdot 2\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                      4. Simplified31.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 \cdot 2\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                      5. Step-by-step derivation
                        1. *-un-lft-identity31.5%

                          \[\leadsto \frac{-\color{blue}{1 \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. associate-*l*30.8%

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

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

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

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

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

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

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

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

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

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

                      if 2.7999999999999999e-32 < B

                      1. Initial program 21.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. Simplified21.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-neg21.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-rr23.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)}} \]
                      3. Recombined 3 regimes into one program.
                      4. Final simplification33.8%

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

                      Alternative 4: 37.8% accurate, 2.7× speedup?

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

                        1. Initial program 14.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. Simplified14.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. Step-by-step derivation
                            1. div-inv14.8%

                              \[\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(\left(A + C\right) - \sqrt{B \cdot B + {\left(A - C\right)}^{2}}\right)\right)}\right) \cdot \frac{1}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
                          3. Applied egg-rr15.0%

                            \[\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 + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)\right)}\right) \cdot \frac{1}{B \cdot B + -4 \cdot \left(A \cdot C\right)}} \]
                          4. Taylor expanded in B around -inf 8.2%

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

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

                              \[\leadsto \color{blue}{-\sqrt{2} \cdot \sqrt{\frac{F}{B}}} \]
                            2. distribute-rgt-neg-in52.5%

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

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

                          if -2.2e11 < B < 3.0999999999999998e-34

                          1. Initial program 21.9%

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

                              \[\leadsto \color{blue}{\frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(\left(A + C\right) - \sqrt{B \cdot B + {\left(A - C\right)}^{2}}\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
                            2. Taylor expanded in A around -inf 31.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(2 \cdot A\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                            3. Step-by-step derivation
                              1. *-commutative31.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 \cdot 2\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                            4. Simplified31.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 \cdot 2\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                            5. Step-by-step derivation
                              1. *-un-lft-identity31.5%

                                \[\leadsto \frac{-\color{blue}{1 \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. associate-*l*30.8%

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

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

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

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

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

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

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

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

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

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

                            if 3.0999999999999998e-34 < B

                            1. Initial program 21.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. Simplified21.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 18.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 - \sqrt{{B}^{2} + {A}^{2}}\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                              3. Step-by-step derivation
                                1. +-commutative18.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 - \sqrt{\color{blue}{{A}^{2} + {B}^{2}}}\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                2. unpow218.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 - \sqrt{\color{blue}{A \cdot A} + {B}^{2}}\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                3. unpow218.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 - \sqrt{A \cdot A + \color{blue}{B \cdot B}}\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                4. hypot-def20.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. Simplified20.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)} \]
                            3. Recombined 3 regimes into one program.
                            4. Final simplification33.0%

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

                            Alternative 5: 37.0% accurate, 2.8× speedup?

                            \[\begin{array}{l} [A, C] = \mathsf{sort}([A, C])\\ \\ \begin{array}{l} \mathbf{if}\;B \leq -100000000000:\\ \;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\ \mathbf{elif}\;B \leq 3.4 \cdot 10^{-34}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}{B \cdot B - 4 \cdot \left(C \cdot A\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \left(\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot \left(F \cdot \left(B \cdot B\right)\right)\right)} \cdot \frac{-1}{B \cdot B + -4 \cdot \left(C \cdot A\right)}\\ \end{array} \end{array} \]
                            NOTE: A and C should be sorted in increasing order before calling this function.
                            (FPCore (A B C F)
                             :precision binary64
                             (if (<= B -100000000000.0)
                               (* (sqrt 2.0) (- (sqrt (/ F B))))
                               (if (<= B 3.4e-34)
                                 (/
                                  (- (sqrt (* 2.0 (* (fma B B (* A (* C -4.0))) (* F (* 2.0 A))))))
                                  (- (* B B) (* 4.0 (* C A))))
                                 (*
                                  (sqrt (* 2.0 (* (- A (hypot A B)) (* F (* B B)))))
                                  (/ -1.0 (+ (* B B) (* -4.0 (* C A))))))))
                            assert(A < C);
                            double code(double A, double B, double C, double F) {
                            	double tmp;
                            	if (B <= -100000000000.0) {
                            		tmp = sqrt(2.0) * -sqrt((F / B));
                            	} else if (B <= 3.4e-34) {
                            		tmp = -sqrt((2.0 * (fma(B, B, (A * (C * -4.0))) * (F * (2.0 * A))))) / ((B * B) - (4.0 * (C * A)));
                            	} else {
                            		tmp = sqrt((2.0 * ((A - hypot(A, B)) * (F * (B * B))))) * (-1.0 / ((B * B) + (-4.0 * (C * A))));
                            	}
                            	return tmp;
                            }
                            
                            A, C = sort([A, C])
                            function code(A, B, C, F)
                            	tmp = 0.0
                            	if (B <= -100000000000.0)
                            		tmp = Float64(sqrt(2.0) * Float64(-sqrt(Float64(F / B))));
                            	elseif (B <= 3.4e-34)
                            		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(fma(B, B, Float64(A * Float64(C * -4.0))) * Float64(F * Float64(2.0 * A)))))) / Float64(Float64(B * B) - Float64(4.0 * Float64(C * A))));
                            	else
                            		tmp = Float64(sqrt(Float64(2.0 * Float64(Float64(A - hypot(A, B)) * Float64(F * Float64(B * B))))) * Float64(-1.0 / Float64(Float64(B * B) + Float64(-4.0 * Float64(C * A)))));
                            	end
                            	return tmp
                            end
                            
                            NOTE: A and C should be sorted in increasing order before calling this function.
                            code[A_, B_, C_, F_] := If[LessEqual[B, -100000000000.0], N[(N[Sqrt[2.0], $MachinePrecision] * (-N[Sqrt[N[(F / B), $MachinePrecision]], $MachinePrecision])), $MachinePrecision], If[LessEqual[B, 3.4e-34], N[((-N[Sqrt[N[(2.0 * N[(N[(B * B + N[(A * N[(C * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(F * N[(2.0 * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / N[(N[(B * B), $MachinePrecision] - N[(4.0 * N[(C * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(2.0 * N[(N[(A - N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] * N[(F * N[(B * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(-1.0 / N[(N[(B * B), $MachinePrecision] + N[(-4.0 * N[(C * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
                            
                            \begin{array}{l}
                            [A, C] = \mathsf{sort}([A, C])\\
                            \\
                            \begin{array}{l}
                            \mathbf{if}\;B \leq -100000000000:\\
                            \;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\
                            
                            \mathbf{elif}\;B \leq 3.4 \cdot 10^{-34}:\\
                            \;\;\;\;\frac{-\sqrt{2 \cdot \left(\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}{B \cdot B - 4 \cdot \left(C \cdot A\right)}\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\sqrt{2 \cdot \left(\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot \left(F \cdot \left(B \cdot B\right)\right)\right)} \cdot \frac{-1}{B \cdot B + -4 \cdot \left(C \cdot A\right)}\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 3 regimes
                            2. if B < -1e11

                              1. Initial program 14.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. Simplified14.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. Step-by-step derivation
                                  1. div-inv14.8%

                                    \[\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(\left(A + C\right) - \sqrt{B \cdot B + {\left(A - C\right)}^{2}}\right)\right)}\right) \cdot \frac{1}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
                                3. Applied egg-rr15.0%

                                  \[\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 + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)\right)}\right) \cdot \frac{1}{B \cdot B + -4 \cdot \left(A \cdot C\right)}} \]
                                4. Taylor expanded in B around -inf 8.2%

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

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

                                    \[\leadsto \color{blue}{-\sqrt{2} \cdot \sqrt{\frac{F}{B}}} \]
                                  2. distribute-rgt-neg-in52.5%

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

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

                                if -1e11 < B < 3.4000000000000001e-34

                                1. Initial program 21.9%

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

                                    \[\leadsto \color{blue}{\frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(\left(A + C\right) - \sqrt{B \cdot B + {\left(A - C\right)}^{2}}\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
                                  2. Taylor expanded in A around -inf 31.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(2 \cdot A\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                  3. Step-by-step derivation
                                    1. *-commutative31.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 \cdot 2\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                  4. Simplified31.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 \cdot 2\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                  5. Step-by-step derivation
                                    1. *-un-lft-identity31.5%

                                      \[\leadsto \frac{-\color{blue}{1 \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. associate-*l*30.8%

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

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

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

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

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

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

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

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

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

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

                                  if 3.4000000000000001e-34 < B

                                  1. Initial program 21.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. Simplified21.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. div-inv21.7%

                                        \[\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(\left(A + C\right) - \sqrt{B \cdot B + {\left(A - C\right)}^{2}}\right)\right)}\right) \cdot \frac{1}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
                                    3. Applied egg-rr23.8%

                                      \[\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 + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)\right)}\right) \cdot \frac{1}{B \cdot B + -4 \cdot \left(A \cdot C\right)}} \]
                                    4. Taylor expanded in C around 0 19.0%

                                      \[\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)} \]
                                    5. Step-by-step derivation
                                      1. +-commutative19.0%

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

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

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

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

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

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

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

                                  Alternative 6: 36.9% accurate, 2.8× speedup?

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

                                    1. Initial program 14.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. Simplified14.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. Step-by-step derivation
                                        1. div-inv14.8%

                                          \[\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(\left(A + C\right) - \sqrt{B \cdot B + {\left(A - C\right)}^{2}}\right)\right)}\right) \cdot \frac{1}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
                                      3. Applied egg-rr15.0%

                                        \[\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 + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)\right)}\right) \cdot \frac{1}{B \cdot B + -4 \cdot \left(A \cdot C\right)}} \]
                                      4. Taylor expanded in B around -inf 8.2%

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

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

                                          \[\leadsto \color{blue}{-\sqrt{2} \cdot \sqrt{\frac{F}{B}}} \]
                                        2. distribute-rgt-neg-in52.5%

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

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

                                      if -4.4e10 < B < 3.4999999999999999e-32

                                      1. Initial program 21.9%

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

                                          \[\leadsto \color{blue}{\frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(\left(A + C\right) - \sqrt{B \cdot B + {\left(A - C\right)}^{2}}\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
                                        2. Taylor expanded in A around -inf 31.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(2 \cdot A\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                        3. Step-by-step derivation
                                          1. *-commutative31.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 \cdot 2\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                        4. Simplified31.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 \cdot 2\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]

                                        if 3.4999999999999999e-32 < B

                                        1. Initial program 21.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. Simplified21.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. div-inv21.7%

                                              \[\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(\left(A + C\right) - \sqrt{B \cdot B + {\left(A - C\right)}^{2}}\right)\right)}\right) \cdot \frac{1}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
                                          3. Applied egg-rr23.8%

                                            \[\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 + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)\right)}\right) \cdot \frac{1}{B \cdot B + -4 \cdot \left(A \cdot C\right)}} \]
                                          4. Taylor expanded in C around 0 19.0%

                                            \[\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)} \]
                                          5. Step-by-step derivation
                                            1. +-commutative19.0%

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

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

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

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

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

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

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

                                        Alternative 7: 35.4% accurate, 3.0× speedup?

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

                                          1. Initial program 14.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. Simplified14.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. Step-by-step derivation
                                              1. div-inv14.8%

                                                \[\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(\left(A + C\right) - \sqrt{B \cdot B + {\left(A - C\right)}^{2}}\right)\right)}\right) \cdot \frac{1}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
                                            3. Applied egg-rr15.0%

                                              \[\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 + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)\right)}\right) \cdot \frac{1}{B \cdot B + -4 \cdot \left(A \cdot C\right)}} \]
                                            4. Taylor expanded in B around -inf 8.2%

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

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

                                                \[\leadsto \color{blue}{-\sqrt{2} \cdot \sqrt{\frac{F}{B}}} \]
                                              2. distribute-rgt-neg-in52.5%

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

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

                                            if -9.2e10 < B

                                            1. Initial program 21.9%

                                              \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
                                            2. Step-by-step derivation
                                              1. Simplified21.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 23.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(2 \cdot A\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                              3. Step-by-step derivation
                                                1. *-commutative23.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 \cdot 2\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                              4. Simplified23.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 \cdot 2\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                            3. Recombined 2 regimes into one program.
                                            4. Final simplification30.0%

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

                                            Alternative 8: 27.7% accurate, 4.8× speedup?

                                            \[\begin{array}{l} [A, C] = \mathsf{sort}([A, C])\\ \\ \begin{array}{l} t_0 := B \cdot B - 4 \cdot \left(C \cdot A\right)\\ t_1 := F \cdot t_0\\ \mathbf{if}\;B \leq -50000000000000:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(A + \left(B + C\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(2 \cdot A\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 (* C A)))) (t_1 (* F t_0)))
                                               (if (<= B -50000000000000.0)
                                                 (/ (- (sqrt (* 2.0 (* t_1 (+ A (+ B C)))))) t_0)
                                                 (/ (- (sqrt (* 2.0 (* t_1 (* 2.0 A))))) t_0))))
                                            assert(A < C);
                                            double code(double A, double B, double C, double F) {
                                            	double t_0 = (B * B) - (4.0 * (C * A));
                                            	double t_1 = F * t_0;
                                            	double tmp;
                                            	if (B <= -50000000000000.0) {
                                            		tmp = -sqrt((2.0 * (t_1 * (A + (B + C))))) / t_0;
                                            	} else {
                                            		tmp = -sqrt((2.0 * (t_1 * (2.0 * A)))) / 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 * (c * a))
                                                t_1 = f * t_0
                                                if (b <= (-50000000000000.0d0)) then
                                                    tmp = -sqrt((2.0d0 * (t_1 * (a + (b + c))))) / t_0
                                                else
                                                    tmp = -sqrt((2.0d0 * (t_1 * (2.0d0 * a)))) / 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 * (C * A));
                                            	double t_1 = F * t_0;
                                            	double tmp;
                                            	if (B <= -50000000000000.0) {
                                            		tmp = -Math.sqrt((2.0 * (t_1 * (A + (B + C))))) / t_0;
                                            	} else {
                                            		tmp = -Math.sqrt((2.0 * (t_1 * (2.0 * A)))) / t_0;
                                            	}
                                            	return tmp;
                                            }
                                            
                                            [A, C] = sort([A, C])
                                            def code(A, B, C, F):
                                            	t_0 = (B * B) - (4.0 * (C * A))
                                            	t_1 = F * t_0
                                            	tmp = 0
                                            	if B <= -50000000000000.0:
                                            		tmp = -math.sqrt((2.0 * (t_1 * (A + (B + C))))) / t_0
                                            	else:
                                            		tmp = -math.sqrt((2.0 * (t_1 * (2.0 * A)))) / 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(C * A)))
                                            	t_1 = Float64(F * t_0)
                                            	tmp = 0.0
                                            	if (B <= -50000000000000.0)
                                            		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(t_1 * Float64(A + Float64(B + C)))))) / t_0);
                                            	else
                                            		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(t_1 * Float64(2.0 * A))))) / 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 * (C * A));
                                            	t_1 = F * t_0;
                                            	tmp = 0.0;
                                            	if (B <= -50000000000000.0)
                                            		tmp = -sqrt((2.0 * (t_1 * (A + (B + C))))) / t_0;
                                            	else
                                            		tmp = -sqrt((2.0 * (t_1 * (2.0 * A)))) / 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[(C * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(F * t$95$0), $MachinePrecision]}, If[LessEqual[B, -50000000000000.0], N[((-N[Sqrt[N[(2.0 * N[(t$95$1 * N[(A + N[(B + C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], N[((-N[Sqrt[N[(2.0 * N[(t$95$1 * N[(2.0 * A), $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(C \cdot A\right)\\
                                            t_1 := F \cdot t_0\\
                                            \mathbf{if}\;B \leq -50000000000000:\\
                                            \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(A + \left(B + C\right)\right)\right)}}{t_0}\\
                                            
                                            \mathbf{else}:\\
                                            \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(2 \cdot A\right)\right)}}{t_0}\\
                                            
                                            
                                            \end{array}
                                            \end{array}
                                            
                                            Derivation
                                            1. Split input into 2 regimes
                                            2. if B < -5e13

                                              1. Initial program 15.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. Simplified15.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 B around -inf 14.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 + \left(C + B\right)\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]

                                                if -5e13 < B

                                                1. Initial program 21.8%

                                                  \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
                                                2. Step-by-step derivation
                                                  1. Simplified21.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 23.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. *-commutative23.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. Simplified23.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)} \]
                                                3. Recombined 2 regimes into one program.
                                                4. Final simplification21.5%

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

                                                Alternative 9: 28.3% accurate, 4.9× speedup?

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

                                                  1. Initial program 10.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. Simplified10.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 0.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(2 \cdot A\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                                    3. Step-by-step derivation
                                                      1. *-commutative0.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 \cdot 2\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                                    4. Simplified0.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 \cdot 2\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                                    5. Step-by-step derivation
                                                      1. *-un-lft-identity0.8%

                                                        \[\leadsto \frac{-\color{blue}{1 \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. associate-*l*0.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                    if -5.9000000000000001e41 < B

                                                    1. Initial program 22.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. Simplified22.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 23.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. *-commutative23.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. Simplified23.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)} \]
                                                    3. Recombined 2 regimes into one program.
                                                    4. Final simplification19.1%

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

                                                    Alternative 10: 21.6% accurate, 5.0× speedup?

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

                                                      1. Initial program 21.8%

                                                        \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
                                                      2. Step-by-step derivation
                                                        1. Simplified21.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 21.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(2 \cdot A\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                                        3. Step-by-step derivation
                                                          1. *-commutative21.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 \cdot 2\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                                        4. Simplified21.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 \cdot 2\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                                        5. Taylor expanded in B around 0 18.4%

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

                                                        if 7.5e20 < B

                                                        1. Initial program 14.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. Simplified14.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 4.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(2 \cdot A\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                                          3. Step-by-step derivation
                                                            1. *-commutative4.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 \cdot 2\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                                          4. Simplified4.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 \cdot 2\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                                          5. Step-by-step derivation
                                                            1. *-un-lft-identity4.8%

                                                              \[\leadsto \frac{-\color{blue}{1 \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. associate-*l*4.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                        Alternative 11: 17.0% accurate, 5.1× speedup?

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

                                                          1. Initial program 19.6%

                                                            \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
                                                          2. Step-by-step derivation
                                                            1. Simplified19.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 22.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(2 \cdot A\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                                            3. Step-by-step derivation
                                                              1. *-commutative22.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 \cdot 2\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                                            4. Simplified22.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 \cdot 2\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                                            5. Taylor expanded in B around 0 16.6%

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

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

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

                                                            if 7.5e-50 < B

                                                            1. Initial program 22.0%

                                                              \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
                                                            2. Step-by-step derivation
                                                              1. Simplified22.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 7.7%

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

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

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

                                                                  \[\leadsto \frac{-\color{blue}{1 \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. associate-*l*7.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                            Alternative 12: 9.1% accurate, 5.7× speedup?

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

                                                              1. Initial program 19.5%

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

                                                                  \[\leadsto \color{blue}{\frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(\left(A + C\right) - \sqrt{B \cdot B + {\left(A - C\right)}^{2}}\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
                                                                2. Taylor expanded in A around -inf 21.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. *-commutative21.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. Simplified21.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. *-un-lft-identity21.4%

                                                                    \[\leadsto \frac{-\color{blue}{1 \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. associate-*l*20.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                if -9.999999999999969e-311 < B

                                                                1. Initial program 21.3%

                                                                  \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
                                                                2. Step-by-step derivation
                                                                  1. Simplified21.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 15.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. *-commutative15.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. Simplified15.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. Taylor expanded in B around inf 5.2%

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

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

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

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

                                                                Alternative 13: 9.1% accurate, 5.8× speedup?

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

                                                                  1. Initial program 19.9%

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

                                                                      \[\leadsto \color{blue}{\frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(\left(A + C\right) - \sqrt{B \cdot B + {\left(A - C\right)}^{2}}\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
                                                                    2. Taylor expanded in A around -inf 21.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(2 \cdot A\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                                                    3. Step-by-step derivation
                                                                      1. *-commutative21.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 \cdot 2\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                                                    4. Simplified21.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 \cdot 2\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                                                    5. Step-by-step derivation
                                                                      1. *-un-lft-identity21.8%

                                                                        \[\leadsto \frac{-\color{blue}{1 \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. associate-*l*21.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                    if -5.2999999999999998e-306 < B

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

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

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

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

                                                                          \[\leadsto \frac{-\color{blue}{1 \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. associate-*l*14.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                    Alternative 14: 5.3% accurate, 5.9× speedup?

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

                                                                      \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
                                                                    2. Step-by-step derivation
                                                                      1. Simplified20.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 18.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(2 \cdot A\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                                                      3. Step-by-step derivation
                                                                        1. *-commutative18.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 \cdot 2\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                                                      4. Simplified18.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 \cdot 2\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                                                      5. Step-by-step derivation
                                                                        1. *-un-lft-identity18.5%

                                                                          \[\leadsto \frac{-\color{blue}{1 \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. associate-*l*18.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                      Reproduce

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