ABCF->ab-angle b

Percentage Accurate: 19.4% → 47.0%
Time: 25.8s
Alternatives: 9
Speedup: 5.7×

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 9 alternatives:

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

Initial Program: 19.4% 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: 47.0% accurate, 0.2× 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 \left(C \cdot -4\right)\\ t_2 := 4 \cdot \left(A \cdot C\right) - B\_m \cdot B\_m\\ t_3 := \left(4 \cdot A\right) \cdot C\\ t_4 := \frac{\sqrt{\left(2 \cdot \left(\left({B\_m}^{2} - t\_3\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{B\_m}^{2} + {\left(A - C\right)}^{2}}\right)}}{t\_3 - {B\_m}^{2}}\\ \mathbf{if}\;t\_4 \leq -\infty:\\ \;\;\;\;0 - \sqrt{\frac{C + \left(A - t\_0\right)}{B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)} \cdot \left(2 \cdot F\right)}\\ \mathbf{elif}\;t\_4 \leq -1 \cdot 10^{-210}:\\ \;\;\;\;\frac{1}{A \cdot \left(4 \cdot C\right) - B\_m \cdot B\_m} \cdot \sqrt{2 \cdot \left(\left(F \cdot t\_1\right) \cdot \left(A + \left(C - t\_0\right)\right)\right)}\\ \mathbf{elif}\;t\_4 \leq 2 \cdot 10^{+70}:\\ \;\;\;\;\frac{\sqrt{\left(-0.5 \cdot \frac{B\_m \cdot B\_m}{A - C} + 2 \cdot C\right) \cdot \left(t\_1 \cdot \left(2 \cdot F\right)\right)}}{t\_2}\\ \mathbf{elif}\;t\_4 \leq \infty:\\ \;\;\;\;\frac{{\left(A \cdot -16\right)}^{0.5} \cdot \sqrt{A \cdot \left(C \cdot F\right)}}{t\_2}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{\left(2 \cdot F\right) \cdot \left(A - \mathsf{hypot}\left(B\_m, A\right)\right)}}{0 - 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 (+ (* B_m B_m) (* A (* C -4.0))))
        (t_2 (- (* 4.0 (* A C)) (* B_m B_m)))
        (t_3 (* (* 4.0 A) C))
        (t_4
         (/
          (sqrt
           (*
            (* 2.0 (* (- (pow B_m 2.0) t_3) F))
            (- (+ A C) (sqrt (+ (pow B_m 2.0) (pow (- A C) 2.0))))))
          (- t_3 (pow B_m 2.0)))))
   (if (<= t_4 (- INFINITY))
     (-
      0.0
      (sqrt
       (* (/ (+ C (- A t_0)) (+ (* B_m B_m) (* -4.0 (* A C)))) (* 2.0 F))))
     (if (<= t_4 -1e-210)
       (*
        (/ 1.0 (- (* A (* 4.0 C)) (* B_m B_m)))
        (sqrt (* 2.0 (* (* F t_1) (+ A (- C t_0))))))
       (if (<= t_4 2e+70)
         (/
          (sqrt
           (*
            (+ (* -0.5 (/ (* B_m B_m) (- A C))) (* 2.0 C))
            (* t_1 (* 2.0 F))))
          t_2)
         (if (<= t_4 INFINITY)
           (/ (* (pow (* A -16.0) 0.5) (sqrt (* A (* C F)))) t_2)
           (/ (sqrt (* (* 2.0 F) (- A (hypot B_m A)))) (- 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 * (C * -4.0));
	double t_2 = (4.0 * (A * C)) - (B_m * B_m);
	double t_3 = (4.0 * A) * C;
	double t_4 = sqrt(((2.0 * ((pow(B_m, 2.0) - t_3) * F)) * ((A + C) - sqrt((pow(B_m, 2.0) + pow((A - C), 2.0)))))) / (t_3 - pow(B_m, 2.0));
	double tmp;
	if (t_4 <= -((double) INFINITY)) {
		tmp = 0.0 - sqrt((((C + (A - t_0)) / ((B_m * B_m) + (-4.0 * (A * C)))) * (2.0 * F)));
	} else if (t_4 <= -1e-210) {
		tmp = (1.0 / ((A * (4.0 * C)) - (B_m * B_m))) * sqrt((2.0 * ((F * t_1) * (A + (C - t_0)))));
	} else if (t_4 <= 2e+70) {
		tmp = sqrt((((-0.5 * ((B_m * B_m) / (A - C))) + (2.0 * C)) * (t_1 * (2.0 * F)))) / t_2;
	} else if (t_4 <= ((double) INFINITY)) {
		tmp = (pow((A * -16.0), 0.5) * sqrt((A * (C * F)))) / t_2;
	} else {
		tmp = sqrt(((2.0 * F) * (A - hypot(B_m, A)))) / (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 * (C * -4.0));
	double t_2 = (4.0 * (A * C)) - (B_m * B_m);
	double t_3 = (4.0 * A) * C;
	double t_4 = Math.sqrt(((2.0 * ((Math.pow(B_m, 2.0) - t_3) * F)) * ((A + C) - Math.sqrt((Math.pow(B_m, 2.0) + Math.pow((A - C), 2.0)))))) / (t_3 - Math.pow(B_m, 2.0));
	double tmp;
	if (t_4 <= -Double.POSITIVE_INFINITY) {
		tmp = 0.0 - Math.sqrt((((C + (A - t_0)) / ((B_m * B_m) + (-4.0 * (A * C)))) * (2.0 * F)));
	} else if (t_4 <= -1e-210) {
		tmp = (1.0 / ((A * (4.0 * C)) - (B_m * B_m))) * Math.sqrt((2.0 * ((F * t_1) * (A + (C - t_0)))));
	} else if (t_4 <= 2e+70) {
		tmp = Math.sqrt((((-0.5 * ((B_m * B_m) / (A - C))) + (2.0 * C)) * (t_1 * (2.0 * F)))) / t_2;
	} else if (t_4 <= Double.POSITIVE_INFINITY) {
		tmp = (Math.pow((A * -16.0), 0.5) * Math.sqrt((A * (C * F)))) / t_2;
	} else {
		tmp = Math.sqrt(((2.0 * F) * (A - Math.hypot(B_m, A)))) / (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 * (C * -4.0))
	t_2 = (4.0 * (A * C)) - (B_m * B_m)
	t_3 = (4.0 * A) * C
	t_4 = math.sqrt(((2.0 * ((math.pow(B_m, 2.0) - t_3) * F)) * ((A + C) - math.sqrt((math.pow(B_m, 2.0) + math.pow((A - C), 2.0)))))) / (t_3 - math.pow(B_m, 2.0))
	tmp = 0
	if t_4 <= -math.inf:
		tmp = 0.0 - math.sqrt((((C + (A - t_0)) / ((B_m * B_m) + (-4.0 * (A * C)))) * (2.0 * F)))
	elif t_4 <= -1e-210:
		tmp = (1.0 / ((A * (4.0 * C)) - (B_m * B_m))) * math.sqrt((2.0 * ((F * t_1) * (A + (C - t_0)))))
	elif t_4 <= 2e+70:
		tmp = math.sqrt((((-0.5 * ((B_m * B_m) / (A - C))) + (2.0 * C)) * (t_1 * (2.0 * F)))) / t_2
	elif t_4 <= math.inf:
		tmp = (math.pow((A * -16.0), 0.5) * math.sqrt((A * (C * F)))) / t_2
	else:
		tmp = math.sqrt(((2.0 * F) * (A - math.hypot(B_m, A)))) / (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 * Float64(C * -4.0)))
	t_2 = Float64(Float64(4.0 * Float64(A * C)) - Float64(B_m * B_m))
	t_3 = Float64(Float64(4.0 * A) * C)
	t_4 = Float64(sqrt(Float64(Float64(2.0 * Float64(Float64((B_m ^ 2.0) - t_3) * F)) * Float64(Float64(A + C) - sqrt(Float64((B_m ^ 2.0) + (Float64(A - C) ^ 2.0)))))) / Float64(t_3 - (B_m ^ 2.0)))
	tmp = 0.0
	if (t_4 <= Float64(-Inf))
		tmp = Float64(0.0 - sqrt(Float64(Float64(Float64(C + Float64(A - t_0)) / Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C)))) * Float64(2.0 * F))));
	elseif (t_4 <= -1e-210)
		tmp = Float64(Float64(1.0 / Float64(Float64(A * Float64(4.0 * C)) - Float64(B_m * B_m))) * sqrt(Float64(2.0 * Float64(Float64(F * t_1) * Float64(A + Float64(C - t_0))))));
	elseif (t_4 <= 2e+70)
		tmp = Float64(sqrt(Float64(Float64(Float64(-0.5 * Float64(Float64(B_m * B_m) / Float64(A - C))) + Float64(2.0 * C)) * Float64(t_1 * Float64(2.0 * F)))) / t_2);
	elseif (t_4 <= Inf)
		tmp = Float64(Float64((Float64(A * -16.0) ^ 0.5) * sqrt(Float64(A * Float64(C * F)))) / t_2);
	else
		tmp = Float64(sqrt(Float64(Float64(2.0 * F) * Float64(A - hypot(B_m, A)))) / 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 * (C * -4.0));
	t_2 = (4.0 * (A * C)) - (B_m * B_m);
	t_3 = (4.0 * A) * C;
	t_4 = sqrt(((2.0 * (((B_m ^ 2.0) - t_3) * F)) * ((A + C) - sqrt(((B_m ^ 2.0) + ((A - C) ^ 2.0)))))) / (t_3 - (B_m ^ 2.0));
	tmp = 0.0;
	if (t_4 <= -Inf)
		tmp = 0.0 - sqrt((((C + (A - t_0)) / ((B_m * B_m) + (-4.0 * (A * C)))) * (2.0 * F)));
	elseif (t_4 <= -1e-210)
		tmp = (1.0 / ((A * (4.0 * C)) - (B_m * B_m))) * sqrt((2.0 * ((F * t_1) * (A + (C - t_0)))));
	elseif (t_4 <= 2e+70)
		tmp = sqrt((((-0.5 * ((B_m * B_m) / (A - C))) + (2.0 * C)) * (t_1 * (2.0 * F)))) / t_2;
	elseif (t_4 <= Inf)
		tmp = (((A * -16.0) ^ 0.5) * sqrt((A * (C * F)))) / t_2;
	else
		tmp = sqrt(((2.0 * F) * (A - hypot(B_m, A)))) / (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 * N[(C * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision]}, Block[{t$95$4 = N[(N[Sqrt[N[(N[(2.0 * N[(N[(N[Power[B$95$m, 2.0], $MachinePrecision] - t$95$3), $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$3 - N[Power[B$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$4, (-Infinity)], N[(0.0 - N[Sqrt[N[(N[(N[(C + N[(A - t$95$0), $MachinePrecision]), $MachinePrecision] / N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, -1e-210], N[(N[(1.0 / N[(N[(A * N[(4.0 * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(2.0 * N[(N[(F * t$95$1), $MachinePrecision] * N[(A + N[(C - t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, 2e+70], N[(N[Sqrt[N[(N[(N[(-0.5 * N[(N[(B$95$m * B$95$m), $MachinePrecision] / N[(A - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * C), $MachinePrecision]), $MachinePrecision] * N[(t$95$1 * N[(2.0 * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[t$95$4, Infinity], N[(N[(N[Power[N[(A * -16.0), $MachinePrecision], 0.5], $MachinePrecision] * N[Sqrt[N[(A * N[(C * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], N[(N[Sqrt[N[(N[(2.0 * F), $MachinePrecision] * N[(A - N[Sqrt[B$95$m ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(0.0 - B$95$m), $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 \left(C \cdot -4\right)\\
t_2 := 4 \cdot \left(A \cdot C\right) - B\_m \cdot B\_m\\
t_3 := \left(4 \cdot A\right) \cdot C\\
t_4 := \frac{\sqrt{\left(2 \cdot \left(\left({B\_m}^{2} - t\_3\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{B\_m}^{2} + {\left(A - C\right)}^{2}}\right)}}{t\_3 - {B\_m}^{2}}\\
\mathbf{if}\;t\_4 \leq -\infty:\\
\;\;\;\;0 - \sqrt{\frac{C + \left(A - t\_0\right)}{B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)} \cdot \left(2 \cdot F\right)}\\

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

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

\mathbf{elif}\;t\_4 \leq \infty:\\
\;\;\;\;\frac{{\left(A \cdot -16\right)}^{0.5} \cdot \sqrt{A \cdot \left(C \cdot F\right)}}{t\_2}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 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))) < -inf.0

    1. Initial program 2.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{A + \left(C - \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}{B \cdot B + -4 \cdot \left(A \cdot C\right)} \cdot \left(2 \cdot F\right)\right)\right)\right) \]
    7. Applied egg-rr50.4%

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

    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))) < -1e-210

    1. Initial program 97.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. Simplified95.5%

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

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

    if -1e-210 < (/.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.00000000000000015e70

    1. Initial program 8.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. Simplified10.9%

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \left(\frac{{B}^{2}}{A - C}\right)\right), \left(2 \cdot C\right)\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(A, \mathsf{*.f64}\left(C, -4\right)\right)\right), \mathsf{*.f64}\left(2, F\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(4, \mathsf{*.f64}\left(A, C\right)\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(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\left({B}^{2}\right), \left(A - C\right)\right)\right), \left(2 \cdot C\right)\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(A, \mathsf{*.f64}\left(C, -4\right)\right)\right), \mathsf{*.f64}\left(2, F\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(4, \mathsf{*.f64}\left(A, C\right)\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(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\left(B \cdot B\right), \left(A - C\right)\right)\right), \left(2 \cdot C\right)\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(A, \mathsf{*.f64}\left(C, -4\right)\right)\right), \mathsf{*.f64}\left(2, F\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(4, \mathsf{*.f64}\left(A, C\right)\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(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(B, B\right), \left(A - C\right)\right)\right), \left(2 \cdot C\right)\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(A, \mathsf{*.f64}\left(C, -4\right)\right)\right), \mathsf{*.f64}\left(2, F\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(4, \mathsf{*.f64}\left(A, C\right)\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(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{\_.f64}\left(A, C\right)\right)\right), \left(2 \cdot C\right)\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(A, \mathsf{*.f64}\left(C, -4\right)\right)\right), \mathsf{*.f64}\left(2, F\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      7. *-lowering-*.f6442.2%

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

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

    if 2.00000000000000015e70 < (/.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 11.4%

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

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

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

      \[\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(4, \mathsf{*.f64}\left(A, C\right)\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(-16, \left({A}^{2} \cdot \left(C \cdot F\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{4}, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      2. *-lowering-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(A, -16\right), \frac{1}{2}\right), \left({\left(A \cdot \left(C \cdot F\right)\right)}^{\frac{1}{2}}\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      9. pow1/2N/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(A, -16\right), \frac{1}{2}\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(A, \left(C \cdot F\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(4, \mathsf{*.f64}\left(\color{blue}{A}, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      12. *-lowering-*.f6458.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(A, -16\right), \frac{1}{2}\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(A, \mathsf{*.f64}\left(C, F\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    9. Applied egg-rr58.4%

      \[\leadsto \frac{\color{blue}{{\left(A \cdot -16\right)}^{0.5} \cdot \sqrt{A \cdot \left(C \cdot F\right)}}}{4 \cdot \left(A \cdot C\right) - 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. Add Preprocessing
    3. Taylor expanded in F around 0

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{A + \left(C - \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}{B \cdot B + -4 \cdot \left(A \cdot C\right)} \cdot \left(2 \cdot F\right)\right)\right)\right) \]
    7. Applied egg-rr4.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(F, \mathsf{\_.f64}\left(A, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(A, A\right), \mathsf{*.f64}\left(B, B\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right)\right) \]
    10. Simplified0.7%

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

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

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{\sqrt{2 \cdot \left(F \cdot \left(A - \sqrt{A \cdot A + B \cdot B}\right)\right)}}{\sqrt{B} \cdot \sqrt{B}}\right)\right) \]
      3. rem-square-sqrtN/A

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(2 \cdot \left(F \cdot \left(A - \sqrt{A \cdot A + B \cdot B}\right)\right)\right)\right), B\right)\right) \]
      6. associate-*r*N/A

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

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

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, F\right), \mathsf{\_.f64}\left(A, \left(\mathsf{hypot}\left(B, A\right)\right)\right)\right)\right), B\right)\right) \]
      12. hypot-lowering-hypot.f6413.4%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, F\right), \mathsf{\_.f64}\left(A, \mathsf{hypot.f64}\left(B, A\right)\right)\right)\right), B\right)\right) \]
    12. Applied egg-rr13.4%

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

    \[\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 -\infty:\\ \;\;\;\;0 - \sqrt{\frac{C + \left(A - \mathsf{hypot}\left(B, A - C\right)\right)}{B \cdot B + -4 \cdot \left(A \cdot C\right)} \cdot \left(2 \cdot F\right)}\\ \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 -1 \cdot 10^{-210}:\\ \;\;\;\;\frac{1}{A \cdot \left(4 \cdot C\right) - B \cdot B} \cdot \sqrt{2 \cdot \left(\left(F \cdot \left(B \cdot B + A \cdot \left(C \cdot -4\right)\right)\right) \cdot \left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)}\\ \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 2 \cdot 10^{+70}:\\ \;\;\;\;\frac{\sqrt{\left(-0.5 \cdot \frac{B \cdot B}{A - C} + 2 \cdot C\right) \cdot \left(\left(B \cdot B + A \cdot \left(C \cdot -4\right)\right) \cdot \left(2 \cdot F\right)\right)}}{4 \cdot \left(A \cdot C\right) - 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 \cdot -16\right)}^{0.5} \cdot \sqrt{A \cdot \left(C \cdot F\right)}}{4 \cdot \left(A \cdot C\right) - B \cdot B}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{\left(2 \cdot F\right) \cdot \left(A - \mathsf{hypot}\left(B, A\right)\right)}}{0 - B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 40.1% accurate, 2.7× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ \begin{array}{l} \mathbf{if}\;B\_m \leq 2.2 \cdot 10^{-273}:\\ \;\;\;\;0 - \sqrt{\frac{F}{0 - A}}\\ \mathbf{elif}\;B\_m \leq 1.08 \cdot 10^{-178}:\\ \;\;\;\;0 - {\left(0 - F\right)}^{0.5} \cdot \sqrt{\frac{1}{C}}\\ \mathbf{elif}\;B\_m \leq 5.2 \cdot 10^{+116}:\\ \;\;\;\;0 - \sqrt{\frac{C + \left(A - \mathsf{hypot}\left(B\_m, A - C\right)\right)}{B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)} \cdot \left(2 \cdot F\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{\left(2 \cdot F\right) \cdot \left(A - \mathsf{hypot}\left(B\_m, A\right)\right)}}{0 - B\_m}\\ \end{array} \end{array} \]
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
 :precision binary64
 (if (<= B_m 2.2e-273)
   (- 0.0 (sqrt (/ F (- 0.0 A))))
   (if (<= B_m 1.08e-178)
     (- 0.0 (* (pow (- 0.0 F) 0.5) (sqrt (/ 1.0 C))))
     (if (<= B_m 5.2e+116)
       (-
        0.0
        (sqrt
         (*
          (/ (+ C (- A (hypot B_m (- A C)))) (+ (* B_m B_m) (* -4.0 (* A C))))
          (* 2.0 F))))
       (/ (sqrt (* (* 2.0 F) (- A (hypot B_m A)))) (- 0.0 B_m))))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
	double tmp;
	if (B_m <= 2.2e-273) {
		tmp = 0.0 - sqrt((F / (0.0 - A)));
	} else if (B_m <= 1.08e-178) {
		tmp = 0.0 - (pow((0.0 - F), 0.5) * sqrt((1.0 / C)));
	} else if (B_m <= 5.2e+116) {
		tmp = 0.0 - sqrt((((C + (A - hypot(B_m, (A - C)))) / ((B_m * B_m) + (-4.0 * (A * C)))) * (2.0 * F)));
	} else {
		tmp = sqrt(((2.0 * F) * (A - hypot(B_m, A)))) / (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 tmp;
	if (B_m <= 2.2e-273) {
		tmp = 0.0 - Math.sqrt((F / (0.0 - A)));
	} else if (B_m <= 1.08e-178) {
		tmp = 0.0 - (Math.pow((0.0 - F), 0.5) * Math.sqrt((1.0 / C)));
	} else if (B_m <= 5.2e+116) {
		tmp = 0.0 - Math.sqrt((((C + (A - Math.hypot(B_m, (A - C)))) / ((B_m * B_m) + (-4.0 * (A * C)))) * (2.0 * F)));
	} else {
		tmp = Math.sqrt(((2.0 * F) * (A - Math.hypot(B_m, A)))) / (0.0 - B_m);
	}
	return tmp;
}
B_m = math.fabs(B)
def code(A, B_m, C, F):
	tmp = 0
	if B_m <= 2.2e-273:
		tmp = 0.0 - math.sqrt((F / (0.0 - A)))
	elif B_m <= 1.08e-178:
		tmp = 0.0 - (math.pow((0.0 - F), 0.5) * math.sqrt((1.0 / C)))
	elif B_m <= 5.2e+116:
		tmp = 0.0 - math.sqrt((((C + (A - math.hypot(B_m, (A - C)))) / ((B_m * B_m) + (-4.0 * (A * C)))) * (2.0 * F)))
	else:
		tmp = math.sqrt(((2.0 * F) * (A - math.hypot(B_m, A)))) / (0.0 - B_m)
	return tmp
B_m = abs(B)
function code(A, B_m, C, F)
	tmp = 0.0
	if (B_m <= 2.2e-273)
		tmp = Float64(0.0 - sqrt(Float64(F / Float64(0.0 - A))));
	elseif (B_m <= 1.08e-178)
		tmp = Float64(0.0 - Float64((Float64(0.0 - F) ^ 0.5) * sqrt(Float64(1.0 / C))));
	elseif (B_m <= 5.2e+116)
		tmp = Float64(0.0 - sqrt(Float64(Float64(Float64(C + Float64(A - hypot(B_m, Float64(A - C)))) / Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C)))) * Float64(2.0 * F))));
	else
		tmp = Float64(sqrt(Float64(Float64(2.0 * F) * Float64(A - hypot(B_m, A)))) / Float64(0.0 - B_m));
	end
	return tmp
end
B_m = abs(B);
function tmp_2 = code(A, B_m, C, F)
	tmp = 0.0;
	if (B_m <= 2.2e-273)
		tmp = 0.0 - sqrt((F / (0.0 - A)));
	elseif (B_m <= 1.08e-178)
		tmp = 0.0 - (((0.0 - F) ^ 0.5) * sqrt((1.0 / C)));
	elseif (B_m <= 5.2e+116)
		tmp = 0.0 - sqrt((((C + (A - hypot(B_m, (A - C)))) / ((B_m * B_m) + (-4.0 * (A * C)))) * (2.0 * F)));
	else
		tmp = sqrt(((2.0 * F) * (A - hypot(B_m, A)))) / (0.0 - 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, 2.2e-273], N[(0.0 - N[Sqrt[N[(F / N[(0.0 - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B$95$m, 1.08e-178], N[(0.0 - N[(N[Power[N[(0.0 - F), $MachinePrecision], 0.5], $MachinePrecision] * N[Sqrt[N[(1.0 / C), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B$95$m, 5.2e+116], N[(0.0 - N[Sqrt[N[(N[(N[(C + N[(A - N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(N[(2.0 * F), $MachinePrecision] * N[(A - N[Sqrt[B$95$m ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(0.0 - B$95$m), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
B_m = \left|B\right|

\\
\begin{array}{l}
\mathbf{if}\;B\_m \leq 2.2 \cdot 10^{-273}:\\
\;\;\;\;0 - \sqrt{\frac{F}{0 - A}}\\

\mathbf{elif}\;B\_m \leq 1.08 \cdot 10^{-178}:\\
\;\;\;\;0 - {\left(0 - F\right)}^{0.5} \cdot \sqrt{\frac{1}{C}}\\

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

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


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

    1. Initial program 17.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 F around 0

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{A + \left(C - \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}{B \cdot B + -4 \cdot \left(A \cdot C\right)} \cdot \left(2 \cdot F\right)\right)\right)\right) \]
    7. Applied egg-rr26.6%

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(-1 \cdot F\right), A\right)\right)\right) \]
      3. mul-1-negN/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{neg}\left(F\right)\right), A\right)\right)\right) \]
      4. neg-lowering-neg.f6417.5%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{neg.f64}\left(F\right), A\right)\right)\right) \]
    10. Simplified17.5%

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

    if 2.1999999999999998e-273 < B < 1.07999999999999995e-178

    1. Initial program 7.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 F around 0

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{A + \left(C - \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}{B \cdot B + -4 \cdot \left(A \cdot C\right)} \cdot \left(2 \cdot F\right)\right)\right)\right) \]
    7. Applied egg-rr9.9%

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

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{\left(-1 \cdot \frac{F}{C}\right)}\right)\right) \]
    9. Step-by-step derivation
      1. mul-1-negN/A

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{neg.f64}\left(\left(\frac{F}{C}\right)\right)\right)\right) \]
      3. /-lowering-/.f6416.2%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(F, C\right)\right)\right)\right) \]
    10. Simplified16.2%

      \[\leadsto -\sqrt{\color{blue}{-\frac{F}{C}}} \]
    11. Step-by-step derivation
      1. distribute-neg-fracN/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{\frac{\mathsf{neg}\left(F\right)}{C}}\right)\right) \]
      2. div-invN/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{\left(\mathsf{neg}\left(F\right)\right) \cdot \frac{1}{C}}\right)\right) \]
      3. sqrt-prodN/A

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\mathsf{neg}\left(F\right)\right), \frac{1}{2}\right), \left(\sqrt{\frac{1}{C}}\right)\right)\right) \]
      7. neg-sub0N/A

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, F\right), \frac{1}{2}\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, C\right)\right)\right)\right) \]
    12. Applied egg-rr24.0%

      \[\leadsto -\color{blue}{{\left(0 - F\right)}^{0.5} \cdot \sqrt{\frac{1}{C}}} \]

    if 1.07999999999999995e-178 < B < 5.19999999999999973e116

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{A + \left(C - \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}{B \cdot B + -4 \cdot \left(A \cdot C\right)} \cdot \left(2 \cdot F\right)\right)\right)\right) \]
    7. Applied egg-rr41.3%

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

    if 5.19999999999999973e116 < B

    1. Initial program 11.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{A + \left(C - \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}{B \cdot B + -4 \cdot \left(A \cdot C\right)} \cdot \left(2 \cdot F\right)\right)\right)\right) \]
    7. Applied egg-rr17.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(F, \mathsf{\_.f64}\left(A, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(A, A\right), \mathsf{*.f64}\left(B, B\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right)\right) \]
    10. Simplified9.7%

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

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

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{\sqrt{2 \cdot \left(F \cdot \left(A - \sqrt{A \cdot A + B \cdot B}\right)\right)}}{\sqrt{B} \cdot \sqrt{B}}\right)\right) \]
      3. rem-square-sqrtN/A

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(2 \cdot \left(F \cdot \left(A - \sqrt{A \cdot A + B \cdot B}\right)\right)\right)\right), B\right)\right) \]
      6. associate-*r*N/A

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

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

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, F\right), \mathsf{\_.f64}\left(A, \left(\mathsf{hypot}\left(B, A\right)\right)\right)\right)\right), B\right)\right) \]
      12. hypot-lowering-hypot.f6452.4%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, F\right), \mathsf{\_.f64}\left(A, \mathsf{hypot.f64}\left(B, A\right)\right)\right)\right), B\right)\right) \]
    12. Applied egg-rr52.4%

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

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

Alternative 3: 39.1% accurate, 2.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;C \leq -9 \cdot 10^{+45}:\\
\;\;\;\;0 - \sqrt{\left(2 \cdot F\right) \cdot \frac{2 \cdot C}{B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)}}\\

\mathbf{elif}\;C \leq 0.00065:\\
\;\;\;\;\frac{-1}{\frac{B\_m}{\sqrt{\left(2 \cdot F\right) \cdot \left(A - \mathsf{hypot}\left(B\_m, A\right)\right)}}}\\

\mathbf{else}:\\
\;\;\;\;\frac{{\left(0 - F\right)}^{0.5}}{0 - \sqrt{C}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if C < -8.9999999999999997e45

    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 F around 0

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{A + \left(C - \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}{B \cdot B + -4 \cdot \left(A \cdot C\right)} \cdot \left(2 \cdot F\right)\right)\right)\right) \]
    7. Applied egg-rr37.0%

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

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\color{blue}{\left(2 \cdot C\right)}, \mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right)\right), \mathsf{*.f64}\left(F, 2\right)\right)\right)\right) \]
    9. Step-by-step derivation
      1. *-lowering-*.f6438.6%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, C\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right)\right), \mathsf{*.f64}\left(F, 2\right)\right)\right)\right) \]
    10. Simplified38.6%

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

    if -8.9999999999999997e45 < C < 6.4999999999999997e-4

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{A + \left(C - \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}{B \cdot B + -4 \cdot \left(A \cdot C\right)} \cdot \left(2 \cdot F\right)\right)\right)\right) \]
    7. Applied egg-rr33.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(F, \mathsf{\_.f64}\left(A, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(A, A\right), \mathsf{*.f64}\left(B, B\right)\right)\right)\right)\right)\right), \left(B \cdot B\right)\right)\right)\right) \]
      13. *-lowering-*.f6419.0%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(F, \mathsf{\_.f64}\left(A, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(A, A\right), \mathsf{*.f64}\left(B, B\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right)\right) \]
    10. Simplified19.0%

      \[\leadsto -\sqrt{\color{blue}{\frac{2 \cdot \left(F \cdot \left(A - \sqrt{A \cdot A + B \cdot B}\right)\right)}{B \cdot B}}} \]
    11. Step-by-step derivation
      1. clear-numN/A

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

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{\sqrt{1}}{\sqrt{\frac{B \cdot B}{2 \cdot \left(F \cdot \left(A - \sqrt{A \cdot A + B \cdot B}\right)\right)}}}\right)\right) \]
      3. metadata-evalN/A

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(1, \left(\frac{\sqrt{B \cdot B}}{\sqrt{2 \cdot \left(F \cdot \left(A - \sqrt{A \cdot A + B \cdot B}\right)\right)}}\right)\right)\right) \]
      6. sqrt-prodN/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(1, \left(\frac{\sqrt{B} \cdot \sqrt{B}}{\sqrt{2 \cdot \left(F \cdot \left(A - \sqrt{A \cdot A + B \cdot B}\right)\right)}}\right)\right)\right) \]
      7. rem-square-sqrtN/A

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

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

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

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(B, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, F\right), \mathsf{\_.f64}\left(A, \left(\sqrt{A \cdot A + B \cdot B}\right)\right)\right)\right)\right)\right)\right) \]
    12. Applied egg-rr17.3%

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

    if 6.4999999999999997e-4 < C

    1. Initial program 7.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 F around 0

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{A + \left(C - \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}{B \cdot B + -4 \cdot \left(A \cdot C\right)} \cdot \left(2 \cdot F\right)\right)\right)\right) \]
    7. Applied egg-rr15.1%

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

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{\left(-1 \cdot \frac{F}{C}\right)}\right)\right) \]
    9. Step-by-step derivation
      1. mul-1-negN/A

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{neg.f64}\left(\left(\frac{F}{C}\right)\right)\right)\right) \]
      3. /-lowering-/.f6442.2%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(F, C\right)\right)\right)\right) \]
    10. Simplified42.2%

      \[\leadsto -\sqrt{\color{blue}{-\frac{F}{C}}} \]
    11. Step-by-step derivation
      1. distribute-neg-fracN/A

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

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

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(\mathsf{neg}\left(F\right)\right), \frac{1}{2}\right), \left({C}^{\frac{1}{2}}\right)\right)\right) \]
      7. neg-sub0N/A

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, F\right), \frac{1}{2}\right), \left({C}^{\frac{1}{2}}\right)\right)\right) \]
      9. pow1/2N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, F\right), \frac{1}{2}\right), \left(\sqrt{C}\right)\right)\right) \]
      10. sqrt-lowering-sqrt.f6451.0%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, F\right), \frac{1}{2}\right), \mathsf{sqrt.f64}\left(C\right)\right)\right) \]
    12. Applied egg-rr51.0%

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

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

