ABCF->ab-angle a

Percentage Accurate: 18.3% → 59.0%
Time: 28.4s
Alternatives: 27
Speedup: 5.9×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 27 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.3% 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: 59.0% accurate, 0.3× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ \begin{array}{l} t_0 := \mathsf{hypot}\left(B\_m, A - C\right)\\ t_1 := B\_m \cdot B\_m + A \cdot A\\ t_2 := \sqrt{\frac{1}{t\_1}}\\ t_3 := 1 - A \cdot t\_2\\ t_4 := B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\\ t_5 := A + \mathsf{hypot}\left(B\_m, A\right)\\ t_6 := \left(4 \cdot A\right) \cdot C\\ t_7 := t\_6 - B\_m \cdot B\_m\\ t_8 := \frac{\sqrt{\left(2 \cdot \left(\left({B\_m}^{2} - t\_6\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{B\_m}^{2} + {\left(A - C\right)}^{2}}\right)}}{t\_6 - {B\_m}^{2}}\\ t_9 := {\left(A + \left(C + t\_0\right)\right)}^{0.5}\\ \mathbf{if}\;t\_8 \leq -2 \cdot 10^{-114}:\\ \;\;\;\;\frac{t\_9 \cdot \left(\sqrt{2 \cdot t\_4} \cdot \sqrt{F}\right)}{t\_7}\\ \mathbf{elif}\;t\_8 \leq 4 \cdot 10^{-143}:\\ \;\;\;\;\frac{\sqrt{2 \cdot \left(\left(F \cdot \left(B\_m \cdot B\_m\right)\right) \cdot t\_5\right) + C \cdot \left(2 \cdot \left(\left(C \cdot F\right) \cdot \left(\left(A \cdot -4\right) \cdot t\_3 + 0.5 \cdot \left(\left(B\_m \cdot B\_m\right) \cdot \left(\left(1 - \frac{A \cdot A}{t\_1}\right) \cdot t\_2\right)\right)\right) + F \cdot \left(t\_5 \cdot \left(A \cdot -4\right) + \left(B\_m \cdot B\_m\right) \cdot t\_3\right)\right)\right)}}{t\_7}\\ \mathbf{elif}\;t\_8 \leq \infty:\\ \;\;\;\;\frac{t\_9 \cdot \sqrt{t\_4 \cdot \left(2 \cdot F\right)}}{t\_7}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{F} \cdot \left(\sqrt{C + \left(A + t\_0\right)} \cdot \frac{\sqrt{2}}{0 - B\_m}\right)\\ \end{array} \end{array} \]
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
 :precision binary64
 (let* ((t_0 (hypot B_m (- A C)))
        (t_1 (+ (* B_m B_m) (* A A)))
        (t_2 (sqrt (/ 1.0 t_1)))
        (t_3 (- 1.0 (* A t_2)))
        (t_4 (+ (* B_m B_m) (* -4.0 (* A C))))
        (t_5 (+ A (hypot B_m A)))
        (t_6 (* (* 4.0 A) C))
        (t_7 (- t_6 (* B_m B_m)))
        (t_8
         (/
          (sqrt
           (*
            (* 2.0 (* (- (pow B_m 2.0) t_6) F))
            (+ (+ A C) (sqrt (+ (pow B_m 2.0) (pow (- A C) 2.0))))))
          (- t_6 (pow B_m 2.0))))
        (t_9 (pow (+ A (+ C t_0)) 0.5)))
   (if (<= t_8 -2e-114)
     (/ (* t_9 (* (sqrt (* 2.0 t_4)) (sqrt F))) t_7)
     (if (<= t_8 4e-143)
       (/
        (sqrt
         (+
          (* 2.0 (* (* F (* B_m B_m)) t_5))
          (*
           C
           (*
            2.0
            (+
             (*
              (* C F)
              (+
               (* (* A -4.0) t_3)
               (* 0.5 (* (* B_m B_m) (* (- 1.0 (/ (* A A) t_1)) t_2)))))
             (* F (+ (* t_5 (* A -4.0)) (* (* B_m B_m) t_3))))))))
        t_7)
       (if (<= t_8 INFINITY)
         (/ (* t_9 (sqrt (* t_4 (* 2.0 F)))) t_7)
         (*
          (sqrt F)
          (* (sqrt (+ C (+ A t_0))) (/ (sqrt 2.0) (- 0.0 B_m)))))))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
	double t_0 = hypot(B_m, (A - C));
	double t_1 = (B_m * B_m) + (A * A);
	double t_2 = sqrt((1.0 / t_1));
	double t_3 = 1.0 - (A * t_2);
	double t_4 = (B_m * B_m) + (-4.0 * (A * C));
	double t_5 = A + hypot(B_m, A);
	double t_6 = (4.0 * A) * C;
	double t_7 = t_6 - (B_m * B_m);
	double t_8 = sqrt(((2.0 * ((pow(B_m, 2.0) - t_6) * F)) * ((A + C) + sqrt((pow(B_m, 2.0) + pow((A - C), 2.0)))))) / (t_6 - pow(B_m, 2.0));
	double t_9 = pow((A + (C + t_0)), 0.5);
	double tmp;
	if (t_8 <= -2e-114) {
		tmp = (t_9 * (sqrt((2.0 * t_4)) * sqrt(F))) / t_7;
	} else if (t_8 <= 4e-143) {
		tmp = sqrt(((2.0 * ((F * (B_m * B_m)) * t_5)) + (C * (2.0 * (((C * F) * (((A * -4.0) * t_3) + (0.5 * ((B_m * B_m) * ((1.0 - ((A * A) / t_1)) * t_2))))) + (F * ((t_5 * (A * -4.0)) + ((B_m * B_m) * t_3)))))))) / t_7;
	} else if (t_8 <= ((double) INFINITY)) {
		tmp = (t_9 * sqrt((t_4 * (2.0 * F)))) / t_7;
	} else {
		tmp = sqrt(F) * (sqrt((C + (A + t_0))) * (sqrt(2.0) / (0.0 - B_m)));
	}
	return tmp;
}
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
	double t_0 = Math.hypot(B_m, (A - C));
	double t_1 = (B_m * B_m) + (A * A);
	double t_2 = Math.sqrt((1.0 / t_1));
	double t_3 = 1.0 - (A * t_2);
	double t_4 = (B_m * B_m) + (-4.0 * (A * C));
	double t_5 = A + Math.hypot(B_m, A);
	double t_6 = (4.0 * A) * C;
	double t_7 = t_6 - (B_m * B_m);
	double t_8 = Math.sqrt(((2.0 * ((Math.pow(B_m, 2.0) - t_6) * F)) * ((A + C) + Math.sqrt((Math.pow(B_m, 2.0) + Math.pow((A - C), 2.0)))))) / (t_6 - Math.pow(B_m, 2.0));
	double t_9 = Math.pow((A + (C + t_0)), 0.5);
	double tmp;
	if (t_8 <= -2e-114) {
		tmp = (t_9 * (Math.sqrt((2.0 * t_4)) * Math.sqrt(F))) / t_7;
	} else if (t_8 <= 4e-143) {
		tmp = Math.sqrt(((2.0 * ((F * (B_m * B_m)) * t_5)) + (C * (2.0 * (((C * F) * (((A * -4.0) * t_3) + (0.5 * ((B_m * B_m) * ((1.0 - ((A * A) / t_1)) * t_2))))) + (F * ((t_5 * (A * -4.0)) + ((B_m * B_m) * t_3)))))))) / t_7;
	} else if (t_8 <= Double.POSITIVE_INFINITY) {
		tmp = (t_9 * Math.sqrt((t_4 * (2.0 * F)))) / t_7;
	} else {
		tmp = Math.sqrt(F) * (Math.sqrt((C + (A + t_0))) * (Math.sqrt(2.0) / (0.0 - B_m)));
	}
	return tmp;
}
B_m = math.fabs(B)
def code(A, B_m, C, F):
	t_0 = math.hypot(B_m, (A - C))
	t_1 = (B_m * B_m) + (A * A)
	t_2 = math.sqrt((1.0 / t_1))
	t_3 = 1.0 - (A * t_2)
	t_4 = (B_m * B_m) + (-4.0 * (A * C))
	t_5 = A + math.hypot(B_m, A)
	t_6 = (4.0 * A) * C
	t_7 = t_6 - (B_m * B_m)
	t_8 = math.sqrt(((2.0 * ((math.pow(B_m, 2.0) - t_6) * F)) * ((A + C) + math.sqrt((math.pow(B_m, 2.0) + math.pow((A - C), 2.0)))))) / (t_6 - math.pow(B_m, 2.0))
	t_9 = math.pow((A + (C + t_0)), 0.5)
	tmp = 0
	if t_8 <= -2e-114:
		tmp = (t_9 * (math.sqrt((2.0 * t_4)) * math.sqrt(F))) / t_7
	elif t_8 <= 4e-143:
		tmp = math.sqrt(((2.0 * ((F * (B_m * B_m)) * t_5)) + (C * (2.0 * (((C * F) * (((A * -4.0) * t_3) + (0.5 * ((B_m * B_m) * ((1.0 - ((A * A) / t_1)) * t_2))))) + (F * ((t_5 * (A * -4.0)) + ((B_m * B_m) * t_3)))))))) / t_7
	elif t_8 <= math.inf:
		tmp = (t_9 * math.sqrt((t_4 * (2.0 * F)))) / t_7
	else:
		tmp = math.sqrt(F) * (math.sqrt((C + (A + t_0))) * (math.sqrt(2.0) / (0.0 - B_m)))
	return tmp
B_m = abs(B)
function code(A, B_m, C, F)
	t_0 = hypot(B_m, Float64(A - C))
	t_1 = Float64(Float64(B_m * B_m) + Float64(A * A))
	t_2 = sqrt(Float64(1.0 / t_1))
	t_3 = Float64(1.0 - Float64(A * t_2))
	t_4 = Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C)))
	t_5 = Float64(A + hypot(B_m, A))
	t_6 = Float64(Float64(4.0 * A) * C)
	t_7 = Float64(t_6 - Float64(B_m * B_m))
	t_8 = Float64(sqrt(Float64(Float64(2.0 * Float64(Float64((B_m ^ 2.0) - t_6) * F)) * Float64(Float64(A + C) + sqrt(Float64((B_m ^ 2.0) + (Float64(A - C) ^ 2.0)))))) / Float64(t_6 - (B_m ^ 2.0)))
	t_9 = Float64(A + Float64(C + t_0)) ^ 0.5
	tmp = 0.0
	if (t_8 <= -2e-114)
		tmp = Float64(Float64(t_9 * Float64(sqrt(Float64(2.0 * t_4)) * sqrt(F))) / t_7);
	elseif (t_8 <= 4e-143)
		tmp = Float64(sqrt(Float64(Float64(2.0 * Float64(Float64(F * Float64(B_m * B_m)) * t_5)) + Float64(C * Float64(2.0 * Float64(Float64(Float64(C * F) * Float64(Float64(Float64(A * -4.0) * t_3) + Float64(0.5 * Float64(Float64(B_m * B_m) * Float64(Float64(1.0 - Float64(Float64(A * A) / t_1)) * t_2))))) + Float64(F * Float64(Float64(t_5 * Float64(A * -4.0)) + Float64(Float64(B_m * B_m) * t_3)))))))) / t_7);
	elseif (t_8 <= Inf)
		tmp = Float64(Float64(t_9 * sqrt(Float64(t_4 * Float64(2.0 * F)))) / t_7);
	else
		tmp = Float64(sqrt(F) * Float64(sqrt(Float64(C + Float64(A + t_0))) * Float64(sqrt(2.0) / Float64(0.0 - B_m))));
	end
	return tmp
end
B_m = abs(B);
function tmp_2 = code(A, B_m, C, F)
	t_0 = hypot(B_m, (A - C));
	t_1 = (B_m * B_m) + (A * A);
	t_2 = sqrt((1.0 / t_1));
	t_3 = 1.0 - (A * t_2);
	t_4 = (B_m * B_m) + (-4.0 * (A * C));
	t_5 = A + hypot(B_m, A);
	t_6 = (4.0 * A) * C;
	t_7 = t_6 - (B_m * B_m);
	t_8 = sqrt(((2.0 * (((B_m ^ 2.0) - t_6) * F)) * ((A + C) + sqrt(((B_m ^ 2.0) + ((A - C) ^ 2.0)))))) / (t_6 - (B_m ^ 2.0));
	t_9 = (A + (C + t_0)) ^ 0.5;
	tmp = 0.0;
	if (t_8 <= -2e-114)
		tmp = (t_9 * (sqrt((2.0 * t_4)) * sqrt(F))) / t_7;
	elseif (t_8 <= 4e-143)
		tmp = sqrt(((2.0 * ((F * (B_m * B_m)) * t_5)) + (C * (2.0 * (((C * F) * (((A * -4.0) * t_3) + (0.5 * ((B_m * B_m) * ((1.0 - ((A * A) / t_1)) * t_2))))) + (F * ((t_5 * (A * -4.0)) + ((B_m * B_m) * t_3)))))))) / t_7;
	elseif (t_8 <= Inf)
		tmp = (t_9 * sqrt((t_4 * (2.0 * F)))) / t_7;
	else
		tmp = sqrt(F) * (sqrt((C + (A + t_0))) * (sqrt(2.0) / (0.0 - B_m)));
	end
	tmp_2 = tmp;
end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]}, Block[{t$95$1 = N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(A * A), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(1.0 / t$95$1), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(1.0 - N[(A * t$95$2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(A + N[Sqrt[B$95$m ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision]}, Block[{t$95$7 = N[(t$95$6 - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$8 = N[(N[Sqrt[N[(N[(2.0 * N[(N[(N[Power[B$95$m, 2.0], $MachinePrecision] - t$95$6), $MachinePrecision] * F), $MachinePrecision]), $MachinePrecision] * N[(N[(A + C), $MachinePrecision] + N[Sqrt[N[(N[Power[B$95$m, 2.0], $MachinePrecision] + N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(t$95$6 - N[Power[B$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$9 = N[Power[N[(A + N[(C + t$95$0), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]}, If[LessEqual[t$95$8, -2e-114], N[(N[(t$95$9 * N[(N[Sqrt[N[(2.0 * t$95$4), $MachinePrecision]], $MachinePrecision] * N[Sqrt[F], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$7), $MachinePrecision], If[LessEqual[t$95$8, 4e-143], N[(N[Sqrt[N[(N[(2.0 * N[(N[(F * N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision] * t$95$5), $MachinePrecision]), $MachinePrecision] + N[(C * N[(2.0 * N[(N[(N[(C * F), $MachinePrecision] * N[(N[(N[(A * -4.0), $MachinePrecision] * t$95$3), $MachinePrecision] + N[(0.5 * N[(N[(B$95$m * B$95$m), $MachinePrecision] * N[(N[(1.0 - N[(N[(A * A), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(F * N[(N[(t$95$5 * N[(A * -4.0), $MachinePrecision]), $MachinePrecision] + N[(N[(B$95$m * B$95$m), $MachinePrecision] * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$7), $MachinePrecision], If[LessEqual[t$95$8, Infinity], N[(N[(t$95$9 * N[Sqrt[N[(t$95$4 * N[(2.0 * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t$95$7), $MachinePrecision], N[(N[Sqrt[F], $MachinePrecision] * N[(N[Sqrt[N[(C + N[(A + t$95$0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] / N[(0.0 - B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]]
\begin{array}{l}
B_m = \left|B\right|

\\
\begin{array}{l}
t_0 := \mathsf{hypot}\left(B\_m, A - C\right)\\
t_1 := B\_m \cdot B\_m + A \cdot A\\
t_2 := \sqrt{\frac{1}{t\_1}}\\
t_3 := 1 - A \cdot t\_2\\
t_4 := B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\\
t_5 := A + \mathsf{hypot}\left(B\_m, A\right)\\
t_6 := \left(4 \cdot A\right) \cdot C\\
t_7 := t\_6 - B\_m \cdot B\_m\\
t_8 := \frac{\sqrt{\left(2 \cdot \left(\left({B\_m}^{2} - t\_6\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{B\_m}^{2} + {\left(A - C\right)}^{2}}\right)}}{t\_6 - {B\_m}^{2}}\\
t_9 := {\left(A + \left(C + t\_0\right)\right)}^{0.5}\\
\mathbf{if}\;t\_8 \leq -2 \cdot 10^{-114}:\\
\;\;\;\;\frac{t\_9 \cdot \left(\sqrt{2 \cdot t\_4} \cdot \sqrt{F}\right)}{t\_7}\\

\mathbf{elif}\;t\_8 \leq 4 \cdot 10^{-143}:\\
\;\;\;\;\frac{\sqrt{2 \cdot \left(\left(F \cdot \left(B\_m \cdot B\_m\right)\right) \cdot t\_5\right) + C \cdot \left(2 \cdot \left(\left(C \cdot F\right) \cdot \left(\left(A \cdot -4\right) \cdot t\_3 + 0.5 \cdot \left(\left(B\_m \cdot B\_m\right) \cdot \left(\left(1 - \frac{A \cdot A}{t\_1}\right) \cdot t\_2\right)\right)\right) + F \cdot \left(t\_5 \cdot \left(A \cdot -4\right) + \left(B\_m \cdot B\_m\right) \cdot t\_3\right)\right)\right)}}{t\_7}\\

\mathbf{elif}\;t\_8 \leq \infty:\\
\;\;\;\;\frac{t\_9 \cdot \sqrt{t\_4 \cdot \left(2 \cdot F\right)}}{t\_7}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{F} \cdot \left(\sqrt{C + \left(A + t\_0\right)} \cdot \frac{\sqrt{2}}{0 - B\_m}\right)\\


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

    1. Initial program 39.0%

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

        \[\leadsto \mathsf{neg}\left(\frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\right) \]
      2. distribute-neg-frac2N/A

        \[\leadsto \frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{\color{blue}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\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), \color{blue}{\left(\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)\right)}\right) \]
    3. Simplified48.7%

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

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)}^{\frac{1}{2}}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right) \cdot \left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right)\right)}^{\frac{1}{2}}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. unpow-prod-downN/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}^{\frac{1}{2}} \cdot {\left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right)}^{\frac{1}{2}}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left({\left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}^{\frac{1}{2}}\right), \left({\left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right)}^{\frac{1}{2}}\right)\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    6. Applied egg-rr69.2%

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(A, \mathsf{+.f64}\left(C, \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right)\right)\right), \frac{1}{2}\right), \left({\left(\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right) \cdot \left(2 \cdot F\right)\right)}^{\frac{1}{2}}\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), \color{blue}{C}\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(A, \mathsf{+.f64}\left(C, \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right)\right)\right), \frac{1}{2}\right), \left({\left(\left(\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right) \cdot 2\right) \cdot F\right)}^{\frac{1}{2}}\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. unpow-prod-downN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(A, \mathsf{+.f64}\left(C, \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right)\right)\right), \frac{1}{2}\right), \left({\left(\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right) \cdot 2\right)}^{\frac{1}{2}} \cdot {F}^{\frac{1}{2}}\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), \color{blue}{C}\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(A, \mathsf{+.f64}\left(C, \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right)\right)\right), \frac{1}{2}\right), \mathsf{*.f64}\left(\left({\left(\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right) \cdot 2\right)}^{\frac{1}{2}}\right), \left({F}^{\frac{1}{2}}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), \color{blue}{C}\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    8. Applied egg-rr77.5%

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

    if -2.0000000000000001e-114 < (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 #s(literal 2 binary64) (*.f64 (-.f64 (pow.f64 B #s(literal 2 binary64)) (*.f64 (*.f64 #s(literal 4 binary64) A) C)) F)) (+.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))))) (-.f64 (pow.f64 B #s(literal 2 binary64)) (*.f64 (*.f64 #s(literal 4 binary64) A) C))) < 3.9999999999999998e-143

    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. Step-by-step derivation
      1. distribute-frac-negN/A

        \[\leadsto \mathsf{neg}\left(\frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\right) \]
      2. distribute-neg-frac2N/A

        \[\leadsto \frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{\color{blue}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\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), \color{blue}{\left(\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)\right)}\right) \]
    3. Simplified19.7%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{\left(2 \cdot \left({B}^{2} \cdot \left(F \cdot \left(A + \sqrt{{A}^{2} + {B}^{2}}\right)\right)\right) + C \cdot \left(2 \cdot \left(C \cdot \left(F \cdot \left(-4 \cdot \left(A \cdot \left(1 + -1 \cdot \left(A \cdot \sqrt{\frac{1}{{A}^{2} + {B}^{2}}}\right)\right)\right) + \frac{1}{2} \cdot \left(\left({B}^{2} \cdot \left(1 - \frac{{A}^{2}}{{A}^{2} + {B}^{2}}\right)\right) \cdot \sqrt{\frac{1}{{A}^{2} + {B}^{2}}}\right)\right)\right)\right) + 2 \cdot \left(F \cdot \left(-4 \cdot \left(A \cdot \left(A + \sqrt{{A}^{2} + {B}^{2}}\right)\right) + {B}^{2} \cdot \left(1 + -1 \cdot \left(A \cdot \sqrt{\frac{1}{{A}^{2} + {B}^{2}}}\right)\right)\right)\right)\right)\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    6. Simplified42.9%

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

    if 3.9999999999999998e-143 < (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 #s(literal 2 binary64) (*.f64 (-.f64 (pow.f64 B #s(literal 2 binary64)) (*.f64 (*.f64 #s(literal 4 binary64) A) C)) F)) (+.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))))) (-.f64 (pow.f64 B #s(literal 2 binary64)) (*.f64 (*.f64 #s(literal 4 binary64) A) C))) < +inf.0

    1. Initial program 22.9%

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

        \[\leadsto \mathsf{neg}\left(\frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\right) \]
      2. distribute-neg-frac2N/A

        \[\leadsto \frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{\color{blue}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\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), \color{blue}{\left(\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)\right)}\right) \]
    3. Simplified55.0%

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

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)}^{\frac{1}{2}}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right) \cdot \left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right)\right)}^{\frac{1}{2}}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. unpow-prod-downN/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}^{\frac{1}{2}} \cdot {\left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right)}^{\frac{1}{2}}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left({\left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}^{\frac{1}{2}}\right), \left({\left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right)}^{\frac{1}{2}}\right)\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    6. Applied egg-rr87.0%

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

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

    1. Initial program 0.0%

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

        \[\leadsto \mathsf{neg}\left(\frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\right) \]
      2. distribute-neg-frac2N/A

        \[\leadsto \frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{\color{blue}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\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), \color{blue}{\left(\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)\right)}\right) \]
    3. Simplified0.4%

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

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)}^{\frac{1}{2}}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right) \cdot \left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right)\right)}^{\frac{1}{2}}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. unpow-prod-downN/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}^{\frac{1}{2}} \cdot {\left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right)}^{\frac{1}{2}}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left({\left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}^{\frac{1}{2}}\right), \left({\left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right)}^{\frac{1}{2}}\right)\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    6. Applied egg-rr0.0%

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

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

      \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left(-1 \cdot \left(\frac{\sqrt{2}}{B} \cdot \sqrt{F}\right)\right)}, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), \mathsf{+.f64}\left(A, C\right)\right)\right)\right) \]
    9. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\left(-1 \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F}\right), \mathsf{sqrt.f64}\left(\color{blue}{\mathsf{+.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), \mathsf{+.f64}\left(A, C\right)\right)}\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(-1 \cdot \frac{\sqrt{2}}{B}\right), \left(\sqrt{F}\right)\right), \mathsf{sqrt.f64}\left(\color{blue}{\mathsf{+.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), \mathsf{+.f64}\left(A, C\right)\right)}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \left(\frac{\sqrt{2}}{B}\right)\right), \left(\sqrt{F}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\color{blue}{\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right)}, \mathsf{+.f64}\left(A, C\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\left(\sqrt{2}\right), B\right)\right), \left(\sqrt{F}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{hypot.f64}\left(B, \color{blue}{\mathsf{\_.f64}\left(A, C\right)}\right), \mathsf{+.f64}\left(A, C\right)\right)\right)\right) \]
      5. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(2\right), B\right)\right), \left(\sqrt{F}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(\color{blue}{A}, C\right)\right), \mathsf{+.f64}\left(A, C\right)\right)\right)\right) \]
      6. sqrt-lowering-sqrt.f6424.4%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(2\right), B\right)\right), \mathsf{sqrt.f64}\left(F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), \color{blue}{\mathsf{+.f64}\left(A, C\right)}\right)\right)\right) \]
    10. Simplified24.4%

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

        \[\leadsto \sqrt{\sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)} + \left(A + C\right)} \cdot \color{blue}{\left(\left(-1 \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F}\right)} \]
      2. associate-*r*N/A

        \[\leadsto \left(\sqrt{\sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)} + \left(A + C\right)} \cdot \left(-1 \cdot \frac{\sqrt{2}}{B}\right)\right) \cdot \color{blue}{\sqrt{F}} \]
      3. *-lowering-*.f64N/A

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

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

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

Alternative 2: 58.9% accurate, 0.3× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ \begin{array}{l} t_0 := \mathsf{hypot}\left(B\_m, A - C\right)\\ t_1 := B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\\ t_2 := \left(4 \cdot A\right) \cdot C\\ t_3 := \frac{\sqrt{\left(2 \cdot \left(\left({B\_m}^{2} - t\_2\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{B\_m}^{2} + {\left(A - C\right)}^{2}}\right)}}{t\_2 - {B\_m}^{2}}\\ t_4 := t\_2 - B\_m \cdot B\_m\\ t_5 := {\left(A + \left(C + t\_0\right)\right)}^{0.5}\\ \mathbf{if}\;t\_3 \leq -1 \cdot 10^{-166}:\\ \;\;\;\;\frac{t\_5 \cdot \left(\sqrt{2 \cdot t\_1} \cdot \sqrt{F}\right)}{t\_4}\\ \mathbf{elif}\;t\_3 \leq 4 \cdot 10^{-143}:\\ \;\;\;\;\frac{\sqrt{F} \cdot {\left(t\_1 \cdot \left(4 \cdot A + \frac{B\_m \cdot B\_m}{A - C}\right)\right)}^{0.5}}{t\_4}\\ \mathbf{elif}\;t\_3 \leq \infty:\\ \;\;\;\;\frac{t\_5 \cdot \sqrt{t\_1 \cdot \left(2 \cdot F\right)}}{t\_4}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{F} \cdot \left(\sqrt{C + \left(A + t\_0\right)} \cdot \frac{\sqrt{2}}{0 - B\_m}\right)\\ \end{array} \end{array} \]
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
 :precision binary64
 (let* ((t_0 (hypot B_m (- A C)))
        (t_1 (+ (* B_m B_m) (* -4.0 (* A C))))
        (t_2 (* (* 4.0 A) C))
        (t_3
         (/
          (sqrt
           (*
            (* 2.0 (* (- (pow B_m 2.0) t_2) F))
            (+ (+ A C) (sqrt (+ (pow B_m 2.0) (pow (- A C) 2.0))))))
          (- t_2 (pow B_m 2.0))))
        (t_4 (- t_2 (* B_m B_m)))
        (t_5 (pow (+ A (+ C t_0)) 0.5)))
   (if (<= t_3 -1e-166)
     (/ (* t_5 (* (sqrt (* 2.0 t_1)) (sqrt F))) t_4)
     (if (<= t_3 4e-143)
       (/
        (* (sqrt F) (pow (* t_1 (+ (* 4.0 A) (/ (* B_m B_m) (- A C)))) 0.5))
        t_4)
       (if (<= t_3 INFINITY)
         (/ (* t_5 (sqrt (* t_1 (* 2.0 F)))) t_4)
         (*
          (sqrt F)
          (* (sqrt (+ C (+ A t_0))) (/ (sqrt 2.0) (- 0.0 B_m)))))))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
	double t_0 = hypot(B_m, (A - C));
	double t_1 = (B_m * B_m) + (-4.0 * (A * C));
	double t_2 = (4.0 * A) * C;
	double t_3 = sqrt(((2.0 * ((pow(B_m, 2.0) - t_2) * F)) * ((A + C) + sqrt((pow(B_m, 2.0) + pow((A - C), 2.0)))))) / (t_2 - pow(B_m, 2.0));
	double t_4 = t_2 - (B_m * B_m);
	double t_5 = pow((A + (C + t_0)), 0.5);
	double tmp;
	if (t_3 <= -1e-166) {
		tmp = (t_5 * (sqrt((2.0 * t_1)) * sqrt(F))) / t_4;
	} else if (t_3 <= 4e-143) {
		tmp = (sqrt(F) * pow((t_1 * ((4.0 * A) + ((B_m * B_m) / (A - C)))), 0.5)) / t_4;
	} else if (t_3 <= ((double) INFINITY)) {
		tmp = (t_5 * sqrt((t_1 * (2.0 * F)))) / t_4;
	} else {
		tmp = sqrt(F) * (sqrt((C + (A + t_0))) * (sqrt(2.0) / (0.0 - B_m)));
	}
	return tmp;
}
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
	double t_0 = Math.hypot(B_m, (A - C));
	double t_1 = (B_m * B_m) + (-4.0 * (A * C));
	double t_2 = (4.0 * A) * C;
	double t_3 = Math.sqrt(((2.0 * ((Math.pow(B_m, 2.0) - t_2) * F)) * ((A + C) + Math.sqrt((Math.pow(B_m, 2.0) + Math.pow((A - C), 2.0)))))) / (t_2 - Math.pow(B_m, 2.0));
	double t_4 = t_2 - (B_m * B_m);
	double t_5 = Math.pow((A + (C + t_0)), 0.5);
	double tmp;
	if (t_3 <= -1e-166) {
		tmp = (t_5 * (Math.sqrt((2.0 * t_1)) * Math.sqrt(F))) / t_4;
	} else if (t_3 <= 4e-143) {
		tmp = (Math.sqrt(F) * Math.pow((t_1 * ((4.0 * A) + ((B_m * B_m) / (A - C)))), 0.5)) / t_4;
	} else if (t_3 <= Double.POSITIVE_INFINITY) {
		tmp = (t_5 * Math.sqrt((t_1 * (2.0 * F)))) / t_4;
	} else {
		tmp = Math.sqrt(F) * (Math.sqrt((C + (A + t_0))) * (Math.sqrt(2.0) / (0.0 - B_m)));
	}
	return tmp;
}
B_m = math.fabs(B)
def code(A, B_m, C, F):
	t_0 = math.hypot(B_m, (A - C))
	t_1 = (B_m * B_m) + (-4.0 * (A * C))
	t_2 = (4.0 * A) * C
	t_3 = math.sqrt(((2.0 * ((math.pow(B_m, 2.0) - t_2) * F)) * ((A + C) + math.sqrt((math.pow(B_m, 2.0) + math.pow((A - C), 2.0)))))) / (t_2 - math.pow(B_m, 2.0))
	t_4 = t_2 - (B_m * B_m)
	t_5 = math.pow((A + (C + t_0)), 0.5)
	tmp = 0
	if t_3 <= -1e-166:
		tmp = (t_5 * (math.sqrt((2.0 * t_1)) * math.sqrt(F))) / t_4
	elif t_3 <= 4e-143:
		tmp = (math.sqrt(F) * math.pow((t_1 * ((4.0 * A) + ((B_m * B_m) / (A - C)))), 0.5)) / t_4
	elif t_3 <= math.inf:
		tmp = (t_5 * math.sqrt((t_1 * (2.0 * F)))) / t_4
	else:
		tmp = math.sqrt(F) * (math.sqrt((C + (A + t_0))) * (math.sqrt(2.0) / (0.0 - B_m)))
	return tmp
B_m = abs(B)
function code(A, B_m, C, F)
	t_0 = hypot(B_m, Float64(A - C))
	t_1 = Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C)))
	t_2 = Float64(Float64(4.0 * A) * C)
	t_3 = Float64(sqrt(Float64(Float64(2.0 * Float64(Float64((B_m ^ 2.0) - t_2) * F)) * Float64(Float64(A + C) + sqrt(Float64((B_m ^ 2.0) + (Float64(A - C) ^ 2.0)))))) / Float64(t_2 - (B_m ^ 2.0)))
	t_4 = Float64(t_2 - Float64(B_m * B_m))
	t_5 = Float64(A + Float64(C + t_0)) ^ 0.5
	tmp = 0.0
	if (t_3 <= -1e-166)
		tmp = Float64(Float64(t_5 * Float64(sqrt(Float64(2.0 * t_1)) * sqrt(F))) / t_4);
	elseif (t_3 <= 4e-143)
		tmp = Float64(Float64(sqrt(F) * (Float64(t_1 * Float64(Float64(4.0 * A) + Float64(Float64(B_m * B_m) / Float64(A - C)))) ^ 0.5)) / t_4);
	elseif (t_3 <= Inf)
		tmp = Float64(Float64(t_5 * sqrt(Float64(t_1 * Float64(2.0 * F)))) / t_4);
	else
		tmp = Float64(sqrt(F) * Float64(sqrt(Float64(C + Float64(A + t_0))) * Float64(sqrt(2.0) / Float64(0.0 - B_m))));
	end
	return tmp
end
B_m = abs(B);
function tmp_2 = code(A, B_m, C, F)
	t_0 = hypot(B_m, (A - C));
	t_1 = (B_m * B_m) + (-4.0 * (A * C));
	t_2 = (4.0 * A) * C;
	t_3 = sqrt(((2.0 * (((B_m ^ 2.0) - t_2) * F)) * ((A + C) + sqrt(((B_m ^ 2.0) + ((A - C) ^ 2.0)))))) / (t_2 - (B_m ^ 2.0));
	t_4 = t_2 - (B_m * B_m);
	t_5 = (A + (C + t_0)) ^ 0.5;
	tmp = 0.0;
	if (t_3 <= -1e-166)
		tmp = (t_5 * (sqrt((2.0 * t_1)) * sqrt(F))) / t_4;
	elseif (t_3 <= 4e-143)
		tmp = (sqrt(F) * ((t_1 * ((4.0 * A) + ((B_m * B_m) / (A - C)))) ^ 0.5)) / t_4;
	elseif (t_3 <= Inf)
		tmp = (t_5 * sqrt((t_1 * (2.0 * F)))) / t_4;
	else
		tmp = sqrt(F) * (sqrt((C + (A + t_0))) * (sqrt(2.0) / (0.0 - B_m)));
	end
	tmp_2 = tmp;
end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]}, Block[{t$95$1 = N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision]}, Block[{t$95$3 = N[(N[Sqrt[N[(N[(2.0 * N[(N[(N[Power[B$95$m, 2.0], $MachinePrecision] - t$95$2), $MachinePrecision] * F), $MachinePrecision]), $MachinePrecision] * N[(N[(A + C), $MachinePrecision] + N[Sqrt[N[(N[Power[B$95$m, 2.0], $MachinePrecision] + N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(t$95$2 - N[Power[B$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$2 - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[Power[N[(A + N[(C + t$95$0), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]}, If[LessEqual[t$95$3, -1e-166], N[(N[(t$95$5 * N[(N[Sqrt[N[(2.0 * t$95$1), $MachinePrecision]], $MachinePrecision] * N[Sqrt[F], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$4), $MachinePrecision], If[LessEqual[t$95$3, 4e-143], N[(N[(N[Sqrt[F], $MachinePrecision] * N[Power[N[(t$95$1 * N[(N[(4.0 * A), $MachinePrecision] + N[(N[(B$95$m * B$95$m), $MachinePrecision] / N[(A - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision] / t$95$4), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[(N[(t$95$5 * N[Sqrt[N[(t$95$1 * N[(2.0 * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t$95$4), $MachinePrecision], N[(N[Sqrt[F], $MachinePrecision] * N[(N[Sqrt[N[(C + N[(A + t$95$0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] / N[(0.0 - B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
B_m = \left|B\right|

\\
\begin{array}{l}
t_0 := \mathsf{hypot}\left(B\_m, A - C\right)\\
t_1 := B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\\
t_2 := \left(4 \cdot A\right) \cdot C\\
t_3 := \frac{\sqrt{\left(2 \cdot \left(\left({B\_m}^{2} - t\_2\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{B\_m}^{2} + {\left(A - C\right)}^{2}}\right)}}{t\_2 - {B\_m}^{2}}\\
t_4 := t\_2 - B\_m \cdot B\_m\\
t_5 := {\left(A + \left(C + t\_0\right)\right)}^{0.5}\\
\mathbf{if}\;t\_3 \leq -1 \cdot 10^{-166}:\\
\;\;\;\;\frac{t\_5 \cdot \left(\sqrt{2 \cdot t\_1} \cdot \sqrt{F}\right)}{t\_4}\\

\mathbf{elif}\;t\_3 \leq 4 \cdot 10^{-143}:\\
\;\;\;\;\frac{\sqrt{F} \cdot {\left(t\_1 \cdot \left(4 \cdot A + \frac{B\_m \cdot B\_m}{A - C}\right)\right)}^{0.5}}{t\_4}\\

\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\frac{t\_5 \cdot \sqrt{t\_1 \cdot \left(2 \cdot F\right)}}{t\_4}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{F} \cdot \left(\sqrt{C + \left(A + t\_0\right)} \cdot \frac{\sqrt{2}}{0 - B\_m}\right)\\


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

    1. Initial program 44.3%

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

        \[\leadsto \mathsf{neg}\left(\frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\right) \]
      2. distribute-neg-frac2N/A

        \[\leadsto \frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{\color{blue}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\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), \color{blue}{\left(\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)\right)}\right) \]
    3. Simplified53.2%

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

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)}^{\frac{1}{2}}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right) \cdot \left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right)\right)}^{\frac{1}{2}}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. unpow-prod-downN/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}^{\frac{1}{2}} \cdot {\left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right)}^{\frac{1}{2}}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left({\left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}^{\frac{1}{2}}\right), \left({\left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right)}^{\frac{1}{2}}\right)\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    6. Applied egg-rr71.9%

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(A, \mathsf{+.f64}\left(C, \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right)\right)\right), \frac{1}{2}\right), \left({\left(\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right) \cdot \left(2 \cdot F\right)\right)}^{\frac{1}{2}}\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), \color{blue}{C}\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(A, \mathsf{+.f64}\left(C, \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right)\right)\right), \frac{1}{2}\right), \left({\left(\left(\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right) \cdot 2\right) \cdot F\right)}^{\frac{1}{2}}\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. unpow-prod-downN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(A, \mathsf{+.f64}\left(C, \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right)\right)\right), \frac{1}{2}\right), \left({\left(\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right) \cdot 2\right)}^{\frac{1}{2}} \cdot {F}^{\frac{1}{2}}\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), \color{blue}{C}\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(A, \mathsf{+.f64}\left(C, \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right)\right)\right), \frac{1}{2}\right), \mathsf{*.f64}\left(\left({\left(\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right) \cdot 2\right)}^{\frac{1}{2}}\right), \left({F}^{\frac{1}{2}}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), \color{blue}{C}\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    8. Applied egg-rr79.4%

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

    if -1.00000000000000004e-166 < (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 #s(literal 2 binary64) (*.f64 (-.f64 (pow.f64 B #s(literal 2 binary64)) (*.f64 (*.f64 #s(literal 4 binary64) A) C)) F)) (+.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))))) (-.f64 (pow.f64 B #s(literal 2 binary64)) (*.f64 (*.f64 #s(literal 4 binary64) A) C))) < 3.9999999999999998e-143

    1. Initial program 4.1%

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

        \[\leadsto \mathsf{neg}\left(\frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\right) \]
      2. distribute-neg-frac2N/A

        \[\leadsto \frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{\color{blue}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\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), \color{blue}{\left(\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)\right)}\right) \]
    3. Simplified4.1%

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

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot \left(F \cdot 2\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right) \cdot 2\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{4}, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right) \cdot \left(2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. sqrt-prodN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F} \cdot \sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      6. pow1/2N/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)}^{\frac{1}{2}} \cdot \sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left({\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)}^{\frac{1}{2}}\right), \left(\sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right)\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    6. Applied egg-rr8.9%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\color{blue}{\left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)}\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    8. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\left(\frac{{B}^{2}}{A - C} + 4 \cdot A\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(\frac{{B}^{2}}{A - C}\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\left({B}^{2}\right), \left(A - C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(B \cdot B\right), \left(A - C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, B\right), \left(A - C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      6. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{\_.f64}\left(A, C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      7. *-lowering-*.f6413.8%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{\_.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(4, A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    9. Simplified13.8%

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

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\frac{B \cdot B}{A - C} + 4 \cdot A} \cdot \sqrt{\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right) \cdot F}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. sqrt-prodN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\frac{B \cdot B}{A - C} + 4 \cdot A} \cdot \left(\sqrt{B \cdot B + -4 \cdot \left(A \cdot C\right)} \cdot \sqrt{F}\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), \color{blue}{C}\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. pow1/2N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\frac{B \cdot B}{A - C} + 4 \cdot A} \cdot \left({\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right)}^{\frac{1}{2}} \cdot \sqrt{F}\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(\sqrt{\frac{B \cdot B}{A - C} + 4 \cdot A} \cdot {\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right)}^{\frac{1}{2}}\right) \cdot \sqrt{F}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{\frac{B \cdot B}{A - C} + 4 \cdot A} \cdot {\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right)}^{\frac{1}{2}}\right), \left(\sqrt{F}\right)\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    11. Applied egg-rr28.9%

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

    if 3.9999999999999998e-143 < (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 #s(literal 2 binary64) (*.f64 (-.f64 (pow.f64 B #s(literal 2 binary64)) (*.f64 (*.f64 #s(literal 4 binary64) A) C)) F)) (+.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))))) (-.f64 (pow.f64 B #s(literal 2 binary64)) (*.f64 (*.f64 #s(literal 4 binary64) A) C))) < +inf.0

    1. Initial program 22.9%

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

        \[\leadsto \mathsf{neg}\left(\frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\right) \]
      2. distribute-neg-frac2N/A

        \[\leadsto \frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{\color{blue}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\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), \color{blue}{\left(\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)\right)}\right) \]
    3. Simplified55.0%

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

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)}^{\frac{1}{2}}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right) \cdot \left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right)\right)}^{\frac{1}{2}}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. unpow-prod-downN/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}^{\frac{1}{2}} \cdot {\left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right)}^{\frac{1}{2}}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left({\left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}^{\frac{1}{2}}\right), \left({\left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right)}^{\frac{1}{2}}\right)\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    6. Applied egg-rr87.0%

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

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

    1. Initial program 0.0%

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

        \[\leadsto \mathsf{neg}\left(\frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\right) \]
      2. distribute-neg-frac2N/A

        \[\leadsto \frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{\color{blue}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\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), \color{blue}{\left(\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)\right)}\right) \]
    3. Simplified0.4%

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

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)}^{\frac{1}{2}}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right) \cdot \left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right)\right)}^{\frac{1}{2}}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. unpow-prod-downN/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}^{\frac{1}{2}} \cdot {\left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right)}^{\frac{1}{2}}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left({\left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}^{\frac{1}{2}}\right), \left({\left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right)}^{\frac{1}{2}}\right)\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    6. Applied egg-rr0.0%

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

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

      \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left(-1 \cdot \left(\frac{\sqrt{2}}{B} \cdot \sqrt{F}\right)\right)}, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), \mathsf{+.f64}\left(A, C\right)\right)\right)\right) \]
    9. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\left(-1 \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F}\right), \mathsf{sqrt.f64}\left(\color{blue}{\mathsf{+.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), \mathsf{+.f64}\left(A, C\right)\right)}\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(-1 \cdot \frac{\sqrt{2}}{B}\right), \left(\sqrt{F}\right)\right), \mathsf{sqrt.f64}\left(\color{blue}{\mathsf{+.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), \mathsf{+.f64}\left(A, C\right)\right)}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \left(\frac{\sqrt{2}}{B}\right)\right), \left(\sqrt{F}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\color{blue}{\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right)}, \mathsf{+.f64}\left(A, C\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\left(\sqrt{2}\right), B\right)\right), \left(\sqrt{F}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{hypot.f64}\left(B, \color{blue}{\mathsf{\_.f64}\left(A, C\right)}\right), \mathsf{+.f64}\left(A, C\right)\right)\right)\right) \]
      5. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(2\right), B\right)\right), \left(\sqrt{F}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(\color{blue}{A}, C\right)\right), \mathsf{+.f64}\left(A, C\right)\right)\right)\right) \]
      6. sqrt-lowering-sqrt.f6424.4%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(2\right), B\right)\right), \mathsf{sqrt.f64}\left(F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), \color{blue}{\mathsf{+.f64}\left(A, C\right)}\right)\right)\right) \]
    10. Simplified24.4%

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

        \[\leadsto \sqrt{\sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)} + \left(A + C\right)} \cdot \color{blue}{\left(\left(-1 \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F}\right)} \]
      2. associate-*r*N/A

        \[\leadsto \left(\sqrt{\sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)} + \left(A + C\right)} \cdot \left(-1 \cdot \frac{\sqrt{2}}{B}\right)\right) \cdot \color{blue}{\sqrt{F}} \]
      3. *-lowering-*.f64N/A

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

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

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

