ABCF->ab-angle b

Percentage Accurate: 18.5% → 38.5%
Time: 27.6s
Alternatives: 15
Speedup: 2.9×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 15 alternatives:

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

Initial Program: 18.5% 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: 38.5% accurate, 1.9× speedup?

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

\mathbf{elif}\;B \leq 1.02 \cdot 10^{+40}:\\
\;\;\;\;\frac{-\sqrt{\left(2 \cdot \left(F \cdot t_1\right)\right) \cdot \left(A + A\right)}}{t_1}\\

\mathbf{else}:\\
\;\;\;\;{t_0}^{0.5} \cdot \frac{-\sqrt{2}}{B}\\


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

    1. Initial program 20.0%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{1 \cdot \frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(A - \mathsf{hypot}\left(B, A\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
    7. Step-by-step derivation
      1. *-lft-identity18.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 - \mathsf{hypot}\left(B, A\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
      2. associate-*r*18.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.70000000000000008e-57 < B < 1.02e40

    1. Initial program 21.0%

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

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

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

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

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

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

    if 1.02e40 < B

    1. Initial program 11.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. Taylor expanded in C around 0 20.0%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 38.5% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 20.0%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{1 \cdot \frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(A - \mathsf{hypot}\left(B, A\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
    7. Step-by-step derivation
      1. *-lft-identity18.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 - \mathsf{hypot}\left(B, A\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
      2. associate-*r*18.4%

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

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

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

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

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

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

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

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

    if -1.29999999999999998e-56 < B < 3.19999999999999993e39

    1. Initial program 21.0%

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

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

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

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

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

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

    if 3.19999999999999993e39 < B

    1. Initial program 11.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. Taylor expanded in C around 0 20.0%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 34.1% accurate, 2.0× speedup?

\[\begin{array}{l} [A, C] = \mathsf{sort}([A, C])\\ \\ \begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ t_1 := A - \mathsf{hypot}\left(B, A\right)\\ t_2 := \frac{-\sqrt{t_1 \cdot \left(2 \cdot \left(F \cdot t_0\right)\right)}}{t_0}\\ \mathbf{if}\;B \leq -3.7 \cdot 10^{-203}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;B \leq 1.8 \cdot 10^{-237}:\\ \;\;\;\;\frac{-\sqrt{-16 \cdot \left(\left(A \cdot A\right) \cdot \left(C \cdot F\right)\right)}}{{B}^{2} - C \cdot \left(A \cdot 4\right)}\\ \mathbf{elif}\;B \leq 1.35 \cdot 10^{+41}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;{\left(F \cdot t_1\right)}^{0.5} \cdot \frac{-\sqrt{2}}{B}\\ \end{array} \end{array} \]
NOTE: A and C should be sorted in increasing order before calling this function.
(FPCore (A B C F)
 :precision binary64
 (let* ((t_0 (+ (* B B) (* -4.0 (* A C))))
        (t_1 (- A (hypot B A)))
        (t_2 (/ (- (sqrt (* t_1 (* 2.0 (* F t_0))))) t_0)))
   (if (<= B -3.7e-203)
     t_2
     (if (<= B 1.8e-237)
       (/
        (- (sqrt (* -16.0 (* (* A A) (* C F)))))
        (- (pow B 2.0) (* C (* A 4.0))))
       (if (<= B 1.35e+41)
         t_2
         (* (pow (* F t_1) 0.5) (/ (- (sqrt 2.0)) B)))))))
assert(A < C);
double code(double A, double B, double C, double F) {
	double t_0 = (B * B) + (-4.0 * (A * C));
	double t_1 = A - hypot(B, A);
	double t_2 = -sqrt((t_1 * (2.0 * (F * t_0)))) / t_0;
	double tmp;
	if (B <= -3.7e-203) {
		tmp = t_2;
	} else if (B <= 1.8e-237) {
		tmp = -sqrt((-16.0 * ((A * A) * (C * F)))) / (pow(B, 2.0) - (C * (A * 4.0)));
	} else if (B <= 1.35e+41) {
		tmp = t_2;
	} else {
		tmp = pow((F * t_1), 0.5) * (-sqrt(2.0) / B);
	}
	return tmp;
}
assert A < C;
public static double code(double A, double B, double C, double F) {
	double t_0 = (B * B) + (-4.0 * (A * C));
	double t_1 = A - Math.hypot(B, A);
	double t_2 = -Math.sqrt((t_1 * (2.0 * (F * t_0)))) / t_0;
	double tmp;
	if (B <= -3.7e-203) {
		tmp = t_2;
	} else if (B <= 1.8e-237) {
		tmp = -Math.sqrt((-16.0 * ((A * A) * (C * F)))) / (Math.pow(B, 2.0) - (C * (A * 4.0)));
	} else if (B <= 1.35e+41) {
		tmp = t_2;
	} else {
		tmp = Math.pow((F * t_1), 0.5) * (-Math.sqrt(2.0) / B);
	}
	return tmp;
}
[A, C] = sort([A, C])
def code(A, B, C, F):
	t_0 = (B * B) + (-4.0 * (A * C))
	t_1 = A - math.hypot(B, A)
	t_2 = -math.sqrt((t_1 * (2.0 * (F * t_0)))) / t_0
	tmp = 0
	if B <= -3.7e-203:
		tmp = t_2
	elif B <= 1.8e-237:
		tmp = -math.sqrt((-16.0 * ((A * A) * (C * F)))) / (math.pow(B, 2.0) - (C * (A * 4.0)))
	elif B <= 1.35e+41:
		tmp = t_2
	else:
		tmp = math.pow((F * t_1), 0.5) * (-math.sqrt(2.0) / B)
	return tmp
A, C = sort([A, C])
function code(A, B, C, F)
	t_0 = Float64(Float64(B * B) + Float64(-4.0 * Float64(A * C)))
	t_1 = Float64(A - hypot(B, A))
	t_2 = Float64(Float64(-sqrt(Float64(t_1 * Float64(2.0 * Float64(F * t_0))))) / t_0)
	tmp = 0.0
	if (B <= -3.7e-203)
		tmp = t_2;
	elseif (B <= 1.8e-237)
		tmp = Float64(Float64(-sqrt(Float64(-16.0 * Float64(Float64(A * A) * Float64(C * F))))) / Float64((B ^ 2.0) - Float64(C * Float64(A * 4.0))));
	elseif (B <= 1.35e+41)
		tmp = t_2;
	else
		tmp = Float64((Float64(F * t_1) ^ 0.5) * Float64(Float64(-sqrt(2.0)) / B));
	end
	return tmp
end
A, C = num2cell(sort([A, C])){:}
function tmp_2 = code(A, B, C, F)
	t_0 = (B * B) + (-4.0 * (A * C));
	t_1 = A - hypot(B, A);
	t_2 = -sqrt((t_1 * (2.0 * (F * t_0)))) / t_0;
	tmp = 0.0;
	if (B <= -3.7e-203)
		tmp = t_2;
	elseif (B <= 1.8e-237)
		tmp = -sqrt((-16.0 * ((A * A) * (C * F)))) / ((B ^ 2.0) - (C * (A * 4.0)));
	elseif (B <= 1.35e+41)
		tmp = t_2;
	else
		tmp = ((F * t_1) ^ 0.5) * (-sqrt(2.0) / B);
	end
	tmp_2 = tmp;
end
NOTE: A and C should be sorted in increasing order before calling this function.
code[A_, B_, C_, F_] := Block[{t$95$0 = N[(N[(B * B), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(A - N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[((-N[Sqrt[N[(t$95$1 * N[(2.0 * N[(F * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision]}, If[LessEqual[B, -3.7e-203], t$95$2, If[LessEqual[B, 1.8e-237], N[((-N[Sqrt[N[(-16.0 * N[(N[(A * A), $MachinePrecision] * N[(C * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / N[(N[Power[B, 2.0], $MachinePrecision] - N[(C * N[(A * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.35e+41], t$95$2, N[(N[Power[N[(F * t$95$1), $MachinePrecision], 0.5], $MachinePrecision] * N[((-N[Sqrt[2.0], $MachinePrecision]) / B), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[A, C] = \mathsf{sort}([A, C])\\
\\
\begin{array}{l}
t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\
t_1 := A - \mathsf{hypot}\left(B, A\right)\\
t_2 := \frac{-\sqrt{t_1 \cdot \left(2 \cdot \left(F \cdot t_0\right)\right)}}{t_0}\\
\mathbf{if}\;B \leq -3.7 \cdot 10^{-203}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;B \leq 1.8 \cdot 10^{-237}:\\
\;\;\;\;\frac{-\sqrt{-16 \cdot \left(\left(A \cdot A\right) \cdot \left(C \cdot F\right)\right)}}{{B}^{2} - C \cdot \left(A \cdot 4\right)}\\

\mathbf{elif}\;B \leq 1.35 \cdot 10^{+41}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if B < -3.70000000000000002e-203 or 1.79999999999999998e-237 < B < 1.35e41

    1. Initial program 22.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. Taylor expanded in C around 0 18.3%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{1 \cdot \frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(A - \mathsf{hypot}\left(B, A\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
    7. Step-by-step derivation
      1. *-lft-identity21.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 - \mathsf{hypot}\left(B, A\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
      2. associate-*r*21.3%

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

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

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

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

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

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

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

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

    if -3.70000000000000002e-203 < B < 1.79999999999999998e-237

    1. Initial program 12.5%

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

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

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

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

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

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

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

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

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

    if 1.35e41 < B

    1. Initial program 11.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. Taylor expanded in C around 0 20.0%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -3.7 \cdot 10^{-203}:\\ \;\;\;\;\frac{-\sqrt{\left(A - \mathsf{hypot}\left(B, A\right)\right) \cdot \left(2 \cdot \left(F \cdot \left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right)\right)\right)}}{B \cdot B + -4 \cdot \left(A \cdot C\right)}\\ \mathbf{elif}\;B \leq 1.8 \cdot 10^{-237}:\\ \;\;\;\;\frac{-\sqrt{-16 \cdot \left(\left(A \cdot A\right) \cdot \left(C \cdot F\right)\right)}}{{B}^{2} - C \cdot \left(A \cdot 4\right)}\\ \mathbf{elif}\;B \leq 1.35 \cdot 10^{+41}:\\ \;\;\;\;\frac{-\sqrt{\left(A - \mathsf{hypot}\left(B, A\right)\right) \cdot \left(2 \cdot \left(F \cdot \left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right)\right)\right)}}{B \cdot B + -4 \cdot \left(A \cdot C\right)}\\ \mathbf{else}:\\ \;\;\;\;{\left(F \cdot \left(A - \mathsf{hypot}\left(B, A\right)\right)\right)}^{0.5} \cdot \frac{-\sqrt{2}}{B}\\ \end{array} \]

Alternative 4: 34.2% accurate, 2.0× speedup?

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

\mathbf{elif}\;B \leq 3.8 \cdot 10^{-242}:\\
\;\;\;\;\frac{-\sqrt{-16 \cdot \left(\left(A \cdot A\right) \cdot \left(C \cdot F\right)\right)}}{{B}^{2} - C \cdot \left(A \cdot 4\right)}\\

\mathbf{elif}\;B \leq 5.5 \cdot 10^{+40}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if B < -4.7999999999999997e-203 or 3.8000000000000002e-242 < B < 5.49999999999999974e40

    1. Initial program 22.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. Taylor expanded in C around 0 18.3%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{1 \cdot \frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(A - \mathsf{hypot}\left(B, A\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
    7. Step-by-step derivation
      1. *-lft-identity21.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 - \mathsf{hypot}\left(B, A\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
      2. associate-*r*21.3%

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

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

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

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

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

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

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

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

    if -4.7999999999999997e-203 < B < 3.8000000000000002e-242

    1. Initial program 12.5%

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

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

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

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

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

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

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

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

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

    if 5.49999999999999974e40 < B

    1. Initial program 11.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. Taylor expanded in C around 0 20.0%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -4.8 \cdot 10^{-203}:\\ \;\;\;\;\frac{-\sqrt{\left(A - \mathsf{hypot}\left(B, A\right)\right) \cdot \left(2 \cdot \left(F \cdot \left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right)\right)\right)}}{B \cdot B + -4 \cdot \left(A \cdot C\right)}\\ \mathbf{elif}\;B \leq 3.8 \cdot 10^{-242}:\\ \;\;\;\;\frac{-\sqrt{-16 \cdot \left(\left(A \cdot A\right) \cdot \left(C \cdot F\right)\right)}}{{B}^{2} - C \cdot \left(A \cdot 4\right)}\\ \mathbf{elif}\;B \leq 5.5 \cdot 10^{+40}:\\ \;\;\;\;\frac{-\sqrt{\left(A - \mathsf{hypot}\left(B, A\right)\right) \cdot \left(2 \cdot \left(F \cdot \left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right)\right)\right)}}{B \cdot B + -4 \cdot \left(A \cdot C\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(A - \mathsf{hypot}\left(B, A\right)\right)}\right)\\ \end{array} \]

Alternative 5: 32.7% accurate, 2.7× speedup?

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

\mathbf{elif}\;B \leq 1.5 \cdot 10^{-233}:\\
\;\;\;\;\frac{-\sqrt{-16 \cdot \left(\left(A \cdot A\right) \cdot \left(C \cdot F\right)\right)}}{{B}^{2} - C \cdot \left(A \cdot 4\right)}\\

\mathbf{elif}\;B \leq 1.05 \cdot 10^{+45}:\\
\;\;\;\;t_1 \cdot \frac{-1}{t_0}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if B < -5.09999999999999985e-203

    1. Initial program 22.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. Taylor expanded in C around 0 17.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right) \cdot F\right)\right) \cdot \left(A - \mathsf{hypot}\left(B, A\right)\right)}}{\color{blue}{{B}^{2}} - 4 \cdot \left(A \cdot C\right)} \]
      8. cancel-sign-sub-inv19.9%

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

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

    if -5.09999999999999985e-203 < B < 1.49999999999999999e-233

    1. Initial program 12.5%

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

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

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

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

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

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

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

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

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

    if 1.49999999999999999e-233 < B < 1.04999999999999997e45

    1. Initial program 21.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.04999999999999997e45 < B

    1. Initial program 11.6%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -5.1 \cdot 10^{-203}:\\ \;\;\;\;\frac{-\sqrt{\left(A - \mathsf{hypot}\left(B, A\right)\right) \cdot \left(2 \cdot \left(F \cdot \left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right)\right)\right)}}{B \cdot B + -4 \cdot \left(A \cdot C\right)}\\ \mathbf{elif}\;B \leq 1.5 \cdot 10^{-233}:\\ \;\;\;\;\frac{-\sqrt{-16 \cdot \left(\left(A \cdot A\right) \cdot \left(C \cdot F\right)\right)}}{{B}^{2} - C \cdot \left(A \cdot 4\right)}\\ \mathbf{elif}\;B \leq 1.05 \cdot 10^{+45}:\\ \;\;\;\;\sqrt{\left(A - \mathsf{hypot}\left(B, A\right)\right) \cdot \left(2 \cdot \left(F \cdot \left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right)\right)\right)} \cdot \frac{-1}{B \cdot B + -4 \cdot \left(A \cdot C\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A - B\right)}\\ \end{array} \]

Alternative 6: 32.8% accurate, 2.7× speedup?

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

\mathbf{elif}\;B \leq 6.5 \cdot 10^{-236}:\\
\;\;\;\;\frac{-\sqrt{-16 \cdot \left(\left(A \cdot A\right) \cdot \left(C \cdot F\right)\right)}}{{B}^{2} - C \cdot \left(A \cdot 4\right)}\\

\mathbf{elif}\;B \leq 2.3 \cdot 10^{+45}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if B < -2.95e-203 or 6.5000000000000001e-236 < B < 2.30000000000000012e45

    1. Initial program 21.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. Taylor expanded in C around 0 18.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.95e-203 < B < 6.5000000000000001e-236

    1. Initial program 12.5%

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

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

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

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

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

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

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

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

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

    if 2.30000000000000012e45 < B

    1. Initial program 11.6%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -2.95 \cdot 10^{-203}:\\ \;\;\;\;\frac{-\sqrt{\left(A - \mathsf{hypot}\left(B, A\right)\right) \cdot \left(2 \cdot \left(F \cdot \left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right)\right)\right)}}{B \cdot B + -4 \cdot \left(A \cdot C\right)}\\ \mathbf{elif}\;B \leq 6.5 \cdot 10^{-236}:\\ \;\;\;\;\frac{-\sqrt{-16 \cdot \left(\left(A \cdot A\right) \cdot \left(C \cdot F\right)\right)}}{{B}^{2} - C \cdot \left(A \cdot 4\right)}\\ \mathbf{elif}\;B \leq 2.3 \cdot 10^{+45}:\\ \;\;\;\;\frac{-\sqrt{\left(A - \mathsf{hypot}\left(B, A\right)\right) \cdot \left(2 \cdot \left(F \cdot \left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right)\right)\right)}}{B \cdot B + -4 \cdot \left(A \cdot C\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A - B\right)}\\ \end{array} \]

Alternative 7: 27.5% accurate, 2.7× speedup?

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

\mathbf{elif}\;B \leq 4.5 \cdot 10^{-242}:\\
\;\;\;\;\frac{-\sqrt{-16 \cdot \left(\left(A \cdot A\right) \cdot \left(C \cdot F\right)\right)}}{{B}^{2} - C \cdot \left(A \cdot 4\right)}\\

\mathbf{elif}\;B \leq 4.7 \cdot 10^{-83}:\\
\;\;\;\;\frac{-\sqrt{t_1 \cdot \left(2 \cdot \left(\left(\left(-4 \cdot A\right) \cdot C\right) \cdot F\right)\right)}}{t_0}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if B < -1.55e28

    1. Initial program 16.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right) \cdot F\right)\right) \cdot \left(A - \mathsf{hypot}\left(B, A\right)\right)}}{\color{blue}{{B}^{2}} - 4 \cdot \left(A \cdot C\right)} \]
      8. cancel-sign-sub-inv13.0%

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

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

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

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

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

    if -1.55e28 < B < 4.4999999999999999e-242

    1. Initial program 22.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. Taylor expanded in C around 0 21.8%

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

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

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

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

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

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

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

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

    if 4.4999999999999999e-242 < B < 4.7000000000000003e-83

    1. Initial program 12.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.7000000000000003e-83 < B

    1. Initial program 20.2%

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

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

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

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

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

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

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

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

Alternative 8: 27.1% accurate, 2.8× speedup?

\[\begin{array}{l} [A, C] = \mathsf{sort}([A, C])\\ \\ \begin{array}{l} \mathbf{if}\;B \leq -1.6 \cdot 10^{+28}:\\ \;\;\;\;\frac{-\sqrt{\left(A - \mathsf{hypot}\left(B, A\right)\right) \cdot \left(2 \cdot \left(F \cdot \left(B \cdot B\right)\right)\right)}}{B \cdot B + -4 \cdot \left(A \cdot C\right)}\\ \mathbf{elif}\;B \leq 125000:\\ \;\;\;\;\frac{-\sqrt{-16 \cdot \left(\left(A \cdot A\right) \cdot \left(C \cdot F\right)\right)}}{{B}^{2} - C \cdot \left(A \cdot 4\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A - B\right)}\\ \end{array} \end{array} \]
NOTE: A and C should be sorted in increasing order before calling this function.
(FPCore (A B C F)
 :precision binary64
 (if (<= B -1.6e+28)
   (/
    (- (sqrt (* (- A (hypot B A)) (* 2.0 (* F (* B B))))))
    (+ (* B B) (* -4.0 (* A C))))
   (if (<= B 125000.0)
     (/
      (- (sqrt (* -16.0 (* (* A A) (* C F)))))
      (- (pow B 2.0) (* C (* A 4.0))))
     (* (/ (- (sqrt 2.0)) B) (sqrt (* F (- A B)))))))
assert(A < C);
double code(double A, double B, double C, double F) {
	double tmp;
	if (B <= -1.6e+28) {
		tmp = -sqrt(((A - hypot(B, A)) * (2.0 * (F * (B * B))))) / ((B * B) + (-4.0 * (A * C)));
	} else if (B <= 125000.0) {
		tmp = -sqrt((-16.0 * ((A * A) * (C * F)))) / (pow(B, 2.0) - (C * (A * 4.0)));
	} else {
		tmp = (-sqrt(2.0) / B) * sqrt((F * (A - B)));
	}
	return tmp;
}
assert A < C;
public static double code(double A, double B, double C, double F) {
	double tmp;
	if (B <= -1.6e+28) {
		tmp = -Math.sqrt(((A - Math.hypot(B, A)) * (2.0 * (F * (B * B))))) / ((B * B) + (-4.0 * (A * C)));
	} else if (B <= 125000.0) {
		tmp = -Math.sqrt((-16.0 * ((A * A) * (C * F)))) / (Math.pow(B, 2.0) - (C * (A * 4.0)));
	} else {
		tmp = (-Math.sqrt(2.0) / B) * Math.sqrt((F * (A - B)));
	}
	return tmp;
}
[A, C] = sort([A, C])
def code(A, B, C, F):
	tmp = 0
	if B <= -1.6e+28:
		tmp = -math.sqrt(((A - math.hypot(B, A)) * (2.0 * (F * (B * B))))) / ((B * B) + (-4.0 * (A * C)))
	elif B <= 125000.0:
		tmp = -math.sqrt((-16.0 * ((A * A) * (C * F)))) / (math.pow(B, 2.0) - (C * (A * 4.0)))
	else:
		tmp = (-math.sqrt(2.0) / B) * math.sqrt((F * (A - B)))
	return tmp
A, C = sort([A, C])
function code(A, B, C, F)
	tmp = 0.0
	if (B <= -1.6e+28)
		tmp = Float64(Float64(-sqrt(Float64(Float64(A - hypot(B, A)) * Float64(2.0 * Float64(F * Float64(B * B)))))) / Float64(Float64(B * B) + Float64(-4.0 * Float64(A * C))));
	elseif (B <= 125000.0)
		tmp = Float64(Float64(-sqrt(Float64(-16.0 * Float64(Float64(A * A) * Float64(C * F))))) / Float64((B ^ 2.0) - Float64(C * Float64(A * 4.0))));
	else
		tmp = Float64(Float64(Float64(-sqrt(2.0)) / B) * sqrt(Float64(F * Float64(A - B))));
	end
	return tmp
end
A, C = num2cell(sort([A, C])){:}
function tmp_2 = code(A, B, C, F)
	tmp = 0.0;
	if (B <= -1.6e+28)
		tmp = -sqrt(((A - hypot(B, A)) * (2.0 * (F * (B * B))))) / ((B * B) + (-4.0 * (A * C)));
	elseif (B <= 125000.0)
		tmp = -sqrt((-16.0 * ((A * A) * (C * F)))) / ((B ^ 2.0) - (C * (A * 4.0)));
	else
		tmp = (-sqrt(2.0) / B) * sqrt((F * (A - B)));
	end
	tmp_2 = tmp;
end
NOTE: A and C should be sorted in increasing order before calling this function.
code[A_, B_, C_, F_] := If[LessEqual[B, -1.6e+28], N[((-N[Sqrt[N[(N[(A - N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(F * N[(B * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / N[(N[(B * B), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 125000.0], N[((-N[Sqrt[N[(-16.0 * N[(N[(A * A), $MachinePrecision] * N[(C * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / N[(N[Power[B, 2.0], $MachinePrecision] - N[(C * N[(A * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[((-N[Sqrt[2.0], $MachinePrecision]) / B), $MachinePrecision] * N[Sqrt[N[(F * N[(A - B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[A, C] = \mathsf{sort}([A, C])\\
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.6 \cdot 10^{+28}:\\
\;\;\;\;\frac{-\sqrt{\left(A - \mathsf{hypot}\left(B, A\right)\right) \cdot \left(2 \cdot \left(F \cdot \left(B \cdot B\right)\right)\right)}}{B \cdot B + -4 \cdot \left(A \cdot C\right)}\\

\mathbf{elif}\;B \leq 125000:\\
\;\;\;\;\frac{-\sqrt{-16 \cdot \left(\left(A \cdot A\right) \cdot \left(C \cdot F\right)\right)}}{{B}^{2} - C \cdot \left(A \cdot 4\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if B < -1.6e28

    1. Initial program 16.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right) \cdot F\right)\right) \cdot \left(A - \mathsf{hypot}\left(B, A\right)\right)}}{\color{blue}{{B}^{2}} - 4 \cdot \left(A \cdot C\right)} \]
      8. cancel-sign-sub-inv13.0%

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

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

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

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

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

    if -1.6e28 < B < 125000

    1. Initial program 21.7%

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

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

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

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

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

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

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

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

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

    if 125000 < B

    1. Initial program 14.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. Taylor expanded in B around inf 10.8%

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

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

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

        \[\leadsto \color{blue}{\left(-\frac{\sqrt{2}}{B}\right)} \cdot \sqrt{\left(A - B\right) \cdot F} \]
      3. distribute-neg-frac54.2%

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

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

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

Alternative 9: 25.0% accurate, 2.9× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if B < 52000

    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. Taylor expanded in C around 0 17.6%

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

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

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

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

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

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

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

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

    if 52000 < B

    1. Initial program 14.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. Taylor expanded in B around inf 10.8%

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

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

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

        \[\leadsto \color{blue}{\left(-\frac{\sqrt{2}}{B}\right)} \cdot \sqrt{\left(A - B\right) \cdot F} \]
      3. distribute-neg-frac54.2%

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

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

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

Alternative 10: 18.1% accurate, 2.9× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if B < 5.89999999999999972e-263

    1. Initial program 20.7%

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

        \[\leadsto \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) - \color{blue}{\sqrt[3]{\left(\sqrt{{\left(A - C\right)}^{2} + {B}^{2}} \cdot \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right) \cdot \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
      2. pow314.9%

        \[\leadsto \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[3]{\color{blue}{{\left(\sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}^{3}}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
      3. unpow214.9%

        \[\leadsto \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[3]{{\left(\sqrt{\color{blue}{\left(A - C\right) \cdot \left(A - C\right)} + {B}^{2}}\right)}^{3}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
      4. unpow214.9%

        \[\leadsto \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[3]{{\left(\sqrt{\left(A - C\right) \cdot \left(A - C\right) + \color{blue}{B \cdot B}}\right)}^{3}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
      5. hypot-def14.9%

        \[\leadsto \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[3]{{\color{blue}{\left(\mathsf{hypot}\left(A - C, B\right)\right)}}^{3}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
    3. Applied egg-rr14.9%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-\sqrt{2}}{B} \cdot \sqrt{\color{blue}{\frac{-0.5 \cdot {B}^{2}}{C}} \cdot F} \]
      2. unpow26.6%

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

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

    if 5.89999999999999972e-263 < B

    1. Initial program 16.9%

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

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

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

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

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

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

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

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

Alternative 11: 15.2% accurate, 3.0× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if B < 9.5000000000000007e-226

    1. Initial program 19.6%

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

      \[\leadsto \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) - \color{blue}{B}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
    3. Step-by-step derivation
      1. *-un-lft-identity4.6%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-\sqrt{2 \cdot \left(\left(\color{blue}{B \cdot B} + \left(-4\right) \cdot \left(A \cdot C\right)\right) \cdot \left(F \cdot \left(A + \left(C - B\right)\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
      6. metadata-eval4.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 + \left(C - B\right)\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
      7. unpow24.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 + \left(C - B\right)\right)\right)\right)}}{\color{blue}{{B}^{2}} - 4 \cdot \left(A \cdot C\right)} \]
      8. cancel-sign-sub-inv4.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 + \left(C - B\right)\right)\right)\right)}}{\color{blue}{{B}^{2} + \left(-4\right) \cdot \left(A \cdot C\right)}} \]
      9. unpow24.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 + \left(C - B\right)\right)\right)\right)}}{\color{blue}{B \cdot B} + \left(-4\right) \cdot \left(A \cdot C\right)} \]
      10. metadata-eval4.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 + \left(C - B\right)\right)\right)\right)}}{B \cdot B + \color{blue}{-4} \cdot \left(A \cdot C\right)} \]
    6. Simplified4.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 + \left(C - B\right)\right)\right)\right)}}{B \cdot B + -4 \cdot \left(A \cdot C\right)}} \]

    if 9.5000000000000007e-226 < B

    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. Taylor expanded in B around inf 11.4%

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

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

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

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

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

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

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

Alternative 12: 15.0% accurate, 3.0× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if B < 4.30000000000000024e-226

    1. Initial program 19.6%

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

      \[\leadsto \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) - \color{blue}{B}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
    3. Step-by-step derivation
      1. *-un-lft-identity4.6%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-\sqrt{2 \cdot \left(\left(\color{blue}{B \cdot B} + \left(-4\right) \cdot \left(A \cdot C\right)\right) \cdot \left(F \cdot \left(A + \left(C - B\right)\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
      6. metadata-eval4.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 + \left(C - B\right)\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
      7. unpow24.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 + \left(C - B\right)\right)\right)\right)}}{\color{blue}{{B}^{2}} - 4 \cdot \left(A \cdot C\right)} \]
      8. cancel-sign-sub-inv4.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 + \left(C - B\right)\right)\right)\right)}}{\color{blue}{{B}^{2} + \left(-4\right) \cdot \left(A \cdot C\right)}} \]
      9. unpow24.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 + \left(C - B\right)\right)\right)\right)}}{\color{blue}{B \cdot B} + \left(-4\right) \cdot \left(A \cdot C\right)} \]
      10. metadata-eval4.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 + \left(C - B\right)\right)\right)\right)}}{B \cdot B + \color{blue}{-4} \cdot \left(A \cdot C\right)} \]
    6. Simplified4.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 + \left(C - B\right)\right)\right)\right)}}{B \cdot B + -4 \cdot \left(A \cdot C\right)}} \]

    if 4.30000000000000024e-226 < B

    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. add-cbrt-cube13.6%

        \[\leadsto \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) - \color{blue}{\sqrt[3]{\left(\sqrt{{\left(A - C\right)}^{2} + {B}^{2}} \cdot \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right) \cdot \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
      2. pow313.5%

        \[\leadsto \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[3]{\color{blue}{{\left(\sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}^{3}}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
      3. unpow213.5%

        \[\leadsto \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[3]{{\left(\sqrt{\color{blue}{\left(A - C\right) \cdot \left(A - C\right)} + {B}^{2}}\right)}^{3}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
      4. unpow213.5%

        \[\leadsto \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[3]{{\left(\sqrt{\left(A - C\right) \cdot \left(A - C\right) + \color{blue}{B \cdot B}}\right)}^{3}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
      5. hypot-def13.5%

        \[\leadsto \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[3]{{\color{blue}{\left(\mathsf{hypot}\left(A - C, B\right)\right)}}^{3}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
    3. Applied egg-rr13.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 7.7% accurate, 4.9× speedup?

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

    \[\leadsto \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) - \color{blue}{B}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
  3. Step-by-step derivation
    1. distribute-frac-neg7.5%

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

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

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

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

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

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

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

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

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

Alternative 14: 7.7% accurate, 4.9× speedup?

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

    \[\leadsto \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) - \color{blue}{B}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
  3. Step-by-step derivation
    1. *-un-lft-identity7.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 0.8% accurate, 5.4× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Reproduce

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