Alternative 4: 39.2% accurate, 2.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;C \leq -1 \cdot 10^{+48}:\\
\;\;\;\;0 - \sqrt{\left(2 \cdot F\right) \cdot \frac{2 \cdot C}{B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)}}\\

\mathbf{elif}\;C \leq 6.8:\\
\;\;\;\;\frac{\sqrt{\left(2 \cdot F\right) \cdot \left(A - \mathsf{hypot}\left(B\_m, A\right)\right)}}{0 - B\_m}\\

\mathbf{else}:\\
\;\;\;\;\frac{{\left(0 - F\right)}^{0.5}}{0 - \sqrt{C}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if C < -1.00000000000000004e48

    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 F around 0

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{A + \left(C - \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}{B \cdot B + -4 \cdot \left(A \cdot C\right)} \cdot \left(2 \cdot F\right)\right)\right)\right) \]
    7. Applied egg-rr37.0%

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

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\color{blue}{\left(2 \cdot C\right)}, \mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right)\right), \mathsf{*.f64}\left(F, 2\right)\right)\right)\right) \]
    9. Step-by-step derivation
      1. *-lowering-*.f6438.6%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, C\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right)\right), \mathsf{*.f64}\left(F, 2\right)\right)\right)\right) \]
    10. Simplified38.6%

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

    if -1.00000000000000004e48 < C < 6.79999999999999982

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{A + \left(C - \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}{B \cdot B + -4 \cdot \left(A \cdot C\right)} \cdot \left(2 \cdot F\right)\right)\right)\right) \]
    7. Applied egg-rr33.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(F, \mathsf{\_.f64}\left(A, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(A, A\right), \mathsf{*.f64}\left(B, B\right)\right)\right)\right)\right)\right), \left(B \cdot B\right)\right)\right)\right) \]
      13. *-lowering-*.f6419.0%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(F, \mathsf{\_.f64}\left(A, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(A, A\right), \mathsf{*.f64}\left(B, B\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right)\right) \]
    10. Simplified19.0%

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

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

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{\sqrt{2 \cdot \left(F \cdot \left(A - \sqrt{A \cdot A + B \cdot B}\right)\right)}}{\sqrt{B} \cdot \sqrt{B}}\right)\right) \]
      3. rem-square-sqrtN/A

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(2 \cdot \left(F \cdot \left(A - \sqrt{A \cdot A + B \cdot B}\right)\right)\right)\right), B\right)\right) \]
      6. associate-*r*N/A

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

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

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, F\right), \mathsf{\_.f64}\left(A, \left(\mathsf{hypot}\left(B, A\right)\right)\right)\right)\right), B\right)\right) \]
      12. hypot-lowering-hypot.f6417.3%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, F\right), \mathsf{\_.f64}\left(A, \mathsf{hypot.f64}\left(B, A\right)\right)\right)\right), B\right)\right) \]
    12. Applied egg-rr17.3%

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

    if 6.79999999999999982 < C

    1. Initial program 7.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 F around 0

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{A + \left(C - \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}{B \cdot B + -4 \cdot \left(A \cdot C\right)} \cdot \left(2 \cdot F\right)\right)\right)\right) \]
    7. Applied egg-rr15.1%

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

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{\left(-1 \cdot \frac{F}{C}\right)}\right)\right) \]
    9. Step-by-step derivation
      1. mul-1-negN/A

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{neg.f64}\left(\left(\frac{F}{C}\right)\right)\right)\right) \]
      3. /-lowering-/.f6442.2%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(F, C\right)\right)\right)\right) \]
    10. Simplified42.2%

      \[\leadsto -\sqrt{\color{blue}{-\frac{F}{C}}} \]
    11. Step-by-step derivation
      1. distribute-neg-fracN/A

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

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

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(\mathsf{neg}\left(F\right)\right), \frac{1}{2}\right), \left({C}^{\frac{1}{2}}\right)\right)\right) \]
      7. neg-sub0N/A

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, F\right), \frac{1}{2}\right), \left({C}^{\frac{1}{2}}\right)\right)\right) \]
      9. pow1/2N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, F\right), \frac{1}{2}\right), \left(\sqrt{C}\right)\right)\right) \]
      10. sqrt-lowering-sqrt.f6451.0%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, F\right), \frac{1}{2}\right), \mathsf{sqrt.f64}\left(C\right)\right)\right) \]
    12. Applied egg-rr51.0%

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

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

