ABCF->ab-angle b

Percentage Accurate: 18.5% → 46.0%
Time: 24.6s
Alternatives: 15
Speedup: 5.1×

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 15 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.5% 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: 46.0% accurate, 1.2× speedup?

\[\begin{array}{l} B = |B|\\ [A, C] = \mathsf{sort}([A, C])\\ \\ \begin{array}{l} t_0 := A - \mathsf{hypot}\left(A, B\right)\\ t_1 := B \cdot B - 4 \cdot \left(C \cdot A\right)\\ \mathbf{if}\;{B}^{2} \leq 2 \cdot 10^{-285}:\\ \;\;\;\;\frac{\sqrt{2} \cdot \left(-\sqrt{\mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right) \cdot \left(F \cdot \left(2 \cdot A\right)\right)}\right)}{t_1}\\ \mathbf{elif}\;{B}^{2} \leq 10^{+30}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot t_1\right) \cdot t_0\right)}}{t_1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{F \cdot t_0} \cdot \left(-\sqrt{2}\right)}{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 (- A (hypot A B))) (t_1 (- (* B B) (* 4.0 (* C A)))))
   (if (<= (pow B 2.0) 2e-285)
     (/
      (* (sqrt 2.0) (- (sqrt (* (fma B B (* C (* A -4.0))) (* F (* 2.0 A))))))
      t_1)
     (if (<= (pow B 2.0) 1e+30)
       (/ (- (sqrt (* 2.0 (* (* F t_1) t_0)))) t_1)
       (/ (* (sqrt (* F t_0)) (- (sqrt 2.0))) B)))))
