ABCF->ab-angle a

Percentage Accurate: 18.8% → 54.7%
Time: 31.0s
Alternatives: 14
Speedup: 3.1×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 14 alternatives:

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

Initial Program: 18.8% 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: 54.7% accurate, 0.3× speedup?

\[\begin{array}{l} B = |B|\\ \\ \begin{array}{l} t_0 := \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\\ t_1 := F \cdot t_0\\ t_2 := {B}^{2} - C \cdot \left(4 \cdot A\right)\\ t_3 := \frac{-\sqrt{\left(2 \cdot \left(t_2 \cdot F\right)\right) \cdot \left(\sqrt{{B}^{2} + {\left(A - C\right)}^{2}} + \left(A + C\right)\right)}}{t_2}\\ \mathbf{if}\;t_3 \leq -2 \cdot 10^{-187}:\\ \;\;\;\;\frac{\sqrt{2 \cdot \left(A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)\right)} \cdot \left(-\sqrt{F \cdot \mathsf{fma}\left(-4, A \cdot C, {B}^{2}\right)}\right)}{t_0}\\ \mathbf{elif}\;t_3 \leq 0:\\ \;\;\;\;\frac{-\sqrt{t_1 \cdot \left(2 \cdot \left(A + \left(A + -0.5 \cdot \frac{{B}^{2}}{C}\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;t_3 \leq \infty:\\ \;\;\;\;\frac{\sqrt{2 \cdot \left(\mathsf{hypot}\left(A - C, B\right) + \left(A + C\right)\right)} \cdot \left(-\sqrt{t_1}\right)}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(\sqrt{C + \mathsf{hypot}\left(B, C\right)} \cdot \left(-\sqrt{F}\right)\right)\\ \end{array} \end{array} \]
NOTE: B should be positive before calling this function
(FPCore (A B C F)
 :precision binary64
 (let* ((t_0 (fma B B (* A (* C -4.0))))
        (t_1 (* F t_0))
        (t_2 (- (pow B 2.0) (* C (* 4.0 A))))
        (t_3
         (/
          (-
           (sqrt
            (*
             (* 2.0 (* t_2 F))
             (+ (sqrt (+ (pow B 2.0) (pow (- A C) 2.0))) (+ A C)))))
          t_2)))
   (if (<= t_3 -2e-187)
     (/
      (*
       (sqrt (* 2.0 (+ A (+ C (hypot B (- A C))))))
       (- (sqrt (* F (fma -4.0 (* A C) (pow B 2.0))))))
      t_0)
     (if (<= t_3 0.0)
       (/
        (- (sqrt (* t_1 (* 2.0 (+ A (+ A (* -0.5 (/ (pow B 2.0) C))))))))
        t_0)
       (if (<= t_3 INFINITY)
         (/
          (* (sqrt (* 2.0 (+ (hypot (- A C) B) (+ A C)))) (- (sqrt t_1)))
          t_0)
         (* (/ (sqrt 2.0) B) (* (sqrt (+ C (hypot B C))) (- (sqrt F)))))))))
B = abs(B);
double code(double A, double B, double C, double F) {
	double t_0 = fma(B, B, (A * (C * -4.0)));
	double t_1 = F * t_0;
	double t_2 = pow(B, 2.0) - (C * (4.0 * A));
	double t_3 = -sqrt(((2.0 * (t_2 * F)) * (sqrt((pow(B, 2.0) + pow((A - C), 2.0))) + (A + C)))) / t_2;
	double tmp;
	if (t_3 <= -2e-187) {
		tmp = (sqrt((2.0 * (A + (C + hypot(B, (A - C)))))) * -sqrt((F * fma(-4.0, (A * C), pow(B, 2.0))))) / t_0;
	} else if (t_3 <= 0.0) {
		tmp = -sqrt((t_1 * (2.0 * (A + (A + (-0.5 * (pow(B, 2.0) / C))))))) / t_0;
	} else if (t_3 <= ((double) INFINITY)) {
		tmp = (sqrt((2.0 * (hypot((A - C), B) + (A + C)))) * -sqrt(t_1)) / t_0;
	} else {
		tmp = (sqrt(2.0) / B) * (sqrt((C + hypot(B, C))) * -sqrt(F));
	}
	return tmp;
}
B = abs(B)
function code(A, B, C, F)
	t_0 = fma(B, B, Float64(A * Float64(C * -4.0)))
	t_1 = Float64(F * t_0)
	t_2 = Float64((B ^ 2.0) - Float64(C * Float64(4.0 * A)))
	t_3 = Float64(Float64(-sqrt(Float64(Float64(2.0 * Float64(t_2 * F)) * Float64(sqrt(Float64((B ^ 2.0) + (Float64(A - C) ^ 2.0))) + Float64(A + C))))) / t_2)
	tmp = 0.0
	if (t_3 <= -2e-187)
		tmp = Float64(Float64(sqrt(Float64(2.0 * Float64(A + Float64(C + hypot(B, Float64(A - C)))))) * Float64(-sqrt(Float64(F * fma(-4.0, Float64(A * C), (B ^ 2.0)))))) / t_0);
	elseif (t_3 <= 0.0)
		tmp = Float64(Float64(-sqrt(Float64(t_1 * Float64(2.0 * Float64(A + Float64(A + Float64(-0.5 * Float64((B ^ 2.0) / C)))))))) / t_0);
	elseif (t_3 <= Inf)
		tmp = Float64(Float64(sqrt(Float64(2.0 * Float64(hypot(Float64(A - C), B) + Float64(A + C)))) * Float64(-sqrt(t_1))) / t_0);
	else
		tmp = Float64(Float64(sqrt(2.0) / B) * Float64(sqrt(Float64(C + hypot(B, C))) * Float64(-sqrt(F))));
	end
	return tmp
end
NOTE: B should be positive before calling this function
code[A_, B_, C_, F_] := Block[{t$95$0 = N[(B * B + N[(A * N[(C * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(F * t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[(N[Power[B, 2.0], $MachinePrecision] - N[(C * N[(4.0 * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[((-N[Sqrt[N[(N[(2.0 * N[(t$95$2 * F), $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[N[(N[Power[B, 2.0], $MachinePrecision] + N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + N[(A + C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$2), $MachinePrecision]}, If[LessEqual[t$95$3, -2e-187], N[(N[(N[Sqrt[N[(2.0 * N[(A + N[(C + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-N[Sqrt[N[(F * N[(-4.0 * N[(A * C), $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[t$95$3, 0.0], N[((-N[Sqrt[N[(t$95$1 * N[(2.0 * N[(A + N[(A + N[(-0.5 * N[(N[Power[B, 2.0], $MachinePrecision] / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[(N[(N[Sqrt[N[(2.0 * N[(N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision] + N[(A + C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-N[Sqrt[t$95$1], $MachinePrecision])), $MachinePrecision] / t$95$0), $MachinePrecision], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B), $MachinePrecision] * N[(N[Sqrt[N[(C + N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-N[Sqrt[F], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
B = |B|\\
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\\
t_1 := F \cdot t_0\\
t_2 := {B}^{2} - C \cdot \left(4 \cdot A\right)\\
t_3 := \frac{-\sqrt{\left(2 \cdot \left(t_2 \cdot F\right)\right) \cdot \left(\sqrt{{B}^{2} + {\left(A - C\right)}^{2}} + \left(A + C\right)\right)}}{t_2}\\
\mathbf{if}\;t_3 \leq -2 \cdot 10^{-187}:\\
\;\;\;\;\frac{\sqrt{2 \cdot \left(A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)\right)} \cdot \left(-\sqrt{F \cdot \mathsf{fma}\left(-4, A \cdot C, {B}^{2}\right)}\right)}{t_0}\\

\mathbf{elif}\;t_3 \leq 0:\\
\;\;\;\;\frac{-\sqrt{t_1 \cdot \left(2 \cdot \left(A + \left(A + -0.5 \cdot \frac{{B}^{2}}{C}\right)\right)\right)}}{t_0}\\

\mathbf{elif}\;t_3 \leq \infty:\\
\;\;\;\;\frac{\sqrt{2 \cdot \left(\mathsf{hypot}\left(A - C, B\right) + \left(A + C\right)\right)} \cdot \left(-\sqrt{t_1}\right)}{t_0}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 2 (*.f64 (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C)) F)) (+.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))))) (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C))) < -2e-187

    1. Initial program 42.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. Simplified50.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2e-187 < (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 2 (*.f64 (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C)) F)) (+.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))))) (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C))) < -0.0

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

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

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

    if -0.0 < (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 2 (*.f64 (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C)) F)) (+.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))))) (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C))) < +inf.0

    1. Initial program 26.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. Simplified57.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if +inf.0 < (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 2 (*.f64 (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C)) F)) (+.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))))) (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C)))

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{2}}{B} \cdot \left(-{\left(\left(C + \sqrt{{B}^{2} + \color{blue}{{C}^{2}}}\right) \cdot F\right)}^{0.5}\right) \]
      6. unpow-prod-down2.1%

        \[\leadsto \frac{\sqrt{2}}{B} \cdot \left(-\color{blue}{{\left(C + \sqrt{{B}^{2} + {C}^{2}}\right)}^{0.5} \cdot {F}^{0.5}}\right) \]
      7. pow1/22.1%

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

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

        \[\leadsto \frac{\sqrt{2}}{B} \cdot \left(-\sqrt{C + \sqrt{B \cdot B + \color{blue}{C \cdot C}}} \cdot {F}^{0.5}\right) \]
      10. hypot-udef28.7%

        \[\leadsto \frac{\sqrt{2}}{B} \cdot \left(-\sqrt{C + \color{blue}{\mathsf{hypot}\left(B, C\right)}} \cdot {F}^{0.5}\right) \]
      11. pow1/228.7%

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

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

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

Alternative 2: 52.0% accurate, 1.0× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (pow.f64 B 2) < 1.00000000000000007e260

    1. Initial program 23.2%

      \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
    2. Step-by-step derivation
      1. +-commutative23.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(\left(A + C\right) + \sqrt{\color{blue}{{B}^{2} + {\left(A - C\right)}^{2}}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
      2. unpow223.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(\left(A + C\right) + \sqrt{\color{blue}{B \cdot B} + {\left(A - C\right)}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
      3. unpow223.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(\left(A + C\right) + \sqrt{B \cdot B + \color{blue}{\left(A - C\right) \cdot \left(A - C\right)}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
      4. hypot-udef31.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}{\mathsf{hypot}\left(B, A - C\right)}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
      5. add-exp-log30.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(\left(A + C\right) + \color{blue}{e^{\log \left(\mathsf{hypot}\left(B, A - C\right)\right)}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
      6. hypot-udef22.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) + e^{\log \color{blue}{\left(\sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
      7. unpow222.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) + e^{\log \left(\sqrt{\color{blue}{{B}^{2}} + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
      8. unpow222.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) + e^{\log \left(\sqrt{{B}^{2} + \color{blue}{{\left(A - C\right)}^{2}}}\right)}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
      9. +-commutative22.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) + e^{\log \left(\sqrt{\color{blue}{{\left(A - C\right)}^{2} + {B}^{2}}}\right)}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
      10. unpow222.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) + e^{\log \left(\sqrt{\color{blue}{\left(A - C\right) \cdot \left(A - C\right)} + {B}^{2}}\right)}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
      11. unpow222.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) + e^{\log \left(\sqrt{\left(A - C\right) \cdot \left(A - C\right) + \color{blue}{B \cdot B}}\right)}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
      12. hypot-def30.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(\left(A + C\right) + e^{\log \color{blue}{\left(\mathsf{hypot}\left(A - C, B\right)\right)}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
    3. Applied egg-rr30.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(\left(A + C\right) + \color{blue}{e^{\log \left(\mathsf{hypot}\left(A - C, B\right)\right)}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
    4. Step-by-step derivation
      1. sqrt-prod40.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.00000000000000007e260 < (pow.f64 B 2)

    1. Initial program 3.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 A around 0 6.6%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{2}}{B} \cdot \left(-{\left(\left(C + \sqrt{{B}^{2} + \color{blue}{{C}^{2}}}\right) \cdot F\right)}^{0.5}\right) \]
      6. unpow-prod-down6.6%

        \[\leadsto \frac{\sqrt{2}}{B} \cdot \left(-\color{blue}{{\left(C + \sqrt{{B}^{2} + {C}^{2}}\right)}^{0.5} \cdot {F}^{0.5}}\right) \]
      7. pow1/26.6%

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

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

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

        \[\leadsto \frac{\sqrt{2}}{B} \cdot \left(-\sqrt{C + \color{blue}{\mathsf{hypot}\left(B, C\right)}} \cdot {F}^{0.5}\right) \]
      11. pow1/250.5%

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

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

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

Alternative 3: 44.4% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 18.2%

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

    if 2.00000000000000012e-295 < (pow.f64 B 2) < 1.9999999999999999e-147

    1. Initial program 23.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 17.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 A around 0 11.4%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{2}}{B} \cdot \left(-\color{blue}{{\left(C + \sqrt{{B}^{2} + {C}^{2}}\right)}^{0.5} \cdot {F}^{0.5}}\right) \]
      7. pow1/211.5%

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

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

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

        \[\leadsto \frac{\sqrt{2}}{B} \cdot \left(-\sqrt{C + \color{blue}{\mathsf{hypot}\left(B, C\right)}} \cdot {F}^{0.5}\right) \]
      11. pow1/229.2%

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

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

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

Alternative 4: 47.3% accurate, 1.2× speedup?

\[\begin{array}{l} B = |B|\\ \\ \begin{array}{l} t_0 := \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\\ \mathbf{if}\;{B}^{2} \leq 2 \cdot 10^{-20}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(\mathsf{hypot}\left(A - C, B\right) + \left(A + C\right)\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(\sqrt{C + \mathsf{hypot}\left(B, C\right)} \cdot \left(-\sqrt{F}\right)\right)\\ \end{array} \end{array} \]
NOTE: B should be positive before calling this function
(FPCore (A B C F)
 :precision binary64
 (let* ((t_0 (fma B B (* A (* C -4.0)))))
   (if (<= (pow B 2.0) 2e-20)
     (/ (- (sqrt (* 2.0 (* t_0 (* F (+ (hypot (- A C) B) (+ A C))))))) t_0)
     (* (/ (sqrt 2.0) B) (* (sqrt (+ C (hypot B C))) (- (sqrt F)))))))
B = abs(B);
double code(double A, double B, double C, double F) {
	double t_0 = fma(B, B, (A * (C * -4.0)));
	double tmp;
	if (pow(B, 2.0) <= 2e-20) {
		tmp = -sqrt((2.0 * (t_0 * (F * (hypot((A - C), B) + (A + C)))))) / t_0;
	} else {
		tmp = (sqrt(2.0) / B) * (sqrt((C + hypot(B, C))) * -sqrt(F));
	}
	return tmp;
}
B = abs(B)
function code(A, B, C, F)
	t_0 = fma(B, B, Float64(A * Float64(C * -4.0)))
	tmp = 0.0
	if ((B ^ 2.0) <= 2e-20)
		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(t_0 * Float64(F * Float64(hypot(Float64(A - C), B) + Float64(A + C))))))) / t_0);
	else
		tmp = Float64(Float64(sqrt(2.0) / B) * Float64(sqrt(Float64(C + hypot(B, C))) * Float64(-sqrt(F))));
	end
	return tmp
end
NOTE: B should be positive before calling this function
code[A_, B_, C_, F_] := Block[{t$95$0 = N[(B * B + N[(A * N[(C * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Power[B, 2.0], $MachinePrecision], 2e-20], N[((-N[Sqrt[N[(2.0 * N[(t$95$0 * N[(F * N[(N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision] + N[(A + C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B), $MachinePrecision] * N[(N[Sqrt[N[(C + N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-N[Sqrt[F], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
B = |B|\\
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\\
\mathbf{if}\;{B}^{2} \leq 2 \cdot 10^{-20}:\\
\;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(\mathsf{hypot}\left(A - C, B\right) + \left(A + C\right)\right)\right)\right)}}{t_0}\\

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


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

    1. Initial program 20.0%

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

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\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}\right)\right)} \]
      2. expm1-udef5.5%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\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}\right)} - 1} \]
    3. Applied egg-rr8.8%

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

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

    if 1.99999999999999989e-20 < (pow.f64 B 2)

    1. Initial program 17.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 A around 0 11.3%

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{2}}{B} \cdot \left(-\color{blue}{{\left(F \cdot \left(C + \mathsf{hypot}\left(B, C\right)\right)\right)}^{0.5}}\right) \]
      2. *-commutative24.7%

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

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

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

        \[\leadsto \frac{\sqrt{2}}{B} \cdot \left(-{\left(\left(C + \sqrt{{B}^{2} + \color{blue}{{C}^{2}}}\right) \cdot F\right)}^{0.5}\right) \]
      6. unpow-prod-down11.3%

        \[\leadsto \frac{\sqrt{2}}{B} \cdot \left(-\color{blue}{{\left(C + \sqrt{{B}^{2} + {C}^{2}}\right)}^{0.5} \cdot {F}^{0.5}}\right) \]
      7. pow1/211.3%

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

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

        \[\leadsto \frac{\sqrt{2}}{B} \cdot \left(-\sqrt{C + \sqrt{B \cdot B + \color{blue}{C \cdot C}}} \cdot {F}^{0.5}\right) \]
      10. hypot-udef33.0%

        \[\leadsto \frac{\sqrt{2}}{B} \cdot \left(-\sqrt{C + \color{blue}{\mathsf{hypot}\left(B, C\right)}} \cdot {F}^{0.5}\right) \]
      11. pow1/233.0%

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

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

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

Alternative 5: 51.5% accurate, 1.2× speedup?

\[\begin{array}{l} B = |B|\\ \\ \begin{array}{l} t_0 := \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\\ \mathbf{if}\;B \leq 8.2 \cdot 10^{+129}:\\ \;\;\;\;\frac{\sqrt{2 \cdot \left(\mathsf{hypot}\left(A - C, B\right) + \left(A + C\right)\right)} \cdot \left(-\sqrt{F \cdot t_0}\right)}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(\sqrt{C + \mathsf{hypot}\left(B, C\right)} \cdot \left(-\sqrt{F}\right)\right)\\ \end{array} \end{array} \]
NOTE: B should be positive before calling this function
(FPCore (A B C F)
 :precision binary64
 (let* ((t_0 (fma B B (* A (* C -4.0)))))
   (if (<= B 8.2e+129)
     (/
      (* (sqrt (* 2.0 (+ (hypot (- A C) B) (+ A C)))) (- (sqrt (* F t_0))))
      t_0)
     (* (/ (sqrt 2.0) B) (* (sqrt (+ C (hypot B C))) (- (sqrt F)))))))
B = abs(B);
double code(double A, double B, double C, double F) {
	double t_0 = fma(B, B, (A * (C * -4.0)));
	double tmp;
	if (B <= 8.2e+129) {
		tmp = (sqrt((2.0 * (hypot((A - C), B) + (A + C)))) * -sqrt((F * t_0))) / t_0;
	} else {
		tmp = (sqrt(2.0) / B) * (sqrt((C + hypot(B, C))) * -sqrt(F));
	}
	return tmp;
}
B = abs(B)
function code(A, B, C, F)
	t_0 = fma(B, B, Float64(A * Float64(C * -4.0)))
	tmp = 0.0
	if (B <= 8.2e+129)
		tmp = Float64(Float64(sqrt(Float64(2.0 * Float64(hypot(Float64(A - C), B) + Float64(A + C)))) * Float64(-sqrt(Float64(F * t_0)))) / t_0);
	else
		tmp = Float64(Float64(sqrt(2.0) / B) * Float64(sqrt(Float64(C + hypot(B, C))) * Float64(-sqrt(F))));
	end
	return tmp
end
NOTE: B should be positive before calling this function
code[A_, B_, C_, F_] := Block[{t$95$0 = N[(B * B + N[(A * N[(C * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, 8.2e+129], N[(N[(N[Sqrt[N[(2.0 * N[(N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision] + N[(A + C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-N[Sqrt[N[(F * t$95$0), $MachinePrecision]], $MachinePrecision])), $MachinePrecision] / t$95$0), $MachinePrecision], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B), $MachinePrecision] * N[(N[Sqrt[N[(C + N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-N[Sqrt[F], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
B = |B|\\
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\\
\mathbf{if}\;B \leq 8.2 \cdot 10^{+129}:\\
\;\;\;\;\frac{\sqrt{2 \cdot \left(\mathsf{hypot}\left(A - C, B\right) + \left(A + C\right)\right)} \cdot \left(-\sqrt{F \cdot t_0}\right)}{t_0}\\

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


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

    1. Initial program 20.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.2000000000000005e129 < B

    1. Initial program 3.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 A around 0 11.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{2}}{B} \cdot \left(-{\left(\left(C + \sqrt{{B}^{2} + \color{blue}{{C}^{2}}}\right) \cdot F\right)}^{0.5}\right) \]
      6. unpow-prod-down11.0%

        \[\leadsto \frac{\sqrt{2}}{B} \cdot \left(-\color{blue}{{\left(C + \sqrt{{B}^{2} + {C}^{2}}\right)}^{0.5} \cdot {F}^{0.5}}\right) \]
      7. pow1/211.0%

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

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

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

        \[\leadsto \frac{\sqrt{2}}{B} \cdot \left(-\sqrt{C + \color{blue}{\mathsf{hypot}\left(B, C\right)}} \cdot {F}^{0.5}\right) \]
      11. pow1/288.6%

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

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

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

Alternative 6: 48.8% accurate, 1.5× speedup?

\[\begin{array}{l} B = |B|\\ \\ \begin{array}{l} t_0 := \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\\ \mathbf{if}\;B \leq 3.4 \cdot 10^{+44}:\\ \;\;\;\;\frac{-\sqrt{\left(2 \cdot \left(A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)\right)\right) \cdot \left(F \cdot t_0\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(\sqrt{C + \mathsf{hypot}\left(B, C\right)} \cdot \left(-\sqrt{F}\right)\right)\\ \end{array} \end{array} \]
NOTE: B should be positive before calling this function
(FPCore (A B C F)
 :precision binary64
 (let* ((t_0 (fma B B (* A (* C -4.0)))))
   (if (<= B 3.4e+44)
     (/ (- (sqrt (* (* 2.0 (+ A (+ C (hypot B (- A C))))) (* F t_0)))) t_0)
     (* (/ (sqrt 2.0) B) (* (sqrt (+ C (hypot B C))) (- (sqrt F)))))))
B = abs(B);
double code(double A, double B, double C, double F) {
	double t_0 = fma(B, B, (A * (C * -4.0)));
	double tmp;
	if (B <= 3.4e+44) {
		tmp = -sqrt(((2.0 * (A + (C + hypot(B, (A - C))))) * (F * t_0))) / t_0;
	} else {
		tmp = (sqrt(2.0) / B) * (sqrt((C + hypot(B, C))) * -sqrt(F));
	}
	return tmp;
}
B = abs(B)
function code(A, B, C, F)
	t_0 = fma(B, B, Float64(A * Float64(C * -4.0)))
	tmp = 0.0
	if (B <= 3.4e+44)
		tmp = Float64(Float64(-sqrt(Float64(Float64(2.0 * Float64(A + Float64(C + hypot(B, Float64(A - C))))) * Float64(F * t_0)))) / t_0);
	else
		tmp = Float64(Float64(sqrt(2.0) / B) * Float64(sqrt(Float64(C + hypot(B, C))) * Float64(-sqrt(F))));
	end
	return tmp
end
NOTE: B should be positive before calling this function
code[A_, B_, C_, F_] := Block[{t$95$0 = N[(B * B + N[(A * N[(C * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, 3.4e+44], N[((-N[Sqrt[N[(N[(2.0 * N[(A + N[(C + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(F * t$95$0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B), $MachinePrecision] * N[(N[Sqrt[N[(C + N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-N[Sqrt[F], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
B = |B|\\
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\\
\mathbf{if}\;B \leq 3.4 \cdot 10^{+44}:\\
\;\;\;\;\frac{-\sqrt{\left(2 \cdot \left(A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)\right)\right) \cdot \left(F \cdot t_0\right)}}{t_0}\\

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


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

    1. Initial program 20.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. Simplified29.8%

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

    if 3.4e44 < B

    1. Initial program 8.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 A around 0 18.2%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{2}}{B} \cdot \left(-{\left(\left(C + \sqrt{{B}^{2} + \color{blue}{{C}^{2}}}\right) \cdot F\right)}^{0.5}\right) \]
      6. unpow-prod-down18.3%

        \[\leadsto \frac{\sqrt{2}}{B} \cdot \left(-\color{blue}{{\left(C + \sqrt{{B}^{2} + {C}^{2}}\right)}^{0.5} \cdot {F}^{0.5}}\right) \]
      7. pow1/218.3%

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

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

        \[\leadsto \frac{\sqrt{2}}{B} \cdot \left(-\sqrt{C + \sqrt{B \cdot B + \color{blue}{C \cdot C}}} \cdot {F}^{0.5}\right) \]
      10. hypot-udef73.0%

        \[\leadsto \frac{\sqrt{2}}{B} \cdot \left(-\sqrt{C + \color{blue}{\mathsf{hypot}\left(B, C\right)}} \cdot {F}^{0.5}\right) \]
      11. pow1/273.0%

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

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

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

Alternative 7: 34.8% accurate, 1.9× speedup?

\[\begin{array}{l} B = |B|\\ \\ \begin{array}{l} t_0 := \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\\ t_1 := {B}^{2} - C \cdot \left(4 \cdot A\right)\\ \mathbf{if}\;B \leq 6.8 \cdot 10^{-224}:\\ \;\;\;\;\frac{-\sqrt{\left(2 \cdot \left(t_1 \cdot F\right)\right) \cdot \left(2 \cdot C\right)}}{t_1}\\ \mathbf{elif}\;B \leq 2.65 \cdot 10^{-73}:\\ \;\;\;\;\frac{-\sqrt{\left(F \cdot t_0\right) \cdot \left(2 \cdot \left(2 \cdot A\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 5 \cdot 10^{+176}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(A + \mathsf{hypot}\left(B, A\right)\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\ \end{array} \end{array} \]
NOTE: B should be positive before calling this function
(FPCore (A B C F)
 :precision binary64
 (let* ((t_0 (fma B B (* A (* C -4.0)))) (t_1 (- (pow B 2.0) (* C (* 4.0 A)))))
   (if (<= B 6.8e-224)
     (/ (- (sqrt (* (* 2.0 (* t_1 F)) (* 2.0 C)))) t_1)
     (if (<= B 2.65e-73)
       (/ (- (sqrt (* (* F t_0) (* 2.0 (* 2.0 A))))) t_0)
       (if (<= B 5e+176)
         (* (/ (sqrt 2.0) B) (- (sqrt (* F (+ A (hypot B A))))))
         (* (sqrt 2.0) (- (sqrt (/ F B)))))))))
B = abs(B);
double code(double A, double B, double C, double F) {
	double t_0 = fma(B, B, (A * (C * -4.0)));
	double t_1 = pow(B, 2.0) - (C * (4.0 * A));
	double tmp;
	if (B <= 6.8e-224) {
		tmp = -sqrt(((2.0 * (t_1 * F)) * (2.0 * C))) / t_1;
	} else if (B <= 2.65e-73) {
		tmp = -sqrt(((F * t_0) * (2.0 * (2.0 * A)))) / t_0;
	} else if (B <= 5e+176) {
		tmp = (sqrt(2.0) / B) * -sqrt((F * (A + hypot(B, A))));
	} else {
		tmp = sqrt(2.0) * -sqrt((F / B));
	}
	return tmp;
}
B = abs(B)
function code(A, B, C, F)
	t_0 = fma(B, B, Float64(A * Float64(C * -4.0)))
	t_1 = Float64((B ^ 2.0) - Float64(C * Float64(4.0 * A)))
	tmp = 0.0
	if (B <= 6.8e-224)
		tmp = Float64(Float64(-sqrt(Float64(Float64(2.0 * Float64(t_1 * F)) * Float64(2.0 * C)))) / t_1);
	elseif (B <= 2.65e-73)
		tmp = Float64(Float64(-sqrt(Float64(Float64(F * t_0) * Float64(2.0 * Float64(2.0 * A))))) / t_0);
	elseif (B <= 5e+176)
		tmp = Float64(Float64(sqrt(2.0) / B) * Float64(-sqrt(Float64(F * Float64(A + hypot(B, A))))));
	else
		tmp = Float64(sqrt(2.0) * Float64(-sqrt(Float64(F / B))));
	end
	return tmp
end
NOTE: B should be positive before calling this function
code[A_, B_, C_, F_] := Block[{t$95$0 = N[(B * B + N[(A * N[(C * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Power[B, 2.0], $MachinePrecision] - N[(C * N[(4.0 * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, 6.8e-224], N[((-N[Sqrt[N[(N[(2.0 * N[(t$95$1 * F), $MachinePrecision]), $MachinePrecision] * N[(2.0 * C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$1), $MachinePrecision], If[LessEqual[B, 2.65e-73], N[((-N[Sqrt[N[(N[(F * t$95$0), $MachinePrecision] * N[(2.0 * N[(2.0 * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], If[LessEqual[B, 5e+176], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B), $MachinePrecision] * (-N[Sqrt[N[(F * N[(A + N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision], N[(N[Sqrt[2.0], $MachinePrecision] * (-N[Sqrt[N[(F / B), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]]]]]]
\begin{array}{l}
B = |B|\\
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\\
t_1 := {B}^{2} - C \cdot \left(4 \cdot A\right)\\
\mathbf{if}\;B \leq 6.8 \cdot 10^{-224}:\\
\;\;\;\;\frac{-\sqrt{\left(2 \cdot \left(t_1 \cdot F\right)\right) \cdot \left(2 \cdot C\right)}}{t_1}\\

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

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

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


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

    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 A around -inf 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(2 \cdot C\right)}}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]

    if 6.79999999999999984e-224 < B < 2.64999999999999986e-73

    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. Simplified35.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.64999999999999986e-73 < B < 5e176

    1. Initial program 23.9%

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

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

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

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

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

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

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

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

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

    if 5e176 < B

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 35.0% accurate, 1.9× speedup?

\[\begin{array}{l} B = |B|\\ \\ \begin{array}{l} t_0 := \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\\ \mathbf{if}\;B \leq 5.8 \cdot 10^{-74}:\\ \;\;\;\;\frac{-\sqrt{\left(F \cdot t_0\right) \cdot \left(2 \cdot \left(2 \cdot A\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 5.2 \cdot 10^{+176}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(A + \mathsf{hypot}\left(B, A\right)\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\ \end{array} \end{array} \]
NOTE: B should be positive before calling this function
(FPCore (A B C F)
 :precision binary64
 (let* ((t_0 (fma B B (* A (* C -4.0)))))
   (if (<= B 5.8e-74)
     (/ (- (sqrt (* (* F t_0) (* 2.0 (* 2.0 A))))) t_0)
     (if (<= B 5.2e+176)
       (* (/ (sqrt 2.0) B) (- (sqrt (* F (+ A (hypot B A))))))
       (* (sqrt 2.0) (- (sqrt (/ F B))))))))
B = abs(B);
double code(double A, double B, double C, double F) {
	double t_0 = fma(B, B, (A * (C * -4.0)));
	double tmp;
	if (B <= 5.8e-74) {
		tmp = -sqrt(((F * t_0) * (2.0 * (2.0 * A)))) / t_0;
	} else if (B <= 5.2e+176) {
		tmp = (sqrt(2.0) / B) * -sqrt((F * (A + hypot(B, A))));
	} else {
		tmp = sqrt(2.0) * -sqrt((F / B));
	}
	return tmp;
}
B = abs(B)
function code(A, B, C, F)
	t_0 = fma(B, B, Float64(A * Float64(C * -4.0)))
	tmp = 0.0
	if (B <= 5.8e-74)
		tmp = Float64(Float64(-sqrt(Float64(Float64(F * t_0) * Float64(2.0 * Float64(2.0 * A))))) / t_0);
	elseif (B <= 5.2e+176)
		tmp = Float64(Float64(sqrt(2.0) / B) * Float64(-sqrt(Float64(F * Float64(A + hypot(B, A))))));
	else
		tmp = Float64(sqrt(2.0) * Float64(-sqrt(Float64(F / B))));
	end
	return tmp
end
NOTE: B should be positive before calling this function
code[A_, B_, C_, F_] := Block[{t$95$0 = N[(B * B + N[(A * N[(C * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, 5.8e-74], N[((-N[Sqrt[N[(N[(F * t$95$0), $MachinePrecision] * N[(2.0 * N[(2.0 * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], If[LessEqual[B, 5.2e+176], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B), $MachinePrecision] * (-N[Sqrt[N[(F * N[(A + N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision], N[(N[Sqrt[2.0], $MachinePrecision] * (-N[Sqrt[N[(F / B), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]]]]
\begin{array}{l}
B = |B|\\
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\\
\mathbf{if}\;B \leq 5.8 \cdot 10^{-74}:\\
\;\;\;\;\frac{-\sqrt{\left(F \cdot t_0\right) \cdot \left(2 \cdot \left(2 \cdot A\right)\right)}}{t_0}\\

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.8e-74 < B < 5.19999999999999981e176

    1. Initial program 23.9%

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

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

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

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

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

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

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

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

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

    if 5.19999999999999981e176 < B

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 36.6% accurate, 2.0× speedup?

\[\begin{array}{l} B = |B|\\ \\ \begin{array}{l} \mathbf{if}\;F \leq 1.75 \cdot 10^{-278}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(-8 \cdot \left({A}^{2} \cdot \left(C \cdot F\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}\\ \mathbf{elif}\;F \leq 4 \cdot 10^{+56}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(A + \mathsf{hypot}\left(B, A\right)\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\ \end{array} \end{array} \]
NOTE: B should be positive before calling this function
(FPCore (A B C F)
 :precision binary64
 (if (<= F 1.75e-278)
   (/
    (- (sqrt (* 2.0 (* -8.0 (* (pow A 2.0) (* C F))))))
    (fma B B (* A (* C -4.0))))
   (if (<= F 4e+56)
     (* (/ (sqrt 2.0) B) (- (sqrt (* F (+ A (hypot B A))))))
     (* (sqrt 2.0) (- (sqrt (/ F B)))))))
B = abs(B);
double code(double A, double B, double C, double F) {
	double tmp;
	if (F <= 1.75e-278) {
		tmp = -sqrt((2.0 * (-8.0 * (pow(A, 2.0) * (C * F))))) / fma(B, B, (A * (C * -4.0)));
	} else if (F <= 4e+56) {
		tmp = (sqrt(2.0) / B) * -sqrt((F * (A + hypot(B, A))));
	} else {
		tmp = sqrt(2.0) * -sqrt((F / B));
	}
	return tmp;
}
B = abs(B)
function code(A, B, C, F)
	tmp = 0.0
	if (F <= 1.75e-278)
		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(-8.0 * Float64((A ^ 2.0) * Float64(C * F)))))) / fma(B, B, Float64(A * Float64(C * -4.0))));
	elseif (F <= 4e+56)
		tmp = Float64(Float64(sqrt(2.0) / B) * Float64(-sqrt(Float64(F * Float64(A + hypot(B, A))))));
	else
		tmp = Float64(sqrt(2.0) * Float64(-sqrt(Float64(F / B))));
	end
	return tmp
end
NOTE: B should be positive before calling this function
code[A_, B_, C_, F_] := If[LessEqual[F, 1.75e-278], N[((-N[Sqrt[N[(2.0 * N[(-8.0 * N[(N[Power[A, 2.0], $MachinePrecision] * N[(C * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / N[(B * B + N[(A * N[(C * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4e+56], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B), $MachinePrecision] * (-N[Sqrt[N[(F * N[(A + N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision], N[(N[Sqrt[2.0], $MachinePrecision] * (-N[Sqrt[N[(F / B), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]]]
\begin{array}{l}
B = |B|\\
\\
\begin{array}{l}
\mathbf{if}\;F \leq 1.75 \cdot 10^{-278}:\\
\;\;\;\;\frac{-\sqrt{2 \cdot \left(-8 \cdot \left({A}^{2} \cdot \left(C \cdot F\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if F < 1.74999999999999985e-278

    1. Initial program 17.4%

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

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\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}\right)\right)} \]
      2. expm1-udef11.2%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\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}\right)} - 1} \]
    3. Applied egg-rr18.2%

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

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

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

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

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

    if 1.74999999999999985e-278 < F < 4.00000000000000037e56

    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 0 11.1%

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

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

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

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

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

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

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

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

    if 4.00000000000000037e56 < F

    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 A around 0 6.8%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 36.0% accurate, 2.0× speedup?

\[\begin{array}{l} B = |B|\\ \\ \begin{array}{l} \mathbf{if}\;F \leq 6.6 \cdot 10^{+53}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(A + \mathsf{hypot}\left(B, A\right)\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\ \end{array} \end{array} \]
NOTE: B should be positive before calling this function
(FPCore (A B C F)
 :precision binary64
 (if (<= F 6.6e+53)
   (* (/ (sqrt 2.0) B) (- (sqrt (* F (+ A (hypot B A))))))
   (* (sqrt 2.0) (- (sqrt (/ F B))))))
B = abs(B);
double code(double A, double B, double C, double F) {
	double tmp;
	if (F <= 6.6e+53) {
		tmp = (sqrt(2.0) / B) * -sqrt((F * (A + hypot(B, A))));
	} else {
		tmp = sqrt(2.0) * -sqrt((F / B));
	}
	return tmp;
}
B = Math.abs(B);
public static double code(double A, double B, double C, double F) {
	double tmp;
	if (F <= 6.6e+53) {
		tmp = (Math.sqrt(2.0) / B) * -Math.sqrt((F * (A + Math.hypot(B, A))));
	} else {
		tmp = Math.sqrt(2.0) * -Math.sqrt((F / B));
	}
	return tmp;
}
B = abs(B)
def code(A, B, C, F):
	tmp = 0
	if F <= 6.6e+53:
		tmp = (math.sqrt(2.0) / B) * -math.sqrt((F * (A + math.hypot(B, A))))
	else:
		tmp = math.sqrt(2.0) * -math.sqrt((F / B))
	return tmp
B = abs(B)
function code(A, B, C, F)
	tmp = 0.0
	if (F <= 6.6e+53)
		tmp = Float64(Float64(sqrt(2.0) / B) * Float64(-sqrt(Float64(F * Float64(A + hypot(B, A))))));
	else
		tmp = Float64(sqrt(2.0) * Float64(-sqrt(Float64(F / B))));
	end
	return tmp
end
B = abs(B)
function tmp_2 = code(A, B, C, F)
	tmp = 0.0;
	if (F <= 6.6e+53)
		tmp = (sqrt(2.0) / B) * -sqrt((F * (A + hypot(B, A))));
	else
		tmp = sqrt(2.0) * -sqrt((F / B));
	end
	tmp_2 = tmp;
end
NOTE: B should be positive before calling this function
code[A_, B_, C_, F_] := If[LessEqual[F, 6.6e+53], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B), $MachinePrecision] * (-N[Sqrt[N[(F * N[(A + N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision], N[(N[Sqrt[2.0], $MachinePrecision] * (-N[Sqrt[N[(F / B), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]]
\begin{array}{l}
B = |B|\\
\\
\begin{array}{l}
\mathbf{if}\;F \leq 6.6 \cdot 10^{+53}:\\
\;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(A + \mathsf{hypot}\left(B, A\right)\right)}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if F < 6.6000000000000004e53

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

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

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

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

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

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

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

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

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

    if 6.6000000000000004e53 < F

    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 A around 0 6.8%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 35.7% accurate, 3.0× speedup?

\[\begin{array}{l} B = |B|\\ \\ \begin{array}{l} \mathbf{if}\;F \leq 3.8 \cdot 10^{+63}:\\ \;\;\;\;\frac{-\sqrt{\left(2 \cdot F\right) \cdot \left(C + \mathsf{hypot}\left(C, B\right)\right)}}{B}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\ \end{array} \end{array} \]
NOTE: B should be positive before calling this function
(FPCore (A B C F)
 :precision binary64
 (if (<= F 3.8e+63)
   (/ (- (sqrt (* (* 2.0 F) (+ C (hypot C B))))) B)
   (* (sqrt 2.0) (- (sqrt (/ F B))))))
B = abs(B);
double code(double A, double B, double C, double F) {
	double tmp;
	if (F <= 3.8e+63) {
		tmp = -sqrt(((2.0 * F) * (C + hypot(C, B)))) / B;
	} else {
		tmp = sqrt(2.0) * -sqrt((F / B));
	}
	return tmp;
}
B = Math.abs(B);
public static double code(double A, double B, double C, double F) {
	double tmp;
	if (F <= 3.8e+63) {
		tmp = -Math.sqrt(((2.0 * F) * (C + Math.hypot(C, B)))) / B;
	} else {
		tmp = Math.sqrt(2.0) * -Math.sqrt((F / B));
	}
	return tmp;
}
B = abs(B)
def code(A, B, C, F):
	tmp = 0
	if F <= 3.8e+63:
		tmp = -math.sqrt(((2.0 * F) * (C + math.hypot(C, B)))) / B
	else:
		tmp = math.sqrt(2.0) * -math.sqrt((F / B))
	return tmp
B = abs(B)
function code(A, B, C, F)
	tmp = 0.0
	if (F <= 3.8e+63)
		tmp = Float64(Float64(-sqrt(Float64(Float64(2.0 * F) * Float64(C + hypot(C, B))))) / B);
	else
		tmp = Float64(sqrt(2.0) * Float64(-sqrt(Float64(F / B))));
	end
	return tmp
end
B = abs(B)
function tmp_2 = code(A, B, C, F)
	tmp = 0.0;
	if (F <= 3.8e+63)
		tmp = -sqrt(((2.0 * F) * (C + hypot(C, B)))) / B;
	else
		tmp = sqrt(2.0) * -sqrt((F / B));
	end
	tmp_2 = tmp;
end
NOTE: B should be positive before calling this function
code[A_, B_, C_, F_] := If[LessEqual[F, 3.8e+63], N[((-N[Sqrt[N[(N[(2.0 * F), $MachinePrecision] * N[(C + N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / B), $MachinePrecision], N[(N[Sqrt[2.0], $MachinePrecision] * (-N[Sqrt[N[(F / B), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]]
\begin{array}{l}
B = |B|\\
\\
\begin{array}{l}
\mathbf{if}\;F \leq 3.8 \cdot 10^{+63}:\\
\;\;\;\;\frac{-\sqrt{\left(2 \cdot F\right) \cdot \left(C + \mathsf{hypot}\left(C, B\right)\right)}}{B}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if F < 3.8000000000000001e63

    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 A around 0 8.6%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(-\frac{{\left(2 \cdot \left(F \cdot \left(C + \mathsf{hypot}\left(B, C\right)\right)\right)\right)}^{0.5}}{B}\right)\right)} \]
      2. expm1-log1p20.1%

        \[\leadsto \color{blue}{-\frac{{\left(2 \cdot \left(F \cdot \left(C + \mathsf{hypot}\left(B, C\right)\right)\right)\right)}^{0.5}}{B}} \]
      3. distribute-neg-frac20.1%

        \[\leadsto \color{blue}{\frac{-{\left(2 \cdot \left(F \cdot \left(C + \mathsf{hypot}\left(B, C\right)\right)\right)\right)}^{0.5}}{B}} \]
      4. unpow1/219.8%

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

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

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

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

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

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

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

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

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

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

    if 3.8000000000000001e63 < F

    1. Initial program 16.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 A around 0 6.9%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 34.1% accurate, 3.0× speedup?

\[\begin{array}{l} B = |B|\\ \\ \begin{array}{l} \mathbf{if}\;F \leq 0.0025:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{B \cdot F}\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\ \end{array} \end{array} \]
NOTE: B should be positive before calling this function
(FPCore (A B C F)
 :precision binary64
 (if (<= F 0.0025)
   (* (/ (sqrt 2.0) B) (- (sqrt (* B F))))
   (* (sqrt 2.0) (- (sqrt (/ F B))))))
B = abs(B);
double code(double A, double B, double C, double F) {
	double tmp;
	if (F <= 0.0025) {
		tmp = (sqrt(2.0) / B) * -sqrt((B * F));
	} else {
		tmp = sqrt(2.0) * -sqrt((F / B));
	}
	return tmp;
}
NOTE: B should be positive 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 (f <= 0.0025d0) then
        tmp = (sqrt(2.0d0) / b) * -sqrt((b * f))
    else
        tmp = sqrt(2.0d0) * -sqrt((f / b))
    end if
    code = tmp
end function
B = Math.abs(B);
public static double code(double A, double B, double C, double F) {
	double tmp;
	if (F <= 0.0025) {
		tmp = (Math.sqrt(2.0) / B) * -Math.sqrt((B * F));
	} else {
		tmp = Math.sqrt(2.0) * -Math.sqrt((F / B));
	}
	return tmp;
}
B = abs(B)
def code(A, B, C, F):
	tmp = 0
	if F <= 0.0025:
		tmp = (math.sqrt(2.0) / B) * -math.sqrt((B * F))
	else:
		tmp = math.sqrt(2.0) * -math.sqrt((F / B))
	return tmp
B = abs(B)
function code(A, B, C, F)
	tmp = 0.0
	if (F <= 0.0025)
		tmp = Float64(Float64(sqrt(2.0) / B) * Float64(-sqrt(Float64(B * F))));
	else
		tmp = Float64(sqrt(2.0) * Float64(-sqrt(Float64(F / B))));
	end
	return tmp
end
B = abs(B)
function tmp_2 = code(A, B, C, F)
	tmp = 0.0;
	if (F <= 0.0025)
		tmp = (sqrt(2.0) / B) * -sqrt((B * F));
	else
		tmp = sqrt(2.0) * -sqrt((F / B));
	end
	tmp_2 = tmp;
end
NOTE: B should be positive before calling this function
code[A_, B_, C_, F_] := If[LessEqual[F, 0.0025], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B), $MachinePrecision] * (-N[Sqrt[N[(B * F), $MachinePrecision]], $MachinePrecision])), $MachinePrecision], N[(N[Sqrt[2.0], $MachinePrecision] * (-N[Sqrt[N[(F / B), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]]
\begin{array}{l}
B = |B|\\
\\
\begin{array}{l}
\mathbf{if}\;F \leq 0.0025:\\
\;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{B \cdot F}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if F < 0.00250000000000000005

    1. Initial program 19.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 A around 0 7.3%

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

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

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

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

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

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

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

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

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

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

    if 0.00250000000000000005 < F

    1. Initial program 17.1%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq 0.0025:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{B \cdot F}\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\ \end{array} \]

Alternative 13: 26.7% accurate, 3.1× speedup?

\[\begin{array}{l} B = |B|\\ \\ \sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right) \end{array} \]
NOTE: B should be positive before calling this function
(FPCore (A B C F) :precision binary64 (* (sqrt 2.0) (- (sqrt (/ F B)))))
B = abs(B);
double code(double A, double B, double C, double F) {
	return sqrt(2.0) * -sqrt((F / B));
}
NOTE: B should be positive 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(2.0d0) * -sqrt((f / b))
end function
B = Math.abs(B);
public static double code(double A, double B, double C, double F) {
	return Math.sqrt(2.0) * -Math.sqrt((F / B));
}
B = abs(B)
def code(A, B, C, F):
	return math.sqrt(2.0) * -math.sqrt((F / B))
B = abs(B)
function code(A, B, C, F)
	return Float64(sqrt(2.0) * Float64(-sqrt(Float64(F / B))))
end
B = abs(B)
function tmp = code(A, B, C, F)
	tmp = sqrt(2.0) * -sqrt((F / B));
end
NOTE: B should be positive before calling this function
code[A_, B_, C_, F_] := N[(N[Sqrt[2.0], $MachinePrecision] * (-N[Sqrt[N[(F / B), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]
\begin{array}{l}
B = |B|\\
\\
\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)
\end{array}
Derivation
  1. Initial program 18.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 4.6% accurate, 5.9× speedup?

\[\begin{array}{l} B = |B|\\ \\ \frac{-2}{B} \cdot \sqrt{C \cdot F} \end{array} \]
NOTE: B should be positive before calling this function
(FPCore (A B C F) :precision binary64 (* (/ (- 2.0) B) (sqrt (* C F))))
B = abs(B);
double code(double A, double B, double C, double F) {
	return (-2.0 / B) * sqrt((C * F));
}
NOTE: B should be positive before calling this function
real(8) function code(a, b, c, f)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: f
    code = (-2.0d0 / b) * sqrt((c * f))
end function
B = Math.abs(B);
public static double code(double A, double B, double C, double F) {
	return (-2.0 / B) * Math.sqrt((C * F));
}
B = abs(B)
def code(A, B, C, F):
	return (-2.0 / B) * math.sqrt((C * F))
B = abs(B)
function code(A, B, C, F)
	return Float64(Float64(Float64(-2.0) / B) * sqrt(Float64(C * F)))
end
B = abs(B)
function tmp = code(A, B, C, F)
	tmp = (-2.0 / B) * sqrt((C * F));
end
NOTE: B should be positive before calling this function
code[A_, B_, C_, F_] := N[(N[((-2.0) / B), $MachinePrecision] * N[Sqrt[N[(C * F), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
B = |B|\\
\\
\frac{-2}{B} \cdot \sqrt{C \cdot F}
\end{array}
Derivation
  1. Initial program 18.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Reproduce

?
herbie shell --seed 2023308 
(FPCore (A B C F)
  :name "ABCF->ab-angle a"
  :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))))