ABCF->ab-angle b

Percentage Accurate: 19.1% → 45.1%
Time: 25.0s
Alternatives: 14
Speedup: 5.1×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 14 alternatives:

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

Initial Program: 19.1% accurate, 1.0× speedup?

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

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

Alternative 1: 45.1% accurate, 0.9× speedup?

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

\mathbf{elif}\;{B}^{2} \leq 2 \cdot 10^{-129}:\\
\;\;\;\;\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}^{2} \leq 5 \cdot 10^{-97}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (pow.f64 B 2) < 1.9999999999999999e-223 or 1.9999999999999999e-129 < (pow.f64 B 2) < 4.9999999999999995e-97

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

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

      if 1.9999999999999999e-223 < (pow.f64 B 2) < 1.9999999999999999e-129

      1. Initial program 26.7%

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

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

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

            \[\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. *-commutative50.6%

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

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

            \[\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. +-commutative50.6%

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

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

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

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

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

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

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

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

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

          \[\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 4.9999999999999995e-97 < (pow.f64 B 2)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 2: 44.6% accurate, 2.0× speedup?

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

          1. Initial program 15.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. Simplified15.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 15.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. *-commutative15.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. Simplified15.2%

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

            if 1.7999999999999999e-104 < B < 8.5000000000000003e-65

            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 C around 0 43.9%

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

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

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

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

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

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

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

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

              if 7.20000000000000001e-45 < B

              1. Initial program 15.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. Simplified15.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 C around 0 25.1%

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto -\frac{\color{blue}{e^{\mathsf{log1p}\left(\sqrt{2} \cdot \sqrt{F \cdot \left(A - \mathsf{hypot}\left(A, B\right)\right)}\right)} - 1}}{B} \]
                  3. sqrt-unprod26.8%

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

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

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

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

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

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

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

                \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 1.8 \cdot 10^{-104}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(2 \cdot A\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \mathbf{elif}\;B \leq 8.5 \cdot 10^{-65}:\\ \;\;\;\;\frac{\sqrt{F \cdot \left(A - \mathsf{hypot}\left(A, B\right)\right)} \cdot \left(B \cdot \left(-\sqrt{2}\right)\right)}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \mathbf{elif}\;B \leq 7.2 \cdot 10^{-45}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(2 \cdot A\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{F \cdot \left(2 \cdot \left(A - \mathsf{hypot}\left(A, B\right)\right)\right)}}{B}\\ \end{array} \]

              Alternative 3: 44.8% accurate, 2.0× speedup?

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

                1. Initial program 15.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. Simplified15.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 15.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. *-commutative15.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. Simplified15.2%

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

                  if 2.20000000000000012e-104 < B < 4.40000000000000042e-65

                  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 C around 0 44.1%

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

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

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

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

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

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

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

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

                    if 5.2e-42 < B

                    1. Initial program 15.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. Simplified15.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 C around 0 25.1%

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto -\frac{\color{blue}{e^{\mathsf{log1p}\left(\sqrt{2} \cdot \sqrt{F \cdot \left(A - \mathsf{hypot}\left(A, B\right)\right)}\right)} - 1}}{B} \]
                        3. sqrt-unprod26.8%

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

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

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

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

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

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

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

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

                    Alternative 4: 40.6% accurate, 2.9× speedup?

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

                      1. Initial program 15.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. Simplified15.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 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)} \]

                        if 9.4e-104 < B < 4.40000000000000042e-65 or 4.5e-42 < B < 2.6e-23 or 5.00000000000000022e47 < B

                        1. Initial program 10.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

                          if 2.6e-23 < B < 3.1e7

                          1. Initial program 16.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. Simplified16.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)} \]
                            5. Step-by-step derivation
                              1. div-inv17.6%

                                \[\leadsto \color{blue}{\left(-\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)}\right) \cdot \frac{1}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
                              2. associate-*l*17.6%

                                \[\leadsto \left(-\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)}}\right) \cdot \frac{1}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                              3. cancel-sign-sub-inv17.6%

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

                                \[\leadsto \left(-\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)}\right) \cdot \frac{1}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                              5. cancel-sign-sub-inv17.6%

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

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

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

                            if 3.1e7 < B < 5.00000000000000022e47

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

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

                              \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 9.4 \cdot 10^{-104}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(2 \cdot A\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \mathbf{elif}\;B \leq 4.4 \cdot 10^{-65}:\\ \;\;\;\;\sqrt{B \cdot \left(-F\right)} \cdot \frac{-\sqrt{2}}{B}\\ \mathbf{elif}\;B \leq 4.5 \cdot 10^{-42}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(2 \cdot A\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \mathbf{elif}\;B \leq 2.6 \cdot 10^{-23}:\\ \;\;\;\;\sqrt{B \cdot \left(-F\right)} \cdot \frac{-\sqrt{2}}{B}\\ \mathbf{elif}\;B \leq 31000000:\\ \;\;\;\;\sqrt{2 \cdot \left(\left(B \cdot B + \left(A \cdot C\right) \cdot -4\right) \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)} \cdot \frac{-1}{B \cdot B + \left(A \cdot C\right) \cdot -4}\\ \mathbf{elif}\;B \leq 5 \cdot 10^{+47}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(\left(A + C\right) - B\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{B \cdot \left(-F\right)} \cdot \frac{-\sqrt{2}}{B}\\ \end{array} \]

                            Alternative 5: 40.6% accurate, 2.9× speedup?

                            \[\begin{array}{l} B = |B|\\ [A, C] = \mathsf{sort}([A, C])\\ \\ \begin{array}{l} t_0 := -\sqrt{2}\\ t_1 := \sqrt{B \cdot \left(-F\right)}\\ t_2 := t_1 \cdot \frac{t_0}{B}\\ t_3 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\ t_4 := t_3 \cdot F\\ t_5 := \frac{-\sqrt{2 \cdot \left(t_4 \cdot \left(2 \cdot A\right)\right)}}{t_3}\\ t_6 := B \cdot B + \left(A \cdot C\right) \cdot -4\\ \mathbf{if}\;B \leq 9 \cdot 10^{-104}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;B \leq 6.6 \cdot 10^{-65}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;B \leq 2.6 \cdot 10^{-41}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;B \leq 1.7 \cdot 10^{-24}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;B \leq 27000000:\\ \;\;\;\;\sqrt{2 \cdot \left(t_6 \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)} \cdot \frac{-1}{t_6}\\ \mathbf{elif}\;B \leq 5.2 \cdot 10^{+47}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_4 \cdot \left(\left(A + C\right) - B\right)\right)}}{t_3}\\ \mathbf{else}:\\ \;\;\;\;\frac{t_1 \cdot t_0}{B}\\ \end{array} \end{array} \]
                            NOTE: B should be positive before calling this function
                            NOTE: A and C should be sorted in increasing order before calling this function.
                            (FPCore (A B C F)
                             :precision binary64
                             (let* ((t_0 (- (sqrt 2.0)))
                                    (t_1 (sqrt (* B (- F))))
                                    (t_2 (* t_1 (/ t_0 B)))
                                    (t_3 (- (* B B) (* 4.0 (* A C))))
                                    (t_4 (* t_3 F))
                                    (t_5 (/ (- (sqrt (* 2.0 (* t_4 (* 2.0 A))))) t_3))
                                    (t_6 (+ (* B B) (* (* A C) -4.0))))
                               (if (<= B 9e-104)
                                 t_5
                                 (if (<= B 6.6e-65)
                                   t_2
                                   (if (<= B 2.6e-41)
                                     t_5
                                     (if (<= B 1.7e-24)
                                       t_2
                                       (if (<= B 27000000.0)
                                         (* (sqrt (* 2.0 (* t_6 (* F (* 2.0 A))))) (/ -1.0 t_6))
                                         (if (<= B 5.2e+47)
                                           (/ (- (sqrt (* 2.0 (* t_4 (- (+ A C) B))))) t_3)
                                           (/ (* t_1 t_0) B)))))))))
                            B = abs(B);
                            assert(A < C);
                            double code(double A, double B, double C, double F) {
                            	double t_0 = -sqrt(2.0);
                            	double t_1 = sqrt((B * -F));
                            	double t_2 = t_1 * (t_0 / B);
                            	double t_3 = (B * B) - (4.0 * (A * C));
                            	double t_4 = t_3 * F;
                            	double t_5 = -sqrt((2.0 * (t_4 * (2.0 * A)))) / t_3;
                            	double t_6 = (B * B) + ((A * C) * -4.0);
                            	double tmp;
                            	if (B <= 9e-104) {
                            		tmp = t_5;
                            	} else if (B <= 6.6e-65) {
                            		tmp = t_2;
                            	} else if (B <= 2.6e-41) {
                            		tmp = t_5;
                            	} else if (B <= 1.7e-24) {
                            		tmp = t_2;
                            	} else if (B <= 27000000.0) {
                            		tmp = sqrt((2.0 * (t_6 * (F * (2.0 * A))))) * (-1.0 / t_6);
                            	} else if (B <= 5.2e+47) {
                            		tmp = -sqrt((2.0 * (t_4 * ((A + C) - B)))) / t_3;
                            	} else {
                            		tmp = (t_1 * t_0) / B;
                            	}
                            	return tmp;
                            }
                            
                            NOTE: B should be positive before calling this function
                            NOTE: A and C should be sorted in increasing order before calling this function.
                            real(8) function code(a, b, c, f)
                                real(8), intent (in) :: a
                                real(8), intent (in) :: b
                                real(8), intent (in) :: c
                                real(8), intent (in) :: f
                                real(8) :: t_0
                                real(8) :: t_1
                                real(8) :: t_2
                                real(8) :: t_3
                                real(8) :: t_4
                                real(8) :: t_5
                                real(8) :: t_6
                                real(8) :: tmp
                                t_0 = -sqrt(2.0d0)
                                t_1 = sqrt((b * -f))
                                t_2 = t_1 * (t_0 / b)
                                t_3 = (b * b) - (4.0d0 * (a * c))
                                t_4 = t_3 * f
                                t_5 = -sqrt((2.0d0 * (t_4 * (2.0d0 * a)))) / t_3
                                t_6 = (b * b) + ((a * c) * (-4.0d0))
                                if (b <= 9d-104) then
                                    tmp = t_5
                                else if (b <= 6.6d-65) then
                                    tmp = t_2
                                else if (b <= 2.6d-41) then
                                    tmp = t_5
                                else if (b <= 1.7d-24) then
                                    tmp = t_2
                                else if (b <= 27000000.0d0) then
                                    tmp = sqrt((2.0d0 * (t_6 * (f * (2.0d0 * a))))) * ((-1.0d0) / t_6)
                                else if (b <= 5.2d+47) then
                                    tmp = -sqrt((2.0d0 * (t_4 * ((a + c) - b)))) / t_3
                                else
                                    tmp = (t_1 * t_0) / b
                                end if
                                code = tmp
                            end function
                            
                            B = Math.abs(B);
                            assert A < C;
                            public static double code(double A, double B, double C, double F) {
                            	double t_0 = -Math.sqrt(2.0);
                            	double t_1 = Math.sqrt((B * -F));
                            	double t_2 = t_1 * (t_0 / B);
                            	double t_3 = (B * B) - (4.0 * (A * C));
                            	double t_4 = t_3 * F;
                            	double t_5 = -Math.sqrt((2.0 * (t_4 * (2.0 * A)))) / t_3;
                            	double t_6 = (B * B) + ((A * C) * -4.0);
                            	double tmp;
                            	if (B <= 9e-104) {
                            		tmp = t_5;
                            	} else if (B <= 6.6e-65) {
                            		tmp = t_2;
                            	} else if (B <= 2.6e-41) {
                            		tmp = t_5;
                            	} else if (B <= 1.7e-24) {
                            		tmp = t_2;
                            	} else if (B <= 27000000.0) {
                            		tmp = Math.sqrt((2.0 * (t_6 * (F * (2.0 * A))))) * (-1.0 / t_6);
                            	} else if (B <= 5.2e+47) {
                            		tmp = -Math.sqrt((2.0 * (t_4 * ((A + C) - B)))) / t_3;
                            	} else {
                            		tmp = (t_1 * t_0) / B;
                            	}
                            	return tmp;
                            }
                            
                            B = abs(B)
                            [A, C] = sort([A, C])
                            def code(A, B, C, F):
                            	t_0 = -math.sqrt(2.0)
                            	t_1 = math.sqrt((B * -F))
                            	t_2 = t_1 * (t_0 / B)
                            	t_3 = (B * B) - (4.0 * (A * C))
                            	t_4 = t_3 * F
                            	t_5 = -math.sqrt((2.0 * (t_4 * (2.0 * A)))) / t_3
                            	t_6 = (B * B) + ((A * C) * -4.0)
                            	tmp = 0
                            	if B <= 9e-104:
                            		tmp = t_5
                            	elif B <= 6.6e-65:
                            		tmp = t_2
                            	elif B <= 2.6e-41:
                            		tmp = t_5
                            	elif B <= 1.7e-24:
                            		tmp = t_2
                            	elif B <= 27000000.0:
                            		tmp = math.sqrt((2.0 * (t_6 * (F * (2.0 * A))))) * (-1.0 / t_6)
                            	elif B <= 5.2e+47:
                            		tmp = -math.sqrt((2.0 * (t_4 * ((A + C) - B)))) / t_3
                            	else:
                            		tmp = (t_1 * t_0) / B
                            	return tmp
                            
                            B = abs(B)
                            A, C = sort([A, C])
                            function code(A, B, C, F)
                            	t_0 = Float64(-sqrt(2.0))
                            	t_1 = sqrt(Float64(B * Float64(-F)))
                            	t_2 = Float64(t_1 * Float64(t_0 / B))
                            	t_3 = Float64(Float64(B * B) - Float64(4.0 * Float64(A * C)))
                            	t_4 = Float64(t_3 * F)
                            	t_5 = Float64(Float64(-sqrt(Float64(2.0 * Float64(t_4 * Float64(2.0 * A))))) / t_3)
                            	t_6 = Float64(Float64(B * B) + Float64(Float64(A * C) * -4.0))
                            	tmp = 0.0
                            	if (B <= 9e-104)
                            		tmp = t_5;
                            	elseif (B <= 6.6e-65)
                            		tmp = t_2;
                            	elseif (B <= 2.6e-41)
                            		tmp = t_5;
                            	elseif (B <= 1.7e-24)
                            		tmp = t_2;
                            	elseif (B <= 27000000.0)
                            		tmp = Float64(sqrt(Float64(2.0 * Float64(t_6 * Float64(F * Float64(2.0 * A))))) * Float64(-1.0 / t_6));
                            	elseif (B <= 5.2e+47)
                            		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(t_4 * Float64(Float64(A + C) - B))))) / t_3);
                            	else
                            		tmp = Float64(Float64(t_1 * t_0) / B);
                            	end
                            	return tmp
                            end
                            
                            B = abs(B)
                            A, C = num2cell(sort([A, C])){:}
                            function tmp_2 = code(A, B, C, F)
                            	t_0 = -sqrt(2.0);
                            	t_1 = sqrt((B * -F));
                            	t_2 = t_1 * (t_0 / B);
                            	t_3 = (B * B) - (4.0 * (A * C));
                            	t_4 = t_3 * F;
                            	t_5 = -sqrt((2.0 * (t_4 * (2.0 * A)))) / t_3;
                            	t_6 = (B * B) + ((A * C) * -4.0);
                            	tmp = 0.0;
                            	if (B <= 9e-104)
                            		tmp = t_5;
                            	elseif (B <= 6.6e-65)
                            		tmp = t_2;
                            	elseif (B <= 2.6e-41)
                            		tmp = t_5;
                            	elseif (B <= 1.7e-24)
                            		tmp = t_2;
                            	elseif (B <= 27000000.0)
                            		tmp = sqrt((2.0 * (t_6 * (F * (2.0 * A))))) * (-1.0 / t_6);
                            	elseif (B <= 5.2e+47)
                            		tmp = -sqrt((2.0 * (t_4 * ((A + C) - B)))) / t_3;
                            	else
                            		tmp = (t_1 * t_0) / B;
                            	end
                            	tmp_2 = tmp;
                            end
                            
                            NOTE: B should be positive before calling this function
                            NOTE: A and C should be sorted in increasing order before calling this function.
                            code[A_, B_, C_, F_] := Block[{t$95$0 = (-N[Sqrt[2.0], $MachinePrecision])}, Block[{t$95$1 = N[Sqrt[N[(B * (-F)), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[(t$95$0 / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(B * B), $MachinePrecision] - N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 * F), $MachinePrecision]}, Block[{t$95$5 = N[((-N[Sqrt[N[(2.0 * N[(t$95$4 * N[(2.0 * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$3), $MachinePrecision]}, Block[{t$95$6 = N[(N[(B * B), $MachinePrecision] + N[(N[(A * C), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, 9e-104], t$95$5, If[LessEqual[B, 6.6e-65], t$95$2, If[LessEqual[B, 2.6e-41], t$95$5, If[LessEqual[B, 1.7e-24], t$95$2, If[LessEqual[B, 27000000.0], N[(N[Sqrt[N[(2.0 * N[(t$95$6 * N[(F * N[(2.0 * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(-1.0 / t$95$6), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5.2e+47], N[((-N[Sqrt[N[(2.0 * N[(t$95$4 * N[(N[(A + C), $MachinePrecision] - B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$3), $MachinePrecision], N[(N[(t$95$1 * t$95$0), $MachinePrecision] / B), $MachinePrecision]]]]]]]]]]]]]]
                            
                            \begin{array}{l}
                            B = |B|\\
                            [A, C] = \mathsf{sort}([A, C])\\
                            \\
                            \begin{array}{l}
                            t_0 := -\sqrt{2}\\
                            t_1 := \sqrt{B \cdot \left(-F\right)}\\
                            t_2 := t_1 \cdot \frac{t_0}{B}\\
                            t_3 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\
                            t_4 := t_3 \cdot F\\
                            t_5 := \frac{-\sqrt{2 \cdot \left(t_4 \cdot \left(2 \cdot A\right)\right)}}{t_3}\\
                            t_6 := B \cdot B + \left(A \cdot C\right) \cdot -4\\
                            \mathbf{if}\;B \leq 9 \cdot 10^{-104}:\\
                            \;\;\;\;t_5\\
                            
                            \mathbf{elif}\;B \leq 6.6 \cdot 10^{-65}:\\
                            \;\;\;\;t_2\\
                            
                            \mathbf{elif}\;B \leq 2.6 \cdot 10^{-41}:\\
                            \;\;\;\;t_5\\
                            
                            \mathbf{elif}\;B \leq 1.7 \cdot 10^{-24}:\\
                            \;\;\;\;t_2\\
                            
                            \mathbf{elif}\;B \leq 27000000:\\
                            \;\;\;\;\sqrt{2 \cdot \left(t_6 \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)} \cdot \frac{-1}{t_6}\\
                            
                            \mathbf{elif}\;B \leq 5.2 \cdot 10^{+47}:\\
                            \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_4 \cdot \left(\left(A + C\right) - B\right)\right)}}{t_3}\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\frac{t_1 \cdot t_0}{B}\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 5 regimes
                            2. if B < 8.9999999999999995e-104 or 6.6000000000000002e-65 < B < 2.5999999999999999e-41

                              1. Initial program 15.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. Simplified15.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 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)} \]

                                if 8.9999999999999995e-104 < B < 6.6000000000000002e-65 or 2.5999999999999999e-41 < B < 1.69999999999999996e-24

                                1. Initial program 27.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  if 1.69999999999999996e-24 < B < 2.7e7

                                  1. Initial program 16.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. Simplified16.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)} \]
                                    5. Step-by-step derivation
                                      1. div-inv17.6%

                                        \[\leadsto \color{blue}{\left(-\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)}\right) \cdot \frac{1}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
                                      2. associate-*l*17.6%

                                        \[\leadsto \left(-\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)}}\right) \cdot \frac{1}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                      3. cancel-sign-sub-inv17.6%

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

                                        \[\leadsto \left(-\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)}\right) \cdot \frac{1}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                      5. cancel-sign-sub-inv17.6%

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

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

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

                                    if 2.7e7 < B < 5.20000000000000007e47

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

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

                                      if 5.20000000000000007e47 < B

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                        \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 9 \cdot 10^{-104}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(2 \cdot A\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \mathbf{elif}\;B \leq 6.6 \cdot 10^{-65}:\\ \;\;\;\;\sqrt{B \cdot \left(-F\right)} \cdot \frac{-\sqrt{2}}{B}\\ \mathbf{elif}\;B \leq 2.6 \cdot 10^{-41}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(2 \cdot A\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \mathbf{elif}\;B \leq 1.7 \cdot 10^{-24}:\\ \;\;\;\;\sqrt{B \cdot \left(-F\right)} \cdot \frac{-\sqrt{2}}{B}\\ \mathbf{elif}\;B \leq 27000000:\\ \;\;\;\;\sqrt{2 \cdot \left(\left(B \cdot B + \left(A \cdot C\right) \cdot -4\right) \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)} \cdot \frac{-1}{B \cdot B + \left(A \cdot C\right) \cdot -4}\\ \mathbf{elif}\;B \leq 5.2 \cdot 10^{+47}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(\left(A + C\right) - B\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{B \cdot \left(-F\right)} \cdot \left(-\sqrt{2}\right)}{B}\\ \end{array} \]

                                      Alternative 6: 44.6% accurate, 2.9× speedup?

                                      \[\begin{array}{l} B = |B|\\ [A, C] = \mathsf{sort}([A, C])\\ \\ \begin{array}{l} t_0 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;B \leq 2.3 \cdot 10^{-104} \lor \neg \left(B \leq 3.2 \cdot 10^{-64}\right) \land B \leq 4.3 \cdot 10^{-44}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(t_0 \cdot F\right) \cdot \left(2 \cdot A\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{F \cdot \left(2 \cdot \left(A - \mathsf{hypot}\left(A, B\right)\right)\right)}}{B}\\ \end{array} \end{array} \]
                                      NOTE: B should be positive before calling this function
                                      NOTE: A and C should be sorted in increasing order before calling this function.
                                      (FPCore (A B C F)
                                       :precision binary64
                                       (let* ((t_0 (- (* B B) (* 4.0 (* A C)))))
                                         (if (or (<= B 2.3e-104) (and (not (<= B 3.2e-64)) (<= B 4.3e-44)))
                                           (/ (- (sqrt (* 2.0 (* (* t_0 F) (* 2.0 A))))) t_0)
                                           (/ (- (sqrt (* F (* 2.0 (- A (hypot A B)))))) B))))
                                      B = abs(B);
                                      assert(A < C);
                                      double code(double A, double B, double C, double F) {
                                      	double t_0 = (B * B) - (4.0 * (A * C));
                                      	double tmp;
                                      	if ((B <= 2.3e-104) || (!(B <= 3.2e-64) && (B <= 4.3e-44))) {
                                      		tmp = -sqrt((2.0 * ((t_0 * F) * (2.0 * A)))) / t_0;
                                      	} else {
                                      		tmp = -sqrt((F * (2.0 * (A - hypot(A, B))))) / B;
                                      	}
                                      	return tmp;
                                      }
                                      
                                      B = Math.abs(B);
                                      assert A < C;
                                      public static double code(double A, double B, double C, double F) {
                                      	double t_0 = (B * B) - (4.0 * (A * C));
                                      	double tmp;
                                      	if ((B <= 2.3e-104) || (!(B <= 3.2e-64) && (B <= 4.3e-44))) {
                                      		tmp = -Math.sqrt((2.0 * ((t_0 * F) * (2.0 * A)))) / t_0;
                                      	} else {
                                      		tmp = -Math.sqrt((F * (2.0 * (A - Math.hypot(A, B))))) / B;
                                      	}
                                      	return tmp;
                                      }
                                      
                                      B = abs(B)
                                      [A, C] = sort([A, C])
                                      def code(A, B, C, F):
                                      	t_0 = (B * B) - (4.0 * (A * C))
                                      	tmp = 0
                                      	if (B <= 2.3e-104) or (not (B <= 3.2e-64) and (B <= 4.3e-44)):
                                      		tmp = -math.sqrt((2.0 * ((t_0 * F) * (2.0 * A)))) / t_0
                                      	else:
                                      		tmp = -math.sqrt((F * (2.0 * (A - math.hypot(A, B))))) / B
                                      	return tmp
                                      
                                      B = abs(B)
                                      A, C = sort([A, C])
                                      function code(A, B, C, F)
                                      	t_0 = Float64(Float64(B * B) - Float64(4.0 * Float64(A * C)))
                                      	tmp = 0.0
                                      	if ((B <= 2.3e-104) || (!(B <= 3.2e-64) && (B <= 4.3e-44)))
                                      		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(Float64(t_0 * F) * Float64(2.0 * A))))) / t_0);
                                      	else
                                      		tmp = Float64(Float64(-sqrt(Float64(F * Float64(2.0 * Float64(A - hypot(A, B)))))) / B);
                                      	end
                                      	return tmp
                                      end
                                      
                                      B = abs(B)
                                      A, C = num2cell(sort([A, C])){:}
                                      function tmp_2 = code(A, B, C, F)
                                      	t_0 = (B * B) - (4.0 * (A * C));
                                      	tmp = 0.0;
                                      	if ((B <= 2.3e-104) || (~((B <= 3.2e-64)) && (B <= 4.3e-44)))
                                      		tmp = -sqrt((2.0 * ((t_0 * F) * (2.0 * A)))) / t_0;
                                      	else
                                      		tmp = -sqrt((F * (2.0 * (A - hypot(A, B))))) / B;
                                      	end
                                      	tmp_2 = tmp;
                                      end
                                      
                                      NOTE: B should be positive before calling this function
                                      NOTE: A and C should be sorted in increasing order before calling this function.
                                      code[A_, B_, C_, F_] := Block[{t$95$0 = N[(N[(B * B), $MachinePrecision] - N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[B, 2.3e-104], And[N[Not[LessEqual[B, 3.2e-64]], $MachinePrecision], LessEqual[B, 4.3e-44]]], N[((-N[Sqrt[N[(2.0 * N[(N[(t$95$0 * F), $MachinePrecision] * N[(2.0 * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], N[((-N[Sqrt[N[(F * N[(2.0 * N[(A - N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / B), $MachinePrecision]]]
                                      
                                      \begin{array}{l}
                                      B = |B|\\
                                      [A, C] = \mathsf{sort}([A, C])\\
                                      \\
                                      \begin{array}{l}
                                      t_0 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\
                                      \mathbf{if}\;B \leq 2.3 \cdot 10^{-104} \lor \neg \left(B \leq 3.2 \cdot 10^{-64}\right) \land B \leq 4.3 \cdot 10^{-44}:\\
                                      \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(t_0 \cdot F\right) \cdot \left(2 \cdot A\right)\right)}}{t_0}\\
                                      
                                      \mathbf{else}:\\
                                      \;\;\;\;\frac{-\sqrt{F \cdot \left(2 \cdot \left(A - \mathsf{hypot}\left(A, B\right)\right)\right)}}{B}\\
                                      
                                      
                                      \end{array}
                                      \end{array}
                                      
                                      Derivation
                                      1. Split input into 2 regimes
                                      2. if B < 2.2999999999999999e-104 or 3.19999999999999975e-64 < B < 4.30000000000000013e-44

                                        1. Initial program 15.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. Simplified15.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 15.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. *-commutative15.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. Simplified15.2%

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

                                          if 2.2999999999999999e-104 < B < 3.19999999999999975e-64 or 4.30000000000000013e-44 < B

                                          1. Initial program 16.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                \[\leadsto -\frac{\color{blue}{e^{\mathsf{log1p}\left(\sqrt{2} \cdot \sqrt{F \cdot \left(A - \mathsf{hypot}\left(A, B\right)\right)}\right)} - 1}}{B} \]
                                              3. sqrt-unprod25.6%

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

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

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

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

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

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

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

                                            \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 2.3 \cdot 10^{-104} \lor \neg \left(B \leq 3.2 \cdot 10^{-64}\right) \land B \leq 4.3 \cdot 10^{-44}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(2 \cdot A\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{F \cdot \left(2 \cdot \left(A - \mathsf{hypot}\left(A, B\right)\right)\right)}}{B}\\ \end{array} \]

                                          Alternative 7: 40.7% accurate, 2.9× speedup?

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

                                            1. Initial program 15.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. Simplified15.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 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)} \]

                                              if 9.4e-104 < B < 7.00000000000000009e-65

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                if 8.50000000000000056e-43 < B

                                                1. Initial program 15.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. Simplified15.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 C around 0 25.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                Alternative 8: 29.6% accurate, 4.7× speedup?

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

                                                  1. Initial program 15.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. Simplified15.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 14.9%

                                                      \[\leadsto \frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \color{blue}{\left(2 \cdot A\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                                    3. Step-by-step derivation
                                                      1. *-commutative14.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. Simplified14.9%

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

                                                    if 8.00000000000000005e-41 < B < 8.5000000000000008e47

                                                    1. Initial program 33.6%

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

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

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

                                                      if 8.5000000000000008e47 < B

                                                      1. Initial program 8.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. Simplified8.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 4.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. *-commutative4.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. Simplified4.7%

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

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

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

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

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

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

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

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

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

                                                            \[\leadsto -2 \cdot \sqrt{\frac{\color{blue}{F \cdot A}}{B \cdot B}} \]
                                                        9. Applied egg-rr6.9%

                                                          \[\leadsto -2 \cdot \color{blue}{\sqrt{\frac{F \cdot A}{B \cdot B}}} \]
                                                        10. Step-by-step derivation
                                                          1. associate-/l*9.0%

                                                            \[\leadsto -2 \cdot \sqrt{\color{blue}{\frac{F}{\frac{B \cdot B}{A}}}} \]
                                                          2. associate-/l*12.6%

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

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

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

                                                      Alternative 9: 30.1% accurate, 4.9× speedup?

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

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

                                                            \[\leadsto \frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \color{blue}{\left(2 \cdot A\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                                          3. Step-by-step derivation
                                                            1. *-commutative14.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. Simplified14.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-neg14.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*14.0%

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

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

                                                              \[\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. cancel-sign-sub-inv14.0%

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

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

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

                                                          if 1.4e36 < B

                                                          1. Initial program 11.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. Simplified11.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 6.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. *-commutative6.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. Simplified6.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 10.3%

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

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

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

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

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

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

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

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

                                                                \[\leadsto -2 \cdot \sqrt{\frac{\color{blue}{F \cdot A}}{B \cdot B}} \]
                                                            9. Applied egg-rr8.3%

                                                              \[\leadsto -2 \cdot \color{blue}{\sqrt{\frac{F \cdot A}{B \cdot B}}} \]
                                                            10. Step-by-step derivation
                                                              1. associate-/l*10.3%

                                                                \[\leadsto -2 \cdot \sqrt{\color{blue}{\frac{F}{\frac{B \cdot B}{A}}}} \]
                                                              2. associate-/l*13.6%

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

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

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

                                                          Alternative 10: 30.1% accurate, 4.9× speedup?

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

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

                                                                \[\leadsto \frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \color{blue}{\left(2 \cdot A\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                                              3. Step-by-step derivation
                                                                1. *-commutative14.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. Simplified14.9%

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

                                                              if 1.5e36 < B

                                                              1. Initial program 11.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. Simplified11.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 6.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. *-commutative6.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. Simplified6.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 10.3%

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

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

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

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

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

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

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

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

                                                                    \[\leadsto -2 \cdot \sqrt{\frac{\color{blue}{F \cdot A}}{B \cdot B}} \]
                                                                9. Applied egg-rr8.3%

                                                                  \[\leadsto -2 \cdot \color{blue}{\sqrt{\frac{F \cdot A}{B \cdot B}}} \]
                                                                10. Step-by-step derivation
                                                                  1. associate-/l*10.3%

                                                                    \[\leadsto -2 \cdot \sqrt{\color{blue}{\frac{F}{\frac{B \cdot B}{A}}}} \]
                                                                  2. associate-/l*13.6%

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

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

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

                                                              Alternative 11: 27.1% accurate, 5.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

                                                                  if 7.3999999999999997e33 < B

                                                                  1. Initial program 11.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. Simplified11.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 6.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. *-commutative6.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. Simplified6.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 10.2%

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

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

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

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

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

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

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

                                                                        \[\leadsto -2 \cdot \sqrt{\color{blue}{\frac{\sqrt{F \cdot A} \cdot \sqrt{F \cdot A}}{B \cdot B}}} \]
                                                                      6. add-sqr-sqrt8.2%

                                                                        \[\leadsto -2 \cdot \sqrt{\frac{\color{blue}{F \cdot A}}{B \cdot B}} \]
                                                                    9. Applied egg-rr8.2%

                                                                      \[\leadsto -2 \cdot \color{blue}{\sqrt{\frac{F \cdot A}{B \cdot B}}} \]
                                                                    10. Step-by-step derivation
                                                                      1. associate-/l*10.1%

                                                                        \[\leadsto -2 \cdot \sqrt{\color{blue}{\frac{F}{\frac{B \cdot B}{A}}}} \]
                                                                      2. associate-/l*13.3%

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

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

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

                                                                  Alternative 12: 9.3% accurate, 5.8× speedup?

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

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

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

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

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

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

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

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

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

                                                                        \[\leadsto -2 \cdot \sqrt{\color{blue}{\frac{\sqrt{F \cdot A} \cdot \sqrt{F \cdot A}}{B \cdot B}}} \]
                                                                      6. add-sqr-sqrt4.0%

                                                                        \[\leadsto -2 \cdot \sqrt{\frac{\color{blue}{F \cdot A}}{B \cdot B}} \]
                                                                    9. Applied egg-rr4.0%

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

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

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

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

                                                                    Alternative 13: 9.7% accurate, 5.8× speedup?

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

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

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

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

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

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

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

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

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

                                                                          \[\leadsto -2 \cdot \sqrt{\color{blue}{\frac{\sqrt{F \cdot A} \cdot \sqrt{F \cdot A}}{B \cdot B}}} \]
                                                                        6. add-sqr-sqrt4.0%

                                                                          \[\leadsto -2 \cdot \sqrt{\frac{\color{blue}{F \cdot A}}{B \cdot B}} \]
                                                                      9. Applied egg-rr4.0%

                                                                        \[\leadsto -2 \cdot \color{blue}{\sqrt{\frac{F \cdot A}{B \cdot B}}} \]
                                                                      10. Step-by-step derivation
                                                                        1. associate-/l*5.5%

                                                                          \[\leadsto -2 \cdot \sqrt{\color{blue}{\frac{F}{\frac{B \cdot B}{A}}}} \]
                                                                        2. associate-/l*7.1%

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

                                                                        \[\leadsto -2 \cdot \color{blue}{\sqrt{\frac{F}{\frac{B}{\frac{A}{B}}}}} \]
                                                                      12. Final simplification7.1%

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

                                                                      Alternative 14: 8.8% accurate, 5.9× speedup?

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

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

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

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

                                                                          \[\leadsto \color{blue}{-2 \cdot \left(\sqrt{F \cdot A} \cdot \frac{1}{B}\right)} \]
                                                                        8. Taylor expanded in B around 0 4.3%

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

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

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

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

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

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

                                                                        Reproduce

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