ABCF->ab-angle b

Percentage Accurate: 18.7% → 49.5%
Time: 24.7s
Alternatives: 13
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 13 alternatives:

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

Initial Program: 18.7% accurate, 1.0× speedup?

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

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

Alternative 1: 49.5% accurate, 1.2× speedup?

\[\begin{array}{l} B = |B|\\ [A, C] = \mathsf{sort}([A, C])\\ \\ \begin{array}{l} t_0 := -\sqrt{2}\\ t_1 := \sqrt{F \cdot \left(C \cdot -4\right)} \cdot \frac{t_0}{\frac{C}{\sqrt{0.125}}}\\ t_2 := B \cdot B - 4 \cdot \left(C \cdot A\right)\\ \mathbf{if}\;B \leq 1.05 \cdot 10^{-193}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq 3.1 \cdot 10^{-78}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_2 \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}{t_2}\\ \mathbf{elif}\;B \leq 1.7 \cdot 10^{-53}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq 7 \cdot 10^{+110}:\\ \;\;\;\;\frac{\sqrt{\mathsf{fma}\left(B, B, C \cdot \left(-4 \cdot A\right)\right)} \cdot \left(-\sqrt{\left(2 \cdot F\right) \cdot \left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)}\right)}{\mathsf{fma}\left(B, B, \left(C \cdot -4\right) \cdot A\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{F \cdot \left(A - \mathsf{hypot}\left(A, B\right)\right)} \cdot \frac{t_0}{B}\\ \end{array} \end{array} \]
NOTE: B should be positive before calling this function
NOTE: A and C should be sorted in increasing order before calling this function.
(FPCore (A B C F)
 :precision binary64
 (let* ((t_0 (- (sqrt 2.0)))
        (t_1 (* (sqrt (* F (* C -4.0))) (/ t_0 (/ C (sqrt 0.125)))))
        (t_2 (- (* B B) (* 4.0 (* C A)))))
   (if (<= B 1.05e-193)
     t_1
     (if (<= B 3.1e-78)
       (/ (- (sqrt (* 2.0 (* t_2 (* F (* 2.0 A)))))) t_2)
       (if (<= B 1.7e-53)
         t_1
         (if (<= B 7e+110)
           (/
            (*
             (sqrt (fma B B (* C (* -4.0 A))))
             (- (sqrt (* (* 2.0 F) (+ A (- C (hypot B (- A C))))))))
            (fma B B (* (* C -4.0) A)))
           (* (sqrt (* F (- A (hypot A B)))) (/ t_0 B))))))))
B = abs(B);
assert(A < C);
double code(double A, double B, double C, double F) {
	double t_0 = -sqrt(2.0);
	double t_1 = sqrt((F * (C * -4.0))) * (t_0 / (C / sqrt(0.125)));
	double t_2 = (B * B) - (4.0 * (C * A));
	double tmp;
	if (B <= 1.05e-193) {
		tmp = t_1;
	} else if (B <= 3.1e-78) {
		tmp = -sqrt((2.0 * (t_2 * (F * (2.0 * A))))) / t_2;
	} else if (B <= 1.7e-53) {
		tmp = t_1;
	} else if (B <= 7e+110) {
		tmp = (sqrt(fma(B, B, (C * (-4.0 * A)))) * -sqrt(((2.0 * F) * (A + (C - hypot(B, (A - C))))))) / fma(B, B, ((C * -4.0) * A));
	} else {
		tmp = sqrt((F * (A - hypot(A, B)))) * (t_0 / B);
	}
	return tmp;
}
B = abs(B)
A, C = sort([A, C])
function code(A, B, C, F)
	t_0 = Float64(-sqrt(2.0))
	t_1 = Float64(sqrt(Float64(F * Float64(C * -4.0))) * Float64(t_0 / Float64(C / sqrt(0.125))))
	t_2 = Float64(Float64(B * B) - Float64(4.0 * Float64(C * A)))
	tmp = 0.0
	if (B <= 1.05e-193)
		tmp = t_1;
	elseif (B <= 3.1e-78)
		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(t_2 * Float64(F * Float64(2.0 * A)))))) / t_2);
	elseif (B <= 1.7e-53)
		tmp = t_1;
	elseif (B <= 7e+110)
		tmp = Float64(Float64(sqrt(fma(B, B, Float64(C * Float64(-4.0 * A)))) * Float64(-sqrt(Float64(Float64(2.0 * F) * Float64(A + Float64(C - hypot(B, Float64(A - C)))))))) / fma(B, B, Float64(Float64(C * -4.0) * A)));
	else
		tmp = Float64(sqrt(Float64(F * Float64(A - hypot(A, B)))) * Float64(t_0 / B));
	end
	return tmp
