ABCF->ab-angle b

Percentage Accurate: 19.3% → 41.3%
Time: 28.2s
Alternatives: 15
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 15 alternatives:

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

Initial Program: 19.3% 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.3% accurate, 1.2× speedup?

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

\mathbf{elif}\;B \leq 9.5 \cdot 10^{-28}:\\
\;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(A \cdot 2\right)\right)}}{t_0}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if B < -3.6e-94

    1. Initial program 22.4%

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

        \[\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-prod35.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*35.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. *-commutative35.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*35.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-35.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. +-commutative35.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-rr35.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-def28.5%

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

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

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

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

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

          \[\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-def35.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. Simplified35.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 -3.6e-94 < B < 9.50000000000000001e-28

      1. Initial program 23.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. Simplified23.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 25.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. *-commutative25.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. Simplified25.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 9.50000000000000001e-28 < B

        1. Initial program 10.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 2: 39.3% accurate, 1.5× speedup?

        \[\begin{array}{l} [A, C] = \mathsf{sort}([A, C])\\ \\ \begin{array}{l} t_0 := B \cdot B - 4 \cdot \left(C \cdot A\right)\\ t_1 := \mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)\\ \mathbf{if}\;B \leq -1.8 \cdot 10^{-115}:\\ \;\;\;\;\frac{-\sqrt{\left(2 \cdot \left(t_1 \cdot F\right)\right) \cdot \left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)}}{t_1}\\ \mathbf{elif}\;B \leq 2.8 \cdot 10^{-28}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(A \cdot 2\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;-\frac{\sqrt{\left(2 \cdot F\right) \cdot \left(A - \mathsf{hypot}\left(B, A\right)\right)}}{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 (* C A)))) (t_1 (fma B B (* C (* A -4.0)))))
           (if (<= B -1.8e-115)
             (/ (- (sqrt (* (* 2.0 (* t_1 F)) (+ A (- C (hypot B (- A C))))))) t_1)
             (if (<= B 2.8e-28)
               (/ (- (sqrt (* 2.0 (* (* F t_0) (* A 2.0))))) t_0)
               (- (/ (sqrt (* (* 2.0 F) (- A (hypot B A)))) B))))))
        assert(A < C);
        double code(double A, double B, double C, double F) {
        	double t_0 = (B * B) - (4.0 * (C * A));
        	double t_1 = fma(B, B, (C * (A * -4.0)));
        	double tmp;
        	if (B <= -1.8e-115) {
        		tmp = -sqrt(((2.0 * (t_1 * F)) * (A + (C - hypot(B, (A - C)))))) / t_1;
        	} else if (B <= 2.8e-28) {
        		tmp = -sqrt((2.0 * ((F * t_0) * (A * 2.0)))) / t_0;
        	} else {
        		tmp = -(sqrt(((2.0 * F) * (A - hypot(B, 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(C * A)))
        	t_1 = fma(B, B, Float64(C * Float64(A * -4.0)))
        	tmp = 0.0
        	if (B <= -1.8e-115)
        		tmp = Float64(Float64(-sqrt(Float64(Float64(2.0 * Float64(t_1 * F)) * Float64(A + Float64(C - hypot(B, Float64(A - C))))))) / t_1);
        	elseif (B <= 2.8e-28)
        		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(Float64(F * t_0) * Float64(A * 2.0))))) / t_0);
        	else
        		tmp = Float64(-Float64(sqrt(Float64(Float64(2.0 * F) * Float64(A - hypot(B, 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[(C * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(B * B + N[(C * N[(A * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -1.8e-115], N[((-N[Sqrt[N[(N[(2.0 * N[(t$95$1 * F), $MachinePrecision]), $MachinePrecision] * N[(A + N[(C - N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$1), $MachinePrecision], If[LessEqual[B, 2.8e-28], N[((-N[Sqrt[N[(2.0 * N[(N[(F * t$95$0), $MachinePrecision] * N[(A * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], (-N[(N[Sqrt[N[(N[(2.0 * F), $MachinePrecision] * N[(A - N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / B), $MachinePrecision])]]]]
        
        \begin{array}{l}
        [A, C] = \mathsf{sort}([A, C])\\
        \\
        \begin{array}{l}
        t_0 := B \cdot B - 4 \cdot \left(C \cdot A\right)\\
        t_1 := \mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)\\
        \mathbf{if}\;B \leq -1.8 \cdot 10^{-115}:\\
        \;\;\;\;\frac{-\sqrt{\left(2 \cdot \left(t_1 \cdot F\right)\right) \cdot \left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)}}{t_1}\\
        
        \mathbf{elif}\;B \leq 2.8 \cdot 10^{-28}:\\
        \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(A \cdot 2\right)\right)}}{t_0}\\
        
        \mathbf{else}:\\
        \;\;\;\;-\frac{\sqrt{\left(2 \cdot F\right) \cdot \left(A - \mathsf{hypot}\left(B, A\right)\right)}}{B}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if B < -1.80000000000000005e-115

          1. Initial program 23.9%

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

              \[\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 -1.80000000000000005e-115 < B < 2.7999999999999998e-28

            1. Initial program 22.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. Simplified22.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 25.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. *-commutative25.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. Simplified25.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.7999999999999998e-28 < B

              1. Initial program 10.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              Alternative 3: 39.3% accurate, 2.7× speedup?

              \[\begin{array}{l} [A, C] = \mathsf{sort}([A, C])\\ \\ \begin{array}{l} t_0 := B \cdot B - 4 \cdot \left(C \cdot A\right)\\ t_1 := B \cdot B + -4 \cdot \left(C \cdot A\right)\\ \mathbf{if}\;B \leq -1.1 \cdot 10^{-109}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(F \cdot \left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)\right)}}{t_1}\\ \mathbf{elif}\;B \leq 6.4 \cdot 10^{-28}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(A \cdot 2\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;-\frac{\sqrt{\left(2 \cdot F\right) \cdot \left(A - \mathsf{hypot}\left(B, A\right)\right)}}{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 (* C A)))) (t_1 (+ (* B B) (* -4.0 (* C A)))))
                 (if (<= B -1.1e-109)
                   (/ (- (sqrt (* 2.0 (* t_1 (* F (+ A (- C (hypot B (- A C))))))))) t_1)
                   (if (<= B 6.4e-28)
                     (/ (- (sqrt (* 2.0 (* (* F t_0) (* A 2.0))))) t_0)
                     (- (/ (sqrt (* (* 2.0 F) (- A (hypot B A)))) B))))))
              assert(A < C);
              double code(double A, double B, double C, double F) {
              	double t_0 = (B * B) - (4.0 * (C * A));
              	double t_1 = (B * B) + (-4.0 * (C * A));
              	double tmp;
              	if (B <= -1.1e-109) {
              		tmp = -sqrt((2.0 * (t_1 * (F * (A + (C - hypot(B, (A - C)))))))) / t_1;
              	} else if (B <= 6.4e-28) {
              		tmp = -sqrt((2.0 * ((F * t_0) * (A * 2.0)))) / t_0;
              	} else {
              		tmp = -(sqrt(((2.0 * F) * (A - hypot(B, A)))) / B);
              	}
              	return tmp;
              }
              
              assert A < C;
              public static double code(double A, double B, double C, double F) {
              	double t_0 = (B * B) - (4.0 * (C * A));
              	double t_1 = (B * B) + (-4.0 * (C * A));
              	double tmp;
              	if (B <= -1.1e-109) {
              		tmp = -Math.sqrt((2.0 * (t_1 * (F * (A + (C - Math.hypot(B, (A - C)))))))) / t_1;
              	} else if (B <= 6.4e-28) {
              		tmp = -Math.sqrt((2.0 * ((F * t_0) * (A * 2.0)))) / t_0;
              	} else {
              		tmp = -(Math.sqrt(((2.0 * F) * (A - Math.hypot(B, A)))) / B);
              	}
              	return tmp;
              }
              
              [A, C] = sort([A, C])
              def code(A, B, C, F):
              	t_0 = (B * B) - (4.0 * (C * A))
              	t_1 = (B * B) + (-4.0 * (C * A))
              	tmp = 0
              	if B <= -1.1e-109:
              		tmp = -math.sqrt((2.0 * (t_1 * (F * (A + (C - math.hypot(B, (A - C)))))))) / t_1
              	elif B <= 6.4e-28:
              		tmp = -math.sqrt((2.0 * ((F * t_0) * (A * 2.0)))) / t_0
              	else:
              		tmp = -(math.sqrt(((2.0 * F) * (A - math.hypot(B, 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(C * A)))
              	t_1 = Float64(Float64(B * B) + Float64(-4.0 * Float64(C * A)))
              	tmp = 0.0
              	if (B <= -1.1e-109)
              		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(t_1 * Float64(F * Float64(A + Float64(C - hypot(B, Float64(A - C))))))))) / t_1);
              	elseif (B <= 6.4e-28)
              		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(Float64(F * t_0) * Float64(A * 2.0))))) / t_0);
              	else
              		tmp = Float64(-Float64(sqrt(Float64(Float64(2.0 * F) * Float64(A - hypot(B, 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 * (C * A));
              	t_1 = (B * B) + (-4.0 * (C * A));
              	tmp = 0.0;
              	if (B <= -1.1e-109)
              		tmp = -sqrt((2.0 * (t_1 * (F * (A + (C - hypot(B, (A - C)))))))) / t_1;
              	elseif (B <= 6.4e-28)
              		tmp = -sqrt((2.0 * ((F * t_0) * (A * 2.0)))) / t_0;
              	else
              		tmp = -(sqrt(((2.0 * F) * (A - hypot(B, 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[(C * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(B * B), $MachinePrecision] + N[(-4.0 * N[(C * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -1.1e-109], N[((-N[Sqrt[N[(2.0 * N[(t$95$1 * N[(F * N[(A + N[(C - N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$1), $MachinePrecision], If[LessEqual[B, 6.4e-28], N[((-N[Sqrt[N[(2.0 * N[(N[(F * t$95$0), $MachinePrecision] * N[(A * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], (-N[(N[Sqrt[N[(N[(2.0 * F), $MachinePrecision] * N[(A - N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / B), $MachinePrecision])]]]]
              
              \begin{array}{l}
              [A, C] = \mathsf{sort}([A, C])\\
              \\
              \begin{array}{l}
              t_0 := B \cdot B - 4 \cdot \left(C \cdot A\right)\\
              t_1 := B \cdot B + -4 \cdot \left(C \cdot A\right)\\
              \mathbf{if}\;B \leq -1.1 \cdot 10^{-109}:\\
              \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(F \cdot \left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)\right)}}{t_1}\\
              
              \mathbf{elif}\;B \leq 6.4 \cdot 10^{-28}:\\
              \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(A \cdot 2\right)\right)}}{t_0}\\
              
              \mathbf{else}:\\
              \;\;\;\;-\frac{\sqrt{\left(2 \cdot F\right) \cdot \left(A - \mathsf{hypot}\left(B, A\right)\right)}}{B}\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 3 regimes
              2. if B < -1.1e-109

                1. Initial program 23.9%

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

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

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

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

                  if -1.1e-109 < B < 6.39999999999999964e-28

                  1. Initial program 22.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. Simplified22.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 25.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. *-commutative25.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. Simplified25.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 6.39999999999999964e-28 < B

                    1. Initial program 10.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    Alternative 4: 38.3% accurate, 2.8× speedup?

                    \[\begin{array}{l} [A, C] = \mathsf{sort}([A, C])\\ \\ \begin{array}{l} t_0 := B \cdot B - 4 \cdot \left(C \cdot A\right)\\ t_1 := F \cdot t_0\\ \mathbf{if}\;B \leq -8.6 \cdot 10^{+151}:\\ \;\;\;\;2 \cdot \left(\sqrt{A \cdot F} \cdot \frac{1}{B}\right)\\ \mathbf{elif}\;B \leq -5.2 \cdot 10^{-48}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(C - \mathsf{hypot}\left(C, B\right)\right)\right)}}{B \cdot B}\\ \mathbf{elif}\;B \leq 6.8 \cdot 10^{-28}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(A \cdot 2\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;-\frac{\sqrt{\left(2 \cdot F\right) \cdot \left(A - \mathsf{hypot}\left(B, A\right)\right)}}{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 (* C A)))) (t_1 (* F t_0)))
                       (if (<= B -8.6e+151)
                         (* 2.0 (* (sqrt (* A F)) (/ 1.0 B)))
                         (if (<= B -5.2e-48)
                           (/ (- (sqrt (* 2.0 (* t_1 (- C (hypot C B)))))) (* B B))
                           (if (<= B 6.8e-28)
                             (/ (- (sqrt (* 2.0 (* t_1 (* A 2.0))))) t_0)
                             (- (/ (sqrt (* (* 2.0 F) (- A (hypot B A)))) B)))))))
                    assert(A < C);
                    double code(double A, double B, double C, double F) {
                    	double t_0 = (B * B) - (4.0 * (C * A));
                    	double t_1 = F * t_0;
                    	double tmp;
                    	if (B <= -8.6e+151) {
                    		tmp = 2.0 * (sqrt((A * F)) * (1.0 / B));
                    	} else if (B <= -5.2e-48) {
                    		tmp = -sqrt((2.0 * (t_1 * (C - hypot(C, B))))) / (B * B);
                    	} else if (B <= 6.8e-28) {
                    		tmp = -sqrt((2.0 * (t_1 * (A * 2.0)))) / t_0;
                    	} else {
                    		tmp = -(sqrt(((2.0 * F) * (A - hypot(B, A)))) / B);
                    	}
                    	return tmp;
                    }
                    
                    assert A < C;
                    public static double code(double A, double B, double C, double F) {
                    	double t_0 = (B * B) - (4.0 * (C * A));
                    	double t_1 = F * t_0;
                    	double tmp;
                    	if (B <= -8.6e+151) {
                    		tmp = 2.0 * (Math.sqrt((A * F)) * (1.0 / B));
                    	} else if (B <= -5.2e-48) {
                    		tmp = -Math.sqrt((2.0 * (t_1 * (C - Math.hypot(C, B))))) / (B * B);
                    	} else if (B <= 6.8e-28) {
                    		tmp = -Math.sqrt((2.0 * (t_1 * (A * 2.0)))) / t_0;
                    	} else {
                    		tmp = -(Math.sqrt(((2.0 * F) * (A - Math.hypot(B, A)))) / B);
                    	}
                    	return tmp;
                    }
                    
                    [A, C] = sort([A, C])
                    def code(A, B, C, F):
                    	t_0 = (B * B) - (4.0 * (C * A))
                    	t_1 = F * t_0
                    	tmp = 0
                    	if B <= -8.6e+151:
                    		tmp = 2.0 * (math.sqrt((A * F)) * (1.0 / B))
                    	elif B <= -5.2e-48:
                    		tmp = -math.sqrt((2.0 * (t_1 * (C - math.hypot(C, B))))) / (B * B)
                    	elif B <= 6.8e-28:
                    		tmp = -math.sqrt((2.0 * (t_1 * (A * 2.0)))) / t_0
                    	else:
                    		tmp = -(math.sqrt(((2.0 * F) * (A - math.hypot(B, 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(C * A)))
                    	t_1 = Float64(F * t_0)
                    	tmp = 0.0
                    	if (B <= -8.6e+151)
                    		tmp = Float64(2.0 * Float64(sqrt(Float64(A * F)) * Float64(1.0 / B)));
                    	elseif (B <= -5.2e-48)
                    		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(t_1 * Float64(C - hypot(C, B)))))) / Float64(B * B));
                    	elseif (B <= 6.8e-28)
                    		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(t_1 * Float64(A * 2.0))))) / t_0);
                    	else
                    		tmp = Float64(-Float64(sqrt(Float64(Float64(2.0 * F) * Float64(A - hypot(B, 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 * (C * A));
                    	t_1 = F * t_0;
                    	tmp = 0.0;
                    	if (B <= -8.6e+151)
                    		tmp = 2.0 * (sqrt((A * F)) * (1.0 / B));
                    	elseif (B <= -5.2e-48)
                    		tmp = -sqrt((2.0 * (t_1 * (C - hypot(C, B))))) / (B * B);
                    	elseif (B <= 6.8e-28)
                    		tmp = -sqrt((2.0 * (t_1 * (A * 2.0)))) / t_0;
                    	else
                    		tmp = -(sqrt(((2.0 * F) * (A - hypot(B, 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[(C * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(F * t$95$0), $MachinePrecision]}, If[LessEqual[B, -8.6e+151], N[(2.0 * N[(N[Sqrt[N[(A * F), $MachinePrecision]], $MachinePrecision] * N[(1.0 / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -5.2e-48], N[((-N[Sqrt[N[(2.0 * N[(t$95$1 * N[(C - N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / N[(B * B), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 6.8e-28], N[((-N[Sqrt[N[(2.0 * N[(t$95$1 * N[(A * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], (-N[(N[Sqrt[N[(N[(2.0 * F), $MachinePrecision] * N[(A - N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / B), $MachinePrecision])]]]]]
                    
                    \begin{array}{l}
                    [A, C] = \mathsf{sort}([A, C])\\
                    \\
                    \begin{array}{l}
                    t_0 := B \cdot B - 4 \cdot \left(C \cdot A\right)\\
                    t_1 := F \cdot t_0\\
                    \mathbf{if}\;B \leq -8.6 \cdot 10^{+151}:\\
                    \;\;\;\;2 \cdot \left(\sqrt{A \cdot F} \cdot \frac{1}{B}\right)\\
                    
                    \mathbf{elif}\;B \leq -5.2 \cdot 10^{-48}:\\
                    \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(C - \mathsf{hypot}\left(C, B\right)\right)\right)}}{B \cdot B}\\
                    
                    \mathbf{elif}\;B \leq 6.8 \cdot 10^{-28}:\\
                    \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(A \cdot 2\right)\right)}}{t_0}\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;-\frac{\sqrt{\left(2 \cdot F\right) \cdot \left(A - \mathsf{hypot}\left(B, A\right)\right)}}{B}\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 4 regimes
                    2. if B < -8.59999999999999965e151

                      1. Initial program 0.1%

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

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

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

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

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

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

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

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

                        if -8.59999999999999965e151 < B < -5.19999999999999975e-48

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

                            \[\leadsto \frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \color{blue}{\left(C - \sqrt{{B}^{2} + {C}^{2}}\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                          3. Step-by-step derivation
                            1. +-commutative37.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(C - \sqrt{\color{blue}{{C}^{2} + {B}^{2}}}\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                            2. unpow237.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(C - \sqrt{\color{blue}{C \cdot C} + {B}^{2}}\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                            3. unpow237.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(C - \sqrt{C \cdot C + \color{blue}{B \cdot B}}\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                            4. hypot-def37.8%

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

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

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

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

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

                          if -5.19999999999999975e-48 < B < 6.8000000000000001e-28

                          1. Initial program 22.9%

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

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

                            1. Initial program 10.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            Alternative 5: 38.6% accurate, 2.9× speedup?

                            \[\begin{array}{l} [A, C] = \mathsf{sort}([A, C])\\ \\ \begin{array}{l} t_0 := B \cdot B - 4 \cdot \left(C \cdot A\right)\\ t_1 := F \cdot t_0\\ \mathbf{if}\;B \leq -7.8 \cdot 10^{+151}:\\ \;\;\;\;2 \cdot \left(\sqrt{A \cdot F} \cdot \frac{1}{B}\right)\\ \mathbf{elif}\;B \leq -1.05 \cdot 10^{-47}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(A + \left(B + C\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 6.5 \cdot 10^{-29}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(A \cdot 2\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;-\frac{\sqrt{\left(2 \cdot F\right) \cdot \left(A - \mathsf{hypot}\left(B, A\right)\right)}}{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 (* C A)))) (t_1 (* F t_0)))
                               (if (<= B -7.8e+151)
                                 (* 2.0 (* (sqrt (* A F)) (/ 1.0 B)))
                                 (if (<= B -1.05e-47)
                                   (/ (- (sqrt (* 2.0 (* t_1 (+ A (+ B C)))))) t_0)
                                   (if (<= B 6.5e-29)
                                     (/ (- (sqrt (* 2.0 (* t_1 (* A 2.0))))) t_0)
                                     (- (/ (sqrt (* (* 2.0 F) (- A (hypot B A)))) B)))))))
                            assert(A < C);
                            double code(double A, double B, double C, double F) {
                            	double t_0 = (B * B) - (4.0 * (C * A));
                            	double t_1 = F * t_0;
                            	double tmp;
                            	if (B <= -7.8e+151) {
                            		tmp = 2.0 * (sqrt((A * F)) * (1.0 / B));
                            	} else if (B <= -1.05e-47) {
                            		tmp = -sqrt((2.0 * (t_1 * (A + (B + C))))) / t_0;
                            	} else if (B <= 6.5e-29) {
                            		tmp = -sqrt((2.0 * (t_1 * (A * 2.0)))) / t_0;
                            	} else {
                            		tmp = -(sqrt(((2.0 * F) * (A - hypot(B, A)))) / B);
                            	}
                            	return tmp;
                            }
                            
                            assert A < C;
                            public static double code(double A, double B, double C, double F) {
                            	double t_0 = (B * B) - (4.0 * (C * A));
                            	double t_1 = F * t_0;
                            	double tmp;
                            	if (B <= -7.8e+151) {
                            		tmp = 2.0 * (Math.sqrt((A * F)) * (1.0 / B));
                            	} else if (B <= -1.05e-47) {
                            		tmp = -Math.sqrt((2.0 * (t_1 * (A + (B + C))))) / t_0;
                            	} else if (B <= 6.5e-29) {
                            		tmp = -Math.sqrt((2.0 * (t_1 * (A * 2.0)))) / t_0;
                            	} else {
                            		tmp = -(Math.sqrt(((2.0 * F) * (A - Math.hypot(B, A)))) / B);
                            	}
                            	return tmp;
                            }
                            
                            [A, C] = sort([A, C])
                            def code(A, B, C, F):
                            	t_0 = (B * B) - (4.0 * (C * A))
                            	t_1 = F * t_0
                            	tmp = 0
                            	if B <= -7.8e+151:
                            		tmp = 2.0 * (math.sqrt((A * F)) * (1.0 / B))
                            	elif B <= -1.05e-47:
                            		tmp = -math.sqrt((2.0 * (t_1 * (A + (B + C))))) / t_0
                            	elif B <= 6.5e-29:
                            		tmp = -math.sqrt((2.0 * (t_1 * (A * 2.0)))) / t_0
                            	else:
                            		tmp = -(math.sqrt(((2.0 * F) * (A - math.hypot(B, 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(C * A)))
                            	t_1 = Float64(F * t_0)
                            	tmp = 0.0
                            	if (B <= -7.8e+151)
                            		tmp = Float64(2.0 * Float64(sqrt(Float64(A * F)) * Float64(1.0 / B)));
                            	elseif (B <= -1.05e-47)
                            		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(t_1 * Float64(A + Float64(B + C)))))) / t_0);
                            	elseif (B <= 6.5e-29)
                            		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(t_1 * Float64(A * 2.0))))) / t_0);
                            	else
                            		tmp = Float64(-Float64(sqrt(Float64(Float64(2.0 * F) * Float64(A - hypot(B, 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 * (C * A));
                            	t_1 = F * t_0;
                            	tmp = 0.0;
                            	if (B <= -7.8e+151)
                            		tmp = 2.0 * (sqrt((A * F)) * (1.0 / B));
                            	elseif (B <= -1.05e-47)
                            		tmp = -sqrt((2.0 * (t_1 * (A + (B + C))))) / t_0;
                            	elseif (B <= 6.5e-29)
                            		tmp = -sqrt((2.0 * (t_1 * (A * 2.0)))) / t_0;
                            	else
                            		tmp = -(sqrt(((2.0 * F) * (A - hypot(B, 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[(C * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(F * t$95$0), $MachinePrecision]}, If[LessEqual[B, -7.8e+151], N[(2.0 * N[(N[Sqrt[N[(A * F), $MachinePrecision]], $MachinePrecision] * N[(1.0 / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.05e-47], 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, 6.5e-29], N[((-N[Sqrt[N[(2.0 * N[(t$95$1 * N[(A * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], (-N[(N[Sqrt[N[(N[(2.0 * F), $MachinePrecision] * N[(A - N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / B), $MachinePrecision])]]]]]
                            
                            \begin{array}{l}
                            [A, C] = \mathsf{sort}([A, C])\\
                            \\
                            \begin{array}{l}
                            t_0 := B \cdot B - 4 \cdot \left(C \cdot A\right)\\
                            t_1 := F \cdot t_0\\
                            \mathbf{if}\;B \leq -7.8 \cdot 10^{+151}:\\
                            \;\;\;\;2 \cdot \left(\sqrt{A \cdot F} \cdot \frac{1}{B}\right)\\
                            
                            \mathbf{elif}\;B \leq -1.05 \cdot 10^{-47}:\\
                            \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(A + \left(B + C\right)\right)\right)}}{t_0}\\
                            
                            \mathbf{elif}\;B \leq 6.5 \cdot 10^{-29}:\\
                            \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(A \cdot 2\right)\right)}}{t_0}\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;-\frac{\sqrt{\left(2 \cdot F\right) \cdot \left(A - \mathsf{hypot}\left(B, A\right)\right)}}{B}\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 4 regimes
                            2. if B < -7.79999999999999952e151

                              1. Initial program 0.1%

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

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

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

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

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

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

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

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

                                if -7.79999999999999952e151 < B < -1.05e-47

                                1. Initial program 41.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. Simplified41.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 B around -inf 35.6%

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

                                  if -1.05e-47 < B < 6.5e-29

                                  1. Initial program 22.9%

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

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

                                    1. Initial program 10.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    Alternative 6: 36.7% accurate, 2.9× speedup?

                                    \[\begin{array}{l} [A, C] = \mathsf{sort}([A, C])\\ \\ \begin{array}{l} t_0 := B \cdot B - 4 \cdot \left(C \cdot A\right)\\ t_1 := F \cdot t_0\\ \mathbf{if}\;B \leq -7.5 \cdot 10^{+151}:\\ \;\;\;\;2 \cdot \left(\sqrt{A \cdot F} \cdot \frac{1}{B}\right)\\ \mathbf{elif}\;B \leq -1.35 \cdot 10^{-49}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(A + \left(B + C\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 1.1 \cdot 10^{-27}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(A \cdot 2\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{F \cdot \left(A - B\right)} \cdot \frac{-\sqrt{2}}{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 (* C A)))) (t_1 (* F t_0)))
                                       (if (<= B -7.5e+151)
                                         (* 2.0 (* (sqrt (* A F)) (/ 1.0 B)))
                                         (if (<= B -1.35e-49)
                                           (/ (- (sqrt (* 2.0 (* t_1 (+ A (+ B C)))))) t_0)
                                           (if (<= B 1.1e-27)
                                             (/ (- (sqrt (* 2.0 (* t_1 (* A 2.0))))) t_0)
                                             (* (sqrt (* F (- 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 * (C * A));
                                    	double t_1 = F * t_0;
                                    	double tmp;
                                    	if (B <= -7.5e+151) {
                                    		tmp = 2.0 * (sqrt((A * F)) * (1.0 / B));
                                    	} else if (B <= -1.35e-49) {
                                    		tmp = -sqrt((2.0 * (t_1 * (A + (B + C))))) / t_0;
                                    	} else if (B <= 1.1e-27) {
                                    		tmp = -sqrt((2.0 * (t_1 * (A * 2.0)))) / t_0;
                                    	} else {
                                    		tmp = sqrt((F * (A - B))) * (-sqrt(2.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 * (c * a))
                                        t_1 = f * t_0
                                        if (b <= (-7.5d+151)) then
                                            tmp = 2.0d0 * (sqrt((a * f)) * (1.0d0 / b))
                                        else if (b <= (-1.35d-49)) then
                                            tmp = -sqrt((2.0d0 * (t_1 * (a + (b + c))))) / t_0
                                        else if (b <= 1.1d-27) then
                                            tmp = -sqrt((2.0d0 * (t_1 * (a * 2.0d0)))) / t_0
                                        else
                                            tmp = sqrt((f * (a - b))) * (-sqrt(2.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 * (C * A));
                                    	double t_1 = F * t_0;
                                    	double tmp;
                                    	if (B <= -7.5e+151) {
                                    		tmp = 2.0 * (Math.sqrt((A * F)) * (1.0 / B));
                                    	} else if (B <= -1.35e-49) {
                                    		tmp = -Math.sqrt((2.0 * (t_1 * (A + (B + C))))) / t_0;
                                    	} else if (B <= 1.1e-27) {
                                    		tmp = -Math.sqrt((2.0 * (t_1 * (A * 2.0)))) / t_0;
                                    	} else {
                                    		tmp = Math.sqrt((F * (A - B))) * (-Math.sqrt(2.0) / B);
                                    	}
                                    	return tmp;
                                    }
                                    
                                    [A, C] = sort([A, C])
                                    def code(A, B, C, F):
                                    	t_0 = (B * B) - (4.0 * (C * A))
                                    	t_1 = F * t_0
                                    	tmp = 0
                                    	if B <= -7.5e+151:
                                    		tmp = 2.0 * (math.sqrt((A * F)) * (1.0 / B))
                                    	elif B <= -1.35e-49:
                                    		tmp = -math.sqrt((2.0 * (t_1 * (A + (B + C))))) / t_0
                                    	elif B <= 1.1e-27:
                                    		tmp = -math.sqrt((2.0 * (t_1 * (A * 2.0)))) / t_0
                                    	else:
                                    		tmp = math.sqrt((F * (A - B))) * (-math.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(C * A)))
                                    	t_1 = Float64(F * t_0)
                                    	tmp = 0.0
                                    	if (B <= -7.5e+151)
                                    		tmp = Float64(2.0 * Float64(sqrt(Float64(A * F)) * Float64(1.0 / B)));
                                    	elseif (B <= -1.35e-49)
                                    		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(t_1 * Float64(A + Float64(B + C)))))) / t_0);
                                    	elseif (B <= 1.1e-27)
                                    		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(t_1 * Float64(A * 2.0))))) / t_0);
                                    	else
                                    		tmp = Float64(sqrt(Float64(F * Float64(A - B))) * Float64(Float64(-sqrt(2.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 * (C * A));
                                    	t_1 = F * t_0;
                                    	tmp = 0.0;
                                    	if (B <= -7.5e+151)
                                    		tmp = 2.0 * (sqrt((A * F)) * (1.0 / B));
                                    	elseif (B <= -1.35e-49)
                                    		tmp = -sqrt((2.0 * (t_1 * (A + (B + C))))) / t_0;
                                    	elseif (B <= 1.1e-27)
                                    		tmp = -sqrt((2.0 * (t_1 * (A * 2.0)))) / t_0;
                                    	else
                                    		tmp = sqrt((F * (A - B))) * (-sqrt(2.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[(C * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(F * t$95$0), $MachinePrecision]}, If[LessEqual[B, -7.5e+151], N[(2.0 * N[(N[Sqrt[N[(A * F), $MachinePrecision]], $MachinePrecision] * N[(1.0 / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.35e-49], 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.1e-27], N[((-N[Sqrt[N[(2.0 * N[(t$95$1 * N[(A * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], N[(N[Sqrt[N[(F * N[(A - B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[((-N[Sqrt[2.0], $MachinePrecision]) / B), $MachinePrecision]), $MachinePrecision]]]]]]
                                    
                                    \begin{array}{l}
                                    [A, C] = \mathsf{sort}([A, C])\\
                                    \\
                                    \begin{array}{l}
                                    t_0 := B \cdot B - 4 \cdot \left(C \cdot A\right)\\
                                    t_1 := F \cdot t_0\\
                                    \mathbf{if}\;B \leq -7.5 \cdot 10^{+151}:\\
                                    \;\;\;\;2 \cdot \left(\sqrt{A \cdot F} \cdot \frac{1}{B}\right)\\
                                    
                                    \mathbf{elif}\;B \leq -1.35 \cdot 10^{-49}:\\
                                    \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(A + \left(B + C\right)\right)\right)}}{t_0}\\
                                    
                                    \mathbf{elif}\;B \leq 1.1 \cdot 10^{-27}:\\
                                    \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(A \cdot 2\right)\right)}}{t_0}\\
                                    
                                    \mathbf{else}:\\
                                    \;\;\;\;\sqrt{F \cdot \left(A - B\right)} \cdot \frac{-\sqrt{2}}{B}\\
                                    
                                    
                                    \end{array}
                                    \end{array}
                                    
                                    Derivation
                                    1. Split input into 4 regimes
                                    2. if B < -7.49999999999999977e151

                                      1. Initial program 0.1%

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

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

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

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

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

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

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

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

                                        if -7.49999999999999977e151 < B < -1.35e-49

                                        1. Initial program 41.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. Simplified41.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 B around -inf 35.6%

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

                                          if -1.35e-49 < B < 1.09999999999999993e-27

                                          1. Initial program 22.9%

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

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

                                            1. Initial program 10.0%

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

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

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

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

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

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

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

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

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

                                            Alternative 7: 28.4% accurate, 4.7× speedup?

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

                                              1. Initial program 0.1%

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

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

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

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

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

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

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

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

                                                if -8.9999999999999997e151 < B < -1.08000000000000005e-47

                                                1. Initial program 41.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. Simplified41.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 B around -inf 35.6%

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

                                                  if -1.08000000000000005e-47 < B

                                                  1. Initial program 19.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. Simplified19.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 17.6%

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

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

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

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

                                                  Alternative 8: 27.0% accurate, 5.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                    Alternative 9: 26.7% accurate, 5.0× speedup?

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

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

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

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

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

                                                      Alternative 10: 19.3% accurate, 5.0× speedup?

                                                      \[\begin{array}{l} [A, C] = \mathsf{sort}([A, C])\\ \\ \begin{array}{l} \mathbf{if}\;B \leq -9 \cdot 10^{+39}:\\ \;\;\;\;2 \cdot \left(\sqrt{A \cdot F} \cdot \frac{1}{B}\right)\\ \mathbf{elif}\;B \leq 1.7 \cdot 10^{-37}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(-8 \cdot \left(A \cdot A\right)\right) \cdot \left(C \cdot F\right)\right)}}{B \cdot B - 4 \cdot \left(C \cdot A\right)}\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \frac{{\left(A \cdot F\right)}^{0.5}}{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 -9e+39)
                                                         (* 2.0 (* (sqrt (* A F)) (/ 1.0 B)))
                                                         (if (<= B 1.7e-37)
                                                           (/
                                                            (- (sqrt (* 2.0 (* (* -8.0 (* A A)) (* C F)))))
                                                            (- (* B B) (* 4.0 (* C A))))
                                                           (* -2.0 (/ (pow (* A F) 0.5) B)))))
                                                      assert(A < C);
                                                      double code(double A, double B, double C, double F) {
                                                      	double tmp;
                                                      	if (B <= -9e+39) {
                                                      		tmp = 2.0 * (sqrt((A * F)) * (1.0 / B));
                                                      	} else if (B <= 1.7e-37) {
                                                      		tmp = -sqrt((2.0 * ((-8.0 * (A * A)) * (C * F)))) / ((B * B) - (4.0 * (C * A)));
                                                      	} else {
                                                      		tmp = -2.0 * (pow((A * F), 0.5) / 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 <= (-9d+39)) then
                                                              tmp = 2.0d0 * (sqrt((a * f)) * (1.0d0 / b))
                                                          else if (b <= 1.7d-37) then
                                                              tmp = -sqrt((2.0d0 * (((-8.0d0) * (a * a)) * (c * f)))) / ((b * b) - (4.0d0 * (c * a)))
                                                          else
                                                              tmp = (-2.0d0) * (((a * f) ** 0.5d0) / 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 <= -9e+39) {
                                                      		tmp = 2.0 * (Math.sqrt((A * F)) * (1.0 / B));
                                                      	} else if (B <= 1.7e-37) {
                                                      		tmp = -Math.sqrt((2.0 * ((-8.0 * (A * A)) * (C * F)))) / ((B * B) - (4.0 * (C * A)));
                                                      	} else {
                                                      		tmp = -2.0 * (Math.pow((A * F), 0.5) / B);
                                                      	}
                                                      	return tmp;
                                                      }
                                                      
                                                      [A, C] = sort([A, C])
                                                      def code(A, B, C, F):
                                                      	tmp = 0
                                                      	if B <= -9e+39:
                                                      		tmp = 2.0 * (math.sqrt((A * F)) * (1.0 / B))
                                                      	elif B <= 1.7e-37:
                                                      		tmp = -math.sqrt((2.0 * ((-8.0 * (A * A)) * (C * F)))) / ((B * B) - (4.0 * (C * A)))
                                                      	else:
                                                      		tmp = -2.0 * (math.pow((A * F), 0.5) / B)
                                                      	return tmp
                                                      
                                                      A, C = sort([A, C])
                                                      function code(A, B, C, F)
                                                      	tmp = 0.0
                                                      	if (B <= -9e+39)
                                                      		tmp = Float64(2.0 * Float64(sqrt(Float64(A * F)) * Float64(1.0 / B)));
                                                      	elseif (B <= 1.7e-37)
                                                      		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(Float64(-8.0 * Float64(A * A)) * Float64(C * F))))) / Float64(Float64(B * B) - Float64(4.0 * Float64(C * A))));
                                                      	else
                                                      		tmp = Float64(-2.0 * Float64((Float64(A * F) ^ 0.5) / B));
                                                      	end
                                                      	return tmp
                                                      end
                                                      
                                                      A, C = num2cell(sort([A, C])){:}
                                                      function tmp_2 = code(A, B, C, F)
                                                      	tmp = 0.0;
                                                      	if (B <= -9e+39)
                                                      		tmp = 2.0 * (sqrt((A * F)) * (1.0 / B));
                                                      	elseif (B <= 1.7e-37)
                                                      		tmp = -sqrt((2.0 * ((-8.0 * (A * A)) * (C * F)))) / ((B * B) - (4.0 * (C * A)));
                                                      	else
                                                      		tmp = -2.0 * (((A * F) ^ 0.5) / 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, -9e+39], N[(2.0 * N[(N[Sqrt[N[(A * F), $MachinePrecision]], $MachinePrecision] * N[(1.0 / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.7e-37], N[((-N[Sqrt[N[(2.0 * N[(N[(-8.0 * N[(A * A), $MachinePrecision]), $MachinePrecision] * N[(C * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / N[(N[(B * B), $MachinePrecision] - N[(4.0 * N[(C * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-2.0 * N[(N[Power[N[(A * F), $MachinePrecision], 0.5], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]
                                                      
                                                      \begin{array}{l}
                                                      [A, C] = \mathsf{sort}([A, C])\\
                                                      \\
                                                      \begin{array}{l}
                                                      \mathbf{if}\;B \leq -9 \cdot 10^{+39}:\\
                                                      \;\;\;\;2 \cdot \left(\sqrt{A \cdot F} \cdot \frac{1}{B}\right)\\
                                                      
                                                      \mathbf{elif}\;B \leq 1.7 \cdot 10^{-37}:\\
                                                      \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(-8 \cdot \left(A \cdot A\right)\right) \cdot \left(C \cdot F\right)\right)}}{B \cdot B - 4 \cdot \left(C \cdot A\right)}\\
                                                      
                                                      \mathbf{else}:\\
                                                      \;\;\;\;-2 \cdot \frac{{\left(A \cdot F\right)}^{0.5}}{B}\\
                                                      
                                                      
                                                      \end{array}
                                                      \end{array}
                                                      
                                                      Derivation
                                                      1. Split input into 3 regimes
                                                      2. if B < -8.99999999999999991e39

                                                        1. Initial program 18.5%

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

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

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

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

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

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

                                                          if -8.99999999999999991e39 < B < 1.70000000000000009e-37

                                                          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 22.5%

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

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

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

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

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

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

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

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

                                                            if 1.70000000000000009e-37 < B

                                                            1. Initial program 13.0%

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

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

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

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

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

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

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

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

                                                                \[\leadsto \color{blue}{-2 \cdot \frac{\sqrt{F \cdot A}}{B}} \]
                                                              8. Step-by-step derivation
                                                                1. pow1/26.2%

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

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

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

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

                                                            Alternative 11: 25.9% accurate, 5.0× speedup?

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

                                                              1. Initial program 18.2%

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

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

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

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

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

                                                                if -7.5000000000000005e39 < B

                                                                1. Initial program 20.8%

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

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

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

                                                                      \[\leadsto \color{blue}{-\frac{\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(A \cdot 2\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
                                                                    2. associate-*l*16.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-inv16.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-eval16.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. *-commutative16.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-inv16.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-eval16.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-rr16.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)}} \]
                                                                  7. Taylor expanded in B around 0 15.4%

                                                                    \[\leadsto -\frac{\sqrt{2 \cdot \left(\color{blue}{\left(-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)} \]
                                                                  8. Step-by-step derivation
                                                                    1. *-commutative15.4%

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

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

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

                                                                Alternative 12: 23.7% accurate, 5.0× speedup?

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

                                                                  1. Initial program 22.4%

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

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

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

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

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

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

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

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

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

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

                                                                    if -6.7999999999999996e-94 < B

                                                                    1. Initial program 19.3%

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

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

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

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

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

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

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

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

                                                                    Alternative 13: 9.5% accurate, 5.8× speedup?

                                                                    \[\begin{array}{l} [A, C] = \mathsf{sort}([A, C])\\ \\ \begin{array}{l} \mathbf{if}\;B \leq -3.9 \cdot 10^{-268}:\\ \;\;\;\;2 \cdot \frac{\sqrt{A \cdot F}}{B}\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \frac{{\left(A \cdot F\right)}^{0.5}}{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 -3.9e-268)
                                                                       (* 2.0 (/ (sqrt (* A F)) B))
                                                                       (* -2.0 (/ (pow (* A F) 0.5) B))))
                                                                    assert(A < C);
                                                                    double code(double A, double B, double C, double F) {
                                                                    	double tmp;
                                                                    	if (B <= -3.9e-268) {
                                                                    		tmp = 2.0 * (sqrt((A * F)) / B);
                                                                    	} else {
                                                                    		tmp = -2.0 * (pow((A * F), 0.5) / 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 <= (-3.9d-268)) then
                                                                            tmp = 2.0d0 * (sqrt((a * f)) / b)
                                                                        else
                                                                            tmp = (-2.0d0) * (((a * f) ** 0.5d0) / 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 <= -3.9e-268) {
                                                                    		tmp = 2.0 * (Math.sqrt((A * F)) / B);
                                                                    	} else {
                                                                    		tmp = -2.0 * (Math.pow((A * F), 0.5) / B);
                                                                    	}
                                                                    	return tmp;
                                                                    }
                                                                    
                                                                    [A, C] = sort([A, C])
                                                                    def code(A, B, C, F):
                                                                    	tmp = 0
                                                                    	if B <= -3.9e-268:
                                                                    		tmp = 2.0 * (math.sqrt((A * F)) / B)
                                                                    	else:
                                                                    		tmp = -2.0 * (math.pow((A * F), 0.5) / B)
                                                                    	return tmp
                                                                    
                                                                    A, C = sort([A, C])
                                                                    function code(A, B, C, F)
                                                                    	tmp = 0.0
                                                                    	if (B <= -3.9e-268)
                                                                    		tmp = Float64(2.0 * Float64(sqrt(Float64(A * F)) / B));
                                                                    	else
                                                                    		tmp = Float64(-2.0 * Float64((Float64(A * F) ^ 0.5) / B));
                                                                    	end
                                                                    	return tmp
                                                                    end
                                                                    
                                                                    A, C = num2cell(sort([A, C])){:}
                                                                    function tmp_2 = code(A, B, C, F)
                                                                    	tmp = 0.0;
                                                                    	if (B <= -3.9e-268)
                                                                    		tmp = 2.0 * (sqrt((A * F)) / B);
                                                                    	else
                                                                    		tmp = -2.0 * (((A * F) ^ 0.5) / 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, -3.9e-268], N[(2.0 * N[(N[Sqrt[N[(A * F), $MachinePrecision]], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], N[(-2.0 * N[(N[Power[N[(A * F), $MachinePrecision], 0.5], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]
                                                                    
                                                                    \begin{array}{l}
                                                                    [A, C] = \mathsf{sort}([A, C])\\
                                                                    \\
                                                                    \begin{array}{l}
                                                                    \mathbf{if}\;B \leq -3.9 \cdot 10^{-268}:\\
                                                                    \;\;\;\;2 \cdot \frac{\sqrt{A \cdot F}}{B}\\
                                                                    
                                                                    \mathbf{else}:\\
                                                                    \;\;\;\;-2 \cdot \frac{{\left(A \cdot F\right)}^{0.5}}{B}\\
                                                                    
                                                                    
                                                                    \end{array}
                                                                    \end{array}
                                                                    
                                                                    Derivation
                                                                    1. Split input into 2 regimes
                                                                    2. if B < -3.8999999999999998e-268

                                                                      1. Initial program 20.4%

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

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

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

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

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

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

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

                                                                        if -3.8999999999999998e-268 < B

                                                                        1. Initial program 20.0%

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

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

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

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

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

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

                                                                            \[\leadsto \color{blue}{-2 \cdot \frac{\sqrt{F \cdot A}}{B}} \]
                                                                          8. Step-by-step derivation
                                                                            1. pow1/23.6%

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

                                                                              \[\leadsto -2 \cdot \frac{{\color{blue}{\left(A \cdot F\right)}}^{0.5}}{B} \]
                                                                          9. Applied egg-rr3.6%

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

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

                                                                        Alternative 14: 9.5% accurate, 5.8× speedup?

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

                                                                          1. Initial program 20.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. Simplified20.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 11.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. *-commutative11.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. Simplified11.4%

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

                                                                              \[\leadsto \color{blue}{2 \cdot \left(\sqrt{A \cdot F} \cdot \frac{1}{B}\right)} \]
                                                                            6. 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} \]
                                                                            7. Simplified4.5%

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

                                                                            if -1.8500000000000001e-304 < B

                                                                            1. Initial program 20.3%

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

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

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

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

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

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

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

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

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

                                                                            Alternative 15: 5.6% accurate, 5.9× speedup?

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

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

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

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

                                                                                \[\leadsto \color{blue}{-2 \cdot \left(\sqrt{A \cdot F} \cdot \frac{1}{B}\right)} \]
                                                                              6. 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} \]
                                                                              7. Simplified2.6%

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

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

                                                                              Reproduce

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