Alternative 3: 52.1% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_0 := \mathsf{hypot}\left(B\_m, A - C\right)\\
t_1 := B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\\
t_2 := \left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m\\
\mathbf{if}\;{B\_m}^{2} \leq 2 \cdot 10^{-193}:\\
\;\;\;\;\frac{\sqrt{2 \cdot \left(A + \left(C + t\_0\right)\right)} \cdot \sqrt{F \cdot t\_1}}{t\_2}\\

\mathbf{elif}\;{B\_m}^{2} \leq 5 \cdot 10^{-45}:\\
\;\;\;\;\frac{\sqrt{F} \cdot {\left(t\_1 \cdot \left(4 \cdot A + \frac{B\_m \cdot B\_m}{A - C}\right)\right)}^{0.5}}{t\_2}\\

\mathbf{elif}\;{B\_m}^{2} \leq 10^{+289}:\\
\;\;\;\;\sqrt{t\_1} \cdot \left(\sqrt{F} \cdot \frac{\sqrt{2 \cdot \left(\left(A + C\right) + t\_0\right)}}{t\_2}\right)\\

\mathbf{else}:\\
\;\;\;\;\sqrt{F} \cdot \left(\sqrt{C + \left(A + t\_0\right)} \cdot \frac{\sqrt{2}}{0 - B\_m}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (pow.f64 B #s(literal 2 binary64)) < 2.0000000000000001e-193

    1. Initial program 19.2%

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

        \[\leadsto \mathsf{neg}\left(\frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\right) \]
      2. distribute-neg-frac2N/A

        \[\leadsto \frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{\color{blue}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
      3. /-lowering-/.f64N/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot \left(F \cdot 2\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right) \cdot 2\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{4}, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right) \cdot \left(2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. sqrt-prodN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F} \cdot \sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      6. pow1/2N/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)}^{\frac{1}{2}} \cdot \sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left({\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)}^{\frac{1}{2}}\right), \left(\sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right)\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    6. Applied egg-rr36.2%

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

    if 2.0000000000000001e-193 < (pow.f64 B #s(literal 2 binary64)) < 4.99999999999999976e-45

    1. Initial program 12.4%

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

        \[\leadsto \mathsf{neg}\left(\frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\right) \]
      2. distribute-neg-frac2N/A

        \[\leadsto \frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{\color{blue}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\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), \color{blue}{\left(\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)\right)}\right) \]
    3. Simplified16.6%

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

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot \left(F \cdot 2\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right) \cdot 2\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{4}, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right) \cdot \left(2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. sqrt-prodN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F} \cdot \sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      6. pow1/2N/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)}^{\frac{1}{2}} \cdot \sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left({\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)}^{\frac{1}{2}}\right), \left(\sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right)\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    6. Applied egg-rr21.5%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\color{blue}{\left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)}\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    8. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\left(\frac{{B}^{2}}{A - C} + 4 \cdot A\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(\frac{{B}^{2}}{A - C}\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\left({B}^{2}\right), \left(A - C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(B \cdot B\right), \left(A - C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, B\right), \left(A - C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      6. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{\_.f64}\left(A, C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      7. *-lowering-*.f6415.2%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{\_.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(4, A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    9. Simplified15.2%

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

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\frac{B \cdot B}{A - C} + 4 \cdot A} \cdot \sqrt{\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right) \cdot F}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. sqrt-prodN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\frac{B \cdot B}{A - C} + 4 \cdot A} \cdot \left(\sqrt{B \cdot B + -4 \cdot \left(A \cdot C\right)} \cdot \sqrt{F}\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), \color{blue}{C}\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. pow1/2N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\frac{B \cdot B}{A - C} + 4 \cdot A} \cdot \left({\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right)}^{\frac{1}{2}} \cdot \sqrt{F}\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(\sqrt{\frac{B \cdot B}{A - C} + 4 \cdot A} \cdot {\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right)}^{\frac{1}{2}}\right) \cdot \sqrt{F}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{\frac{B \cdot B}{A - C} + 4 \cdot A} \cdot {\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right)}^{\frac{1}{2}}\right), \left(\sqrt{F}\right)\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    11. Applied egg-rr47.0%

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

    if 4.99999999999999976e-45 < (pow.f64 B #s(literal 2 binary64)) < 1.0000000000000001e289

    1. Initial program 31.2%

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

        \[\leadsto \mathsf{neg}\left(\frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\right) \]
      2. distribute-neg-frac2N/A

        \[\leadsto \frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{\color{blue}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
      3. /-lowering-/.f64N/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)}^{\frac{1}{2}}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right) \cdot \left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right)\right)}^{\frac{1}{2}}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. unpow-prod-downN/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}^{\frac{1}{2}} \cdot {\left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right)}^{\frac{1}{2}}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left({\left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}^{\frac{1}{2}}\right), \left({\left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right)}^{\frac{1}{2}}\right)\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    6. Applied egg-rr56.0%

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

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

    if 1.0000000000000001e289 < (pow.f64 B #s(literal 2 binary64))

    1. Initial program 1.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. Step-by-step derivation
      1. distribute-frac-negN/A

        \[\leadsto \mathsf{neg}\left(\frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\right) \]
      2. distribute-neg-frac2N/A

        \[\leadsto \frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{\color{blue}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\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), \color{blue}{\left(\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)\right)}\right) \]
    3. Simplified1.7%

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

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)}^{\frac{1}{2}}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right) \cdot \left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right)\right)}^{\frac{1}{2}}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. unpow-prod-downN/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}^{\frac{1}{2}} \cdot {\left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right)}^{\frac{1}{2}}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left({\left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}^{\frac{1}{2}}\right), \left({\left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right)}^{\frac{1}{2}}\right)\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    6. Applied egg-rr1.6%

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

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

      \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left(-1 \cdot \left(\frac{\sqrt{2}}{B} \cdot \sqrt{F}\right)\right)}, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), \mathsf{+.f64}\left(A, C\right)\right)\right)\right) \]
    9. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\left(-1 \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F}\right), \mathsf{sqrt.f64}\left(\color{blue}{\mathsf{+.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), \mathsf{+.f64}\left(A, C\right)\right)}\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(-1 \cdot \frac{\sqrt{2}}{B}\right), \left(\sqrt{F}\right)\right), \mathsf{sqrt.f64}\left(\color{blue}{\mathsf{+.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), \mathsf{+.f64}\left(A, C\right)\right)}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \left(\frac{\sqrt{2}}{B}\right)\right), \left(\sqrt{F}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\color{blue}{\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right)}, \mathsf{+.f64}\left(A, C\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\left(\sqrt{2}\right), B\right)\right), \left(\sqrt{F}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{hypot.f64}\left(B, \color{blue}{\mathsf{\_.f64}\left(A, C\right)}\right), \mathsf{+.f64}\left(A, C\right)\right)\right)\right) \]
      5. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(2\right), B\right)\right), \left(\sqrt{F}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(\color{blue}{A}, C\right)\right), \mathsf{+.f64}\left(A, C\right)\right)\right)\right) \]
      6. sqrt-lowering-sqrt.f6439.6%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(2\right), B\right)\right), \mathsf{sqrt.f64}\left(F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), \color{blue}{\mathsf{+.f64}\left(A, C\right)}\right)\right)\right) \]
    10. Simplified39.6%

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

        \[\leadsto \sqrt{\sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)} + \left(A + C\right)} \cdot \color{blue}{\left(\left(-1 \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F}\right)} \]
      2. associate-*r*N/A

        \[\leadsto \left(\sqrt{\sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)} + \left(A + C\right)} \cdot \left(-1 \cdot \frac{\sqrt{2}}{B}\right)\right) \cdot \color{blue}{\sqrt{F}} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)} + \left(A + C\right)} \cdot \left(-1 \cdot \frac{\sqrt{2}}{B}\right)\right), \color{blue}{\left(\sqrt{F}\right)}\right) \]
    12. Applied egg-rr50.0%

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

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

Alternative 4: 54.8% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
t_0 := \mathsf{hypot}\left(B\_m, A - C\right)\\
\mathbf{if}\;{B\_m}^{2} \leq 10^{+80}:\\
\;\;\;\;\sqrt{\left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right) \cdot \left(2 \cdot F\right)} \cdot \frac{{\left(A + \left(C + t\_0\right)\right)}^{0.5}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{F} \cdot \left(\sqrt{C + \left(A + t\_0\right)} \cdot \frac{\sqrt{2}}{0 - B\_m}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (pow.f64 B #s(literal 2 binary64)) < 1e80

    1. Initial program 22.8%

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

        \[\leadsto \mathsf{neg}\left(\frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\right) \]
      2. distribute-neg-frac2N/A

        \[\leadsto \frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{\color{blue}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\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), \color{blue}{\left(\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)\right)}\right) \]
    3. Simplified30.3%

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

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

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

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

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

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

    if 1e80 < (pow.f64 B #s(literal 2 binary64))

    1. Initial program 10.9%

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

        \[\leadsto \mathsf{neg}\left(\frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\right) \]
      2. distribute-neg-frac2N/A

        \[\leadsto \frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{\color{blue}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
      3. /-lowering-/.f64N/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)}^{\frac{1}{2}}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right) \cdot \left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right)\right)}^{\frac{1}{2}}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. unpow-prod-downN/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}^{\frac{1}{2}} \cdot {\left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right)}^{\frac{1}{2}}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left({\left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}^{\frac{1}{2}}\right), \left({\left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right)}^{\frac{1}{2}}\right)\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    6. Applied egg-rr22.6%

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

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

      \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left(-1 \cdot \left(\frac{\sqrt{2}}{B} \cdot \sqrt{F}\right)\right)}, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), \mathsf{+.f64}\left(A, C\right)\right)\right)\right) \]
    9. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\left(-1 \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F}\right), \mathsf{sqrt.f64}\left(\color{blue}{\mathsf{+.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), \mathsf{+.f64}\left(A, C\right)\right)}\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(-1 \cdot \frac{\sqrt{2}}{B}\right), \left(\sqrt{F}\right)\right), \mathsf{sqrt.f64}\left(\color{blue}{\mathsf{+.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), \mathsf{+.f64}\left(A, C\right)\right)}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \left(\frac{\sqrt{2}}{B}\right)\right), \left(\sqrt{F}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\color{blue}{\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right)}, \mathsf{+.f64}\left(A, C\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\left(\sqrt{2}\right), B\right)\right), \left(\sqrt{F}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{hypot.f64}\left(B, \color{blue}{\mathsf{\_.f64}\left(A, C\right)}\right), \mathsf{+.f64}\left(A, C\right)\right)\right)\right) \]
      5. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(2\right), B\right)\right), \left(\sqrt{F}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(\color{blue}{A}, C\right)\right), \mathsf{+.f64}\left(A, C\right)\right)\right)\right) \]
      6. sqrt-lowering-sqrt.f6434.2%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(2\right), B\right)\right), \mathsf{sqrt.f64}\left(F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), \color{blue}{\mathsf{+.f64}\left(A, C\right)}\right)\right)\right) \]
    10. Simplified34.2%

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

        \[\leadsto \sqrt{\sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)} + \left(A + C\right)} \cdot \color{blue}{\left(\left(-1 \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F}\right)} \]
      2. associate-*r*N/A

        \[\leadsto \left(\sqrt{\sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)} + \left(A + C\right)} \cdot \left(-1 \cdot \frac{\sqrt{2}}{B}\right)\right) \cdot \color{blue}{\sqrt{F}} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)} + \left(A + C\right)} \cdot \left(-1 \cdot \frac{\sqrt{2}}{B}\right)\right), \color{blue}{\left(\sqrt{F}\right)}\right) \]
    12. Applied egg-rr40.0%

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

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

Alternative 5: 53.8% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
t_0 := \mathsf{hypot}\left(B\_m, A - C\right)\\
\mathbf{if}\;B\_m \leq 3.4 \cdot 10^{+46}:\\
\;\;\;\;\sqrt{\left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right) \cdot \left(2 \cdot F\right)} \cdot \frac{{\left(A + \left(C + t\_0\right)\right)}^{0.5}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\

\mathbf{elif}\;B\_m \leq 8 \cdot 10^{+214}:\\
\;\;\;\;\sqrt{C + \left(A + t\_0\right)} \cdot \frac{{\left(2 \cdot F\right)}^{0.5}}{0 - B\_m}\\

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


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

    1. Initial program 20.1%

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

        \[\leadsto \mathsf{neg}\left(\frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\right) \]
      2. distribute-neg-frac2N/A

        \[\leadsto \frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{\color{blue}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\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), \color{blue}{\left(\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)\right)}\right) \]
    3. Simplified25.7%

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

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

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

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

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

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

    if 3.3999999999999998e46 < B < 7.9999999999999996e214

    1. Initial program 16.3%

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

        \[\leadsto \mathsf{neg}\left(\frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\right) \]
      2. distribute-neg-frac2N/A

        \[\leadsto \frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{\color{blue}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\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), \color{blue}{\left(\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)\right)}\right) \]
    3. Simplified22.7%

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

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)}^{\frac{1}{2}}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right) \cdot \left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right)\right)}^{\frac{1}{2}}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. unpow-prod-downN/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}^{\frac{1}{2}} \cdot {\left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right)}^{\frac{1}{2}}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left({\left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}^{\frac{1}{2}}\right), \left({\left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right)}^{\frac{1}{2}}\right)\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    6. Applied egg-rr25.2%

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

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

      \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left(-1 \cdot \left(\frac{\sqrt{2}}{B} \cdot \sqrt{F}\right)\right)}, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), \mathsf{+.f64}\left(A, C\right)\right)\right)\right) \]
    9. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\left(-1 \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F}\right), \mathsf{sqrt.f64}\left(\color{blue}{\mathsf{+.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), \mathsf{+.f64}\left(A, C\right)\right)}\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(-1 \cdot \frac{\sqrt{2}}{B}\right), \left(\sqrt{F}\right)\right), \mathsf{sqrt.f64}\left(\color{blue}{\mathsf{+.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), \mathsf{+.f64}\left(A, C\right)\right)}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \left(\frac{\sqrt{2}}{B}\right)\right), \left(\sqrt{F}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\color{blue}{\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right)}, \mathsf{+.f64}\left(A, C\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\left(\sqrt{2}\right), B\right)\right), \left(\sqrt{F}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{hypot.f64}\left(B, \color{blue}{\mathsf{\_.f64}\left(A, C\right)}\right), \mathsf{+.f64}\left(A, C\right)\right)\right)\right) \]
      5. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(2\right), B\right)\right), \left(\sqrt{F}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(\color{blue}{A}, C\right)\right), \mathsf{+.f64}\left(A, C\right)\right)\right)\right) \]
      6. sqrt-lowering-sqrt.f6459.8%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(2\right), B\right)\right), \mathsf{sqrt.f64}\left(F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), \color{blue}{\mathsf{+.f64}\left(A, C\right)}\right)\right)\right) \]
    10. Simplified59.8%

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

        \[\leadsto \sqrt{\sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)} + \left(A + C\right)} \cdot \color{blue}{\left(\left(-1 \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F}\right)} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)} + \left(A + C\right)}\right), \color{blue}{\left(\left(-1 \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F}\right)}\right) \]
      3. sqrt-lowering-sqrt.f64N/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\left(\sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)} + A\right) + C\right)\right), \left(\left(\color{blue}{-1} \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F}\right)\right) \]
      5. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(C + \left(\sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)} + A\right)\right)\right), \left(\left(\color{blue}{-1} \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F}\right)\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(C, \left(\sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)} + A\right)\right)\right), \left(\left(\color{blue}{-1} \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F}\right)\right) \]
      7. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(C, \left(A + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)\right), \left(\left(-1 \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F}\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(C, \mathsf{+.f64}\left(A, \left(\sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)\right)\right), \left(\left(-1 \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F}\right)\right) \]
      9. hypot-defineN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(C, \mathsf{+.f64}\left(A, \left(\mathsf{hypot}\left(B, A - C\right)\right)\right)\right)\right), \left(\left(-1 \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F}\right)\right) \]
      10. hypot-lowering-hypot.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(C, \mathsf{+.f64}\left(A, \mathsf{hypot.f64}\left(B, \left(A - C\right)\right)\right)\right)\right), \left(\left(-1 \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F}\right)\right) \]
      11. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(C, \mathsf{+.f64}\left(A, \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right)\right)\right)\right), \left(\left(-1 \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F}\right)\right) \]
      12. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(C, \mathsf{+.f64}\left(A, \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right)\right)\right)\right), \left(-1 \cdot \color{blue}{\left(\frac{\sqrt{2}}{B} \cdot \sqrt{F}\right)}\right)\right) \]
      13. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(C, \mathsf{+.f64}\left(A, \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right)\right)\right)\right), \left(\mathsf{neg}\left(\frac{\sqrt{2}}{B} \cdot \sqrt{F}\right)\right)\right) \]
      14. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(C, \mathsf{+.f64}\left(A, \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right)\right)\right)\right), \mathsf{neg.f64}\left(\left(\frac{\sqrt{2}}{B} \cdot \sqrt{F}\right)\right)\right) \]
    12. Applied egg-rr60.0%

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

    if 7.9999999999999996e214 < B

    1. Initial program 0.0%

      \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
    2. Add Preprocessing
    3. Taylor expanded in A around 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. associate-*r*N/A

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

        \[\leadsto \mathsf{*.f64}\left(\left(-1 \cdot \frac{\sqrt{2}}{B}\right), \color{blue}{\left(\sqrt{F \cdot \left(C + \sqrt{{B}^{2} + {C}^{2}}\right)}\right)}\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \left(\frac{\sqrt{2}}{B}\right)\right), \left(\sqrt{\color{blue}{F \cdot \left(C + \sqrt{{B}^{2} + {C}^{2}}\right)}}\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\left(\sqrt{2}\right), B\right)\right), \left(\sqrt{F \cdot \color{blue}{\left(C + \sqrt{{B}^{2} + {C}^{2}}\right)}}\right)\right) \]
      5. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(2\right), B\right)\right), \left(\sqrt{F \cdot \left(\color{blue}{C} + \sqrt{{B}^{2} + {C}^{2}}\right)}\right)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(2\right), B\right)\right), \mathsf{sqrt.f64}\left(\left(F \cdot \left(C + \sqrt{{B}^{2} + {C}^{2}}\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(2\right), B\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \left(C + \sqrt{{B}^{2} + {C}^{2}}\right)\right)\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(2\right), B\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(C, \left(\sqrt{{B}^{2} + {C}^{2}}\right)\right)\right)\right)\right) \]
      9. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(2\right), B\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(C, \left(\sqrt{{C}^{2} + {B}^{2}}\right)\right)\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(2\right), B\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(C, \left(\sqrt{C \cdot C + {B}^{2}}\right)\right)\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(2\right), B\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(C, \left(\sqrt{C \cdot C + B \cdot B}\right)\right)\right)\right)\right) \]
      12. hypot-defineN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(2\right), B\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(C, \left(\mathsf{hypot}\left(C, B\right)\right)\right)\right)\right)\right) \]
      13. hypot-lowering-hypot.f6449.9%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(2\right), B\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(C, \mathsf{hypot.f64}\left(C, B\right)\right)\right)\right)\right) \]
    5. Simplified49.9%

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

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

        \[\leadsto \left(\sqrt{F} \cdot \sqrt{C + \sqrt{C \cdot C + B \cdot B}}\right) \cdot \left(\color{blue}{-1} \cdot \frac{\sqrt{2}}{B}\right) \]
      3. pow1/2N/A

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

        \[\leadsto \sqrt{F} \cdot \color{blue}{\left({\left(C + \sqrt{C \cdot C + B \cdot B}\right)}^{\frac{1}{2}} \cdot \left(-1 \cdot \frac{\sqrt{2}}{B}\right)\right)} \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{F}\right), \color{blue}{\left({\left(C + \sqrt{C \cdot C + B \cdot B}\right)}^{\frac{1}{2}} \cdot \left(-1 \cdot \frac{\sqrt{2}}{B}\right)\right)}\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(F\right), \left(\color{blue}{{\left(C + \sqrt{C \cdot C + B \cdot B}\right)}^{\frac{1}{2}}} \cdot \left(-1 \cdot \frac{\sqrt{2}}{B}\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(F\right), \mathsf{*.f64}\left(\left({\left(C + \sqrt{C \cdot C + B \cdot B}\right)}^{\frac{1}{2}}\right), \color{blue}{\left(-1 \cdot \frac{\sqrt{2}}{B}\right)}\right)\right) \]
      8. pow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(F\right), \mathsf{*.f64}\left(\left(\sqrt{C + \sqrt{C \cdot C + B \cdot B}}\right), \left(\color{blue}{-1} \cdot \frac{\sqrt{2}}{B}\right)\right)\right) \]
      9. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(F\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(C + \sqrt{C \cdot C + B \cdot B}\right)\right), \left(\color{blue}{-1} \cdot \frac{\sqrt{2}}{B}\right)\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(F\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(C, \left(\sqrt{C \cdot C + B \cdot B}\right)\right)\right), \left(-1 \cdot \frac{\sqrt{2}}{B}\right)\right)\right) \]
      11. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(F\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(C, \left(\sqrt{B \cdot B + C \cdot C}\right)\right)\right), \left(-1 \cdot \frac{\sqrt{2}}{B}\right)\right)\right) \]
      12. hypot-defineN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(F\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(C, \left(\mathsf{hypot}\left(B, C\right)\right)\right)\right), \left(-1 \cdot \frac{\sqrt{2}}{B}\right)\right)\right) \]
      13. hypot-lowering-hypot.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(F\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(C, \mathsf{hypot.f64}\left(B, C\right)\right)\right), \left(-1 \cdot \frac{\sqrt{2}}{B}\right)\right)\right) \]
      14. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(F\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(C, \mathsf{hypot.f64}\left(B, C\right)\right)\right), \left(\mathsf{neg}\left(\frac{\sqrt{2}}{B}\right)\right)\right)\right) \]
      15. neg-sub0N/A

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

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

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

Alternative 6: 53.4% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
t_0 := {\left(2 \cdot F\right)}^{0.5}\\
t_1 := \mathsf{hypot}\left(B\_m, A - C\right)\\
\mathbf{if}\;B\_m \leq 1.9 \cdot 10^{+41}:\\
\;\;\;\;\sqrt{\left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right) \cdot \left(2 \cdot F\right)} \cdot \frac{{\left(A + \left(C + t\_1\right)\right)}^{0.5}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\

\mathbf{elif}\;B\_m \leq 7.2 \cdot 10^{+219}:\\
\;\;\;\;\sqrt{C + \left(A + t\_1\right)} \cdot \frac{t\_0}{0 - B\_m}\\

\mathbf{else}:\\
\;\;\;\;\frac{t\_0}{0 - \sqrt{B\_m}}\\


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

    1. Initial program 20.1%

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

        \[\leadsto \mathsf{neg}\left(\frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\right) \]
      2. distribute-neg-frac2N/A

        \[\leadsto \frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{\color{blue}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\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), \color{blue}{\left(\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)\right)}\right) \]
    3. Simplified25.7%

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

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

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

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

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

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

    if 1.9000000000000001e41 < B < 7.20000000000000012e219

    1. Initial program 16.3%

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

        \[\leadsto \mathsf{neg}\left(\frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\right) \]
      2. distribute-neg-frac2N/A

        \[\leadsto \frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{\color{blue}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\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), \color{blue}{\left(\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)\right)}\right) \]
    3. Simplified22.7%

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

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)}^{\frac{1}{2}}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right) \cdot \left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right)\right)}^{\frac{1}{2}}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. unpow-prod-downN/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}^{\frac{1}{2}} \cdot {\left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right)}^{\frac{1}{2}}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left({\left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}^{\frac{1}{2}}\right), \left({\left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right)}^{\frac{1}{2}}\right)\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    6. Applied egg-rr25.2%

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

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

      \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left(-1 \cdot \left(\frac{\sqrt{2}}{B} \cdot \sqrt{F}\right)\right)}, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), \mathsf{+.f64}\left(A, C\right)\right)\right)\right) \]
    9. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\left(-1 \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F}\right), \mathsf{sqrt.f64}\left(\color{blue}{\mathsf{+.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), \mathsf{+.f64}\left(A, C\right)\right)}\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(-1 \cdot \frac{\sqrt{2}}{B}\right), \left(\sqrt{F}\right)\right), \mathsf{sqrt.f64}\left(\color{blue}{\mathsf{+.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), \mathsf{+.f64}\left(A, C\right)\right)}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \left(\frac{\sqrt{2}}{B}\right)\right), \left(\sqrt{F}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\color{blue}{\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right)}, \mathsf{+.f64}\left(A, C\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\left(\sqrt{2}\right), B\right)\right), \left(\sqrt{F}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{hypot.f64}\left(B, \color{blue}{\mathsf{\_.f64}\left(A, C\right)}\right), \mathsf{+.f64}\left(A, C\right)\right)\right)\right) \]
      5. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(2\right), B\right)\right), \left(\sqrt{F}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(\color{blue}{A}, C\right)\right), \mathsf{+.f64}\left(A, C\right)\right)\right)\right) \]
      6. sqrt-lowering-sqrt.f6459.8%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(2\right), B\right)\right), \mathsf{sqrt.f64}\left(F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), \color{blue}{\mathsf{+.f64}\left(A, C\right)}\right)\right)\right) \]
    10. Simplified59.8%

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

        \[\leadsto \sqrt{\sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)} + \left(A + C\right)} \cdot \color{blue}{\left(\left(-1 \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F}\right)} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)} + \left(A + C\right)}\right), \color{blue}{\left(\left(-1 \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F}\right)}\right) \]
      3. sqrt-lowering-sqrt.f64N/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\left(\sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)} + A\right) + C\right)\right), \left(\left(\color{blue}{-1} \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F}\right)\right) \]
      5. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(C + \left(\sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)} + A\right)\right)\right), \left(\left(\color{blue}{-1} \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F}\right)\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(C, \left(\sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)} + A\right)\right)\right), \left(\left(\color{blue}{-1} \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F}\right)\right) \]
      7. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(C, \left(A + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)\right), \left(\left(-1 \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F}\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(C, \mathsf{+.f64}\left(A, \left(\sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)\right)\right), \left(\left(-1 \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F}\right)\right) \]
      9. hypot-defineN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(C, \mathsf{+.f64}\left(A, \left(\mathsf{hypot}\left(B, A - C\right)\right)\right)\right)\right), \left(\left(-1 \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F}\right)\right) \]
      10. hypot-lowering-hypot.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(C, \mathsf{+.f64}\left(A, \mathsf{hypot.f64}\left(B, \left(A - C\right)\right)\right)\right)\right), \left(\left(-1 \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F}\right)\right) \]
      11. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(C, \mathsf{+.f64}\left(A, \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right)\right)\right)\right), \left(\left(-1 \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F}\right)\right) \]
      12. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(C, \mathsf{+.f64}\left(A, \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right)\right)\right)\right), \left(-1 \cdot \color{blue}{\left(\frac{\sqrt{2}}{B} \cdot \sqrt{F}\right)}\right)\right) \]
      13. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(C, \mathsf{+.f64}\left(A, \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right)\right)\right)\right), \left(\mathsf{neg}\left(\frac{\sqrt{2}}{B} \cdot \sqrt{F}\right)\right)\right) \]
      14. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(C, \mathsf{+.f64}\left(A, \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right)\right)\right)\right), \mathsf{neg.f64}\left(\left(\frac{\sqrt{2}}{B} \cdot \sqrt{F}\right)\right)\right) \]
    12. Applied egg-rr60.0%

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

    if 7.20000000000000012e219 < B

    1. Initial program 0.0%

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

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

        \[\leadsto \mathsf{neg}\left(\sqrt{\frac{F}{B}} \cdot \sqrt{2}\right) \]
      2. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{\frac{F}{B}} \cdot \sqrt{2}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{\frac{F}{B}}\right), \left(\sqrt{2}\right)\right)\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{F}{B}\right)\right), \left(\sqrt{2}\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(F, B\right)\right), \left(\sqrt{2}\right)\right)\right) \]
      6. sqrt-lowering-sqrt.f6461.1%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(F, B\right)\right), \mathsf{sqrt.f64}\left(2\right)\right)\right) \]
    5. Simplified61.1%

      \[\leadsto \color{blue}{-\sqrt{\frac{F}{B}} \cdot \sqrt{2}} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot \sqrt{\frac{F}{B}}\right)\right) \]
      2. sqrt-divN/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot \frac{\sqrt{F}}{\sqrt{B}}\right)\right) \]
      3. pow1/2N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot \frac{{F}^{\frac{1}{2}}}{\sqrt{B}}\right)\right) \]
      4. associate-*r/N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{\sqrt{2} \cdot {F}^{\frac{1}{2}}}{\sqrt{B}}\right)\right) \]
      5. pow1/2N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{{2}^{\frac{1}{2}} \cdot {F}^{\frac{1}{2}}}{\sqrt{B}}\right)\right) \]
      6. unpow-prod-downN/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{{\left(2 \cdot F\right)}^{\frac{1}{2}}}{\sqrt{B}}\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left({\left(2 \cdot F\right)}^{\frac{1}{2}}\right), \left(\sqrt{B}\right)\right)\right) \]
      8. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(2 \cdot F\right), \frac{1}{2}\right), \left(\sqrt{B}\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(2, F\right), \frac{1}{2}\right), \left(\sqrt{B}\right)\right)\right) \]
      10. sqrt-lowering-sqrt.f6487.2%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(2, F\right), \frac{1}{2}\right), \mathsf{sqrt.f64}\left(B\right)\right)\right) \]
    7. Applied egg-rr87.2%

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

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

Alternative 7: 53.4% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
t_0 := \mathsf{hypot}\left(B\_m, A - C\right)\\
t_1 := {\left(2 \cdot F\right)}^{0.5}\\
\mathbf{if}\;B\_m \leq 1.2 \cdot 10^{+40}:\\
\;\;\;\;\frac{\sqrt{2 \cdot \left(A + \left(C + t\_0\right)\right)} \cdot \sqrt{F \cdot \left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right)}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\

\mathbf{elif}\;B\_m \leq 2.25 \cdot 10^{+216}:\\
\;\;\;\;\sqrt{C + \left(A + t\_0\right)} \cdot \frac{t\_1}{0 - B\_m}\\