Alternative 5: 38.0% accurate, 2.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;A \leq -3.6 \cdot 10^{+58}:\\
\;\;\;\;\frac{{\left(0 - F\right)}^{0.5}}{0 - \sqrt{C}}\\

\mathbf{elif}\;A \leq 1.12 \cdot 10^{+27}:\\
\;\;\;\;\frac{\sqrt{2 \cdot \left(F \cdot \left(C - \mathsf{hypot}\left(B\_m, C\right)\right)\right)}}{0 - B\_m}\\

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


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

    1. Initial program 14.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 F around 0

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{A + \left(C - \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}{B \cdot B + -4 \cdot \left(A \cdot C\right)} \cdot \left(2 \cdot F\right)\right)\right)\right) \]
    7. Applied egg-rr26.7%

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

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{\left(-1 \cdot \frac{F}{C}\right)}\right)\right) \]
    9. Step-by-step derivation
      1. mul-1-negN/A

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{neg.f64}\left(\left(\frac{F}{C}\right)\right)\right)\right) \]
      3. /-lowering-/.f6437.2%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(F, C\right)\right)\right)\right) \]
    10. Simplified37.2%

      \[\leadsto -\sqrt{\color{blue}{-\frac{F}{C}}} \]
    11. Step-by-step derivation
      1. distribute-neg-fracN/A

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

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

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(\mathsf{neg}\left(F\right)\right), \frac{1}{2}\right), \left({C}^{\frac{1}{2}}\right)\right)\right) \]
      7. neg-sub0N/A

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, F\right), \frac{1}{2}\right), \left({C}^{\frac{1}{2}}\right)\right)\right) \]
      9. pow1/2N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, F\right), \frac{1}{2}\right), \left(\sqrt{C}\right)\right)\right) \]
      10. sqrt-lowering-sqrt.f6440.9%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, F\right), \frac{1}{2}\right), \mathsf{sqrt.f64}\left(C\right)\right)\right) \]
    12. Applied egg-rr40.9%

      \[\leadsto -\color{blue}{\frac{{\left(0 - F\right)}^{0.5}}{\sqrt{C}}} \]

    if -3.59999999999999996e58 < A < 1.12e27

    1. Initial program 27.9%

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

      \[\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. 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{B \cdot B + {C}^{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{B \cdot B + C \cdot C}\right)\right)\right)\right)\right) \]
      11. 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(B, C\right)\right)\right)\right)\right)\right) \]
      12. hypot-lowering-hypot.f6424.1%

        \[\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(B, C\right)\right)\right)\right)\right) \]
    5. Simplified24.1%

      \[\leadsto \color{blue}{\left(-1 \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F \cdot \left(C - \mathsf{hypot}\left(B, C\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{B \cdot B + C \cdot C}\right)}\right)} \]
      2. mul-1-negN/A

        \[\leadsto \mathsf{neg}\left(\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C - \sqrt{B \cdot B + C \cdot C}\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{B \cdot B + C \cdot C}\right)}\right)\right) \]
      4. associate-*l/N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{\sqrt{2} \cdot \sqrt{F \cdot \left(C - \sqrt{B \cdot B + C \cdot C}\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{B \cdot B + C \cdot C}\right)}\right), B\right)\right) \]
      6. sqrt-unprodN/A

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

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

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(F, \mathsf{\_.f64}\left(C, \left(\mathsf{hypot}\left(B, C\right)\right)\right)\right)\right)\right), B\right)\right) \]
      12. hypot-lowering-hypot.f6424.1%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(F, \mathsf{\_.f64}\left(C, \mathsf{hypot.f64}\left(B, C\right)\right)\right)\right)\right), B\right)\right) \]
    7. Applied egg-rr24.1%

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

    if 1.12e27 < A

    1. Initial program 1.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{A + \left(C - \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}{B \cdot B + -4 \cdot \left(A \cdot C\right)} \cdot \left(2 \cdot F\right)\right)\right)\right) \]
    7. Applied egg-rr10.2%

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(-1 \cdot F\right), A\right)\right)\right) \]
      3. mul-1-negN/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{neg}\left(F\right)\right), A\right)\right)\right) \]
      4. neg-lowering-neg.f6436.6%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{neg.f64}\left(F\right), A\right)\right)\right) \]
    10. Simplified36.6%

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

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

