ABCF->ab-angle b

Percentage Accurate: 19.1% → 46.3%
Time: 21.0s
Alternatives: 12
Speedup: 5.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 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: 46.3% 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 20500000000:\\ \;\;\;\;\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(-\sqrt{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 20500000000.0)
     (/ (- (sqrt (* 2.0 (* t_0 (* F (* 2.0 A)))))) t_0)
     (/ (* (sqrt 2.0) (- (sqrt (* 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 <= 20500000000.0) {
		tmp = -sqrt((2.0 * (t_0 * (F * (2.0 * A))))) / t_0;
	} else {
		tmp = (sqrt(2.0) * -sqrt((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 <= 20500000000.0) {
		tmp = -Math.sqrt((2.0 * (t_0 * (F * (2.0 * A))))) / t_0;
	} else {
		tmp = (Math.sqrt(2.0) * -Math.sqrt((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 <= 20500000000.0:
		tmp = -math.sqrt((2.0 * (t_0 * (F * (2.0 * A))))) / t_0
	else:
		tmp = (math.sqrt(2.0) * -math.sqrt((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 <= 20500000000.0)
		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(t_0 * Float64(F * Float64(2.0 * A)))))) / t_0);
	else
		tmp = Float64(Float64(sqrt(2.0) * Float64(-sqrt(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 <= 20500000000.0)
		tmp = -sqrt((2.0 * (t_0 * (F * (2.0 * A))))) / t_0;
	else
		tmp = (sqrt(2.0) * -sqrt((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, 20500000000.0], 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[(N[Sqrt[2.0], $MachinePrecision] * (-N[Sqrt[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 20500000000:\\
\;\;\;\;\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(-\sqrt{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.05e10

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

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

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

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

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

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

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

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

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

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

        \[\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.05e10 < 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{\color{blue}{F \cdot \left(A - \sqrt{{B}^{2} + {A}^{2}}\right)}} \]
          3. +-commutative23.9%

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

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

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

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 20500000000:\\ \;\;\;\;\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(-\sqrt{F \cdot \left(A - \mathsf{hypot}\left(A, B\right)\right)}\right)}{B}\\ \end{array} \]

      Alternative 2: 46.3% 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 30500000000:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{F \cdot \left(A - \mathsf{hypot}\left(A, B\right)\right)} \cdot \frac{-\sqrt{2}}{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 30500000000.0)
           (/ (- (sqrt (* 2.0 (* t_0 (* F (* 2.0 A)))))) t_0)
           (* (sqrt (* F (- A (hypot A B)))) (/ (- (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 <= 30500000000.0) {
      		tmp = -sqrt((2.0 * (t_0 * (F * (2.0 * A))))) / t_0;
      	} else {
      		tmp = sqrt((F * (A - hypot(A, B)))) * (-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 <= 30500000000.0) {
      		tmp = -Math.sqrt((2.0 * (t_0 * (F * (2.0 * A))))) / t_0;
      	} else {
      		tmp = Math.sqrt((F * (A - Math.hypot(A, B)))) * (-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 <= 30500000000.0:
      		tmp = -math.sqrt((2.0 * (t_0 * (F * (2.0 * A))))) / t_0
      	else:
      		tmp = math.sqrt((F * (A - math.hypot(A, B)))) * (-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 <= 30500000000.0)
      		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(t_0 * Float64(F * Float64(2.0 * A)))))) / t_0);
      	else
      		tmp = Float64(sqrt(Float64(F * Float64(A - hypot(A, B)))) * Float64(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 <= 30500000000.0)
      		tmp = -sqrt((2.0 * (t_0 * (F * (2.0 * A))))) / t_0;
      	else
      		tmp = sqrt((F * (A - hypot(A, B)))) * (-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, 30500000000.0], 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[(F * N[(A - N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[((-N[Sqrt[2.0], $MachinePrecision]) / B), $MachinePrecision]), $MachinePrecision]]]
      
      \begin{array}{l}
      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 30500000000:\\
      \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}{t_0}\\
      
      \mathbf{else}:\\
      \;\;\;\;\sqrt{F \cdot \left(A - \mathsf{hypot}\left(A, B\right)\right)} \cdot \frac{-\sqrt{2}}{B}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if B < 3.05e10

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

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

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

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

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

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

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

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

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

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

            \[\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.05e10 < 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{\color{blue}{F \cdot \left(A - \sqrt{{B}^{2} + {A}^{2}}\right)}} \]
              3. +-commutative23.9%

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

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

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

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

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 30500000000:\\ \;\;\;\;\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}:\\ \;\;\;\;\sqrt{F \cdot \left(A - \mathsf{hypot}\left(A, B\right)\right)} \cdot \frac{-\sqrt{2}}{B}\\ \end{array} \]

          Alternative 3: 43.0% 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 3.5 \cdot 10^{+40}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{F \cdot \left(A - B\right)} \cdot \frac{-\sqrt{2}}{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.5e+40)
               (/ (- (sqrt (* 2.0 (* t_0 (* F (* 2.0 A)))))) t_0)
               (* (sqrt (* F (- A B))) (/ (- (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.5e+40) {
          		tmp = -sqrt((2.0 * (t_0 * (F * (2.0 * A))))) / t_0;
          	} else {
          		tmp = sqrt((F * (A - B))) * (-sqrt(2.0) / B);
          	}
          	return tmp;
          }
          
          NOTE: B should be positive before calling this function
          NOTE: A and C should be sorted in increasing order before calling this function.
          real(8) function code(a, b, c, f)
              real(8), intent (in) :: a
              real(8), intent (in) :: b
              real(8), intent (in) :: c
              real(8), intent (in) :: f
              real(8) :: t_0
              real(8) :: tmp
              t_0 = (b * b) + ((-4.0d0) * (a * c))
              if (b <= 3.5d+40) then
                  tmp = -sqrt((2.0d0 * (t_0 * (f * (2.0d0 * a))))) / t_0
              else
                  tmp = sqrt((f * (a - b))) * (-sqrt(2.0d0) / b)
              end if
              code = tmp
          end function
          
          B = Math.abs(B);
          assert A < C;
          public static double code(double A, double B, double C, double F) {
          	double t_0 = (B * B) + (-4.0 * (A * C));
          	double tmp;
          	if (B <= 3.5e+40) {
          		tmp = -Math.sqrt((2.0 * (t_0 * (F * (2.0 * A))))) / t_0;
          	} else {
          		tmp = Math.sqrt((F * (A - B))) * (-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.5e+40:
          		tmp = -math.sqrt((2.0 * (t_0 * (F * (2.0 * A))))) / t_0
          	else:
          		tmp = math.sqrt((F * (A - B))) * (-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.5e+40)
          		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(t_0 * Float64(F * Float64(2.0 * A)))))) / t_0);
          	else
          		tmp = Float64(sqrt(Float64(F * Float64(A - B))) * Float64(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.5e+40)
          		tmp = -sqrt((2.0 * (t_0 * (F * (2.0 * A))))) / t_0;
          	else
          		tmp = sqrt((F * (A - B))) * (-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.5e+40], 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[(F * N[(A - B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[((-N[Sqrt[2.0], $MachinePrecision]) / B), $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.5 \cdot 10^{+40}:\\
          \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}{t_0}\\
          
          \mathbf{else}:\\
          \;\;\;\;\sqrt{F \cdot \left(A - B\right)} \cdot \frac{-\sqrt{2}}{B}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if B < 3.4999999999999999e40

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

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

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

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

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

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

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

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

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

                \[\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.4999999999999999e40 < B

              1. Initial program 20.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 3.5 \cdot 10^{+40}:\\ \;\;\;\;\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}:\\ \;\;\;\;\sqrt{F \cdot \left(A - B\right)} \cdot \frac{-\sqrt{2}}{B}\\ \end{array} \]

              Alternative 4: 42.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 1.15 \cdot 10^{+41}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{F \cdot \left(-B\right)} \cdot \frac{-\sqrt{2}}{B}\\ \end{array} \end{array} \]
              NOTE: B should be positive before calling this function
              NOTE: A and C should be sorted in increasing order before calling this function.
              (FPCore (A B C F)
               :precision binary64
               (let* ((t_0 (+ (* B B) (* -4.0 (* A C)))))
                 (if (<= B 1.15e+41)
                   (/ (- (sqrt (* 2.0 (* t_0 (* F (* 2.0 A)))))) t_0)
                   (* (sqrt (* F (- B))) (/ (- (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 <= 1.15e+41) {
              		tmp = -sqrt((2.0 * (t_0 * (F * (2.0 * A))))) / t_0;
              	} else {
              		tmp = sqrt((F * -B)) * (-sqrt(2.0) / B);
              	}
              	return tmp;
              }
              
              NOTE: B should be positive before calling this function
              NOTE: A and C should be sorted in increasing order before calling this function.
              real(8) function code(a, b, c, f)
                  real(8), intent (in) :: a
                  real(8), intent (in) :: b
                  real(8), intent (in) :: c
                  real(8), intent (in) :: f
                  real(8) :: t_0
                  real(8) :: tmp
                  t_0 = (b * b) + ((-4.0d0) * (a * c))
                  if (b <= 1.15d+41) then
                      tmp = -sqrt((2.0d0 * (t_0 * (f * (2.0d0 * a))))) / t_0
                  else
                      tmp = sqrt((f * -b)) * (-sqrt(2.0d0) / b)
                  end if
                  code = tmp
              end function
              
              B = Math.abs(B);
              assert A < C;
              public static double code(double A, double B, double C, double F) {
              	double t_0 = (B * B) + (-4.0 * (A * C));
              	double tmp;
              	if (B <= 1.15e+41) {
              		tmp = -Math.sqrt((2.0 * (t_0 * (F * (2.0 * A))))) / t_0;
              	} else {
              		tmp = Math.sqrt((F * -B)) * (-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 <= 1.15e+41:
              		tmp = -math.sqrt((2.0 * (t_0 * (F * (2.0 * A))))) / t_0
              	else:
              		tmp = math.sqrt((F * -B)) * (-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 <= 1.15e+41)
              		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(t_0 * Float64(F * Float64(2.0 * A)))))) / t_0);
              	else
              		tmp = Float64(sqrt(Float64(F * Float64(-B))) * Float64(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 <= 1.15e+41)
              		tmp = -sqrt((2.0 * (t_0 * (F * (2.0 * A))))) / t_0;
              	else
              		tmp = sqrt((F * -B)) * (-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, 1.15e+41], 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[(F * (-B)), $MachinePrecision]], $MachinePrecision] * N[((-N[Sqrt[2.0], $MachinePrecision]) / B), $MachinePrecision]), $MachinePrecision]]]
              
              \begin{array}{l}
              B = |B|\\
              [A, C] = \mathsf{sort}([A, C])\\
              \\
              \begin{array}{l}
              t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\
              \mathbf{if}\;B \leq 1.15 \cdot 10^{+41}:\\
              \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}{t_0}\\
              
              \mathbf{else}:\\
              \;\;\;\;\sqrt{F \cdot \left(-B\right)} \cdot \frac{-\sqrt{2}}{B}\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if B < 1.1499999999999999e41

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

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

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

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

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

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

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

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

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

                    \[\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.1499999999999999e41 < B

                  1. Initial program 20.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 1.15 \cdot 10^{+41}:\\ \;\;\;\;\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}:\\ \;\;\;\;\sqrt{F \cdot \left(-B\right)} \cdot \frac{-\sqrt{2}}{B}\\ \end{array} \]

                  Alternative 5: 30.1% accurate, 4.5× speedup?

                  \[\begin{array}{l} B = |B|\\ [A, C] = \mathsf{sort}([A, C])\\ \\ \begin{array}{l} t_0 := B \cdot B - \left(A \cdot C\right) \cdot 4\\ t_1 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;B \leq 3.9 \cdot 10^{+43}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}{t_1}\\ \mathbf{elif}\;B \leq 3.9 \cdot 10^{+144}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(C + \left(-0.5 \cdot \frac{C \cdot C}{B} - B\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \left(\sqrt{A \cdot F} \cdot \frac{1}{B}\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) (* (* A C) 4.0))) (t_1 (+ (* B B) (* -4.0 (* A C)))))
                     (if (<= B 3.9e+43)
                       (/ (- (sqrt (* 2.0 (* t_1 (* F (* 2.0 A)))))) t_1)
                       (if (<= B 3.9e+144)
                         (-
                          (/
                           (sqrt (* 2.0 (* (* F t_0) (+ C (- (* -0.5 (/ (* C C) B)) B)))))
                           t_0))
                         (* -2.0 (* (sqrt (* A F)) (/ 1.0 B)))))))
                  B = abs(B);
                  assert(A < C);
                  double code(double A, double B, double C, double F) {
                  	double t_0 = (B * B) - ((A * C) * 4.0);
                  	double t_1 = (B * B) + (-4.0 * (A * C));
                  	double tmp;
                  	if (B <= 3.9e+43) {
                  		tmp = -sqrt((2.0 * (t_1 * (F * (2.0 * A))))) / t_1;
                  	} else if (B <= 3.9e+144) {
                  		tmp = -(sqrt((2.0 * ((F * t_0) * (C + ((-0.5 * ((C * C) / B)) - B))))) / t_0);
                  	} else {
                  		tmp = -2.0 * (sqrt((A * F)) * (1.0 / B));
                  	}
                  	return tmp;
                  }
                  
                  NOTE: B should be positive before calling this function
                  NOTE: A and C should be sorted in increasing order before calling this function.
                  real(8) function code(a, b, c, f)
                      real(8), intent (in) :: a
                      real(8), intent (in) :: b
                      real(8), intent (in) :: c
                      real(8), intent (in) :: f
                      real(8) :: t_0
                      real(8) :: t_1
                      real(8) :: tmp
                      t_0 = (b * b) - ((a * c) * 4.0d0)
                      t_1 = (b * b) + ((-4.0d0) * (a * c))
                      if (b <= 3.9d+43) then
                          tmp = -sqrt((2.0d0 * (t_1 * (f * (2.0d0 * a))))) / t_1
                      else if (b <= 3.9d+144) then
                          tmp = -(sqrt((2.0d0 * ((f * t_0) * (c + (((-0.5d0) * ((c * c) / b)) - b))))) / t_0)
                      else
                          tmp = (-2.0d0) * (sqrt((a * f)) * (1.0d0 / b))
                      end if
                      code = tmp
                  end function
                  
                  B = Math.abs(B);
                  assert A < C;
                  public static double code(double A, double B, double C, double F) {
                  	double t_0 = (B * B) - ((A * C) * 4.0);
                  	double t_1 = (B * B) + (-4.0 * (A * C));
                  	double tmp;
                  	if (B <= 3.9e+43) {
                  		tmp = -Math.sqrt((2.0 * (t_1 * (F * (2.0 * A))))) / t_1;
                  	} else if (B <= 3.9e+144) {
                  		tmp = -(Math.sqrt((2.0 * ((F * t_0) * (C + ((-0.5 * ((C * C) / B)) - B))))) / t_0);
                  	} else {
                  		tmp = -2.0 * (Math.sqrt((A * F)) * (1.0 / B));
                  	}
                  	return tmp;
                  }
                  
                  B = abs(B)
                  [A, C] = sort([A, C])
                  def code(A, B, C, F):
                  	t_0 = (B * B) - ((A * C) * 4.0)
                  	t_1 = (B * B) + (-4.0 * (A * C))
                  	tmp = 0
                  	if B <= 3.9e+43:
                  		tmp = -math.sqrt((2.0 * (t_1 * (F * (2.0 * A))))) / t_1
                  	elif B <= 3.9e+144:
                  		tmp = -(math.sqrt((2.0 * ((F * t_0) * (C + ((-0.5 * ((C * C) / B)) - B))))) / t_0)
                  	else:
                  		tmp = -2.0 * (math.sqrt((A * F)) * (1.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(Float64(A * C) * 4.0))
                  	t_1 = Float64(Float64(B * B) + Float64(-4.0 * Float64(A * C)))
                  	tmp = 0.0
                  	if (B <= 3.9e+43)
                  		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(t_1 * Float64(F * Float64(2.0 * A)))))) / t_1);
                  	elseif (B <= 3.9e+144)
                  		tmp = Float64(-Float64(sqrt(Float64(2.0 * Float64(Float64(F * t_0) * Float64(C + Float64(Float64(-0.5 * Float64(Float64(C * C) / B)) - B))))) / t_0));
                  	else
                  		tmp = Float64(-2.0 * Float64(sqrt(Float64(A * F)) * Float64(1.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) - ((A * C) * 4.0);
                  	t_1 = (B * B) + (-4.0 * (A * C));
                  	tmp = 0.0;
                  	if (B <= 3.9e+43)
                  		tmp = -sqrt((2.0 * (t_1 * (F * (2.0 * A))))) / t_1;
                  	elseif (B <= 3.9e+144)
                  		tmp = -(sqrt((2.0 * ((F * t_0) * (C + ((-0.5 * ((C * C) / B)) - B))))) / t_0);
                  	else
                  		tmp = -2.0 * (sqrt((A * F)) * (1.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[(N[(A * C), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(B * B), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, 3.9e+43], 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[B, 3.9e+144], (-N[(N[Sqrt[N[(2.0 * N[(N[(F * t$95$0), $MachinePrecision] * N[(C + N[(N[(-0.5 * N[(N[(C * C), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision] - B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision]), N[(-2.0 * N[(N[Sqrt[N[(A * F), $MachinePrecision]], $MachinePrecision] * N[(1.0 / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
                  
                  \begin{array}{l}
                  B = |B|\\
                  [A, C] = \mathsf{sort}([A, C])\\
                  \\
                  \begin{array}{l}
                  t_0 := B \cdot B - \left(A \cdot C\right) \cdot 4\\
                  t_1 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\
                  \mathbf{if}\;B \leq 3.9 \cdot 10^{+43}:\\
                  \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}{t_1}\\
                  
                  \mathbf{elif}\;B \leq 3.9 \cdot 10^{+144}:\\
                  \;\;\;\;-\frac{\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(C + \left(-0.5 \cdot \frac{C \cdot C}{B} - B\right)\right)\right)}}{t_0}\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;-2 \cdot \left(\sqrt{A \cdot F} \cdot \frac{1}{B}\right)\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 3 regimes
                  2. if B < 3.9000000000000001e43

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

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

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

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

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

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

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

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

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

                        \[\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.9000000000000001e43 < B < 3.90000000000000018e144

                      1. Initial program 53.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. Simplified53.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 0 53.8%

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

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

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

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

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

                          \[\leadsto \frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \color{blue}{\left(C - \mathsf{hypot}\left(C, B\right)\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                        5. Taylor expanded in C around 0 49.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(C + \left(-0.5 \cdot \frac{{C}^{2}}{B} + -1 \cdot B\right)\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                        6. Step-by-step derivation
                          1. mul-1-neg49.2%

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

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

                            \[\leadsto \frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(C + \left(-0.5 \cdot \frac{\color{blue}{C \cdot C}}{B} - B\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
                        7. Simplified49.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(C + \left(-0.5 \cdot \frac{C \cdot C}{B} - B\right)\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]

                        if 3.90000000000000018e144 < B

                        1. Initial program 0.1%

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

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

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

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

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

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

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

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

                          \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 3.9 \cdot 10^{+43}:\\ \;\;\;\;\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 3.9 \cdot 10^{+144}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(\left(F \cdot \left(B \cdot B - \left(A \cdot C\right) \cdot 4\right)\right) \cdot \left(C + \left(-0.5 \cdot \frac{C \cdot C}{B} - B\right)\right)\right)}}{B \cdot B - \left(A \cdot C\right) \cdot 4}\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \left(\sqrt{A \cdot F} \cdot \frac{1}{B}\right)\\ \end{array} \]

                        Alternative 6: 30.1% accurate, 4.7× speedup?

                        \[\begin{array}{l} B = |B|\\ [A, C] = \mathsf{sort}([A, C])\\ \\ \begin{array}{l} t_0 := B \cdot B - \left(A \cdot C\right) \cdot 4\\ t_1 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;B \leq 9.5 \cdot 10^{+42}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}{t_1}\\ \mathbf{elif}\;B \leq 1.25 \cdot 10^{+146}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(\left(A + C\right) - B\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \left(\sqrt{A \cdot F} \cdot \frac{1}{B}\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) (* (* A C) 4.0))) (t_1 (+ (* B B) (* -4.0 (* A C)))))
                           (if (<= B 9.5e+42)
                             (/ (- (sqrt (* 2.0 (* t_1 (* F (* 2.0 A)))))) t_1)
                             (if (<= B 1.25e+146)
                               (/ (- (sqrt (* 2.0 (* (* F t_0) (- (+ A C) B))))) t_0)
                               (* -2.0 (* (sqrt (* A F)) (/ 1.0 B)))))))
                        B = abs(B);
                        assert(A < C);
                        double code(double A, double B, double C, double F) {
                        	double t_0 = (B * B) - ((A * C) * 4.0);
                        	double t_1 = (B * B) + (-4.0 * (A * C));
                        	double tmp;
                        	if (B <= 9.5e+42) {
                        		tmp = -sqrt((2.0 * (t_1 * (F * (2.0 * A))))) / t_1;
                        	} else if (B <= 1.25e+146) {
                        		tmp = -sqrt((2.0 * ((F * t_0) * ((A + C) - B)))) / t_0;
                        	} else {
                        		tmp = -2.0 * (sqrt((A * F)) * (1.0 / B));
                        	}
                        	return tmp;
                        }
                        
                        NOTE: B should be positive before calling this function
                        NOTE: A and C should be sorted in increasing order before calling this function.
                        real(8) function code(a, b, c, f)
                            real(8), intent (in) :: a
                            real(8), intent (in) :: b
                            real(8), intent (in) :: c
                            real(8), intent (in) :: f
                            real(8) :: t_0
                            real(8) :: t_1
                            real(8) :: tmp
                            t_0 = (b * b) - ((a * c) * 4.0d0)
                            t_1 = (b * b) + ((-4.0d0) * (a * c))
                            if (b <= 9.5d+42) then
                                tmp = -sqrt((2.0d0 * (t_1 * (f * (2.0d0 * a))))) / t_1
                            else if (b <= 1.25d+146) then
                                tmp = -sqrt((2.0d0 * ((f * t_0) * ((a + c) - b)))) / t_0
                            else
                                tmp = (-2.0d0) * (sqrt((a * f)) * (1.0d0 / b))
                            end if
                            code = tmp
                        end function
                        
                        B = Math.abs(B);
                        assert A < C;
                        public static double code(double A, double B, double C, double F) {
                        	double t_0 = (B * B) - ((A * C) * 4.0);
                        	double t_1 = (B * B) + (-4.0 * (A * C));
                        	double tmp;
                        	if (B <= 9.5e+42) {
                        		tmp = -Math.sqrt((2.0 * (t_1 * (F * (2.0 * A))))) / t_1;
                        	} else if (B <= 1.25e+146) {
                        		tmp = -Math.sqrt((2.0 * ((F * t_0) * ((A + C) - B)))) / t_0;
                        	} else {
                        		tmp = -2.0 * (Math.sqrt((A * F)) * (1.0 / B));
                        	}
                        	return tmp;
                        }
                        
                        B = abs(B)
                        [A, C] = sort([A, C])
                        def code(A, B, C, F):
                        	t_0 = (B * B) - ((A * C) * 4.0)
                        	t_1 = (B * B) + (-4.0 * (A * C))
                        	tmp = 0
                        	if B <= 9.5e+42:
                        		tmp = -math.sqrt((2.0 * (t_1 * (F * (2.0 * A))))) / t_1
                        	elif B <= 1.25e+146:
                        		tmp = -math.sqrt((2.0 * ((F * t_0) * ((A + C) - B)))) / t_0
                        	else:
                        		tmp = -2.0 * (math.sqrt((A * F)) * (1.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(Float64(A * C) * 4.0))
                        	t_1 = Float64(Float64(B * B) + Float64(-4.0 * Float64(A * C)))
                        	tmp = 0.0
                        	if (B <= 9.5e+42)
                        		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(t_1 * Float64(F * Float64(2.0 * A)))))) / t_1);
                        	elseif (B <= 1.25e+146)
                        		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(Float64(F * t_0) * Float64(Float64(A + C) - B))))) / t_0);
                        	else
                        		tmp = Float64(-2.0 * Float64(sqrt(Float64(A * F)) * Float64(1.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) - ((A * C) * 4.0);
                        	t_1 = (B * B) + (-4.0 * (A * C));
                        	tmp = 0.0;
                        	if (B <= 9.5e+42)
                        		tmp = -sqrt((2.0 * (t_1 * (F * (2.0 * A))))) / t_1;
                        	elseif (B <= 1.25e+146)
                        		tmp = -sqrt((2.0 * ((F * t_0) * ((A + C) - B)))) / t_0;
                        	else
                        		tmp = -2.0 * (sqrt((A * F)) * (1.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[(N[(A * C), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(B * B), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, 9.5e+42], 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[B, 1.25e+146], N[((-N[Sqrt[N[(2.0 * N[(N[(F * t$95$0), $MachinePrecision] * N[(N[(A + C), $MachinePrecision] - B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], N[(-2.0 * N[(N[Sqrt[N[(A * F), $MachinePrecision]], $MachinePrecision] * N[(1.0 / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
                        
                        \begin{array}{l}
                        B = |B|\\
                        [A, C] = \mathsf{sort}([A, C])\\
                        \\
                        \begin{array}{l}
                        t_0 := B \cdot B - \left(A \cdot C\right) \cdot 4\\
                        t_1 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\
                        \mathbf{if}\;B \leq 9.5 \cdot 10^{+42}:\\
                        \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}{t_1}\\
                        
                        \mathbf{elif}\;B \leq 1.25 \cdot 10^{+146}:\\
                        \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(\left(A + C\right) - B\right)\right)}}{t_0}\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;-2 \cdot \left(\sqrt{A \cdot F} \cdot \frac{1}{B}\right)\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 3 regimes
                        2. if B < 9.50000000000000019e42

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

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

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

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

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

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

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

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

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

                              \[\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 9.50000000000000019e42 < B < 1.25e146

                            1. Initial program 53.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. Simplified53.8%

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

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

                              if 1.25e146 < B

                              1. Initial program 0.1%

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

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

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

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

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

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

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

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

                                \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 9.5 \cdot 10^{+42}:\\ \;\;\;\;\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.25 \cdot 10^{+146}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot \left(B \cdot B - \left(A \cdot C\right) \cdot 4\right)\right) \cdot \left(\left(A + C\right) - B\right)\right)}}{B \cdot B - \left(A \cdot C\right) \cdot 4}\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \left(\sqrt{A \cdot F} \cdot \frac{1}{B}\right)\\ \end{array} \]

                              Alternative 7: 29.9% accurate, 4.8× speedup?

                              \[\begin{array}{l} B = |B|\\ [A, C] = \mathsf{sort}([A, C])\\ \\ \begin{array}{l} t_0 := B \cdot B - \left(A \cdot C\right) \cdot 4\\ t_1 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;B \leq 9.5 \cdot 10^{+42}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}{t_1}\\ \mathbf{elif}\;B \leq 1.1 \cdot 10^{+146}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(C - B\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \left(\sqrt{A \cdot F} \cdot \frac{1}{B}\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) (* (* A C) 4.0))) (t_1 (+ (* B B) (* -4.0 (* A C)))))
                                 (if (<= B 9.5e+42)
                                   (/ (- (sqrt (* 2.0 (* t_1 (* F (* 2.0 A)))))) t_1)
                                   (if (<= B 1.1e+146)
                                     (- (/ (sqrt (* 2.0 (* (* F t_0) (- C B)))) t_0))
                                     (* -2.0 (* (sqrt (* A F)) (/ 1.0 B)))))))
                              B = abs(B);
                              assert(A < C);
                              double code(double A, double B, double C, double F) {
                              	double t_0 = (B * B) - ((A * C) * 4.0);
                              	double t_1 = (B * B) + (-4.0 * (A * C));
                              	double tmp;
                              	if (B <= 9.5e+42) {
                              		tmp = -sqrt((2.0 * (t_1 * (F * (2.0 * A))))) / t_1;
                              	} else if (B <= 1.1e+146) {
                              		tmp = -(sqrt((2.0 * ((F * t_0) * (C - B)))) / t_0);
                              	} else {
                              		tmp = -2.0 * (sqrt((A * F)) * (1.0 / B));
                              	}
                              	return tmp;
                              }
                              
                              NOTE: B should be positive before calling this function
                              NOTE: A and C should be sorted in increasing order before calling this function.
                              real(8) function code(a, b, c, f)
                                  real(8), intent (in) :: a
                                  real(8), intent (in) :: b
                                  real(8), intent (in) :: c
                                  real(8), intent (in) :: f
                                  real(8) :: t_0
                                  real(8) :: t_1
                                  real(8) :: tmp
                                  t_0 = (b * b) - ((a * c) * 4.0d0)
                                  t_1 = (b * b) + ((-4.0d0) * (a * c))
                                  if (b <= 9.5d+42) then
                                      tmp = -sqrt((2.0d0 * (t_1 * (f * (2.0d0 * a))))) / t_1
                                  else if (b <= 1.1d+146) then
                                      tmp = -(sqrt((2.0d0 * ((f * t_0) * (c - b)))) / t_0)
                                  else
                                      tmp = (-2.0d0) * (sqrt((a * f)) * (1.0d0 / b))
                                  end if
                                  code = tmp
                              end function
                              
                              B = Math.abs(B);
                              assert A < C;
                              public static double code(double A, double B, double C, double F) {
                              	double t_0 = (B * B) - ((A * C) * 4.0);
                              	double t_1 = (B * B) + (-4.0 * (A * C));
                              	double tmp;
                              	if (B <= 9.5e+42) {
                              		tmp = -Math.sqrt((2.0 * (t_1 * (F * (2.0 * A))))) / t_1;
                              	} else if (B <= 1.1e+146) {
                              		tmp = -(Math.sqrt((2.0 * ((F * t_0) * (C - B)))) / t_0);
                              	} else {
                              		tmp = -2.0 * (Math.sqrt((A * F)) * (1.0 / B));
                              	}
                              	return tmp;
                              }
                              
                              B = abs(B)
                              [A, C] = sort([A, C])
                              def code(A, B, C, F):
                              	t_0 = (B * B) - ((A * C) * 4.0)
                              	t_1 = (B * B) + (-4.0 * (A * C))
                              	tmp = 0
                              	if B <= 9.5e+42:
                              		tmp = -math.sqrt((2.0 * (t_1 * (F * (2.0 * A))))) / t_1
                              	elif B <= 1.1e+146:
                              		tmp = -(math.sqrt((2.0 * ((F * t_0) * (C - B)))) / t_0)
                              	else:
                              		tmp = -2.0 * (math.sqrt((A * F)) * (1.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(Float64(A * C) * 4.0))
                              	t_1 = Float64(Float64(B * B) + Float64(-4.0 * Float64(A * C)))
                              	tmp = 0.0
                              	if (B <= 9.5e+42)
                              		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(t_1 * Float64(F * Float64(2.0 * A)))))) / t_1);
                              	elseif (B <= 1.1e+146)
                              		tmp = Float64(-Float64(sqrt(Float64(2.0 * Float64(Float64(F * t_0) * Float64(C - B)))) / t_0));
                              	else
                              		tmp = Float64(-2.0 * Float64(sqrt(Float64(A * F)) * Float64(1.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) - ((A * C) * 4.0);
                              	t_1 = (B * B) + (-4.0 * (A * C));
                              	tmp = 0.0;
                              	if (B <= 9.5e+42)
                              		tmp = -sqrt((2.0 * (t_1 * (F * (2.0 * A))))) / t_1;
                              	elseif (B <= 1.1e+146)
                              		tmp = -(sqrt((2.0 * ((F * t_0) * (C - B)))) / t_0);
                              	else
                              		tmp = -2.0 * (sqrt((A * F)) * (1.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[(N[(A * C), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(B * B), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, 9.5e+42], 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[B, 1.1e+146], (-N[(N[Sqrt[N[(2.0 * N[(N[(F * t$95$0), $MachinePrecision] * N[(C - B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision]), N[(-2.0 * N[(N[Sqrt[N[(A * F), $MachinePrecision]], $MachinePrecision] * N[(1.0 / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
                              
                              \begin{array}{l}
                              B = |B|\\
                              [A, C] = \mathsf{sort}([A, C])\\
                              \\
                              \begin{array}{l}
                              t_0 := B \cdot B - \left(A \cdot C\right) \cdot 4\\
                              t_1 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\
                              \mathbf{if}\;B \leq 9.5 \cdot 10^{+42}:\\
                              \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}{t_1}\\
                              
                              \mathbf{elif}\;B \leq 1.1 \cdot 10^{+146}:\\
                              \;\;\;\;-\frac{\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(C - B\right)\right)}}{t_0}\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;-2 \cdot \left(\sqrt{A \cdot F} \cdot \frac{1}{B}\right)\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 3 regimes
                              2. if B < 9.50000000000000019e42

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

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

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

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

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

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

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

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

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

                                    \[\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 9.50000000000000019e42 < B < 1.0999999999999999e146

                                  1. Initial program 53.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. Simplified53.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 0 53.8%

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

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

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

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

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

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

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

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

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

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

                                    if 1.0999999999999999e146 < B

                                    1. Initial program 0.1%

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

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

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

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

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

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

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

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

                                      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 9.5 \cdot 10^{+42}:\\ \;\;\;\;\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.1 \cdot 10^{+146}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(\left(F \cdot \left(B \cdot B - \left(A \cdot C\right) \cdot 4\right)\right) \cdot \left(C - B\right)\right)}}{B \cdot B - \left(A \cdot C\right) \cdot 4}\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \left(\sqrt{A \cdot F} \cdot \frac{1}{B}\right)\\ \end{array} \]

                                    Alternative 8: 28.6% 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.2 \cdot 10^{+43}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \left(\sqrt{A \cdot F} \cdot \frac{1}{B}\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.2e+43)
                                         (/ (- (sqrt (* 2.0 (* t_0 (* F (* 2.0 A)))))) t_0)
                                         (* -2.0 (* (sqrt (* A F)) (/ 1.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.2e+43) {
                                    		tmp = -sqrt((2.0 * (t_0 * (F * (2.0 * A))))) / t_0;
                                    	} else {
                                    		tmp = -2.0 * (sqrt((A * F)) * (1.0 / B));
                                    	}
                                    	return tmp;
                                    }
                                    
                                    NOTE: B should be positive before calling this function
                                    NOTE: A and C should be sorted in increasing order before calling this function.
                                    real(8) function code(a, b, c, f)
                                        real(8), intent (in) :: a
                                        real(8), intent (in) :: b
                                        real(8), intent (in) :: c
                                        real(8), intent (in) :: f
                                        real(8) :: t_0
                                        real(8) :: tmp
                                        t_0 = (b * b) + ((-4.0d0) * (a * c))
                                        if (b <= 3.2d+43) then
                                            tmp = -sqrt((2.0d0 * (t_0 * (f * (2.0d0 * a))))) / t_0
                                        else
                                            tmp = (-2.0d0) * (sqrt((a * f)) * (1.0d0 / b))
                                        end if
                                        code = tmp
                                    end function
                                    
                                    B = Math.abs(B);
                                    assert A < C;
                                    public static double code(double A, double B, double C, double F) {
                                    	double t_0 = (B * B) + (-4.0 * (A * C));
                                    	double tmp;
                                    	if (B <= 3.2e+43) {
                                    		tmp = -Math.sqrt((2.0 * (t_0 * (F * (2.0 * A))))) / t_0;
                                    	} else {
                                    		tmp = -2.0 * (Math.sqrt((A * F)) * (1.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.2e+43:
                                    		tmp = -math.sqrt((2.0 * (t_0 * (F * (2.0 * A))))) / t_0
                                    	else:
                                    		tmp = -2.0 * (math.sqrt((A * F)) * (1.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.2e+43)
                                    		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(t_0 * Float64(F * Float64(2.0 * A)))))) / t_0);
                                    	else
                                    		tmp = Float64(-2.0 * Float64(sqrt(Float64(A * F)) * Float64(1.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.2e+43)
                                    		tmp = -sqrt((2.0 * (t_0 * (F * (2.0 * A))))) / t_0;
                                    	else
                                    		tmp = -2.0 * (sqrt((A * F)) * (1.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.2e+43], N[((-N[Sqrt[N[(2.0 * N[(t$95$0 * N[(F * N[(2.0 * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], N[(-2.0 * N[(N[Sqrt[N[(A * F), $MachinePrecision]], $MachinePrecision] * N[(1.0 / 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.2 \cdot 10^{+43}:\\
                                    \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}{t_0}\\
                                    
                                    \mathbf{else}:\\
                                    \;\;\;\;-2 \cdot \left(\sqrt{A \cdot F} \cdot \frac{1}{B}\right)\\
                                    
                                    
                                    \end{array}
                                    \end{array}
                                    
                                    Derivation
                                    1. Split input into 2 regimes
                                    2. if B < 3.20000000000000014e43

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

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

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

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

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

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

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

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

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

                                          \[\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.20000000000000014e43 < B

                                        1. Initial program 20.1%

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

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

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

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

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

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

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

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

                                          \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 3.2 \cdot 10^{+43}:\\ \;\;\;\;\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}:\\ \;\;\;\;-2 \cdot \left(\sqrt{A \cdot F} \cdot \frac{1}{B}\right)\\ \end{array} \]

                                        Alternative 9: 22.7% accurate, 5.0× speedup?

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

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

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

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

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

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

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

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

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

                                            if 1.1e58 < B

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

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

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

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

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

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

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

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

                                              \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 1.1 \cdot 10^{+58}:\\ \;\;\;\;\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}:\\ \;\;\;\;-2 \cdot \left(\sqrt{A \cdot F} \cdot \frac{1}{B}\right)\\ \end{array} \]

                                            Alternative 10: 18.9% accurate, 5.1× speedup?

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

                                              1. Initial program 0.9%

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

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

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

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

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

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

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

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

                                                if -3.29999999999999994e153 < A

                                                1. Initial program 20.1%

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

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

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

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

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

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

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

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

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

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

                                                Alternative 11: 8.9% accurate, 5.8× speedup?

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

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

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

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

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

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

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

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

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

                                                  Alternative 12: 8.9% 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.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. Simplified18.0%

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

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

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

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

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

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

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

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

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

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

                                                    Reproduce

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