\mathbf{else}:\\
\;\;\;\;\frac{t\_1}{0 - \sqrt{B\_m}}\\


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

    1. Initial program 20.1%

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

        \[\leadsto \mathsf{neg}\left(\frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\right) \]
      2. distribute-neg-frac2N/A

        \[\leadsto \frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{\color{blue}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\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), \color{blue}{\left(\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)\right)}\right) \]
    3. Simplified25.7%

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

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot \left(F \cdot 2\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right) \cdot 2\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{4}, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right) \cdot \left(2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. sqrt-prodN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F} \cdot \sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      6. pow1/2N/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)}^{\frac{1}{2}} \cdot \sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left({\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)}^{\frac{1}{2}}\right), \left(\sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right)\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    6. Applied egg-rr37.0%

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

    if 1.2e40 < B < 2.25000000000000012e216

    1. Initial program 16.3%

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

        \[\leadsto \mathsf{neg}\left(\frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\right) \]
      2. distribute-neg-frac2N/A

        \[\leadsto \frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{\color{blue}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\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), \color{blue}{\left(\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)\right)}\right) \]
    3. Simplified22.7%

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

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)}^{\frac{1}{2}}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right) \cdot \left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right)\right)}^{\frac{1}{2}}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. unpow-prod-downN/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}^{\frac{1}{2}} \cdot {\left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right)}^{\frac{1}{2}}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left({\left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}^{\frac{1}{2}}\right), \left({\left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right)}^{\frac{1}{2}}\right)\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    6. Applied egg-rr25.2%

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

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

      \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left(-1 \cdot \left(\frac{\sqrt{2}}{B} \cdot \sqrt{F}\right)\right)}, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), \mathsf{+.f64}\left(A, C\right)\right)\right)\right) \]
    9. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\left(-1 \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F}\right), \mathsf{sqrt.f64}\left(\color{blue}{\mathsf{+.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), \mathsf{+.f64}\left(A, C\right)\right)}\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(-1 \cdot \frac{\sqrt{2}}{B}\right), \left(\sqrt{F}\right)\right), \mathsf{sqrt.f64}\left(\color{blue}{\mathsf{+.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), \mathsf{+.f64}\left(A, C\right)\right)}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \left(\frac{\sqrt{2}}{B}\right)\right), \left(\sqrt{F}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\color{blue}{\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right)}, \mathsf{+.f64}\left(A, C\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\left(\sqrt{2}\right), B\right)\right), \left(\sqrt{F}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{hypot.f64}\left(B, \color{blue}{\mathsf{\_.f64}\left(A, C\right)}\right), \mathsf{+.f64}\left(A, C\right)\right)\right)\right) \]
      5. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(2\right), B\right)\right), \left(\sqrt{F}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(\color{blue}{A}, C\right)\right), \mathsf{+.f64}\left(A, C\right)\right)\right)\right) \]
      6. sqrt-lowering-sqrt.f6459.8%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(2\right), B\right)\right), \mathsf{sqrt.f64}\left(F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), \color{blue}{\mathsf{+.f64}\left(A, C\right)}\right)\right)\right) \]
    10. Simplified59.8%

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

        \[\leadsto \sqrt{\sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)} + \left(A + C\right)} \cdot \color{blue}{\left(\left(-1 \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F}\right)} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)} + \left(A + C\right)}\right), \color{blue}{\left(\left(-1 \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F}\right)}\right) \]
      3. sqrt-lowering-sqrt.f64N/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\left(\sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)} + A\right) + C\right)\right), \left(\left(\color{blue}{-1} \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F}\right)\right) \]
      5. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(C + \left(\sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)} + A\right)\right)\right), \left(\left(\color{blue}{-1} \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F}\right)\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(C, \left(\sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)} + A\right)\right)\right), \left(\left(\color{blue}{-1} \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F}\right)\right) \]
      7. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(C, \left(A + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)\right), \left(\left(-1 \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F}\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(C, \mathsf{+.f64}\left(A, \left(\sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)\right)\right), \left(\left(-1 \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F}\right)\right) \]
      9. hypot-defineN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(C, \mathsf{+.f64}\left(A, \left(\mathsf{hypot}\left(B, A - C\right)\right)\right)\right)\right), \left(\left(-1 \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F}\right)\right) \]
      10. hypot-lowering-hypot.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(C, \mathsf{+.f64}\left(A, \mathsf{hypot.f64}\left(B, \left(A - C\right)\right)\right)\right)\right), \left(\left(-1 \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F}\right)\right) \]
      11. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(C, \mathsf{+.f64}\left(A, \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right)\right)\right)\right), \left(\left(-1 \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F}\right)\right) \]
      12. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(C, \mathsf{+.f64}\left(A, \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right)\right)\right)\right), \left(-1 \cdot \color{blue}{\left(\frac{\sqrt{2}}{B} \cdot \sqrt{F}\right)}\right)\right) \]
      13. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(C, \mathsf{+.f64}\left(A, \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right)\right)\right)\right), \left(\mathsf{neg}\left(\frac{\sqrt{2}}{B} \cdot \sqrt{F}\right)\right)\right) \]
      14. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(C, \mathsf{+.f64}\left(A, \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right)\right)\right)\right), \mathsf{neg.f64}\left(\left(\frac{\sqrt{2}}{B} \cdot \sqrt{F}\right)\right)\right) \]
    12. Applied egg-rr60.0%

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

    if 2.25000000000000012e216 < B

    1. Initial program 0.0%

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

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

        \[\leadsto \mathsf{neg}\left(\sqrt{\frac{F}{B}} \cdot \sqrt{2}\right) \]
      2. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{\frac{F}{B}} \cdot \sqrt{2}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{\frac{F}{B}}\right), \left(\sqrt{2}\right)\right)\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{F}{B}\right)\right), \left(\sqrt{2}\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(F, B\right)\right), \left(\sqrt{2}\right)\right)\right) \]
      6. sqrt-lowering-sqrt.f6461.1%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(F, B\right)\right), \mathsf{sqrt.f64}\left(2\right)\right)\right) \]
    5. Simplified61.1%

      \[\leadsto \color{blue}{-\sqrt{\frac{F}{B}} \cdot \sqrt{2}} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot \sqrt{\frac{F}{B}}\right)\right) \]
      2. sqrt-divN/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot \frac{\sqrt{F}}{\sqrt{B}}\right)\right) \]
      3. pow1/2N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot \frac{{F}^{\frac{1}{2}}}{\sqrt{B}}\right)\right) \]
      4. associate-*r/N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{\sqrt{2} \cdot {F}^{\frac{1}{2}}}{\sqrt{B}}\right)\right) \]
      5. pow1/2N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{{2}^{\frac{1}{2}} \cdot {F}^{\frac{1}{2}}}{\sqrt{B}}\right)\right) \]
      6. unpow-prod-downN/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{{\left(2 \cdot F\right)}^{\frac{1}{2}}}{\sqrt{B}}\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left({\left(2 \cdot F\right)}^{\frac{1}{2}}\right), \left(\sqrt{B}\right)\right)\right) \]
      8. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(2 \cdot F\right), \frac{1}{2}\right), \left(\sqrt{B}\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(2, F\right), \frac{1}{2}\right), \left(\sqrt{B}\right)\right)\right) \]
      10. sqrt-lowering-sqrt.f6487.2%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(2, F\right), \frac{1}{2}\right), \mathsf{sqrt.f64}\left(B\right)\right)\right) \]
    7. Applied egg-rr87.2%

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

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

Alternative 8: 48.9% accurate, 1.9× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ \begin{array}{l} t_0 := {\left(2 \cdot F\right)}^{0.5}\\ t_1 := \left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m\\ t_2 := \mathsf{hypot}\left(B\_m, A - C\right)\\ t_3 := B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;B\_m \leq 2.6 \cdot 10^{-96}:\\ \;\;\;\;\frac{\sqrt{2 \cdot \left(F \cdot t\_3\right)}}{t\_1} \cdot \sqrt{\left(A + C\right) + t\_2}\\ \mathbf{elif}\;B\_m \leq 7.5 \cdot 10^{-9}:\\ \;\;\;\;\frac{\sqrt{F} \cdot {\left(t\_3 \cdot \left(4 \cdot A + \frac{B\_m \cdot B\_m}{A - C}\right)\right)}^{0.5}}{t\_1}\\ \mathbf{elif}\;B\_m \leq 3.9 \cdot 10^{+215}:\\ \;\;\;\;\sqrt{C + \left(A + t\_2\right)} \cdot \frac{t\_0}{0 - B\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{t\_0}{0 - \sqrt{B\_m}}\\ \end{array} \end{array} \]
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
 :precision binary64
 (let* ((t_0 (pow (* 2.0 F) 0.5))
        (t_1 (- (* (* 4.0 A) C) (* B_m B_m)))
        (t_2 (hypot B_m (- A C)))
        (t_3 (+ (* B_m B_m) (* -4.0 (* A C)))))
   (if (<= B_m 2.6e-96)
     (* (/ (sqrt (* 2.0 (* F t_3))) t_1) (sqrt (+ (+ A C) t_2)))
     (if (<= B_m 7.5e-9)
       (/
        (* (sqrt F) (pow (* t_3 (+ (* 4.0 A) (/ (* B_m B_m) (- A C)))) 0.5))
        t_1)
       (if (<= B_m 3.9e+215)
         (* (sqrt (+ C (+ A t_2))) (/ t_0 (- 0.0 B_m)))
         (/ t_0 (- 0.0 (sqrt B_m))))))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
	double t_0 = pow((2.0 * F), 0.5);
	double t_1 = ((4.0 * A) * C) - (B_m * B_m);
	double t_2 = hypot(B_m, (A - C));
	double t_3 = (B_m * B_m) + (-4.0 * (A * C));
	double tmp;
	if (B_m <= 2.6e-96) {
		tmp = (sqrt((2.0 * (F * t_3))) / t_1) * sqrt(((A + C) + t_2));
	} else if (B_m <= 7.5e-9) {
		tmp = (sqrt(F) * pow((t_3 * ((4.0 * A) + ((B_m * B_m) / (A - C)))), 0.5)) / t_1;
	} else if (B_m <= 3.9e+215) {
		tmp = sqrt((C + (A + t_2))) * (t_0 / (0.0 - B_m));
	} else {
		tmp = t_0 / (0.0 - sqrt(B_m));
	}
	return tmp;
}
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
	double t_0 = Math.pow((2.0 * F), 0.5);
	double t_1 = ((4.0 * A) * C) - (B_m * B_m);
	double t_2 = Math.hypot(B_m, (A - C));
	double t_3 = (B_m * B_m) + (-4.0 * (A * C));
	double tmp;
	if (B_m <= 2.6e-96) {
		tmp = (Math.sqrt((2.0 * (F * t_3))) / t_1) * Math.sqrt(((A + C) + t_2));
	} else if (B_m <= 7.5e-9) {
		tmp = (Math.sqrt(F) * Math.pow((t_3 * ((4.0 * A) + ((B_m * B_m) / (A - C)))), 0.5)) / t_1;
	} else if (B_m <= 3.9e+215) {
		tmp = Math.sqrt((C + (A + t_2))) * (t_0 / (0.0 - B_m));
	} else {
		tmp = t_0 / (0.0 - Math.sqrt(B_m));
	}
	return tmp;
}
B_m = math.fabs(B)
def code(A, B_m, C, F):
	t_0 = math.pow((2.0 * F), 0.5)
	t_1 = ((4.0 * A) * C) - (B_m * B_m)
	t_2 = math.hypot(B_m, (A - C))
	t_3 = (B_m * B_m) + (-4.0 * (A * C))
	tmp = 0
	if B_m <= 2.6e-96:
		tmp = (math.sqrt((2.0 * (F * t_3))) / t_1) * math.sqrt(((A + C) + t_2))
	elif B_m <= 7.5e-9:
		tmp = (math.sqrt(F) * math.pow((t_3 * ((4.0 * A) + ((B_m * B_m) / (A - C)))), 0.5)) / t_1
	elif B_m <= 3.9e+215:
		tmp = math.sqrt((C + (A + t_2))) * (t_0 / (0.0 - B_m))
	else:
		tmp = t_0 / (0.0 - math.sqrt(B_m))
	return tmp
B_m = abs(B)
function code(A, B_m, C, F)
	t_0 = Float64(2.0 * F) ^ 0.5
	t_1 = Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m))
	t_2 = hypot(B_m, Float64(A - C))
	t_3 = Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C)))
	tmp = 0.0
	if (B_m <= 2.6e-96)
		tmp = Float64(Float64(sqrt(Float64(2.0 * Float64(F * t_3))) / t_1) * sqrt(Float64(Float64(A + C) + t_2)));
	elseif (B_m <= 7.5e-9)
		tmp = Float64(Float64(sqrt(F) * (Float64(t_3 * Float64(Float64(4.0 * A) + Float64(Float64(B_m * B_m) / Float64(A - C)))) ^ 0.5)) / t_1);
	elseif (B_m <= 3.9e+215)
		tmp = Float64(sqrt(Float64(C + Float64(A + t_2))) * Float64(t_0 / Float64(0.0 - B_m)));
	else
		tmp = Float64(t_0 / Float64(0.0 - sqrt(B_m)));
	end
	return tmp
end
B_m = abs(B);
function tmp_2 = code(A, B_m, C, F)
	t_0 = (2.0 * F) ^ 0.5;
	t_1 = ((4.0 * A) * C) - (B_m * B_m);
	t_2 = hypot(B_m, (A - C));
	t_3 = (B_m * B_m) + (-4.0 * (A * C));
	tmp = 0.0;
	if (B_m <= 2.6e-96)
		tmp = (sqrt((2.0 * (F * t_3))) / t_1) * sqrt(((A + C) + t_2));
	elseif (B_m <= 7.5e-9)
		tmp = (sqrt(F) * ((t_3 * ((4.0 * A) + ((B_m * B_m) / (A - C)))) ^ 0.5)) / t_1;
	elseif (B_m <= 3.9e+215)
		tmp = sqrt((C + (A + t_2))) * (t_0 / (0.0 - B_m));
	else
		tmp = t_0 / (0.0 - sqrt(B_m));
	end
	tmp_2 = tmp;
end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[Power[N[(2.0 * F), $MachinePrecision], 0.5], $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]}, Block[{t$95$3 = N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B$95$m, 2.6e-96], N[(N[(N[Sqrt[N[(2.0 * N[(F * t$95$3), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$1), $MachinePrecision] * N[Sqrt[N[(N[(A + C), $MachinePrecision] + t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B$95$m, 7.5e-9], N[(N[(N[Sqrt[F], $MachinePrecision] * N[Power[N[(t$95$3 * N[(N[(4.0 * A), $MachinePrecision] + N[(N[(B$95$m * B$95$m), $MachinePrecision] / N[(A - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[B$95$m, 3.9e+215], N[(N[Sqrt[N[(C + N[(A + t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(t$95$0 / N[(0.0 - B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 / N[(0.0 - N[Sqrt[B$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
B_m = \left|B\right|

\\
\begin{array}{l}
t_0 := {\left(2 \cdot F\right)}^{0.5}\\
t_1 := \left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m\\
t_2 := \mathsf{hypot}\left(B\_m, A - C\right)\\
t_3 := B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\\
\mathbf{if}\;B\_m \leq 2.6 \cdot 10^{-96}:\\
\;\;\;\;\frac{\sqrt{2 \cdot \left(F \cdot t\_3\right)}}{t\_1} \cdot \sqrt{\left(A + C\right) + t\_2}\\

\mathbf{elif}\;B\_m \leq 7.5 \cdot 10^{-9}:\\
\;\;\;\;\frac{\sqrt{F} \cdot {\left(t\_3 \cdot \left(4 \cdot A + \frac{B\_m \cdot B\_m}{A - C}\right)\right)}^{0.5}}{t\_1}\\

\mathbf{elif}\;B\_m \leq 3.9 \cdot 10^{+215}:\\
\;\;\;\;\sqrt{C + \left(A + t\_2\right)} \cdot \frac{t\_0}{0 - B\_m}\\

\mathbf{else}:\\
\;\;\;\;\frac{t\_0}{0 - \sqrt{B\_m}}\\


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

    1. Initial program 19.2%

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

        \[\leadsto \mathsf{neg}\left(\frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\right) \]
      2. distribute-neg-frac2N/A

        \[\leadsto \frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{\color{blue}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\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), \color{blue}{\left(\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)\right)}\right) \]
    3. Simplified24.6%

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

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)}^{\frac{1}{2}}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right) \cdot \left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right)\right)}^{\frac{1}{2}}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. unpow-prod-downN/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}^{\frac{1}{2}} \cdot {\left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right)}^{\frac{1}{2}}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left({\left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}^{\frac{1}{2}}\right), \left({\left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right)}^{\frac{1}{2}}\right)\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    6. Applied egg-rr37.2%

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

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

    if 2.6000000000000002e-96 < B < 7.49999999999999933e-9

    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. Step-by-step derivation
      1. distribute-frac-negN/A

        \[\leadsto \mathsf{neg}\left(\frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\right) \]
      2. distribute-neg-frac2N/A

        \[\leadsto \frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{\color{blue}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\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), \color{blue}{\left(\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)\right)}\right) \]
    3. Simplified20.0%

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

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot \left(F \cdot 2\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right) \cdot 2\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{4}, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right) \cdot \left(2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. sqrt-prodN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F} \cdot \sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      6. pow1/2N/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)}^{\frac{1}{2}} \cdot \sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left({\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)}^{\frac{1}{2}}\right), \left(\sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right)\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    6. Applied egg-rr24.5%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\color{blue}{\left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)}\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    8. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\left(\frac{{B}^{2}}{A - C} + 4 \cdot A\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(\frac{{B}^{2}}{A - C}\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\left({B}^{2}\right), \left(A - C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(B \cdot B\right), \left(A - C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, B\right), \left(A - C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      6. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{\_.f64}\left(A, C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      7. *-lowering-*.f6414.2%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{\_.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(4, A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    9. Simplified14.2%

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

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\frac{B \cdot B}{A - C} + 4 \cdot A} \cdot \sqrt{\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right) \cdot F}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. sqrt-prodN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\frac{B \cdot B}{A - C} + 4 \cdot A} \cdot \left(\sqrt{B \cdot B + -4 \cdot \left(A \cdot C\right)} \cdot \sqrt{F}\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), \color{blue}{C}\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. pow1/2N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\frac{B \cdot B}{A - C} + 4 \cdot A} \cdot \left({\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right)}^{\frac{1}{2}} \cdot \sqrt{F}\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(\sqrt{\frac{B \cdot B}{A - C} + 4 \cdot A} \cdot {\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right)}^{\frac{1}{2}}\right) \cdot \sqrt{F}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{\frac{B \cdot B}{A - C} + 4 \cdot A} \cdot {\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right)}^{\frac{1}{2}}\right), \left(\sqrt{F}\right)\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    11. Applied egg-rr45.8%

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

    if 7.49999999999999933e-9 < B < 3.89999999999999965e215

    1. Initial program 23.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. Step-by-step derivation
      1. distribute-frac-negN/A

        \[\leadsto \mathsf{neg}\left(\frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\right) \]
      2. distribute-neg-frac2N/A

        \[\leadsto \frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{\color{blue}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\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), \color{blue}{\left(\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)\right)}\right) \]
    3. Simplified31.3%

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

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)}^{\frac{1}{2}}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right) \cdot \left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right)\right)}^{\frac{1}{2}}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. unpow-prod-downN/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}^{\frac{1}{2}} \cdot {\left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right)}^{\frac{1}{2}}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left({\left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}^{\frac{1}{2}}\right), \left({\left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right)}^{\frac{1}{2}}\right)\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    6. Applied egg-rr33.5%

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

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

      \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left(-1 \cdot \left(\frac{\sqrt{2}}{B} \cdot \sqrt{F}\right)\right)}, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), \mathsf{+.f64}\left(A, C\right)\right)\right)\right) \]
    9. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\left(-1 \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F}\right), \mathsf{sqrt.f64}\left(\color{blue}{\mathsf{+.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), \mathsf{+.f64}\left(A, C\right)\right)}\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(-1 \cdot \frac{\sqrt{2}}{B}\right), \left(\sqrt{F}\right)\right), \mathsf{sqrt.f64}\left(\color{blue}{\mathsf{+.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), \mathsf{+.f64}\left(A, C\right)\right)}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \left(\frac{\sqrt{2}}{B}\right)\right), \left(\sqrt{F}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\color{blue}{\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right)}, \mathsf{+.f64}\left(A, C\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\left(\sqrt{2}\right), B\right)\right), \left(\sqrt{F}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{hypot.f64}\left(B, \color{blue}{\mathsf{\_.f64}\left(A, C\right)}\right), \mathsf{+.f64}\left(A, C\right)\right)\right)\right) \]
      5. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(2\right), B\right)\right), \left(\sqrt{F}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(\color{blue}{A}, C\right)\right), \mathsf{+.f64}\left(A, C\right)\right)\right)\right) \]
      6. sqrt-lowering-sqrt.f6461.9%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(2\right), B\right)\right), \mathsf{sqrt.f64}\left(F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), \color{blue}{\mathsf{+.f64}\left(A, C\right)}\right)\right)\right) \]
    10. Simplified61.9%

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

        \[\leadsto \sqrt{\sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)} + \left(A + C\right)} \cdot \color{blue}{\left(\left(-1 \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F}\right)} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)} + \left(A + C\right)}\right), \color{blue}{\left(\left(-1 \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F}\right)}\right) \]
      3. sqrt-lowering-sqrt.f64N/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\left(\sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)} + A\right) + C\right)\right), \left(\left(\color{blue}{-1} \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F}\right)\right) \]
      5. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(C + \left(\sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)} + A\right)\right)\right), \left(\left(\color{blue}{-1} \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F}\right)\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(C, \left(\sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)} + A\right)\right)\right), \left(\left(\color{blue}{-1} \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F}\right)\right) \]
      7. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(C, \left(A + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)\right), \left(\left(-1 \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F}\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(C, \mathsf{+.f64}\left(A, \left(\sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)\right)\right), \left(\left(-1 \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F}\right)\right) \]
      9. hypot-defineN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(C, \mathsf{+.f64}\left(A, \left(\mathsf{hypot}\left(B, A - C\right)\right)\right)\right)\right), \left(\left(-1 \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F}\right)\right) \]
      10. hypot-lowering-hypot.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(C, \mathsf{+.f64}\left(A, \mathsf{hypot.f64}\left(B, \left(A - C\right)\right)\right)\right)\right), \left(\left(-1 \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F}\right)\right) \]
      11. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(C, \mathsf{+.f64}\left(A, \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right)\right)\right)\right), \left(\left(-1 \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F}\right)\right) \]
      12. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(C, \mathsf{+.f64}\left(A, \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right)\right)\right)\right), \left(-1 \cdot \color{blue}{\left(\frac{\sqrt{2}}{B} \cdot \sqrt{F}\right)}\right)\right) \]
      13. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(C, \mathsf{+.f64}\left(A, \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right)\right)\right)\right), \left(\mathsf{neg}\left(\frac{\sqrt{2}}{B} \cdot \sqrt{F}\right)\right)\right) \]
      14. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(C, \mathsf{+.f64}\left(A, \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right)\right)\right)\right), \mathsf{neg.f64}\left(\left(\frac{\sqrt{2}}{B} \cdot \sqrt{F}\right)\right)\right) \]
    12. Applied egg-rr62.2%

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

    if 3.89999999999999965e215 < B

    1. Initial program 0.0%

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

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

        \[\leadsto \mathsf{neg}\left(\sqrt{\frac{F}{B}} \cdot \sqrt{2}\right) \]
      2. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{\frac{F}{B}} \cdot \sqrt{2}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{\frac{F}{B}}\right), \left(\sqrt{2}\right)\right)\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{F}{B}\right)\right), \left(\sqrt{2}\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(F, B\right)\right), \left(\sqrt{2}\right)\right)\right) \]
      6. sqrt-lowering-sqrt.f6461.1%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(F, B\right)\right), \mathsf{sqrt.f64}\left(2\right)\right)\right) \]
    5. Simplified61.1%

      \[\leadsto \color{blue}{-\sqrt{\frac{F}{B}} \cdot \sqrt{2}} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot \sqrt{\frac{F}{B}}\right)\right) \]
      2. sqrt-divN/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot \frac{\sqrt{F}}{\sqrt{B}}\right)\right) \]
      3. pow1/2N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot \frac{{F}^{\frac{1}{2}}}{\sqrt{B}}\right)\right) \]
      4. associate-*r/N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{\sqrt{2} \cdot {F}^{\frac{1}{2}}}{\sqrt{B}}\right)\right) \]
      5. pow1/2N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{{2}^{\frac{1}{2}} \cdot {F}^{\frac{1}{2}}}{\sqrt{B}}\right)\right) \]
      6. unpow-prod-downN/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{{\left(2 \cdot F\right)}^{\frac{1}{2}}}{\sqrt{B}}\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left({\left(2 \cdot F\right)}^{\frac{1}{2}}\right), \left(\sqrt{B}\right)\right)\right) \]
      8. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(2 \cdot F\right), \frac{1}{2}\right), \left(\sqrt{B}\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(2, F\right), \frac{1}{2}\right), \left(\sqrt{B}\right)\right)\right) \]
      10. sqrt-lowering-sqrt.f6487.2%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(2, F\right), \frac{1}{2}\right), \mathsf{sqrt.f64}\left(B\right)\right)\right) \]
    7. Applied egg-rr87.2%

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

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

Alternative 9: 46.4% accurate, 1.9× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ \begin{array}{l} t_0 := {\left(2 \cdot F\right)}^{0.5}\\ t_1 := \left(4 \cdot A\right) \cdot C\\ t_2 := t\_1 - B\_m \cdot B\_m\\ t_3 := \mathsf{hypot}\left(B\_m, A - C\right)\\ \mathbf{if}\;B\_m \leq 3.5 \cdot 10^{-96}:\\ \;\;\;\;\frac{\sqrt{\left(\left(A + C\right) + t\_3\right) \cdot \left(\left(2 \cdot F\right) \cdot \left(B\_m \cdot B\_m - t\_1\right)\right)}}{t\_2}\\ \mathbf{elif}\;B\_m \leq 5.1 \cdot 10^{-7}:\\ \;\;\;\;\frac{\sqrt{F} \cdot {\left(\left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right) \cdot \left(4 \cdot A + \frac{B\_m \cdot B\_m}{A - C}\right)\right)}^{0.5}}{t\_2}\\ \mathbf{elif}\;B\_m \leq 1.35 \cdot 10^{+218}:\\ \;\;\;\;\sqrt{C + \left(A + t\_3\right)} \cdot \frac{t\_0}{0 - B\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{t\_0}{0 - \sqrt{B\_m}}\\ \end{array} \end{array} \]
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
 :precision binary64
 (let* ((t_0 (pow (* 2.0 F) 0.5))
        (t_1 (* (* 4.0 A) C))
        (t_2 (- t_1 (* B_m B_m)))
        (t_3 (hypot B_m (- A C))))
   (if (<= B_m 3.5e-96)
     (/ (sqrt (* (+ (+ A C) t_3) (* (* 2.0 F) (- (* B_m B_m) t_1)))) t_2)
     (if (<= B_m 5.1e-7)
       (/
        (*
         (sqrt F)
         (pow
          (*
           (+ (* B_m B_m) (* -4.0 (* A C)))
           (+ (* 4.0 A) (/ (* B_m B_m) (- A C))))
          0.5))
        t_2)
       (if (<= B_m 1.35e+218)
         (* (sqrt (+ C (+ A t_3))) (/ t_0 (- 0.0 B_m)))
         (/ t_0 (- 0.0 (sqrt B_m))))))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
	double t_0 = pow((2.0 * F), 0.5);
	double t_1 = (4.0 * A) * C;
	double t_2 = t_1 - (B_m * B_m);
	double t_3 = hypot(B_m, (A - C));
	double tmp;
	if (B_m <= 3.5e-96) {
		tmp = sqrt((((A + C) + t_3) * ((2.0 * F) * ((B_m * B_m) - t_1)))) / t_2;
	} else if (B_m <= 5.1e-7) {
		tmp = (sqrt(F) * pow((((B_m * B_m) + (-4.0 * (A * C))) * ((4.0 * A) + ((B_m * B_m) / (A - C)))), 0.5)) / t_2;
	} else if (B_m <= 1.35e+218) {
		tmp = sqrt((C + (A + t_3))) * (t_0 / (0.0 - B_m));
	} else {
		tmp = t_0 / (0.0 - sqrt(B_m));
	}
	return tmp;
}
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
	double t_0 = Math.pow((2.0 * F), 0.5);
	double t_1 = (4.0 * A) * C;
	double t_2 = t_1 - (B_m * B_m);
	double t_3 = Math.hypot(B_m, (A - C));
	double tmp;
	if (B_m <= 3.5e-96) {
		tmp = Math.sqrt((((A + C) + t_3) * ((2.0 * F) * ((B_m * B_m) - t_1)))) / t_2;
	} else if (B_m <= 5.1e-7) {
		tmp = (Math.sqrt(F) * Math.pow((((B_m * B_m) + (-4.0 * (A * C))) * ((4.0 * A) + ((B_m * B_m) / (A - C)))), 0.5)) / t_2;
	} else if (B_m <= 1.35e+218) {
		tmp = Math.sqrt((C + (A + t_3))) * (t_0 / (0.0 - B_m));
	} else {
		tmp = t_0 / (0.0 - Math.sqrt(B_m));
	}
	return tmp;
}
B_m = math.fabs(B)
def code(A, B_m, C, F):
	t_0 = math.pow((2.0 * F), 0.5)
	t_1 = (4.0 * A) * C
	t_2 = t_1 - (B_m * B_m)
	t_3 = math.hypot(B_m, (A - C))
	tmp = 0
	if B_m <= 3.5e-96:
		tmp = math.sqrt((((A + C) + t_3) * ((2.0 * F) * ((B_m * B_m) - t_1)))) / t_2
	elif B_m <= 5.1e-7:
		tmp = (math.sqrt(F) * math.pow((((B_m * B_m) + (-4.0 * (A * C))) * ((4.0 * A) + ((B_m * B_m) / (A - C)))), 0.5)) / t_2
	elif B_m <= 1.35e+218:
		tmp = math.sqrt((C + (A + t_3))) * (t_0 / (0.0 - B_m))
	else:
		tmp = t_0 / (0.0 - math.sqrt(B_m))
	return tmp
B_m = abs(B)
function code(A, B_m, C, F)
	t_0 = Float64(2.0 * F) ^ 0.5
	t_1 = Float64(Float64(4.0 * A) * C)
	t_2 = Float64(t_1 - Float64(B_m * B_m))
	t_3 = hypot(B_m, Float64(A - C))
	tmp = 0.0
	if (B_m <= 3.5e-96)
		tmp = Float64(sqrt(Float64(Float64(Float64(A + C) + t_3) * Float64(Float64(2.0 * F) * Float64(Float64(B_m * B_m) - t_1)))) / t_2);
	elseif (B_m <= 5.1e-7)
		tmp = Float64(Float64(sqrt(F) * (Float64(Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C))) * Float64(Float64(4.0 * A) + Float64(Float64(B_m * B_m) / Float64(A - C)))) ^ 0.5)) / t_2);
	elseif (B_m <= 1.35e+218)
		tmp = Float64(sqrt(Float64(C + Float64(A + t_3))) * Float64(t_0 / Float64(0.0 - B_m)));
	else
		tmp = Float64(t_0 / Float64(0.0 - sqrt(B_m)));
	end
	return tmp
end
B_m = abs(B);
function tmp_2 = code(A, B_m, C, F)
	t_0 = (2.0 * F) ^ 0.5;
	t_1 = (4.0 * A) * C;
	t_2 = t_1 - (B_m * B_m);
	t_3 = hypot(B_m, (A - C));
	tmp = 0.0;
	if (B_m <= 3.5e-96)
		tmp = sqrt((((A + C) + t_3) * ((2.0 * F) * ((B_m * B_m) - t_1)))) / t_2;
	elseif (B_m <= 5.1e-7)
		tmp = (sqrt(F) * ((((B_m * B_m) + (-4.0 * (A * C))) * ((4.0 * A) + ((B_m * B_m) / (A - C)))) ^ 0.5)) / t_2;
	elseif (B_m <= 1.35e+218)
		tmp = sqrt((C + (A + t_3))) * (t_0 / (0.0 - B_m));
	else
		tmp = t_0 / (0.0 - sqrt(B_m));
	end
	tmp_2 = tmp;