Alternative 6: 36.8% accurate, 2.9× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ \begin{array}{l} \mathbf{if}\;C \leq -3.4 \cdot 10^{+43}:\\ \;\;\;\;0 - \sqrt{\left(2 \cdot F\right) \cdot \frac{2 \cdot C}{B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)}}\\ \mathbf{elif}\;C \leq 2.75 \cdot 10^{-8}:\\ \;\;\;\;0 - \sqrt{\frac{F \cdot -2}{B\_m}}\\ \mathbf{else}:\\ \;\;\;\;\frac{{\left(0 - F\right)}^{0.5}}{0 - \sqrt{C}}\\ \end{array} \end{array} \]
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
 :precision binary64
 (if (<= C -3.4e+43)
   (- 0.0 (sqrt (* (* 2.0 F) (/ (* 2.0 C) (+ (* B_m B_m) (* -4.0 (* A C)))))))
   (if (<= C 2.75e-8)
     (- 0.0 (sqrt (/ (* F -2.0) B_m)))
     (/ (pow (- 0.0 F) 0.5) (- 0.0 (sqrt C))))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
	double tmp;
	if (C <= -3.4e+43) {
		tmp = 0.0 - sqrt(((2.0 * F) * ((2.0 * C) / ((B_m * B_m) + (-4.0 * (A * C))))));
	} else if (C <= 2.75e-8) {
		tmp = 0.0 - sqrt(((F * -2.0) / B_m));
	} else {
		tmp = pow((0.0 - F), 0.5) / (0.0 - sqrt(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 <= (-3.4d+43)) then
        tmp = 0.0d0 - sqrt(((2.0d0 * f) * ((2.0d0 * c) / ((b_m * b_m) + ((-4.0d0) * (a * c))))))
    else if (c <= 2.75d-8) then
        tmp = 0.0d0 - sqrt(((f * (-2.0d0)) / b_m))
    else
        tmp = ((0.0d0 - f) ** 0.5d0) / (0.0d0 - sqrt(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 <= -3.4e+43) {
		tmp = 0.0 - Math.sqrt(((2.0 * F) * ((2.0 * C) / ((B_m * B_m) + (-4.0 * (A * C))))));
	} else if (C <= 2.75e-8) {
		tmp = 0.0 - Math.sqrt(((F * -2.0) / B_m));
	} else {
		tmp = Math.pow((0.0 - F), 0.5) / (0.0 - Math.sqrt(C));
	}
	return tmp;
}
B_m = math.fabs(B)
def code(A, B_m, C, F):
	tmp = 0
	if C <= -3.4e+43:
		tmp = 0.0 - math.sqrt(((2.0 * F) * ((2.0 * C) / ((B_m * B_m) + (-4.0 * (A * C))))))
	elif C <= 2.75e-8:
		tmp = 0.0 - math.sqrt(((F * -2.0) / B_m))
	else:
		tmp = math.pow((0.0 - F), 0.5) / (0.0 - math.sqrt(C))
	return tmp
B_m = abs(B)
function code(A, B_m, C, F)
	tmp = 0.0
	if (C <= -3.4e+43)
		tmp = Float64(0.0 - sqrt(Float64(Float64(2.0 * F) * Float64(Float64(2.0 * C) / Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C)))))));
	elseif (C <= 2.75e-8)
		tmp = Float64(0.0 - sqrt(Float64(Float64(F * -2.0) / B_m)));
	else
		tmp = Float64((Float64(0.0 - F) ^ 0.5) / Float64(0.0 - sqrt(C)));
	end
	return tmp
