ABCF->ab-angle b

Percentage Accurate: 19.1% → 53.5%
Time: 24.0s
Alternatives: 12
Speedup: 5.9×

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 12 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: 53.5% accurate, 0.9× speedup?

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

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

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


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

    1. Initial program 14.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. Simplified14.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 23.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. distribute-frac-neg23.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(2 \cdot A\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
        2. associate-*l*25.3%

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

          \[\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(2 \cdot A\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
        4. metadata-eval25.3%

          \[\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(2 \cdot A\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
        5. *-commutative25.3%

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

          \[\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)}} \]
        7. metadata-eval25.3%

          \[\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)} \]
      4. Applied egg-rr25.3%

        \[\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.99999999999999985e-163 < (pow.f64 B 2) < 1.0000000000000001e272

      1. Initial program 34.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. Simplified39.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-prod53.2%

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

            \[\leadsto \frac{-\sqrt{\mathsf{fma}\left(B, B, A \cdot \color{blue}{\left(C \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)} \]
          3. associate--r-53.1%

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

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

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

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

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

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

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

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

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

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

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

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

        if 1.0000000000000001e272 < (pow.f64 B 2)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 2: 51.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)\\ \mathbf{if}\;B \leq 3.4 \cdot 10^{-82}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 7.8 \cdot 10^{+93}:\\ \;\;\;\;\frac{\sqrt{F \cdot \left(A - \mathsf{hypot}\left(A, B\right)\right)} \cdot \left(\sqrt{2} \cdot \left(-B\right)\right)}{B \cdot B - \left(A \cdot C\right) \cdot 4}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(\sqrt{-F} \cdot \left(-\sqrt{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)))))
           (if (<= B 3.4e-82)
             (/ (- (sqrt (* 2.0 (* t_0 (* F (* 2.0 A)))))) t_0)
             (if (<= B 7.8e+93)
               (/
                (* (sqrt (* F (- A (hypot A B)))) (* (sqrt 2.0) (- B)))
                (- (* B B) (* (* A C) 4.0)))
               (* (/ (sqrt 2.0) B) (* (sqrt (- F)) (- (sqrt 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 <= 3.4e-82) {
        		tmp = -sqrt((2.0 * (t_0 * (F * (2.0 * A))))) / t_0;
        	} else if (B <= 7.8e+93) {
        		tmp = (sqrt((F * (A - hypot(A, B)))) * (sqrt(2.0) * -B)) / ((B * B) - ((A * C) * 4.0));
        	} else {
        		tmp = (sqrt(2.0) / B) * (sqrt(-F) * -sqrt(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 <= 3.4e-82) {
        		tmp = -Math.sqrt((2.0 * (t_0 * (F * (2.0 * A))))) / t_0;
        	} else if (B <= 7.8e+93) {
        		tmp = (Math.sqrt((F * (A - Math.hypot(A, B)))) * (Math.sqrt(2.0) * -B)) / ((B * B) - ((A * C) * 4.0));
        	} else {
        		tmp = (Math.sqrt(2.0) / B) * (Math.sqrt(-F) * -Math.sqrt(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 <= 3.4e-82:
        		tmp = -math.sqrt((2.0 * (t_0 * (F * (2.0 * A))))) / t_0
        	elif B <= 7.8e+93:
        		tmp = (math.sqrt((F * (A - math.hypot(A, B)))) * (math.sqrt(2.0) * -B)) / ((B * B) - ((A * C) * 4.0))
        	else:
        		tmp = (math.sqrt(2.0) / B) * (math.sqrt(-F) * -math.sqrt(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 <= 3.4e-82)
        		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(t_0 * Float64(F * Float64(2.0 * A)))))) / t_0);
        	elseif (B <= 7.8e+93)
        		tmp = Float64(Float64(sqrt(Float64(F * Float64(A - hypot(A, B)))) * Float64(sqrt(2.0) * Float64(-B))) / Float64(Float64(B * B) - Float64(Float64(A * C) * 4.0)));
        	else
        		tmp = Float64(Float64(sqrt(2.0) / B) * Float64(sqrt(Float64(-F)) * Float64(-sqrt(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 <= 3.4e-82)
        		tmp = -sqrt((2.0 * (t_0 * (F * (2.0 * A))))) / t_0;
        	elseif (B <= 7.8e+93)
        		tmp = (sqrt((F * (A - hypot(A, B)))) * (sqrt(2.0) * -B)) / ((B * B) - ((A * C) * 4.0));
        	else
        		tmp = (sqrt(2.0) / B) * (sqrt(-F) * -sqrt(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, 3.4e-82], 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], If[LessEqual[B, 7.8e+93], N[(N[(N[Sqrt[N[(F * N[(A - N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] * (-B)), $MachinePrecision]), $MachinePrecision] / N[(N[(B * B), $MachinePrecision] - N[(N[(A * C), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B), $MachinePrecision] * N[(N[Sqrt[(-F)], $MachinePrecision] * (-N[Sqrt[B], $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 3.4 \cdot 10^{-82}:\\
        \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}{t_0}\\
        
        \mathbf{elif}\;B \leq 7.8 \cdot 10^{+93}:\\
        \;\;\;\;\frac{\sqrt{F \cdot \left(A - \mathsf{hypot}\left(A, B\right)\right)} \cdot \left(\sqrt{2} \cdot \left(-B\right)\right)}{B \cdot B - \left(A \cdot C\right) \cdot 4}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(\sqrt{-F} \cdot \left(-\sqrt{B}\right)\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if B < 3.39999999999999975e-82

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

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

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

                \[\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(2 \cdot A\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
              4. metadata-eval15.4%

                \[\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(2 \cdot A\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
              5. *-commutative15.4%

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

                \[\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)}} \]
              7. metadata-eval15.4%

                \[\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)} \]
            4. Applied egg-rr15.4%

              \[\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 3.39999999999999975e-82 < B < 7.8000000000000005e93

            1. Initial program 37.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. Simplified37.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 C around 0 36.8%

                \[\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. +-commutative36.8%

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

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

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

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

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

              if 7.8000000000000005e93 < B

              1. Initial program 3.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. Simplified3.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 C around 0 10.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              Alternative 3: 46.8% accurate, 2.0× speedup?

              \[\begin{array}{l} B = |B|\\ [A, C] = \mathsf{sort}([A, C])\\ \\ \begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;B \leq 3.8 \cdot 10^{-82}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 1.48 \cdot 10^{+94}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(F \cdot \left(A - \mathsf{hypot}\left(A, B\right)\right)\right)}}{B}\\ \mathbf{elif}\;B \leq 1.85 \cdot 10^{+236} \lor \neg \left(B \leq 1.15 \cdot 10^{+247}\right):\\ \;\;\;\;\left(\frac{\sqrt{2}}{B} \cdot \sqrt{-F}\right) \cdot \left(-\sqrt{B}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{B \cdot \left(-F\right)} \cdot \left(-\sqrt{2}\right)}{B}\\ \end{array} \end{array} \]
              NOTE: B should be positive before calling this function
              NOTE: A and C should be sorted in increasing order before calling this function.
              (FPCore (A B C F)
               :precision binary64
               (let* ((t_0 (+ (* B B) (* -4.0 (* A C)))))
                 (if (<= B 3.8e-82)
                   (/ (- (sqrt (* 2.0 (* t_0 (* F (* 2.0 A)))))) t_0)
                   (if (<= B 1.48e+94)
                     (/ (- (sqrt (* 2.0 (* F (- A (hypot A B)))))) B)
                     (if (or (<= B 1.85e+236) (not (<= B 1.15e+247)))
                       (* (* (/ (sqrt 2.0) B) (sqrt (- F))) (- (sqrt B)))
                       (/ (* (sqrt (* B (- F))) (- (sqrt 2.0))) B))))))
              B = abs(B);
              assert(A < C);
              double code(double A, double B, double C, double F) {
              	double t_0 = (B * B) + (-4.0 * (A * C));
              	double tmp;
              	if (B <= 3.8e-82) {
              		tmp = -sqrt((2.0 * (t_0 * (F * (2.0 * A))))) / t_0;
              	} else if (B <= 1.48e+94) {
              		tmp = -sqrt((2.0 * (F * (A - hypot(A, B))))) / B;
              	} else if ((B <= 1.85e+236) || !(B <= 1.15e+247)) {
              		tmp = ((sqrt(2.0) / B) * sqrt(-F)) * -sqrt(B);
              	} else {
              		tmp = (sqrt((B * -F)) * -sqrt(2.0)) / B;
              	}
              	return tmp;
              }
              
              B = Math.abs(B);
              assert A < C;
              public static double code(double A, double B, double C, double F) {
              	double t_0 = (B * B) + (-4.0 * (A * C));
              	double tmp;
              	if (B <= 3.8e-82) {
              		tmp = -Math.sqrt((2.0 * (t_0 * (F * (2.0 * A))))) / t_0;
              	} else if (B <= 1.48e+94) {
              		tmp = -Math.sqrt((2.0 * (F * (A - Math.hypot(A, B))))) / B;
              	} else if ((B <= 1.85e+236) || !(B <= 1.15e+247)) {
              		tmp = ((Math.sqrt(2.0) / B) * Math.sqrt(-F)) * -Math.sqrt(B);
              	} else {
              		tmp = (Math.sqrt((B * -F)) * -Math.sqrt(2.0)) / B;
              	}
              	return tmp;
              }
              
              B = abs(B)
              [A, C] = sort([A, C])
              def code(A, B, C, F):
              	t_0 = (B * B) + (-4.0 * (A * C))
              	tmp = 0
              	if B <= 3.8e-82:
              		tmp = -math.sqrt((2.0 * (t_0 * (F * (2.0 * A))))) / t_0
              	elif B <= 1.48e+94:
              		tmp = -math.sqrt((2.0 * (F * (A - math.hypot(A, B))))) / B
              	elif (B <= 1.85e+236) or not (B <= 1.15e+247):
              		tmp = ((math.sqrt(2.0) / B) * math.sqrt(-F)) * -math.sqrt(B)
              	else:
              		tmp = (math.sqrt((B * -F)) * -math.sqrt(2.0)) / B
              	return tmp
              
              B = abs(B)
              A, C = sort([A, C])
              function code(A, B, C, F)
              	t_0 = Float64(Float64(B * B) + Float64(-4.0 * Float64(A * C)))
              	tmp = 0.0
              	if (B <= 3.8e-82)
              		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(t_0 * Float64(F * Float64(2.0 * A)))))) / t_0);
              	elseif (B <= 1.48e+94)
              		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(F * Float64(A - hypot(A, B)))))) / B);
              	elseif ((B <= 1.85e+236) || !(B <= 1.15e+247))
              		tmp = Float64(Float64(Float64(sqrt(2.0) / B) * sqrt(Float64(-F))) * Float64(-sqrt(B)));
              	else
              		tmp = Float64(Float64(sqrt(Float64(B * Float64(-F))) * Float64(-sqrt(2.0))) / B);
              	end
              	return tmp
              end
              
              B = abs(B)
              A, C = num2cell(sort([A, C])){:}
              function tmp_2 = code(A, B, C, F)
              	t_0 = (B * B) + (-4.0 * (A * C));
              	tmp = 0.0;
              	if (B <= 3.8e-82)
              		tmp = -sqrt((2.0 * (t_0 * (F * (2.0 * A))))) / t_0;
              	elseif (B <= 1.48e+94)
              		tmp = -sqrt((2.0 * (F * (A - hypot(A, B))))) / B;
              	elseif ((B <= 1.85e+236) || ~((B <= 1.15e+247)))
              		tmp = ((sqrt(2.0) / B) * sqrt(-F)) * -sqrt(B);
              	else
              		tmp = (sqrt((B * -F)) * -sqrt(2.0)) / B;
              	end
              	tmp_2 = tmp;
              end
              
              NOTE: B should be positive before calling this function
              NOTE: A and C should be sorted in increasing order before calling this function.
              code[A_, B_, C_, F_] := Block[{t$95$0 = N[(N[(B * B), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, 3.8e-82], 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], If[LessEqual[B, 1.48e+94], N[((-N[Sqrt[N[(2.0 * N[(F * N[(A - N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / B), $MachinePrecision], If[Or[LessEqual[B, 1.85e+236], N[Not[LessEqual[B, 1.15e+247]], $MachinePrecision]], N[(N[(N[(N[Sqrt[2.0], $MachinePrecision] / B), $MachinePrecision] * N[Sqrt[(-F)], $MachinePrecision]), $MachinePrecision] * (-N[Sqrt[B], $MachinePrecision])), $MachinePrecision], N[(N[(N[Sqrt[N[(B * (-F)), $MachinePrecision]], $MachinePrecision] * (-N[Sqrt[2.0], $MachinePrecision])), $MachinePrecision] / B), $MachinePrecision]]]]]
              
              \begin{array}{l}
              B = |B|\\
              [A, C] = \mathsf{sort}([A, C])\\
              \\
              \begin{array}{l}
              t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\
              \mathbf{if}\;B \leq 3.8 \cdot 10^{-82}:\\
              \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}{t_0}\\
              
              \mathbf{elif}\;B \leq 1.48 \cdot 10^{+94}:\\
              \;\;\;\;\frac{-\sqrt{2 \cdot \left(F \cdot \left(A - \mathsf{hypot}\left(A, B\right)\right)\right)}}{B}\\
              
              \mathbf{elif}\;B \leq 1.85 \cdot 10^{+236} \lor \neg \left(B \leq 1.15 \cdot 10^{+247}\right):\\
              \;\;\;\;\left(\frac{\sqrt{2}}{B} \cdot \sqrt{-F}\right) \cdot \left(-\sqrt{B}\right)\\
              
              \mathbf{else}:\\
              \;\;\;\;\frac{\sqrt{B \cdot \left(-F\right)} \cdot \left(-\sqrt{2}\right)}{B}\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 4 regimes
              2. if B < 3.8000000000000002e-82

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

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

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

                      \[\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(2 \cdot A\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                    4. metadata-eval15.4%

                      \[\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(2 \cdot A\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                    5. *-commutative15.4%

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

                      \[\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)}} \]
                    7. metadata-eval15.4%

                      \[\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)} \]
                  4. Applied egg-rr15.4%

                    \[\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 3.8000000000000002e-82 < B < 1.47999999999999995e94

                  1. Initial program 37.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. Simplified37.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 C around 0 37.4%

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

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

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

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

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

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

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

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

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

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

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

                    if 1.47999999999999995e94 < B < 1.85000000000000007e236 or 1.14999999999999995e247 < B

                    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 11.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-neg11.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      if 1.85000000000000007e236 < B < 1.14999999999999995e247

                      1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 3.8 \cdot 10^{-82}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right) \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}{B \cdot B + -4 \cdot \left(A \cdot C\right)}\\ \mathbf{elif}\;B \leq 1.48 \cdot 10^{+94}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(F \cdot \left(A - \mathsf{hypot}\left(A, B\right)\right)\right)}}{B}\\ \mathbf{elif}\;B \leq 1.85 \cdot 10^{+236} \lor \neg \left(B \leq 1.15 \cdot 10^{+247}\right):\\ \;\;\;\;\left(\frac{\sqrt{2}}{B} \cdot \sqrt{-F}\right) \cdot \left(-\sqrt{B}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{B \cdot \left(-F\right)} \cdot \left(-\sqrt{2}\right)}{B}\\ \end{array} \]

                      Alternative 4: 51.4% 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)\\ \mathbf{if}\;B \leq 8.2 \cdot 10^{-84}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 2.55 \cdot 10^{+94}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(F \cdot \left(A - \mathsf{hypot}\left(A, B\right)\right)\right)}}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(\sqrt{-F} \cdot \left(-\sqrt{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)))))
                         (if (<= B 8.2e-84)
                           (/ (- (sqrt (* 2.0 (* t_0 (* F (* 2.0 A)))))) t_0)
                           (if (<= B 2.55e+94)
                             (/ (- (sqrt (* 2.0 (* F (- A (hypot A B)))))) B)
                             (* (/ (sqrt 2.0) B) (* (sqrt (- F)) (- (sqrt 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 <= 8.2e-84) {
                      		tmp = -sqrt((2.0 * (t_0 * (F * (2.0 * A))))) / t_0;
                      	} else if (B <= 2.55e+94) {
                      		tmp = -sqrt((2.0 * (F * (A - hypot(A, B))))) / B;
                      	} else {
                      		tmp = (sqrt(2.0) / B) * (sqrt(-F) * -sqrt(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 <= 8.2e-84) {
                      		tmp = -Math.sqrt((2.0 * (t_0 * (F * (2.0 * A))))) / t_0;
                      	} else if (B <= 2.55e+94) {
                      		tmp = -Math.sqrt((2.0 * (F * (A - Math.hypot(A, B))))) / B;
                      	} else {
                      		tmp = (Math.sqrt(2.0) / B) * (Math.sqrt(-F) * -Math.sqrt(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 <= 8.2e-84:
                      		tmp = -math.sqrt((2.0 * (t_0 * (F * (2.0 * A))))) / t_0
                      	elif B <= 2.55e+94:
                      		tmp = -math.sqrt((2.0 * (F * (A - math.hypot(A, B))))) / B
                      	else:
                      		tmp = (math.sqrt(2.0) / B) * (math.sqrt(-F) * -math.sqrt(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 <= 8.2e-84)
                      		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(t_0 * Float64(F * Float64(2.0 * A)))))) / t_0);
                      	elseif (B <= 2.55e+94)
                      		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(F * Float64(A - hypot(A, B)))))) / B);
                      	else
                      		tmp = Float64(Float64(sqrt(2.0) / B) * Float64(sqrt(Float64(-F)) * Float64(-sqrt(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 <= 8.2e-84)
                      		tmp = -sqrt((2.0 * (t_0 * (F * (2.0 * A))))) / t_0;
                      	elseif (B <= 2.55e+94)
                      		tmp = -sqrt((2.0 * (F * (A - hypot(A, B))))) / B;
                      	else
                      		tmp = (sqrt(2.0) / B) * (sqrt(-F) * -sqrt(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, 8.2e-84], 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], If[LessEqual[B, 2.55e+94], N[((-N[Sqrt[N[(2.0 * N[(F * N[(A - N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / B), $MachinePrecision], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B), $MachinePrecision] * N[(N[Sqrt[(-F)], $MachinePrecision] * (-N[Sqrt[B], $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 8.2 \cdot 10^{-84}:\\
                      \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}{t_0}\\
                      
                      \mathbf{elif}\;B \leq 2.55 \cdot 10^{+94}:\\
                      \;\;\;\;\frac{-\sqrt{2 \cdot \left(F \cdot \left(A - \mathsf{hypot}\left(A, B\right)\right)\right)}}{B}\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(\sqrt{-F} \cdot \left(-\sqrt{B}\right)\right)\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 3 regimes
                      2. if B < 8.2000000000000001e-84

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

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

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

                              \[\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(2 \cdot A\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                            4. metadata-eval15.4%

                              \[\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(2 \cdot A\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                            5. *-commutative15.4%

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

                              \[\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)}} \]
                            7. metadata-eval15.4%

                              \[\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)} \]
                          4. Applied egg-rr15.4%

                            \[\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 8.2000000000000001e-84 < B < 2.5500000000000002e94

                          1. Initial program 37.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. Simplified37.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 C around 0 37.4%

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

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

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

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

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

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

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

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

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

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

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

                            if 2.5500000000000002e94 < B

                            1. Initial program 3.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. Simplified3.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 C around 0 10.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            Alternative 5: 45.6% accurate, 3.0× speedup?

                            \[\begin{array}{l} B = |B|\\ [A, C] = \mathsf{sort}([A, C])\\ \\ \begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;B \leq 2.8 \cdot 10^{-82}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(F \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 (<= B 2.8e-82)
                                 (/ (- (sqrt (* 2.0 (* t_0 (* F (* 2.0 A)))))) t_0)
                                 (/ (- (sqrt (* 2.0 (* F (- 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.8e-82) {
                            		tmp = -sqrt((2.0 * (t_0 * (F * (2.0 * A))))) / t_0;
                            	} else {
                            		tmp = -sqrt((2.0 * (F * (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.8e-82) {
                            		tmp = -Math.sqrt((2.0 * (t_0 * (F * (2.0 * A))))) / t_0;
                            	} else {
                            		tmp = -Math.sqrt((2.0 * (F * (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.8e-82:
                            		tmp = -math.sqrt((2.0 * (t_0 * (F * (2.0 * A))))) / t_0
                            	else:
                            		tmp = -math.sqrt((2.0 * (F * (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.8e-82)
                            		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(t_0 * Float64(F * Float64(2.0 * A)))))) / t_0);
                            	else
                            		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(F * 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.8e-82)
                            		tmp = -sqrt((2.0 * (t_0 * (F * (2.0 * A))))) / t_0;
                            	else
                            		tmp = -sqrt((2.0 * (F * (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[LessEqual[B, 2.8e-82], 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[((-N[Sqrt[N[(2.0 * N[(F * 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.8 \cdot 10^{-82}:\\
                            \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}{t_0}\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\frac{-\sqrt{2 \cdot \left(F \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.80000000000000024e-82

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

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

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

                                    \[\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(2 \cdot A\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                  4. metadata-eval15.4%

                                    \[\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(2 \cdot A\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                  5. *-commutative15.4%

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

                                    \[\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)}} \]
                                  7. metadata-eval15.4%

                                    \[\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)} \]
                                4. Applied egg-rr15.4%

                                  \[\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 2.80000000000000024e-82 < B

                                1. Initial program 20.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                Alternative 6: 41.0% 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 3.8 \cdot 10^{-82}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{-1}{\frac{B}{\sqrt{2 \cdot \left(B \cdot \left(-F\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)))))
                                   (if (<= B 3.8e-82)
                                     (/ (- (sqrt (* 2.0 (* t_0 (* F (* 2.0 A)))))) t_0)
                                     (/ -1.0 (/ B (sqrt (* 2.0 (* B (- F)))))))))
                                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 <= 3.8e-82) {
                                		tmp = -sqrt((2.0 * (t_0 * (F * (2.0 * A))))) / t_0;
                                	} else {
                                		tmp = -1.0 / (B / sqrt((2.0 * (B * -F))));
                                	}
                                	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 <= 3.8d-82) then
                                        tmp = -sqrt((2.0d0 * (t_0 * (f * (2.0d0 * a))))) / t_0
                                    else
                                        tmp = (-1.0d0) / (b / sqrt((2.0d0 * (b * -f))))
                                    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 <= 3.8e-82) {
                                		tmp = -Math.sqrt((2.0 * (t_0 * (F * (2.0 * A))))) / t_0;
                                	} else {
                                		tmp = -1.0 / (B / Math.sqrt((2.0 * (B * -F))));
                                	}
                                	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 <= 3.8e-82:
                                		tmp = -math.sqrt((2.0 * (t_0 * (F * (2.0 * A))))) / t_0
                                	else:
                                		tmp = -1.0 / (B / math.sqrt((2.0 * (B * -F))))
                                	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 <= 3.8e-82)
                                		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(t_0 * Float64(F * Float64(2.0 * A)))))) / t_0);
                                	else
                                		tmp = Float64(-1.0 / Float64(B / sqrt(Float64(2.0 * Float64(B * Float64(-F))))));
                                	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 <= 3.8e-82)
                                		tmp = -sqrt((2.0 * (t_0 * (F * (2.0 * A))))) / t_0;
                                	else
                                		tmp = -1.0 / (B / sqrt((2.0 * (B * -F))));
                                	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, 3.8e-82], 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[(-1.0 / N[(B / N[Sqrt[N[(2.0 * N[(B * (-F)), $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 3.8 \cdot 10^{-82}:\\
                                \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}{t_0}\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;\frac{-1}{\frac{B}{\sqrt{2 \cdot \left(B \cdot \left(-F\right)\right)}}}\\
                                
                                
                                \end{array}
                                \end{array}
                                
                                Derivation
                                1. Split input into 2 regimes
                                2. if B < 3.8000000000000002e-82

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

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

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

                                        \[\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(2 \cdot A\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                      4. metadata-eval15.4%

                                        \[\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(2 \cdot A\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                                      5. *-commutative15.4%

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

                                        \[\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)}} \]
                                      7. metadata-eval15.4%

                                        \[\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)} \]
                                    4. Applied egg-rr15.4%

                                      \[\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 3.8000000000000002e-82 < B

                                    1. Initial program 20.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                          \[\leadsto -\frac{1}{\frac{B}{\color{blue}{\sqrt{2 \cdot \left(\left(-F\right) \cdot B\right)}}}} \]
                                      11. Applied egg-rr39.5%

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

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

                                    Alternative 7: 37.5% accurate, 5.0× speedup?

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

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

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

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

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

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

                                        if 8.0000000000000003e-84 < B

                                        1. Initial program 20.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                              \[\leadsto -\frac{1}{\frac{B}{\color{blue}{\sqrt{2 \cdot \left(\left(-F\right) \cdot B\right)}}}} \]
                                          11. Applied egg-rr39.5%

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

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

                                        Alternative 8: 40.5% accurate, 5.0× speedup?

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

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

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

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

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

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

                                            if 3.8000000000000002e-82 < B

                                            1. Initial program 20.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                  \[\leadsto -\frac{1}{\frac{B}{\color{blue}{\sqrt{2 \cdot \left(\left(-F\right) \cdot B\right)}}}} \]
                                              11. Applied egg-rr39.5%

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

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

                                            Alternative 9: 34.6% accurate, 5.1× speedup?

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

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

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

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

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

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

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

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

                                                if 1.3e-82 < B

                                                1. Initial program 20.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                      \[\leadsto -\frac{1}{\frac{B}{\color{blue}{\sqrt{2 \cdot \left(\left(-F\right) \cdot B\right)}}}} \]
                                                  11. Applied egg-rr39.5%

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

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

                                                Alternative 10: 26.3% accurate, 5.8× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                  Alternative 11: 26.4% accurate, 5.9× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                        \[\leadsto -\frac{\sqrt{\color{blue}{\left(\left(-F\right) \cdot B\right) \cdot 2}}}{B} \]
                                                      2. distribute-lft-neg-out14.6%

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

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

                                                        \[\leadsto -\frac{\sqrt{\color{blue}{\left(\left(F \cdot B\right) \cdot -1\right)} \cdot 2}}{B} \]
                                                      5. associate-*l*14.6%

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

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

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

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

                                                    Alternative 12: 8.7% 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 18.2%

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

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

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

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

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

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

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

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

                                                      Reproduce

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