end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[Power[N[(2.0 * F), $MachinePrecision], 0.5], $MachinePrecision]}, Block[{t$95$1 = N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]}, If[LessEqual[B$95$m, 3.5e-96], N[(N[Sqrt[N[(N[(N[(A + C), $MachinePrecision] + t$95$3), $MachinePrecision] * N[(N[(2.0 * F), $MachinePrecision] * N[(N[(B$95$m * B$95$m), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[B$95$m, 5.1e-7], N[(N[(N[Sqrt[F], $MachinePrecision] * N[Power[N[(N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(4.0 * A), $MachinePrecision] + N[(N[(B$95$m * B$95$m), $MachinePrecision] / N[(A - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[B$95$m, 1.35e+218], N[(N[Sqrt[N[(C + N[(A + t$95$3), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(t$95$0 / N[(0.0 - B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 / N[(0.0 - N[Sqrt[B$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
B_m = \left|B\right|

\\
\begin{array}{l}
t_0 := {\left(2 \cdot F\right)}^{0.5}\\
t_1 := \left(4 \cdot A\right) \cdot C\\
t_2 := t\_1 - B\_m \cdot B\_m\\
t_3 := \mathsf{hypot}\left(B\_m, A - C\right)\\
\mathbf{if}\;B\_m \leq 3.5 \cdot 10^{-96}:\\
\;\;\;\;\frac{\sqrt{\left(\left(A + C\right) + t\_3\right) \cdot \left(\left(2 \cdot F\right) \cdot \left(B\_m \cdot B\_m - t\_1\right)\right)}}{t\_2}\\

\mathbf{elif}\;B\_m \leq 5.1 \cdot 10^{-7}:\\
\;\;\;\;\frac{\sqrt{F} \cdot {\left(\left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right) \cdot \left(4 \cdot A + \frac{B\_m \cdot B\_m}{A - C}\right)\right)}^{0.5}}{t\_2}\\

\mathbf{elif}\;B\_m \leq 1.35 \cdot 10^{+218}:\\
\;\;\;\;\sqrt{C + \left(A + t\_3\right)} \cdot \frac{t\_0}{0 - B\_m}\\

\mathbf{else}:\\
\;\;\;\;\frac{t\_0}{0 - \sqrt{B\_m}}\\


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

    1. Initial program 19.2%

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

        \[\leadsto \mathsf{neg}\left(\frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\right) \]
      2. distribute-neg-frac2N/A

        \[\leadsto \frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{\color{blue}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\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), \color{blue}{\left(\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)\right)}\right) \]
    3. Simplified24.6%

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

    if 3.4999999999999999e-96 < B < 5.0999999999999999e-7

    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. Step-by-step derivation
      1. distribute-frac-negN/A

        \[\leadsto \mathsf{neg}\left(\frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\right) \]
      2. distribute-neg-frac2N/A

        \[\leadsto \frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{\color{blue}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\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), \color{blue}{\left(\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)\right)}\right) \]
    3. Simplified20.0%

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

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot \left(F \cdot 2\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right) \cdot 2\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{4}, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right) \cdot \left(2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. sqrt-prodN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F} \cdot \sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      6. pow1/2N/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)}^{\frac{1}{2}} \cdot \sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left({\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)}^{\frac{1}{2}}\right), \left(\sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right)\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    6. Applied egg-rr24.5%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\color{blue}{\left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)}\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    8. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\left(\frac{{B}^{2}}{A - C} + 4 \cdot A\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(\frac{{B}^{2}}{A - C}\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\left({B}^{2}\right), \left(A - C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(B \cdot B\right), \left(A - C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, B\right), \left(A - C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      6. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{\_.f64}\left(A, C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      7. *-lowering-*.f6414.2%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{\_.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(4, A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    9. Simplified14.2%

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

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\frac{B \cdot B}{A - C} + 4 \cdot A} \cdot \sqrt{\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right) \cdot F}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. sqrt-prodN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\frac{B \cdot B}{A - C} + 4 \cdot A} \cdot \left(\sqrt{B \cdot B + -4 \cdot \left(A \cdot C\right)} \cdot \sqrt{F}\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), \color{blue}{C}\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. pow1/2N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\frac{B \cdot B}{A - C} + 4 \cdot A} \cdot \left({\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right)}^{\frac{1}{2}} \cdot \sqrt{F}\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(\sqrt{\frac{B \cdot B}{A - C} + 4 \cdot A} \cdot {\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right)}^{\frac{1}{2}}\right) \cdot \sqrt{F}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{\frac{B \cdot B}{A - C} + 4 \cdot A} \cdot {\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right)}^{\frac{1}{2}}\right), \left(\sqrt{F}\right)\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    11. Applied egg-rr45.8%

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

    if 5.0999999999999999e-7 < B < 1.35000000000000006e218

    1. Initial program 23.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. Step-by-step derivation
      1. distribute-frac-negN/A

        \[\leadsto \mathsf{neg}\left(\frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\right) \]
      2. distribute-neg-frac2N/A

        \[\leadsto \frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{\color{blue}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\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), \color{blue}{\left(\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)\right)}\right) \]
    3. Simplified31.3%

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

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)}^{\frac{1}{2}}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right) \cdot \left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right)\right)}^{\frac{1}{2}}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. unpow-prod-downN/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}^{\frac{1}{2}} \cdot {\left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right)}^{\frac{1}{2}}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left({\left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}^{\frac{1}{2}}\right), \left({\left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right)}^{\frac{1}{2}}\right)\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    6. Applied egg-rr33.5%

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

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

      \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left(-1 \cdot \left(\frac{\sqrt{2}}{B} \cdot \sqrt{F}\right)\right)}, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), \mathsf{+.f64}\left(A, C\right)\right)\right)\right) \]
    9. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\left(-1 \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F}\right), \mathsf{sqrt.f64}\left(\color{blue}{\mathsf{+.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), \mathsf{+.f64}\left(A, C\right)\right)}\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(-1 \cdot \frac{\sqrt{2}}{B}\right), \left(\sqrt{F}\right)\right), \mathsf{sqrt.f64}\left(\color{blue}{\mathsf{+.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), \mathsf{+.f64}\left(A, C\right)\right)}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \left(\frac{\sqrt{2}}{B}\right)\right), \left(\sqrt{F}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\color{blue}{\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right)}, \mathsf{+.f64}\left(A, C\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\left(\sqrt{2}\right), B\right)\right), \left(\sqrt{F}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{hypot.f64}\left(B, \color{blue}{\mathsf{\_.f64}\left(A, C\right)}\right), \mathsf{+.f64}\left(A, C\right)\right)\right)\right) \]
      5. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(2\right), B\right)\right), \left(\sqrt{F}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(\color{blue}{A}, C\right)\right), \mathsf{+.f64}\left(A, C\right)\right)\right)\right) \]
      6. sqrt-lowering-sqrt.f6461.9%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(2\right), B\right)\right), \mathsf{sqrt.f64}\left(F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), \color{blue}{\mathsf{+.f64}\left(A, C\right)}\right)\right)\right) \]
    10. Simplified61.9%

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

        \[\leadsto \sqrt{\sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)} + \left(A + C\right)} \cdot \color{blue}{\left(\left(-1 \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F}\right)} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)} + \left(A + C\right)}\right), \color{blue}{\left(\left(-1 \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F}\right)}\right) \]
      3. sqrt-lowering-sqrt.f64N/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\left(\sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)} + A\right) + C\right)\right), \left(\left(\color{blue}{-1} \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F}\right)\right) \]
      5. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(C + \left(\sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)} + A\right)\right)\right), \left(\left(\color{blue}{-1} \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F}\right)\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(C, \left(\sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)} + A\right)\right)\right), \left(\left(\color{blue}{-1} \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F}\right)\right) \]
      7. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(C, \left(A + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)\right), \left(\left(-1 \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F}\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(C, \mathsf{+.f64}\left(A, \left(\sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)\right)\right), \left(\left(-1 \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F}\right)\right) \]
      9. hypot-defineN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(C, \mathsf{+.f64}\left(A, \left(\mathsf{hypot}\left(B, A - C\right)\right)\right)\right)\right), \left(\left(-1 \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F}\right)\right) \]
      10. hypot-lowering-hypot.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(C, \mathsf{+.f64}\left(A, \mathsf{hypot.f64}\left(B, \left(A - C\right)\right)\right)\right)\right), \left(\left(-1 \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F}\right)\right) \]
      11. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(C, \mathsf{+.f64}\left(A, \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right)\right)\right)\right), \left(\left(-1 \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F}\right)\right) \]
      12. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(C, \mathsf{+.f64}\left(A, \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right)\right)\right)\right), \left(-1 \cdot \color{blue}{\left(\frac{\sqrt{2}}{B} \cdot \sqrt{F}\right)}\right)\right) \]
      13. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(C, \mathsf{+.f64}\left(A, \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right)\right)\right)\right), \left(\mathsf{neg}\left(\frac{\sqrt{2}}{B} \cdot \sqrt{F}\right)\right)\right) \]
      14. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(C, \mathsf{+.f64}\left(A, \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right)\right)\right)\right), \mathsf{neg.f64}\left(\left(\frac{\sqrt{2}}{B} \cdot \sqrt{F}\right)\right)\right) \]
    12. Applied egg-rr62.2%

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

    if 1.35000000000000006e218 < B

    1. Initial program 0.0%

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

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

        \[\leadsto \mathsf{neg}\left(\sqrt{\frac{F}{B}} \cdot \sqrt{2}\right) \]
      2. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{\frac{F}{B}} \cdot \sqrt{2}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{\frac{F}{B}}\right), \left(\sqrt{2}\right)\right)\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{F}{B}\right)\right), \left(\sqrt{2}\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(F, B\right)\right), \left(\sqrt{2}\right)\right)\right) \]
      6. sqrt-lowering-sqrt.f6461.1%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(F, B\right)\right), \mathsf{sqrt.f64}\left(2\right)\right)\right) \]
    5. Simplified61.1%

      \[\leadsto \color{blue}{-\sqrt{\frac{F}{B}} \cdot \sqrt{2}} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot \sqrt{\frac{F}{B}}\right)\right) \]
      2. sqrt-divN/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot \frac{\sqrt{F}}{\sqrt{B}}\right)\right) \]
      3. pow1/2N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot \frac{{F}^{\frac{1}{2}}}{\sqrt{B}}\right)\right) \]
      4. associate-*r/N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{\sqrt{2} \cdot {F}^{\frac{1}{2}}}{\sqrt{B}}\right)\right) \]
      5. pow1/2N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{{2}^{\frac{1}{2}} \cdot {F}^{\frac{1}{2}}}{\sqrt{B}}\right)\right) \]
      6. unpow-prod-downN/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{{\left(2 \cdot F\right)}^{\frac{1}{2}}}{\sqrt{B}}\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left({\left(2 \cdot F\right)}^{\frac{1}{2}}\right), \left(\sqrt{B}\right)\right)\right) \]
      8. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(2 \cdot F\right), \frac{1}{2}\right), \left(\sqrt{B}\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(2, F\right), \frac{1}{2}\right), \left(\sqrt{B}\right)\right)\right) \]
      10. sqrt-lowering-sqrt.f6487.2%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(2, F\right), \frac{1}{2}\right), \mathsf{sqrt.f64}\left(B\right)\right)\right) \]
    7. Applied egg-rr87.2%

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

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

Alternative 10: 43.9% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
t_0 := \left(4 \cdot A\right) \cdot C\\
t_1 := t\_0 - B\_m \cdot B\_m\\
t_2 := {\left(2 \cdot F\right)}^{0.5}\\
\mathbf{if}\;B\_m \leq 3.8 \cdot 10^{-97}:\\
\;\;\;\;\frac{\sqrt{\left(\left(A + C\right) + \mathsf{hypot}\left(B\_m, A - C\right)\right) \cdot \left(\left(2 \cdot F\right) \cdot \left(B\_m \cdot B\_m - t\_0\right)\right)}}{t\_1}\\

\mathbf{elif}\;B\_m \leq 0.00022:\\
\;\;\;\;\frac{\sqrt{F} \cdot {\left(\left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right) \cdot \left(4 \cdot A + \frac{B\_m \cdot B\_m}{A - C}\right)\right)}^{0.5}}{t\_1}\\

\mathbf{elif}\;B\_m \leq 8.1 \cdot 10^{+214}:\\
\;\;\;\;\frac{t\_2}{0 - B\_m} \cdot \sqrt{C + \mathsf{hypot}\left(B\_m, C\right)}\\

\mathbf{else}:\\
\;\;\;\;\frac{t\_2}{0 - \sqrt{B\_m}}\\


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

    1. Initial program 19.2%

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

        \[\leadsto \mathsf{neg}\left(\frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\right) \]
      2. distribute-neg-frac2N/A

        \[\leadsto \frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{\color{blue}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\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), \color{blue}{\left(\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)\right)}\right) \]
    3. Simplified24.6%

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

    if 3.8000000000000001e-97 < B < 2.20000000000000008e-4

    1. Initial program 14.1%

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

        \[\leadsto \mathsf{neg}\left(\frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\right) \]
      2. distribute-neg-frac2N/A

        \[\leadsto \frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{\color{blue}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
      3. /-lowering-/.f64N/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot \left(F \cdot 2\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right) \cdot 2\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{4}, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right) \cdot \left(2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. sqrt-prodN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F} \cdot \sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      6. pow1/2N/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)}^{\frac{1}{2}} \cdot \sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left({\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)}^{\frac{1}{2}}\right), \left(\sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right)\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    6. Applied egg-rr26.6%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\color{blue}{\left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)}\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    8. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\left(\frac{{B}^{2}}{A - C} + 4 \cdot A\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(\frac{{B}^{2}}{A - C}\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\left({B}^{2}\right), \left(A - C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(B \cdot B\right), \left(A - C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, B\right), \left(A - C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      6. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{\_.f64}\left(A, C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      7. *-lowering-*.f6417.1%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{\_.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(4, A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    9. Simplified17.1%

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

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\frac{B \cdot B}{A - C} + 4 \cdot A} \cdot \sqrt{\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right) \cdot F}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. sqrt-prodN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\frac{B \cdot B}{A - C} + 4 \cdot A} \cdot \left(\sqrt{B \cdot B + -4 \cdot \left(A \cdot C\right)} \cdot \sqrt{F}\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), \color{blue}{C}\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. pow1/2N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\frac{B \cdot B}{A - C} + 4 \cdot A} \cdot \left({\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right)}^{\frac{1}{2}} \cdot \sqrt{F}\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(\sqrt{\frac{B \cdot B}{A - C} + 4 \cdot A} \cdot {\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right)}^{\frac{1}{2}}\right) \cdot \sqrt{F}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{\frac{B \cdot B}{A - C} + 4 \cdot A} \cdot {\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right)}^{\frac{1}{2}}\right), \left(\sqrt{F}\right)\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    11. Applied egg-rr46.1%

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

    if 2.20000000000000008e-4 < B < 8.0999999999999998e214

    1. Initial program 24.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

      \[\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. associate-*r*N/A

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

        \[\leadsto \mathsf{*.f64}\left(\left(-1 \cdot \frac{\sqrt{2}}{B}\right), \color{blue}{\left(\sqrt{F \cdot \left(C + \sqrt{{B}^{2} + {C}^{2}}\right)}\right)}\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \left(\frac{\sqrt{2}}{B}\right)\right), \left(\sqrt{\color{blue}{F \cdot \left(C + \sqrt{{B}^{2} + {C}^{2}}\right)}}\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\left(\sqrt{2}\right), B\right)\right), \left(\sqrt{F \cdot \color{blue}{\left(C + \sqrt{{B}^{2} + {C}^{2}}\right)}}\right)\right) \]
      5. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(2\right), B\right)\right), \left(\sqrt{F \cdot \left(\color{blue}{C} + \sqrt{{B}^{2} + {C}^{2}}\right)}\right)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(2\right), B\right)\right), \mathsf{sqrt.f64}\left(\left(F \cdot \left(C + \sqrt{{B}^{2} + {C}^{2}}\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(2\right), B\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \left(C + \sqrt{{B}^{2} + {C}^{2}}\right)\right)\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(2\right), B\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(C, \left(\sqrt{{B}^{2} + {C}^{2}}\right)\right)\right)\right)\right) \]
      9. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(2\right), B\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(C, \left(\sqrt{{C}^{2} + {B}^{2}}\right)\right)\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(2\right), B\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(C, \left(\sqrt{C \cdot C + {B}^{2}}\right)\right)\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(2\right), B\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(C, \left(\sqrt{C \cdot C + B \cdot B}\right)\right)\right)\right)\right) \]
      12. hypot-defineN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(2\right), B\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(C, \left(\mathsf{hypot}\left(C, B\right)\right)\right)\right)\right)\right) \]
      13. hypot-lowering-hypot.f6445.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(2\right), B\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(C, \mathsf{hypot.f64}\left(C, B\right)\right)\right)\right)\right) \]
    5. Simplified45.3%

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

        \[\leadsto \left(-1 \cdot \frac{\sqrt{2}}{B}\right) \cdot \left(\sqrt{F} \cdot \color{blue}{\sqrt{C + \sqrt{C \cdot C + B \cdot B}}}\right) \]
      2. pow1/2N/A

        \[\leadsto \left(-1 \cdot \frac{\sqrt{2}}{B}\right) \cdot \left(\sqrt{F} \cdot {\left(C + \sqrt{C \cdot C + B \cdot B}\right)}^{\color{blue}{\frac{1}{2}}}\right) \]
      3. associate-*r*N/A

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

        \[\leadsto \mathsf{*.f64}\left(\left(\left(-1 \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F}\right), \color{blue}{\left({\left(C + \sqrt{C \cdot C + B \cdot B}\right)}^{\frac{1}{2}}\right)}\right) \]
      5. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\left(-1 \cdot \left(\frac{\sqrt{2}}{B} \cdot \sqrt{F}\right)\right), \left({\color{blue}{\left(C + \sqrt{C \cdot C + B \cdot B}\right)}}^{\frac{1}{2}}\right)\right) \]
      6. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\mathsf{neg}\left(\frac{\sqrt{2}}{B} \cdot \sqrt{F}\right)\right), \left({\color{blue}{\left(C + \sqrt{C \cdot C + B \cdot B}\right)}}^{\frac{1}{2}}\right)\right) \]
      7. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{neg.f64}\left(\left(\frac{\sqrt{2}}{B} \cdot \sqrt{F}\right)\right), \left({\color{blue}{\left(C + \sqrt{C \cdot C + B \cdot B}\right)}}^{\frac{1}{2}}\right)\right) \]
      8. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{neg.f64}\left(\left(\frac{\sqrt{2} \cdot \sqrt{F}}{B}\right)\right), \left({\left(\color{blue}{C} + \sqrt{C \cdot C + B \cdot B}\right)}^{\frac{1}{2}}\right)\right) \]
      9. pow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{neg.f64}\left(\left(\frac{{2}^{\frac{1}{2}} \cdot \sqrt{F}}{B}\right)\right), \left({\left(C + \sqrt{C \cdot C + B \cdot B}\right)}^{\frac{1}{2}}\right)\right) \]
      10. pow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{neg.f64}\left(\left(\frac{{2}^{\frac{1}{2}} \cdot {F}^{\frac{1}{2}}}{B}\right)\right), \left({\left(C + \sqrt{C \cdot C + B \cdot B}\right)}^{\frac{1}{2}}\right)\right) \]
      11. pow-prod-downN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{neg.f64}\left(\left(\frac{{\left(2 \cdot F\right)}^{\frac{1}{2}}}{B}\right)\right), \left({\left(C + \sqrt{C \cdot C + B \cdot B}\right)}^{\frac{1}{2}}\right)\right) \]
      12. pow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{neg.f64}\left(\left(\frac{\sqrt{2 \cdot F}}{B}\right)\right), \left({\left(C + \sqrt{C \cdot C + B \cdot B}\right)}^{\frac{1}{2}}\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(\sqrt{2 \cdot F}\right), B\right)\right), \left({\left(\color{blue}{C} + \sqrt{C \cdot C + B \cdot B}\right)}^{\frac{1}{2}}\right)\right) \]
      14. pow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left({\left(2 \cdot F\right)}^{\frac{1}{2}}\right), B\right)\right), \left({\left(C + \sqrt{C \cdot C + B \cdot B}\right)}^{\frac{1}{2}}\right)\right) \]
      15. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(2 \cdot F\right), \frac{1}{2}\right), B\right)\right), \left({\left(C + \sqrt{C \cdot C + B \cdot B}\right)}^{\frac{1}{2}}\right)\right) \]
      16. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(2, F\right), \frac{1}{2}\right), B\right)\right), \left({\left(C + \sqrt{C \cdot C + B \cdot B}\right)}^{\frac{1}{2}}\right)\right) \]
      17. pow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(2, F\right), \frac{1}{2}\right), B\right)\right), \left(\sqrt{C + \sqrt{C \cdot C + B \cdot B}}\right)\right) \]
    7. Applied egg-rr53.2%

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

    if 8.0999999999999998e214 < B

    1. Initial program 0.0%

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

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

        \[\leadsto \mathsf{neg}\left(\sqrt{\frac{F}{B}} \cdot \sqrt{2}\right) \]
      2. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{\frac{F}{B}} \cdot \sqrt{2}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{\frac{F}{B}}\right), \left(\sqrt{2}\right)\right)\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{F}{B}\right)\right), \left(\sqrt{2}\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(F, B\right)\right), \left(\sqrt{2}\right)\right)\right) \]
      6. sqrt-lowering-sqrt.f6461.1%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(F, B\right)\right), \mathsf{sqrt.f64}\left(2\right)\right)\right) \]
    5. Simplified61.1%

      \[\leadsto \color{blue}{-\sqrt{\frac{F}{B}} \cdot \sqrt{2}} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot \sqrt{\frac{F}{B}}\right)\right) \]
      2. sqrt-divN/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot \frac{\sqrt{F}}{\sqrt{B}}\right)\right) \]
      3. pow1/2N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot \frac{{F}^{\frac{1}{2}}}{\sqrt{B}}\right)\right) \]
      4. associate-*r/N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{\sqrt{2} \cdot {F}^{\frac{1}{2}}}{\sqrt{B}}\right)\right) \]
      5. pow1/2N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{{2}^{\frac{1}{2}} \cdot {F}^{\frac{1}{2}}}{\sqrt{B}}\right)\right) \]
      6. unpow-prod-downN/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{{\left(2 \cdot F\right)}^{\frac{1}{2}}}{\sqrt{B}}\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left({\left(2 \cdot F\right)}^{\frac{1}{2}}\right), \left(\sqrt{B}\right)\right)\right) \]
      8. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(2 \cdot F\right), \frac{1}{2}\right), \left(\sqrt{B}\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(2, F\right), \frac{1}{2}\right), \left(\sqrt{B}\right)\right)\right) \]
      10. sqrt-lowering-sqrt.f6487.2%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(2, F\right), \frac{1}{2}\right), \mathsf{sqrt.f64}\left(B\right)\right)\right) \]
    7. Applied egg-rr87.2%

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

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

Alternative 11: 43.3% accurate, 2.6× speedup?

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

\\
\begin{array}{l}
t_0 := \left(4 \cdot A\right) \cdot C\\
t_1 := t\_0 - B\_m \cdot B\_m\\
t_2 := \left(A + C\right) + \mathsf{hypot}\left(B\_m, A - C\right)\\
\mathbf{if}\;B\_m \leq 1.1 \cdot 10^{-96}:\\
\;\;\;\;\frac{\sqrt{t\_2 \cdot \left(\left(2 \cdot F\right) \cdot \left(B\_m \cdot B\_m - t\_0\right)\right)}}{t\_1}\\

\mathbf{elif}\;B\_m \leq 1.28 \cdot 10^{-8}:\\
\;\;\;\;\frac{\sqrt{F} \cdot {\left(\left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right) \cdot \left(4 \cdot A + \frac{B\_m \cdot B\_m}{A - C}\right)\right)}^{0.5}}{t\_1}\\

\mathbf{elif}\;B\_m \leq 1.8 \cdot 10^{+129}:\\
\;\;\;\;B\_m \cdot \frac{\sqrt{F \cdot \left(2 \cdot t\_2\right)}}{t\_1}\\

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


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

    1. Initial program 19.2%

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

        \[\leadsto \mathsf{neg}\left(\frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\right) \]
      2. distribute-neg-frac2N/A

        \[\leadsto \frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{\color{blue}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\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), \color{blue}{\left(\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)\right)}\right) \]
    3. Simplified24.6%

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

    if 1.0999999999999999e-96 < B < 1.28000000000000005e-8

    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. Step-by-step derivation
      1. distribute-frac-negN/A

        \[\leadsto \mathsf{neg}\left(\frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\right) \]
      2. distribute-neg-frac2N/A

        \[\leadsto \frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{\color{blue}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\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), \color{blue}{\left(\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)\right)}\right) \]
    3. Simplified20.0%

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

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot \left(F \cdot 2\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right) \cdot 2\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{4}, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right) \cdot \left(2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. sqrt-prodN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F} \cdot \sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      6. pow1/2N/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)}^{\frac{1}{2}} \cdot \sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left({\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)}^{\frac{1}{2}}\right), \left(\sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right)\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    6. Applied egg-rr24.5%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\color{blue}{\left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)}\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    8. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\left(\frac{{B}^{2}}{A - C} + 4 \cdot A\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(\frac{{B}^{2}}{A - C}\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\left({B}^{2}\right), \left(A - C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(B \cdot B\right), \left(A - C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, B\right), \left(A - C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      6. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{\_.f64}\left(A, C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      7. *-lowering-*.f6414.2%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{\_.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(4, A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    9. Simplified14.2%

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

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\frac{B \cdot B}{A - C} + 4 \cdot A} \cdot \sqrt{\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right) \cdot F}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. sqrt-prodN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\frac{B \cdot B}{A - C} + 4 \cdot A} \cdot \left(\sqrt{B \cdot B + -4 \cdot \left(A \cdot C\right)} \cdot \sqrt{F}\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), \color{blue}{C}\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. pow1/2N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\frac{B \cdot B}{A - C} + 4 \cdot A} \cdot \left({\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right)}^{\frac{1}{2}} \cdot \sqrt{F}\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(\sqrt{\frac{B \cdot B}{A - C} + 4 \cdot A} \cdot {\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right)}^{\frac{1}{2}}\right) \cdot \sqrt{F}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{\frac{B \cdot B}{A - C} + 4 \cdot A} \cdot {\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right)}^{\frac{1}{2}}\right), \left(\sqrt{F}\right)\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    11. Applied egg-rr45.8%

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

    if 1.28000000000000005e-8 < B < 1.8000000000000001e129

    1. Initial program 38.3%

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

        \[\leadsto \mathsf{neg}\left(\frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\right) \]
      2. distribute-neg-frac2N/A

        \[\leadsto \frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{\color{blue}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
      3. /-lowering-/.f64N/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot \left(F \cdot 2\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right) \cdot 2\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{4}, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right) \cdot \left(2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. sqrt-prodN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F} \cdot \sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      6. pow1/2N/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)}^{\frac{1}{2}} \cdot \sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left({\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)}^{\frac{1}{2}}\right), \left(\sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right)\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    6. Applied egg-rr54.1%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\color{blue}{\left(B \cdot \sqrt{F}\right)}, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{+.f64}\left(A, \mathsf{+.f64}\left(C, \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right)\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    8. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(B, \left(\sqrt{F}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{+.f64}\left(A, \mathsf{+.f64}\left(C, \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right)\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. sqrt-lowering-sqrt.f6462.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(B, \mathsf{sqrt.f64}\left(F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{+.f64}\left(A, \mathsf{+.f64}\left(C, \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right)\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, \color{blue}{A}\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    9. Simplified62.9%

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

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

        \[\leadsto B \cdot \color{blue}{\frac{\sqrt{F} \cdot \sqrt{2 \cdot \left(A + \left(C + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)}}{\left(4 \cdot A\right) \cdot C - B \cdot B}} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(B, \color{blue}{\left(\frac{\sqrt{F} \cdot \sqrt{2 \cdot \left(A + \left(C + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)}}{\left(4 \cdot A\right) \cdot C - B \cdot B}\right)}\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(B, \mathsf{/.f64}\left(\left(\sqrt{F} \cdot \sqrt{2 \cdot \left(A + \left(C + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)}\right), \color{blue}{\left(\left(4 \cdot A\right) \cdot C - B \cdot B\right)}\right)\right) \]
    11. Applied egg-rr59.5%

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

    if 1.8000000000000001e129 < B

    1. Initial program 0.1%

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

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

        \[\leadsto \mathsf{neg}\left(\sqrt{\frac{F}{B}} \cdot \sqrt{2}\right) \]
      2. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{\frac{F}{B}} \cdot \sqrt{2}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{\frac{F}{B}}\right), \left(\sqrt{2}\right)\right)\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{F}{B}\right)\right), \left(\sqrt{2}\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(F, B\right)\right), \left(\sqrt{2}\right)\right)\right) \]
      6. sqrt-lowering-sqrt.f6447.5%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(F, B\right)\right), \mathsf{sqrt.f64}\left(2\right)\right)\right) \]
    5. Simplified47.5%

      \[\leadsto \color{blue}{-\sqrt{\frac{F}{B}} \cdot \sqrt{2}} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot \sqrt{\frac{F}{B}}\right)\right) \]
      2. sqrt-divN/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot \frac{\sqrt{F}}{\sqrt{B}}\right)\right) \]
      3. pow1/2N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot \frac{{F}^{\frac{1}{2}}}{\sqrt{B}}\right)\right) \]
      4. associate-*r/N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{\sqrt{2} \cdot {F}^{\frac{1}{2}}}{\sqrt{B}}\right)\right) \]
      5. pow1/2N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{{2}^{\frac{1}{2}} \cdot {F}^{\frac{1}{2}}}{\sqrt{B}}\right)\right) \]
      6. unpow-prod-downN/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{{\left(2 \cdot F\right)}^{\frac{1}{2}}}{\sqrt{B}}\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left({\left(2 \cdot F\right)}^{\frac{1}{2}}\right), \left(\sqrt{B}\right)\right)\right) \]
      8. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(2 \cdot F\right), \frac{1}{2}\right), \left(\sqrt{B}\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(2, F\right), \frac{1}{2}\right), \left(\sqrt{B}\right)\right)\right) \]
      10. sqrt-lowering-sqrt.f6463.8%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(2, F\right), \frac{1}{2}\right), \mathsf{sqrt.f64}\left(B\right)\right)\right) \]
    7. Applied egg-rr63.8%

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

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

Alternative 12: 43.2% accurate, 2.7× speedup?

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

\\
\begin{array}{l}
t_0 := \left(4 \cdot A\right) \cdot C\\
t_1 := t\_0 - B\_m \cdot B\_m\\
t_2 := \left(A + C\right) + \mathsf{hypot}\left(B\_m, A - C\right)\\
\mathbf{if}\;B\_m \leq 3.9 \cdot 10^{-112}:\\
\;\;\;\;\frac{\sqrt{t\_2 \cdot \left(\left(2 \cdot F\right) \cdot \left(B\_m \cdot B\_m - t\_0\right)\right)}}{4 \cdot \left(A \cdot C\right)}\\

\mathbf{elif}\;B\_m \leq 9.6 \cdot 10^{-9}:\\
\;\;\;\;\frac{\sqrt{\left(F \cdot \left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right)\right) \cdot \left(4 \cdot A + \frac{B\_m \cdot B\_m}{A - C}\right)}}{t\_1}\\

\mathbf{elif}\;B\_m \leq 3.4 \cdot 10^{+129}:\\
\;\;\;\;B\_m \cdot \frac{\sqrt{F \cdot \left(2 \cdot t\_2\right)}}{t\_1}\\

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


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

    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. Step-by-step derivation
      1. distribute-frac-negN/A

        \[\leadsto \mathsf{neg}\left(\frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\right) \]
      2. distribute-neg-frac2N/A

        \[\leadsto \frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{\color{blue}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\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), \color{blue}{\left(\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)\right)}\right) \]
    3. Simplified24.7%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)\right), \mathsf{*.f64}\left(2, F\right)\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(A, C\right), \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right)\right)\right)\right), \color{blue}{\left(4 \cdot \left(A \cdot C\right)\right)}\right) \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)\right), \mathsf{*.f64}\left(2, F\right)\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(A, C\right), \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right)\right)\right)\right), \mathsf{*.f64}\left(4, \color{blue}{\left(A \cdot C\right)}\right)\right) \]
      2. *-lowering-*.f6416.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)\right), \mathsf{*.f64}\left(2, F\right)\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(A, C\right), \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right)\right)\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(A, \color{blue}{C}\right)\right)\right) \]
    7. Simplified16.6%

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

    if 3.9000000000000001e-112 < B < 9.5999999999999999e-9

    1. Initial program 16.5%

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

        \[\leadsto \mathsf{neg}\left(\frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\right) \]
      2. distribute-neg-frac2N/A

        \[\leadsto \frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{\color{blue}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\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), \color{blue}{\left(\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)\right)}\right) \]
    3. Simplified20.3%

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

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot \left(F \cdot 2\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right) \cdot 2\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{4}, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right) \cdot \left(2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. sqrt-prodN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F} \cdot \sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      6. pow1/2N/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)}^{\frac{1}{2}} \cdot \sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left({\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)}^{\frac{1}{2}}\right), \left(\sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right)\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    6. Applied egg-rr24.1%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\color{blue}{\left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)}\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    8. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\left(\frac{{B}^{2}}{A - C} + 4 \cdot A\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(\frac{{B}^{2}}{A - C}\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\left({B}^{2}\right), \left(A - C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(B \cdot B\right), \left(A - C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, B\right), \left(A - C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      6. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{\_.f64}\left(A, C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      7. *-lowering-*.f6419.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{\_.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(4, A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    9. Simplified19.0%

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

      \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(\sqrt{F \cdot \left(\left(-4 \cdot \left(A \cdot C\right) + {B}^{2}\right) \cdot \left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)\right)}\right)}, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    11. Step-by-step derivation
      1. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(F \cdot \left(\left(-4 \cdot \left(A \cdot C\right) + {B}^{2}\right) \cdot \left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)\right)\right)\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(\left(F \cdot \left(-4 \cdot \left(A \cdot C\right) + {B}^{2}\right)\right) \cdot \left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(F \cdot \left(-4 \cdot \left(A \cdot C\right) + {B}^{2}\right)\right), \left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(F, \left(-4 \cdot \left(A \cdot C\right) + {B}^{2}\right)\right), \left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{4}, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\left(-4 \cdot \left(A \cdot C\right)\right), \left({B}^{2}\right)\right)\right), \left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \left(A \cdot C\right)\right), \left({B}^{2}\right)\right)\right), \left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right), \left({B}^{2}\right)\right)\right), \left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right), \left(B \cdot B\right)\right)\right), \left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right), \left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right), \mathsf{+.f64}\left(\left(4 \cdot A\right), \left(\frac{{B}^{2}}{A - C}\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, \color{blue}{A}\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(4, A\right), \left(\frac{{B}^{2}}{A - C}\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(4, A\right), \mathsf{/.f64}\left(\left({B}^{2}\right), \left(A - C\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      13. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(4, A\right), \mathsf{/.f64}\left(\left(B \cdot B\right), \left(A - C\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(4, A\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(B, B\right), \left(A - C\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      15. --lowering--.f6430.8%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(4, A\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{\_.f64}\left(A, C\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    12. Simplified30.8%

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

    if 9.5999999999999999e-9 < B < 3.40000000000000018e129

    1. Initial program 38.3%

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

        \[\leadsto \mathsf{neg}\left(\frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\right) \]
      2. distribute-neg-frac2N/A

        \[\leadsto \frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{\color{blue}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
      3. /-lowering-/.f64N/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot \left(F \cdot 2\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right) \cdot 2\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{4}, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right) \cdot \left(2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. sqrt-prodN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F} \cdot \sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      6. pow1/2N/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)}^{\frac{1}{2}} \cdot \sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left({\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)}^{\frac{1}{2}}\right), \left(\sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right)\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    6. Applied egg-rr54.1%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\color{blue}{\left(B \cdot \sqrt{F}\right)}, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{+.f64}\left(A, \mathsf{+.f64}\left(C, \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right)\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    8. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(B, \left(\sqrt{F}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{+.f64}\left(A, \mathsf{+.f64}\left(C, \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right)\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. sqrt-lowering-sqrt.f6462.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(B, \mathsf{sqrt.f64}\left(F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{+.f64}\left(A, \mathsf{+.f64}\left(C, \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right)\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, \color{blue}{A}\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    9. Simplified62.9%

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

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

        \[\leadsto B \cdot \color{blue}{\frac{\sqrt{F} \cdot \sqrt{2 \cdot \left(A + \left(C + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)}}{\left(4 \cdot A\right) \cdot C - B \cdot B}} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(B, \color{blue}{\left(\frac{\sqrt{F} \cdot \sqrt{2 \cdot \left(A + \left(C + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)}}{\left(4 \cdot A\right) \cdot C - B \cdot B}\right)}\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(B, \mathsf{/.f64}\left(\left(\sqrt{F} \cdot \sqrt{2 \cdot \left(A + \left(C + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)}\right), \color{blue}{\left(\left(4 \cdot A\right) \cdot C - B \cdot B\right)}\right)\right) \]
    11. Applied egg-rr59.5%

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

    if 3.40000000000000018e129 < B

    1. Initial program 0.1%

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

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

        \[\leadsto \mathsf{neg}\left(\sqrt{\frac{F}{B}} \cdot \sqrt{2}\right) \]
      2. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{\frac{F}{B}} \cdot \sqrt{2}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{\frac{F}{B}}\right), \left(\sqrt{2}\right)\right)\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{F}{B}\right)\right), \left(\sqrt{2}\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(F, B\right)\right), \left(\sqrt{2}\right)\right)\right) \]
      6. sqrt-lowering-sqrt.f6447.5%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(F, B\right)\right), \mathsf{sqrt.f64}\left(2\right)\right)\right) \]
    5. Simplified47.5%

      \[\leadsto \color{blue}{-\sqrt{\frac{F}{B}} \cdot \sqrt{2}} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot \sqrt{\frac{F}{B}}\right)\right) \]
      2. sqrt-divN/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot \frac{\sqrt{F}}{\sqrt{B}}\right)\right) \]
      3. pow1/2N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot \frac{{F}^{\frac{1}{2}}}{\sqrt{B}}\right)\right) \]
      4. associate-*r/N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{\sqrt{2} \cdot {F}^{\frac{1}{2}}}{\sqrt{B}}\right)\right) \]
      5. pow1/2N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{{2}^{\frac{1}{2}} \cdot {F}^{\frac{1}{2}}}{\sqrt{B}}\right)\right) \]
      6. unpow-prod-downN/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{{\left(2 \cdot F\right)}^{\frac{1}{2}}}{\sqrt{B}}\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left({\left(2 \cdot F\right)}^{\frac{1}{2}}\right), \left(\sqrt{B}\right)\right)\right) \]
      8. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(2 \cdot F\right), \frac{1}{2}\right), \left(\sqrt{B}\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(2, F\right), \frac{1}{2}\right), \left(\sqrt{B}\right)\right)\right) \]
      10. sqrt-lowering-sqrt.f6463.8%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(2, F\right), \frac{1}{2}\right), \mathsf{sqrt.f64}\left(B\right)\right)\right) \]
    7. Applied egg-rr63.8%

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

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

Alternative 13: 46.7% accurate, 2.7× speedup?

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

\\
\begin{array}{l}
t_0 := \mathsf{hypot}\left(B\_m, A - C\right)\\
t_1 := \left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m\\
\mathbf{if}\;B\_m \leq 1.7 \cdot 10^{+28}:\\
\;\;\;\;\frac{\sqrt{\left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right) \cdot \left(\left(A + \left(C + t\_0\right)\right) \cdot \left(2 \cdot F\right)\right)}}{t\_1}\\

\mathbf{elif}\;B\_m \leq 5 \cdot 10^{+128}:\\
\;\;\;\;B\_m \cdot \frac{\sqrt{F \cdot \left(2 \cdot \left(\left(A + C\right) + t\_0\right)\right)}}{t\_1}\\

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


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

    1. Initial program 19.0%

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

        \[\leadsto \mathsf{neg}\left(\frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\right) \]
      2. distribute-neg-frac2N/A

        \[\leadsto \frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{\color{blue}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\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), \color{blue}{\left(\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)\right)}\right) \]
    3. Simplified24.7%

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

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

    if 1.7e28 < B < 5e128

    1. Initial program 38.9%

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

        \[\leadsto \mathsf{neg}\left(\frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\right) \]
      2. distribute-neg-frac2N/A

        \[\leadsto \frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{\color{blue}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\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), \color{blue}{\left(\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)\right)}\right) \]
    3. Simplified48.3%

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

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot \left(F \cdot 2\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right) \cdot 2\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{4}, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right) \cdot \left(2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. sqrt-prodN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F} \cdot \sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      6. pow1/2N/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)}^{\frac{1}{2}} \cdot \sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left({\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)}^{\frac{1}{2}}\right), \left(\sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right)\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    6. Applied egg-rr52.4%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\color{blue}{\left(B \cdot \sqrt{F}\right)}, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{+.f64}\left(A, \mathsf{+.f64}\left(C, \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right)\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    8. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(B, \left(\sqrt{F}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{+.f64}\left(A, \mathsf{+.f64}\left(C, \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right)\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. sqrt-lowering-sqrt.f6462.2%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(B, \mathsf{sqrt.f64}\left(F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{+.f64}\left(A, \mathsf{+.f64}\left(C, \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right)\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, \color{blue}{A}\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    9. Simplified62.2%

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

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

        \[\leadsto B \cdot \color{blue}{\frac{\sqrt{F} \cdot \sqrt{2 \cdot \left(A + \left(C + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)}}{\left(4 \cdot A\right) \cdot C - B \cdot B}} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(B, \color{blue}{\left(\frac{\sqrt{F} \cdot \sqrt{2 \cdot \left(A + \left(C + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)}}{\left(4 \cdot A\right) \cdot C - B \cdot B}\right)}\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(B, \mathsf{/.f64}\left(\left(\sqrt{F} \cdot \sqrt{2 \cdot \left(A + \left(C + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)}\right), \color{blue}{\left(\left(4 \cdot A\right) \cdot C - B \cdot B\right)}\right)\right) \]
    11. Applied egg-rr58.4%

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

    if 5e128 < B

    1. Initial program 0.1%

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

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

        \[\leadsto \mathsf{neg}\left(\sqrt{\frac{F}{B}} \cdot \sqrt{2}\right) \]
      2. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{\frac{F}{B}} \cdot \sqrt{2}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{\frac{F}{B}}\right), \left(\sqrt{2}\right)\right)\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{F}{B}\right)\right), \left(\sqrt{2}\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(F, B\right)\right), \left(\sqrt{2}\right)\right)\right) \]
      6. sqrt-lowering-sqrt.f6447.5%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(F, B\right)\right), \mathsf{sqrt.f64}\left(2\right)\right)\right) \]
    5. Simplified47.5%

      \[\leadsto \color{blue}{-\sqrt{\frac{F}{B}} \cdot \sqrt{2}} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot \sqrt{\frac{F}{B}}\right)\right) \]
      2. sqrt-divN/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot \frac{\sqrt{F}}{\sqrt{B}}\right)\right) \]
      3. pow1/2N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot \frac{{F}^{\frac{1}{2}}}{\sqrt{B}}\right)\right) \]
      4. associate-*r/N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{\sqrt{2} \cdot {F}^{\frac{1}{2}}}{\sqrt{B}}\right)\right) \]
      5. pow1/2N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{{2}^{\frac{1}{2}} \cdot {F}^{\frac{1}{2}}}{\sqrt{B}}\right)\right) \]
      6. unpow-prod-downN/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{{\left(2 \cdot F\right)}^{\frac{1}{2}}}{\sqrt{B}}\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left({\left(2 \cdot F\right)}^{\frac{1}{2}}\right), \left(\sqrt{B}\right)\right)\right) \]
      8. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(2 \cdot F\right), \frac{1}{2}\right), \left(\sqrt{B}\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(2, F\right), \frac{1}{2}\right), \left(\sqrt{B}\right)\right)\right) \]
      10. sqrt-lowering-sqrt.f6463.8%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(2, F\right), \frac{1}{2}\right), \mathsf{sqrt.f64}\left(B\right)\right)\right) \]
    7. Applied egg-rr63.8%

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

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