B = abs(B);
assert(A < C);
double code(double A, double B, double C, double F) {
	double t_0 = A - hypot(A, B);
	double t_1 = (B * B) - (4.0 * (C * A));
	double tmp;
	if (pow(B, 2.0) <= 2e-285) {
		tmp = (sqrt(2.0) * -sqrt((fma(B, B, (C * (A * -4.0))) * (F * (2.0 * A))))) / t_1;
	} else if (pow(B, 2.0) <= 1e+30) {
		tmp = -sqrt((2.0 * ((F * t_1) * t_0))) / t_1;
	} else {
		tmp = (sqrt((F * t_0)) * -sqrt(2.0)) / B;
	}
	return tmp;
}
B = abs(B)
A, C = sort([A, C])
function code(A, B, C, F)
	t_0 = Float64(A - hypot(A, B))
	t_1 = Float64(Float64(B * B) - Float64(4.0 * Float64(C * A)))
	tmp = 0.0
	if ((B ^ 2.0) <= 2e-285)
		tmp = Float64(Float64(sqrt(2.0) * Float64(-sqrt(Float64(fma(B, B, Float64(C * Float64(A * -4.0))) * Float64(F * Float64(2.0 * A)))))) / t_1);
	elseif ((B ^ 2.0) <= 1e+30)
		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(Float64(F * t_1) * t_0)))) / t_1);
	else
		tmp = Float64(Float64(sqrt(Float64(F * t_0)) * Float64(-sqrt(2.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[(A - N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(B * B), $MachinePrecision] - N[(4.0 * N[(C * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Power[B, 2.0], $MachinePrecision], 2e-285], N[(N[(N[Sqrt[2.0], $MachinePrecision] * (-N[Sqrt[N[(N[(B * B + N[(C * N[(A * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(F * N[(2.0 * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[N[Power[B, 2.0], $MachinePrecision], 1e+30], N[((-N[Sqrt[N[(2.0 * N[(N[(F * t$95$1), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$1), $MachinePrecision], N[(N[(N[Sqrt[N[(F * t$95$0), $MachinePrecision]], $MachinePrecision] * (-N[Sqrt[2.0], $MachinePrecision])), $MachinePrecision] / B), $MachinePrecision]]]]]
\begin{array}{l}
B = |B|\\
[A, C] = \mathsf{sort}([A, C])\\
\\
\begin{array}{l}
t_0 := A - \mathsf{hypot}\left(A, B\right)\\
t_1 := B \cdot B - 4 \cdot \left(C \cdot A\right)\\
\mathbf{if}\;{B}^{2} \leq 2 \cdot 10^{-285}:\\
\;\;\;\;\frac{\sqrt{2} \cdot \left(-\sqrt{\mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right) \cdot \left(F \cdot \left(2 \cdot A\right)\right)}\right)}{t_1}\\

\mathbf{elif}\;{B}^{2} \leq 10^{+30}:\\
\;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot t_1\right) \cdot t_0\right)}}{t_1}\\

\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{F \cdot t_0} \cdot \left(-\sqrt{2}\right)}{B}\\


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

    1. Initial program 16.4%

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

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

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

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

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

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

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

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

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

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

      if 2.00000000000000015e-285 < (pow.f64 B 2) < 1e30

      1. Initial program 42.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. Simplified42.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 C around 0 35.0%

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

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

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

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

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

        if 1e30 < (pow.f64 B 2)

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

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

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

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

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

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

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

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

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

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

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

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

          1. Initial program 22.4%

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

              \[\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)}} \]
            4. Taylor expanded in A around -inf 16.8%

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

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

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

            if 1.15000000000000001e-142 < B < 1.9e16

            1. Initial program 39.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. Simplified39.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 31.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 - \sqrt{{B}^{2} + {A}^{2}}\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
              3. Step-by-step derivation
                1. +-commutative31.2%

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

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

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

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

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

              if 1.9e16 < B

              1. Initial program 7.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. Simplified7.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 C around 0 13.2%

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

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

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

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

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

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

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

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

                \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 1.15 \cdot 10^{-142}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(B \cdot B + -4 \cdot \left(C \cdot A\right)\right) \cdot \left(F \cdot \left(A + \left(A + 0.5 \cdot \frac{B \cdot B}{A}\right)\right)\right)\right)}}{B \cdot B + -4 \cdot \left(C \cdot A\right)}\\ \mathbf{elif}\;B \leq 1.9 \cdot 10^{+16}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot \left(B \cdot B - 4 \cdot \left(C \cdot A\right)\right)\right) \cdot \left(A - \mathsf{hypot}\left(A, B\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 3: 45.8% 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)\\ t_1 := A - \mathsf{hypot}\left(A, B\right)\\ t_2 := B \cdot B + -4 \cdot \left(C \cdot A\right)\\ \mathbf{if}\;B \leq 1.15 \cdot 10^{-142}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_2 \cdot \left(F \cdot \left(A + \left(A + 0.5 \cdot \frac{B \cdot B}{A}\right)\right)\right)\right)}}{t_2}\\ \mathbf{elif}\;B \leq 1.5 \cdot 10^{+16}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot t_1\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{F \cdot t_1} \cdot \left(-\sqrt{2}\right)}{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 (- A (hypot A B)))
                      (t_2 (+ (* B B) (* -4.0 (* C A)))))
                 (if (<= B 1.15e-142)
                   (/ (- (sqrt (* 2.0 (* t_2 (* F (+ A (+ A (* 0.5 (/ (* B B) A))))))))) t_2)
                   (if (<= B 1.5e+16)
                     (/ (- (sqrt (* 2.0 (* (* F t_0) t_1)))) t_0)
                     (/ (* (sqrt (* F t_1)) (- (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 = A - hypot(A, B);
              	double t_2 = (B * B) + (-4.0 * (C * A));
              	double tmp;
              	if (B <= 1.15e-142) {
              		tmp = -sqrt((2.0 * (t_2 * (F * (A + (A + (0.5 * ((B * B) / A)))))))) / t_2;
              	} else if (B <= 1.5e+16) {
              		tmp = -sqrt((2.0 * ((F * t_0) * t_1))) / t_0;
              	} else {
              		tmp = (sqrt((F * t_1)) * -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 = A - Math.hypot(A, B);
              	double t_2 = (B * B) + (-4.0 * (C * A));
              	double tmp;
              	if (B <= 1.15e-142) {
              		tmp = -Math.sqrt((2.0 * (t_2 * (F * (A + (A + (0.5 * ((B * B) / A)))))))) / t_2;
              	} else if (B <= 1.5e+16) {
              		tmp = -Math.sqrt((2.0 * ((F * t_0) * t_1))) / t_0;
              	} else {
              		tmp = (Math.sqrt((F * t_1)) * -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 = A - math.hypot(A, B)
              	t_2 = (B * B) + (-4.0 * (C * A))
              	tmp = 0
              	if B <= 1.15e-142:
              		tmp = -math.sqrt((2.0 * (t_2 * (F * (A + (A + (0.5 * ((B * B) / A)))))))) / t_2
              	elif B <= 1.5e+16:
              		tmp = -math.sqrt((2.0 * ((F * t_0) * t_1))) / t_0
              	else:
              		tmp = (math.sqrt((F * t_1)) * -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(A - hypot(A, B))
              	t_2 = Float64(Float64(B * B) + Float64(-4.0 * Float64(C * A)))
              	tmp = 0.0
              	if (B <= 1.15e-142)
              		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(t_2 * Float64(F * Float64(A + Float64(A + Float64(0.5 * Float64(Float64(B * B) / A))))))))) / t_2);
              	elseif (B <= 1.5e+16)
              		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(Float64(F * t_0) * t_1)))) / t_0);
              	else
              		tmp = Float64(Float64(sqrt(Float64(F * t_1)) * 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 = A - hypot(A, B);
              	t_2 = (B * B) + (-4.0 * (C * A));
              	tmp = 0.0;
              	if (B <= 1.15e-142)
              		tmp = -sqrt((2.0 * (t_2 * (F * (A + (A + (0.5 * ((B * B) / A)))))))) / t_2;
              	elseif (B <= 1.5e+16)
              		tmp = -sqrt((2.0 * ((F * t_0) * t_1))) / t_0;
              	else
              		tmp = (sqrt((F * t_1)) * -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[(A - N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(B * B), $MachinePrecision] + N[(-4.0 * N[(C * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, 1.15e-142], N[((-N[Sqrt[N[(2.0 * N[(t$95$2 * N[(F * N[(A + N[(A + N[(0.5 * N[(N[(B * B), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$2), $MachinePrecision], If[LessEqual[B, 1.5e+16], N[((-N[Sqrt[N[(2.0 * N[(N[(F * t$95$0), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], N[(N[(N[Sqrt[N[(F * t$95$1), $MachinePrecision]], $MachinePrecision] * (-N[Sqrt[2.0], $MachinePrecision])), $MachinePrecision] / B), $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 := A - \mathsf{hypot}\left(A, B\right)\\
              t_2 := B \cdot B + -4 \cdot \left(C \cdot A\right)\\
              \mathbf{if}\;B \leq 1.15 \cdot 10^{-142}:\\
              \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_2 \cdot \left(F \cdot \left(A + \left(A + 0.5 \cdot \frac{B \cdot B}{A}\right)\right)\right)\right)}}{t_2}\\
              
              \mathbf{elif}\;B \leq 1.5 \cdot 10^{+16}:\\
              \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot t_1\right)}}{t_0}\\
              
              \mathbf{else}:\\
              \;\;\;\;\frac{\sqrt{F \cdot t_1} \cdot \left(-\sqrt{2}\right)}{B}\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 3 regimes
              2. if B < 1.15000000000000001e-142

                1. Initial program 22.4%

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

                    \[\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)}} \]
                  4. Taylor expanded in A around -inf 16.8%

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

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

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

                  if 1.15000000000000001e-142 < B < 1.5e16

                  1. Initial program 39.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. Simplified39.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 31.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 - \sqrt{{B}^{2} + {A}^{2}}\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                    3. Step-by-step derivation
                      1. +-commutative31.2%

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

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

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

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

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

                    if 1.5e16 < B

                    1. Initial program 7.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. Simplified7.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 C around 0 13.2%

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

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

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

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

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

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

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

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

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

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

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

                    Alternative 4: 43.0% 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 7.2 \cdot 10^{-143}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(F \cdot \left(A + \left(A + 0.5 \cdot \frac{B \cdot B}{A}\right)\right)\right)\right)}}{t_1}\\ \mathbf{elif}\;B \leq 1.3 \cdot 10^{+32}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(A - \mathsf{hypot}\left(A, B\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 7.2e-143)
                         (/ (- (sqrt (* 2.0 (* t_1 (* F (+ A (+ A (* 0.5 (/ (* B B) A))))))))) t_1)
                         (if (<= B 1.3e+32)
                           (/ (- (sqrt (* 2.0 (* (* F t_0) (- A (hypot A B)))))) 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 <= 7.2e-143) {
                    		tmp = -sqrt((2.0 * (t_1 * (F * (A + (A + (0.5 * ((B * B) / A)))))))) / t_1;
                    	} else if (B <= 1.3e+32) {
                    		tmp = -sqrt((2.0 * ((F * t_0) * (A - hypot(A, B))))) / 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 <= 7.2e-143) {
                    		tmp = -Math.sqrt((2.0 * (t_1 * (F * (A + (A + (0.5 * ((B * B) / A)))))))) / t_1;
                    	} else if (B <= 1.3e+32) {
                    		tmp = -Math.sqrt((2.0 * ((F * t_0) * (A - Math.hypot(A, B))))) / 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 <= 7.2e-143:
                    		tmp = -math.sqrt((2.0 * (t_1 * (F * (A + (A + (0.5 * ((B * B) / A)))))))) / t_1
                    	elif B <= 1.3e+32:
                    		tmp = -math.sqrt((2.0 * ((F * t_0) * (A - math.hypot(A, B))))) / 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 <= 7.2e-143)
                    		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(t_1 * Float64(F * Float64(A + Float64(A + Float64(0.5 * Float64(Float64(B * B) / A))))))))) / t_1);
                    	elseif (B <= 1.3e+32)
                    		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(Float64(F * t_0) * Float64(A - hypot(A, B)))))) / 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 <= 7.2e-143)
                    		tmp = -sqrt((2.0 * (t_1 * (F * (A + (A + (0.5 * ((B * B) / A)))))))) / t_1;
                    	elseif (B <= 1.3e+32)
                    		tmp = -sqrt((2.0 * ((F * t_0) * (A - hypot(A, B))))) / 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, 7.2e-143], N[((-N[Sqrt[N[(2.0 * N[(t$95$1 * N[(F * N[(A + N[(A + N[(0.5 * N[(N[(B * B), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$1), $MachinePrecision], If[LessEqual[B, 1.3e+32], N[((-N[Sqrt[N[(2.0 * N[(N[(F * t$95$0), $MachinePrecision] * N[(A - N[Sqrt[A ^ 2 + B ^ 2], $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 7.2 \cdot 10^{-143}:\\
                    \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(F \cdot \left(A + \left(A + 0.5 \cdot \frac{B \cdot B}{A}\right)\right)\right)\right)}}{t_1}\\
                    
                    \mathbf{elif}\;B \leq 1.3 \cdot 10^{+32}:\\
                    \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(A - \mathsf{hypot}\left(A, B\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 < 7.1999999999999996e-143

                      1. Initial program 22.4%

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

                          \[\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)}} \]
                        4. Taylor expanded in A around -inf 16.8%

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

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

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

                        if 7.1999999999999996e-143 < B < 1.3000000000000001e32

                        1. Initial program 37.5%

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

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

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

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

                          if 1.3000000000000001e32 < B

                          1. Initial program 8.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. Simplified8.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 13.5%

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 7.2 \cdot 10^{-143}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(B \cdot B + -4 \cdot \left(C \cdot A\right)\right) \cdot \left(F \cdot \left(A + \left(A + 0.5 \cdot \frac{B \cdot B}{A}\right)\right)\right)\right)}}{B \cdot B + -4 \cdot \left(C \cdot A\right)}\\ \mathbf{elif}\;B \leq 1.3 \cdot 10^{+32}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot \left(B \cdot B - 4 \cdot \left(C \cdot A\right)\right)\right) \cdot \left(A - \mathsf{hypot}\left(A, B\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: 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)\\ t_1 := B \cdot B + -4 \cdot \left(C \cdot A\right)\\ \mathbf{if}\;B \leq 6 \cdot 10^{-107}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(F \cdot \left(A + \left(A + 0.5 \cdot \frac{B \cdot B}{A}\right)\right)\right)\right)}}{t_1}\\ \mathbf{elif}\;B \leq 1.75 \cdot 10^{+16}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(2 \cdot A\right) \cdot \left(F \cdot t_0\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 6e-107)
                               (/ (- (sqrt (* 2.0 (* t_1 (* F (+ A (+ A (* 0.5 (/ (* B B) A))))))))) t_1)
                               (if (<= B 1.75e+16)
                                 (/ (- (sqrt (* 2.0 (* (* 2.0 A) (* F t_0))))) 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 <= 6e-107) {
                          		tmp = -sqrt((2.0 * (t_1 * (F * (A + (A + (0.5 * ((B * B) / A)))))))) / t_1;
                          	} else if (B <= 1.75e+16) {
                          		tmp = -sqrt((2.0 * ((2.0 * A) * (F * t_0)))) / 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) :: t_1
                              real(8) :: tmp
                              t_0 = (b * b) - (4.0d0 * (c * a))
                              t_1 = (b * b) + ((-4.0d0) * (c * a))
                              if (b <= 6d-107) then
                                  tmp = -sqrt((2.0d0 * (t_1 * (f * (a + (a + (0.5d0 * ((b * b) / a)))))))) / t_1
                              else if (b <= 1.75d+16) then
                                  tmp = -sqrt((2.0d0 * ((2.0d0 * a) * (f * t_0)))) / 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 t_1 = (B * B) + (-4.0 * (C * A));
                          	double tmp;
                          	if (B <= 6e-107) {
                          		tmp = -Math.sqrt((2.0 * (t_1 * (F * (A + (A + (0.5 * ((B * B) / A)))))))) / t_1;
                          	} else if (B <= 1.75e+16) {
                          		tmp = -Math.sqrt((2.0 * ((2.0 * A) * (F * t_0)))) / 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 <= 6e-107:
                          		tmp = -math.sqrt((2.0 * (t_1 * (F * (A + (A + (0.5 * ((B * B) / A)))))))) / t_1
                          	elif B <= 1.75e+16:
                          		tmp = -math.sqrt((2.0 * ((2.0 * A) * (F * t_0)))) / 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 <= 6e-107)
                          		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(t_1 * Float64(F * Float64(A + Float64(A + Float64(0.5 * Float64(Float64(B * B) / A))))))))) / t_1);
                          	elseif (B <= 1.75e+16)
                          		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(Float64(2.0 * A) * Float64(F * t_0))))) / 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 <= 6e-107)
                          		tmp = -sqrt((2.0 * (t_1 * (F * (A + (A + (0.5 * ((B * B) / A)))))))) / t_1;
                          	elseif (B <= 1.75e+16)
                          		tmp = -sqrt((2.0 * ((2.0 * A) * (F * t_0)))) / 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, 6e-107], N[((-N[Sqrt[N[(2.0 * N[(t$95$1 * N[(F * N[(A + N[(A + N[(0.5 * N[(N[(B * B), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$1), $MachinePrecision], If[LessEqual[B, 1.75e+16], N[((-N[Sqrt[N[(2.0 * N[(N[(2.0 * A), $MachinePrecision] * N[(F * t$95$0), $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 6 \cdot 10^{-107}:\\
                          \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(F \cdot \left(A + \left(A + 0.5 \cdot \frac{B \cdot B}{A}\right)\right)\right)\right)}}{t_1}\\
                          
                          \mathbf{elif}\;B \leq 1.75 \cdot 10^{+16}:\\
                          \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(2 \cdot A\right) \cdot \left(F \cdot t_0\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 < 5.9999999999999994e-107

                            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. distribute-frac-neg24.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)}} \]
                              3. Applied egg-rr33.2%

                                \[\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)}} \]
                              4. Taylor expanded in A around -inf 17.0%

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

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

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

                              if 5.9999999999999994e-107 < B < 1.75e16

                              1. Initial program 32.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. Simplified32.8%

                                  \[\leadsto \color{blue}{\frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(\left(A + C\right) - \sqrt{B \cdot B + {\left(A - C\right)}^{2}}\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
                                2. Taylor expanded in A around -inf 14.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. *-commutative14.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. Simplified14.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)} \]

                                if 1.75e16 < B

                                1. Initial program 7.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. Simplified7.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 C around 0 13.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  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. distribute-frac-neg24.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)}} \]
                                    3. Applied egg-rr33.2%

                                      \[\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)}} \]
                                    4. Taylor expanded in A around -inf 17.0%

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

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

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

                                    if 2.9e-109 < B < 2e16

                                    1. Initial program 32.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. Simplified32.8%

                                        \[\leadsto \color{blue}{\frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(\left(A + C\right) - \sqrt{B \cdot B + {\left(A - C\right)}^{2}}\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
                                      2. Taylor expanded in A around -inf 14.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. *-commutative14.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. Simplified14.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)} \]

                                      if 2e16 < B

                                      1. Initial program 7.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. Simplified7.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 C around 0 13.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                        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. distribute-frac-neg24.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)}} \]
                                          3. Applied egg-rr33.2%

                                            \[\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)}} \]
                                          4. Taylor expanded in A around -inf 17.0%

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

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

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

                                          if 1.7200000000000001e-109 < B < 3.1e16

                                          1. Initial program 32.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. Simplified32.8%

                                              \[\leadsto \color{blue}{\frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(\left(A + C\right) - \sqrt{B \cdot B + {\left(A - C\right)}^{2}}\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
                                            2. Taylor expanded in A around -inf 14.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. *-commutative14.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. Simplified14.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)} \]

                                            if 3.1e16 < B

                                            1. Initial program 7.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. Simplified7.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 C around 0 13.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                              1. Initial program 21.0%

                                                \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
                                              2. Step-by-step derivation
                                                1. Simplified21.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. Step-by-step derivation
                                                  1. distribute-frac-neg21.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)}} \]
                                                3. Applied egg-rr33.5%

                                                  \[\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)}} \]
                                                4. Taylor expanded in A around -inf 30.6%

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

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

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

                                                if -3.99999999999999998e-90 < A < 2.74999999999999991e-237

                                                1. Initial program 43.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. Simplified43.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 B around inf 14.9%

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

                                                  if 2.74999999999999991e-237 < A

                                                  1. Initial program 10.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. Simplified10.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. Step-by-step derivation
                                                      1. distribute-frac-neg10.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)}} \]
                                                    3. Applied egg-rr12.2%

                                                      \[\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)}} \]
                                                    4. Taylor expanded in C around inf 7.6%

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

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

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

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

                                                        \[\leadsto -\frac{\sqrt{2 \cdot \left(\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right) \cdot \left(F \cdot \left(A + \left(A + -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}\right)\right)\right)\right)}}{B \cdot B + -4 \cdot \left(A \cdot C\right)} \]
                                                      5. mul-1-neg7.7%

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

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

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

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

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

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

                                                    1. Initial program 21.0%

                                                      \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
                                                    2. Step-by-step derivation
                                                      1. Simplified21.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. Step-by-step derivation
                                                        1. distribute-frac-neg21.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)}} \]
                                                      3. Applied egg-rr33.5%

                                                        \[\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)}} \]
                                                      4. Taylor expanded in A around -inf 30.6%

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

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

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

                                                      if -3.99999999999999998e-90 < A < 1.10000000000000001e-232

                                                      1. Initial program 43.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. Simplified43.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 B around inf 14.9%

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

                                                        if 1.10000000000000001e-232 < A

                                                        1. Initial program 10.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. Simplified10.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 3.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. *-commutative3.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. Simplified3.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 5.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)} \]
                                                          6. Step-by-step derivation
                                                            1. associate-*r*5.7%

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

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

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

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

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

                                                          1. Initial program 21.0%

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

                                                            if -4.1999999999999998e-90 < A < 1.32e-235

                                                            1. Initial program 43.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. Simplified43.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 B around inf 14.9%

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

                                                              if 1.32e-235 < A

                                                              1. Initial program 10.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. Simplified10.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 3.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. *-commutative3.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. Simplified3.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 5.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)} \]
                                                                6. Step-by-step derivation
                                                                  1. associate-*r*5.7%

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

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

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

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

                                                              Alternative 11: 28.9% 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)\\ \mathbf{if}\;B \leq 2.8 \cdot 10^{+116}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(2 \cdot A\right) \cdot \left(F \cdot t_0\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \frac{\sqrt{A \cdot F}}{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 2.8e+116)
                                                                   (/ (- (sqrt (* 2.0 (* (* 2.0 A) (* F t_0))))) t_0)
                                                                   (* -2.0 (/ (sqrt (* A F)) 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 <= 2.8e+116) {
                                                              		tmp = -sqrt((2.0 * ((2.0 * A) * (F * t_0)))) / t_0;
                                                              	} else {
                                                              		tmp = -2.0 * (sqrt((A * F)) / 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 <= 2.8d+116) then
                                                                      tmp = -sqrt((2.0d0 * ((2.0d0 * a) * (f * t_0)))) / t_0
                                                                  else
                                                                      tmp = (-2.0d0) * (sqrt((a * f)) / 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 <= 2.8e+116) {
                                                              		tmp = -Math.sqrt((2.0 * ((2.0 * A) * (F * t_0)))) / t_0;
                                                              	} else {
                                                              		tmp = -2.0 * (Math.sqrt((A * F)) / 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 <= 2.8e+116:
                                                              		tmp = -math.sqrt((2.0 * ((2.0 * A) * (F * t_0)))) / t_0
                                                              	else:
                                                              		tmp = -2.0 * (math.sqrt((A * F)) / 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 <= 2.8e+116)
                                                              		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(Float64(2.0 * A) * Float64(F * t_0))))) / t_0);
                                                              	else
                                                              		tmp = Float64(-2.0 * Float64(sqrt(Float64(A * F)) / 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 <= 2.8e+116)
                                                              		tmp = -sqrt((2.0 * ((2.0 * A) * (F * t_0)))) / t_0;
                                                              	else
                                                              		tmp = -2.0 * (sqrt((A * F)) / 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, 2.8e+116], N[((-N[Sqrt[N[(2.0 * N[(N[(2.0 * A), $MachinePrecision] * N[(F * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], N[(-2.0 * N[(N[Sqrt[N[(A * F), $MachinePrecision]], $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 2.8 \cdot 10^{+116}:\\
                                                              \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(2 \cdot A\right) \cdot \left(F \cdot t_0\right)\right)}}{t_0}\\
                                                              
                                                              \mathbf{else}:\\
                                                              \;\;\;\;-2 \cdot \frac{\sqrt{A \cdot F}}{B}\\
                                                              
                                                              
                                                              \end{array}
                                                              \end{array}
                                                              
                                                              Derivation
                                                              1. Split input into 2 regimes
                                                              2. if B < 2.80000000000000004e116

                                                                1. Initial program 24.6%

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

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

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

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

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

                                                                  if 2.80000000000000004e116 < B

                                                                  1. Initial program 3.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. Simplified3.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 0.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. *-commutative0.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. Simplified0.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. Taylor expanded in B around inf 2.8%

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

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

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

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

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

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

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

                                                                  Alternative 12: 22.5% accurate, 5.0× speedup?

                                                                  \[\begin{array}{l} B = |B|\\ [A, C] = \mathsf{sort}([A, C])\\ \\ \begin{array}{l} \mathbf{if}\;B \leq 4.3 \cdot 10^{-14}:\\ \;\;\;\;\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{A \cdot F}}{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.3e-14)
                                                                     (/
                                                                      (- (sqrt (* 2.0 (* (* 2.0 A) (* -4.0 (* A (* C F)))))))
                                                                      (- (* B B) (* 4.0 (* C A))))
                                                                     (* -2.0 (/ (sqrt (* A F)) B))))
                                                                  B = abs(B);
                                                                  assert(A < C);
                                                                  double code(double A, double B, double C, double F) {
                                                                  	double tmp;
                                                                  	if (B <= 4.3e-14) {
                                                                  		tmp = -sqrt((2.0 * ((2.0 * A) * (-4.0 * (A * (C * F)))))) / ((B * B) - (4.0 * (C * A)));
                                                                  	} else {
                                                                  		tmp = -2.0 * (sqrt((A * F)) / 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.3d-14) then
                                                                          tmp = -sqrt((2.0d0 * ((2.0d0 * a) * ((-4.0d0) * (a * (c * f)))))) / ((b * b) - (4.0d0 * (c * a)))
                                                                      else
                                                                          tmp = (-2.0d0) * (sqrt((a * f)) / 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.3e-14) {
                                                                  		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((A * F)) / B);
                                                                  	}
                                                                  	return tmp;
                                                                  }
                                                                  
                                                                  B = abs(B)
                                                                  [A, C] = sort([A, C])
                                                                  def code(A, B, C, F):
                                                                  	tmp = 0
                                                                  	if B <= 4.3e-14:
                                                                  		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((A * F)) / B)
                                                                  	return tmp
                                                                  
                                                                  B = abs(B)
                                                                  A, C = sort([A, C])
                                                                  function code(A, B, C, F)
                                                                  	tmp = 0.0
                                                                  	if (B <= 4.3e-14)
                                                                  		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(A * F)) / 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.3e-14)
                                                                  		tmp = -sqrt((2.0 * ((2.0 * A) * (-4.0 * (A * (C * F)))))) / ((B * B) - (4.0 * (C * A)));
                                                                  	else
                                                                  		tmp = -2.0 * (sqrt((A * F)) / 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.3e-14], 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[(A * F), $MachinePrecision]], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]
                                                                  
                                                                  \begin{array}{l}
                                                                  B = |B|\\
                                                                  [A, C] = \mathsf{sort}([A, C])\\
                                                                  \\
                                                                  \begin{array}{l}
                                                                  \mathbf{if}\;B \leq 4.3 \cdot 10^{-14}:\\
                                                                  \;\;\;\;\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{A \cdot F}}{B}\\
                                                                  
                                                                  
                                                                  \end{array}
                                                                  \end{array}
                                                                  
                                                                  Derivation
                                                                  1. Split input into 2 regimes
                                                                  2. if B < 4.29999999999999998e-14

                                                                    1. Initial program 25.3%

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

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

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

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

                                                                        \[\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 4.29999999999999998e-14 < B

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

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

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

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

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

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

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

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

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

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

                                                                        \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 4.3 \cdot 10^{-14}:\\ \;\;\;\;\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{A \cdot F}}{B}\\ \end{array} \]

                                                                      Alternative 13: 26.6% accurate, 5.0× speedup?

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

                                                                        1. Initial program 25.3%

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

                                                                            \[\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)} \]
                                                                          6. Step-by-step derivation
                                                                            1. associate-*r*13.6%

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

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

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

                                                                          if 2.1e8 < B

                                                                          1. Initial program 9.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. Simplified9.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 5.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. *-commutative5.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. Simplified5.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 5.7%

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

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

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

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

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

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

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

                                                                          Alternative 14: 18.9% accurate, 5.1× speedup?

                                                                          \[\begin{array}{l} B = |B|\\ [A, C] = \mathsf{sort}([A, C])\\ \\ \begin{array}{l} \mathbf{if}\;A \leq -1.12 \cdot 10^{+111}:\\ \;\;\;\;-2 \cdot \frac{\sqrt{A \cdot F}}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(C \cdot F\right) \cdot \left(\left(A \cdot A\right) \cdot -8\right)\right)}}{B \cdot B - 4 \cdot \left(C \cdot A\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
                                                                           (if (<= A -1.12e+111)
                                                                             (* -2.0 (/ (sqrt (* A F)) B))
                                                                             (/
                                                                              (- (sqrt (* 2.0 (* (* C F) (* (* A A) -8.0)))))
                                                                              (- (* B B) (* 4.0 (* C A))))))
                                                                          B = abs(B);
                                                                          assert(A < C);
                                                                          double code(double A, double B, double C, double F) {
                                                                          	double tmp;
                                                                          	if (A <= -1.12e+111) {
                                                                          		tmp = -2.0 * (sqrt((A * F)) / B);
                                                                          	} else {
                                                                          		tmp = -sqrt((2.0 * ((C * F) * ((A * A) * -8.0)))) / ((B * B) - (4.0 * (C * A)));
                                                                          	}
                                                                          	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 (a <= (-1.12d+111)) then
                                                                                  tmp = (-2.0d0) * (sqrt((a * f)) / b)
                                                                              else
                                                                                  tmp = -sqrt((2.0d0 * ((c * f) * ((a * a) * (-8.0d0))))) / ((b * b) - (4.0d0 * (c * a)))
                                                                              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 (A <= -1.12e+111) {
                                                                          		tmp = -2.0 * (Math.sqrt((A * F)) / B);
                                                                          	} else {
                                                                          		tmp = -Math.sqrt((2.0 * ((C * F) * ((A * A) * -8.0)))) / ((B * B) - (4.0 * (C * A)));
                                                                          	}
                                                                          	return tmp;
                                                                          }
                                                                          
                                                                          B = abs(B)
                                                                          [A, C] = sort([A, C])
                                                                          def code(A, B, C, F):
                                                                          	tmp = 0
                                                                          	if A <= -1.12e+111:
                                                                          		tmp = -2.0 * (math.sqrt((A * F)) / B)
                                                                          	else:
                                                                          		tmp = -math.sqrt((2.0 * ((C * F) * ((A * A) * -8.0)))) / ((B * B) - (4.0 * (C * A)))
                                                                          	return tmp
                                                                          
                                                                          B = abs(B)
                                                                          A, C = sort([A, C])
                                                                          function code(A, B, C, F)
                                                                          	tmp = 0.0
                                                                          	if (A <= -1.12e+111)
                                                                          		tmp = Float64(-2.0 * Float64(sqrt(Float64(A * F)) / B));
                                                                          	else
                                                                          		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(Float64(C * F) * Float64(Float64(A * A) * -8.0))))) / Float64(Float64(B * B) - Float64(4.0 * Float64(C * A))));
                                                                          	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 (A <= -1.12e+111)
                                                                          		tmp = -2.0 * (sqrt((A * F)) / B);
                                                                          	else
                                                                          		tmp = -sqrt((2.0 * ((C * F) * ((A * A) * -8.0)))) / ((B * B) - (4.0 * (C * A)));
                                                                          	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[A, -1.12e+111], N[(-2.0 * N[(N[Sqrt[N[(A * F), $MachinePrecision]], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], N[((-N[Sqrt[N[(2.0 * N[(N[(C * F), $MachinePrecision] * N[(N[(A * A), $MachinePrecision] * -8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / N[(N[(B * B), $MachinePrecision] - N[(4.0 * N[(C * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                                                                          
                                                                          \begin{array}{l}
                                                                          B = |B|\\
                                                                          [A, C] = \mathsf{sort}([A, C])\\
                                                                          \\
                                                                          \begin{array}{l}
                                                                          \mathbf{if}\;A \leq -1.12 \cdot 10^{+111}:\\
                                                                          \;\;\;\;-2 \cdot \frac{\sqrt{A \cdot F}}{B}\\
                                                                          
                                                                          \mathbf{else}:\\
                                                                          \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(C \cdot F\right) \cdot \left(\left(A \cdot A\right) \cdot -8\right)\right)}}{B \cdot B - 4 \cdot \left(C \cdot A\right)}\\
                                                                          
                                                                          
                                                                          \end{array}
                                                                          \end{array}
                                                                          
                                                                          Derivation
                                                                          1. Split input into 2 regimes
                                                                          2. if A < -1.11999999999999995e111

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

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

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

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

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

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

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

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

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

                                                                              if -1.11999999999999995e111 < A

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

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

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

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

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

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

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

                                                                              Alternative 15: 9.2% accurate, 5.9× speedup?

                                                                              \[\begin{array}{l} B = |B|\\ [A, C] = \mathsf{sort}([A, C])\\ \\ -2 \cdot \frac{\sqrt{A \cdot F}}{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 (* A F)) B)))
                                                                              B = abs(B);
                                                                              assert(A < C);
                                                                              double code(double A, double B, double C, double F) {
                                                                              	return -2.0 * (sqrt((A * F)) / 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((a * f)) / 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((A * F)) / B);
                                                                              }
                                                                              
                                                                              B = abs(B)
                                                                              [A, C] = sort([A, C])
                                                                              def code(A, B, C, F):
                                                                              	return -2.0 * (math.sqrt((A * F)) / B)
                                                                              
                                                                              B = abs(B)
                                                                              A, C = sort([A, C])
                                                                              function code(A, B, C, F)
                                                                              	return Float64(-2.0 * Float64(sqrt(Float64(A * F)) / B))
                                                                              end
                                                                              
                                                                              B = abs(B)
                                                                              A, C = num2cell(sort([A, C])){:}
                                                                              function tmp = code(A, B, C, F)
                                                                              	tmp = -2.0 * (sqrt((A * F)) / 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[(A * F), $MachinePrecision]], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]
                                                                              
                                                                              \begin{array}{l}
                                                                              B = |B|\\
                                                                              [A, C] = \mathsf{sort}([A, C])\\
                                                                              \\
                                                                              -2 \cdot \frac{\sqrt{A \cdot F}}{B}
                                                                              \end{array}
                                                                              
                                                                              Derivation
                                                                              1. Initial program 21.5%

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

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

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

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

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

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

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

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

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

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

                                                                                Reproduce

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