ABCF->ab-angle b

Percentage Accurate: 18.7% → 41.9%
Time: 27.3s
Alternatives: 17
Speedup: 5.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 17 alternatives:

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

Initial Program: 18.7% accurate, 1.0× speedup?

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

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

Alternative 1: 41.9% accurate, 0.9× speedup?

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

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

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


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

    1. Initial program 26.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. Simplified26.4%

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

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

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

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

      if 2e11 < (pow.f64 B 2) < 1e308

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 1e308 < (pow.f64 B 2)

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

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

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

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

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

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

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

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

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

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

        Alternative 2: 40.6% accurate, 1.5× speedup?

        \[\begin{array}{l} [A, C] = \mathsf{sort}([A, C])\\ \\ \begin{array}{l} t_0 := \mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)\\ t_1 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;B \leq -7.4 \cdot 10^{+101}:\\ \;\;\;\;\frac{\sqrt{\mathsf{fma}\left(-4, C \cdot F, F \cdot \left(4 \cdot A\right)\right)}}{B}\\ \mathbf{elif}\;B \leq -5.2 \cdot 10^{-19}:\\ \;\;\;\;\frac{-\sqrt{\left(2 \cdot \left(F \cdot t_0\right)\right) \cdot \left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 400000:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(t_1 \cdot F\right) \cdot \left(2 \cdot A\right)\right)}}{t_1}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{F \cdot \left(A - \mathsf{hypot}\left(A, B\right)\right)} \cdot \left(-\frac{\sqrt{2}}{B}\right)\\ \end{array} \end{array} \]
        NOTE: A and C should be sorted in increasing order before calling this function.
        (FPCore (A B C F)
         :precision binary64
         (let* ((t_0 (fma B B (* C (* A -4.0)))) (t_1 (- (* B B) (* 4.0 (* A C)))))
           (if (<= B -7.4e+101)
             (/ (sqrt (fma -4.0 (* C F) (* F (* 4.0 A)))) B)
             (if (<= B -5.2e-19)
               (/ (- (sqrt (* (* 2.0 (* F t_0)) (+ A (- C (hypot B (- A C))))))) t_0)
               (if (<= B 400000.0)
                 (/ (- (sqrt (* 2.0 (* (* t_1 F) (* 2.0 A))))) t_1)
                 (* (sqrt (* F (- A (hypot A B)))) (- (/ (sqrt 2.0) B))))))))
        assert(A < C);
        double code(double A, double B, double C, double F) {
        	double t_0 = fma(B, B, (C * (A * -4.0)));
        	double t_1 = (B * B) - (4.0 * (A * C));
        	double tmp;
        	if (B <= -7.4e+101) {
        		tmp = sqrt(fma(-4.0, (C * F), (F * (4.0 * A)))) / B;
        	} else if (B <= -5.2e-19) {
        		tmp = -sqrt(((2.0 * (F * t_0)) * (A + (C - hypot(B, (A - C)))))) / t_0;
        	} else if (B <= 400000.0) {
        		tmp = -sqrt((2.0 * ((t_1 * F) * (2.0 * A)))) / t_1;
        	} else {
        		tmp = sqrt((F * (A - hypot(A, B)))) * -(sqrt(2.0) / B);
        	}
        	return tmp;
        }
        
        A, C = sort([A, C])
        function code(A, B, C, F)
        	t_0 = fma(B, B, Float64(C * Float64(A * -4.0)))
        	t_1 = Float64(Float64(B * B) - Float64(4.0 * Float64(A * C)))
        	tmp = 0.0
        	if (B <= -7.4e+101)
        		tmp = Float64(sqrt(fma(-4.0, Float64(C * F), Float64(F * Float64(4.0 * A)))) / B);
        	elseif (B <= -5.2e-19)
        		tmp = Float64(Float64(-sqrt(Float64(Float64(2.0 * Float64(F * t_0)) * Float64(A + Float64(C - hypot(B, Float64(A - C))))))) / t_0);
        	elseif (B <= 400000.0)
        		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(Float64(t_1 * F) * Float64(2.0 * A))))) / t_1);
        	else
        		tmp = Float64(sqrt(Float64(F * Float64(A - hypot(A, B)))) * Float64(-Float64(sqrt(2.0) / B)));
        	end
        	return tmp
        end
        
        NOTE: A and C should be sorted in increasing order before calling this function.
        code[A_, B_, C_, F_] := Block[{t$95$0 = N[(B * B + N[(C * N[(A * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(B * B), $MachinePrecision] - N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -7.4e+101], N[(N[Sqrt[N[(-4.0 * N[(C * F), $MachinePrecision] + N[(F * N[(4.0 * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / B), $MachinePrecision], If[LessEqual[B, -5.2e-19], N[((-N[Sqrt[N[(N[(2.0 * N[(F * t$95$0), $MachinePrecision]), $MachinePrecision] * N[(A + N[(C - N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], If[LessEqual[B, 400000.0], N[((-N[Sqrt[N[(2.0 * N[(N[(t$95$1 * F), $MachinePrecision] * N[(2.0 * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$1), $MachinePrecision], N[(N[Sqrt[N[(F * N[(A - N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-N[(N[Sqrt[2.0], $MachinePrecision] / B), $MachinePrecision])), $MachinePrecision]]]]]]
        
        \begin{array}{l}
        [A, C] = \mathsf{sort}([A, C])\\
        \\
        \begin{array}{l}
        t_0 := \mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)\\
        t_1 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\
        \mathbf{if}\;B \leq -7.4 \cdot 10^{+101}:\\
        \;\;\;\;\frac{\sqrt{\mathsf{fma}\left(-4, C \cdot F, F \cdot \left(4 \cdot A\right)\right)}}{B}\\
        
        \mathbf{elif}\;B \leq -5.2 \cdot 10^{-19}:\\
        \;\;\;\;\frac{-\sqrt{\left(2 \cdot \left(F \cdot t_0\right)\right) \cdot \left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)}}{t_0}\\
        
        \mathbf{elif}\;B \leq 400000:\\
        \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(t_1 \cdot F\right) \cdot \left(2 \cdot A\right)\right)}}{t_1}\\
        
        \mathbf{else}:\\
        \;\;\;\;\sqrt{F \cdot \left(A - \mathsf{hypot}\left(A, B\right)\right)} \cdot \left(-\frac{\sqrt{2}}{B}\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 4 regimes
        2. if B < -7.3999999999999995e101

          1. Initial program 1.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if -7.3999999999999995e101 < B < -5.20000000000000026e-19

          1. Initial program 41.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. Simplified47.8%

              \[\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)}} \]

            if -5.20000000000000026e-19 < B < 4e5

            1. Initial program 26.1%

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

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

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

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

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

              if 4e5 < B

              1. Initial program 18.3%

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

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

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

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

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

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

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

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

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

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

              Alternative 3: 40.6% accurate, 2.0× speedup?

              \[\begin{array}{l} [A, C] = \mathsf{sort}([A, C])\\ \\ \begin{array}{l} t_0 := B \cdot B + \left(A \cdot C\right) \cdot -4\\ t_1 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;B \leq -7.2 \cdot 10^{+101}:\\ \;\;\;\;\frac{\sqrt{\mathsf{fma}\left(-4, C \cdot F, F \cdot \left(4 \cdot A\right)\right)}}{B}\\ \mathbf{elif}\;B \leq -5.2 \cdot 10^{-18}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 1900000:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(t_1 \cdot F\right) \cdot \left(2 \cdot A\right)\right)}}{t_1}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{F \cdot \left(A - \mathsf{hypot}\left(A, B\right)\right)} \cdot \left(-\frac{\sqrt{2}}{B}\right)\\ \end{array} \end{array} \]
              NOTE: A and C should be sorted in increasing order before calling this function.
              (FPCore (A B C F)
               :precision binary64
               (let* ((t_0 (+ (* B B) (* (* A C) -4.0))) (t_1 (- (* B B) (* 4.0 (* A C)))))
                 (if (<= B -7.2e+101)
                   (/ (sqrt (fma -4.0 (* C F) (* F (* 4.0 A)))) B)
                   (if (<= B -5.2e-18)
                     (/ (- (sqrt (* 2.0 (* t_0 (* F (+ A (- C (hypot B (- A C))))))))) t_0)
                     (if (<= B 1900000.0)
                       (/ (- (sqrt (* 2.0 (* (* t_1 F) (* 2.0 A))))) t_1)
                       (* (sqrt (* F (- A (hypot A B)))) (- (/ (sqrt 2.0) B))))))))
              assert(A < C);
              double code(double A, double B, double C, double F) {
              	double t_0 = (B * B) + ((A * C) * -4.0);
              	double t_1 = (B * B) - (4.0 * (A * C));
              	double tmp;
              	if (B <= -7.2e+101) {
              		tmp = sqrt(fma(-4.0, (C * F), (F * (4.0 * A)))) / B;
              	} else if (B <= -5.2e-18) {
              		tmp = -sqrt((2.0 * (t_0 * (F * (A + (C - hypot(B, (A - C)))))))) / t_0;
              	} else if (B <= 1900000.0) {
              		tmp = -sqrt((2.0 * ((t_1 * F) * (2.0 * A)))) / t_1;
              	} else {
              		tmp = sqrt((F * (A - hypot(A, B)))) * -(sqrt(2.0) / B);
              	}
              	return tmp;
              }
              
              A, C = sort([A, C])
              function code(A, B, C, F)
              	t_0 = Float64(Float64(B * B) + Float64(Float64(A * C) * -4.0))
              	t_1 = Float64(Float64(B * B) - Float64(4.0 * Float64(A * C)))
              	tmp = 0.0
              	if (B <= -7.2e+101)
              		tmp = Float64(sqrt(fma(-4.0, Float64(C * F), Float64(F * Float64(4.0 * A)))) / B);
              	elseif (B <= -5.2e-18)
              		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(t_0 * Float64(F * Float64(A + Float64(C - hypot(B, Float64(A - C))))))))) / t_0);
              	elseif (B <= 1900000.0)
              		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(Float64(t_1 * F) * Float64(2.0 * A))))) / t_1);
              	else
              		tmp = Float64(sqrt(Float64(F * Float64(A - hypot(A, B)))) * Float64(-Float64(sqrt(2.0) / B)));
              	end
              	return tmp
              end
              
              NOTE: A and C should be sorted in increasing order before calling this function.
              code[A_, B_, C_, F_] := Block[{t$95$0 = N[(N[(B * B), $MachinePrecision] + N[(N[(A * C), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(B * B), $MachinePrecision] - N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -7.2e+101], N[(N[Sqrt[N[(-4.0 * N[(C * F), $MachinePrecision] + N[(F * N[(4.0 * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / B), $MachinePrecision], If[LessEqual[B, -5.2e-18], N[((-N[Sqrt[N[(2.0 * N[(t$95$0 * N[(F * N[(A + N[(C - N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], If[LessEqual[B, 1900000.0], N[((-N[Sqrt[N[(2.0 * N[(N[(t$95$1 * F), $MachinePrecision] * N[(2.0 * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$1), $MachinePrecision], N[(N[Sqrt[N[(F * N[(A - N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-N[(N[Sqrt[2.0], $MachinePrecision] / B), $MachinePrecision])), $MachinePrecision]]]]]]
              
              \begin{array}{l}
              [A, C] = \mathsf{sort}([A, C])\\
              \\
              \begin{array}{l}
              t_0 := B \cdot B + \left(A \cdot C\right) \cdot -4\\
              t_1 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\
              \mathbf{if}\;B \leq -7.2 \cdot 10^{+101}:\\
              \;\;\;\;\frac{\sqrt{\mathsf{fma}\left(-4, C \cdot F, F \cdot \left(4 \cdot A\right)\right)}}{B}\\
              
              \mathbf{elif}\;B \leq -5.2 \cdot 10^{-18}:\\
              \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)\right)}}{t_0}\\
              
              \mathbf{elif}\;B \leq 1900000:\\
              \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(t_1 \cdot F\right) \cdot \left(2 \cdot A\right)\right)}}{t_1}\\
              
              \mathbf{else}:\\
              \;\;\;\;\sqrt{F \cdot \left(A - \mathsf{hypot}\left(A, B\right)\right)} \cdot \left(-\frac{\sqrt{2}}{B}\right)\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 4 regimes
              2. if B < -7.20000000000000058e101

                1. Initial program 1.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if -7.20000000000000058e101 < B < -5.2000000000000001e-18

                1. Initial program 41.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. Simplified41.8%

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

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

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

                  if -5.2000000000000001e-18 < B < 1.9e6

                  1. Initial program 26.1%

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

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

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

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

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

                    if 1.9e6 < B

                    1. Initial program 18.3%

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

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

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

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

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

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

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

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

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

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

                    Alternative 4: 38.7% accurate, 2.7× speedup?

                    \[\begin{array}{l} [A, C] = \mathsf{sort}([A, C])\\ \\ \begin{array}{l} t_0 := B \cdot B + \left(A \cdot C\right) \cdot -4\\ t_1 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;B \leq -7.4 \cdot 10^{+101}:\\ \;\;\;\;\frac{\sqrt{\mathsf{fma}\left(-4, C \cdot F, F \cdot \left(4 \cdot A\right)\right)}}{B}\\ \mathbf{elif}\;B \leq -7.6 \cdot 10^{-19}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 4200000:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(t_1 \cdot F\right) \cdot \left(2 \cdot A\right)\right)}}{t_1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(A - B\right)}\right)\\ \end{array} \end{array} \]
                    NOTE: A and C should be sorted in increasing order before calling this function.
                    (FPCore (A B C F)
                     :precision binary64
                     (let* ((t_0 (+ (* B B) (* (* A C) -4.0))) (t_1 (- (* B B) (* 4.0 (* A C)))))
                       (if (<= B -7.4e+101)
                         (/ (sqrt (fma -4.0 (* C F) (* F (* 4.0 A)))) B)
                         (if (<= B -7.6e-19)
                           (/ (- (sqrt (* 2.0 (* t_0 (* F (+ A (- C (hypot B (- A C))))))))) t_0)
                           (if (<= B 4200000.0)
                             (/ (- (sqrt (* 2.0 (* (* t_1 F) (* 2.0 A))))) t_1)
                             (* (/ (sqrt 2.0) B) (- (sqrt (* F (- A B))))))))))
                    assert(A < C);
                    double code(double A, double B, double C, double F) {
                    	double t_0 = (B * B) + ((A * C) * -4.0);
                    	double t_1 = (B * B) - (4.0 * (A * C));
                    	double tmp;
                    	if (B <= -7.4e+101) {
                    		tmp = sqrt(fma(-4.0, (C * F), (F * (4.0 * A)))) / B;
                    	} else if (B <= -7.6e-19) {
                    		tmp = -sqrt((2.0 * (t_0 * (F * (A + (C - hypot(B, (A - C)))))))) / t_0;
                    	} else if (B <= 4200000.0) {
                    		tmp = -sqrt((2.0 * ((t_1 * F) * (2.0 * A)))) / t_1;
                    	} else {
                    		tmp = (sqrt(2.0) / B) * -sqrt((F * (A - B)));
                    	}
                    	return tmp;
                    }
                    
                    A, C = sort([A, C])
                    function code(A, B, C, F)
                    	t_0 = Float64(Float64(B * B) + Float64(Float64(A * C) * -4.0))
                    	t_1 = Float64(Float64(B * B) - Float64(4.0 * Float64(A * C)))
                    	tmp = 0.0
                    	if (B <= -7.4e+101)
                    		tmp = Float64(sqrt(fma(-4.0, Float64(C * F), Float64(F * Float64(4.0 * A)))) / B);
                    	elseif (B <= -7.6e-19)
                    		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(t_0 * Float64(F * Float64(A + Float64(C - hypot(B, Float64(A - C))))))))) / t_0);
                    	elseif (B <= 4200000.0)
                    		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(Float64(t_1 * F) * Float64(2.0 * A))))) / t_1);
                    	else
                    		tmp = Float64(Float64(sqrt(2.0) / B) * Float64(-sqrt(Float64(F * Float64(A - B)))));
                    	end
                    	return tmp
                    end
                    
                    NOTE: A and C should be sorted in increasing order before calling this function.
                    code[A_, B_, C_, F_] := Block[{t$95$0 = N[(N[(B * B), $MachinePrecision] + N[(N[(A * C), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(B * B), $MachinePrecision] - N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -7.4e+101], N[(N[Sqrt[N[(-4.0 * N[(C * F), $MachinePrecision] + N[(F * N[(4.0 * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / B), $MachinePrecision], If[LessEqual[B, -7.6e-19], N[((-N[Sqrt[N[(2.0 * N[(t$95$0 * N[(F * N[(A + N[(C - N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], If[LessEqual[B, 4200000.0], N[((-N[Sqrt[N[(2.0 * N[(N[(t$95$1 * F), $MachinePrecision] * N[(2.0 * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$1), $MachinePrecision], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B), $MachinePrecision] * (-N[Sqrt[N[(F * N[(A - B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]]]]]]
                    
                    \begin{array}{l}
                    [A, C] = \mathsf{sort}([A, C])\\
                    \\
                    \begin{array}{l}
                    t_0 := B \cdot B + \left(A \cdot C\right) \cdot -4\\
                    t_1 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\
                    \mathbf{if}\;B \leq -7.4 \cdot 10^{+101}:\\
                    \;\;\;\;\frac{\sqrt{\mathsf{fma}\left(-4, C \cdot F, F \cdot \left(4 \cdot A\right)\right)}}{B}\\
                    
                    \mathbf{elif}\;B \leq -7.6 \cdot 10^{-19}:\\
                    \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)\right)}}{t_0}\\
                    
                    \mathbf{elif}\;B \leq 4200000:\\
                    \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(t_1 \cdot F\right) \cdot \left(2 \cdot A\right)\right)}}{t_1}\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(A - B\right)}\right)\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 4 regimes
                    2. if B < -7.3999999999999995e101

                      1. Initial program 1.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      if -7.3999999999999995e101 < B < -7.6e-19

                      1. Initial program 41.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. Simplified41.8%

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

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

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

                        if -7.6e-19 < B < 4.2e6

                        1. Initial program 26.1%

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

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

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

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

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

                          if 4.2e6 < B

                          1. Initial program 18.3%

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

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

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

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

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

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

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

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

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

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

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

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

                          Alternative 5: 38.7% accurate, 2.7× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            if -7.5e110 < B < -2.6e-18

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

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

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

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

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

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

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

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

                              if -2.6e-18 < B < 2.3e6

                              1. Initial program 26.1%

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

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

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

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

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

                                if 2.3e6 < B

                                1. Initial program 18.3%

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

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

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

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

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

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

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

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

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

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

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

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

                                Alternative 6: 37.1% accurate, 2.7× speedup?

                                \[\begin{array}{l} [A, C] = \mathsf{sort}([A, C])\\ \\ \begin{array}{l} t_0 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\ t_1 := t_0 \cdot F\\ \mathbf{if}\;B \leq -3.05 \cdot 10^{+100}:\\ \;\;\;\;\frac{\sqrt{\mathsf{fma}\left(-4, C \cdot F, F \cdot \left(4 \cdot A\right)\right)}}{B}\\ \mathbf{elif}\;B \leq -2.9 \cdot 10^{-18}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(A + \left(B + C\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq -1.35 \cdot 10^{-114}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(F \cdot \left(\mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right) \cdot \left(2 \cdot A\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 1400000:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(2 \cdot A\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(A - B\right)}\right)\\ \end{array} \end{array} \]
                                NOTE: A and C should be sorted in increasing order before calling this function.
                                (FPCore (A B C F)
                                 :precision binary64
                                 (let* ((t_0 (- (* B B) (* 4.0 (* A C)))) (t_1 (* t_0 F)))
                                   (if (<= B -3.05e+100)
                                     (/ (sqrt (fma -4.0 (* C F) (* F (* 4.0 A)))) B)
                                     (if (<= B -2.9e-18)
                                       (/ (- (sqrt (* 2.0 (* t_1 (+ A (+ B C)))))) t_0)
                                       (if (<= B -1.35e-114)
                                         (/
                                          (- (sqrt (* 2.0 (* F (* (fma B B (* C (* A -4.0))) (* 2.0 A))))))
                                          t_0)
                                         (if (<= B 1400000.0)
                                           (/ (- (sqrt (* 2.0 (* t_1 (* 2.0 A))))) t_0)
                                           (* (/ (sqrt 2.0) B) (- (sqrt (* F (- A B)))))))))))
                                assert(A < C);
                                double code(double A, double B, double C, double F) {
                                	double t_0 = (B * B) - (4.0 * (A * C));
                                	double t_1 = t_0 * F;
                                	double tmp;
                                	if (B <= -3.05e+100) {
                                		tmp = sqrt(fma(-4.0, (C * F), (F * (4.0 * A)))) / B;
                                	} else if (B <= -2.9e-18) {
                                		tmp = -sqrt((2.0 * (t_1 * (A + (B + C))))) / t_0;
                                	} else if (B <= -1.35e-114) {
                                		tmp = -sqrt((2.0 * (F * (fma(B, B, (C * (A * -4.0))) * (2.0 * A))))) / t_0;
                                	} else if (B <= 1400000.0) {
                                		tmp = -sqrt((2.0 * (t_1 * (2.0 * A)))) / t_0;
                                	} else {
                                		tmp = (sqrt(2.0) / B) * -sqrt((F * (A - B)));
                                	}
                                	return tmp;
                                }
                                
                                A, C = sort([A, C])
                                function code(A, B, C, F)
                                	t_0 = Float64(Float64(B * B) - Float64(4.0 * Float64(A * C)))
                                	t_1 = Float64(t_0 * F)
                                	tmp = 0.0
                                	if (B <= -3.05e+100)
                                		tmp = Float64(sqrt(fma(-4.0, Float64(C * F), Float64(F * Float64(4.0 * A)))) / B);
                                	elseif (B <= -2.9e-18)
                                		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(t_1 * Float64(A + Float64(B + C)))))) / t_0);
                                	elseif (B <= -1.35e-114)
                                		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(F * Float64(fma(B, B, Float64(C * Float64(A * -4.0))) * Float64(2.0 * A)))))) / t_0);
                                	elseif (B <= 1400000.0)
                                		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(t_1 * Float64(2.0 * A))))) / t_0);
                                	else
                                		tmp = Float64(Float64(sqrt(2.0) / B) * Float64(-sqrt(Float64(F * Float64(A - B)))));
                                	end
                                	return tmp
                                end
                                
                                NOTE: A and C should be sorted in increasing order before calling this function.
                                code[A_, B_, C_, F_] := Block[{t$95$0 = N[(N[(B * B), $MachinePrecision] - N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 * F), $MachinePrecision]}, If[LessEqual[B, -3.05e+100], N[(N[Sqrt[N[(-4.0 * N[(C * F), $MachinePrecision] + N[(F * N[(4.0 * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / B), $MachinePrecision], If[LessEqual[B, -2.9e-18], N[((-N[Sqrt[N[(2.0 * N[(t$95$1 * N[(A + N[(B + C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], If[LessEqual[B, -1.35e-114], N[((-N[Sqrt[N[(2.0 * N[(F * N[(N[(B * B + N[(C * N[(A * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], If[LessEqual[B, 1400000.0], N[((-N[Sqrt[N[(2.0 * N[(t$95$1 * N[(2.0 * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B), $MachinePrecision] * (-N[Sqrt[N[(F * N[(A - B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]]]]]]]
                                
                                \begin{array}{l}
                                [A, C] = \mathsf{sort}([A, C])\\
                                \\
                                \begin{array}{l}
                                t_0 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\
                                t_1 := t_0 \cdot F\\
                                \mathbf{if}\;B \leq -3.05 \cdot 10^{+100}:\\
                                \;\;\;\;\frac{\sqrt{\mathsf{fma}\left(-4, C \cdot F, F \cdot \left(4 \cdot A\right)\right)}}{B}\\
                                
                                \mathbf{elif}\;B \leq -2.9 \cdot 10^{-18}:\\
                                \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(A + \left(B + C\right)\right)\right)}}{t_0}\\
                                
                                \mathbf{elif}\;B \leq -1.35 \cdot 10^{-114}:\\
                                \;\;\;\;\frac{-\sqrt{2 \cdot \left(F \cdot \left(\mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right) \cdot \left(2 \cdot A\right)\right)\right)}}{t_0}\\
                                
                                \mathbf{elif}\;B \leq 1400000:\\
                                \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(2 \cdot A\right)\right)}}{t_0}\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(A - B\right)}\right)\\
                                
                                
                                \end{array}
                                \end{array}
                                
                                Derivation
                                1. Split input into 5 regimes
                                2. if B < -3.05e100

                                  1. Initial program 1.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  if -3.05e100 < B < -2.9e-18

                                  1. Initial program 41.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. Simplified41.8%

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

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

                                    if -2.9e-18 < B < -1.35e-114

                                    1. Initial program 18.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      if -1.35e-114 < B < 1.4e6

                                      1. Initial program 27.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. Simplified27.3%

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

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

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

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

                                        if 1.4e6 < B

                                        1. Initial program 18.3%

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

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

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

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

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

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

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

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

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

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

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

                                          \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -3.05 \cdot 10^{+100}:\\ \;\;\;\;\frac{\sqrt{\mathsf{fma}\left(-4, C \cdot F, F \cdot \left(4 \cdot A\right)\right)}}{B}\\ \mathbf{elif}\;B \leq -2.9 \cdot 10^{-18}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(A + \left(B + C\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \mathbf{elif}\;B \leq -1.35 \cdot 10^{-114}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(F \cdot \left(\mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right) \cdot \left(2 \cdot A\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \mathbf{elif}\;B \leq 1400000:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(2 \cdot A\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(A - B\right)}\right)\\ \end{array} \]

                                        Alternative 7: 36.9% accurate, 3.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

                                          if -2.29999999999999987e55 < B < 4.4e6

                                          1. Initial program 27.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. Simplified27.2%

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

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

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

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

                                            if 4.4e6 < B

                                            1. Initial program 18.3%

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

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

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

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

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

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

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

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

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

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

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

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

                                            Alternative 8: 36.9% accurate, 3.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                              if -3.09999999999999994e55 < B < 2.02e6

                                              1. Initial program 27.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. Simplified27.2%

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

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

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

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

                                                if 2.02e6 < B

                                                1. Initial program 18.3%

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

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

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

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

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

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

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

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

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

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

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

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

                                                Alternative 9: 29.1% accurate, 4.5× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                  if -1.0000000000000001e54 < B < 25

                                                  1. Initial program 26.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. Simplified26.1%

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

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

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

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

                                                    if 25 < B

                                                    1. Initial program 20.8%

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

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

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

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

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

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

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

                                                    Alternative 10: 29.0% accurate, 4.7× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                      if -1.06e54 < B < 18

                                                      1. Initial program 26.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. Simplified26.1%

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

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

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

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

                                                        if 18 < B

                                                        1. Initial program 20.8%

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

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

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

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

                                                        Alternative 11: 29.9% accurate, 4.8× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                          if -2.35e55 < B < 1.5e28

                                                          1. Initial program 28.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. Simplified28.2%

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

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

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

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

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

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

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

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

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

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

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

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

                                                            if 1.5e28 < B

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                          Alternative 12: 29.7% accurate, 4.8× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                            if -6.4e54 < B < 1.3000000000000001e28

                                                            1. Initial program 28.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. Simplified28.2%

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

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

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

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

                                                              if 1.3000000000000001e28 < B

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                            Alternative 13: 21.2% accurate, 5.0× speedup?

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

                                                              1. Initial program 13.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. Simplified14.1%

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

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

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

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

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

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

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

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

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

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

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

                                                              if -1.49999999999999995e-50 < B

                                                              1. Initial program 23.7%

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

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

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

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

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

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

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

                                                              Alternative 14: 9.6% accurate, 5.4× speedup?

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

                                                                1. Initial program 20.5%

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

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

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

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

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

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

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

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

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

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

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

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

                                                                if 1.75e-287 < B

                                                                1. Initial program 21.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                              Alternative 15: 9.9% accurate, 5.4× speedup?

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

                                                                1. Initial program 20.5%

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

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

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

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

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

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

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

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

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

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

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

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

                                                                if 1.4499999999999999e-287 < B

                                                                1. Initial program 21.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                              Alternative 16: 9.3% accurate, 5.8× speedup?

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

                                                                1. Initial program 21.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                  if -4.999999999999985e-310 < B

                                                                  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. Simplified21.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                Alternative 17: 5.5% accurate, 5.9× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                Reproduce

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