Alternative 14: 45.9% accurate, 2.7× speedup?

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

\\
\begin{array}{l}
t_0 := \left(4 \cdot A\right) \cdot C\\
t_1 := t\_0 - B\_m \cdot B\_m\\
t_2 := \left(A + C\right) + \mathsf{hypot}\left(B\_m, A - C\right)\\
\mathbf{if}\;B\_m \leq 1.2 \cdot 10^{+32}:\\
\;\;\;\;\frac{\sqrt{t\_2 \cdot \left(\left(2 \cdot F\right) \cdot \left(B\_m \cdot B\_m - t\_0\right)\right)}}{t\_1}\\

\mathbf{elif}\;B\_m \leq 7.4 \cdot 10^{+128}:\\
\;\;\;\;B\_m \cdot \frac{\sqrt{F \cdot \left(2 \cdot t\_2\right)}}{t\_1}\\

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


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

    1. Initial program 20.2%

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

        \[\leadsto \mathsf{neg}\left(\frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\right) \]
      2. distribute-neg-frac2N/A

        \[\leadsto \frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{\color{blue}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
      3. /-lowering-/.f64N/A

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

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

    if 1.19999999999999996e32 < B < 7.4000000000000002e128

    1. Initial program 28.8%

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

        \[\leadsto \mathsf{neg}\left(\frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\right) \]
      2. distribute-neg-frac2N/A

        \[\leadsto \frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{\color{blue}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\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), \color{blue}{\left(\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)\right)}\right) \]
    3. Simplified39.8%

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

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot \left(F \cdot 2\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right) \cdot 2\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{4}, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right) \cdot \left(2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. sqrt-prodN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F} \cdot \sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      6. pow1/2N/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)}^{\frac{1}{2}} \cdot \sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left({\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)}^{\frac{1}{2}}\right), \left(\sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right)\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    6. Applied egg-rr44.6%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\color{blue}{\left(B \cdot \sqrt{F}\right)}, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{+.f64}\left(A, \mathsf{+.f64}\left(C, \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right)\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    8. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(B, \left(\sqrt{F}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{+.f64}\left(A, \mathsf{+.f64}\left(C, \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right)\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. sqrt-lowering-sqrt.f6456.2%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(B, \mathsf{sqrt.f64}\left(F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{+.f64}\left(A, \mathsf{+.f64}\left(C, \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right)\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, \color{blue}{A}\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    9. Simplified56.2%

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

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

        \[\leadsto B \cdot \color{blue}{\frac{\sqrt{F} \cdot \sqrt{2 \cdot \left(A + \left(C + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)}}{\left(4 \cdot A\right) \cdot C - B \cdot B}} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(B, \color{blue}{\left(\frac{\sqrt{F} \cdot \sqrt{2 \cdot \left(A + \left(C + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)}}{\left(4 \cdot A\right) \cdot C - B \cdot B}\right)}\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(B, \mathsf{/.f64}\left(\left(\sqrt{F} \cdot \sqrt{2 \cdot \left(A + \left(C + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)}\right), \color{blue}{\left(\left(4 \cdot A\right) \cdot C - B \cdot B\right)}\right)\right) \]
    11. Applied egg-rr51.6%

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

    if 7.4000000000000002e128 < B

    1. Initial program 0.1%

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

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

        \[\leadsto \mathsf{neg}\left(\sqrt{\frac{F}{B}} \cdot \sqrt{2}\right) \]
      2. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{\frac{F}{B}} \cdot \sqrt{2}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{\frac{F}{B}}\right), \left(\sqrt{2}\right)\right)\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{F}{B}\right)\right), \left(\sqrt{2}\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(F, B\right)\right), \left(\sqrt{2}\right)\right)\right) \]
      6. sqrt-lowering-sqrt.f6447.5%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(F, B\right)\right), \mathsf{sqrt.f64}\left(2\right)\right)\right) \]
    5. Simplified47.5%

      \[\leadsto \color{blue}{-\sqrt{\frac{F}{B}} \cdot \sqrt{2}} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot \sqrt{\frac{F}{B}}\right)\right) \]
      2. sqrt-divN/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot \frac{\sqrt{F}}{\sqrt{B}}\right)\right) \]
      3. pow1/2N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot \frac{{F}^{\frac{1}{2}}}{\sqrt{B}}\right)\right) \]
      4. associate-*r/N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{\sqrt{2} \cdot {F}^{\frac{1}{2}}}{\sqrt{B}}\right)\right) \]
      5. pow1/2N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{{2}^{\frac{1}{2}} \cdot {F}^{\frac{1}{2}}}{\sqrt{B}}\right)\right) \]
      6. unpow-prod-downN/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{{\left(2 \cdot F\right)}^{\frac{1}{2}}}{\sqrt{B}}\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left({\left(2 \cdot F\right)}^{\frac{1}{2}}\right), \left(\sqrt{B}\right)\right)\right) \]
      8. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(2 \cdot F\right), \frac{1}{2}\right), \left(\sqrt{B}\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(2, F\right), \frac{1}{2}\right), \left(\sqrt{B}\right)\right)\right) \]
      10. sqrt-lowering-sqrt.f6463.8%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(2, F\right), \frac{1}{2}\right), \mathsf{sqrt.f64}\left(B\right)\right)\right) \]
    7. Applied egg-rr63.8%

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

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

Alternative 15: 42.5% accurate, 2.7× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ \begin{array}{l} \mathbf{if}\;B\_m \leq 1.25 \cdot 10^{-80}:\\ \;\;\;\;\left(0.5 \cdot \left(\sqrt{\frac{1}{A}} \cdot \frac{1}{C}\right)\right) \cdot \sqrt{F \cdot \left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right)}\\ \mathbf{elif}\;B\_m \leq 1.7 \cdot 10^{+130}:\\ \;\;\;\;B\_m \cdot \frac{\sqrt{F \cdot \left(2 \cdot \left(\left(A + C\right) + \mathsf{hypot}\left(B\_m, A - C\right)\right)\right)}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{{\left(2 \cdot F\right)}^{0.5}}{0 - \sqrt{B\_m}}\\ \end{array} \end{array} \]
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
 :precision binary64
 (if (<= B_m 1.25e-80)
   (*
    (* 0.5 (* (sqrt (/ 1.0 A)) (/ 1.0 C)))
    (sqrt (* F (+ (* B_m B_m) (* -4.0 (* A C))))))
   (if (<= B_m 1.7e+130)
     (*
      B_m
      (/
       (sqrt (* F (* 2.0 (+ (+ A C) (hypot B_m (- A C))))))
       (- (* (* 4.0 A) C) (* B_m B_m))))
     (/ (pow (* 2.0 F) 0.5) (- 0.0 (sqrt B_m))))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
	double tmp;
	if (B_m <= 1.25e-80) {
		tmp = (0.5 * (sqrt((1.0 / A)) * (1.0 / C))) * sqrt((F * ((B_m * B_m) + (-4.0 * (A * C)))));
	} else if (B_m <= 1.7e+130) {
		tmp = B_m * (sqrt((F * (2.0 * ((A + C) + hypot(B_m, (A - C)))))) / (((4.0 * A) * C) - (B_m * B_m)));
	} else {
		tmp = pow((2.0 * F), 0.5) / (0.0 - sqrt(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 (B_m <= 1.25e-80) {
		tmp = (0.5 * (Math.sqrt((1.0 / A)) * (1.0 / C))) * Math.sqrt((F * ((B_m * B_m) + (-4.0 * (A * C)))));
	} else if (B_m <= 1.7e+130) {
		tmp = B_m * (Math.sqrt((F * (2.0 * ((A + C) + Math.hypot(B_m, (A - C)))))) / (((4.0 * A) * C) - (B_m * B_m)));
	} else {
		tmp = Math.pow((2.0 * F), 0.5) / (0.0 - Math.sqrt(B_m));
	}
	return tmp;
}
B_m = math.fabs(B)
def code(A, B_m, C, F):
	tmp = 0
	if B_m <= 1.25e-80:
		tmp = (0.5 * (math.sqrt((1.0 / A)) * (1.0 / C))) * math.sqrt((F * ((B_m * B_m) + (-4.0 * (A * C)))))
	elif B_m <= 1.7e+130:
		tmp = B_m * (math.sqrt((F * (2.0 * ((A + C) + math.hypot(B_m, (A - C)))))) / (((4.0 * A) * C) - (B_m * B_m)))
	else:
		tmp = math.pow((2.0 * F), 0.5) / (0.0 - math.sqrt(B_m))
	return tmp
B_m = abs(B)
function code(A, B_m, C, F)
	tmp = 0.0
	if (B_m <= 1.25e-80)
		tmp = Float64(Float64(0.5 * Float64(sqrt(Float64(1.0 / A)) * Float64(1.0 / C))) * sqrt(Float64(F * Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C))))));
	elseif (B_m <= 1.7e+130)
		tmp = Float64(B_m * Float64(sqrt(Float64(F * Float64(2.0 * Float64(Float64(A + C) + hypot(B_m, Float64(A - C)))))) / Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m))));
	else
		tmp = Float64((Float64(2.0 * F) ^ 0.5) / Float64(0.0 - sqrt(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 <= 1.25e-80)
		tmp = (0.5 * (sqrt((1.0 / A)) * (1.0 / C))) * sqrt((F * ((B_m * B_m) + (-4.0 * (A * C)))));
	elseif (B_m <= 1.7e+130)
		tmp = B_m * (sqrt((F * (2.0 * ((A + C) + hypot(B_m, (A - C)))))) / (((4.0 * A) * C) - (B_m * B_m)));
	else
		tmp = ((2.0 * F) ^ 0.5) / (0.0 - sqrt(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, 1.25e-80], N[(N[(0.5 * N[(N[Sqrt[N[(1.0 / A), $MachinePrecision]], $MachinePrecision] * N[(1.0 / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(F * N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B$95$m, 1.7e+130], N[(B$95$m * N[(N[Sqrt[N[(F * N[(2.0 * N[(N[(A + C), $MachinePrecision] + N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[N[(2.0 * F), $MachinePrecision], 0.5], $MachinePrecision] / N[(0.0 - N[Sqrt[B$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
B_m = \left|B\right|

\\
\begin{array}{l}
\mathbf{if}\;B\_m \leq 1.25 \cdot 10^{-80}:\\
\;\;\;\;\left(0.5 \cdot \left(\sqrt{\frac{1}{A}} \cdot \frac{1}{C}\right)\right) \cdot \sqrt{F \cdot \left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right)}\\

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

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


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

    1. Initial program 18.8%

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

        \[\leadsto \mathsf{neg}\left(\frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\right) \]
      2. distribute-neg-frac2N/A

        \[\leadsto \frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{\color{blue}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\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), \color{blue}{\left(\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)\right)}\right) \]
    3. Simplified24.1%

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

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot \left(F \cdot 2\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right) \cdot 2\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{4}, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right) \cdot \left(2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. sqrt-prodN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F} \cdot \sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      6. pow1/2N/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)}^{\frac{1}{2}} \cdot \sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left({\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)}^{\frac{1}{2}}\right), \left(\sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right)\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    6. Applied egg-rr36.5%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\color{blue}{\left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)}\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    8. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\left(\frac{{B}^{2}}{A - C} + 4 \cdot A\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(\frac{{B}^{2}}{A - C}\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\left({B}^{2}\right), \left(A - C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(B \cdot B\right), \left(A - C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, B\right), \left(A - C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      6. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{\_.f64}\left(A, C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      7. *-lowering-*.f6421.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{\_.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(4, A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    9. Simplified21.4%

      \[\leadsto \frac{\sqrt{\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right) \cdot F} \cdot \sqrt{\color{blue}{\frac{B \cdot B}{A - C} + 4 \cdot A}}}{\left(4 \cdot A\right) \cdot C - B \cdot B} \]
    10. Step-by-step derivation
      1. associate-/l*N/A

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

        \[\leadsto \frac{\sqrt{\frac{B \cdot B}{A - C} + 4 \cdot A}}{\left(4 \cdot A\right) \cdot C - B \cdot B} \cdot \color{blue}{\sqrt{\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right) \cdot F}} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\sqrt{\frac{B \cdot B}{A - C} + 4 \cdot A}}{\left(4 \cdot A\right) \cdot C - B \cdot B}\right), \color{blue}{\left(\sqrt{\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right) \cdot F}\right)}\right) \]
    11. Applied egg-rr21.5%

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

      \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left(\frac{1}{2} \cdot \left(\sqrt{\frac{1}{A}} \cdot \frac{1}{C}\right)\right)}, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right)\right)\right)\right) \]
    13. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left(\sqrt{\frac{1}{A}} \cdot \frac{1}{C}\right)\right), \mathsf{sqrt.f64}\left(\color{blue}{\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right)\right)}\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\left(\sqrt{\frac{1}{A}}\right), \left(\frac{1}{C}\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \color{blue}{\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right)}\right)\right)\right) \]
      3. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1}{A}\right)\right), \left(\frac{1}{C}\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\color{blue}{\mathsf{*.f64}\left(B, B\right)}, \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, A\right)\right), \left(\frac{1}{C}\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\color{blue}{B}, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right)\right)\right)\right) \]
      5. /-lowering-/.f6416.4%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, A\right)\right), \mathsf{/.f64}\left(1, C\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \color{blue}{\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)}\right)\right)\right)\right) \]
    14. Simplified16.4%

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

    if 1.25e-80 < B < 1.7e130

    1. Initial program 29.7%

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

        \[\leadsto \mathsf{neg}\left(\frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\right) \]
      2. distribute-neg-frac2N/A

        \[\leadsto \frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{\color{blue}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\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), \color{blue}{\left(\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)\right)}\right) \]
    3. Simplified39.1%

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

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot \left(F \cdot 2\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right) \cdot 2\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{4}, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right) \cdot \left(2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. sqrt-prodN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F} \cdot \sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      6. pow1/2N/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)}^{\frac{1}{2}} \cdot \sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left({\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)}^{\frac{1}{2}}\right), \left(\sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right)\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    6. Applied egg-rr43.2%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\color{blue}{\left(B \cdot \sqrt{F}\right)}, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{+.f64}\left(A, \mathsf{+.f64}\left(C, \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right)\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    8. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(B, \left(\sqrt{F}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{+.f64}\left(A, \mathsf{+.f64}\left(C, \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right)\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. sqrt-lowering-sqrt.f6446.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(B, \mathsf{sqrt.f64}\left(F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{+.f64}\left(A, \mathsf{+.f64}\left(C, \mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right)\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, \color{blue}{A}\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    9. Simplified46.3%

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

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

        \[\leadsto B \cdot \color{blue}{\frac{\sqrt{F} \cdot \sqrt{2 \cdot \left(A + \left(C + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)}}{\left(4 \cdot A\right) \cdot C - B \cdot B}} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(B, \color{blue}{\left(\frac{\sqrt{F} \cdot \sqrt{2 \cdot \left(A + \left(C + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)}}{\left(4 \cdot A\right) \cdot C - B \cdot B}\right)}\right) \]
      4. /-lowering-/.f64N/A

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

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

    if 1.7e130 < B

    1. Initial program 0.1%

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

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

        \[\leadsto \mathsf{neg}\left(\sqrt{\frac{F}{B}} \cdot \sqrt{2}\right) \]
      2. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{\frac{F}{B}} \cdot \sqrt{2}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{\frac{F}{B}}\right), \left(\sqrt{2}\right)\right)\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{F}{B}\right)\right), \left(\sqrt{2}\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(F, B\right)\right), \left(\sqrt{2}\right)\right)\right) \]
      6. sqrt-lowering-sqrt.f6447.5%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(F, B\right)\right), \mathsf{sqrt.f64}\left(2\right)\right)\right) \]
    5. Simplified47.5%

      \[\leadsto \color{blue}{-\sqrt{\frac{F}{B}} \cdot \sqrt{2}} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot \sqrt{\frac{F}{B}}\right)\right) \]
      2. sqrt-divN/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot \frac{\sqrt{F}}{\sqrt{B}}\right)\right) \]
      3. pow1/2N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot \frac{{F}^{\frac{1}{2}}}{\sqrt{B}}\right)\right) \]
      4. associate-*r/N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{\sqrt{2} \cdot {F}^{\frac{1}{2}}}{\sqrt{B}}\right)\right) \]
      5. pow1/2N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{{2}^{\frac{1}{2}} \cdot {F}^{\frac{1}{2}}}{\sqrt{B}}\right)\right) \]
      6. unpow-prod-downN/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{{\left(2 \cdot F\right)}^{\frac{1}{2}}}{\sqrt{B}}\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left({\left(2 \cdot F\right)}^{\frac{1}{2}}\right), \left(\sqrt{B}\right)\right)\right) \]
      8. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(2 \cdot F\right), \frac{1}{2}\right), \left(\sqrt{B}\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(2, F\right), \frac{1}{2}\right), \left(\sqrt{B}\right)\right)\right) \]
      10. sqrt-lowering-sqrt.f6463.8%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(2, F\right), \frac{1}{2}\right), \mathsf{sqrt.f64}\left(B\right)\right)\right) \]
    7. Applied egg-rr63.8%

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

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

Alternative 16: 39.8% accurate, 2.8× speedup?

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

\\
\begin{array}{l}
t_0 := B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\\
\mathbf{if}\;B\_m \leq 2 \cdot 10^{-71}:\\
\;\;\;\;\left(0.5 \cdot \left(\sqrt{\frac{1}{A}} \cdot \frac{1}{C}\right)\right) \cdot \sqrt{F \cdot t\_0}\\

\mathbf{elif}\;B\_m \leq 0.00028:\\
\;\;\;\;\frac{-1}{\frac{B\_m \cdot B\_m - \left(4 \cdot A\right) \cdot C}{\sqrt{F \cdot \left(t\_0 \cdot \left(4 \cdot A + \frac{B\_m \cdot B\_m}{A - C}\right)\right)}}}\\

\mathbf{elif}\;B\_m \leq 8.5 \cdot 10^{+207}:\\
\;\;\;\;0 - \frac{{\left(2 \cdot \left(F \cdot \left(C + \mathsf{hypot}\left(B\_m, C\right)\right)\right)\right)}^{0.5}}{B\_m}\\

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


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

    1. Initial program 18.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. Step-by-step derivation
      1. distribute-frac-negN/A

        \[\leadsto \mathsf{neg}\left(\frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\right) \]
      2. distribute-neg-frac2N/A

        \[\leadsto \frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{\color{blue}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\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), \color{blue}{\left(\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)\right)}\right) \]
    3. Simplified23.8%

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

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot \left(F \cdot 2\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right) \cdot 2\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{4}, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right) \cdot \left(2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. sqrt-prodN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F} \cdot \sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      6. pow1/2N/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)}^{\frac{1}{2}} \cdot \sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left({\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)}^{\frac{1}{2}}\right), \left(\sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right)\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    6. Applied egg-rr36.1%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\color{blue}{\left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)}\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    8. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\left(\frac{{B}^{2}}{A - C} + 4 \cdot A\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(\frac{{B}^{2}}{A - C}\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\left({B}^{2}\right), \left(A - C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(B \cdot B\right), \left(A - C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, B\right), \left(A - C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      6. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{\_.f64}\left(A, C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      7. *-lowering-*.f6421.2%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{\_.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(4, A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    9. Simplified21.2%

      \[\leadsto \frac{\sqrt{\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right) \cdot F} \cdot \sqrt{\color{blue}{\frac{B \cdot B}{A - C} + 4 \cdot A}}}{\left(4 \cdot A\right) \cdot C - B \cdot B} \]
    10. Step-by-step derivation
      1. associate-/l*N/A

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

        \[\leadsto \frac{\sqrt{\frac{B \cdot B}{A - C} + 4 \cdot A}}{\left(4 \cdot A\right) \cdot C - B \cdot B} \cdot \color{blue}{\sqrt{\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right) \cdot F}} \]
      3. *-lowering-*.f64N/A

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

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

      \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left(\frac{1}{2} \cdot \left(\sqrt{\frac{1}{A}} \cdot \frac{1}{C}\right)\right)}, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right)\right)\right)\right) \]
    13. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left(\sqrt{\frac{1}{A}} \cdot \frac{1}{C}\right)\right), \mathsf{sqrt.f64}\left(\color{blue}{\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right)\right)}\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\left(\sqrt{\frac{1}{A}}\right), \left(\frac{1}{C}\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \color{blue}{\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right)}\right)\right)\right) \]
      3. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1}{A}\right)\right), \left(\frac{1}{C}\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\color{blue}{\mathsf{*.f64}\left(B, B\right)}, \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, A\right)\right), \left(\frac{1}{C}\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\color{blue}{B}, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right)\right)\right)\right) \]
      5. /-lowering-/.f6416.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, A\right)\right), \mathsf{/.f64}\left(1, C\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \color{blue}{\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)}\right)\right)\right)\right) \]
    14. Simplified16.3%

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

    if 1.9999999999999998e-71 < B < 2.7999999999999998e-4

    1. Initial program 18.4%

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

        \[\leadsto \mathsf{neg}\left(\frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\right) \]
      2. distribute-neg-frac2N/A

        \[\leadsto \frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{\color{blue}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
      3. /-lowering-/.f64N/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot \left(F \cdot 2\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right) \cdot 2\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{4}, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right) \cdot \left(2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. sqrt-prodN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F} \cdot \sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      6. pow1/2N/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)}^{\frac{1}{2}} \cdot \sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left({\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)}^{\frac{1}{2}}\right), \left(\sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right)\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    6. Applied egg-rr34.0%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\color{blue}{\left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)}\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    8. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\left(\frac{{B}^{2}}{A - C} + 4 \cdot A\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(\frac{{B}^{2}}{A - C}\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\left({B}^{2}\right), \left(A - C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(B \cdot B\right), \left(A - C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, B\right), \left(A - C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      6. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{\_.f64}\left(A, C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      7. *-lowering-*.f6417.1%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{\_.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(4, A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    9. Simplified17.1%

      \[\leadsto \frac{\sqrt{\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right) \cdot F} \cdot \sqrt{\color{blue}{\frac{B \cdot B}{A - C} + 4 \cdot A}}}{\left(4 \cdot A\right) \cdot C - B \cdot B} \]
    10. Step-by-step derivation
      1. clear-numN/A

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

        \[\leadsto \mathsf{/.f64}\left(1, \color{blue}{\left(\frac{\left(4 \cdot A\right) \cdot C - B \cdot B}{\sqrt{\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right) \cdot F} \cdot \sqrt{\frac{B \cdot B}{A - C} + 4 \cdot A}}\right)}\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\left(4 \cdot A\right) \cdot C - B \cdot B\right), \color{blue}{\left(\sqrt{\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right) \cdot F} \cdot \sqrt{\frac{B \cdot B}{A - C} + 4 \cdot A}\right)}\right)\right) \]
      4. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(\left(4 \cdot A\right) \cdot C\right), \left(B \cdot B\right)\right), \left(\color{blue}{\sqrt{\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right) \cdot F}} \cdot \sqrt{\frac{B \cdot B}{A - C} + 4 \cdot A}\right)\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(C \cdot \left(4 \cdot A\right)\right), \left(B \cdot B\right)\right), \left(\sqrt{\color{blue}{\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right) \cdot F}} \cdot \sqrt{\frac{B \cdot B}{A - C} + 4 \cdot A}\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(C, \left(4 \cdot A\right)\right), \left(B \cdot B\right)\right), \left(\sqrt{\color{blue}{\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right) \cdot F}} \cdot \sqrt{\frac{B \cdot B}{A - C} + 4 \cdot A}\right)\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(C, \left(A \cdot 4\right)\right), \left(B \cdot B\right)\right), \left(\sqrt{\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right) \cdot \color{blue}{F}} \cdot \sqrt{\frac{B \cdot B}{A - C} + 4 \cdot A}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(C, \mathsf{*.f64}\left(A, 4\right)\right), \left(B \cdot B\right)\right), \left(\sqrt{\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right) \cdot \color{blue}{F}} \cdot \sqrt{\frac{B \cdot B}{A - C} + 4 \cdot A}\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(C, \mathsf{*.f64}\left(A, 4\right)\right), \mathsf{*.f64}\left(B, B\right)\right), \left(\sqrt{\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right) \cdot F} \cdot \sqrt{\frac{B \cdot B}{A - C} + 4 \cdot A}\right)\right)\right) \]
      10. sqrt-unprodN/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(C, \mathsf{*.f64}\left(A, 4\right)\right), \mathsf{*.f64}\left(B, B\right)\right), \left(\sqrt{\left(\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(\frac{B \cdot B}{A - C} + 4 \cdot A\right)}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(C, \mathsf{*.f64}\left(A, 4\right)\right), \mathsf{*.f64}\left(B, B\right)\right), \mathsf{sqrt.f64}\left(\left(\left(\left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(\frac{B \cdot B}{A - C} + 4 \cdot A\right)\right)\right)\right)\right) \]
    11. Applied egg-rr34.6%

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

    if 2.7999999999999998e-4 < B < 8.4999999999999996e207

    1. Initial program 25.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

      \[\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. associate-*r*N/A

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

        \[\leadsto \mathsf{*.f64}\left(\left(-1 \cdot \frac{\sqrt{2}}{B}\right), \color{blue}{\left(\sqrt{F \cdot \left(C + \sqrt{{B}^{2} + {C}^{2}}\right)}\right)}\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \left(\frac{\sqrt{2}}{B}\right)\right), \left(\sqrt{\color{blue}{F \cdot \left(C + \sqrt{{B}^{2} + {C}^{2}}\right)}}\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\left(\sqrt{2}\right), B\right)\right), \left(\sqrt{F \cdot \color{blue}{\left(C + \sqrt{{B}^{2} + {C}^{2}}\right)}}\right)\right) \]
      5. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(2\right), B\right)\right), \left(\sqrt{F \cdot \left(\color{blue}{C} + \sqrt{{B}^{2} + {C}^{2}}\right)}\right)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(2\right), B\right)\right), \mathsf{sqrt.f64}\left(\left(F \cdot \left(C + \sqrt{{B}^{2} + {C}^{2}}\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(2\right), B\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \left(C + \sqrt{{B}^{2} + {C}^{2}}\right)\right)\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(2\right), B\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(C, \left(\sqrt{{B}^{2} + {C}^{2}}\right)\right)\right)\right)\right) \]
      9. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(2\right), B\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(C, \left(\sqrt{{C}^{2} + {B}^{2}}\right)\right)\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(2\right), B\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(C, \left(\sqrt{C \cdot C + {B}^{2}}\right)\right)\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(2\right), B\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(C, \left(\sqrt{C \cdot C + B \cdot B}\right)\right)\right)\right)\right) \]
      12. hypot-defineN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(2\right), B\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(C, \left(\mathsf{hypot}\left(C, B\right)\right)\right)\right)\right)\right) \]
      13. hypot-lowering-hypot.f6446.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(2\right), B\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(C, \mathsf{hypot.f64}\left(C, B\right)\right)\right)\right)\right) \]
    5. Simplified46.5%

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

        \[\leadsto -1 \cdot \color{blue}{\left(\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{C \cdot C + B \cdot B}\right)}\right)} \]
      2. mul-1-negN/A

        \[\leadsto \mathsf{neg}\left(\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{C \cdot C + B \cdot B}\right)}\right) \]
      3. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{C \cdot C + B \cdot B}\right)}\right)\right) \]
      4. associate-*l/N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{\sqrt{2} \cdot \sqrt{F \cdot \left(C + \sqrt{C \cdot C + B \cdot B}\right)}}{B}\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(\sqrt{2} \cdot \sqrt{F \cdot \left(C + \sqrt{C \cdot C + B \cdot B}\right)}\right), B\right)\right) \]
    7. Applied egg-rr46.7%

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

    if 8.4999999999999996e207 < B

    1. Initial program 0.0%

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

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

        \[\leadsto \mathsf{neg}\left(\sqrt{\frac{F}{B}} \cdot \sqrt{2}\right) \]
      2. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{\frac{F}{B}} \cdot \sqrt{2}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{\frac{F}{B}}\right), \left(\sqrt{2}\right)\right)\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{F}{B}\right)\right), \left(\sqrt{2}\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(F, B\right)\right), \left(\sqrt{2}\right)\right)\right) \]
      6. sqrt-lowering-sqrt.f6460.2%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(F, B\right)\right), \mathsf{sqrt.f64}\left(2\right)\right)\right) \]
    5. Simplified60.2%

      \[\leadsto \color{blue}{-\sqrt{\frac{F}{B}} \cdot \sqrt{2}} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot \sqrt{\frac{F}{B}}\right)\right) \]
      2. sqrt-divN/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot \frac{\sqrt{F}}{\sqrt{B}}\right)\right) \]
      3. pow1/2N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot \frac{{F}^{\frac{1}{2}}}{\sqrt{B}}\right)\right) \]
      4. associate-*r/N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{\sqrt{2} \cdot {F}^{\frac{1}{2}}}{\sqrt{B}}\right)\right) \]
      5. pow1/2N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{{2}^{\frac{1}{2}} \cdot {F}^{\frac{1}{2}}}{\sqrt{B}}\right)\right) \]
      6. unpow-prod-downN/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{{\left(2 \cdot F\right)}^{\frac{1}{2}}}{\sqrt{B}}\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left({\left(2 \cdot F\right)}^{\frac{1}{2}}\right), \left(\sqrt{B}\right)\right)\right) \]
      8. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(2 \cdot F\right), \frac{1}{2}\right), \left(\sqrt{B}\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(2, F\right), \frac{1}{2}\right), \left(\sqrt{B}\right)\right)\right) \]
      10. sqrt-lowering-sqrt.f6485.3%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(2, F\right), \frac{1}{2}\right), \mathsf{sqrt.f64}\left(B\right)\right)\right) \]
    7. Applied egg-rr85.3%

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

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

Alternative 17: 40.2% accurate, 2.8× speedup?

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

\\
\begin{array}{l}
t_0 := \left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m\\
\mathbf{if}\;B\_m \leq 3.1 \cdot 10^{-115}:\\
\;\;\;\;\frac{\sqrt{C \cdot \left(-16 \cdot \left(A \cdot \left(C \cdot F\right)\right) + 4 \cdot \left(F \cdot \left(B\_m \cdot B\_m\right)\right)\right)}}{t\_0}\\

\mathbf{elif}\;B\_m \leq 0.000235:\\
\;\;\;\;\frac{\sqrt{\left(F \cdot \left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right)\right) \cdot \left(4 \cdot A + \frac{B\_m \cdot B\_m}{A - C}\right)}}{t\_0}\\