end
B_m = abs(B);
function tmp_2 = code(A, B_m, C, F)
	tmp = 0.0;
	if (C <= -3.4e+43)
		tmp = 0.0 - sqrt(((2.0 * F) * ((2.0 * C) / ((B_m * B_m) + (-4.0 * (A * C))))));
	elseif (C <= 2.75e-8)
		tmp = 0.0 - sqrt(((F * -2.0) / B_m));
	else
		tmp = ((0.0 - F) ^ 0.5) / (0.0 - sqrt(C));
	end
	tmp_2 = tmp;
end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := If[LessEqual[C, -3.4e+43], N[(0.0 - N[Sqrt[N[(N[(2.0 * F), $MachinePrecision] * N[(N[(2.0 * C), $MachinePrecision] / N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 2.75e-8], N[(0.0 - N[Sqrt[N[(N[(F * -2.0), $MachinePrecision] / B$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Power[N[(0.0 - F), $MachinePrecision], 0.5], $MachinePrecision] / N[(0.0 - N[Sqrt[C], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
B_m = \left|B\right|

\\
\begin{array}{l}
\mathbf{if}\;C \leq -3.4 \cdot 10^{+43}:\\
\;\;\;\;0 - \sqrt{\left(2 \cdot F\right) \cdot \frac{2 \cdot C}{B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)}}\\

\mathbf{elif}\;C \leq 2.75 \cdot 10^{-8}:\\
\;\;\;\;0 - \sqrt{\frac{F \cdot -2}{B\_m}}\\

\mathbf{else}:\\
\;\;\;\;\frac{{\left(0 - F\right)}^{0.5}}{0 - \sqrt{C}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if C < -3.40000000000000012e43

    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 F around 0

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{A + \left(C - \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}{B \cdot B + -4 \cdot \left(A \cdot C\right)} \cdot \left(2 \cdot F\right)\right)\right)\right) \]
    7. Applied egg-rr37.0%

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

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\color{blue}{\left(2 \cdot C\right)}, \mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right)\right), \mathsf{*.f64}\left(F, 2\right)\right)\right)\right) \]
    9. Step-by-step derivation
      1. *-lowering-*.f6438.6%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, C\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right)\right)\right), \mathsf{*.f64}\left(F, 2\right)\right)\right)\right) \]
    10. Simplified38.6%

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

    if -3.40000000000000012e43 < C < 2.7500000000000001e-8

    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 F around 0

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{A + \left(C - \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}{B \cdot B + -4 \cdot \left(A \cdot C\right)} \cdot \left(2 \cdot F\right)\right)\right)\right) \]
    7. Applied egg-rr33.6%

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

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

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

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

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

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

    if 2.7500000000000001e-8 < C

    1. Initial program 7.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 F around 0

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{A + \left(C - \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}{B \cdot B + -4 \cdot \left(A \cdot C\right)} \cdot \left(2 \cdot F\right)\right)\right)\right) \]
    7. Applied egg-rr15.0%

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

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{\left(-1 \cdot \frac{F}{C}\right)}\right)\right) \]
    9. Step-by-step derivation
      1. mul-1-negN/A

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{neg.f64}\left(\left(\frac{F}{C}\right)\right)\right)\right) \]
      3. /-lowering-/.f6441.7%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(F, C\right)\right)\right)\right) \]
    10. Simplified41.7%

      \[\leadsto -\sqrt{\color{blue}{-\frac{F}{C}}} \]
    11. Step-by-step derivation
      1. distribute-neg-fracN/A

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

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

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(\mathsf{neg}\left(F\right)\right), \frac{1}{2}\right), \left({C}^{\frac{1}{2}}\right)\right)\right) \]
      7. neg-sub0N/A

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, F\right), \frac{1}{2}\right), \left({C}^{\frac{1}{2}}\right)\right)\right) \]
      9. pow1/2N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, F\right), \frac{1}{2}\right), \left(\sqrt{C}\right)\right)\right) \]
      10. sqrt-lowering-sqrt.f6450.4%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, F\right), \frac{1}{2}\right), \mathsf{sqrt.f64}\left(C\right)\right)\right) \]
    12. Applied egg-rr50.4%

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

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

