ABCF->ab-angle a

Percentage Accurate: 19.1% → 54.7%
Time: 26.2s
Alternatives: 18
Speedup: 4.5×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 18 alternatives:

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

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

\[\begin{array}{l} B = |B|\\ \\ \begin{array}{l} t_0 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\ t_1 := \mathsf{fma}\left(C, A \cdot -4, B \cdot B\right)\\ t_2 := {B}^{2} - \left(4 \cdot A\right) \cdot C\\ t_3 := \frac{-\sqrt{\left(2 \cdot \left(t_2 \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}}{t_2}\\ t_4 := \frac{\sqrt{2 \cdot \left(F \cdot t_0\right)} \cdot \left(-\sqrt{C + \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}\right)}{t_0}\\ \mathbf{if}\;t_3 \leq -1 \cdot 10^{-204}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;t_3 \leq 2 \cdot 10^{+17}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot t_1\right) \cdot \mathsf{fma}\left(2, C, -0.5 \cdot \frac{B \cdot B}{A}\right)\right)}}{t_1}\\ \mathbf{elif}\;t_3 \leq \infty:\\ \;\;\;\;t_4\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(\sqrt{F} \cdot \left(-\sqrt{A + \mathsf{hypot}\left(B, A\right)}\right)\right)\\ \end{array} \end{array} \]
NOTE: B should be positive before calling this function
(FPCore (A B C F)
 :precision binary64
 (let* ((t_0 (- (* B B) (* 4.0 (* A C))))
        (t_1 (fma C (* A -4.0) (* B B)))
        (t_2 (- (pow B 2.0) (* (* 4.0 A) C)))
        (t_3
         (/
          (-
           (sqrt
            (*
             (* 2.0 (* t_2 F))
             (+ (+ A C) (sqrt (+ (pow B 2.0) (pow (- A C) 2.0)))))))
          t_2))
        (t_4
         (/
          (* (sqrt (* 2.0 (* F t_0))) (- (sqrt (+ C (+ A (hypot B (- A C)))))))
          t_0)))
   (if (<= t_3 -1e-204)
     t_4
     (if (<= t_3 2e+17)
       (/
        (- (sqrt (* 2.0 (* (* F t_1) (fma 2.0 C (* -0.5 (/ (* B B) A)))))))
        t_1)
       (if (<= t_3 INFINITY)
         t_4
         (* (/ (sqrt 2.0) B) (* (sqrt F) (- (sqrt (+ A (hypot B A)))))))))))
B = abs(B);
double code(double A, double B, double C, double F) {
	double t_0 = (B * B) - (4.0 * (A * C));
	double t_1 = fma(C, (A * -4.0), (B * B));
	double t_2 = pow(B, 2.0) - ((4.0 * A) * C);
	double t_3 = -sqrt(((2.0 * (t_2 * F)) * ((A + C) + sqrt((pow(B, 2.0) + pow((A - C), 2.0)))))) / t_2;
	double t_4 = (sqrt((2.0 * (F * t_0))) * -sqrt((C + (A + hypot(B, (A - C)))))) / t_0;
	double tmp;
	if (t_3 <= -1e-204) {
		tmp = t_4;
	} else if (t_3 <= 2e+17) {
		tmp = -sqrt((2.0 * ((F * t_1) * fma(2.0, C, (-0.5 * ((B * B) / A)))))) / t_1;
	} else if (t_3 <= ((double) INFINITY)) {
		tmp = t_4;
	} else {
		tmp = (sqrt(2.0) / B) * (sqrt(F) * -sqrt((A + hypot(B, A))));
	}
	return tmp;
}
B = abs(B)
function code(A, B, C, F)
	t_0 = Float64(Float64(B * B) - Float64(4.0 * Float64(A * C)))
	t_1 = fma(C, Float64(A * -4.0), Float64(B * B))
	t_2 = Float64((B ^ 2.0) - Float64(Float64(4.0 * A) * C))
	t_3 = Float64(Float64(-sqrt(Float64(Float64(2.0 * Float64(t_2 * F)) * Float64(Float64(A + C) + sqrt(Float64((B ^ 2.0) + (Float64(A - C) ^ 2.0))))))) / t_2)
	t_4 = Float64(Float64(sqrt(Float64(2.0 * Float64(F * t_0))) * Float64(-sqrt(Float64(C + Float64(A + hypot(B, Float64(A - C))))))) / t_0)
	tmp = 0.0
	if (t_3 <= -1e-204)
		tmp = t_4;
	elseif (t_3 <= 2e+17)
		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(Float64(F * t_1) * fma(2.0, C, Float64(-0.5 * Float64(Float64(B * B) / A))))))) / t_1);
	elseif (t_3 <= Inf)
		tmp = t_4;
	else
		tmp = Float64(Float64(sqrt(2.0) / B) * Float64(sqrt(F) * Float64(-sqrt(Float64(A + hypot(B, A))))));
	end
	return tmp