\mathbf{elif}\;B\_m \leq 8.5 \cdot 10^{+207}:\\
\;\;\;\;0 - \frac{{\left(2 \cdot \left(F \cdot \left(C + \mathsf{hypot}\left(B\_m, C\right)\right)\right)\right)}^{0.5}}{B\_m}\\

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


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

    1. Initial program 19.3%

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

        \[\leadsto \mathsf{neg}\left(\frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\right) \]
      2. distribute-neg-frac2N/A

        \[\leadsto \frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{\color{blue}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\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), \color{blue}{\left(\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)\right)}\right) \]
    3. Simplified24.8%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{\left({C}^{2} \cdot \left(-16 \cdot \left(A \cdot F\right) + 2 \cdot \frac{F \cdot \left(-4 \cdot \left(A \cdot \left(A + -1 \cdot A\right)\right) + 2 \cdot {B}^{2}\right)}{C}\right)\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left({C}^{2}\right), \left(-16 \cdot \left(A \cdot F\right) + 2 \cdot \frac{F \cdot \left(-4 \cdot \left(A \cdot \left(A + -1 \cdot A\right)\right) + 2 \cdot {B}^{2}\right)}{C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(C \cdot C\right), \left(-16 \cdot \left(A \cdot F\right) + 2 \cdot \frac{F \cdot \left(-4 \cdot \left(A \cdot \left(A + -1 \cdot A\right)\right) + 2 \cdot {B}^{2}\right)}{C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{4}, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \left(-16 \cdot \left(A \cdot F\right) + 2 \cdot \frac{F \cdot \left(-4 \cdot \left(A \cdot \left(A + -1 \cdot A\right)\right) + 2 \cdot {B}^{2}\right)}{C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{4}, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \mathsf{+.f64}\left(\left(-16 \cdot \left(A \cdot F\right)\right), \left(2 \cdot \frac{F \cdot \left(-4 \cdot \left(A \cdot \left(A + -1 \cdot A\right)\right) + 2 \cdot {B}^{2}\right)}{C}\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, \color{blue}{A}\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, \left(A \cdot F\right)\right), \left(2 \cdot \frac{F \cdot \left(-4 \cdot \left(A \cdot \left(A + -1 \cdot A\right)\right) + 2 \cdot {B}^{2}\right)}{C}\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, F\right)\right), \left(2 \cdot \frac{F \cdot \left(-4 \cdot \left(A \cdot \left(A + -1 \cdot A\right)\right) + 2 \cdot {B}^{2}\right)}{C}\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      7. associate-*r/N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, F\right)\right), \left(\frac{2 \cdot \left(F \cdot \left(-4 \cdot \left(A \cdot \left(A + -1 \cdot A\right)\right) + 2 \cdot {B}^{2}\right)\right)}{C}\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, F\right)\right), \mathsf{/.f64}\left(\left(2 \cdot \left(F \cdot \left(-4 \cdot \left(A \cdot \left(A + -1 \cdot A\right)\right) + 2 \cdot {B}^{2}\right)\right)\right), C\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    7. Simplified10.3%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{\left(C \cdot \left(-16 \cdot \left(A \cdot \left(C \cdot F\right)\right) + 4 \cdot \left({B}^{2} \cdot F\right)\right)\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    9. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(C, \left(-16 \cdot \left(A \cdot \left(C \cdot F\right)\right) + 4 \cdot \left({B}^{2} \cdot F\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(C, \mathsf{+.f64}\left(\left(-16 \cdot \left(A \cdot \left(C \cdot F\right)\right)\right), \left(4 \cdot \left({B}^{2} \cdot F\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, \color{blue}{A}\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(C, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, \left(A \cdot \left(C \cdot F\right)\right)\right), \left(4 \cdot \left({B}^{2} \cdot F\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(C, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, \left(C \cdot F\right)\right)\right), \left(4 \cdot \left({B}^{2} \cdot F\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(C, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, \mathsf{*.f64}\left(C, F\right)\right)\right), \left(4 \cdot \left({B}^{2} \cdot F\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(C, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, \mathsf{*.f64}\left(C, F\right)\right)\right), \mathsf{*.f64}\left(4, \left({B}^{2} \cdot F\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(C, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, \mathsf{*.f64}\left(C, F\right)\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(\left({B}^{2}\right), F\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(C, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, \mathsf{*.f64}\left(C, F\right)\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(\left(B \cdot B\right), F\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      9. *-lowering-*.f6418.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(C, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, \mathsf{*.f64}\left(C, F\right)\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(\mathsf{*.f64}\left(B, B\right), F\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    10. Simplified18.0%

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

    if 3.10000000000000007e-115 < B < 2.34999999999999993e-4

    1. Initial program 14.9%

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

        \[\leadsto \mathsf{neg}\left(\frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\right) \]
      2. distribute-neg-frac2N/A

        \[\leadsto \frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{\color{blue}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\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), \color{blue}{\left(\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)\right)}\right) \]
    3. Simplified21.7%

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

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot \left(F \cdot 2\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right) \cdot 2\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{4}, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right) \cdot \left(2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. sqrt-prodN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F} \cdot \sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      6. pow1/2N/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)}^{\frac{1}{2}} \cdot \sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left({\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)}^{\frac{1}{2}}\right), \left(\sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right)\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    6. Applied egg-rr25.0%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\color{blue}{\left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)}\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    8. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\left(\frac{{B}^{2}}{A - C} + 4 \cdot A\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(\frac{{B}^{2}}{A - C}\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\left({B}^{2}\right), \left(A - C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(B \cdot B\right), \left(A - C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, B\right), \left(A - C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      6. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{\_.f64}\left(A, C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      7. *-lowering-*.f6420.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{\_.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(4, A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    9. Simplified20.4%

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

      \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(\sqrt{F \cdot \left(\left(-4 \cdot \left(A \cdot C\right) + {B}^{2}\right) \cdot \left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)\right)}\right)}, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    11. Step-by-step derivation
      1. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(F \cdot \left(\left(-4 \cdot \left(A \cdot C\right) + {B}^{2}\right) \cdot \left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)\right)\right)\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(\left(F \cdot \left(-4 \cdot \left(A \cdot C\right) + {B}^{2}\right)\right) \cdot \left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(F \cdot \left(-4 \cdot \left(A \cdot C\right) + {B}^{2}\right)\right), \left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(F, \left(-4 \cdot \left(A \cdot C\right) + {B}^{2}\right)\right), \left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{4}, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\left(-4 \cdot \left(A \cdot C\right)\right), \left({B}^{2}\right)\right)\right), \left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \left(A \cdot C\right)\right), \left({B}^{2}\right)\right)\right), \left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right), \left({B}^{2}\right)\right)\right), \left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right), \left(B \cdot B\right)\right)\right), \left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right), \left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right), \mathsf{+.f64}\left(\left(4 \cdot A\right), \left(\frac{{B}^{2}}{A - C}\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, \color{blue}{A}\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(4, A\right), \left(\frac{{B}^{2}}{A - C}\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(4, A\right), \mathsf{/.f64}\left(\left({B}^{2}\right), \left(A - C\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      13. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(4, A\right), \mathsf{/.f64}\left(\left(B \cdot B\right), \left(A - C\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(4, A\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(B, B\right), \left(A - C\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      15. --lowering--.f6431.1%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(4, A\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{\_.f64}\left(A, C\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    12. Simplified31.1%

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

    if 2.34999999999999993e-4 < B < 8.4999999999999996e207

    1. Initial program 25.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

      \[\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. associate-*r*N/A

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

        \[\leadsto \mathsf{*.f64}\left(\left(-1 \cdot \frac{\sqrt{2}}{B}\right), \color{blue}{\left(\sqrt{F \cdot \left(C + \sqrt{{B}^{2} + {C}^{2}}\right)}\right)}\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \left(\frac{\sqrt{2}}{B}\right)\right), \left(\sqrt{\color{blue}{F \cdot \left(C + \sqrt{{B}^{2} + {C}^{2}}\right)}}\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\left(\sqrt{2}\right), B\right)\right), \left(\sqrt{F \cdot \color{blue}{\left(C + \sqrt{{B}^{2} + {C}^{2}}\right)}}\right)\right) \]
      5. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(2\right), B\right)\right), \left(\sqrt{F \cdot \left(\color{blue}{C} + \sqrt{{B}^{2} + {C}^{2}}\right)}\right)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(2\right), B\right)\right), \mathsf{sqrt.f64}\left(\left(F \cdot \left(C + \sqrt{{B}^{2} + {C}^{2}}\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(2\right), B\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \left(C + \sqrt{{B}^{2} + {C}^{2}}\right)\right)\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(2\right), B\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(C, \left(\sqrt{{B}^{2} + {C}^{2}}\right)\right)\right)\right)\right) \]
      9. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(2\right), B\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(C, \left(\sqrt{{C}^{2} + {B}^{2}}\right)\right)\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(2\right), B\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(C, \left(\sqrt{C \cdot C + {B}^{2}}\right)\right)\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(2\right), B\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(C, \left(\sqrt{C \cdot C + B \cdot B}\right)\right)\right)\right)\right) \]
      12. hypot-defineN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(2\right), B\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(C, \left(\mathsf{hypot}\left(C, B\right)\right)\right)\right)\right)\right) \]
      13. hypot-lowering-hypot.f6446.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(2\right), B\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(C, \mathsf{hypot.f64}\left(C, B\right)\right)\right)\right)\right) \]
    5. Simplified46.5%

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

        \[\leadsto -1 \cdot \color{blue}{\left(\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{C \cdot C + B \cdot B}\right)}\right)} \]
      2. mul-1-negN/A

        \[\leadsto \mathsf{neg}\left(\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{C \cdot C + B \cdot B}\right)}\right) \]
      3. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{C \cdot C + B \cdot B}\right)}\right)\right) \]
      4. associate-*l/N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{\sqrt{2} \cdot \sqrt{F \cdot \left(C + \sqrt{C \cdot C + B \cdot B}\right)}}{B}\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(\sqrt{2} \cdot \sqrt{F \cdot \left(C + \sqrt{C \cdot C + B \cdot B}\right)}\right), B\right)\right) \]
    7. Applied egg-rr46.7%

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

    if 8.4999999999999996e207 < B

    1. Initial program 0.0%

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

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

        \[\leadsto \mathsf{neg}\left(\sqrt{\frac{F}{B}} \cdot \sqrt{2}\right) \]
      2. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{\frac{F}{B}} \cdot \sqrt{2}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{\frac{F}{B}}\right), \left(\sqrt{2}\right)\right)\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{F}{B}\right)\right), \left(\sqrt{2}\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(F, B\right)\right), \left(\sqrt{2}\right)\right)\right) \]
      6. sqrt-lowering-sqrt.f6460.2%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(F, B\right)\right), \mathsf{sqrt.f64}\left(2\right)\right)\right) \]
    5. Simplified60.2%

      \[\leadsto \color{blue}{-\sqrt{\frac{F}{B}} \cdot \sqrt{2}} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot \sqrt{\frac{F}{B}}\right)\right) \]
      2. sqrt-divN/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot \frac{\sqrt{F}}{\sqrt{B}}\right)\right) \]
      3. pow1/2N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot \frac{{F}^{\frac{1}{2}}}{\sqrt{B}}\right)\right) \]
      4. associate-*r/N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{\sqrt{2} \cdot {F}^{\frac{1}{2}}}{\sqrt{B}}\right)\right) \]
      5. pow1/2N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{{2}^{\frac{1}{2}} \cdot {F}^{\frac{1}{2}}}{\sqrt{B}}\right)\right) \]
      6. unpow-prod-downN/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{{\left(2 \cdot F\right)}^{\frac{1}{2}}}{\sqrt{B}}\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left({\left(2 \cdot F\right)}^{\frac{1}{2}}\right), \left(\sqrt{B}\right)\right)\right) \]
      8. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(2 \cdot F\right), \frac{1}{2}\right), \left(\sqrt{B}\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(2, F\right), \frac{1}{2}\right), \left(\sqrt{B}\right)\right)\right) \]
      10. sqrt-lowering-sqrt.f6485.3%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(2, F\right), \frac{1}{2}\right), \mathsf{sqrt.f64}\left(B\right)\right)\right) \]
    7. Applied egg-rr85.3%

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

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

Alternative 18: 41.3% accurate, 2.9× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ \begin{array}{l} t_0 := \left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m\\ \mathbf{if}\;B\_m \leq 6 \cdot 10^{-116}:\\ \;\;\;\;\frac{\sqrt{C \cdot \left(-16 \cdot \left(A \cdot \left(C \cdot F\right)\right) + 4 \cdot \left(F \cdot \left(B\_m \cdot B\_m\right)\right)\right)}}{t\_0}\\ \mathbf{elif}\;B\_m \leq 0.00018:\\ \;\;\;\;\frac{\sqrt{\left(F \cdot \left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right)\right) \cdot \left(4 \cdot A + \frac{B\_m \cdot B\_m}{A - C}\right)}}{t\_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{{\left(2 \cdot F\right)}^{0.5}}{0 - \sqrt{B\_m}}\\ \end{array} \end{array} \]
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
 :precision binary64
 (let* ((t_0 (- (* (* 4.0 A) C) (* B_m B_m))))
   (if (<= B_m 6e-116)
     (/ (sqrt (* C (+ (* -16.0 (* A (* C F))) (* 4.0 (* F (* B_m B_m)))))) t_0)
     (if (<= B_m 0.00018)
       (/
        (sqrt
         (*
          (* F (+ (* B_m B_m) (* -4.0 (* A C))))
          (+ (* 4.0 A) (/ (* B_m B_m) (- A C)))))
        t_0)
       (/ (pow (* 2.0 F) 0.5) (- 0.0 (sqrt B_m)))))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
	double t_0 = ((4.0 * A) * C) - (B_m * B_m);
	double tmp;
	if (B_m <= 6e-116) {
		tmp = sqrt((C * ((-16.0 * (A * (C * F))) + (4.0 * (F * (B_m * B_m)))))) / t_0;
	} else if (B_m <= 0.00018) {
		tmp = sqrt(((F * ((B_m * B_m) + (-4.0 * (A * C)))) * ((4.0 * A) + ((B_m * B_m) / (A - C))))) / t_0;
	} else {
		tmp = pow((2.0 * F), 0.5) / (0.0 - sqrt(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) :: t_0
    real(8) :: tmp
    t_0 = ((4.0d0 * a) * c) - (b_m * b_m)
    if (b_m <= 6d-116) then
        tmp = sqrt((c * (((-16.0d0) * (a * (c * f))) + (4.0d0 * (f * (b_m * b_m)))))) / t_0
    else if (b_m <= 0.00018d0) then
        tmp = sqrt(((f * ((b_m * b_m) + ((-4.0d0) * (a * c)))) * ((4.0d0 * a) + ((b_m * b_m) / (a - c))))) / t_0
    else
        tmp = ((2.0d0 * f) ** 0.5d0) / (0.0d0 - sqrt(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 t_0 = ((4.0 * A) * C) - (B_m * B_m);
	double tmp;
	if (B_m <= 6e-116) {
		tmp = Math.sqrt((C * ((-16.0 * (A * (C * F))) + (4.0 * (F * (B_m * B_m)))))) / t_0;
	} else if (B_m <= 0.00018) {
		tmp = Math.sqrt(((F * ((B_m * B_m) + (-4.0 * (A * C)))) * ((4.0 * A) + ((B_m * B_m) / (A - C))))) / t_0;
	} else {
		tmp = Math.pow((2.0 * F), 0.5) / (0.0 - Math.sqrt(B_m));
	}
	return tmp;
}
B_m = math.fabs(B)
def code(A, B_m, C, F):
	t_0 = ((4.0 * A) * C) - (B_m * B_m)
	tmp = 0
	if B_m <= 6e-116:
		tmp = math.sqrt((C * ((-16.0 * (A * (C * F))) + (4.0 * (F * (B_m * B_m)))))) / t_0
	elif B_m <= 0.00018:
		tmp = math.sqrt(((F * ((B_m * B_m) + (-4.0 * (A * C)))) * ((4.0 * A) + ((B_m * B_m) / (A - C))))) / t_0
	else:
		tmp = math.pow((2.0 * F), 0.5) / (0.0 - math.sqrt(B_m))
	return tmp
B_m = abs(B)
function code(A, B_m, C, F)
	t_0 = Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m))
	tmp = 0.0
	if (B_m <= 6e-116)
		tmp = Float64(sqrt(Float64(C * Float64(Float64(-16.0 * Float64(A * Float64(C * F))) + Float64(4.0 * Float64(F * Float64(B_m * B_m)))))) / t_0);
	elseif (B_m <= 0.00018)
		tmp = Float64(sqrt(Float64(Float64(F * Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C)))) * Float64(Float64(4.0 * A) + Float64(Float64(B_m * B_m) / Float64(A - C))))) / t_0);
	else
		tmp = Float64((Float64(2.0 * F) ^ 0.5) / Float64(0.0 - sqrt(B_m)));
	end
	return tmp
end
B_m = abs(B);
function tmp_2 = code(A, B_m, C, F)
	t_0 = ((4.0 * A) * C) - (B_m * B_m);
	tmp = 0.0;
	if (B_m <= 6e-116)
		tmp = sqrt((C * ((-16.0 * (A * (C * F))) + (4.0 * (F * (B_m * B_m)))))) / t_0;
	elseif (B_m <= 0.00018)
		tmp = sqrt(((F * ((B_m * B_m) + (-4.0 * (A * C)))) * ((4.0 * A) + ((B_m * B_m) / (A - C))))) / t_0;
	else
		tmp = ((2.0 * F) ^ 0.5) / (0.0 - sqrt(B_m));
	end
	tmp_2 = tmp;