Alternative 7: 34.1% accurate, 5.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;A \leq -4 \cdot 10^{-56}:\\
\;\;\;\;0 - \sqrt{\frac{F}{0 - C}}\\

\mathbf{elif}\;A \leq 5.1 \cdot 10^{-79}:\\
\;\;\;\;0 - \sqrt{\frac{F \cdot -2}{B\_m}}\\

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{A + \left(C - \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}{B \cdot B + -4 \cdot \left(A \cdot C\right)} \cdot \left(2 \cdot F\right)\right)\right)\right) \]
    7. Applied egg-rr26.1%

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

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{\left(-1 \cdot \frac{F}{C}\right)}\right)\right) \]
    9. Step-by-step derivation
      1. mul-1-negN/A

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{neg.f64}\left(\left(\frac{F}{C}\right)\right)\right)\right) \]
      3. /-lowering-/.f6435.9%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(F, C\right)\right)\right)\right) \]
    10. Simplified35.9%

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

    if -4.0000000000000002e-56 < A < 5.0999999999999999e-79

    1. Initial program 27.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 F around 0

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{A + \left(C - \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}{B \cdot B + -4 \cdot \left(A \cdot C\right)} \cdot \left(2 \cdot F\right)\right)\right)\right) \]
    7. Applied egg-rr36.2%

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(-2 \cdot F\right), B\right)\right)\right) \]
      3. *-lowering-*.f6418.7%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-2, F\right), B\right)\right)\right) \]
    10. Simplified18.7%

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

    if 5.0999999999999999e-79 < A

    1. Initial program 7.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 F around 0

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{A + \left(C - \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}{B \cdot B + -4 \cdot \left(A \cdot C\right)} \cdot \left(2 \cdot F\right)\right)\right)\right) \]
    7. Applied egg-rr23.0%

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(-1 \cdot F\right), A\right)\right)\right) \]
      3. mul-1-negN/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{neg}\left(F\right)\right), A\right)\right)\right) \]
      4. neg-lowering-neg.f6437.2%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{neg.f64}\left(F\right), A\right)\right)\right) \]
    10. Simplified37.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -4 \cdot 10^{-56}:\\ \;\;\;\;0 - \sqrt{\frac{F}{0 - C}}\\ \mathbf{elif}\;A \leq 5.1 \cdot 10^{-79}:\\ \;\;\;\;0 - \sqrt{\frac{F \cdot -2}{B}}\\ \mathbf{else}:\\ \;\;\;\;0 - \sqrt{\frac{F}{0 - A}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 26.3% accurate, 5.7× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ \begin{array}{l} \mathbf{if}\;C \leq 4.8 \cdot 10^{-247}:\\ \;\;\;\;0 - \sqrt{\frac{F}{0 - A}}\\ \mathbf{else}:\\ \;\;\;\;0 - \sqrt{\frac{F}{0 - C}}\\ \end{array} \end{array} \]
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
 :precision binary64
 (if (<= C 4.8e-247)
   (- 0.0 (sqrt (/ F (- 0.0 A))))
   (- 0.0 (sqrt (/ F (- 0.0 C))))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
	double tmp;
	if (C <= 4.8e-247) {
		tmp = 0.0 - sqrt((F / (0.0 - A)));
	} else {
		tmp = 0.0 - sqrt((F / (0.0 - 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 <= 4.8d-247) then
        tmp = 0.0d0 - sqrt((f / (0.0d0 - a)))
    else
        tmp = 0.0d0 - sqrt((f / (0.0d0 - 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 <= 4.8e-247) {
		tmp = 0.0 - Math.sqrt((F / (0.0 - A)));
	} else {
		tmp = 0.0 - Math.sqrt((F / (0.0 - C)));
	}
	return tmp;
}
B_m = math.fabs(B)
def code(A, B_m, C, F):
	tmp = 0
	if C <= 4.8e-247:
		tmp = 0.0 - math.sqrt((F / (0.0 - A)))
	else:
		tmp = 0.0 - math.sqrt((F / (0.0 - C)))
	return tmp
B_m = abs(B)
function code(A, B_m, C, F)
	tmp = 0.0
	if (C <= 4.8e-247)
		tmp = Float64(0.0 - sqrt(Float64(F / Float64(0.0 - A))));
	else
		tmp = Float64(0.0 - sqrt(Float64(F / Float64(0.0 - C))));
	end
	return tmp
end
B_m = abs(B);
function tmp_2 = code(A, B_m, C, F)
	tmp = 0.0;
	if (C <= 4.8e-247)
		tmp = 0.0 - sqrt((F / (0.0 - A)));
	else
		tmp = 0.0 - sqrt((F / (0.0 - C)));
	end
	tmp_2 = tmp;
end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := If[LessEqual[C, 4.8e-247], N[(0.0 - N[Sqrt[N[(F / N[(0.0 - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(0.0 - N[Sqrt[N[(F / N[(0.0 - C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|

\\
\begin{array}{l}
\mathbf{if}\;C \leq 4.8 \cdot 10^{-247}:\\
\;\;\;\;0 - \sqrt{\frac{F}{0 - A}}\\

\mathbf{else}:\\
\;\;\;\;0 - \sqrt{\frac{F}{0 - C}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if C < 4.80000000000000022e-247

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{A + \left(C - \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}{B \cdot B + -4 \cdot \left(A \cdot C\right)} \cdot \left(2 \cdot F\right)\right)\right)\right) \]
    7. Applied egg-rr32.7%

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(-1 \cdot F\right), A\right)\right)\right) \]
      3. mul-1-negN/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{neg}\left(F\right)\right), A\right)\right)\right) \]
      4. neg-lowering-neg.f6428.4%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{neg.f64}\left(F\right), A\right)\right)\right) \]
    10. Simplified28.4%

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

    if 4.80000000000000022e-247 < C

    1. Initial program 15.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{A + \left(C - \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}{B \cdot B + -4 \cdot \left(A \cdot C\right)} \cdot \left(2 \cdot F\right)\right)\right)\right) \]
    7. Applied egg-rr24.0%

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

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{\left(-1 \cdot \frac{F}{C}\right)}\right)\right) \]
    9. Step-by-step derivation
      1. mul-1-negN/A

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{neg.f64}\left(\left(\frac{F}{C}\right)\right)\right)\right) \]
      3. /-lowering-/.f6434.9%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(F, C\right)\right)\right)\right) \]
    10. Simplified34.9%

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

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

