ABCF->ab-angle a

Percentage Accurate: 18.8% → 48.0%
Time: 53.5s
Alternatives: 15
Speedup: 3.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 15 alternatives:

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

Initial Program: 18.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: 48.0% accurate, 0.6× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ \begin{array}{l} t_0 := \mathsf{fma}\left(B_m, B_m, A \cdot \left(C \cdot -4\right)\right)\\ t_1 := {B_m}^{2} - \left(A \cdot 4\right) \cdot C\\ t_2 := \frac{\sqrt{\left(A + \left(C + \mathsf{hypot}\left(A - C, B_m\right)\right)\right) \cdot \mathsf{fma}\left(B_m, B_m, C \cdot \left(A \cdot -4\right)\right)} \cdot \left(-\sqrt{2 \cdot F}\right)}{\mathsf{fma}\left(B_m, B_m, -4 \cdot \left(A \cdot C\right)\right)}\\ \mathbf{if}\;{B_m}^{2} \leq 2 \cdot 10^{-194}:\\ \;\;\;\;\frac{-\sqrt{\left|\left(2 \cdot C\right) \cdot \left(F \cdot \left(2 \cdot \mathsf{fma}\left(-4, A \cdot C, {B_m}^{2}\right)\right)\right)\right|}}{t_1}\\ \mathbf{elif}\;{B_m}^{2} \leq 10^{-148}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;{B_m}^{2} \leq 10^{-119}:\\ \;\;\;\;\frac{\sqrt{F \cdot \left(2 \cdot t_1\right)} \cdot \left(-\sqrt{2 \cdot C}\right)}{t_1}\\ \mathbf{elif}\;{B_m}^{2} \leq 5 \cdot 10^{-18}:\\ \;\;\;\;\frac{-\sqrt{\left(t_0 \cdot \left(2 \cdot F\right)\right) \cdot \left(A + \left(C + \mathsf{hypot}\left(B_m, A - C\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;{B_m}^{2} \leq 2 \cdot 10^{+136}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\left(\sqrt{C + \mathsf{hypot}\left(B_m, C\right)} \cdot \sqrt{F}\right) \cdot \frac{-\sqrt{\frac{2}{B_m}}}{\sqrt{B_m}}\\ \end{array} \end{array} \]
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
 :precision binary64
 (let* ((t_0 (fma B_m B_m (* A (* C -4.0))))
        (t_1 (- (pow B_m 2.0) (* (* A 4.0) C)))
        (t_2
         (/
          (*
           (sqrt
            (* (+ A (+ C (hypot (- A C) B_m))) (fma B_m B_m (* C (* A -4.0)))))
           (- (sqrt (* 2.0 F))))
          (fma B_m B_m (* -4.0 (* A C))))))
   (if (<= (pow B_m 2.0) 2e-194)
     (/
      (-
       (sqrt
        (fabs (* (* 2.0 C) (* F (* 2.0 (fma -4.0 (* A C) (pow B_m 2.0))))))))
      t_1)
     (if (<= (pow B_m 2.0) 1e-148)
       t_2
       (if (<= (pow B_m 2.0) 1e-119)
         (/ (* (sqrt (* F (* 2.0 t_1))) (- (sqrt (* 2.0 C)))) t_1)
         (if (<= (pow B_m 2.0) 5e-18)
           (/
            (- (sqrt (* (* t_0 (* 2.0 F)) (+ A (+ C (hypot B_m (- A C)))))))
            t_0)
           (if (<= (pow B_m 2.0) 2e+136)
             t_2
             (*
              (* (sqrt (+ C (hypot B_m C))) (sqrt F))
              (/ (- (sqrt (/ 2.0 B_m))) (sqrt B_m))))))))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
	double t_0 = fma(B_m, B_m, (A * (C * -4.0)));
	double t_1 = pow(B_m, 2.0) - ((A * 4.0) * C);
	double t_2 = (sqrt(((A + (C + hypot((A - C), B_m))) * fma(B_m, B_m, (C * (A * -4.0))))) * -sqrt((2.0 * F))) / fma(B_m, B_m, (-4.0 * (A * C)));
	double tmp;
	if (pow(B_m, 2.0) <= 2e-194) {
		tmp = -sqrt(fabs(((2.0 * C) * (F * (2.0 * fma(-4.0, (A * C), pow(B_m, 2.0))))))) / t_1;
	} else if (pow(B_m, 2.0) <= 1e-148) {
		tmp = t_2;
	} else if (pow(B_m, 2.0) <= 1e-119) {
		tmp = (sqrt((F * (2.0 * t_1))) * -sqrt((2.0 * C))) / t_1;
	} else if (pow(B_m, 2.0) <= 5e-18) {
		tmp = -sqrt(((t_0 * (2.0 * F)) * (A + (C + hypot(B_m, (A - C)))))) / t_0;
	} else if (pow(B_m, 2.0) <= 2e+136) {
		tmp = t_2;
	} else {
		tmp = (sqrt((C + hypot(B_m, C))) * sqrt(F)) * (-sqrt((2.0 / B_m)) / sqrt(B_m));
	}
	return tmp;
}
B_m = abs(B)
function code(A, B_m, C, F)
	t_0 = fma(B_m, B_m, Float64(A * Float64(C * -4.0)))
	t_1 = Float64((B_m ^ 2.0) - Float64(Float64(A * 4.0) * C))
	t_2 = Float64(Float64(sqrt(Float64(Float64(A + Float64(C + hypot(Float64(A - C), B_m))) * fma(B_m, B_m, Float64(C * Float64(A * -4.0))))) * Float64(-sqrt(Float64(2.0 * F)))) / fma(B_m, B_m, Float64(-4.0 * Float64(A * C))))
	tmp = 0.0
	if ((B_m ^ 2.0) <= 2e-194)
		tmp = Float64(Float64(-sqrt(abs(Float64(Float64(2.0 * C) * Float64(F * Float64(2.0 * fma(-4.0, Float64(A * C), (B_m ^ 2.0)))))))) / t_1);
	elseif ((B_m ^ 2.0) <= 1e-148)
		tmp = t_2;
	elseif ((B_m ^ 2.0) <= 1e-119)
		tmp = Float64(Float64(sqrt(Float64(F * Float64(2.0 * t_1))) * Float64(-sqrt(Float64(2.0 * C)))) / t_1);
	elseif ((B_m ^ 2.0) <= 5e-18)
		tmp = Float64(Float64(-sqrt(Float64(Float64(t_0 * Float64(2.0 * F)) * Float64(A + Float64(C + hypot(B_m, Float64(A - C))))))) / t_0);
	elseif ((B_m ^ 2.0) <= 2e+136)
		tmp = t_2;
	else
		tmp = Float64(Float64(sqrt(Float64(C + hypot(B_m, C))) * sqrt(F)) * Float64(Float64(-sqrt(Float64(2.0 / B_m))) / sqrt(B_m)));
	end
	return tmp
end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(B$95$m * B$95$m + N[(A * N[(C * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Power[B$95$m, 2.0], $MachinePrecision] - N[(N[(A * 4.0), $MachinePrecision] * C), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[Sqrt[N[(N[(A + N[(C + N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B$95$m ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(B$95$m * B$95$m + N[(C * N[(A * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-N[Sqrt[N[(2.0 * F), $MachinePrecision]], $MachinePrecision])), $MachinePrecision] / N[(B$95$m * B$95$m + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Power[B$95$m, 2.0], $MachinePrecision], 2e-194], N[((-N[Sqrt[N[Abs[N[(N[(2.0 * C), $MachinePrecision] * N[(F * N[(2.0 * N[(-4.0 * N[(A * C), $MachinePrecision] + N[Power[B$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]) / t$95$1), $MachinePrecision], If[LessEqual[N[Power[B$95$m, 2.0], $MachinePrecision], 1e-148], t$95$2, If[LessEqual[N[Power[B$95$m, 2.0], $MachinePrecision], 1e-119], N[(N[(N[Sqrt[N[(F * N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-N[Sqrt[N[(2.0 * C), $MachinePrecision]], $MachinePrecision])), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[N[Power[B$95$m, 2.0], $MachinePrecision], 5e-18], N[((-N[Sqrt[N[(N[(t$95$0 * N[(2.0 * F), $MachinePrecision]), $MachinePrecision] * N[(A + N[(C + N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], If[LessEqual[N[Power[B$95$m, 2.0], $MachinePrecision], 2e+136], t$95$2, N[(N[(N[Sqrt[N[(C + N[Sqrt[B$95$m ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[F], $MachinePrecision]), $MachinePrecision] * N[((-N[Sqrt[N[(2.0 / B$95$m), $MachinePrecision]], $MachinePrecision]) / N[Sqrt[B$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
B_m = \left|B\right|

\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(B_m, B_m, A \cdot \left(C \cdot -4\right)\right)\\
t_1 := {B_m}^{2} - \left(A \cdot 4\right) \cdot C\\
t_2 := \frac{\sqrt{\left(A + \left(C + \mathsf{hypot}\left(A - C, B_m\right)\right)\right) \cdot \mathsf{fma}\left(B_m, B_m, C \cdot \left(A \cdot -4\right)\right)} \cdot \left(-\sqrt{2 \cdot F}\right)}{\mathsf{fma}\left(B_m, B_m, -4 \cdot \left(A \cdot C\right)\right)}\\
\mathbf{if}\;{B_m}^{2} \leq 2 \cdot 10^{-194}:\\
\;\;\;\;\frac{-\sqrt{\left|\left(2 \cdot C\right) \cdot \left(F \cdot \left(2 \cdot \mathsf{fma}\left(-4, A \cdot C, {B_m}^{2}\right)\right)\right)\right|}}{t_1}\\

\mathbf{elif}\;{B_m}^{2} \leq 10^{-148}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;{B_m}^{2} \leq 10^{-119}:\\
\;\;\;\;\frac{\sqrt{F \cdot \left(2 \cdot t_1\right)} \cdot \left(-\sqrt{2 \cdot C}\right)}{t_1}\\

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

\mathbf{elif}\;{B_m}^{2} \leq 2 \cdot 10^{+136}:\\
\;\;\;\;t_2\\

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


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

    1. Initial program 10.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. Add Preprocessing
    3. Taylor expanded in A around -inf 27.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.00000000000000004e-194 < (pow.f64 B 2) < 9.99999999999999936e-149 or 5.00000000000000036e-18 < (pow.f64 B 2) < 2.00000000000000012e136

    1. Initial program 41.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. Add Preprocessing
    3. Step-by-step derivation
      1. neg-sub041.9%

        \[\leadsto \frac{\color{blue}{0 - \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. div-sub41.9%

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

        \[\leadsto \frac{0}{{B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}} - \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} \]
    4. Applied egg-rr47.2%

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

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

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

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

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

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

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

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

    if 9.99999999999999936e-149 < (pow.f64 B 2) < 1.00000000000000001e-119

    1. Initial program 36.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. Add Preprocessing
    3. Taylor expanded in A around -inf 62.2%

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

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

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

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

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

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

    if 1.00000000000000001e-119 < (pow.f64 B 2) < 5.00000000000000036e-18

    1. Initial program 53.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. Simplified58.4%

      \[\leadsto \color{blue}{\frac{-\sqrt{\left(\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(F \cdot 2\right)\right) \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. Add Preprocessing

    if 2.00000000000000012e136 < (pow.f64 B 2)

    1. Initial program 6.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. Add Preprocessing
    3. 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)} \]
    4. 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. *-commutative6.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;{B}^{2} \leq 2 \cdot 10^{-194}:\\ \;\;\;\;\frac{-\sqrt{\left|\left(2 \cdot C\right) \cdot \left(F \cdot \left(2 \cdot \mathsf{fma}\left(-4, A \cdot C, {B}^{2}\right)\right)\right)\right|}}{{B}^{2} - \left(A \cdot 4\right) \cdot C}\\ \mathbf{elif}\;{B}^{2} \leq 10^{-148}:\\ \;\;\;\;\frac{\sqrt{\left(A + \left(C + \mathsf{hypot}\left(A - C, B\right)\right)\right) \cdot \mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)} \cdot \left(-\sqrt{2 \cdot F}\right)}{\mathsf{fma}\left(B, B, -4 \cdot \left(A \cdot C\right)\right)}\\ \mathbf{elif}\;{B}^{2} \leq 10^{-119}:\\ \;\;\;\;\frac{\sqrt{F \cdot \left(2 \cdot \left({B}^{2} - \left(A \cdot 4\right) \cdot C\right)\right)} \cdot \left(-\sqrt{2 \cdot C}\right)}{{B}^{2} - \left(A \cdot 4\right) \cdot C}\\ \mathbf{elif}\;{B}^{2} \leq 5 \cdot 10^{-18}:\\ \;\;\;\;\frac{-\sqrt{\left(\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(2 \cdot F\right)\right) \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)}\\ \mathbf{elif}\;{B}^{2} \leq 2 \cdot 10^{+136}:\\ \;\;\;\;\frac{\sqrt{\left(A + \left(C + \mathsf{hypot}\left(A - C, B\right)\right)\right) \cdot \mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)} \cdot \left(-\sqrt{2 \cdot F}\right)}{\mathsf{fma}\left(B, B, -4 \cdot \left(A \cdot C\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(\sqrt{C + \mathsf{hypot}\left(B, C\right)} \cdot \sqrt{F}\right) \cdot \frac{-\sqrt{\frac{2}{B}}}{\sqrt{B}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 47.3% accurate, 0.9× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ \begin{array}{l} t_0 := {B_m}^{2} - \left(A \cdot 4\right) \cdot C\\ t_1 := \mathsf{fma}\left(B_m, B_m, -4 \cdot \left(A \cdot C\right)\right)\\ \mathbf{if}\;{B_m}^{2} \leq 4 \cdot 10^{-197}:\\ \;\;\;\;\frac{-\sqrt{\left(2 \cdot \left(t_0 \cdot F\right)\right) \cdot \left(-0.5 \cdot \frac{{B_m}^{2}}{A} + 2 \cdot C\right)}}{t_0}\\ \mathbf{elif}\;{B_m}^{2} \leq 10^{+61}:\\ \;\;\;\;\frac{-\sqrt{\left(2 \cdot F\right) \cdot \left(t_1 \cdot \left(C + \left(A + \mathsf{hypot}\left(B_m, A - C\right)\right)\right)\right)}}{t_1}\\ \mathbf{else}:\\ \;\;\;\;\left(\sqrt{C + \mathsf{hypot}\left(B_m, C\right)} \cdot \sqrt{F}\right) \cdot \frac{-\sqrt{\frac{2}{B_m}}}{\sqrt{B_m}}\\ \end{array} \end{array} \]
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
 :precision binary64
 (let* ((t_0 (- (pow B_m 2.0) (* (* A 4.0) C)))
        (t_1 (fma B_m B_m (* -4.0 (* A C)))))
   (if (<= (pow B_m 2.0) 4e-197)
     (/
      (-
       (sqrt (* (* 2.0 (* t_0 F)) (+ (* -0.5 (/ (pow B_m 2.0) A)) (* 2.0 C)))))
      t_0)
     (if (<= (pow B_m 2.0) 1e+61)
       (/ (- (sqrt (* (* 2.0 F) (* t_1 (+ C (+ A (hypot B_m (- A C)))))))) t_1)
       (*
        (* (sqrt (+ C (hypot B_m C))) (sqrt F))
        (/ (- (sqrt (/ 2.0 B_m))) (sqrt B_m)))))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
	double t_0 = pow(B_m, 2.0) - ((A * 4.0) * C);
	double t_1 = fma(B_m, B_m, (-4.0 * (A * C)));
	double tmp;
	if (pow(B_m, 2.0) <= 4e-197) {
		tmp = -sqrt(((2.0 * (t_0 * F)) * ((-0.5 * (pow(B_m, 2.0) / A)) + (2.0 * C)))) / t_0;
	} else if (pow(B_m, 2.0) <= 1e+61) {
		tmp = -sqrt(((2.0 * F) * (t_1 * (C + (A + hypot(B_m, (A - C))))))) / t_1;
	} else {
		tmp = (sqrt((C + hypot(B_m, C))) * sqrt(F)) * (-sqrt((2.0 / B_m)) / sqrt(B_m));
	}
	return tmp;
}
B_m = abs(B)
function code(A, B_m, C, F)
	t_0 = Float64((B_m ^ 2.0) - Float64(Float64(A * 4.0) * C))
	t_1 = fma(B_m, B_m, Float64(-4.0 * Float64(A * C)))
	tmp = 0.0
	if ((B_m ^ 2.0) <= 4e-197)
		tmp = Float64(Float64(-sqrt(Float64(Float64(2.0 * Float64(t_0 * F)) * Float64(Float64(-0.5 * Float64((B_m ^ 2.0) / A)) + Float64(2.0 * C))))) / t_0);
	elseif ((B_m ^ 2.0) <= 1e+61)
		tmp = Float64(Float64(-sqrt(Float64(Float64(2.0 * F) * Float64(t_1 * Float64(C + Float64(A + hypot(B_m, Float64(A - C)))))))) / t_1);
	else
		tmp = Float64(Float64(sqrt(Float64(C + hypot(B_m, C))) * sqrt(F)) * Float64(Float64(-sqrt(Float64(2.0 / B_m))) / sqrt(B_m)));
	end
	return tmp
end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(N[Power[B$95$m, 2.0], $MachinePrecision] - N[(N[(A * 4.0), $MachinePrecision] * C), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(B$95$m * B$95$m + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Power[B$95$m, 2.0], $MachinePrecision], 4e-197], N[((-N[Sqrt[N[(N[(2.0 * N[(t$95$0 * F), $MachinePrecision]), $MachinePrecision] * N[(N[(-0.5 * N[(N[Power[B$95$m, 2.0], $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision] + N[(2.0 * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], If[LessEqual[N[Power[B$95$m, 2.0], $MachinePrecision], 1e+61], N[((-N[Sqrt[N[(N[(2.0 * F), $MachinePrecision] * N[(t$95$1 * N[(C + N[(A + N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$1), $MachinePrecision], N[(N[(N[Sqrt[N[(C + N[Sqrt[B$95$m ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[F], $MachinePrecision]), $MachinePrecision] * N[((-N[Sqrt[N[(2.0 / B$95$m), $MachinePrecision]], $MachinePrecision]) / N[Sqrt[B$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
B_m = \left|B\right|

\\
\begin{array}{l}
t_0 := {B_m}^{2} - \left(A \cdot 4\right) \cdot C\\
t_1 := \mathsf{fma}\left(B_m, B_m, -4 \cdot \left(A \cdot C\right)\right)\\
\mathbf{if}\;{B_m}^{2} \leq 4 \cdot 10^{-197}:\\
\;\;\;\;\frac{-\sqrt{\left(2 \cdot \left(t_0 \cdot F\right)\right) \cdot \left(-0.5 \cdot \frac{{B_m}^{2}}{A} + 2 \cdot C\right)}}{t_0}\\

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

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


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

    1. Initial program 10.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. Add Preprocessing
    3. Taylor expanded in A around -inf 28.2%

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

    if 3.9999999999999999e-197 < (pow.f64 B 2) < 9.99999999999999949e60

    1. Initial program 46.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. Add Preprocessing
    3. Step-by-step derivation
      1. neg-sub046.9%

        \[\leadsto \frac{\color{blue}{0 - \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. div-sub46.9%

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

        \[\leadsto \frac{0}{{B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}} - \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} \]
    4. Applied egg-rr53.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.99999999999999949e60 < (pow.f64 B 2)

    1. Initial program 13.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. Add Preprocessing
    3. Taylor expanded in A around 0 10.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 47.7% accurate, 0.9× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ \begin{array}{l} t_0 := \mathsf{fma}\left(B_m, B_m, -4 \cdot \left(A \cdot C\right)\right)\\ \mathbf{if}\;{B_m}^{2} \leq 4 \cdot 10^{-197}:\\ \;\;\;\;\frac{-\sqrt{\left|\left(2 \cdot C\right) \cdot \left(F \cdot \left(2 \cdot \mathsf{fma}\left(-4, A \cdot C, {B_m}^{2}\right)\right)\right)\right|}}{{B_m}^{2} - \left(A \cdot 4\right) \cdot C}\\ \mathbf{elif}\;{B_m}^{2} \leq 10^{+61}:\\ \;\;\;\;\frac{-\sqrt{\left(2 \cdot F\right) \cdot \left(t_0 \cdot \left(C + \left(A + \mathsf{hypot}\left(B_m, A - C\right)\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\left(\sqrt{C + \mathsf{hypot}\left(B_m, C\right)} \cdot \sqrt{F}\right) \cdot \frac{-\sqrt{\frac{2}{B_m}}}{\sqrt{B_m}}\\ \end{array} \end{array} \]
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
 :precision binary64
 (let* ((t_0 (fma B_m B_m (* -4.0 (* A C)))))
   (if (<= (pow B_m 2.0) 4e-197)
     (/
      (-
       (sqrt
        (fabs (* (* 2.0 C) (* F (* 2.0 (fma -4.0 (* A C) (pow B_m 2.0))))))))
      (- (pow B_m 2.0) (* (* A 4.0) C)))
     (if (<= (pow B_m 2.0) 1e+61)
       (/ (- (sqrt (* (* 2.0 F) (* t_0 (+ C (+ A (hypot B_m (- A C)))))))) t_0)
       (*
        (* (sqrt (+ C (hypot B_m C))) (sqrt F))
        (/ (- (sqrt (/ 2.0 B_m))) (sqrt B_m)))))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
	double t_0 = fma(B_m, B_m, (-4.0 * (A * C)));
	double tmp;
	if (pow(B_m, 2.0) <= 4e-197) {
		tmp = -sqrt(fabs(((2.0 * C) * (F * (2.0 * fma(-4.0, (A * C), pow(B_m, 2.0))))))) / (pow(B_m, 2.0) - ((A * 4.0) * C));
	} else if (pow(B_m, 2.0) <= 1e+61) {
		tmp = -sqrt(((2.0 * F) * (t_0 * (C + (A + hypot(B_m, (A - C))))))) / t_0;
	} else {
		tmp = (sqrt((C + hypot(B_m, C))) * sqrt(F)) * (-sqrt((2.0 / B_m)) / sqrt(B_m));
	}
	return tmp;
}
B_m = abs(B)
function code(A, B_m, C, F)
	t_0 = fma(B_m, B_m, Float64(-4.0 * Float64(A * C)))
	tmp = 0.0
	if ((B_m ^ 2.0) <= 4e-197)
		tmp = Float64(Float64(-sqrt(abs(Float64(Float64(2.0 * C) * Float64(F * Float64(2.0 * fma(-4.0, Float64(A * C), (B_m ^ 2.0)))))))) / Float64((B_m ^ 2.0) - Float64(Float64(A * 4.0) * C)));
	elseif ((B_m ^ 2.0) <= 1e+61)
		tmp = Float64(Float64(-sqrt(Float64(Float64(2.0 * F) * Float64(t_0 * Float64(C + Float64(A + hypot(B_m, Float64(A - C)))))))) / t_0);
	else
		tmp = Float64(Float64(sqrt(Float64(C + hypot(B_m, C))) * sqrt(F)) * Float64(Float64(-sqrt(Float64(2.0 / B_m))) / sqrt(B_m)));
	end
	return tmp
end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(B$95$m * B$95$m + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Power[B$95$m, 2.0], $MachinePrecision], 4e-197], N[((-N[Sqrt[N[Abs[N[(N[(2.0 * C), $MachinePrecision] * N[(F * N[(2.0 * N[(-4.0 * N[(A * C), $MachinePrecision] + N[Power[B$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]) / N[(N[Power[B$95$m, 2.0], $MachinePrecision] - N[(N[(A * 4.0), $MachinePrecision] * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Power[B$95$m, 2.0], $MachinePrecision], 1e+61], N[((-N[Sqrt[N[(N[(2.0 * F), $MachinePrecision] * N[(t$95$0 * N[(C + N[(A + N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], N[(N[(N[Sqrt[N[(C + N[Sqrt[B$95$m ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[F], $MachinePrecision]), $MachinePrecision] * N[((-N[Sqrt[N[(2.0 / B$95$m), $MachinePrecision]], $MachinePrecision]) / N[Sqrt[B$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
B_m = \left|B\right|

\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(B_m, B_m, -4 \cdot \left(A \cdot C\right)\right)\\
\mathbf{if}\;{B_m}^{2} \leq 4 \cdot 10^{-197}:\\
\;\;\;\;\frac{-\sqrt{\left|\left(2 \cdot C\right) \cdot \left(F \cdot \left(2 \cdot \mathsf{fma}\left(-4, A \cdot C, {B_m}^{2}\right)\right)\right)\right|}}{{B_m}^{2} - \left(A \cdot 4\right) \cdot C}\\

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

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


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

    1. Initial program 10.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. Add Preprocessing
    3. Taylor expanded in A around -inf 28.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} \]
    4. Step-by-step derivation
      1. add-sqr-sqrt28.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.9999999999999999e-197 < (pow.f64 B 2) < 9.99999999999999949e60

    1. Initial program 46.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. Add Preprocessing
    3. Step-by-step derivation
      1. neg-sub046.9%

        \[\leadsto \frac{\color{blue}{0 - \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. div-sub46.9%

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

        \[\leadsto \frac{0}{{B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}} - \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} \]
    4. Applied egg-rr53.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.99999999999999949e60 < (pow.f64 B 2)

    1. Initial program 13.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. Add Preprocessing
    3. Taylor expanded in A around 0 10.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 48.0% accurate, 1.0× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ \begin{array}{l} t_0 := \mathsf{fma}\left(B_m, B_m, A \cdot \left(C \cdot -4\right)\right)\\ \mathbf{if}\;{B_m}^{2} \leq 4 \cdot 10^{-197}:\\ \;\;\;\;\frac{-\sqrt{\left(2 \cdot C\right) \cdot \left(2 \cdot \left(-4 \cdot \left(F \cdot \left(A \cdot C\right)\right)\right)\right)}}{{B_m}^{2} - \left(A \cdot 4\right) \cdot C}\\ \mathbf{elif}\;{B_m}^{2} \leq 4 \cdot 10^{+87}:\\ \;\;\;\;\frac{-\sqrt{\left(2 \cdot t_0\right) \cdot \left(F \cdot \left(A + \left(C + \mathsf{hypot}\left(A - C, B_m\right)\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\left(\sqrt{C + \mathsf{hypot}\left(B_m, C\right)} \cdot \sqrt{F}\right) \cdot \frac{-\sqrt{2}}{B_m}\\ \end{array} \end{array} \]
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
 :precision binary64
 (let* ((t_0 (fma B_m B_m (* A (* C -4.0)))))
   (if (<= (pow B_m 2.0) 4e-197)
     (/
      (- (sqrt (* (* 2.0 C) (* 2.0 (* -4.0 (* F (* A C)))))))
      (- (pow B_m 2.0) (* (* A 4.0) C)))
     (if (<= (pow B_m 2.0) 4e+87)
       (/ (- (sqrt (* (* 2.0 t_0) (* F (+ A (+ C (hypot (- A C) B_m))))))) t_0)
       (* (* (sqrt (+ C (hypot B_m C))) (sqrt F)) (/ (- (sqrt 2.0)) B_m))))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
	double t_0 = fma(B_m, B_m, (A * (C * -4.0)));
	double tmp;
	if (pow(B_m, 2.0) <= 4e-197) {
		tmp = -sqrt(((2.0 * C) * (2.0 * (-4.0 * (F * (A * C)))))) / (pow(B_m, 2.0) - ((A * 4.0) * C));
	} else if (pow(B_m, 2.0) <= 4e+87) {
		tmp = -sqrt(((2.0 * t_0) * (F * (A + (C + hypot((A - C), B_m)))))) / t_0;
	} else {
		tmp = (sqrt((C + hypot(B_m, C))) * sqrt(F)) * (-sqrt(2.0) / B_m);
	}
	return tmp;
}
B_m = abs(B)
function code(A, B_m, C, F)
	t_0 = fma(B_m, B_m, Float64(A * Float64(C * -4.0)))
	tmp = 0.0
	if ((B_m ^ 2.0) <= 4e-197)
		tmp = Float64(Float64(-sqrt(Float64(Float64(2.0 * C) * Float64(2.0 * Float64(-4.0 * Float64(F * Float64(A * C))))))) / Float64((B_m ^ 2.0) - Float64(Float64(A * 4.0) * C)));
	elseif ((B_m ^ 2.0) <= 4e+87)
		tmp = Float64(Float64(-sqrt(Float64(Float64(2.0 * t_0) * Float64(F * Float64(A + Float64(C + hypot(Float64(A - C), B_m))))))) / t_0);
	else
		tmp = Float64(Float64(sqrt(Float64(C + hypot(B_m, C))) * sqrt(F)) * Float64(Float64(-sqrt(2.0)) / B_m));
	end
	return tmp
end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(B$95$m * B$95$m + N[(A * N[(C * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Power[B$95$m, 2.0], $MachinePrecision], 4e-197], N[((-N[Sqrt[N[(N[(2.0 * C), $MachinePrecision] * N[(2.0 * N[(-4.0 * N[(F * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / N[(N[Power[B$95$m, 2.0], $MachinePrecision] - N[(N[(A * 4.0), $MachinePrecision] * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Power[B$95$m, 2.0], $MachinePrecision], 4e+87], N[((-N[Sqrt[N[(N[(2.0 * t$95$0), $MachinePrecision] * N[(F * N[(A + N[(C + N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B$95$m ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], N[(N[(N[Sqrt[N[(C + N[Sqrt[B$95$m ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[F], $MachinePrecision]), $MachinePrecision] * N[((-N[Sqrt[2.0], $MachinePrecision]) / B$95$m), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
B_m = \left|B\right|

\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(B_m, B_m, A \cdot \left(C \cdot -4\right)\right)\\
\mathbf{if}\;{B_m}^{2} \leq 4 \cdot 10^{-197}:\\
\;\;\;\;\frac{-\sqrt{\left(2 \cdot C\right) \cdot \left(2 \cdot \left(-4 \cdot \left(F \cdot \left(A \cdot C\right)\right)\right)\right)}}{{B_m}^{2} - \left(A \cdot 4\right) \cdot C}\\

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

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


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

    1. Initial program 10.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. Add Preprocessing
    3. Taylor expanded in A around -inf 28.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} \]
    4. Taylor expanded in B around 0 26.2%

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

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

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

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

    if 3.9999999999999999e-197 < (pow.f64 B 2) < 3.9999999999999998e87

    1. Initial program 46.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. Add Preprocessing
    3. Step-by-step derivation
      1. neg-sub046.1%

        \[\leadsto \frac{\color{blue}{0 - \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. div-sub46.1%

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

        \[\leadsto \frac{0}{{B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}} - \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} \]
    4. Applied egg-rr51.6%

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

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

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

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

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

    if 3.9999999999999998e87 < (pow.f64 B 2)

    1. Initial program 9.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. Add Preprocessing
    3. Taylor expanded in A around 0 8.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 47.3% accurate, 1.0× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ \begin{array}{l} t_0 := \mathsf{fma}\left(B_m, B_m, -4 \cdot \left(A \cdot C\right)\right)\\ \mathbf{if}\;{B_m}^{2} \leq 4 \cdot 10^{-197}:\\ \;\;\;\;\frac{-\sqrt{\left(2 \cdot C\right) \cdot \left(2 \cdot \left(-4 \cdot \left(F \cdot \left(A \cdot C\right)\right)\right)\right)}}{{B_m}^{2} - \left(A \cdot 4\right) \cdot C}\\ \mathbf{elif}\;{B_m}^{2} \leq 10^{+61}:\\ \;\;\;\;\frac{-\sqrt{\left(2 \cdot F\right) \cdot \left(t_0 \cdot \left(C + \left(A + \mathsf{hypot}\left(B_m, A - C\right)\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\left(\sqrt{C + \mathsf{hypot}\left(B_m, C\right)} \cdot \sqrt{F}\right) \cdot \frac{-\sqrt{2}}{B_m}\\ \end{array} \end{array} \]
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
 :precision binary64
 (let* ((t_0 (fma B_m B_m (* -4.0 (* A C)))))
   (if (<= (pow B_m 2.0) 4e-197)
     (/
      (- (sqrt (* (* 2.0 C) (* 2.0 (* -4.0 (* F (* A C)))))))
      (- (pow B_m 2.0) (* (* A 4.0) C)))
     (if (<= (pow B_m 2.0) 1e+61)
       (/ (- (sqrt (* (* 2.0 F) (* t_0 (+ C (+ A (hypot B_m (- A C)))))))) t_0)
       (* (* (sqrt (+ C (hypot B_m C))) (sqrt F)) (/ (- (sqrt 2.0)) B_m))))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
	double t_0 = fma(B_m, B_m, (-4.0 * (A * C)));
	double tmp;
	if (pow(B_m, 2.0) <= 4e-197) {
		tmp = -sqrt(((2.0 * C) * (2.0 * (-4.0 * (F * (A * C)))))) / (pow(B_m, 2.0) - ((A * 4.0) * C));
	} else if (pow(B_m, 2.0) <= 1e+61) {
		tmp = -sqrt(((2.0 * F) * (t_0 * (C + (A + hypot(B_m, (A - C))))))) / t_0;
	} else {
		tmp = (sqrt((C + hypot(B_m, C))) * sqrt(F)) * (-sqrt(2.0) / B_m);
	}
	return tmp;
}
B_m = abs(B)
function code(A, B_m, C, F)
	t_0 = fma(B_m, B_m, Float64(-4.0 * Float64(A * C)))
	tmp = 0.0
	if ((B_m ^ 2.0) <= 4e-197)
		tmp = Float64(Float64(-sqrt(Float64(Float64(2.0 * C) * Float64(2.0 * Float64(-4.0 * Float64(F * Float64(A * C))))))) / Float64((B_m ^ 2.0) - Float64(Float64(A * 4.0) * C)));
	elseif ((B_m ^ 2.0) <= 1e+61)
		tmp = Float64(Float64(-sqrt(Float64(Float64(2.0 * F) * Float64(t_0 * Float64(C + Float64(A + hypot(B_m, Float64(A - C)))))))) / t_0);
	else
		tmp = Float64(Float64(sqrt(Float64(C + hypot(B_m, C))) * sqrt(F)) * Float64(Float64(-sqrt(2.0)) / B_m));
	end
	return tmp
end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(B$95$m * B$95$m + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Power[B$95$m, 2.0], $MachinePrecision], 4e-197], N[((-N[Sqrt[N[(N[(2.0 * C), $MachinePrecision] * N[(2.0 * N[(-4.0 * N[(F * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / N[(N[Power[B$95$m, 2.0], $MachinePrecision] - N[(N[(A * 4.0), $MachinePrecision] * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Power[B$95$m, 2.0], $MachinePrecision], 1e+61], N[((-N[Sqrt[N[(N[(2.0 * F), $MachinePrecision] * N[(t$95$0 * N[(C + N[(A + N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], N[(N[(N[Sqrt[N[(C + N[Sqrt[B$95$m ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[F], $MachinePrecision]), $MachinePrecision] * N[((-N[Sqrt[2.0], $MachinePrecision]) / B$95$m), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
B_m = \left|B\right|

\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(B_m, B_m, -4 \cdot \left(A \cdot C\right)\right)\\
\mathbf{if}\;{B_m}^{2} \leq 4 \cdot 10^{-197}:\\
\;\;\;\;\frac{-\sqrt{\left(2 \cdot C\right) \cdot \left(2 \cdot \left(-4 \cdot \left(F \cdot \left(A \cdot C\right)\right)\right)\right)}}{{B_m}^{2} - \left(A \cdot 4\right) \cdot C}\\

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

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


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

    1. Initial program 10.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. Add Preprocessing
    3. Taylor expanded in A around -inf 28.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} \]
    4. Taylor expanded in B around 0 26.2%

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

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

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

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

    if 3.9999999999999999e-197 < (pow.f64 B 2) < 9.99999999999999949e60

    1. Initial program 46.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. Add Preprocessing
    3. Step-by-step derivation
      1. neg-sub046.9%

        \[\leadsto \frac{\color{blue}{0 - \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. div-sub46.9%

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

        \[\leadsto \frac{0}{{B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}} - \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} \]
    4. Applied egg-rr53.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.99999999999999949e60 < (pow.f64 B 2)

    1. Initial program 13.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. Add Preprocessing
    3. Taylor expanded in A around 0 10.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 47.3% accurate, 1.0× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ \begin{array}{l} t_0 := {B_m}^{2} - \left(A \cdot 4\right) \cdot C\\ t_1 := \mathsf{fma}\left(B_m, B_m, -4 \cdot \left(A \cdot C\right)\right)\\ \mathbf{if}\;{B_m}^{2} \leq 4 \cdot 10^{-197}:\\ \;\;\;\;\frac{-\sqrt{\left(2 \cdot \left(t_0 \cdot F\right)\right) \cdot \left(-0.5 \cdot \frac{{B_m}^{2}}{A} + 2 \cdot C\right)}}{t_0}\\ \mathbf{elif}\;{B_m}^{2} \leq 10^{+61}:\\ \;\;\;\;\frac{-\sqrt{\left(2 \cdot F\right) \cdot \left(t_1 \cdot \left(C + \left(A + \mathsf{hypot}\left(B_m, A - C\right)\right)\right)\right)}}{t_1}\\ \mathbf{else}:\\ \;\;\;\;\left(\sqrt{C + \mathsf{hypot}\left(B_m, C\right)} \cdot \sqrt{F}\right) \cdot \frac{-\sqrt{2}}{B_m}\\ \end{array} \end{array} \]
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
 :precision binary64
 (let* ((t_0 (- (pow B_m 2.0) (* (* A 4.0) C)))
        (t_1 (fma B_m B_m (* -4.0 (* A C)))))
   (if (<= (pow B_m 2.0) 4e-197)
     (/
      (-
       (sqrt (* (* 2.0 (* t_0 F)) (+ (* -0.5 (/ (pow B_m 2.0) A)) (* 2.0 C)))))
      t_0)
     (if (<= (pow B_m 2.0) 1e+61)
       (/ (- (sqrt (* (* 2.0 F) (* t_1 (+ C (+ A (hypot B_m (- A C)))))))) t_1)
       (* (* (sqrt (+ C (hypot B_m C))) (sqrt F)) (/ (- (sqrt 2.0)) B_m))))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
	double t_0 = pow(B_m, 2.0) - ((A * 4.0) * C);
	double t_1 = fma(B_m, B_m, (-4.0 * (A * C)));
	double tmp;
	if (pow(B_m, 2.0) <= 4e-197) {
		tmp = -sqrt(((2.0 * (t_0 * F)) * ((-0.5 * (pow(B_m, 2.0) / A)) + (2.0 * C)))) / t_0;
	} else if (pow(B_m, 2.0) <= 1e+61) {
		tmp = -sqrt(((2.0 * F) * (t_1 * (C + (A + hypot(B_m, (A - C))))))) / t_1;
	} else {
		tmp = (sqrt((C + hypot(B_m, C))) * sqrt(F)) * (-sqrt(2.0) / B_m);
	}
	return tmp;
}
B_m = abs(B)
function code(A, B_m, C, F)
	t_0 = Float64((B_m ^ 2.0) - Float64(Float64(A * 4.0) * C))
	t_1 = fma(B_m, B_m, Float64(-4.0 * Float64(A * C)))
	tmp = 0.0
	if ((B_m ^ 2.0) <= 4e-197)
		tmp = Float64(Float64(-sqrt(Float64(Float64(2.0 * Float64(t_0 * F)) * Float64(Float64(-0.5 * Float64((B_m ^ 2.0) / A)) + Float64(2.0 * C))))) / t_0);
	elseif ((B_m ^ 2.0) <= 1e+61)
		tmp = Float64(Float64(-sqrt(Float64(Float64(2.0 * F) * Float64(t_1 * Float64(C + Float64(A + hypot(B_m, Float64(A - C)))))))) / t_1);
	else
		tmp = Float64(Float64(sqrt(Float64(C + hypot(B_m, C))) * sqrt(F)) * Float64(Float64(-sqrt(2.0)) / B_m));
	end
	return tmp
end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(N[Power[B$95$m, 2.0], $MachinePrecision] - N[(N[(A * 4.0), $MachinePrecision] * C), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(B$95$m * B$95$m + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Power[B$95$m, 2.0], $MachinePrecision], 4e-197], N[((-N[Sqrt[N[(N[(2.0 * N[(t$95$0 * F), $MachinePrecision]), $MachinePrecision] * N[(N[(-0.5 * N[(N[Power[B$95$m, 2.0], $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision] + N[(2.0 * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], If[LessEqual[N[Power[B$95$m, 2.0], $MachinePrecision], 1e+61], N[((-N[Sqrt[N[(N[(2.0 * F), $MachinePrecision] * N[(t$95$1 * N[(C + N[(A + N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$1), $MachinePrecision], N[(N[(N[Sqrt[N[(C + N[Sqrt[B$95$m ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[F], $MachinePrecision]), $MachinePrecision] * N[((-N[Sqrt[2.0], $MachinePrecision]) / B$95$m), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
B_m = \left|B\right|

\\
\begin{array}{l}
t_0 := {B_m}^{2} - \left(A \cdot 4\right) \cdot C\\
t_1 := \mathsf{fma}\left(B_m, B_m, -4 \cdot \left(A \cdot C\right)\right)\\
\mathbf{if}\;{B_m}^{2} \leq 4 \cdot 10^{-197}:\\
\;\;\;\;\frac{-\sqrt{\left(2 \cdot \left(t_0 \cdot F\right)\right) \cdot \left(-0.5 \cdot \frac{{B_m}^{2}}{A} + 2 \cdot C\right)}}{t_0}\\

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

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


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

    1. Initial program 10.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. Add Preprocessing
    3. Taylor expanded in A around -inf 28.2%

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

    if 3.9999999999999999e-197 < (pow.f64 B 2) < 9.99999999999999949e60

    1. Initial program 46.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. Add Preprocessing
    3. Step-by-step derivation
      1. neg-sub046.9%

        \[\leadsto \frac{\color{blue}{0 - \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. div-sub46.9%

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

        \[\leadsto \frac{0}{{B}^{2} - \color{blue}{4 \cdot \left(A \cdot C\right)}} - \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} \]
    4. Applied egg-rr53.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.99999999999999949e60 < (pow.f64 B 2)

    1. Initial program 13.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. Add Preprocessing
    3. Taylor expanded in A around 0 10.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 45.6% accurate, 1.2× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ \begin{array}{l} t_0 := {B_m}^{2} - \left(A \cdot 4\right) \cdot C\\ \mathbf{if}\;A \leq -1.15 \cdot 10^{+51}:\\ \;\;\;\;\frac{-\sqrt{\left(2 \cdot \left(t_0 \cdot F\right)\right) \cdot \left(-0.5 \cdot \frac{{B_m}^{2}}{A} + 2 \cdot C\right)}}{t_0}\\ \mathbf{elif}\;A \leq 5.9 \cdot 10^{-83}:\\ \;\;\;\;\left(\sqrt{C + \mathsf{hypot}\left(B_m, C\right)} \cdot \sqrt{F}\right) \cdot \frac{-\sqrt{\frac{2}{B_m}}}{\sqrt{B_m}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2 \cdot \left(F \cdot \mathsf{fma}\left(B_m, B_m, A \cdot \left(C \cdot -4\right)\right)\right)} \cdot \left(-\sqrt{A + \left(C + \mathsf{hypot}\left(A - C, B_m\right)\right)}\right)}{t_0}\\ \end{array} \end{array} \]
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
 :precision binary64
 (let* ((t_0 (- (pow B_m 2.0) (* (* A 4.0) C))))
   (if (<= A -1.15e+51)
     (/
      (-
       (sqrt (* (* 2.0 (* t_0 F)) (+ (* -0.5 (/ (pow B_m 2.0) A)) (* 2.0 C)))))
      t_0)
     (if (<= A 5.9e-83)
       (*
        (* (sqrt (+ C (hypot B_m C))) (sqrt F))
        (/ (- (sqrt (/ 2.0 B_m))) (sqrt B_m)))
       (/
        (*
         (sqrt (* 2.0 (* F (fma B_m B_m (* A (* C -4.0))))))
         (- (sqrt (+ A (+ C (hypot (- A C) B_m))))))
        t_0)))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
	double t_0 = pow(B_m, 2.0) - ((A * 4.0) * C);
	double tmp;
	if (A <= -1.15e+51) {
		tmp = -sqrt(((2.0 * (t_0 * F)) * ((-0.5 * (pow(B_m, 2.0) / A)) + (2.0 * C)))) / t_0;
	} else if (A <= 5.9e-83) {
		tmp = (sqrt((C + hypot(B_m, C))) * sqrt(F)) * (-sqrt((2.0 / B_m)) / sqrt(B_m));
	} else {
		tmp = (sqrt((2.0 * (F * fma(B_m, B_m, (A * (C * -4.0)))))) * -sqrt((A + (C + hypot((A - C), B_m))))) / t_0;
	}
	return tmp;
}
B_m = abs(B)
function code(A, B_m, C, F)
	t_0 = Float64((B_m ^ 2.0) - Float64(Float64(A * 4.0) * C))
	tmp = 0.0
	if (A <= -1.15e+51)
		tmp = Float64(Float64(-sqrt(Float64(Float64(2.0 * Float64(t_0 * F)) * Float64(Float64(-0.5 * Float64((B_m ^ 2.0) / A)) + Float64(2.0 * C))))) / t_0);
	elseif (A <= 5.9e-83)
		tmp = Float64(Float64(sqrt(Float64(C + hypot(B_m, C))) * sqrt(F)) * Float64(Float64(-sqrt(Float64(2.0 / B_m))) / sqrt(B_m)));
	else
		tmp = Float64(Float64(sqrt(Float64(2.0 * Float64(F * fma(B_m, B_m, Float64(A * Float64(C * -4.0)))))) * Float64(-sqrt(Float64(A + Float64(C + hypot(Float64(A - C), B_m)))))) / t_0);
	end
	return tmp
end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(N[Power[B$95$m, 2.0], $MachinePrecision] - N[(N[(A * 4.0), $MachinePrecision] * C), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -1.15e+51], N[((-N[Sqrt[N[(N[(2.0 * N[(t$95$0 * F), $MachinePrecision]), $MachinePrecision] * N[(N[(-0.5 * N[(N[Power[B$95$m, 2.0], $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision] + N[(2.0 * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], If[LessEqual[A, 5.9e-83], N[(N[(N[Sqrt[N[(C + N[Sqrt[B$95$m ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[F], $MachinePrecision]), $MachinePrecision] * N[((-N[Sqrt[N[(2.0 / B$95$m), $MachinePrecision]], $MachinePrecision]) / N[Sqrt[B$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[N[(2.0 * N[(F * N[(B$95$m * B$95$m + N[(A * N[(C * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-N[Sqrt[N[(A + N[(C + N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B$95$m ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision] / t$95$0), $MachinePrecision]]]]
\begin{array}{l}
B_m = \left|B\right|

\\
\begin{array}{l}
t_0 := {B_m}^{2} - \left(A \cdot 4\right) \cdot C\\
\mathbf{if}\;A \leq -1.15 \cdot 10^{+51}:\\
\;\;\;\;\frac{-\sqrt{\left(2 \cdot \left(t_0 \cdot F\right)\right) \cdot \left(-0.5 \cdot \frac{{B_m}^{2}}{A} + 2 \cdot C\right)}}{t_0}\\

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

\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{2 \cdot \left(F \cdot \mathsf{fma}\left(B_m, B_m, A \cdot \left(C \cdot -4\right)\right)\right)} \cdot \left(-\sqrt{A + \left(C + \mathsf{hypot}\left(A - C, B_m\right)\right)}\right)}{t_0}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if A < -1.15000000000000003e51

    1. Initial program 3.1%

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

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

    if -1.15000000000000003e51 < A < 5.8999999999999997e-83

    1. Initial program 28.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. Add Preprocessing
    3. Taylor expanded in A around 0 19.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.8999999999999997e-83 < A

    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. Add Preprocessing
    3. Step-by-step derivation
      1. sqrt-prod29.1%

        \[\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) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}}}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
      2. associate-*r*29.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -1.15 \cdot 10^{+51}:\\ \;\;\;\;\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(A \cdot 4\right) \cdot C\right) \cdot F\right)\right) \cdot \left(-0.5 \cdot \frac{{B}^{2}}{A} + 2 \cdot C\right)}}{{B}^{2} - \left(A \cdot 4\right) \cdot C}\\ \mathbf{elif}\;A \leq 5.9 \cdot 10^{-83}:\\ \;\;\;\;\left(\sqrt{C + \mathsf{hypot}\left(B, C\right)} \cdot \sqrt{F}\right) \cdot \frac{-\sqrt{\frac{2}{B}}}{\sqrt{B}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2 \cdot \left(F \cdot \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\right)} \cdot \left(-\sqrt{A + \left(C + \mathsf{hypot}\left(A - C, B\right)\right)}\right)}{{B}^{2} - \left(A \cdot 4\right) \cdot C}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 44.7% accurate, 1.2× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ \begin{array}{l} \mathbf{if}\;{B_m}^{2} \leq 2 \cdot 10^{-194}:\\ \;\;\;\;\frac{-\sqrt{\left(2 \cdot C\right) \cdot \left(2 \cdot \left(-4 \cdot \left(F \cdot \left(A \cdot C\right)\right)\right)\right)}}{{B_m}^{2} - \left(A \cdot 4\right) \cdot C}\\ \mathbf{else}:\\ \;\;\;\;\left(\sqrt{C + \mathsf{hypot}\left(B_m, C\right)} \cdot \sqrt{F}\right) \cdot \frac{-\sqrt{2}}{B_m}\\ \end{array} \end{array} \]
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
 :precision binary64
 (if (<= (pow B_m 2.0) 2e-194)
   (/
    (- (sqrt (* (* 2.0 C) (* 2.0 (* -4.0 (* F (* A C)))))))
    (- (pow B_m 2.0) (* (* A 4.0) C)))
   (* (* (sqrt (+ C (hypot B_m C))) (sqrt F)) (/ (- (sqrt 2.0)) B_m))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
	double tmp;
	if (pow(B_m, 2.0) <= 2e-194) {
		tmp = -sqrt(((2.0 * C) * (2.0 * (-4.0 * (F * (A * C)))))) / (pow(B_m, 2.0) - ((A * 4.0) * C));
	} else {
		tmp = (sqrt((C + hypot(B_m, C))) * sqrt(F)) * (-sqrt(2.0) / B_m);
	}
	return tmp;
}
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
	double tmp;
	if (Math.pow(B_m, 2.0) <= 2e-194) {
		tmp = -Math.sqrt(((2.0 * C) * (2.0 * (-4.0 * (F * (A * C)))))) / (Math.pow(B_m, 2.0) - ((A * 4.0) * C));
	} else {
		tmp = (Math.sqrt((C + Math.hypot(B_m, C))) * Math.sqrt(F)) * (-Math.sqrt(2.0) / B_m);
	}
	return tmp;
}
B_m = math.fabs(B)
def code(A, B_m, C, F):
	tmp = 0
	if math.pow(B_m, 2.0) <= 2e-194:
		tmp = -math.sqrt(((2.0 * C) * (2.0 * (-4.0 * (F * (A * C)))))) / (math.pow(B_m, 2.0) - ((A * 4.0) * C))
	else:
		tmp = (math.sqrt((C + math.hypot(B_m, C))) * math.sqrt(F)) * (-math.sqrt(2.0) / B_m)
	return tmp
B_m = abs(B)
function code(A, B_m, C, F)
	tmp = 0.0
	if ((B_m ^ 2.0) <= 2e-194)
		tmp = Float64(Float64(-sqrt(Float64(Float64(2.0 * C) * Float64(2.0 * Float64(-4.0 * Float64(F * Float64(A * C))))))) / Float64((B_m ^ 2.0) - Float64(Float64(A * 4.0) * C)));
	else
		tmp = Float64(Float64(sqrt(Float64(C + hypot(B_m, C))) * sqrt(F)) * Float64(Float64(-sqrt(2.0)) / B_m));
	end
	return tmp
end
B_m = abs(B);
function tmp_2 = code(A, B_m, C, F)
	tmp = 0.0;
	if ((B_m ^ 2.0) <= 2e-194)
		tmp = -sqrt(((2.0 * C) * (2.0 * (-4.0 * (F * (A * C)))))) / ((B_m ^ 2.0) - ((A * 4.0) * C));
	else
		tmp = (sqrt((C + hypot(B_m, C))) * sqrt(F)) * (-sqrt(2.0) / B_m);
	end
	tmp_2 = tmp;
end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := If[LessEqual[N[Power[B$95$m, 2.0], $MachinePrecision], 2e-194], N[((-N[Sqrt[N[(N[(2.0 * C), $MachinePrecision] * N[(2.0 * N[(-4.0 * N[(F * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / N[(N[Power[B$95$m, 2.0], $MachinePrecision] - N[(N[(A * 4.0), $MachinePrecision] * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[N[(C + N[Sqrt[B$95$m ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[F], $MachinePrecision]), $MachinePrecision] * N[((-N[Sqrt[2.0], $MachinePrecision]) / B$95$m), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|

\\
\begin{array}{l}
\mathbf{if}\;{B_m}^{2} \leq 2 \cdot 10^{-194}:\\
\;\;\;\;\frac{-\sqrt{\left(2 \cdot C\right) \cdot \left(2 \cdot \left(-4 \cdot \left(F \cdot \left(A \cdot C\right)\right)\right)\right)}}{{B_m}^{2} - \left(A \cdot 4\right) \cdot C}\\

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


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

    1. Initial program 10.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. Add Preprocessing
    3. Taylor expanded in A around -inf 27.8%

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

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

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

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

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

    if 2.00000000000000004e-194 < (pow.f64 B 2)

    1. Initial program 25.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. Add Preprocessing
    3. Taylor expanded in A around 0 14.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 42.3% accurate, 2.0× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ \begin{array}{l} \mathbf{if}\;F \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\frac{\sqrt{-F}}{\sqrt{A}}\\ \mathbf{elif}\;F \leq 6.5 \cdot 10^{+102}:\\ \;\;\;\;\frac{\sqrt{2}}{B_m} \cdot \left(-\sqrt{F \cdot \left(C + \mathsf{hypot}\left(B_m, C\right)\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B_m}}\right)\\ \end{array} \end{array} \]
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
 :precision binary64
 (if (<= F -5e-310)
   (/ (sqrt (- F)) (sqrt A))
   (if (<= F 6.5e+102)
     (* (/ (sqrt 2.0) B_m) (- (sqrt (* F (+ C (hypot B_m C))))))
     (* (sqrt 2.0) (- (sqrt (/ F B_m)))))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
	double tmp;
	if (F <= -5e-310) {
		tmp = sqrt(-F) / sqrt(A);
	} else if (F <= 6.5e+102) {
		tmp = (sqrt(2.0) / B_m) * -sqrt((F * (C + hypot(B_m, C))));
	} else {
		tmp = sqrt(2.0) * -sqrt((F / B_m));
	}
	return tmp;
}
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
	double tmp;
	if (F <= -5e-310) {
		tmp = Math.sqrt(-F) / Math.sqrt(A);
	} else if (F <= 6.5e+102) {
		tmp = (Math.sqrt(2.0) / B_m) * -Math.sqrt((F * (C + Math.hypot(B_m, C))));
	} else {
		tmp = Math.sqrt(2.0) * -Math.sqrt((F / B_m));
	}
	return tmp;
}
B_m = math.fabs(B)
def code(A, B_m, C, F):
	tmp = 0
	if F <= -5e-310:
		tmp = math.sqrt(-F) / math.sqrt(A)
	elif F <= 6.5e+102:
		tmp = (math.sqrt(2.0) / B_m) * -math.sqrt((F * (C + math.hypot(B_m, C))))
	else:
		tmp = math.sqrt(2.0) * -math.sqrt((F / B_m))
	return tmp
B_m = abs(B)
function code(A, B_m, C, F)
	tmp = 0.0
	if (F <= -5e-310)
		tmp = Float64(sqrt(Float64(-F)) / sqrt(A));
	elseif (F <= 6.5e+102)
		tmp = Float64(Float64(sqrt(2.0) / B_m) * Float64(-sqrt(Float64(F * Float64(C + hypot(B_m, C))))));
	else
		tmp = Float64(sqrt(2.0) * Float64(-sqrt(Float64(F / B_m))));
	end
	return tmp
end
B_m = abs(B);
function tmp_2 = code(A, B_m, C, F)
	tmp = 0.0;
	if (F <= -5e-310)
		tmp = sqrt(-F) / sqrt(A);
	elseif (F <= 6.5e+102)
		tmp = (sqrt(2.0) / B_m) * -sqrt((F * (C + hypot(B_m, C))));
	else
		tmp = sqrt(2.0) * -sqrt((F / B_m));
	end
	tmp_2 = tmp;
end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := If[LessEqual[F, -5e-310], N[(N[Sqrt[(-F)], $MachinePrecision] / N[Sqrt[A], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6.5e+102], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B$95$m), $MachinePrecision] * (-N[Sqrt[N[(F * N[(C + N[Sqrt[B$95$m ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision], N[(N[Sqrt[2.0], $MachinePrecision] * (-N[Sqrt[N[(F / B$95$m), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]]]
\begin{array}{l}
B_m = \left|B\right|

\\
\begin{array}{l}
\mathbf{if}\;F \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\frac{\sqrt{-F}}{\sqrt{A}}\\

\mathbf{elif}\;F \leq 6.5 \cdot 10^{+102}:\\
\;\;\;\;\frac{\sqrt{2}}{B_m} \cdot \left(-\sqrt{F \cdot \left(C + \mathsf{hypot}\left(B_m, C\right)\right)}\right)\\

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


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

    1. Initial program 25.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. Add Preprocessing
    3. Step-by-step derivation
      1. add-sqr-sqrt25.3%

        \[\leadsto \color{blue}{\sqrt{\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}} \cdot \sqrt{\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. sqrt-unprod25.4%

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

        \[\leadsto \sqrt{\color{blue}{\frac{\left(-\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)}\right) \cdot \left(-\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)}\right)}{\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot \left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)}}} \]
    4. Applied egg-rr24.4%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{\color{blue}{-1 \cdot \frac{F}{A}}} \]
    8. Step-by-step derivation
      1. mul-1-neg51.0%

        \[\leadsto \sqrt{\color{blue}{-\frac{F}{A}}} \]
    9. Simplified51.0%

      \[\leadsto \sqrt{\color{blue}{-\frac{F}{A}}} \]
    10. Step-by-step derivation
      1. distribute-neg-frac51.0%

        \[\leadsto \sqrt{\color{blue}{\frac{-F}{A}}} \]
      2. sqrt-div56.2%

        \[\leadsto \color{blue}{\frac{\sqrt{-F}}{\sqrt{A}}} \]
    11. Applied egg-rr56.2%

      \[\leadsto \color{blue}{\frac{\sqrt{-F}}{\sqrt{A}}} \]

    if -4.999999999999985e-310 < F < 6.5000000000000004e102

    1. Initial program 21.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. Add Preprocessing
    3. Taylor expanded in A around 0 14.3%

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

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

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

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

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

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

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

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

    if 6.5000000000000004e102 < F

    1. Initial program 15.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. Add Preprocessing
    3. Taylor expanded in A around 0 8.2%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\frac{\sqrt{-F}}{\sqrt{A}}\\ \mathbf{elif}\;F \leq 6.5 \cdot 10^{+102}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(C + \mathsf{hypot}\left(B, C\right)\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 42.9% accurate, 2.0× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ \begin{array}{l} \mathbf{if}\;F \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\frac{\sqrt{-F}}{\sqrt{A}}\\ \mathbf{elif}\;F \leq 9.2 \cdot 10^{+46}:\\ \;\;\;\;\frac{\sqrt{2}}{B_m} \cdot \left(-\sqrt{F \cdot \left(A + \mathsf{hypot}\left(B_m, A\right)\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B_m}}\right)\\ \end{array} \end{array} \]
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
 :precision binary64
 (if (<= F -5e-310)
   (/ (sqrt (- F)) (sqrt A))
   (if (<= F 9.2e+46)
     (* (/ (sqrt 2.0) B_m) (- (sqrt (* F (+ A (hypot B_m A))))))
     (* (sqrt 2.0) (- (sqrt (/ F B_m)))))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
	double tmp;
	if (F <= -5e-310) {
		tmp = sqrt(-F) / sqrt(A);
	} else if (F <= 9.2e+46) {
		tmp = (sqrt(2.0) / B_m) * -sqrt((F * (A + hypot(B_m, A))));
	} else {
		tmp = sqrt(2.0) * -sqrt((F / B_m));
	}
	return tmp;
}
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
	double tmp;
	if (F <= -5e-310) {
		tmp = Math.sqrt(-F) / Math.sqrt(A);
	} else if (F <= 9.2e+46) {
		tmp = (Math.sqrt(2.0) / B_m) * -Math.sqrt((F * (A + Math.hypot(B_m, A))));
	} else {
		tmp = Math.sqrt(2.0) * -Math.sqrt((F / B_m));
	}
	return tmp;
}
B_m = math.fabs(B)
def code(A, B_m, C, F):
	tmp = 0
	if F <= -5e-310:
		tmp = math.sqrt(-F) / math.sqrt(A)
	elif F <= 9.2e+46:
		tmp = (math.sqrt(2.0) / B_m) * -math.sqrt((F * (A + math.hypot(B_m, A))))
	else:
		tmp = math.sqrt(2.0) * -math.sqrt((F / B_m))
	return tmp
B_m = abs(B)
function code(A, B_m, C, F)
	tmp = 0.0
	if (F <= -5e-310)
		tmp = Float64(sqrt(Float64(-F)) / sqrt(A));
	elseif (F <= 9.2e+46)
		tmp = Float64(Float64(sqrt(2.0) / B_m) * Float64(-sqrt(Float64(F * Float64(A + hypot(B_m, A))))));
	else
		tmp = Float64(sqrt(2.0) * Float64(-sqrt(Float64(F / B_m))));
	end
	return tmp
end
B_m = abs(B);
function tmp_2 = code(A, B_m, C, F)
	tmp = 0.0;
	if (F <= -5e-310)
		tmp = sqrt(-F) / sqrt(A);
	elseif (F <= 9.2e+46)
		tmp = (sqrt(2.0) / B_m) * -sqrt((F * (A + hypot(B_m, A))));
	else
		tmp = sqrt(2.0) * -sqrt((F / B_m));
	end
	tmp_2 = tmp;
end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := If[LessEqual[F, -5e-310], N[(N[Sqrt[(-F)], $MachinePrecision] / N[Sqrt[A], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 9.2e+46], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B$95$m), $MachinePrecision] * (-N[Sqrt[N[(F * N[(A + N[Sqrt[B$95$m ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision], N[(N[Sqrt[2.0], $MachinePrecision] * (-N[Sqrt[N[(F / B$95$m), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]]]
\begin{array}{l}
B_m = \left|B\right|

\\
\begin{array}{l}
\mathbf{if}\;F \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\frac{\sqrt{-F}}{\sqrt{A}}\\

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

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


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

    1. Initial program 25.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. Add Preprocessing
    3. Step-by-step derivation
      1. add-sqr-sqrt25.3%

        \[\leadsto \color{blue}{\sqrt{\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}} \cdot \sqrt{\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. sqrt-unprod25.4%

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

        \[\leadsto \sqrt{\color{blue}{\frac{\left(-\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)}\right) \cdot \left(-\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)}\right)}{\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot \left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)}}} \]
    4. Applied egg-rr24.4%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{\color{blue}{-1 \cdot \frac{F}{A}}} \]
    8. Step-by-step derivation
      1. mul-1-neg51.0%

        \[\leadsto \sqrt{\color{blue}{-\frac{F}{A}}} \]
    9. Simplified51.0%

      \[\leadsto \sqrt{\color{blue}{-\frac{F}{A}}} \]
    10. Step-by-step derivation
      1. distribute-neg-frac51.0%

        \[\leadsto \sqrt{\color{blue}{\frac{-F}{A}}} \]
      2. sqrt-div56.2%

        \[\leadsto \color{blue}{\frac{\sqrt{-F}}{\sqrt{A}}} \]
    11. Applied egg-rr56.2%

      \[\leadsto \color{blue}{\frac{\sqrt{-F}}{\sqrt{A}}} \]

    if -4.999999999999985e-310 < F < 9.2000000000000002e46

    1. Initial program 20.7%

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

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

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

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

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

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

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

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

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

    if 9.2000000000000002e46 < F

    1. Initial program 17.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. Add Preprocessing
    3. Taylor expanded in A around 0 9.1%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-\sqrt{\frac{F}{B}} \cdot \sqrt{2}} \]
    8. Simplified17.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\frac{\sqrt{-F}}{\sqrt{A}}\\ \mathbf{elif}\;F \leq 9.2 \cdot 10^{+46}:\\ \;\;\;\;\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} \]
  5. Add Preprocessing

Alternative 11: 40.9% accurate, 2.9× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ \begin{array}{l} \mathbf{if}\;F \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\frac{\sqrt{-F}}{\sqrt{A}}\\ \mathbf{elif}\;F \leq 8.5 \cdot 10^{-24}:\\ \;\;\;\;\frac{\sqrt{2}}{B_m} \cdot \left(-\sqrt{B_m \cdot F}\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B_m}}\right)\\ \end{array} \end{array} \]
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
 :precision binary64
 (if (<= F -5e-310)
   (/ (sqrt (- F)) (sqrt A))
   (if (<= F 8.5e-24)
     (* (/ (sqrt 2.0) B_m) (- (sqrt (* B_m F))))
     (* (sqrt 2.0) (- (sqrt (/ F B_m)))))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
	double tmp;
	if (F <= -5e-310) {
		tmp = sqrt(-F) / sqrt(A);
	} else if (F <= 8.5e-24) {
		tmp = (sqrt(2.0) / B_m) * -sqrt((B_m * F));
	} else {
		tmp = sqrt(2.0) * -sqrt((F / B_m));
	}
	return tmp;
}
B_m = abs(B)
real(8) function code(a, b_m, c, f)
    real(8), intent (in) :: a
    real(8), intent (in) :: b_m
    real(8), intent (in) :: c
    real(8), intent (in) :: f
    real(8) :: tmp
    if (f <= (-5d-310)) then
        tmp = sqrt(-f) / sqrt(a)
    else if (f <= 8.5d-24) then
        tmp = (sqrt(2.0d0) / b_m) * -sqrt((b_m * f))
    else
        tmp = sqrt(2.0d0) * -sqrt((f / b_m))
    end if
    code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
	double tmp;
	if (F <= -5e-310) {
		tmp = Math.sqrt(-F) / Math.sqrt(A);
	} else if (F <= 8.5e-24) {
		tmp = (Math.sqrt(2.0) / B_m) * -Math.sqrt((B_m * F));
	} else {
		tmp = Math.sqrt(2.0) * -Math.sqrt((F / B_m));
	}
	return tmp;
}
B_m = math.fabs(B)
def code(A, B_m, C, F):
	tmp = 0
	if F <= -5e-310:
		tmp = math.sqrt(-F) / math.sqrt(A)
	elif F <= 8.5e-24:
		tmp = (math.sqrt(2.0) / B_m) * -math.sqrt((B_m * F))
	else:
		tmp = math.sqrt(2.0) * -math.sqrt((F / B_m))
	return tmp
B_m = abs(B)
function code(A, B_m, C, F)
	tmp = 0.0
	if (F <= -5e-310)
		tmp = Float64(sqrt(Float64(-F)) / sqrt(A));
	elseif (F <= 8.5e-24)
		tmp = Float64(Float64(sqrt(2.0) / B_m) * Float64(-sqrt(Float64(B_m * F))));
	else
		tmp = Float64(sqrt(2.0) * Float64(-sqrt(Float64(F / B_m))));
	end
	return tmp
end
B_m = abs(B);
function tmp_2 = code(A, B_m, C, F)
	tmp = 0.0;
	if (F <= -5e-310)
		tmp = sqrt(-F) / sqrt(A);
	elseif (F <= 8.5e-24)
		tmp = (sqrt(2.0) / B_m) * -sqrt((B_m * F));
	else
		tmp = sqrt(2.0) * -sqrt((F / B_m));
	end
	tmp_2 = tmp;
end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := If[LessEqual[F, -5e-310], N[(N[Sqrt[(-F)], $MachinePrecision] / N[Sqrt[A], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8.5e-24], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B$95$m), $MachinePrecision] * (-N[Sqrt[N[(B$95$m * F), $MachinePrecision]], $MachinePrecision])), $MachinePrecision], N[(N[Sqrt[2.0], $MachinePrecision] * (-N[Sqrt[N[(F / B$95$m), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]]]
\begin{array}{l}
B_m = \left|B\right|

\\
\begin{array}{l}
\mathbf{if}\;F \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\frac{\sqrt{-F}}{\sqrt{A}}\\

\mathbf{elif}\;F \leq 8.5 \cdot 10^{-24}:\\
\;\;\;\;\frac{\sqrt{2}}{B_m} \cdot \left(-\sqrt{B_m \cdot F}\right)\\

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


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

    1. Initial program 25.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. Add Preprocessing
    3. Step-by-step derivation
      1. add-sqr-sqrt25.3%

        \[\leadsto \color{blue}{\sqrt{\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}} \cdot \sqrt{\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. sqrt-unprod25.4%

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

        \[\leadsto \sqrt{\color{blue}{\frac{\left(-\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)}\right) \cdot \left(-\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)}\right)}{\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot \left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)}}} \]
    4. Applied egg-rr24.4%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{\color{blue}{-1 \cdot \frac{F}{A}}} \]
    8. Step-by-step derivation
      1. mul-1-neg51.0%

        \[\leadsto \sqrt{\color{blue}{-\frac{F}{A}}} \]
    9. Simplified51.0%

      \[\leadsto \sqrt{\color{blue}{-\frac{F}{A}}} \]
    10. Step-by-step derivation
      1. distribute-neg-frac51.0%

        \[\leadsto \sqrt{\color{blue}{\frac{-F}{A}}} \]
      2. sqrt-div56.2%

        \[\leadsto \color{blue}{\frac{\sqrt{-F}}{\sqrt{A}}} \]
    11. Applied egg-rr56.2%

      \[\leadsto \color{blue}{\frac{\sqrt{-F}}{\sqrt{A}}} \]

    if -4.999999999999985e-310 < F < 8.5000000000000002e-24

    1. Initial program 19.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. Add Preprocessing
    3. Taylor expanded in A around 0 13.8%

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

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

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

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

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

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

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

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

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

    if 8.5000000000000002e-24 < F

    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. Add Preprocessing
    3. Taylor expanded in A around 0 10.6%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\frac{\sqrt{-F}}{\sqrt{A}}\\ \mathbf{elif}\;F \leq 8.5 \cdot 10^{-24}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{B \cdot F}\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 31.8% accurate, 3.0× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ \begin{array}{l} \mathbf{if}\;B_m \leq 4.2 \cdot 10^{-97}:\\ \;\;\;\;\sqrt{\frac{-F}{A}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B_m}}\right)\\ \end{array} \end{array} \]
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
 :precision binary64
 (if (<= B_m 4.2e-97) (sqrt (/ (- F) A)) (* (sqrt 2.0) (- (sqrt (/ F B_m))))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
	double tmp;
	if (B_m <= 4.2e-97) {
		tmp = sqrt((-F / A));
	} else {
		tmp = sqrt(2.0) * -sqrt((F / B_m));
	}
	return tmp;
}
B_m = abs(B)
real(8) function code(a, b_m, c, f)
    real(8), intent (in) :: a
    real(8), intent (in) :: b_m
    real(8), intent (in) :: c
    real(8), intent (in) :: f
    real(8) :: tmp
    if (b_m <= 4.2d-97) then
        tmp = sqrt((-f / a))
    else
        tmp = sqrt(2.0d0) * -sqrt((f / b_m))
    end if
    code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
	double tmp;
	if (B_m <= 4.2e-97) {
		tmp = Math.sqrt((-F / A));
	} else {
		tmp = Math.sqrt(2.0) * -Math.sqrt((F / B_m));
	}
	return tmp;
}
B_m = math.fabs(B)
def code(A, B_m, C, F):
	tmp = 0
	if B_m <= 4.2e-97:
		tmp = math.sqrt((-F / A))
	else:
		tmp = math.sqrt(2.0) * -math.sqrt((F / B_m))
	return tmp
B_m = abs(B)
function code(A, B_m, C, F)
	tmp = 0.0
	if (B_m <= 4.2e-97)
		tmp = sqrt(Float64(Float64(-F) / A));
	else
		tmp = Float64(sqrt(2.0) * Float64(-sqrt(Float64(F / B_m))));
	end
	return tmp
end
B_m = abs(B);
function tmp_2 = code(A, B_m, C, F)
	tmp = 0.0;
	if (B_m <= 4.2e-97)
		tmp = sqrt((-F / A));
	else
		tmp = sqrt(2.0) * -sqrt((F / B_m));
	end
	tmp_2 = tmp;
end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := If[LessEqual[B$95$m, 4.2e-97], N[Sqrt[N[((-F) / A), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[2.0], $MachinePrecision] * (-N[Sqrt[N[(F / B$95$m), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|

\\
\begin{array}{l}
\mathbf{if}\;B_m \leq 4.2 \cdot 10^{-97}:\\
\;\;\;\;\sqrt{\frac{-F}{A}}\\

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


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

    1. Initial program 16.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. Add Preprocessing
    3. Step-by-step derivation
      1. add-sqr-sqrt2.5%

        \[\leadsto \color{blue}{\sqrt{\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}} \cdot \sqrt{\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. sqrt-unprod2.9%

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

        \[\leadsto \sqrt{\color{blue}{\frac{\left(-\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)}\right) \cdot \left(-\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)}\right)}{\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot \left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)}}} \]
    4. Applied egg-rr3.6%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{\color{blue}{-1 \cdot \frac{F}{A}}} \]
    8. Step-by-step derivation
      1. mul-1-neg13.5%

        \[\leadsto \sqrt{\color{blue}{-\frac{F}{A}}} \]
    9. Simplified13.5%

      \[\leadsto \sqrt{\color{blue}{-\frac{F}{A}}} \]

    if 4.2000000000000002e-97 < B

    1. Initial program 27.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. Add Preprocessing
    3. Taylor expanded in A around 0 28.1%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-\sqrt{\frac{F}{B}} \cdot \sqrt{2}} \]
    8. Simplified42.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 4.2 \cdot 10^{-97}:\\ \;\;\;\;\sqrt{\frac{-F}{A}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 13.9% accurate, 5.8× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ \begin{array}{l} \mathbf{if}\;C \leq -9 \cdot 10^{+129}:\\ \;\;\;\;\sqrt{-\frac{F}{C}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{-F}{A}}\\ \end{array} \end{array} \]
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
 :precision binary64
 (if (<= C -9e+129) (sqrt (- (/ F C))) (sqrt (/ (- F) A))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
	double tmp;
	if (C <= -9e+129) {
		tmp = sqrt(-(F / C));
	} else {
		tmp = sqrt((-F / A));
	}
	return tmp;
}
B_m = abs(B)
real(8) function code(a, b_m, c, f)
    real(8), intent (in) :: a
    real(8), intent (in) :: b_m
    real(8), intent (in) :: c
    real(8), intent (in) :: f
    real(8) :: tmp
    if (c <= (-9d+129)) then
        tmp = sqrt(-(f / c))
    else
        tmp = sqrt((-f / a))
    end if
    code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
	double tmp;
	if (C <= -9e+129) {
		tmp = Math.sqrt(-(F / C));
	} else {
		tmp = Math.sqrt((-F / A));
	}
	return tmp;
}
B_m = math.fabs(B)
def code(A, B_m, C, F):
	tmp = 0
	if C <= -9e+129:
		tmp = math.sqrt(-(F / C))
	else:
		tmp = math.sqrt((-F / A))
	return tmp
B_m = abs(B)
function code(A, B_m, C, F)
	tmp = 0.0
	if (C <= -9e+129)
		tmp = sqrt(Float64(-Float64(F / C)));
	else
		tmp = sqrt(Float64(Float64(-F) / A));
	end
	return tmp
end
B_m = abs(B);
function tmp_2 = code(A, B_m, C, F)
	tmp = 0.0;
	if (C <= -9e+129)
		tmp = sqrt(-(F / C));
	else
		tmp = sqrt((-F / A));
	end
	tmp_2 = tmp;
end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := If[LessEqual[C, -9e+129], N[Sqrt[(-N[(F / C), $MachinePrecision])], $MachinePrecision], N[Sqrt[N[((-F) / A), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|

\\
\begin{array}{l}
\mathbf{if}\;C \leq -9 \cdot 10^{+129}:\\
\;\;\;\;\sqrt{-\frac{F}{C}}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{-F}{A}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if C < -9.0000000000000003e129

    1. Initial program 0.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. Add Preprocessing
    3. Step-by-step derivation
      1. add-sqr-sqrt0.2%

        \[\leadsto \color{blue}{\sqrt{\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}} \cdot \sqrt{\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. sqrt-unprod0.4%

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

        \[\leadsto \sqrt{\color{blue}{\frac{\left(-\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)}\right) \cdot \left(-\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)}\right)}{\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot \left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)}}} \]
    4. Applied egg-rr3.6%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{\color{blue}{-1 \cdot \frac{F}{C}}} \]
    8. Step-by-step derivation
      1. mul-1-neg22.1%

        \[\leadsto \sqrt{\color{blue}{-\frac{F}{C}}} \]
    9. Simplified22.1%

      \[\leadsto \sqrt{\color{blue}{-\frac{F}{C}}} \]

    if -9.0000000000000003e129 < C

    1. Initial program 23.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. Add Preprocessing
    3. Step-by-step derivation
      1. add-sqr-sqrt2.9%

        \[\leadsto \color{blue}{\sqrt{\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}} \cdot \sqrt{\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. sqrt-unprod3.5%

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

        \[\leadsto \sqrt{\color{blue}{\frac{\left(-\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)}\right) \cdot \left(-\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)}\right)}{\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot \left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)}}} \]
    4. Applied egg-rr3.8%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{\color{blue}{-1 \cdot \frac{F}{A}}} \]
    8. Step-by-step derivation
      1. mul-1-neg12.3%

        \[\leadsto \sqrt{\color{blue}{-\frac{F}{A}}} \]
    9. Simplified12.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -9 \cdot 10^{+129}:\\ \;\;\;\;\sqrt{-\frac{F}{C}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{-F}{A}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 11.7% accurate, 6.1× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ \sqrt{\frac{-F}{A}} \end{array} \]
B_m = (fabs.f64 B)
(FPCore (A B_m C F) :precision binary64 (sqrt (/ (- F) A)))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
	return sqrt((-F / A));
}
B_m = abs(B)
real(8) function code(a, b_m, c, f)
    real(8), intent (in) :: a
    real(8), intent (in) :: b_m
    real(8), intent (in) :: c
    real(8), intent (in) :: f
    code = sqrt((-f / a))
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
	return Math.sqrt((-F / A));
}
B_m = math.fabs(B)
def code(A, B_m, C, F):
	return math.sqrt((-F / A))
B_m = abs(B)
function code(A, B_m, C, F)
	return sqrt(Float64(Float64(-F) / A))
end
B_m = abs(B);
function tmp = code(A, B_m, C, F)
	tmp = sqrt((-F / A));
end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := N[Sqrt[N[((-F) / A), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
B_m = \left|B\right|

\\
\sqrt{\frac{-F}{A}}
\end{array}
Derivation
  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. Add Preprocessing
  3. Step-by-step derivation
    1. add-sqr-sqrt2.5%

      \[\leadsto \color{blue}{\sqrt{\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}} \cdot \sqrt{\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. sqrt-unprod3.0%

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

      \[\leadsto \sqrt{\color{blue}{\frac{\left(-\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)}\right) \cdot \left(-\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)}\right)}{\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot \left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)}}} \]
  4. Applied egg-rr3.8%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \sqrt{\color{blue}{-1 \cdot \frac{F}{A}}} \]
  8. Step-by-step derivation
    1. mul-1-neg10.9%

      \[\leadsto \sqrt{\color{blue}{-\frac{F}{A}}} \]
  9. Simplified10.9%

    \[\leadsto \sqrt{\color{blue}{-\frac{F}{A}}} \]
  10. Final simplification10.9%

    \[\leadsto \sqrt{\frac{-F}{A}} \]
  11. Add Preprocessing

Alternative 15: 1.2% accurate, 6.2× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ \sqrt{\frac{F}{A}} \end{array} \]
B_m = (fabs.f64 B)
(FPCore (A B_m C F) :precision binary64 (sqrt (/ F A)))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
	return sqrt((F / A));
}
B_m = abs(B)
real(8) function code(a, b_m, c, f)
    real(8), intent (in) :: a
    real(8), intent (in) :: b_m
    real(8), intent (in) :: c
    real(8), intent (in) :: f
    code = sqrt((f / a))
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
	return Math.sqrt((F / A));
}
B_m = math.fabs(B)
def code(A, B_m, C, F):
	return math.sqrt((F / A))
B_m = abs(B)
function code(A, B_m, C, F)
	return sqrt(Float64(F / A))
end
B_m = abs(B);
function tmp = code(A, B_m, C, F)
	tmp = sqrt((F / A));
end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := N[Sqrt[N[(F / A), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
B_m = \left|B\right|

\\
\sqrt{\frac{F}{A}}
\end{array}
Derivation
  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. Add Preprocessing
  3. Step-by-step derivation
    1. add-sqr-sqrt2.5%

      \[\leadsto \color{blue}{\sqrt{\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}} \cdot \sqrt{\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. sqrt-unprod3.0%

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

      \[\leadsto \sqrt{\color{blue}{\frac{\left(-\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)}\right) \cdot \left(-\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)}\right)}{\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot \left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)}}} \]
  4. Applied egg-rr3.8%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \sqrt{\color{blue}{-1 \cdot \frac{F}{A}}} \]
  8. Step-by-step derivation
    1. mul-1-neg10.9%

      \[\leadsto \sqrt{\color{blue}{-\frac{F}{A}}} \]
  9. Simplified10.9%

    \[\leadsto \sqrt{\color{blue}{-\frac{F}{A}}} \]
  10. Step-by-step derivation
    1. expm1-log1p-u10.6%

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

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{-\frac{F}{A}}\right)} - 1} \]
    3. add-sqr-sqrt6.5%

      \[\leadsto e^{\mathsf{log1p}\left(\sqrt{\color{blue}{\sqrt{-\frac{F}{A}} \cdot \sqrt{-\frac{F}{A}}}}\right)} - 1 \]
    4. sqrt-unprod5.9%

      \[\leadsto e^{\mathsf{log1p}\left(\sqrt{\color{blue}{\sqrt{\left(-\frac{F}{A}\right) \cdot \left(-\frac{F}{A}\right)}}}\right)} - 1 \]
    5. sqr-neg5.9%

      \[\leadsto e^{\mathsf{log1p}\left(\sqrt{\sqrt{\color{blue}{\frac{F}{A} \cdot \frac{F}{A}}}}\right)} - 1 \]
    6. sqrt-unprod1.6%

      \[\leadsto e^{\mathsf{log1p}\left(\sqrt{\color{blue}{\sqrt{\frac{F}{A}} \cdot \sqrt{\frac{F}{A}}}}\right)} - 1 \]
    7. add-sqr-sqrt1.6%

      \[\leadsto e^{\mathsf{log1p}\left(\sqrt{\color{blue}{\frac{F}{A}}}\right)} - 1 \]
  11. Applied egg-rr1.6%

    \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{F}{A}}\right)} - 1} \]
  12. Step-by-step derivation
    1. expm1-def1.3%

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

      \[\leadsto \color{blue}{\sqrt{\frac{F}{A}}} \]
  13. Simplified1.3%

    \[\leadsto \color{blue}{\sqrt{\frac{F}{A}}} \]
  14. Final simplification1.3%

    \[\leadsto \sqrt{\frac{F}{A}} \]
  15. Add Preprocessing

Reproduce

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