end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B$95$m, 6e-116], N[(N[Sqrt[N[(C * N[(N[(-16.0 * N[(A * N[(C * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(F * N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[B$95$m, 0.00018], N[(N[Sqrt[N[(N[(F * N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(4.0 * A), $MachinePrecision] + N[(N[(B$95$m * B$95$m), $MachinePrecision] / N[(A - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], N[(N[Power[N[(2.0 * F), $MachinePrecision], 0.5], $MachinePrecision] / N[(0.0 - N[Sqrt[B$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
B_m = \left|B\right|

\\
\begin{array}{l}
t_0 := \left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m\\
\mathbf{if}\;B\_m \leq 6 \cdot 10^{-116}:\\
\;\;\;\;\frac{\sqrt{C \cdot \left(-16 \cdot \left(A \cdot \left(C \cdot F\right)\right) + 4 \cdot \left(F \cdot \left(B\_m \cdot B\_m\right)\right)\right)}}{t\_0}\\

\mathbf{elif}\;B\_m \leq 0.00018:\\
\;\;\;\;\frac{\sqrt{\left(F \cdot \left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right)\right) \cdot \left(4 \cdot A + \frac{B\_m \cdot B\_m}{A - C}\right)}}{t\_0}\\

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


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

    1. Initial program 19.3%

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

        \[\leadsto \mathsf{neg}\left(\frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\right) \]
      2. distribute-neg-frac2N/A

        \[\leadsto \frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{\color{blue}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\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), \color{blue}{\left(\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)\right)}\right) \]
    3. Simplified24.8%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{\left({C}^{2} \cdot \left(-16 \cdot \left(A \cdot F\right) + 2 \cdot \frac{F \cdot \left(-4 \cdot \left(A \cdot \left(A + -1 \cdot A\right)\right) + 2 \cdot {B}^{2}\right)}{C}\right)\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left({C}^{2}\right), \left(-16 \cdot \left(A \cdot F\right) + 2 \cdot \frac{F \cdot \left(-4 \cdot \left(A \cdot \left(A + -1 \cdot A\right)\right) + 2 \cdot {B}^{2}\right)}{C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(C \cdot C\right), \left(-16 \cdot \left(A \cdot F\right) + 2 \cdot \frac{F \cdot \left(-4 \cdot \left(A \cdot \left(A + -1 \cdot A\right)\right) + 2 \cdot {B}^{2}\right)}{C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{4}, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \left(-16 \cdot \left(A \cdot F\right) + 2 \cdot \frac{F \cdot \left(-4 \cdot \left(A \cdot \left(A + -1 \cdot A\right)\right) + 2 \cdot {B}^{2}\right)}{C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{4}, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \mathsf{+.f64}\left(\left(-16 \cdot \left(A \cdot F\right)\right), \left(2 \cdot \frac{F \cdot \left(-4 \cdot \left(A \cdot \left(A + -1 \cdot A\right)\right) + 2 \cdot {B}^{2}\right)}{C}\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, \color{blue}{A}\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, \left(A \cdot F\right)\right), \left(2 \cdot \frac{F \cdot \left(-4 \cdot \left(A \cdot \left(A + -1 \cdot A\right)\right) + 2 \cdot {B}^{2}\right)}{C}\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, F\right)\right), \left(2 \cdot \frac{F \cdot \left(-4 \cdot \left(A \cdot \left(A + -1 \cdot A\right)\right) + 2 \cdot {B}^{2}\right)}{C}\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      7. associate-*r/N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, F\right)\right), \left(\frac{2 \cdot \left(F \cdot \left(-4 \cdot \left(A \cdot \left(A + -1 \cdot A\right)\right) + 2 \cdot {B}^{2}\right)\right)}{C}\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, F\right)\right), \mathsf{/.f64}\left(\left(2 \cdot \left(F \cdot \left(-4 \cdot \left(A \cdot \left(A + -1 \cdot A\right)\right) + 2 \cdot {B}^{2}\right)\right)\right), C\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    7. Simplified10.3%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{\left(C \cdot \left(-16 \cdot \left(A \cdot \left(C \cdot F\right)\right) + 4 \cdot \left({B}^{2} \cdot F\right)\right)\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    9. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(C, \left(-16 \cdot \left(A \cdot \left(C \cdot F\right)\right) + 4 \cdot \left({B}^{2} \cdot F\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(C, \mathsf{+.f64}\left(\left(-16 \cdot \left(A \cdot \left(C \cdot F\right)\right)\right), \left(4 \cdot \left({B}^{2} \cdot F\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, \color{blue}{A}\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(C, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, \left(A \cdot \left(C \cdot F\right)\right)\right), \left(4 \cdot \left({B}^{2} \cdot F\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(C, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, \left(C \cdot F\right)\right)\right), \left(4 \cdot \left({B}^{2} \cdot F\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(C, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, \mathsf{*.f64}\left(C, F\right)\right)\right), \left(4 \cdot \left({B}^{2} \cdot F\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(C, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, \mathsf{*.f64}\left(C, F\right)\right)\right), \mathsf{*.f64}\left(4, \left({B}^{2} \cdot F\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(C, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, \mathsf{*.f64}\left(C, F\right)\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(\left({B}^{2}\right), F\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(C, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, \mathsf{*.f64}\left(C, F\right)\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(\left(B \cdot B\right), F\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      9. *-lowering-*.f6418.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(C, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, \mathsf{*.f64}\left(C, F\right)\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(\mathsf{*.f64}\left(B, B\right), F\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    10. Simplified18.0%

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

    if 6.00000000000000053e-116 < B < 1.80000000000000011e-4

    1. Initial program 14.9%

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

        \[\leadsto \mathsf{neg}\left(\frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\right) \]
      2. distribute-neg-frac2N/A

        \[\leadsto \frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{\color{blue}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\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), \color{blue}{\left(\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)\right)}\right) \]
    3. Simplified21.7%

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

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot \left(F \cdot 2\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right) \cdot 2\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{4}, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right) \cdot \left(2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. sqrt-prodN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F} \cdot \sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      6. pow1/2N/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)}^{\frac{1}{2}} \cdot \sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left({\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)}^{\frac{1}{2}}\right), \left(\sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right)\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    6. Applied egg-rr25.0%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\color{blue}{\left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)}\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    8. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\left(\frac{{B}^{2}}{A - C} + 4 \cdot A\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(\frac{{B}^{2}}{A - C}\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\left({B}^{2}\right), \left(A - C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(B \cdot B\right), \left(A - C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, B\right), \left(A - C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      6. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{\_.f64}\left(A, C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      7. *-lowering-*.f6420.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{\_.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(4, A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    9. Simplified20.4%

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

      \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(\sqrt{F \cdot \left(\left(-4 \cdot \left(A \cdot C\right) + {B}^{2}\right) \cdot \left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)\right)}\right)}, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    11. Step-by-step derivation
      1. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(F \cdot \left(\left(-4 \cdot \left(A \cdot C\right) + {B}^{2}\right) \cdot \left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)\right)\right)\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(\left(F \cdot \left(-4 \cdot \left(A \cdot C\right) + {B}^{2}\right)\right) \cdot \left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(F \cdot \left(-4 \cdot \left(A \cdot C\right) + {B}^{2}\right)\right), \left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(F, \left(-4 \cdot \left(A \cdot C\right) + {B}^{2}\right)\right), \left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{4}, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\left(-4 \cdot \left(A \cdot C\right)\right), \left({B}^{2}\right)\right)\right), \left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \left(A \cdot C\right)\right), \left({B}^{2}\right)\right)\right), \left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right), \left({B}^{2}\right)\right)\right), \left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right), \left(B \cdot B\right)\right)\right), \left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right), \left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right), \mathsf{+.f64}\left(\left(4 \cdot A\right), \left(\frac{{B}^{2}}{A - C}\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, \color{blue}{A}\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(4, A\right), \left(\frac{{B}^{2}}{A - C}\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(4, A\right), \mathsf{/.f64}\left(\left({B}^{2}\right), \left(A - C\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      13. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(4, A\right), \mathsf{/.f64}\left(\left(B \cdot B\right), \left(A - C\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(4, A\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(B, B\right), \left(A - C\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      15. --lowering--.f6431.1%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(4, A\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{\_.f64}\left(A, C\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    12. Simplified31.1%

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

    if 1.80000000000000011e-4 < B

    1. Initial program 15.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 B around inf

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

        \[\leadsto \mathsf{neg}\left(\sqrt{\frac{F}{B}} \cdot \sqrt{2}\right) \]
      2. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{\frac{F}{B}} \cdot \sqrt{2}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{\frac{F}{B}}\right), \left(\sqrt{2}\right)\right)\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{F}{B}\right)\right), \left(\sqrt{2}\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(F, B\right)\right), \left(\sqrt{2}\right)\right)\right) \]
      6. sqrt-lowering-sqrt.f6443.6%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(F, B\right)\right), \mathsf{sqrt.f64}\left(2\right)\right)\right) \]
    5. Simplified43.6%

      \[\leadsto \color{blue}{-\sqrt{\frac{F}{B}} \cdot \sqrt{2}} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot \sqrt{\frac{F}{B}}\right)\right) \]
      2. sqrt-divN/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot \frac{\sqrt{F}}{\sqrt{B}}\right)\right) \]
      3. pow1/2N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot \frac{{F}^{\frac{1}{2}}}{\sqrt{B}}\right)\right) \]
      4. associate-*r/N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{\sqrt{2} \cdot {F}^{\frac{1}{2}}}{\sqrt{B}}\right)\right) \]
      5. pow1/2N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{{2}^{\frac{1}{2}} \cdot {F}^{\frac{1}{2}}}{\sqrt{B}}\right)\right) \]
      6. unpow-prod-downN/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{{\left(2 \cdot F\right)}^{\frac{1}{2}}}{\sqrt{B}}\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left({\left(2 \cdot F\right)}^{\frac{1}{2}}\right), \left(\sqrt{B}\right)\right)\right) \]
      8. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(2 \cdot F\right), \frac{1}{2}\right), \left(\sqrt{B}\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(2, F\right), \frac{1}{2}\right), \left(\sqrt{B}\right)\right)\right) \]
      10. sqrt-lowering-sqrt.f6454.0%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(2, F\right), \frac{1}{2}\right), \mathsf{sqrt.f64}\left(B\right)\right)\right) \]
    7. Applied egg-rr54.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 6 \cdot 10^{-116}:\\ \;\;\;\;\frac{\sqrt{C \cdot \left(-16 \cdot \left(A \cdot \left(C \cdot F\right)\right) + 4 \cdot \left(F \cdot \left(B \cdot B\right)\right)\right)}}{\left(4 \cdot A\right) \cdot C - B \cdot B}\\ \mathbf{elif}\;B \leq 0.00018:\\ \;\;\;\;\frac{\sqrt{\left(F \cdot \left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right)\right) \cdot \left(4 \cdot A + \frac{B \cdot B}{A - C}\right)}}{\left(4 \cdot A\right) \cdot C - B \cdot B}\\ \mathbf{else}:\\ \;\;\;\;\frac{{\left(2 \cdot F\right)}^{0.5}}{0 - \sqrt{B}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 41.3% accurate, 2.9× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ \begin{array}{l} t_0 := \left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m\\ \mathbf{if}\;B\_m \leq 2.45 \cdot 10^{-115}:\\ \;\;\;\;\frac{\sqrt{C \cdot \left(-16 \cdot \left(A \cdot \left(C \cdot F\right)\right) + 4 \cdot \left(F \cdot \left(B\_m \cdot B\_m\right)\right)\right)}}{t\_0}\\ \mathbf{elif}\;B\_m \leq 0.000165:\\ \;\;\;\;\frac{\sqrt{\left(F \cdot \left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right)\right) \cdot \left(4 \cdot A + \frac{B\_m \cdot B\_m}{A - C}\right)}}{t\_0}\\ \mathbf{else}:\\ \;\;\;\;0 - \sqrt{F} \cdot \sqrt{\frac{2}{B\_m}}\\ \end{array} \end{array} \]
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
 :precision binary64
 (let* ((t_0 (- (* (* 4.0 A) C) (* B_m B_m))))
   (if (<= B_m 2.45e-115)
     (/ (sqrt (* C (+ (* -16.0 (* A (* C F))) (* 4.0 (* F (* B_m B_m)))))) t_0)
     (if (<= B_m 0.000165)
       (/
        (sqrt
         (*
          (* F (+ (* B_m B_m) (* -4.0 (* A C))))
          (+ (* 4.0 A) (/ (* B_m B_m) (- A C)))))
        t_0)
       (- 0.0 (* (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 = ((4.0 * A) * C) - (B_m * B_m);
	double tmp;
	if (B_m <= 2.45e-115) {
		tmp = sqrt((C * ((-16.0 * (A * (C * F))) + (4.0 * (F * (B_m * B_m)))))) / t_0;
	} else if (B_m <= 0.000165) {
		tmp = sqrt(((F * ((B_m * B_m) + (-4.0 * (A * C)))) * ((4.0 * A) + ((B_m * B_m) / (A - C))))) / t_0;
	} else {
		tmp = 0.0 - (sqrt(F) * sqrt((2.0 / 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) :: t_0
    real(8) :: tmp
    t_0 = ((4.0d0 * a) * c) - (b_m * b_m)
    if (b_m <= 2.45d-115) then
        tmp = sqrt((c * (((-16.0d0) * (a * (c * f))) + (4.0d0 * (f * (b_m * b_m)))))) / t_0
    else if (b_m <= 0.000165d0) then
        tmp = sqrt(((f * ((b_m * b_m) + ((-4.0d0) * (a * c)))) * ((4.0d0 * a) + ((b_m * b_m) / (a - c))))) / t_0
    else
        tmp = 0.0d0 - (sqrt(f) * sqrt((2.0d0 / 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 t_0 = ((4.0 * A) * C) - (B_m * B_m);
	double tmp;
	if (B_m <= 2.45e-115) {
		tmp = Math.sqrt((C * ((-16.0 * (A * (C * F))) + (4.0 * (F * (B_m * B_m)))))) / t_0;
	} else if (B_m <= 0.000165) {
		tmp = Math.sqrt(((F * ((B_m * B_m) + (-4.0 * (A * C)))) * ((4.0 * A) + ((B_m * B_m) / (A - C))))) / t_0;
	} else {
		tmp = 0.0 - (Math.sqrt(F) * Math.sqrt((2.0 / B_m)));
	}
	return tmp;
}
B_m = math.fabs(B)
def code(A, B_m, C, F):
	t_0 = ((4.0 * A) * C) - (B_m * B_m)
	tmp = 0
	if B_m <= 2.45e-115:
		tmp = math.sqrt((C * ((-16.0 * (A * (C * F))) + (4.0 * (F * (B_m * B_m)))))) / t_0
	elif B_m <= 0.000165:
		tmp = math.sqrt(((F * ((B_m * B_m) + (-4.0 * (A * C)))) * ((4.0 * A) + ((B_m * B_m) / (A - C))))) / t_0
	else:
		tmp = 0.0 - (math.sqrt(F) * math.sqrt((2.0 / B_m)))
	return tmp
B_m = abs(B)
function code(A, B_m, C, F)
	t_0 = Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m))
	tmp = 0.0
	if (B_m <= 2.45e-115)
		tmp = Float64(sqrt(Float64(C * Float64(Float64(-16.0 * Float64(A * Float64(C * F))) + Float64(4.0 * Float64(F * Float64(B_m * B_m)))))) / t_0);
	elseif (B_m <= 0.000165)
		tmp = Float64(sqrt(Float64(Float64(F * Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C)))) * Float64(Float64(4.0 * A) + Float64(Float64(B_m * B_m) / Float64(A - C))))) / t_0);
	else
		tmp = Float64(0.0 - Float64(sqrt(F) * sqrt(Float64(2.0 / B_m))));
	end
	return tmp
end
B_m = abs(B);
function tmp_2 = code(A, B_m, C, F)
	t_0 = ((4.0 * A) * C) - (B_m * B_m);
	tmp = 0.0;
	if (B_m <= 2.45e-115)
		tmp = sqrt((C * ((-16.0 * (A * (C * F))) + (4.0 * (F * (B_m * B_m)))))) / t_0;
	elseif (B_m <= 0.000165)
		tmp = sqrt(((F * ((B_m * B_m) + (-4.0 * (A * C)))) * ((4.0 * A) + ((B_m * B_m) / (A - C))))) / t_0;
	else
		tmp = 0.0 - (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_] := Block[{t$95$0 = N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B$95$m, 2.45e-115], N[(N[Sqrt[N[(C * N[(N[(-16.0 * N[(A * N[(C * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(F * N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[B$95$m, 0.000165], N[(N[Sqrt[N[(N[(F * N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(4.0 * A), $MachinePrecision] + N[(N[(B$95$m * B$95$m), $MachinePrecision] / N[(A - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], N[(0.0 - N[(N[Sqrt[F], $MachinePrecision] * N[Sqrt[N[(2.0 / B$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
B_m = \left|B\right|

\\
\begin{array}{l}
t_0 := \left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m\\
\mathbf{if}\;B\_m \leq 2.45 \cdot 10^{-115}:\\
\;\;\;\;\frac{\sqrt{C \cdot \left(-16 \cdot \left(A \cdot \left(C \cdot F\right)\right) + 4 \cdot \left(F \cdot \left(B\_m \cdot B\_m\right)\right)\right)}}{t\_0}\\

\mathbf{elif}\;B\_m \leq 0.000165:\\
\;\;\;\;\frac{\sqrt{\left(F \cdot \left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right)\right) \cdot \left(4 \cdot A + \frac{B\_m \cdot B\_m}{A - C}\right)}}{t\_0}\\

\mathbf{else}:\\
\;\;\;\;0 - \sqrt{F} \cdot \sqrt{\frac{2}{B\_m}}\\


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

    1. Initial program 19.3%

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

        \[\leadsto \mathsf{neg}\left(\frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\right) \]
      2. distribute-neg-frac2N/A

        \[\leadsto \frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{\color{blue}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\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), \color{blue}{\left(\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)\right)}\right) \]
    3. Simplified24.8%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{\left({C}^{2} \cdot \left(-16 \cdot \left(A \cdot F\right) + 2 \cdot \frac{F \cdot \left(-4 \cdot \left(A \cdot \left(A + -1 \cdot A\right)\right) + 2 \cdot {B}^{2}\right)}{C}\right)\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left({C}^{2}\right), \left(-16 \cdot \left(A \cdot F\right) + 2 \cdot \frac{F \cdot \left(-4 \cdot \left(A \cdot \left(A + -1 \cdot A\right)\right) + 2 \cdot {B}^{2}\right)}{C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(C \cdot C\right), \left(-16 \cdot \left(A \cdot F\right) + 2 \cdot \frac{F \cdot \left(-4 \cdot \left(A \cdot \left(A + -1 \cdot A\right)\right) + 2 \cdot {B}^{2}\right)}{C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{4}, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \left(-16 \cdot \left(A \cdot F\right) + 2 \cdot \frac{F \cdot \left(-4 \cdot \left(A \cdot \left(A + -1 \cdot A\right)\right) + 2 \cdot {B}^{2}\right)}{C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{4}, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \mathsf{+.f64}\left(\left(-16 \cdot \left(A \cdot F\right)\right), \left(2 \cdot \frac{F \cdot \left(-4 \cdot \left(A \cdot \left(A + -1 \cdot A\right)\right) + 2 \cdot {B}^{2}\right)}{C}\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, \color{blue}{A}\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, \left(A \cdot F\right)\right), \left(2 \cdot \frac{F \cdot \left(-4 \cdot \left(A \cdot \left(A + -1 \cdot A\right)\right) + 2 \cdot {B}^{2}\right)}{C}\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, F\right)\right), \left(2 \cdot \frac{F \cdot \left(-4 \cdot \left(A \cdot \left(A + -1 \cdot A\right)\right) + 2 \cdot {B}^{2}\right)}{C}\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      7. associate-*r/N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, F\right)\right), \left(\frac{2 \cdot \left(F \cdot \left(-4 \cdot \left(A \cdot \left(A + -1 \cdot A\right)\right) + 2 \cdot {B}^{2}\right)\right)}{C}\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, F\right)\right), \mathsf{/.f64}\left(\left(2 \cdot \left(F \cdot \left(-4 \cdot \left(A \cdot \left(A + -1 \cdot A\right)\right) + 2 \cdot {B}^{2}\right)\right)\right), C\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    7. Simplified10.3%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{\left(C \cdot \left(-16 \cdot \left(A \cdot \left(C \cdot F\right)\right) + 4 \cdot \left({B}^{2} \cdot F\right)\right)\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    9. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(C, \left(-16 \cdot \left(A \cdot \left(C \cdot F\right)\right) + 4 \cdot \left({B}^{2} \cdot F\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(C, \mathsf{+.f64}\left(\left(-16 \cdot \left(A \cdot \left(C \cdot F\right)\right)\right), \left(4 \cdot \left({B}^{2} \cdot F\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, \color{blue}{A}\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(C, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, \left(A \cdot \left(C \cdot F\right)\right)\right), \left(4 \cdot \left({B}^{2} \cdot F\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(C, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, \left(C \cdot F\right)\right)\right), \left(4 \cdot \left({B}^{2} \cdot F\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(C, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, \mathsf{*.f64}\left(C, F\right)\right)\right), \left(4 \cdot \left({B}^{2} \cdot F\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(C, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, \mathsf{*.f64}\left(C, F\right)\right)\right), \mathsf{*.f64}\left(4, \left({B}^{2} \cdot F\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(C, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, \mathsf{*.f64}\left(C, F\right)\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(\left({B}^{2}\right), F\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(C, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, \mathsf{*.f64}\left(C, F\right)\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(\left(B \cdot B\right), F\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      9. *-lowering-*.f6418.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(C, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, \mathsf{*.f64}\left(C, F\right)\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(\mathsf{*.f64}\left(B, B\right), F\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    10. Simplified18.0%

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

    if 2.44999999999999994e-115 < B < 1.65e-4

    1. Initial program 14.9%

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

        \[\leadsto \mathsf{neg}\left(\frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\right) \]
      2. distribute-neg-frac2N/A

        \[\leadsto \frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{\color{blue}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\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), \color{blue}{\left(\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)\right)}\right) \]
    3. Simplified21.7%

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

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot \left(F \cdot 2\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right) \cdot 2\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{4}, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right) \cdot \left(2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. sqrt-prodN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F} \cdot \sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      6. pow1/2N/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)}^{\frac{1}{2}} \cdot \sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left({\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)}^{\frac{1}{2}}\right), \left(\sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right)\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    6. Applied egg-rr25.0%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\color{blue}{\left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)}\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    8. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\left(\frac{{B}^{2}}{A - C} + 4 \cdot A\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(\frac{{B}^{2}}{A - C}\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\left({B}^{2}\right), \left(A - C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(B \cdot B\right), \left(A - C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, B\right), \left(A - C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      6. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{\_.f64}\left(A, C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      7. *-lowering-*.f6420.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{\_.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(4, A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    9. Simplified20.4%

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

      \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(\sqrt{F \cdot \left(\left(-4 \cdot \left(A \cdot C\right) + {B}^{2}\right) \cdot \left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)\right)}\right)}, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    11. Step-by-step derivation
      1. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(F \cdot \left(\left(-4 \cdot \left(A \cdot C\right) + {B}^{2}\right) \cdot \left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)\right)\right)\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(\left(F \cdot \left(-4 \cdot \left(A \cdot C\right) + {B}^{2}\right)\right) \cdot \left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(F \cdot \left(-4 \cdot \left(A \cdot C\right) + {B}^{2}\right)\right), \left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(F, \left(-4 \cdot \left(A \cdot C\right) + {B}^{2}\right)\right), \left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{4}, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\left(-4 \cdot \left(A \cdot C\right)\right), \left({B}^{2}\right)\right)\right), \left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \left(A \cdot C\right)\right), \left({B}^{2}\right)\right)\right), \left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right), \left({B}^{2}\right)\right)\right), \left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right), \left(B \cdot B\right)\right)\right), \left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right), \left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right), \mathsf{+.f64}\left(\left(4 \cdot A\right), \left(\frac{{B}^{2}}{A - C}\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, \color{blue}{A}\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(4, A\right), \left(\frac{{B}^{2}}{A - C}\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(4, A\right), \mathsf{/.f64}\left(\left({B}^{2}\right), \left(A - C\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      13. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(4, A\right), \mathsf{/.f64}\left(\left(B \cdot B\right), \left(A - C\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(4, A\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(B, B\right), \left(A - C\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      15. --lowering--.f6431.1%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(4, A\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{\_.f64}\left(A, C\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    12. Simplified31.1%

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

    if 1.65e-4 < B

    1. Initial program 15.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 B around inf

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

        \[\leadsto \mathsf{neg}\left(\sqrt{\frac{F}{B}} \cdot \sqrt{2}\right) \]
      2. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{\frac{F}{B}} \cdot \sqrt{2}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{\frac{F}{B}}\right), \left(\sqrt{2}\right)\right)\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{F}{B}\right)\right), \left(\sqrt{2}\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(F, B\right)\right), \left(\sqrt{2}\right)\right)\right) \]
      6. sqrt-lowering-sqrt.f6443.6%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(F, B\right)\right), \mathsf{sqrt.f64}\left(2\right)\right)\right) \]
    5. Simplified43.6%

      \[\leadsto \color{blue}{-\sqrt{\frac{F}{B}} \cdot \sqrt{2}} \]
    6. Step-by-step derivation
      1. sqrt-unprodN/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{\frac{F}{B} \cdot 2}\right)\right) \]
      2. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{F}{B} \cdot 2\right)\right)\right) \]
      3. clear-numN/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1}{\frac{B}{F}} \cdot 2\right)\right)\right) \]
      4. associate-*l/N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1 \cdot 2}{\frac{B}{F}}\right)\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{2}{\frac{B}{F}}\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(2, \left(\frac{B}{F}\right)\right)\right)\right) \]
      7. /-lowering-/.f6443.7%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(2, \mathsf{/.f64}\left(B, F\right)\right)\right)\right) \]
    7. Applied egg-rr43.7%

      \[\leadsto -\color{blue}{\sqrt{\frac{2}{\frac{B}{F}}}} \]
    8. Step-by-step derivation
      1. associate-/r/N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{\frac{2}{B} \cdot F}\right)\right) \]
      2. sqrt-prodN/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{\frac{2}{B}} \cdot \sqrt{F}\right)\right) \]
      3. pow1/2N/A

        \[\leadsto \mathsf{neg.f64}\left(\left({\left(\frac{2}{B}\right)}^{\frac{1}{2}} \cdot \sqrt{F}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\left({\left(\frac{2}{B}\right)}^{\frac{1}{2}}\right), \left(\sqrt{F}\right)\right)\right) \]
      5. pow1/2N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{\frac{2}{B}}\right), \left(\sqrt{F}\right)\right)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{2}{B}\right)\right), \left(\sqrt{F}\right)\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(2, B\right)\right), \left(\sqrt{F}\right)\right)\right) \]
      8. sqrt-lowering-sqrt.f6453.8%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(2, B\right)\right), \mathsf{sqrt.f64}\left(F\right)\right)\right) \]
    9. Applied egg-rr53.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 2.45 \cdot 10^{-115}:\\ \;\;\;\;\frac{\sqrt{C \cdot \left(-16 \cdot \left(A \cdot \left(C \cdot F\right)\right) + 4 \cdot \left(F \cdot \left(B \cdot B\right)\right)\right)}}{\left(4 \cdot A\right) \cdot C - B \cdot B}\\ \mathbf{elif}\;B \leq 0.000165:\\ \;\;\;\;\frac{\sqrt{\left(F \cdot \left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right)\right) \cdot \left(4 \cdot A + \frac{B \cdot B}{A - C}\right)}}{\left(4 \cdot A\right) \cdot C - B \cdot B}\\ \mathbf{else}:\\ \;\;\;\;0 - \sqrt{F} \cdot \sqrt{\frac{2}{B}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 33.9% accurate, 4.4× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ \begin{array}{l} t_0 := \left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m\\ \mathbf{if}\;B\_m \leq 1.78 \cdot 10^{-115}:\\ \;\;\;\;\frac{\sqrt{C \cdot \left(-16 \cdot \left(A \cdot \left(C \cdot F\right)\right) + 4 \cdot \left(F \cdot \left(B\_m \cdot B\_m\right)\right)\right)}}{t\_0}\\ \mathbf{elif}\;B\_m \leq 0.000135:\\ \;\;\;\;\frac{\sqrt{\left(F \cdot \left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right)\right) \cdot \left(4 \cdot A + \frac{B\_m \cdot B\_m}{A - C}\right)}}{t\_0}\\ \mathbf{else}:\\ \;\;\;\;0 - \sqrt{2 \cdot \frac{F}{B\_m}}\\ \end{array} \end{array} \]
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
 :precision binary64
 (let* ((t_0 (- (* (* 4.0 A) C) (* B_m B_m))))
   (if (<= B_m 1.78e-115)
     (/ (sqrt (* C (+ (* -16.0 (* A (* C F))) (* 4.0 (* F (* B_m B_m)))))) t_0)
     (if (<= B_m 0.000135)
       (/
        (sqrt
         (*
          (* F (+ (* B_m B_m) (* -4.0 (* A C))))
          (+ (* 4.0 A) (/ (* B_m B_m) (- A C)))))
        t_0)
       (- 0.0 (sqrt (* 2.0 (/ F B_m))))))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
	double t_0 = ((4.0 * A) * C) - (B_m * B_m);
	double tmp;
	if (B_m <= 1.78e-115) {
		tmp = sqrt((C * ((-16.0 * (A * (C * F))) + (4.0 * (F * (B_m * B_m)))))) / t_0;
	} else if (B_m <= 0.000135) {
		tmp = sqrt(((F * ((B_m * B_m) + (-4.0 * (A * C)))) * ((4.0 * A) + ((B_m * B_m) / (A - C))))) / t_0;
	} else {
		tmp = 0.0 - sqrt((2.0 * (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) :: t_0
    real(8) :: tmp
    t_0 = ((4.0d0 * a) * c) - (b_m * b_m)
    if (b_m <= 1.78d-115) then
        tmp = sqrt((c * (((-16.0d0) * (a * (c * f))) + (4.0d0 * (f * (b_m * b_m)))))) / t_0
    else if (b_m <= 0.000135d0) then
        tmp = sqrt(((f * ((b_m * b_m) + ((-4.0d0) * (a * c)))) * ((4.0d0 * a) + ((b_m * b_m) / (a - c))))) / t_0
    else
        tmp = 0.0d0 - sqrt((2.0d0 * (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 t_0 = ((4.0 * A) * C) - (B_m * B_m);
	double tmp;
	if (B_m <= 1.78e-115) {
		tmp = Math.sqrt((C * ((-16.0 * (A * (C * F))) + (4.0 * (F * (B_m * B_m)))))) / t_0;
	} else if (B_m <= 0.000135) {
		tmp = Math.sqrt(((F * ((B_m * B_m) + (-4.0 * (A * C)))) * ((4.0 * A) + ((B_m * B_m) / (A - C))))) / t_0;
	} else {
		tmp = 0.0 - Math.sqrt((2.0 * (F / B_m)));
	}
	return tmp;
}
B_m = math.fabs(B)
def code(A, B_m, C, F):
	t_0 = ((4.0 * A) * C) - (B_m * B_m)
	tmp = 0
	if B_m <= 1.78e-115:
		tmp = math.sqrt((C * ((-16.0 * (A * (C * F))) + (4.0 * (F * (B_m * B_m)))))) / t_0
	elif B_m <= 0.000135:
		tmp = math.sqrt(((F * ((B_m * B_m) + (-4.0 * (A * C)))) * ((4.0 * A) + ((B_m * B_m) / (A - C))))) / t_0
	else:
		tmp = 0.0 - math.sqrt((2.0 * (F / B_m)))
	return tmp
B_m = abs(B)
function code(A, B_m, C, F)
	t_0 = Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m))
	tmp = 0.0
	if (B_m <= 1.78e-115)
		tmp = Float64(sqrt(Float64(C * Float64(Float64(-16.0 * Float64(A * Float64(C * F))) + Float64(4.0 * Float64(F * Float64(B_m * B_m)))))) / t_0);
	elseif (B_m <= 0.000135)
		tmp = Float64(sqrt(Float64(Float64(F * Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C)))) * Float64(Float64(4.0 * A) + Float64(Float64(B_m * B_m) / Float64(A - C))))) / t_0);
	else
		tmp = Float64(0.0 - sqrt(Float64(2.0 * Float64(F / B_m))));
	end
	return tmp
end
B_m = abs(B);
function tmp_2 = code(A, B_m, C, F)
	t_0 = ((4.0 * A) * C) - (B_m * B_m);
	tmp = 0.0;
	if (B_m <= 1.78e-115)
		tmp = sqrt((C * ((-16.0 * (A * (C * F))) + (4.0 * (F * (B_m * B_m)))))) / t_0;
	elseif (B_m <= 0.000135)
		tmp = sqrt(((F * ((B_m * B_m) + (-4.0 * (A * C)))) * ((4.0 * A) + ((B_m * B_m) / (A - C))))) / t_0;
	else
		tmp = 0.0 - sqrt((2.0 * (F / B_m)));
	end
	tmp_2 = tmp;
end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B$95$m, 1.78e-115], N[(N[Sqrt[N[(C * N[(N[(-16.0 * N[(A * N[(C * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(F * N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[B$95$m, 0.000135], N[(N[Sqrt[N[(N[(F * N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(4.0 * A), $MachinePrecision] + N[(N[(B$95$m * B$95$m), $MachinePrecision] / N[(A - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], N[(0.0 - N[Sqrt[N[(2.0 * N[(F / B$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
B_m = \left|B\right|

\\
\begin{array}{l}
t_0 := \left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m\\
\mathbf{if}\;B\_m \leq 1.78 \cdot 10^{-115}:\\
\;\;\;\;\frac{\sqrt{C \cdot \left(-16 \cdot \left(A \cdot \left(C \cdot F\right)\right) + 4 \cdot \left(F \cdot \left(B\_m \cdot B\_m\right)\right)\right)}}{t\_0}\\

\mathbf{elif}\;B\_m \leq 0.000135:\\
\;\;\;\;\frac{\sqrt{\left(F \cdot \left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right)\right) \cdot \left(4 \cdot A + \frac{B\_m \cdot B\_m}{A - C}\right)}}{t\_0}\\

\mathbf{else}:\\
\;\;\;\;0 - \sqrt{2 \cdot \frac{F}{B\_m}}\\


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

    1. Initial program 19.3%

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

        \[\leadsto \mathsf{neg}\left(\frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\right) \]
      2. distribute-neg-frac2N/A

        \[\leadsto \frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{\color{blue}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\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), \color{blue}{\left(\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)\right)}\right) \]
    3. Simplified24.8%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{\left({C}^{2} \cdot \left(-16 \cdot \left(A \cdot F\right) + 2 \cdot \frac{F \cdot \left(-4 \cdot \left(A \cdot \left(A + -1 \cdot A\right)\right) + 2 \cdot {B}^{2}\right)}{C}\right)\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left({C}^{2}\right), \left(-16 \cdot \left(A \cdot F\right) + 2 \cdot \frac{F \cdot \left(-4 \cdot \left(A \cdot \left(A + -1 \cdot A\right)\right) + 2 \cdot {B}^{2}\right)}{C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(C \cdot C\right), \left(-16 \cdot \left(A \cdot F\right) + 2 \cdot \frac{F \cdot \left(-4 \cdot \left(A \cdot \left(A + -1 \cdot A\right)\right) + 2 \cdot {B}^{2}\right)}{C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{4}, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \left(-16 \cdot \left(A \cdot F\right) + 2 \cdot \frac{F \cdot \left(-4 \cdot \left(A \cdot \left(A + -1 \cdot A\right)\right) + 2 \cdot {B}^{2}\right)}{C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{4}, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \mathsf{+.f64}\left(\left(-16 \cdot \left(A \cdot F\right)\right), \left(2 \cdot \frac{F \cdot \left(-4 \cdot \left(A \cdot \left(A + -1 \cdot A\right)\right) + 2 \cdot {B}^{2}\right)}{C}\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, \color{blue}{A}\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, \left(A \cdot F\right)\right), \left(2 \cdot \frac{F \cdot \left(-4 \cdot \left(A \cdot \left(A + -1 \cdot A\right)\right) + 2 \cdot {B}^{2}\right)}{C}\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, F\right)\right), \left(2 \cdot \frac{F \cdot \left(-4 \cdot \left(A \cdot \left(A + -1 \cdot A\right)\right) + 2 \cdot {B}^{2}\right)}{C}\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      7. associate-*r/N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, F\right)\right), \left(\frac{2 \cdot \left(F \cdot \left(-4 \cdot \left(A \cdot \left(A + -1 \cdot A\right)\right) + 2 \cdot {B}^{2}\right)\right)}{C}\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, F\right)\right), \mathsf{/.f64}\left(\left(2 \cdot \left(F \cdot \left(-4 \cdot \left(A \cdot \left(A + -1 \cdot A\right)\right) + 2 \cdot {B}^{2}\right)\right)\right), C\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    7. Simplified10.3%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{\left(C \cdot \left(-16 \cdot \left(A \cdot \left(C \cdot F\right)\right) + 4 \cdot \left({B}^{2} \cdot F\right)\right)\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    9. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(C, \left(-16 \cdot \left(A \cdot \left(C \cdot F\right)\right) + 4 \cdot \left({B}^{2} \cdot F\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(C, \mathsf{+.f64}\left(\left(-16 \cdot \left(A \cdot \left(C \cdot F\right)\right)\right), \left(4 \cdot \left({B}^{2} \cdot F\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, \color{blue}{A}\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(C, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, \left(A \cdot \left(C \cdot F\right)\right)\right), \left(4 \cdot \left({B}^{2} \cdot F\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(C, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, \left(C \cdot F\right)\right)\right), \left(4 \cdot \left({B}^{2} \cdot F\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(C, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, \mathsf{*.f64}\left(C, F\right)\right)\right), \left(4 \cdot \left({B}^{2} \cdot F\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(C, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, \mathsf{*.f64}\left(C, F\right)\right)\right), \mathsf{*.f64}\left(4, \left({B}^{2} \cdot F\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(C, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, \mathsf{*.f64}\left(C, F\right)\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(\left({B}^{2}\right), F\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(C, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, \mathsf{*.f64}\left(C, F\right)\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(\left(B \cdot B\right), F\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      9. *-lowering-*.f6418.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(C, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, \mathsf{*.f64}\left(C, F\right)\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(\mathsf{*.f64}\left(B, B\right), F\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    10. Simplified18.0%

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

    if 1.78000000000000006e-115 < B < 1.35000000000000002e-4

    1. Initial program 14.9%

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

        \[\leadsto \mathsf{neg}\left(\frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\right) \]
      2. distribute-neg-frac2N/A

        \[\leadsto \frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{\color{blue}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\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), \color{blue}{\left(\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)\right)}\right) \]
    3. Simplified21.7%

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

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot \left(F \cdot 2\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right) \cdot 2\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{4}, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right) \cdot \left(2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. sqrt-prodN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F} \cdot \sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      6. pow1/2N/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)}^{\frac{1}{2}} \cdot \sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left({\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)}^{\frac{1}{2}}\right), \left(\sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right)\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    6. Applied egg-rr25.0%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\color{blue}{\left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)}\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    8. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\left(\frac{{B}^{2}}{A - C} + 4 \cdot A\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(\frac{{B}^{2}}{A - C}\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\left({B}^{2}\right), \left(A - C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(B \cdot B\right), \left(A - C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, B\right), \left(A - C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      6. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{\_.f64}\left(A, C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      7. *-lowering-*.f6420.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{\_.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(4, A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    9. Simplified20.4%

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

      \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(\sqrt{F \cdot \left(\left(-4 \cdot \left(A \cdot C\right) + {B}^{2}\right) \cdot \left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)\right)}\right)}, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    11. Step-by-step derivation
      1. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(F \cdot \left(\left(-4 \cdot \left(A \cdot C\right) + {B}^{2}\right) \cdot \left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)\right)\right)\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(\left(F \cdot \left(-4 \cdot \left(A \cdot C\right) + {B}^{2}\right)\right) \cdot \left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(F \cdot \left(-4 \cdot \left(A \cdot C\right) + {B}^{2}\right)\right), \left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(F, \left(-4 \cdot \left(A \cdot C\right) + {B}^{2}\right)\right), \left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{4}, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\left(-4 \cdot \left(A \cdot C\right)\right), \left({B}^{2}\right)\right)\right), \left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \left(A \cdot C\right)\right), \left({B}^{2}\right)\right)\right), \left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right), \left({B}^{2}\right)\right)\right), \left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right), \left(B \cdot B\right)\right)\right), \left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right), \left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right), \mathsf{+.f64}\left(\left(4 \cdot A\right), \left(\frac{{B}^{2}}{A - C}\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, \color{blue}{A}\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(4, A\right), \left(\frac{{B}^{2}}{A - C}\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(4, A\right), \mathsf{/.f64}\left(\left({B}^{2}\right), \left(A - C\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      13. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(4, A\right), \mathsf{/.f64}\left(\left(B \cdot B\right), \left(A - C\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(4, A\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(B, B\right), \left(A - C\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      15. --lowering--.f6431.1%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(4, A\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{\_.f64}\left(A, C\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    12. Simplified31.1%

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

    if 1.35000000000000002e-4 < B

    1. Initial program 15.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 B around inf

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

        \[\leadsto \mathsf{neg}\left(\sqrt{\frac{F}{B}} \cdot \sqrt{2}\right) \]
      2. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{\frac{F}{B}} \cdot \sqrt{2}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{\frac{F}{B}}\right), \left(\sqrt{2}\right)\right)\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{F}{B}\right)\right), \left(\sqrt{2}\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(F, B\right)\right), \left(\sqrt{2}\right)\right)\right) \]
      6. sqrt-lowering-sqrt.f6443.6%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(F, B\right)\right), \mathsf{sqrt.f64}\left(2\right)\right)\right) \]
    5. Simplified43.6%

      \[\leadsto \color{blue}{-\sqrt{\frac{F}{B}} \cdot \sqrt{2}} \]
    6. Step-by-step derivation
      1. sqrt-unprodN/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{\frac{F}{B} \cdot 2}\right)\right) \]
      2. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{F}{B} \cdot 2\right)\right)\right) \]
      3. clear-numN/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1}{\frac{B}{F}} \cdot 2\right)\right)\right) \]
      4. associate-*l/N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1 \cdot 2}{\frac{B}{F}}\right)\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{2}{\frac{B}{F}}\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(2, \left(\frac{B}{F}\right)\right)\right)\right) \]
      7. /-lowering-/.f6443.7%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(2, \mathsf{/.f64}\left(B, F\right)\right)\right)\right) \]
    7. Applied egg-rr43.7%

      \[\leadsto -\color{blue}{\sqrt{\frac{2}{\frac{B}{F}}}} \]
    8. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1}{\frac{\frac{B}{F}}{2}}\right)\right)\right) \]
      2. associate-/r/N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1}{\frac{B}{F}} \cdot 2\right)\right)\right) \]
      3. clear-numN/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{F}{B} \cdot 2\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(\frac{F}{B}\right), 2\right)\right)\right) \]
      5. /-lowering-/.f6443.8%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(F, B\right), 2\right)\right)\right) \]
    9. Applied egg-rr43.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 1.78 \cdot 10^{-115}:\\ \;\;\;\;\frac{\sqrt{C \cdot \left(-16 \cdot \left(A \cdot \left(C \cdot F\right)\right) + 4 \cdot \left(F \cdot \left(B \cdot B\right)\right)\right)}}{\left(4 \cdot A\right) \cdot C - B \cdot B}\\ \mathbf{elif}\;B \leq 0.000135:\\ \;\;\;\;\frac{\sqrt{\left(F \cdot \left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right)\right) \cdot \left(4 \cdot A + \frac{B \cdot B}{A - C}\right)}}{\left(4 \cdot A\right) \cdot C - B \cdot B}\\ \mathbf{else}:\\ \;\;\;\;0 - \sqrt{2 \cdot \frac{F}{B}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 34.7% accurate, 4.7× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ \begin{array}{l} \mathbf{if}\;C \leq -1.05 \cdot 10^{+211}:\\ \;\;\;\;0 - \sqrt{\frac{F}{A - C}}\\ \mathbf{elif}\;C \leq 6.5 \cdot 10^{-35}:\\ \;\;\;\;0 - \sqrt{2 \cdot \frac{F}{B\_m}}\\ \mathbf{else}:\\ \;\;\;\;\frac{C}{4 \cdot \left(A \cdot C\right) - B\_m \cdot B\_m} \cdot \sqrt{F \cdot \left(A \cdot -16 + 4 \cdot \frac{B\_m \cdot B\_m}{C}\right)}\\ \end{array} \end{array} \]
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
 :precision binary64
 (if (<= C -1.05e+211)
   (- 0.0 (sqrt (/ F (- A C))))
   (if (<= C 6.5e-35)
     (- 0.0 (sqrt (* 2.0 (/ F B_m))))
     (*
      (/ C (- (* 4.0 (* A C)) (* B_m B_m)))
      (sqrt (* F (+ (* A -16.0) (* 4.0 (/ (* B_m B_m) C)))))))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
	double tmp;
	if (C <= -1.05e+211) {
		tmp = 0.0 - sqrt((F / (A - C)));
	} else if (C <= 6.5e-35) {
		tmp = 0.0 - sqrt((2.0 * (F / B_m)));
	} else {
		tmp = (C / ((4.0 * (A * C)) - (B_m * B_m))) * sqrt((F * ((A * -16.0) + (4.0 * ((B_m * B_m) / C)))));
	}
	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 <= (-1.05d+211)) then
        tmp = 0.0d0 - sqrt((f / (a - c)))
    else if (c <= 6.5d-35) then
        tmp = 0.0d0 - sqrt((2.0d0 * (f / b_m)))
    else
        tmp = (c / ((4.0d0 * (a * c)) - (b_m * b_m))) * sqrt((f * ((a * (-16.0d0)) + (4.0d0 * ((b_m * b_m) / c)))))
    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 <= -1.05e+211) {
		tmp = 0.0 - Math.sqrt((F / (A - C)));
	} else if (C <= 6.5e-35) {
		tmp = 0.0 - Math.sqrt((2.0 * (F / B_m)));
	} else {
		tmp = (C / ((4.0 * (A * C)) - (B_m * B_m))) * Math.sqrt((F * ((A * -16.0) + (4.0 * ((B_m * B_m) / C)))));
	}
	return tmp;
}
B_m = math.fabs(B)
def code(A, B_m, C, F):
	tmp = 0
	if C <= -1.05e+211:
		tmp = 0.0 - math.sqrt((F / (A - C)))
	elif C <= 6.5e-35:
		tmp = 0.0 - math.sqrt((2.0 * (F / B_m)))
	else:
		tmp = (C / ((4.0 * (A * C)) - (B_m * B_m))) * math.sqrt((F * ((A * -16.0) + (4.0 * ((B_m * B_m) / C)))))
	return tmp
B_m = abs(B)
function code(A, B_m, C, F)
	tmp = 0.0
	if (C <= -1.05e+211)
		tmp = Float64(0.0 - sqrt(Float64(F / Float64(A - C))));
	elseif (C <= 6.5e-35)
		tmp = Float64(0.0 - sqrt(Float64(2.0 * Float64(F / B_m))));
	else
		tmp = Float64(Float64(C / Float64(Float64(4.0 * Float64(A * C)) - Float64(B_m * B_m))) * sqrt(Float64(F * Float64(Float64(A * -16.0) + Float64(4.0 * Float64(Float64(B_m * B_m) / C))))));
	end
	return tmp
end
B_m = abs(B);
function tmp_2 = code(A, B_m, C, F)
	tmp = 0.0;
	if (C <= -1.05e+211)
		tmp = 0.0 - sqrt((F / (A - C)));
	elseif (C <= 6.5e-35)
		tmp = 0.0 - sqrt((2.0 * (F / B_m)));
	else
		tmp = (C / ((4.0 * (A * C)) - (B_m * B_m))) * sqrt((F * ((A * -16.0) + (4.0 * ((B_m * B_m) / C)))));
	end
	tmp_2 = tmp;
end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := If[LessEqual[C, -1.05e+211], N[(0.0 - N[Sqrt[N[(F / N[(A - C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 6.5e-35], N[(0.0 - N[Sqrt[N[(2.0 * N[(F / B$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(C / N[(N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(F * N[(N[(A * -16.0), $MachinePrecision] + N[(4.0 * N[(N[(B$95$m * B$95$m), $MachinePrecision] / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
B_m = \left|B\right|

\\
\begin{array}{l}
\mathbf{if}\;C \leq -1.05 \cdot 10^{+211}:\\
\;\;\;\;0 - \sqrt{\frac{F}{A - C}}\\

\mathbf{elif}\;C \leq 6.5 \cdot 10^{-35}:\\
\;\;\;\;0 - \sqrt{2 \cdot \frac{F}{B\_m}}\\

\mathbf{else}:\\
\;\;\;\;\frac{C}{4 \cdot \left(A \cdot C\right) - B\_m \cdot B\_m} \cdot \sqrt{F \cdot \left(A \cdot -16 + 4 \cdot \frac{B\_m \cdot B\_m}{C}\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if C < -1.05e211

    1. Initial program 0.8%

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

        \[\leadsto \mathsf{neg}\left(\frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\right) \]
      2. distribute-neg-frac2N/A

        \[\leadsto \frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{\color{blue}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\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), \color{blue}{\left(\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)\right)}\right) \]
    3. Simplified2.4%

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

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot \left(F \cdot 2\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right) \cdot 2\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{4}, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right) \cdot \left(2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. sqrt-prodN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F} \cdot \sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      6. pow1/2N/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)}^{\frac{1}{2}} \cdot \sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left({\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)}^{\frac{1}{2}}\right), \left(\sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right)\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    6. Applied egg-rr3.6%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\color{blue}{\left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)}\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    8. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\left(\frac{{B}^{2}}{A - C} + 4 \cdot A\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(\frac{{B}^{2}}{A - C}\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\left({B}^{2}\right), \left(A - C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(B \cdot B\right), \left(A - C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, B\right), \left(A - C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      6. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{\_.f64}\left(A, C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      7. *-lowering-*.f6431.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{\_.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(4, A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    9. Simplified31.9%

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

      \[\leadsto \color{blue}{-1 \cdot \sqrt{\frac{F}{A - C}}} \]
    11. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{neg}\left(\sqrt{\frac{F}{A - C}}\right) \]
      2. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{\frac{F}{A - C}}\right)\right) \]
      3. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{F}{A - C}\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(F, \left(A - C\right)\right)\right)\right) \]
      5. --lowering--.f6427.6%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(F, \mathsf{\_.f64}\left(A, C\right)\right)\right)\right) \]
    12. Simplified27.6%

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

    if -1.05e211 < C < 6.4999999999999999e-35

    1. Initial program 19.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 B around inf

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

        \[\leadsto \mathsf{neg}\left(\sqrt{\frac{F}{B}} \cdot \sqrt{2}\right) \]
      2. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{\frac{F}{B}} \cdot \sqrt{2}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{\frac{F}{B}}\right), \left(\sqrt{2}\right)\right)\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{F}{B}\right)\right), \left(\sqrt{2}\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(F, B\right)\right), \left(\sqrt{2}\right)\right)\right) \]
      6. sqrt-lowering-sqrt.f6415.1%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(F, B\right)\right), \mathsf{sqrt.f64}\left(2\right)\right)\right) \]
    5. Simplified15.1%

      \[\leadsto \color{blue}{-\sqrt{\frac{F}{B}} \cdot \sqrt{2}} \]
    6. Step-by-step derivation
      1. sqrt-unprodN/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{\frac{F}{B} \cdot 2}\right)\right) \]
      2. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{F}{B} \cdot 2\right)\right)\right) \]
      3. clear-numN/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1}{\frac{B}{F}} \cdot 2\right)\right)\right) \]
      4. associate-*l/N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1 \cdot 2}{\frac{B}{F}}\right)\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{2}{\frac{B}{F}}\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(2, \left(\frac{B}{F}\right)\right)\right)\right) \]
      7. /-lowering-/.f6415.2%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(2, \mathsf{/.f64}\left(B, F\right)\right)\right)\right) \]
    7. Applied egg-rr15.2%

      \[\leadsto -\color{blue}{\sqrt{\frac{2}{\frac{B}{F}}}} \]
    8. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1}{\frac{\frac{B}{F}}{2}}\right)\right)\right) \]
      2. associate-/r/N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1}{\frac{B}{F}} \cdot 2\right)\right)\right) \]
      3. clear-numN/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{F}{B} \cdot 2\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(\frac{F}{B}\right), 2\right)\right)\right) \]
      5. /-lowering-/.f6415.2%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(F, B\right), 2\right)\right)\right) \]
    9. Applied egg-rr15.2%

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

    if 6.4999999999999999e-35 < C

    1. Initial program 19.2%

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

        \[\leadsto \mathsf{neg}\left(\frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\right) \]
      2. distribute-neg-frac2N/A

        \[\leadsto \frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{\color{blue}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\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), \color{blue}{\left(\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)\right)}\right) \]
    3. Simplified30.4%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{\left({C}^{2} \cdot \left(-16 \cdot \left(A \cdot F\right) + 2 \cdot \frac{F \cdot \left(-4 \cdot \left(A \cdot \left(A + -1 \cdot A\right)\right) + 2 \cdot {B}^{2}\right)}{C}\right)\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left({C}^{2}\right), \left(-16 \cdot \left(A \cdot F\right) + 2 \cdot \frac{F \cdot \left(-4 \cdot \left(A \cdot \left(A + -1 \cdot A\right)\right) + 2 \cdot {B}^{2}\right)}{C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(C \cdot C\right), \left(-16 \cdot \left(A \cdot F\right) + 2 \cdot \frac{F \cdot \left(-4 \cdot \left(A \cdot \left(A + -1 \cdot A\right)\right) + 2 \cdot {B}^{2}\right)}{C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{4}, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \left(-16 \cdot \left(A \cdot F\right) + 2 \cdot \frac{F \cdot \left(-4 \cdot \left(A \cdot \left(A + -1 \cdot A\right)\right) + 2 \cdot {B}^{2}\right)}{C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{4}, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \mathsf{+.f64}\left(\left(-16 \cdot \left(A \cdot F\right)\right), \left(2 \cdot \frac{F \cdot \left(-4 \cdot \left(A \cdot \left(A + -1 \cdot A\right)\right) + 2 \cdot {B}^{2}\right)}{C}\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, \color{blue}{A}\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, \left(A \cdot F\right)\right), \left(2 \cdot \frac{F \cdot \left(-4 \cdot \left(A \cdot \left(A + -1 \cdot A\right)\right) + 2 \cdot {B}^{2}\right)}{C}\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, F\right)\right), \left(2 \cdot \frac{F \cdot \left(-4 \cdot \left(A \cdot \left(A + -1 \cdot A\right)\right) + 2 \cdot {B}^{2}\right)}{C}\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      7. associate-*r/N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, F\right)\right), \left(\frac{2 \cdot \left(F \cdot \left(-4 \cdot \left(A \cdot \left(A + -1 \cdot A\right)\right) + 2 \cdot {B}^{2}\right)\right)}{C}\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, F\right)\right), \mathsf{/.f64}\left(\left(2 \cdot \left(F \cdot \left(-4 \cdot \left(A \cdot \left(A + -1 \cdot A\right)\right) + 2 \cdot {B}^{2}\right)\right)\right), C\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    7. Simplified17.2%

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

      \[\leadsto \color{blue}{\frac{C}{4 \cdot \left(A \cdot C\right) - {B}^{2}} \cdot \sqrt{F \cdot \left(-16 \cdot A + 4 \cdot \frac{{B}^{2}}{C}\right)}} \]
    9. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{C}{4 \cdot \left(A \cdot C\right) - {B}^{2}}\right), \color{blue}{\left(\sqrt{F \cdot \left(-16 \cdot A + 4 \cdot \frac{{B}^{2}}{C}\right)}\right)}\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(C, \left(4 \cdot \left(A \cdot C\right) - {B}^{2}\right)\right), \left(\sqrt{\color{blue}{F \cdot \left(-16 \cdot A + 4 \cdot \frac{{B}^{2}}{C}\right)}}\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(C, \mathsf{\_.f64}\left(\left(4 \cdot \left(A \cdot C\right)\right), \left({B}^{2}\right)\right)\right), \left(\sqrt{F \cdot \color{blue}{\left(-16 \cdot A + 4 \cdot \frac{{B}^{2}}{C}\right)}}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(C, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(4, \left(A \cdot C\right)\right), \left({B}^{2}\right)\right)\right), \left(\sqrt{F \cdot \left(\color{blue}{-16 \cdot A} + 4 \cdot \frac{{B}^{2}}{C}\right)}\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(C, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(4, \mathsf{*.f64}\left(A, C\right)\right), \left({B}^{2}\right)\right)\right), \left(\sqrt{F \cdot \left(-16 \cdot \color{blue}{A} + 4 \cdot \frac{{B}^{2}}{C}\right)}\right)\right) \]
      6. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(C, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(4, \mathsf{*.f64}\left(A, C\right)\right), \left(B \cdot B\right)\right)\right), \left(\sqrt{F \cdot \left(-16 \cdot A + \color{blue}{4 \cdot \frac{{B}^{2}}{C}}\right)}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(C, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right), \left(\sqrt{F \cdot \left(-16 \cdot A + \color{blue}{4 \cdot \frac{{B}^{2}}{C}}\right)}\right)\right) \]
      8. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(C, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right), \mathsf{sqrt.f64}\left(\left(F \cdot \left(-16 \cdot A + 4 \cdot \frac{{B}^{2}}{C}\right)\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(C, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \left(-16 \cdot A + 4 \cdot \frac{{B}^{2}}{C}\right)\right)\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(C, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\left(-16 \cdot A\right), \left(4 \cdot \frac{{B}^{2}}{C}\right)\right)\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(C, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, A\right), \left(4 \cdot \frac{{B}^{2}}{C}\right)\right)\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(C, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, A\right), \mathsf{*.f64}\left(4, \left(\frac{{B}^{2}}{C}\right)\right)\right)\right)\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(C, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, A\right), \mathsf{*.f64}\left(4, \mathsf{/.f64}\left(\left({B}^{2}\right), C\right)\right)\right)\right)\right)\right) \]
      14. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(C, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, A\right), \mathsf{*.f64}\left(4, \mathsf{/.f64}\left(\left(B \cdot B\right), C\right)\right)\right)\right)\right)\right) \]
      15. *-lowering-*.f6435.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(C, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, A\right), \mathsf{*.f64}\left(4, \mathsf{/.f64}\left(\mathsf{*.f64}\left(B, B\right), C\right)\right)\right)\right)\right)\right) \]
    10. Simplified35.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -1.05 \cdot 10^{+211}:\\ \;\;\;\;0 - \sqrt{\frac{F}{A - C}}\\ \mathbf{elif}\;C \leq 6.5 \cdot 10^{-35}:\\ \;\;\;\;0 - \sqrt{2 \cdot \frac{F}{B}}\\ \mathbf{else}:\\ \;\;\;\;\frac{C}{4 \cdot \left(A \cdot C\right) - B \cdot B} \cdot \sqrt{F \cdot \left(A \cdot -16 + 4 \cdot \frac{B \cdot B}{C}\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 22: 33.2% accurate, 4.8× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ \begin{array}{l} \mathbf{if}\;B\_m \leq 3.3 \cdot 10^{-40}:\\ \;\;\;\;\frac{\sqrt{C \cdot \left(-16 \cdot \left(A \cdot \left(C \cdot F\right)\right) + 4 \cdot \left(F \cdot \left(B\_m \cdot B\_m\right)\right)\right)}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\ \mathbf{else}:\\ \;\;\;\;0 - \sqrt{2 \cdot \frac{F}{B\_m}}\\ \end{array} \end{array} \]
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
 :precision binary64
 (if (<= B_m 3.3e-40)
   (/
    (sqrt (* C (+ (* -16.0 (* A (* C F))) (* 4.0 (* F (* B_m B_m))))))
    (- (* (* 4.0 A) C) (* B_m B_m)))
   (- 0.0 (sqrt (* 2.0 (/ F B_m))))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
	double tmp;
	if (B_m <= 3.3e-40) {
		tmp = sqrt((C * ((-16.0 * (A * (C * F))) + (4.0 * (F * (B_m * B_m)))))) / (((4.0 * A) * C) - (B_m * B_m));
	} else {
		tmp = 0.0 - sqrt((2.0 * (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 <= 3.3d-40) then
        tmp = sqrt((c * (((-16.0d0) * (a * (c * f))) + (4.0d0 * (f * (b_m * b_m)))))) / (((4.0d0 * a) * c) - (b_m * b_m))
    else
        tmp = 0.0d0 - sqrt((2.0d0 * (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 <= 3.3e-40) {
		tmp = Math.sqrt((C * ((-16.0 * (A * (C * F))) + (4.0 * (F * (B_m * B_m)))))) / (((4.0 * A) * C) - (B_m * B_m));
	} else {
		tmp = 0.0 - Math.sqrt((2.0 * (F / B_m)));
	}
	return tmp;
}
B_m = math.fabs(B)
def code(A, B_m, C, F):
	tmp = 0
	if B_m <= 3.3e-40:
		tmp = math.sqrt((C * ((-16.0 * (A * (C * F))) + (4.0 * (F * (B_m * B_m)))))) / (((4.0 * A) * C) - (B_m * B_m))
	else:
		tmp = 0.0 - math.sqrt((2.0 * (F / B_m)))
	return tmp
B_m = abs(B)
function code(A, B_m, C, F)
	tmp = 0.0
	if (B_m <= 3.3e-40)
		tmp = Float64(sqrt(Float64(C * Float64(Float64(-16.0 * Float64(A * Float64(C * F))) + Float64(4.0 * Float64(F * Float64(B_m * B_m)))))) / Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m)));
	else
		tmp = Float64(0.0 - sqrt(Float64(2.0 * 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 <= 3.3e-40)
		tmp = sqrt((C * ((-16.0 * (A * (C * F))) + (4.0 * (F * (B_m * B_m)))))) / (((4.0 * A) * C) - (B_m * B_m));
	else
		tmp = 0.0 - sqrt((2.0 * (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, 3.3e-40], N[(N[Sqrt[N[(C * N[(N[(-16.0 * N[(A * N[(C * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(F * N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.0 - N[Sqrt[N[(2.0 * N[(F / B$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|

\\
\begin{array}{l}
\mathbf{if}\;B\_m \leq 3.3 \cdot 10^{-40}:\\
\;\;\;\;\frac{\sqrt{C \cdot \left(-16 \cdot \left(A \cdot \left(C \cdot F\right)\right) + 4 \cdot \left(F \cdot \left(B\_m \cdot B\_m\right)\right)\right)}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\

\mathbf{else}:\\
\;\;\;\;0 - \sqrt{2 \cdot \frac{F}{B\_m}}\\


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

    1. Initial program 18.5%

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

        \[\leadsto \mathsf{neg}\left(\frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\right) \]
      2. distribute-neg-frac2N/A

        \[\leadsto \frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{\color{blue}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\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), \color{blue}{\left(\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)\right)}\right) \]
    3. Simplified23.6%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{\left({C}^{2} \cdot \left(-16 \cdot \left(A \cdot F\right) + 2 \cdot \frac{F \cdot \left(-4 \cdot \left(A \cdot \left(A + -1 \cdot A\right)\right) + 2 \cdot {B}^{2}\right)}{C}\right)\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left({C}^{2}\right), \left(-16 \cdot \left(A \cdot F\right) + 2 \cdot \frac{F \cdot \left(-4 \cdot \left(A \cdot \left(A + -1 \cdot A\right)\right) + 2 \cdot {B}^{2}\right)}{C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(C \cdot C\right), \left(-16 \cdot \left(A \cdot F\right) + 2 \cdot \frac{F \cdot \left(-4 \cdot \left(A \cdot \left(A + -1 \cdot A\right)\right) + 2 \cdot {B}^{2}\right)}{C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{4}, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \left(-16 \cdot \left(A \cdot F\right) + 2 \cdot \frac{F \cdot \left(-4 \cdot \left(A \cdot \left(A + -1 \cdot A\right)\right) + 2 \cdot {B}^{2}\right)}{C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{4}, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \mathsf{+.f64}\left(\left(-16 \cdot \left(A \cdot F\right)\right), \left(2 \cdot \frac{F \cdot \left(-4 \cdot \left(A \cdot \left(A + -1 \cdot A\right)\right) + 2 \cdot {B}^{2}\right)}{C}\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, \color{blue}{A}\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, \left(A \cdot F\right)\right), \left(2 \cdot \frac{F \cdot \left(-4 \cdot \left(A \cdot \left(A + -1 \cdot A\right)\right) + 2 \cdot {B}^{2}\right)}{C}\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, F\right)\right), \left(2 \cdot \frac{F \cdot \left(-4 \cdot \left(A \cdot \left(A + -1 \cdot A\right)\right) + 2 \cdot {B}^{2}\right)}{C}\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      7. associate-*r/N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, F\right)\right), \left(\frac{2 \cdot \left(F \cdot \left(-4 \cdot \left(A \cdot \left(A + -1 \cdot A\right)\right) + 2 \cdot {B}^{2}\right)\right)}{C}\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, F\right)\right), \mathsf{/.f64}\left(\left(2 \cdot \left(F \cdot \left(-4 \cdot \left(A \cdot \left(A + -1 \cdot A\right)\right) + 2 \cdot {B}^{2}\right)\right)\right), C\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    7. Simplified10.5%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{\left(C \cdot \left(-16 \cdot \left(A \cdot \left(C \cdot F\right)\right) + 4 \cdot \left({B}^{2} \cdot F\right)\right)\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    9. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(C, \left(-16 \cdot \left(A \cdot \left(C \cdot F\right)\right) + 4 \cdot \left({B}^{2} \cdot F\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(C, \mathsf{+.f64}\left(\left(-16 \cdot \left(A \cdot \left(C \cdot F\right)\right)\right), \left(4 \cdot \left({B}^{2} \cdot F\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, \color{blue}{A}\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(C, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, \left(A \cdot \left(C \cdot F\right)\right)\right), \left(4 \cdot \left({B}^{2} \cdot F\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(C, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, \left(C \cdot F\right)\right)\right), \left(4 \cdot \left({B}^{2} \cdot F\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(C, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, \mathsf{*.f64}\left(C, F\right)\right)\right), \left(4 \cdot \left({B}^{2} \cdot F\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(C, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, \mathsf{*.f64}\left(C, F\right)\right)\right), \mathsf{*.f64}\left(4, \left({B}^{2} \cdot F\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(C, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, \mathsf{*.f64}\left(C, F\right)\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(\left({B}^{2}\right), F\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(C, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, \mathsf{*.f64}\left(C, F\right)\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(\left(B \cdot B\right), F\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      9. *-lowering-*.f6417.5%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(C, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, \mathsf{*.f64}\left(C, F\right)\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(\mathsf{*.f64}\left(B, B\right), F\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    10. Simplified17.5%

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

    if 3.29999999999999993e-40 < B

    1. Initial program 15.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 B around inf

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

        \[\leadsto \mathsf{neg}\left(\sqrt{\frac{F}{B}} \cdot \sqrt{2}\right) \]
      2. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{\frac{F}{B}} \cdot \sqrt{2}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{\frac{F}{B}}\right), \left(\sqrt{2}\right)\right)\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{F}{B}\right)\right), \left(\sqrt{2}\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(F, B\right)\right), \left(\sqrt{2}\right)\right)\right) \]
      6. sqrt-lowering-sqrt.f6439.1%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(F, B\right)\right), \mathsf{sqrt.f64}\left(2\right)\right)\right) \]
    5. Simplified39.1%

      \[\leadsto \color{blue}{-\sqrt{\frac{F}{B}} \cdot \sqrt{2}} \]
    6. Step-by-step derivation
      1. sqrt-unprodN/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{\frac{F}{B} \cdot 2}\right)\right) \]
      2. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{F}{B} \cdot 2\right)\right)\right) \]
      3. clear-numN/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1}{\frac{B}{F}} \cdot 2\right)\right)\right) \]
      4. associate-*l/N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1 \cdot 2}{\frac{B}{F}}\right)\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{2}{\frac{B}{F}}\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(2, \left(\frac{B}{F}\right)\right)\right)\right) \]
      7. /-lowering-/.f6439.2%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(2, \mathsf{/.f64}\left(B, F\right)\right)\right)\right) \]
    7. Applied egg-rr39.2%

      \[\leadsto -\color{blue}{\sqrt{\frac{2}{\frac{B}{F}}}} \]
    8. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1}{\frac{\frac{B}{F}}{2}}\right)\right)\right) \]
      2. associate-/r/N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1}{\frac{B}{F}} \cdot 2\right)\right)\right) \]
      3. clear-numN/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{F}{B} \cdot 2\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(\frac{F}{B}\right), 2\right)\right)\right) \]
      5. /-lowering-/.f6439.2%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(F, B\right), 2\right)\right)\right) \]
    9. Applied egg-rr39.2%

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

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

Alternative 23: 29.2% accurate, 5.1× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ \begin{array}{l} \mathbf{if}\;B\_m \leq 3.4 \cdot 10^{-8}:\\ \;\;\;\;\frac{\sqrt{\left(C \cdot F\right) \cdot \left(\left(A \cdot A\right) \cdot -16\right)}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\ \mathbf{else}:\\ \;\;\;\;0 - \sqrt{2 \cdot \frac{F}{B\_m}}\\ \end{array} \end{array} \]
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
 :precision binary64
 (if (<= B_m 3.4e-8)
   (/ (sqrt (* (* C F) (* (* A A) -16.0))) (- (* (* 4.0 A) C) (* B_m B_m)))
   (- 0.0 (sqrt (* 2.0 (/ F B_m))))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
	double tmp;
	if (B_m <= 3.4e-8) {
		tmp = sqrt(((C * F) * ((A * A) * -16.0))) / (((4.0 * A) * C) - (B_m * B_m));
	} else {
		tmp = 0.0 - sqrt((2.0 * (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 <= 3.4d-8) then
        tmp = sqrt(((c * f) * ((a * a) * (-16.0d0)))) / (((4.0d0 * a) * c) - (b_m * b_m))
    else
        tmp = 0.0d0 - sqrt((2.0d0 * (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 <= 3.4e-8) {
		tmp = Math.sqrt(((C * F) * ((A * A) * -16.0))) / (((4.0 * A) * C) - (B_m * B_m));
	} else {
		tmp = 0.0 - Math.sqrt((2.0 * (F / B_m)));
	}
	return tmp;
}
B_m = math.fabs(B)
def code(A, B_m, C, F):
	tmp = 0
	if B_m <= 3.4e-8:
		tmp = math.sqrt(((C * F) * ((A * A) * -16.0))) / (((4.0 * A) * C) - (B_m * B_m))
	else:
		tmp = 0.0 - math.sqrt((2.0 * (F / B_m)))
	return tmp
B_m = abs(B)
function code(A, B_m, C, F)
	tmp = 0.0
	if (B_m <= 3.4e-8)
		tmp = Float64(sqrt(Float64(Float64(C * F) * Float64(Float64(A * A) * -16.0))) / Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m)));
	else
		tmp = Float64(0.0 - sqrt(Float64(2.0 * 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 <= 3.4e-8)
		tmp = sqrt(((C * F) * ((A * A) * -16.0))) / (((4.0 * A) * C) - (B_m * B_m));
	else
		tmp = 0.0 - sqrt((2.0 * (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, 3.4e-8], N[(N[Sqrt[N[(N[(C * F), $MachinePrecision] * N[(N[(A * A), $MachinePrecision] * -16.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.0 - N[Sqrt[N[(2.0 * N[(F / B$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|

\\
\begin{array}{l}
\mathbf{if}\;B\_m \leq 3.4 \cdot 10^{-8}:\\
\;\;\;\;\frac{\sqrt{\left(C \cdot F\right) \cdot \left(\left(A \cdot A\right) \cdot -16\right)}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\

\mathbf{else}:\\
\;\;\;\;0 - \sqrt{2 \cdot \frac{F}{B\_m}}\\


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

    1. Initial program 18.8%

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

        \[\leadsto \mathsf{neg}\left(\frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\right) \]
      2. distribute-neg-frac2N/A

        \[\leadsto \frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{\color{blue}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\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), \color{blue}{\left(\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)\right)}\right) \]
    3. Simplified24.1%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{\left(-16 \cdot \left({A}^{2} \cdot \left(C \cdot F\right)\right)\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    6. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(\left(-16 \cdot {A}^{2}\right) \cdot \left(C \cdot F\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(-16 \cdot {A}^{2}\right), \left(C \cdot F\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-16, \left({A}^{2}\right)\right), \left(C \cdot F\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{4}, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-16, \left(A \cdot A\right)\right), \left(C \cdot F\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, A\right)\right), \left(C \cdot F\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      6. *-lowering-*.f6411.1%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, A\right)\right), \mathsf{*.f64}\left(C, F\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, \color{blue}{A}\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    7. Simplified11.1%

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

    if 3.4e-8 < B

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

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

        \[\leadsto \mathsf{neg}\left(\sqrt{\frac{F}{B}} \cdot \sqrt{2}\right) \]
      2. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{\frac{F}{B}} \cdot \sqrt{2}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{\frac{F}{B}}\right), \left(\sqrt{2}\right)\right)\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{F}{B}\right)\right), \left(\sqrt{2}\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(F, B\right)\right), \left(\sqrt{2}\right)\right)\right) \]
      6. sqrt-lowering-sqrt.f6442.4%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(F, B\right)\right), \mathsf{sqrt.f64}\left(2\right)\right)\right) \]
    5. Simplified42.4%

      \[\leadsto \color{blue}{-\sqrt{\frac{F}{B}} \cdot \sqrt{2}} \]
    6. Step-by-step derivation
      1. sqrt-unprodN/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{\frac{F}{B} \cdot 2}\right)\right) \]
      2. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{F}{B} \cdot 2\right)\right)\right) \]
      3. clear-numN/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1}{\frac{B}{F}} \cdot 2\right)\right)\right) \]
      4. associate-*l/N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1 \cdot 2}{\frac{B}{F}}\right)\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{2}{\frac{B}{F}}\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(2, \left(\frac{B}{F}\right)\right)\right)\right) \]
      7. /-lowering-/.f6442.5%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(2, \mathsf{/.f64}\left(B, F\right)\right)\right)\right) \]
    7. Applied egg-rr42.5%

      \[\leadsto -\color{blue}{\sqrt{\frac{2}{\frac{B}{F}}}} \]
    8. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1}{\frac{\frac{B}{F}}{2}}\right)\right)\right) \]
      2. associate-/r/N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1}{\frac{B}{F}} \cdot 2\right)\right)\right) \]
      3. clear-numN/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{F}{B} \cdot 2\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(\frac{F}{B}\right), 2\right)\right)\right) \]
      5. /-lowering-/.f6442.5%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(F, B\right), 2\right)\right)\right) \]
    9. Applied egg-rr42.5%

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

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