Alternative 9: 14.9% accurate, 5.9× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ 0 - \sqrt{\frac{F}{0 - C}} \end{array} \]
B_m = (fabs.f64 B)
(FPCore (A B_m C F) :precision binary64 (- 0.0 (sqrt (/ F (- 0.0 C)))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
	return 0.0 - sqrt((F / (0.0 - C)));
}
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 / (0.0d0 - c)))
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 / (0.0 - C)));
}
B_m = math.fabs(B)
def code(A, B_m, C, F):
	return 0.0 - math.sqrt((F / (0.0 - C)))
B_m = abs(B)
function code(A, B_m, C, F)
	return Float64(0.0 - sqrt(Float64(F / Float64(0.0 - C))))
end
B_m = abs(B);
function tmp = code(A, B_m, C, F)
	tmp = 0.0 - sqrt((F / (0.0 - C)));
end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := N[(0.0 - N[Sqrt[N[(F / N[(0.0 - C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
B_m = \left|B\right|

\\
0 - \sqrt{\frac{F}{0 - C}}
\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 F around 0

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{A + \left(C - \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)}{B \cdot B + -4 \cdot \left(A \cdot C\right)} \cdot \left(2 \cdot F\right)\right)\right)\right) \]
  7. Applied egg-rr28.5%

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

    \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{\left(-1 \cdot \frac{F}{C}\right)}\right)\right) \]
  9. Step-by-step derivation
    1. mul-1-negN/A

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

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{neg.f64}\left(\left(\frac{F}{C}\right)\right)\right)\right) \]
    3. /-lowering-/.f6418.0%

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(F, C\right)\right)\right)\right) \]
  10. Simplified18.0%

    \[\leadsto -\sqrt{\color{blue}{-\frac{F}{C}}} \]
  11. Final simplification18.0%

    \[\leadsto 0 - \sqrt{\frac{F}{0 - C}} \]
  12. Add Preprocessing

Reproduce

?
herbie shell --seed 2024163 
(FPCore (A B C F)
  :name "ABCF->ab-angle b"
  :precision binary64
  (/ (- (sqrt (* (* 2.0 (* (- (pow B 2.0) (* (* 4.0 A) C)) F)) (- (+ A C) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0))))))) (- (pow B 2.0) (* (* 4.0 A) C))))