end
NOTE: B should be positive before calling this function
code[A_, B_, C_, F_] := Block[{t$95$0 = N[(N[(B * B), $MachinePrecision] - N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(C * N[(A * -4.0), $MachinePrecision] + N[(B * B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Power[B, 2.0], $MachinePrecision] - N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[((-N[Sqrt[N[(N[(2.0 * N[(t$95$2 * F), $MachinePrecision]), $MachinePrecision] * N[(N[(A + C), $MachinePrecision] + N[Sqrt[N[(N[Power[B, 2.0], $MachinePrecision] + N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[Sqrt[N[(2.0 * N[(F * t$95$0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-N[Sqrt[N[(C + N[(A + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision] / t$95$0), $MachinePrecision]}, If[LessEqual[t$95$3, -1e-204], t$95$4, If[LessEqual[t$95$3, 2e+17], N[((-N[Sqrt[N[(2.0 * N[(N[(F * t$95$1), $MachinePrecision] * N[(2.0 * C + N[(-0.5 * N[(N[(B * B), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$1), $MachinePrecision], If[LessEqual[t$95$3, Infinity], t$95$4, N[(N[(N[Sqrt[2.0], $MachinePrecision] / B), $MachinePrecision] * N[(N[Sqrt[F], $MachinePrecision] * (-N[Sqrt[N[(A + N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
B = |B|\\
\\
\begin{array}{l}
t_0 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\
t_1 := \mathsf{fma}\left(C, A \cdot -4, B \cdot B\right)\\
t_2 := {B}^{2} - \left(4 \cdot A\right) \cdot C\\
t_3 := \frac{-\sqrt{\left(2 \cdot \left(t_2 \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}}{t_2}\\
t_4 := \frac{\sqrt{2 \cdot \left(F \cdot t_0\right)} \cdot \left(-\sqrt{C + \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}\right)}{t_0}\\
\mathbf{if}\;t_3 \leq -1 \cdot 10^{-204}:\\
\;\;\;\;t_4\\

\mathbf{elif}\;t_3 \leq 2 \cdot 10^{+17}:\\
\;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot t_1\right) \cdot \mathsf{fma}\left(2, C, -0.5 \cdot \frac{B \cdot B}{A}\right)\right)}}{t_1}\\

\mathbf{elif}\;t_3 \leq \infty:\\
\;\;\;\;t_4\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 2 (*.f64 (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C)) F)) (+.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))))) (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C))) < -1e-204 or 2e17 < (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 2 (*.f64 (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C)) F)) (+.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))))) (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C))) < +inf.0

    1. Initial program 40.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1e-204 < (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 2 (*.f64 (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C)) F)) (+.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))))) (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C))) < 2e17

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

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

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

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

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

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

      if +inf.0 < (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 2 (*.f64 (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C)) F)) (+.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))))) (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C)))

      1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 2: 53.0% accurate, 1.5× speedup?

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

        1. Initial program 23.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 1.18e100 < B

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

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

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

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

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

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

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

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

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

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

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

        Alternative 3: 44.1% accurate, 1.9× speedup?

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

          1. Initial program 23.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if 9.4e100 < B

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

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

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

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

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

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

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

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

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

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

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

          Alternative 4: 37.8% accurate, 1.9× speedup?

          \[\begin{array}{l} B = |B|\\ \\ \begin{array}{l} t_0 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\ t_1 := \mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)\\ t_2 := \mathsf{fma}\left(C, A \cdot -4, B \cdot B\right)\\ \mathbf{if}\;B \leq 1.035 \cdot 10^{-283}:\\ \;\;\;\;\frac{-\sqrt{\left(2 \cdot \left(F \cdot t_1\right)\right) \cdot \left(A + A\right)}}{t_1}\\ \mathbf{elif}\;B \leq 1.08 \cdot 10^{-74}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot t_2\right) \cdot \left(C + C\right)\right)}}{t_2}\\ \mathbf{elif}\;B \leq 2.3 \cdot 10^{+46}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(C + \left(A + \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot \left(-\sqrt{F \cdot \left(A + \mathsf{hypot}\left(B, A\right)\right)}\right)}{B}\\ \end{array} \end{array} \]
          NOTE: B should be positive before calling this function
          (FPCore (A B C F)
           :precision binary64
           (let* ((t_0 (- (* B B) (* 4.0 (* A C))))
                  (t_1 (fma B B (* C (* A -4.0))))
                  (t_2 (fma C (* A -4.0) (* B B))))
             (if (<= B 1.035e-283)
               (/ (- (sqrt (* (* 2.0 (* F t_1)) (+ A A)))) t_1)
               (if (<= B 1.08e-74)
                 (/ (- (sqrt (* 2.0 (* (* F t_2) (+ C C))))) t_2)
                 (if (<= B 2.3e+46)
                   (/ (- (sqrt (* 2.0 (* (* F t_0) (+ C (+ A (hypot B (- A C)))))))) t_0)
                   (/ (* (sqrt 2.0) (- (sqrt (* F (+ A (hypot B A)))))) B))))))
          B = abs(B);
          double code(double A, double B, double C, double F) {
          	double t_0 = (B * B) - (4.0 * (A * C));
          	double t_1 = fma(B, B, (C * (A * -4.0)));
          	double t_2 = fma(C, (A * -4.0), (B * B));
          	double tmp;
          	if (B <= 1.035e-283) {
          		tmp = -sqrt(((2.0 * (F * t_1)) * (A + A))) / t_1;
          	} else if (B <= 1.08e-74) {
          		tmp = -sqrt((2.0 * ((F * t_2) * (C + C)))) / t_2;
          	} else if (B <= 2.3e+46) {
          		tmp = -sqrt((2.0 * ((F * t_0) * (C + (A + hypot(B, (A - C))))))) / t_0;
          	} else {
          		tmp = (sqrt(2.0) * -sqrt((F * (A + hypot(B, A))))) / B;
          	}
          	return tmp;
          }
          
          B = abs(B)
          function code(A, B, C, F)
          	t_0 = Float64(Float64(B * B) - Float64(4.0 * Float64(A * C)))
          	t_1 = fma(B, B, Float64(C * Float64(A * -4.0)))
          	t_2 = fma(C, Float64(A * -4.0), Float64(B * B))
          	tmp = 0.0
          	if (B <= 1.035e-283)
          		tmp = Float64(Float64(-sqrt(Float64(Float64(2.0 * Float64(F * t_1)) * Float64(A + A)))) / t_1);
          	elseif (B <= 1.08e-74)
          		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(Float64(F * t_2) * Float64(C + C))))) / t_2);
          	elseif (B <= 2.3e+46)
          		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(Float64(F * t_0) * Float64(C + Float64(A + hypot(B, Float64(A - C)))))))) / t_0);
          	else
          		tmp = Float64(Float64(sqrt(2.0) * Float64(-sqrt(Float64(F * Float64(A + hypot(B, A)))))) / B);
          	end
          	return tmp
          end
          
          NOTE: B should be positive before calling this function
          code[A_, B_, C_, F_] := Block[{t$95$0 = N[(N[(B * B), $MachinePrecision] - N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(B * B + N[(C * N[(A * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(C * N[(A * -4.0), $MachinePrecision] + N[(B * B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, 1.035e-283], N[((-N[Sqrt[N[(N[(2.0 * N[(F * t$95$1), $MachinePrecision]), $MachinePrecision] * N[(A + A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$1), $MachinePrecision], If[LessEqual[B, 1.08e-74], N[((-N[Sqrt[N[(2.0 * N[(N[(F * t$95$2), $MachinePrecision] * N[(C + C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$2), $MachinePrecision], If[LessEqual[B, 2.3e+46], N[((-N[Sqrt[N[(2.0 * N[(N[(F * t$95$0), $MachinePrecision] * N[(C + N[(A + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], N[(N[(N[Sqrt[2.0], $MachinePrecision] * (-N[Sqrt[N[(F * N[(A + N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision] / B), $MachinePrecision]]]]]]]
          
          \begin{array}{l}
          B = |B|\\
          \\
          \begin{array}{l}
          t_0 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\
          t_1 := \mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)\\
          t_2 := \mathsf{fma}\left(C, A \cdot -4, B \cdot B\right)\\
          \mathbf{if}\;B \leq 1.035 \cdot 10^{-283}:\\
          \;\;\;\;\frac{-\sqrt{\left(2 \cdot \left(F \cdot t_1\right)\right) \cdot \left(A + A\right)}}{t_1}\\
          
          \mathbf{elif}\;B \leq 1.08 \cdot 10^{-74}:\\
          \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot t_2\right) \cdot \left(C + C\right)\right)}}{t_2}\\
          
          \mathbf{elif}\;B \leq 2.3 \cdot 10^{+46}:\\
          \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(C + \left(A + \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)}}{t_0}\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{\sqrt{2} \cdot \left(-\sqrt{F \cdot \left(A + \mathsf{hypot}\left(B, A\right)\right)}\right)}{B}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 4 regimes
          2. if B < 1.035e-283

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

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

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

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

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

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

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

              if 1.035e-283 < B < 1.0799999999999999e-74

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

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

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

                if 1.0799999999999999e-74 < B < 2.3000000000000001e46

                1. Initial program 48.3%

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

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

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

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

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

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

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

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

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

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

                if 2.3000000000000001e46 < B

                1. Initial program 10.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. Simplified12.5%

                    \[\leadsto \color{blue}{\frac{-\sqrt{2 \cdot \left(\left(\mathsf{fma}\left(C, A \cdot -4, B \cdot B\right) \cdot F\right) \cdot \left(C + \left(A + \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)}}{\mathsf{fma}\left(C, A \cdot -4, B \cdot B\right)}} \]
                  2. Taylor expanded in C around 0 16.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-neg16.1%

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

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

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

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

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

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

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

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

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

                Alternative 5: 38.0% accurate, 1.9× speedup?

                \[\begin{array}{l} B = |B|\\ \\ \begin{array}{l} t_0 := \mathsf{fma}\left(C, A \cdot -4, B \cdot B\right)\\ t_1 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;B \leq 1.35 \cdot 10^{-74}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(C + C\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 1.55 \cdot 10^{+47}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot t_1\right) \cdot \left(C + \left(A + \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)}}{t_1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot \left(-\sqrt{F \cdot \left(A + \mathsf{hypot}\left(B, A\right)\right)}\right)}{B}\\ \end{array} \end{array} \]
                NOTE: B should be positive before calling this function
                (FPCore (A B C F)
                 :precision binary64
                 (let* ((t_0 (fma C (* A -4.0) (* B B))) (t_1 (- (* B B) (* 4.0 (* A C)))))
                   (if (<= B 1.35e-74)
                     (/ (- (sqrt (* 2.0 (* (* F t_0) (+ C C))))) t_0)
                     (if (<= B 1.55e+47)
                       (/ (- (sqrt (* 2.0 (* (* F t_1) (+ C (+ A (hypot B (- A C)))))))) t_1)
                       (/ (* (sqrt 2.0) (- (sqrt (* F (+ A (hypot B A)))))) B)))))
                B = abs(B);
                double code(double A, double B, double C, double F) {
                	double t_0 = fma(C, (A * -4.0), (B * B));
                	double t_1 = (B * B) - (4.0 * (A * C));
                	double tmp;
                	if (B <= 1.35e-74) {
                		tmp = -sqrt((2.0 * ((F * t_0) * (C + C)))) / t_0;
                	} else if (B <= 1.55e+47) {
                		tmp = -sqrt((2.0 * ((F * t_1) * (C + (A + hypot(B, (A - C))))))) / t_1;
                	} else {
                		tmp = (sqrt(2.0) * -sqrt((F * (A + hypot(B, A))))) / B;
                	}
                	return tmp;
                }
                
                B = abs(B)
                function code(A, B, C, F)
                	t_0 = fma(C, Float64(A * -4.0), Float64(B * B))
                	t_1 = Float64(Float64(B * B) - Float64(4.0 * Float64(A * C)))
                	tmp = 0.0
                	if (B <= 1.35e-74)
                		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(Float64(F * t_0) * Float64(C + C))))) / t_0);
                	elseif (B <= 1.55e+47)
                		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(Float64(F * t_1) * Float64(C + Float64(A + hypot(B, Float64(A - C)))))))) / t_1);
                	else
                		tmp = Float64(Float64(sqrt(2.0) * Float64(-sqrt(Float64(F * Float64(A + hypot(B, A)))))) / B);
                	end
                	return tmp
                end
                
                NOTE: B should be positive before calling this function
                code[A_, B_, C_, F_] := Block[{t$95$0 = N[(C * N[(A * -4.0), $MachinePrecision] + N[(B * B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(B * B), $MachinePrecision] - N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, 1.35e-74], N[((-N[Sqrt[N[(2.0 * N[(N[(F * t$95$0), $MachinePrecision] * N[(C + C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], If[LessEqual[B, 1.55e+47], N[((-N[Sqrt[N[(2.0 * N[(N[(F * t$95$1), $MachinePrecision] * N[(C + N[(A + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$1), $MachinePrecision], N[(N[(N[Sqrt[2.0], $MachinePrecision] * (-N[Sqrt[N[(F * N[(A + N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision] / B), $MachinePrecision]]]]]
                
                \begin{array}{l}
                B = |B|\\
                \\
                \begin{array}{l}
                t_0 := \mathsf{fma}\left(C, A \cdot -4, B \cdot B\right)\\
                t_1 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\
                \mathbf{if}\;B \leq 1.35 \cdot 10^{-74}:\\
                \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(C + C\right)\right)}}{t_0}\\
                
                \mathbf{elif}\;B \leq 1.55 \cdot 10^{+47}:\\
                \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot t_1\right) \cdot \left(C + \left(A + \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)}}{t_1}\\
                
                \mathbf{else}:\\
                \;\;\;\;\frac{\sqrt{2} \cdot \left(-\sqrt{F \cdot \left(A + \mathsf{hypot}\left(B, A\right)\right)}\right)}{B}\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 3 regimes
                2. if B < 1.35000000000000009e-74

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

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

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

                    if 1.35000000000000009e-74 < B < 1.55e47

                    1. Initial program 48.3%

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

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

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

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

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

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

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

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

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

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

                    if 1.55e47 < B

                    1. Initial program 10.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. Simplified12.5%

                        \[\leadsto \color{blue}{\frac{-\sqrt{2 \cdot \left(\left(\mathsf{fma}\left(C, A \cdot -4, B \cdot B\right) \cdot F\right) \cdot \left(C + \left(A + \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)}}{\mathsf{fma}\left(C, A \cdot -4, B \cdot B\right)}} \]
                      2. Taylor expanded in C around 0 16.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-neg16.1%

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

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

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

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

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

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

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

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

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

                    Alternative 6: 39.9% accurate, 2.0× speedup?

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

                      1. Initial program 22.8%

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

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

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

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

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

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

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

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

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

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

                      if 8.2e49 < B

                      1. Initial program 10.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. Simplified12.5%

                          \[\leadsto \color{blue}{\frac{-\sqrt{2 \cdot \left(\left(\mathsf{fma}\left(C, A \cdot -4, B \cdot B\right) \cdot F\right) \cdot \left(C + \left(A + \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)}}{\mathsf{fma}\left(C, A \cdot -4, B \cdot B\right)}} \]
                        2. Taylor expanded in C around 0 16.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-neg16.1%

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

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

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

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

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

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

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

                      Alternative 7: 39.9% accurate, 2.0× speedup?

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

                        1. Initial program 22.8%

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

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

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

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

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

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

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

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

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

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

                        if 2.49999999999999987e48 < B

                        1. Initial program 10.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. Simplified12.5%

                            \[\leadsto \color{blue}{\frac{-\sqrt{2 \cdot \left(\left(\mathsf{fma}\left(C, A \cdot -4, B \cdot B\right) \cdot F\right) \cdot \left(C + \left(A + \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)}}{\mathsf{fma}\left(C, A \cdot -4, B \cdot B\right)}} \]
                          2. Taylor expanded in C around 0 16.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-neg16.1%

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

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

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

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

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

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

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

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

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

                        Alternative 8: 31.2% accurate, 2.7× speedup?

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

                          1. Initial program 15.9%

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

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

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

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

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

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

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

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

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

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

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

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

                          if 1.25e-128 < B < 2.1999999999999999e47

                          1. Initial program 42.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

                          if 2.1999999999999999e47 < B

                          1. Initial program 10.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. Simplified12.5%

                              \[\leadsto \color{blue}{\frac{-\sqrt{2 \cdot \left(\left(\mathsf{fma}\left(C, A \cdot -4, B \cdot B\right) \cdot F\right) \cdot \left(C + \left(A + \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)}}{\mathsf{fma}\left(C, A \cdot -4, B \cdot B\right)}} \]
                            2. Taylor expanded in C around 0 16.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-neg16.1%

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

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

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

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

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

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

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

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

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

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

                          Alternative 9: 38.5% accurate, 2.7× speedup?

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

                            1. Initial program 24.0%

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

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

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

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

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

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

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

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

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

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

                            if 5.2000000000000002e84 < B

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

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

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

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

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

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

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

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

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

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

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

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

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

                            Alternative 10: 37.5% accurate, 3.0× speedup?

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

                              1. Initial program 24.8%

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

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

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

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

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

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

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

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

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

                              if -5.2000000000000001e-296 < F < 1.55000000000000005e24

                              1. Initial program 22.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. Simplified30.8%

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

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

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

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

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

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

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

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

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

                                if 1.55000000000000005e24 < F

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                Alternative 11: 30.9% accurate, 3.0× speedup?

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

                                  1. Initial program 6.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  if -2.79999999999999997e-34 < C < 1.06e12

                                  1. Initial program 26.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    if 1.06e12 < C

                                    1. Initial program 21.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  Alternative 12: 20.0% accurate, 4.4× speedup?

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

                                    1. Initial program 6.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    if -1.80000000000000009e-35 < C < 1.55000000000000005e-40

                                    1. Initial program 28.9%

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

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

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

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

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

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

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

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

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

                                    if 1.55000000000000005e-40 < C

                                    1. Initial program 19.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  Alternative 13: 20.0% accurate, 4.5× speedup?

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

                                    1. Initial program 6.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    if -8.0000000000000003e-42 < C < 8.20000000000000028e-41

                                    1. Initial program 28.9%

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

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

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

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

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

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

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

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

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

                                    if 8.20000000000000028e-41 < C

                                    1. Initial program 19.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  Alternative 14: 14.7% accurate, 4.7× speedup?

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

                                    1. Initial program 20.9%

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

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

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

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

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

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

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

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

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

                                    if 2.40000000000000022e-41 < C

                                    1. Initial program 19.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  Alternative 15: 11.4% accurate, 4.8× speedup?

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

                                    1. Initial program 24.0%

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

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

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

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

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

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

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

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

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

                                    if 1.32000000000000007e85 < B

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    Alternative 16: 7.2% accurate, 5.0× speedup?

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

                                      1. Initial program 18.5%

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

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

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

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

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

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

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

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

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

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

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

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

                                      if 9.9999999999999999e-198 < A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      Alternative 17: 7.1% accurate, 5.2× speedup?

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

                                        1. Initial program 17.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                        if 1.20000000000000005e-235 < A

                                        1. Initial program 24.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. Simplified32.3%

                                            \[\leadsto \color{blue}{\frac{-\sqrt{2 \cdot \left(\left(\mathsf{fma}\left(C, A \cdot -4, B \cdot B\right) \cdot F\right) \cdot \left(C + \left(A + \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)}}{\mathsf{fma}\left(C, A \cdot -4, B \cdot B\right)}} \]
                                          2. Taylor expanded in C around 0 10.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-neg10.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                        Alternative 18: 4.8% accurate, 5.9× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                          Reproduce

                                          ?
                                          herbie shell --seed 2023208 
                                          (FPCore (A B C F)
                                            :name "ABCF->ab-angle a"
                                            :precision binary64
                                            (/ (- (sqrt (* (* 2.0 (* (- (pow B 2.0) (* (* 4.0 A) C)) F)) (+ (+ A C) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0))))))) (- (pow B 2.0) (* (* 4.0 A) C))))