Alternative 24: 29.3% accurate, 5.3× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ \begin{array}{l} \mathbf{if}\;C \leq -1 \cdot 10^{+211}:\\ \;\;\;\;0 - \sqrt{\frac{F}{A - C}}\\ \mathbf{elif}\;C \leq 5.8 \cdot 10^{+119}:\\ \;\;\;\;0 - \sqrt{2 \cdot \frac{F}{B\_m}}\\ \mathbf{else}:\\ \;\;\;\;\left(-2 \cdot \frac{1}{B\_m}\right) \cdot \sqrt{C \cdot F}\\ \end{array} \end{array} \]
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
 :precision binary64
 (if (<= C -1e+211)
   (- 0.0 (sqrt (/ F (- A C))))
   (if (<= C 5.8e+119)
     (- 0.0 (sqrt (* 2.0 (/ F B_m))))
     (* (* -2.0 (/ 1.0 B_m)) (sqrt (* C F))))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
	double tmp;
	if (C <= -1e+211) {
		tmp = 0.0 - sqrt((F / (A - C)));
	} else if (C <= 5.8e+119) {
		tmp = 0.0 - sqrt((2.0 * (F / B_m)));
	} else {
		tmp = (-2.0 * (1.0 / B_m)) * sqrt((C * F));
	}
	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 <= (-1d+211)) then
        tmp = 0.0d0 - sqrt((f / (a - c)))
    else if (c <= 5.8d+119) then
        tmp = 0.0d0 - sqrt((2.0d0 * (f / b_m)))
    else
        tmp = ((-2.0d0) * (1.0d0 / b_m)) * sqrt((c * f))
    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 <= -1e+211) {
		tmp = 0.0 - Math.sqrt((F / (A - C)));
	} else if (C <= 5.8e+119) {
		tmp = 0.0 - Math.sqrt((2.0 * (F / B_m)));
	} else {
		tmp = (-2.0 * (1.0 / B_m)) * Math.sqrt((C * F));
	}
	return tmp;
}
B_m = math.fabs(B)
def code(A, B_m, C, F):
	tmp = 0
	if C <= -1e+211:
		tmp = 0.0 - math.sqrt((F / (A - C)))
	elif C <= 5.8e+119:
		tmp = 0.0 - math.sqrt((2.0 * (F / B_m)))
	else:
		tmp = (-2.0 * (1.0 / B_m)) * math.sqrt((C * F))
	return tmp
B_m = abs(B)
function code(A, B_m, C, F)
	tmp = 0.0
	if (C <= -1e+211)
		tmp = Float64(0.0 - sqrt(Float64(F / Float64(A - C))));
	elseif (C <= 5.8e+119)
		tmp = Float64(0.0 - sqrt(Float64(2.0 * Float64(F / B_m))));
	else
		tmp = Float64(Float64(-2.0 * Float64(1.0 / B_m)) * sqrt(Float64(C * F)));
	end
	return tmp
end
B_m = abs(B);
function tmp_2 = code(A, B_m, C, F)
	tmp = 0.0;
	if (C <= -1e+211)
		tmp = 0.0 - sqrt((F / (A - C)));
	elseif (C <= 5.8e+119)
		tmp = 0.0 - sqrt((2.0 * (F / B_m)));
	else
		tmp = (-2.0 * (1.0 / B_m)) * sqrt((C * F));
	end
	tmp_2 = tmp;
end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := If[LessEqual[C, -1e+211], N[(0.0 - N[Sqrt[N[(F / N[(A - C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 5.8e+119], N[(0.0 - N[Sqrt[N[(2.0 * N[(F / B$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(-2.0 * N[(1.0 / B$95$m), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(C * F), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
B_m = \left|B\right|

\\
\begin{array}{l}
\mathbf{if}\;C \leq -1 \cdot 10^{+211}:\\
\;\;\;\;0 - \sqrt{\frac{F}{A - C}}\\

\mathbf{elif}\;C \leq 5.8 \cdot 10^{+119}:\\
\;\;\;\;0 - \sqrt{2 \cdot \frac{F}{B\_m}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if C < -9.9999999999999996e210

    1. Initial program 0.8%

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

        \[\leadsto \mathsf{neg}\left(\frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\right) \]
      2. distribute-neg-frac2N/A

        \[\leadsto \frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{\color{blue}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\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), \color{blue}{\left(\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)\right)}\right) \]
    3. Simplified2.4%

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

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot \left(F \cdot 2\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right) \cdot 2\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{4}, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right) \cdot \left(2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. sqrt-prodN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F} \cdot \sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      6. pow1/2N/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)}^{\frac{1}{2}} \cdot \sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left({\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)}^{\frac{1}{2}}\right), \left(\sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right)\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    6. Applied egg-rr3.6%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\color{blue}{\left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)}\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    8. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\left(\frac{{B}^{2}}{A - C} + 4 \cdot A\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(\frac{{B}^{2}}{A - C}\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\left({B}^{2}\right), \left(A - C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(B \cdot B\right), \left(A - C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, B\right), \left(A - C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      6. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{\_.f64}\left(A, C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      7. *-lowering-*.f6431.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{\_.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(4, A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    9. Simplified31.9%

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

      \[\leadsto \color{blue}{-1 \cdot \sqrt{\frac{F}{A - C}}} \]
    11. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{neg}\left(\sqrt{\frac{F}{A - C}}\right) \]
      2. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{\frac{F}{A - C}}\right)\right) \]
      3. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{F}{A - C}\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(F, \left(A - C\right)\right)\right)\right) \]
      5. --lowering--.f6427.6%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(F, \mathsf{\_.f64}\left(A, C\right)\right)\right)\right) \]
    12. Simplified27.6%

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

    if -9.9999999999999996e210 < C < 5.80000000000000014e119

    1. Initial program 22.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 B around inf

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

        \[\leadsto \mathsf{neg}\left(\sqrt{\frac{F}{B}} \cdot \sqrt{2}\right) \]
      2. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{\frac{F}{B}} \cdot \sqrt{2}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{\frac{F}{B}}\right), \left(\sqrt{2}\right)\right)\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{F}{B}\right)\right), \left(\sqrt{2}\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(F, B\right)\right), \left(\sqrt{2}\right)\right)\right) \]
      6. sqrt-lowering-sqrt.f6415.7%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(F, B\right)\right), \mathsf{sqrt.f64}\left(2\right)\right)\right) \]
    5. Simplified15.7%

      \[\leadsto \color{blue}{-\sqrt{\frac{F}{B}} \cdot \sqrt{2}} \]
    6. Step-by-step derivation
      1. sqrt-unprodN/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{\frac{F}{B} \cdot 2}\right)\right) \]
      2. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{F}{B} \cdot 2\right)\right)\right) \]
      3. clear-numN/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1}{\frac{B}{F}} \cdot 2\right)\right)\right) \]
      4. associate-*l/N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1 \cdot 2}{\frac{B}{F}}\right)\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{2}{\frac{B}{F}}\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(2, \left(\frac{B}{F}\right)\right)\right)\right) \]
      7. /-lowering-/.f6415.8%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(2, \mathsf{/.f64}\left(B, F\right)\right)\right)\right) \]
    7. Applied egg-rr15.8%

      \[\leadsto -\color{blue}{\sqrt{\frac{2}{\frac{B}{F}}}} \]
    8. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1}{\frac{\frac{B}{F}}{2}}\right)\right)\right) \]
      2. associate-/r/N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1}{\frac{B}{F}} \cdot 2\right)\right)\right) \]
      3. clear-numN/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{F}{B} \cdot 2\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(\frac{F}{B}\right), 2\right)\right)\right) \]
      5. /-lowering-/.f6415.8%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(F, B\right), 2\right)\right)\right) \]
    9. Applied egg-rr15.8%

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

    if 5.80000000000000014e119 < C

    1. Initial program 7.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. Step-by-step derivation
      1. distribute-frac-negN/A

        \[\leadsto \mathsf{neg}\left(\frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\right) \]
      2. distribute-neg-frac2N/A

        \[\leadsto \frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{\color{blue}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\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), \color{blue}{\left(\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)\right)}\right) \]
    3. Simplified23.6%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{\left({C}^{2} \cdot \left(-16 \cdot \left(A \cdot F\right) + 2 \cdot \frac{F \cdot \left(-4 \cdot \left(A \cdot \left(A + -1 \cdot A\right)\right) + 2 \cdot {B}^{2}\right)}{C}\right)\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left({C}^{2}\right), \left(-16 \cdot \left(A \cdot F\right) + 2 \cdot \frac{F \cdot \left(-4 \cdot \left(A \cdot \left(A + -1 \cdot A\right)\right) + 2 \cdot {B}^{2}\right)}{C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(C \cdot C\right), \left(-16 \cdot \left(A \cdot F\right) + 2 \cdot \frac{F \cdot \left(-4 \cdot \left(A \cdot \left(A + -1 \cdot A\right)\right) + 2 \cdot {B}^{2}\right)}{C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{4}, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \left(-16 \cdot \left(A \cdot F\right) + 2 \cdot \frac{F \cdot \left(-4 \cdot \left(A \cdot \left(A + -1 \cdot A\right)\right) + 2 \cdot {B}^{2}\right)}{C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{4}, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \mathsf{+.f64}\left(\left(-16 \cdot \left(A \cdot F\right)\right), \left(2 \cdot \frac{F \cdot \left(-4 \cdot \left(A \cdot \left(A + -1 \cdot A\right)\right) + 2 \cdot {B}^{2}\right)}{C}\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, \color{blue}{A}\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, \left(A \cdot F\right)\right), \left(2 \cdot \frac{F \cdot \left(-4 \cdot \left(A \cdot \left(A + -1 \cdot A\right)\right) + 2 \cdot {B}^{2}\right)}{C}\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, F\right)\right), \left(2 \cdot \frac{F \cdot \left(-4 \cdot \left(A \cdot \left(A + -1 \cdot A\right)\right) + 2 \cdot {B}^{2}\right)}{C}\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      7. associate-*r/N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, F\right)\right), \left(\frac{2 \cdot \left(F \cdot \left(-4 \cdot \left(A \cdot \left(A + -1 \cdot A\right)\right) + 2 \cdot {B}^{2}\right)\right)}{C}\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, F\right)\right), \mathsf{/.f64}\left(\left(2 \cdot \left(F \cdot \left(-4 \cdot \left(A \cdot \left(A + -1 \cdot A\right)\right) + 2 \cdot {B}^{2}\right)\right)\right), C\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    7. Simplified7.4%

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

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

        \[\leadsto \left(-2 \cdot \frac{1}{B}\right) \cdot \color{blue}{\sqrt{C \cdot F}} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(-2 \cdot \frac{1}{B}\right), \color{blue}{\left(\sqrt{C \cdot F}\right)}\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-2, \left(\frac{1}{B}\right)\right), \left(\sqrt{\color{blue}{C \cdot F}}\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-2, \mathsf{/.f64}\left(1, B\right)\right), \left(\sqrt{C \cdot \color{blue}{F}}\right)\right) \]
      5. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-2, \mathsf{/.f64}\left(1, B\right)\right), \mathsf{sqrt.f64}\left(\left(C \cdot F\right)\right)\right) \]
      6. *-lowering-*.f6414.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-2, \mathsf{/.f64}\left(1, B\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(C, F\right)\right)\right) \]
    10. Simplified14.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -1 \cdot 10^{+211}:\\ \;\;\;\;0 - \sqrt{\frac{F}{A - C}}\\ \mathbf{elif}\;C \leq 5.8 \cdot 10^{+119}:\\ \;\;\;\;0 - \sqrt{2 \cdot \frac{F}{B}}\\ \mathbf{else}:\\ \;\;\;\;\left(-2 \cdot \frac{1}{B}\right) \cdot \sqrt{C \cdot F}\\ \end{array} \]
  5. Add Preprocessing

Alternative 25: 28.4% accurate, 5.7× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ \begin{array}{l} \mathbf{if}\;B\_m \leq 1.45 \cdot 10^{-67}:\\ \;\;\;\;0 - \sqrt{\frac{F}{A - C}}\\ \mathbf{else}:\\ \;\;\;\;0 - \sqrt{2 \cdot \frac{F}{B\_m}}\\ \end{array} \end{array} \]
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
 :precision binary64
 (if (<= B_m 1.45e-67)
   (- 0.0 (sqrt (/ F (- A C))))
   (- 0.0 (sqrt (* 2.0 (/ F B_m))))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
	double tmp;
	if (B_m <= 1.45e-67) {
		tmp = 0.0 - sqrt((F / (A - C)));
	} else {
		tmp = 0.0 - sqrt((2.0 * (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 <= 1.45d-67) then
        tmp = 0.0d0 - sqrt((f / (a - c)))
    else
        tmp = 0.0d0 - sqrt((2.0d0 * (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 <= 1.45e-67) {
		tmp = 0.0 - Math.sqrt((F / (A - C)));
	} else {
		tmp = 0.0 - Math.sqrt((2.0 * (F / B_m)));
	}
	return tmp;
}
B_m = math.fabs(B)
def code(A, B_m, C, F):
	tmp = 0
	if B_m <= 1.45e-67:
		tmp = 0.0 - math.sqrt((F / (A - C)))
	else:
		tmp = 0.0 - math.sqrt((2.0 * (F / B_m)))
	return tmp
B_m = abs(B)
function code(A, B_m, C, F)
	tmp = 0.0
	if (B_m <= 1.45e-67)
		tmp = Float64(0.0 - sqrt(Float64(F / Float64(A - C))));
	else
		tmp = Float64(0.0 - sqrt(Float64(2.0 * 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 <= 1.45e-67)
		tmp = 0.0 - sqrt((F / (A - C)));
	else
		tmp = 0.0 - sqrt((2.0 * (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, 1.45e-67], N[(0.0 - N[Sqrt[N[(F / N[(A - C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(0.0 - N[Sqrt[N[(2.0 * N[(F / B$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|

\\
\begin{array}{l}
\mathbf{if}\;B\_m \leq 1.45 \cdot 10^{-67}:\\
\;\;\;\;0 - \sqrt{\frac{F}{A - C}}\\

\mathbf{else}:\\
\;\;\;\;0 - \sqrt{2 \cdot \frac{F}{B\_m}}\\


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

    1. Initial program 18.4%

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

        \[\leadsto \mathsf{neg}\left(\frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\right) \]
      2. distribute-neg-frac2N/A

        \[\leadsto \frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{\color{blue}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\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), \color{blue}{\left(\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)\right)}\right) \]
    3. Simplified23.6%

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

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot \left(2 \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot \left(F \cdot 2\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right) \cdot 2\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{4}, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right) \cdot \left(2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. sqrt-prodN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F} \cdot \sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      6. pow1/2N/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)}^{\frac{1}{2}} \cdot \sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(4, A\right)}, C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left({\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)}^{\frac{1}{2}}\right), \left(\sqrt{2 \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}\right)\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)}, \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    6. Applied egg-rr35.7%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\color{blue}{\left(4 \cdot A + \frac{{B}^{2}}{A - C}\right)}\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    8. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\left(\frac{{B}^{2}}{A - C} + 4 \cdot A\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(\frac{{B}^{2}}{A - C}\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\left({B}^{2}\right), \left(A - C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(B \cdot B\right), \left(A - C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, B\right), \left(A - C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      6. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{\_.f64}\left(A, C\right)\right), \left(4 \cdot A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      7. *-lowering-*.f6421.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right), F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{\_.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(4, A\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    9. Simplified21.0%

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

      \[\leadsto \color{blue}{-1 \cdot \sqrt{\frac{F}{A - C}}} \]
    11. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{neg}\left(\sqrt{\frac{F}{A - C}}\right) \]
      2. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{\frac{F}{A - C}}\right)\right) \]
      3. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{F}{A - C}\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(F, \left(A - C\right)\right)\right)\right) \]
      5. --lowering--.f6410.4%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(F, \mathsf{\_.f64}\left(A, C\right)\right)\right)\right) \]
    12. Simplified10.4%

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

    if 1.45000000000000002e-67 < B

    1. Initial program 16.2%

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

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

        \[\leadsto \mathsf{neg}\left(\sqrt{\frac{F}{B}} \cdot \sqrt{2}\right) \]
      2. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{\frac{F}{B}} \cdot \sqrt{2}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{\frac{F}{B}}\right), \left(\sqrt{2}\right)\right)\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{F}{B}\right)\right), \left(\sqrt{2}\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(F, B\right)\right), \left(\sqrt{2}\right)\right)\right) \]
      6. sqrt-lowering-sqrt.f6437.1%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(F, B\right)\right), \mathsf{sqrt.f64}\left(2\right)\right)\right) \]
    5. Simplified37.1%

      \[\leadsto \color{blue}{-\sqrt{\frac{F}{B}} \cdot \sqrt{2}} \]
    6. Step-by-step derivation
      1. sqrt-unprodN/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{\frac{F}{B} \cdot 2}\right)\right) \]
      2. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{F}{B} \cdot 2\right)\right)\right) \]
      3. clear-numN/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1}{\frac{B}{F}} \cdot 2\right)\right)\right) \]
      4. associate-*l/N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1 \cdot 2}{\frac{B}{F}}\right)\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{2}{\frac{B}{F}}\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(2, \left(\frac{B}{F}\right)\right)\right)\right) \]
      7. /-lowering-/.f6437.2%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(2, \mathsf{/.f64}\left(B, F\right)\right)\right)\right) \]
    7. Applied egg-rr37.2%

      \[\leadsto -\color{blue}{\sqrt{\frac{2}{\frac{B}{F}}}} \]
    8. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1}{\frac{\frac{B}{F}}{2}}\right)\right)\right) \]
      2. associate-/r/N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1}{\frac{B}{F}} \cdot 2\right)\right)\right) \]
      3. clear-numN/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{F}{B} \cdot 2\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(\frac{F}{B}\right), 2\right)\right)\right) \]
      5. /-lowering-/.f6437.2%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(F, B\right), 2\right)\right)\right) \]
    9. Applied egg-rr37.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 1.45 \cdot 10^{-67}:\\ \;\;\;\;0 - \sqrt{\frac{F}{A - C}}\\ \mathbf{else}:\\ \;\;\;\;0 - \sqrt{2 \cdot \frac{F}{B}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 26: 26.9% accurate, 5.9× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ 0 - \sqrt{2 \cdot \frac{F}{B\_m}} \end{array} \]
B_m = (fabs.f64 B)
(FPCore (A B_m C F) :precision binary64 (- 0.0 (sqrt (* 2.0 (/ F B_m)))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
	return 0.0 - sqrt((2.0 * (F / B_m)));
}
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 = 0.0d0 - sqrt((2.0d0 * (f / b_m)))
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
	return 0.0 - Math.sqrt((2.0 * (F / B_m)));
}
B_m = math.fabs(B)
def code(A, B_m, C, F):
	return 0.0 - math.sqrt((2.0 * (F / B_m)))
B_m = abs(B)
function code(A, B_m, C, F)
	return Float64(0.0 - sqrt(Float64(2.0 * Float64(F / B_m))))
end
B_m = abs(B);
function tmp = code(A, B_m, C, F)
	tmp = 0.0 - sqrt((2.0 * (F / B_m)));
end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := N[(0.0 - N[Sqrt[N[(2.0 * N[(F / B$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
B_m = \left|B\right|

\\
0 - \sqrt{2 \cdot \frac{F}{B\_m}}
\end{array}
Derivation
  1. Initial program 17.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 B around inf

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

      \[\leadsto \mathsf{neg}\left(\sqrt{\frac{F}{B}} \cdot \sqrt{2}\right) \]
    2. neg-lowering-neg.f64N/A

      \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{\frac{F}{B}} \cdot \sqrt{2}\right)\right) \]
    3. *-lowering-*.f64N/A

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{\frac{F}{B}}\right), \left(\sqrt{2}\right)\right)\right) \]
    4. sqrt-lowering-sqrt.f64N/A

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{F}{B}\right)\right), \left(\sqrt{2}\right)\right)\right) \]
    5. /-lowering-/.f64N/A

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(F, B\right)\right), \left(\sqrt{2}\right)\right)\right) \]
    6. sqrt-lowering-sqrt.f6412.4%

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(F, B\right)\right), \mathsf{sqrt.f64}\left(2\right)\right)\right) \]
  5. Simplified12.4%

    \[\leadsto \color{blue}{-\sqrt{\frac{F}{B}} \cdot \sqrt{2}} \]
  6. Step-by-step derivation
    1. sqrt-unprodN/A

      \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{\frac{F}{B} \cdot 2}\right)\right) \]
    2. sqrt-lowering-sqrt.f64N/A

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{F}{B} \cdot 2\right)\right)\right) \]
    3. clear-numN/A

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1}{\frac{B}{F}} \cdot 2\right)\right)\right) \]
    4. associate-*l/N/A

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1 \cdot 2}{\frac{B}{F}}\right)\right)\right) \]
    5. metadata-evalN/A

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{2}{\frac{B}{F}}\right)\right)\right) \]
    6. /-lowering-/.f64N/A

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(2, \left(\frac{B}{F}\right)\right)\right)\right) \]
    7. /-lowering-/.f6412.5%

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(2, \mathsf{/.f64}\left(B, F\right)\right)\right)\right) \]
  7. Applied egg-rr12.5%

    \[\leadsto -\color{blue}{\sqrt{\frac{2}{\frac{B}{F}}}} \]
  8. Step-by-step derivation
    1. clear-numN/A

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1}{\frac{\frac{B}{F}}{2}}\right)\right)\right) \]
    2. associate-/r/N/A

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1}{\frac{B}{F}} \cdot 2\right)\right)\right) \]
    3. clear-numN/A

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{F}{B} \cdot 2\right)\right)\right) \]
    4. *-lowering-*.f64N/A

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(\frac{F}{B}\right), 2\right)\right)\right) \]
    5. /-lowering-/.f6412.5%

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(F, B\right), 2\right)\right)\right) \]
  9. Applied egg-rr12.5%

    \[\leadsto -\sqrt{\color{blue}{\frac{F}{B} \cdot 2}} \]
  10. Final simplification12.5%

    \[\leadsto 0 - \sqrt{2 \cdot \frac{F}{B}} \]
  11. Add Preprocessing

Alternative 27: 26.9% accurate, 5.9× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ 0 - \sqrt{F \cdot \frac{2}{B\_m}} \end{array} \]
B_m = (fabs.f64 B)
(FPCore (A B_m C F) :precision binary64 (- 0.0 (sqrt (* F (/ 2.0 B_m)))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
	return 0.0 - sqrt((F * (2.0 / B_m)));
}
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 = 0.0d0 - sqrt((f * (2.0d0 / b_m)))
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
	return 0.0 - Math.sqrt((F * (2.0 / B_m)));
}
B_m = math.fabs(B)
def code(A, B_m, C, F):
	return 0.0 - math.sqrt((F * (2.0 / B_m)))
B_m = abs(B)
function code(A, B_m, C, F)
	return Float64(0.0 - sqrt(Float64(F * Float64(2.0 / B_m))))
end
B_m = abs(B);
function tmp = code(A, B_m, C, F)
	tmp = 0.0 - sqrt((F * (2.0 / B_m)));
end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := N[(0.0 - N[Sqrt[N[(F * N[(2.0 / B$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
B_m = \left|B\right|

\\
0 - \sqrt{F \cdot \frac{2}{B\_m}}
\end{array}
Derivation
  1. Initial program 17.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 B around inf

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

      \[\leadsto \mathsf{neg}\left(\sqrt{\frac{F}{B}} \cdot \sqrt{2}\right) \]
    2. neg-lowering-neg.f64N/A

      \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{\frac{F}{B}} \cdot \sqrt{2}\right)\right) \]
    3. *-lowering-*.f64N/A

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{\frac{F}{B}}\right), \left(\sqrt{2}\right)\right)\right) \]
    4. sqrt-lowering-sqrt.f64N/A

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{F}{B}\right)\right), \left(\sqrt{2}\right)\right)\right) \]
    5. /-lowering-/.f64N/A

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(F, B\right)\right), \left(\sqrt{2}\right)\right)\right) \]
    6. sqrt-lowering-sqrt.f6412.4%

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(F, B\right)\right), \mathsf{sqrt.f64}\left(2\right)\right)\right) \]
  5. Simplified12.4%

    \[\leadsto \color{blue}{-\sqrt{\frac{F}{B}} \cdot \sqrt{2}} \]
  6. Step-by-step derivation
    1. sqrt-unprodN/A

      \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{\frac{F}{B} \cdot 2}\right)\right) \]
    2. sqrt-lowering-sqrt.f64N/A

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{F}{B} \cdot 2\right)\right)\right) \]
    3. clear-numN/A

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1}{\frac{B}{F}} \cdot 2\right)\right)\right) \]
    4. associate-*l/N/A

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1 \cdot 2}{\frac{B}{F}}\right)\right)\right) \]
    5. metadata-evalN/A

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{2}{\frac{B}{F}}\right)\right)\right) \]
    6. /-lowering-/.f64N/A

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(2, \left(\frac{B}{F}\right)\right)\right)\right) \]
    7. /-lowering-/.f6412.5%

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(2, \mathsf{/.f64}\left(B, F\right)\right)\right)\right) \]
  7. Applied egg-rr12.5%

    \[\leadsto -\color{blue}{\sqrt{\frac{2}{\frac{B}{F}}}} \]
  8. Step-by-step derivation
    1. associate-/r/N/A

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{2}{B} \cdot F\right)\right)\right) \]
    2. *-lowering-*.f64N/A

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(\frac{2}{B}\right), F\right)\right)\right) \]
    3. /-lowering-/.f6412.4%

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(2, B\right), F\right)\right)\right) \]
  9. Applied egg-rr12.4%

    \[\leadsto -\sqrt{\color{blue}{\frac{2}{B} \cdot F}} \]
  10. Final simplification12.4%

    \[\leadsto 0 - \sqrt{F \cdot \frac{2}{B}} \]
  11. Add Preprocessing

Reproduce

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