end
NOTE: B should be positive before calling this function
NOTE: A and C should be sorted in increasing order before calling this function.
code[A_, B_, C_, F_] := Block[{t$95$0 = (-N[Sqrt[2.0], $MachinePrecision])}, Block[{t$95$1 = N[(N[Sqrt[N[(F * N[(C * -4.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(t$95$0 / N[(C / N[Sqrt[0.125], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(B * B), $MachinePrecision] - N[(4.0 * N[(C * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, 1.05e-193], t$95$1, If[LessEqual[B, 3.1e-78], N[((-N[Sqrt[N[(2.0 * N[(t$95$2 * N[(F * N[(2.0 * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$2), $MachinePrecision], If[LessEqual[B, 1.7e-53], t$95$1, If[LessEqual[B, 7e+110], N[(N[(N[Sqrt[N[(B * B + N[(C * N[(-4.0 * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-N[Sqrt[N[(N[(2.0 * F), $MachinePrecision] * N[(A + N[(C - N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision] / N[(B * B + N[(N[(C * -4.0), $MachinePrecision] * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(F * N[(A - N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(t$95$0 / B), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
B = |B|\\
[A, C] = \mathsf{sort}([A, C])\\
\\
\begin{array}{l}
t_0 := -\sqrt{2}\\
t_1 := \sqrt{F \cdot \left(C \cdot -4\right)} \cdot \frac{t_0}{\frac{C}{\sqrt{0.125}}}\\
t_2 := B \cdot B - 4 \cdot \left(C \cdot A\right)\\
\mathbf{if}\;B \leq 1.05 \cdot 10^{-193}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;B \leq 3.1 \cdot 10^{-78}:\\
\;\;\;\;\frac{-\sqrt{2 \cdot \left(t_2 \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}{t_2}\\

\mathbf{elif}\;B \leq 1.7 \cdot 10^{-53}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if B < 1.05e-193 or 3.10000000000000018e-78 < B < 1.7e-53

    1. Initial program 22.9%

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{\frac{\sqrt{2} \cdot \sqrt{0.125}}{C} \cdot \left(-\sqrt{\left(-2 \cdot C - 2 \cdot C\right) \cdot F}\right)} \]
        3. associate-/l*18.3%

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

          \[\leadsto \frac{\sqrt{2}}{\frac{C}{\sqrt{0.125}}} \cdot \left(-\sqrt{\color{blue}{F \cdot \left(-2 \cdot C - 2 \cdot C\right)}}\right) \]
        5. distribute-rgt-out--18.3%

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

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

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

      if 1.05e-193 < B < 3.10000000000000018e-78

      1. Initial program 29.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. Simplified29.1%

          \[\leadsto \color{blue}{\frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(\left(A + C\right) - \sqrt{B \cdot B + {\left(A - C\right)}^{2}}\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
        2. Taylor expanded in A around -inf 33.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. *-commutative33.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. Simplified33.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. distribute-frac-neg33.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(A \cdot 2\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
          2. associate-*l*36.4%

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

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

        if 1.7e-53 < B < 6.9999999999999998e110

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

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

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

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

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

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

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

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

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

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

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

          if 6.9999999999999998e110 < B

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

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

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

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

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

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

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

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

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 1.05 \cdot 10^{-193}:\\ \;\;\;\;\sqrt{F \cdot \left(C \cdot -4\right)} \cdot \frac{-\sqrt{2}}{\frac{C}{\sqrt{0.125}}}\\ \mathbf{elif}\;B \leq 3.1 \cdot 10^{-78}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(B \cdot B - 4 \cdot \left(C \cdot A\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 1.7 \cdot 10^{-53}:\\ \;\;\;\;\sqrt{F \cdot \left(C \cdot -4\right)} \cdot \frac{-\sqrt{2}}{\frac{C}{\sqrt{0.125}}}\\ \mathbf{elif}\;B \leq 7 \cdot 10^{+110}:\\ \;\;\;\;\frac{\sqrt{\mathsf{fma}\left(B, B, C \cdot \left(-4 \cdot A\right)\right)} \cdot \left(-\sqrt{\left(2 \cdot F\right) \cdot \left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)}\right)}{\mathsf{fma}\left(B, B, \left(C \cdot -4\right) \cdot A\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{F \cdot \left(A - \mathsf{hypot}\left(A, B\right)\right)} \cdot \frac{-\sqrt{2}}{B}\\ \end{array} \]

          Alternative 2: 49.0% accurate, 2.0× speedup?

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

            1. Initial program 24.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. Simplified24.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. Step-by-step derivation
                1. flip--9.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}{\frac{\left(A + C\right) \cdot \left(A + C\right) - \sqrt{B \cdot B + {\left(A - C\right)}^{2}} \cdot \sqrt{B \cdot B + {\left(A - C\right)}^{2}}}{\left(A + C\right) + \sqrt{B \cdot B + {\left(A - C\right)}^{2}}}}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                2. add-sqr-sqrt9.7%

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

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

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

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

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

                  \[\leadsto \color{blue}{-\frac{\sqrt{2} \cdot \sqrt{0.125}}{C} \cdot \sqrt{\left(-2 \cdot C - 2 \cdot C\right) \cdot F}} \]
                2. distribute-rgt-neg-in17.6%

                  \[\leadsto \color{blue}{\frac{\sqrt{2} \cdot \sqrt{0.125}}{C} \cdot \left(-\sqrt{\left(-2 \cdot C - 2 \cdot C\right) \cdot F}\right)} \]
                3. associate-/l*17.7%

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

                  \[\leadsto \frac{\sqrt{2}}{\frac{C}{\sqrt{0.125}}} \cdot \left(-\sqrt{\color{blue}{F \cdot \left(-2 \cdot C - 2 \cdot C\right)}}\right) \]
                5. distribute-rgt-out--17.7%

                  \[\leadsto \frac{\sqrt{2}}{\frac{C}{\sqrt{0.125}}} \cdot \left(-\sqrt{F \cdot \color{blue}{\left(C \cdot \left(-2 - 2\right)\right)}}\right) \]
                6. metadata-eval17.7%

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

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

              if 7.7999999999999997e-194 < B < 2.1999999999999999e-78

              1. Initial program 29.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. Simplified29.1%

                  \[\leadsto \color{blue}{\frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(\left(A + C\right) - \sqrt{B \cdot B + {\left(A - C\right)}^{2}}\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
                2. Taylor expanded in A around -inf 33.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. *-commutative33.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. Simplified33.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. distribute-frac-neg33.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(A \cdot 2\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
                  2. associate-*l*36.4%

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

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

                if 3.70000000000000017e-15 < B

                1. Initial program 10.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. Simplified10.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 C around 0 15.1%

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

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

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

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

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

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

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

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

                  \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 7.8 \cdot 10^{-194}:\\ \;\;\;\;\sqrt{F \cdot \left(C \cdot -4\right)} \cdot \frac{-\sqrt{2}}{\frac{C}{\sqrt{0.125}}}\\ \mathbf{elif}\;B \leq 2.2 \cdot 10^{-78}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(B \cdot B - 4 \cdot \left(C \cdot A\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 3.7 \cdot 10^{-15}:\\ \;\;\;\;\sqrt{F \cdot \left(C \cdot -4\right)} \cdot \frac{-\sqrt{2}}{\frac{C}{\sqrt{0.125}}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{F \cdot \left(A - \mathsf{hypot}\left(A, B\right)\right)} \cdot \frac{-\sqrt{2}}{B}\\ \end{array} \]

                Alternative 3: 46.3% accurate, 2.0× speedup?

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

                  1. Initial program 25.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. Simplified25.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 17.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. *-commutative17.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. Simplified17.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. distribute-frac-neg17.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(A \cdot 2\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
                      2. associate-*l*19.4%

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

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

                    if 6.6000000000000001e-12 < B

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

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

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

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

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

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

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

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

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

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

                    Alternative 4: 44.5% accurate, 2.7× speedup?

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

                      1. Initial program 23.9%

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

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

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

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

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

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

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

                        if 3.09999999999999997e-55 < B < 2.1999999999999998e84

                        1. Initial program 33.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. Simplified33.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. Step-by-step derivation
                            1. distribute-frac-neg33.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)}} \]
                          3. Applied egg-rr39.8%

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

                          if 2.1999999999999998e84 < B

                          1. Initial program 2.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. Simplified2.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          Alternative 5: 43.7% accurate, 2.7× speedup?

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

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

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

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

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

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

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

                              if 3.59999999999999976e-54 < B < 6.4999999999999996e23

                              1. Initial program 42.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. Simplified42.4%

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

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

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

                                if 6.4999999999999996e23 < B < 1.58e38

                                1. Initial program 17.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. Simplified17.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 C around inf 50.3%

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

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

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

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

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

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

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

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

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

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

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

                                  if 1.58e38 < B

                                  1. Initial program 5.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. Simplified5.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 14.1%

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

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

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 3.6 \cdot 10^{-54}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(B \cdot B - 4 \cdot \left(C \cdot A\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 6.5 \cdot 10^{+23}:\\ \;\;\;\;\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)}\\ \mathbf{elif}\;B \leq 1.58 \cdot 10^{+38}:\\ \;\;\;\;-\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(A - -0.5 \cdot \frac{\left(A \cdot A - A \cdot A\right) - B \cdot B}{C}\right)\right)\right)}}{B \cdot B - 4 \cdot \left(C \cdot A\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{F \cdot \left(A - B\right)} \cdot \frac{-\sqrt{2}}{B}\\ \end{array} \]

                                  Alternative 6: 42.8% accurate, 3.0× speedup?

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

                                    1. Initial program 25.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. Simplified25.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 17.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. *-commutative17.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. Simplified17.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. distribute-frac-neg17.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(A \cdot 2\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
                                        2. associate-*l*18.8%

                                          \[\leadsto -\frac{\sqrt{2 \cdot \color{blue}{\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot \left(F \cdot \left(A \cdot 2\right)\right)\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                      6. Applied egg-rr18.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 \cdot 2\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]

                                      if 5.9999999999999999e39 < B

                                      1. Initial program 5.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. Simplified5.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 14.1%

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

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

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

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

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

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

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

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

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

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

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

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

                                        \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 6 \cdot 10^{+39}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(\left(B \cdot B - 4 \cdot \left(C \cdot A\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 - B\right)}\right)\\ \end{array} \]

                                      Alternative 7: 42.4% accurate, 3.0× speedup?

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

                                        1. Initial program 25.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. Simplified25.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 17.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. *-commutative17.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. Simplified17.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. distribute-frac-neg17.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(A \cdot 2\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
                                            2. associate-*l*18.8%

                                              \[\leadsto -\frac{\sqrt{2 \cdot \color{blue}{\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot \left(F \cdot \left(A \cdot 2\right)\right)\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                          6. Applied egg-rr18.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 \cdot 2\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]

                                          if 1.5000000000000001e38 < B

                                          1. Initial program 5.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. Simplified5.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 14.1%

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

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

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

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

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

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

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

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

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

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

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

                                            \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 1.5 \cdot 10^{+38}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(B \cdot B - 4 \cdot \left(C \cdot A\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{-B \cdot F} \cdot \frac{-\sqrt{2}}{B}\\ \end{array} \]

                                          Alternative 8: 29.7% accurate, 4.3× speedup?

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

                                            1. Initial program 22.6%

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

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

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

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

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

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

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

                                              if -2.1999999999999999e-97 < A

                                              1. Initial program 19.2%

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

                                                  \[\leadsto \color{blue}{\frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(\left(A + C\right) - \sqrt{B \cdot B + {\left(A - C\right)}^{2}}\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
                                                2. Taylor expanded in C around inf 7.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(\left(A + -0.5 \cdot \frac{\left({B}^{2} + {A}^{2}\right) - {\left(-1 \cdot A\right)}^{2}}{C}\right) - -1 \cdot A\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                                3. Step-by-step derivation
                                                  1. associate--l+7.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 + \left(-0.5 \cdot \frac{\left({B}^{2} + {A}^{2}\right) - {\left(-1 \cdot A\right)}^{2}}{C} - -1 \cdot A\right)\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                                  2. associate--l+7.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 + \left(-0.5 \cdot \frac{\color{blue}{{B}^{2} + \left({A}^{2} - {\left(-1 \cdot A\right)}^{2}\right)}}{C} - -1 \cdot A\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                                  3. unpow27.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 + \left(-0.5 \cdot \frac{\color{blue}{B \cdot B} + \left({A}^{2} - {\left(-1 \cdot A\right)}^{2}\right)}{C} - -1 \cdot A\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                                  4. unpow27.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 + \left(-0.5 \cdot \frac{B \cdot B + \left(\color{blue}{A \cdot A} - {\left(-1 \cdot A\right)}^{2}\right)}{C} - -1 \cdot A\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                                  5. unpow27.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 + \left(-0.5 \cdot \frac{B \cdot B + \left(A \cdot A - \color{blue}{\left(-1 \cdot A\right) \cdot \left(-1 \cdot A\right)}\right)}{C} - -1 \cdot A\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                                  6. mul-1-neg7.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 + \left(-0.5 \cdot \frac{B \cdot B + \left(A \cdot A - \color{blue}{\left(-A\right)} \cdot \left(-1 \cdot A\right)\right)}{C} - -1 \cdot A\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                                  7. mul-1-neg7.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 + \left(-0.5 \cdot \frac{B \cdot B + \left(A \cdot A - \left(-A\right) \cdot \color{blue}{\left(-A\right)}\right)}{C} - -1 \cdot A\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                                  8. sqr-neg7.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 + \left(-0.5 \cdot \frac{B \cdot B + \left(A \cdot A - \color{blue}{A \cdot A}\right)}{C} - -1 \cdot A\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                                  9. mul-1-neg7.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 + \left(-0.5 \cdot \frac{B \cdot B + \left(A \cdot A - A \cdot A\right)}{C} - \color{blue}{\left(-A\right)}\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                                4. Simplified7.5%

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

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

                                              Alternative 9: 26.1% accurate, 4.9× speedup?

                                              \[\begin{array}{l} B = |B|\\ [A, C] = \mathsf{sort}([A, C])\\ \\ \begin{array}{l} t_0 := B \cdot B - 4 \cdot \left(C \cdot A\right)\\ \frac{-{\left(2 \cdot \left(t_0 \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)\right)}^{0.5}}{t_0} \end{array} \end{array} \]
                                              NOTE: B should be positive before calling this function
                                              NOTE: A and C should be sorted in increasing order before calling this function.
                                              (FPCore (A B C F)
                                               :precision binary64
                                               (let* ((t_0 (- (* B B) (* 4.0 (* C A)))))
                                                 (/ (- (pow (* 2.0 (* t_0 (* F (* 2.0 A)))) 0.5)) t_0)))
                                              B = abs(B);
                                              assert(A < C);
                                              double code(double A, double B, double C, double F) {
                                              	double t_0 = (B * B) - (4.0 * (C * A));
                                              	return -pow((2.0 * (t_0 * (F * (2.0 * A)))), 0.5) / t_0;
                                              }
                                              
                                              NOTE: B should be positive before calling this function
                                              NOTE: A and C should be sorted in increasing order before calling this function.
                                              real(8) function code(a, b, c, f)
                                                  real(8), intent (in) :: a
                                                  real(8), intent (in) :: b
                                                  real(8), intent (in) :: c
                                                  real(8), intent (in) :: f
                                                  real(8) :: t_0
                                                  t_0 = (b * b) - (4.0d0 * (c * a))
                                                  code = -((2.0d0 * (t_0 * (f * (2.0d0 * a)))) ** 0.5d0) / t_0
                                              end function
                                              
                                              B = Math.abs(B);
                                              assert A < C;
                                              public static double code(double A, double B, double C, double F) {
                                              	double t_0 = (B * B) - (4.0 * (C * A));
                                              	return -Math.pow((2.0 * (t_0 * (F * (2.0 * A)))), 0.5) / t_0;
                                              }
                                              
                                              B = abs(B)
                                              [A, C] = sort([A, C])
                                              def code(A, B, C, F):
                                              	t_0 = (B * B) - (4.0 * (C * A))
                                              	return -math.pow((2.0 * (t_0 * (F * (2.0 * A)))), 0.5) / t_0
                                              
                                              B = abs(B)
                                              A, C = sort([A, C])
                                              function code(A, B, C, F)
                                              	t_0 = Float64(Float64(B * B) - Float64(4.0 * Float64(C * A)))
                                              	return Float64(Float64(-(Float64(2.0 * Float64(t_0 * Float64(F * Float64(2.0 * A)))) ^ 0.5)) / t_0)
                                              end
                                              
                                              B = abs(B)
                                              A, C = num2cell(sort([A, C])){:}
                                              function tmp = code(A, B, C, F)
                                              	t_0 = (B * B) - (4.0 * (C * A));
                                              	tmp = -((2.0 * (t_0 * (F * (2.0 * A)))) ^ 0.5) / t_0;
                                              end
                                              
                                              NOTE: B should be positive before calling this function
                                              NOTE: A and C should be sorted in increasing order before calling this function.
                                              code[A_, B_, C_, F_] := Block[{t$95$0 = N[(N[(B * B), $MachinePrecision] - N[(4.0 * N[(C * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[((-N[Power[N[(2.0 * N[(t$95$0 * N[(F * N[(2.0 * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]) / t$95$0), $MachinePrecision]]
                                              
                                              \begin{array}{l}
                                              B = |B|\\
                                              [A, C] = \mathsf{sort}([A, C])\\
                                              \\
                                              \begin{array}{l}
                                              t_0 := B \cdot B - 4 \cdot \left(C \cdot A\right)\\
                                              \frac{-{\left(2 \cdot \left(t_0 \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)\right)}^{0.5}}{t_0}
                                              \end{array}
                                              \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 12.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. *-commutative12.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. Simplified12.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. pow1/213.0%

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

                                                    \[\leadsto \frac{-{\left(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)}\right)}^{0.5}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                                6. Applied egg-rr14.1%

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

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

                                                Alternative 10: 26.1% accurate, 5.0× speedup?

                                                \[\begin{array}{l} B = |B|\\ [A, C] = \mathsf{sort}([A, C])\\ \\ \begin{array}{l} t_0 := B \cdot B - 4 \cdot \left(C \cdot A\right)\\ -\frac{\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}{t_0} \end{array} \end{array} \]
                                                NOTE: B should be positive before calling this function
                                                NOTE: A and C should be sorted in increasing order before calling this function.
                                                (FPCore (A B C F)
                                                 :precision binary64
                                                 (let* ((t_0 (- (* B B) (* 4.0 (* C A)))))
                                                   (- (/ (sqrt (* 2.0 (* t_0 (* F (* 2.0 A))))) t_0))))
                                                B = abs(B);
                                                assert(A < C);
                                                double code(double A, double B, double C, double F) {
                                                	double t_0 = (B * B) - (4.0 * (C * A));
                                                	return -(sqrt((2.0 * (t_0 * (F * (2.0 * A))))) / t_0);
                                                }
                                                
                                                NOTE: B should be positive before calling this function
                                                NOTE: A and C should be sorted in increasing order before calling this function.
                                                real(8) function code(a, b, c, f)
                                                    real(8), intent (in) :: a
                                                    real(8), intent (in) :: b
                                                    real(8), intent (in) :: c
                                                    real(8), intent (in) :: f
                                                    real(8) :: t_0
                                                    t_0 = (b * b) - (4.0d0 * (c * a))
                                                    code = -(sqrt((2.0d0 * (t_0 * (f * (2.0d0 * a))))) / t_0)
                                                end function
                                                
                                                B = Math.abs(B);
                                                assert A < C;
                                                public static double code(double A, double B, double C, double F) {
                                                	double t_0 = (B * B) - (4.0 * (C * A));
                                                	return -(Math.sqrt((2.0 * (t_0 * (F * (2.0 * A))))) / t_0);
                                                }
                                                
                                                B = abs(B)
                                                [A, C] = sort([A, C])
                                                def code(A, B, C, F):
                                                	t_0 = (B * B) - (4.0 * (C * A))
                                                	return -(math.sqrt((2.0 * (t_0 * (F * (2.0 * A))))) / t_0)
                                                
                                                B = abs(B)
                                                A, C = sort([A, C])
                                                function code(A, B, C, F)
                                                	t_0 = Float64(Float64(B * B) - Float64(4.0 * Float64(C * A)))
                                                	return Float64(-Float64(sqrt(Float64(2.0 * Float64(t_0 * Float64(F * Float64(2.0 * A))))) / t_0))
                                                end
                                                
                                                B = abs(B)
                                                A, C = num2cell(sort([A, C])){:}
                                                function tmp = code(A, B, C, F)
                                                	t_0 = (B * B) - (4.0 * (C * A));
                                                	tmp = -(sqrt((2.0 * (t_0 * (F * (2.0 * A))))) / t_0);
                                                end
                                                
                                                NOTE: B should be positive before calling this function
                                                NOTE: A and C should be sorted in increasing order before calling this function.
                                                code[A_, B_, C_, F_] := Block[{t$95$0 = N[(N[(B * B), $MachinePrecision] - N[(4.0 * N[(C * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, (-N[(N[Sqrt[N[(2.0 * N[(t$95$0 * N[(F * N[(2.0 * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision])]
                                                
                                                \begin{array}{l}
                                                B = |B|\\
                                                [A, C] = \mathsf{sort}([A, C])\\
                                                \\
                                                \begin{array}{l}
                                                t_0 := B \cdot B - 4 \cdot \left(C \cdot A\right)\\
                                                -\frac{\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}{t_0}
                                                \end{array}
                                                \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 12.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. *-commutative12.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. Simplified12.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. distribute-frac-neg12.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(A \cdot 2\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
                                                    2. associate-*l*13.9%

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

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

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

                                                  Alternative 11: 22.7% accurate, 5.0× speedup?

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

                                                    1. Initial program 25.0%

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

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

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

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

                                                        \[\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 1.85000000000000008e-15 < B

                                                      1. Initial program 10.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. Simplified10.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 2.1%

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

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

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

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

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

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

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

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

                                                      Alternative 12: 26.3% accurate, 5.0× speedup?

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

                                                        1. Initial program 25.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. Simplified25.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 17.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. *-commutative17.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. Simplified17.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 14.9%

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

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

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

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

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

                                                          if 4.5e-11 < B

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

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

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

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

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

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

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

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

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

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

                                                          Alternative 13: 9.3% accurate, 5.9× speedup?

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

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

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

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

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

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

                                                            Reproduce

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