ABCF->ab-angle a

Percentage Accurate: 19.6% → 58.8%
Time: 28.5s
Alternatives: 18
Speedup: 5.9×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 18 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.6% 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: 58.8% accurate, 0.3× speedup?

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

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

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

\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\frac{\sqrt{t\_0}}{t\_2 - B\_m \cdot B\_m} \cdot \sqrt{\left(2 \cdot F\right) \cdot t\_1}\\

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


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

    1. Initial program 35.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(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\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(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\right)}{{B}^{2} - 4 \cdot \left(A \cdot C\right)}} \cdot \sqrt{2}\right) \]
      2. neg-lowering-neg.f64N/A

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

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

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

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

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

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

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

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

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

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

    if -2.0000000000000002e-208 < (/.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))) < 4.00000000000000034e-86

    1. Initial program 10.8%

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(\left(2 \cdot F\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\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. pow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot \left(\left(2 \cdot F\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\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(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right), \left(\left(2 \cdot F\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\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) \]
      5. pow2N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right), \left(\left(2 \cdot F\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\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. sub-negN/A

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \left(\mathsf{neg}\left(\left(A \cdot C\right) \cdot 4\right)\right)\right), \left(\left(2 \cdot F\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\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) \]
      11. distribute-rgt-neg-inN/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(A, C\right), -4\right)\right), \mathsf{*.f64}\left(\left(2 \cdot F\right), \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\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. Applied egg-rr10.8%

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

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

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

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

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

    if 4.00000000000000034e-86 < (/.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 36.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. Applied egg-rr74.5%

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

    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(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\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(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\right)}{{B}^{2} - 4 \cdot \left(A \cdot C\right)}} \cdot \sqrt{2}\right) \]
      2. neg-lowering-neg.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 52.7% accurate, 1.9× speedup?

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

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

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

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


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

    1. Initial program 22.0%

      \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
    2. Add Preprocessing
    3. Applied egg-rr41.1%

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

    if 1.4e-105 < B < 2.8000000000000001e146

    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(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\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(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\right)}{{B}^{2} - 4 \cdot \left(A \cdot C\right)}} \cdot \sqrt{2}\right) \]
      2. neg-lowering-neg.f64N/A

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

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

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

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

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

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

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

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

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

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

    if 2.8000000000000001e146 < B

    1. Initial program 0.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(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\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(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\right)}{{B}^{2} - 4 \cdot \left(A \cdot C\right)}} \cdot \sqrt{2}\right) \]
      2. neg-lowering-neg.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 51.9% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;B\_m \leq 1.4 \cdot 10^{-139}:\\
\;\;\;\;\frac{\sqrt{F \cdot \left(C \cdot -16\right)} \cdot \left|A\right|}{4 \cdot \left(A \cdot C\right) - B\_m \cdot B\_m}\\

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

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


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

    1. Initial program 21.9%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-16, \left({A}^{2}\right)\right), \left(C \cdot F\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(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(-16, \left(A \cdot A\right)\right), \left(C \cdot F\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(-16, \mathsf{*.f64}\left(A, A\right)\right), \left(C \cdot F\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-*.f6410.1%

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(C \cdot F\right) \cdot \left(-16 \cdot \left(A \cdot A\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. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left(C \cdot F\right) \cdot -16\right) \cdot \left(A \cdot A\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) \]
      3. sqrt-prodN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(C \cdot F\right) \cdot -16} \cdot \sqrt{A \cdot A}\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) \]
      4. pow1/2N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(C \cdot F\right) \cdot -16} \cdot {\left(A \cdot A\right)}^{\frac{1}{2}}\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) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{\left(C \cdot F\right) \cdot -16}\right), \left({\left(A \cdot A\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. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\left(C \cdot F\right) \cdot -16\right)\right), \left({\left(A \cdot A\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{sqrt.f64}\left(\left(\left(F \cdot C\right) \cdot -16\right)\right), \left({\left(A \cdot A\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. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(F \cdot \left(C \cdot -16\right)\right)\right), \left({\left(A \cdot A\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. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(F \cdot \left(-16 \cdot C\right)\right)\right), \left({\left(A \cdot A\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) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \left(-16 \cdot C\right)\right)\right), \left({\left(A \cdot A\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) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \left(C \cdot -16\right)\right)\right), \left({\left(A \cdot A\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) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{*.f64}\left(C, -16\right)\right)\right), \left({\left(A \cdot A\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) \]
      13. pow1/2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{*.f64}\left(C, -16\right)\right)\right), \left(\sqrt{A \cdot A}\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) \]
      14. rem-sqrt-squareN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{*.f64}\left(C, -16\right)\right)\right), \left(\left|A\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) \]
      15. fabs-lowering-fabs.f6417.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{*.f64}\left(C, -16\right)\right)\right), \mathsf{fabs.f64}\left(A\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) \]
    9. Applied egg-rr17.9%

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

    if 1.3999999999999999e-139 < B < 2.8000000000000001e146

    1. Initial program 18.8%

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.8000000000000001e146 < B

    1. Initial program 0.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(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\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(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\right)}{{B}^{2} - 4 \cdot \left(A \cdot C\right)}} \cdot \sqrt{2}\right) \]
      2. neg-lowering-neg.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 46.8% accurate, 2.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;B\_m \leq 2.8 \cdot 10^{-136}:\\
\;\;\;\;\frac{\sqrt{F \cdot \left(C \cdot -16\right)} \cdot \left|A\right|}{4 \cdot \left(A \cdot C\right) - B\_m \cdot B\_m}\\

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

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


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

    1. Initial program 21.9%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-16, \left({A}^{2}\right)\right), \left(C \cdot F\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(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(-16, \left(A \cdot A\right)\right), \left(C \cdot F\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(-16, \mathsf{*.f64}\left(A, A\right)\right), \left(C \cdot F\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-*.f6410.1%

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(C \cdot F\right) \cdot \left(-16 \cdot \left(A \cdot A\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. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left(C \cdot F\right) \cdot -16\right) \cdot \left(A \cdot A\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) \]
      3. sqrt-prodN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(C \cdot F\right) \cdot -16} \cdot \sqrt{A \cdot A}\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) \]
      4. pow1/2N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(C \cdot F\right) \cdot -16} \cdot {\left(A \cdot A\right)}^{\frac{1}{2}}\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) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{\left(C \cdot F\right) \cdot -16}\right), \left({\left(A \cdot A\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. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\left(C \cdot F\right) \cdot -16\right)\right), \left({\left(A \cdot A\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{sqrt.f64}\left(\left(\left(F \cdot C\right) \cdot -16\right)\right), \left({\left(A \cdot A\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. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(F \cdot \left(C \cdot -16\right)\right)\right), \left({\left(A \cdot A\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. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(F \cdot \left(-16 \cdot C\right)\right)\right), \left({\left(A \cdot A\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) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \left(-16 \cdot C\right)\right)\right), \left({\left(A \cdot A\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) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \left(C \cdot -16\right)\right)\right), \left({\left(A \cdot A\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) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{*.f64}\left(C, -16\right)\right)\right), \left({\left(A \cdot A\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) \]
      13. pow1/2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{*.f64}\left(C, -16\right)\right)\right), \left(\sqrt{A \cdot A}\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) \]
      14. rem-sqrt-squareN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{*.f64}\left(C, -16\right)\right)\right), \left(\left|A\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) \]
      15. fabs-lowering-fabs.f6417.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{*.f64}\left(C, -16\right)\right)\right), \mathsf{fabs.f64}\left(A\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) \]
    9. Applied egg-rr17.9%

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

    if 2.8000000000000001e-136 < B < 8.9999999999999996e58

    1. Initial program 17.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.9999999999999996e58 < B

    1. Initial program 6.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(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\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(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\right)}{{B}^{2} - 4 \cdot \left(A \cdot C\right)}} \cdot \sqrt{2}\right) \]
      2. neg-lowering-neg.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 43.3% accurate, 2.8× speedup?

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

\\
\begin{array}{l}
t_0 := 0 - \sqrt{2 \cdot F}\\
\mathbf{if}\;C \leq -4.2 \cdot 10^{-60}:\\
\;\;\;\;\sqrt{\frac{-0.5}{C}} \cdot t\_0\\

\mathbf{elif}\;C \leq 7.5 \cdot 10^{+99}:\\
\;\;\;\;0 - \frac{{\left(2 \cdot F\right)}^{0.5}}{\sqrt{B\_m}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if C < -4.19999999999999982e-60

    1. Initial program 6.5%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, F\right)\right), \mathsf{sqrt.f64}\left(\color{blue}{\left(\frac{\frac{-1}{2}}{C}\right)}\right)\right)\right) \]
    9. Step-by-step derivation
      1. /-lowering-/.f6446.7%

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

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

    if -4.19999999999999982e-60 < C < 7.49999999999999963e99

    1. Initial program 28.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(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\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(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\right)}{{B}^{2} - 4 \cdot \left(A \cdot C\right)}} \cdot \sqrt{2}\right) \]
      2. neg-lowering-neg.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.49999999999999963e99 < C

    1. Initial program 7.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(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\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(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\right)}{{B}^{2} - 4 \cdot \left(A \cdot C\right)}} \cdot \sqrt{2}\right) \]
      2. neg-lowering-neg.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 43.9% accurate, 2.8× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ \begin{array}{l} t_0 := 0 - \sqrt{2 \cdot F}\\ \mathbf{if}\;C \leq -4.2 \cdot 10^{-60}:\\ \;\;\;\;\sqrt{\frac{-0.5}{C}} \cdot t\_0\\ \mathbf{elif}\;C \leq 1.3 \cdot 10^{+104}:\\ \;\;\;\;0 - \frac{{\left(2 \cdot F\right)}^{0.5}}{\sqrt{B\_m}}\\ \mathbf{elif}\;C \leq 1.45 \cdot 10^{+228}:\\ \;\;\;\;\frac{-1}{\frac{B\_m \cdot B\_m - A \cdot \left(4 \cdot C\right)}{C \cdot \sqrt{F \cdot \left(A \cdot -16\right)}}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{-0.5}{A}} \cdot t\_0\\ \end{array} \end{array} \]
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
 :precision binary64
 (let* ((t_0 (- 0.0 (sqrt (* 2.0 F)))))
   (if (<= C -4.2e-60)
     (* (sqrt (/ -0.5 C)) t_0)
     (if (<= C 1.3e+104)
       (- 0.0 (/ (pow (* 2.0 F) 0.5) (sqrt B_m)))
       (if (<= C 1.45e+228)
         (/
          -1.0
          (/ (- (* B_m B_m) (* A (* 4.0 C))) (* C (sqrt (* F (* A -16.0))))))
         (* (sqrt (/ -0.5 A)) t_0))))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
	double t_0 = 0.0 - sqrt((2.0 * F));
	double tmp;
	if (C <= -4.2e-60) {
		tmp = sqrt((-0.5 / C)) * t_0;
	} else if (C <= 1.3e+104) {
		tmp = 0.0 - (pow((2.0 * F), 0.5) / sqrt(B_m));
	} else if (C <= 1.45e+228) {
		tmp = -1.0 / (((B_m * B_m) - (A * (4.0 * C))) / (C * sqrt((F * (A * -16.0)))));
	} else {
		tmp = sqrt((-0.5 / A)) * t_0;
	}
	return tmp;
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
    real(8), intent (in) :: a
    real(8), intent (in) :: b_m
    real(8), intent (in) :: c
    real(8), intent (in) :: f
    real(8) :: t_0
    real(8) :: tmp
    t_0 = 0.0d0 - sqrt((2.0d0 * f))
    if (c <= (-4.2d-60)) then
        tmp = sqrt(((-0.5d0) / c)) * t_0
    else if (c <= 1.3d+104) then
        tmp = 0.0d0 - (((2.0d0 * f) ** 0.5d0) / sqrt(b_m))
    else if (c <= 1.45d+228) then
        tmp = (-1.0d0) / (((b_m * b_m) - (a * (4.0d0 * c))) / (c * sqrt((f * (a * (-16.0d0))))))
    else
        tmp = sqrt(((-0.5d0) / a)) * t_0
    end if
    code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
	double t_0 = 0.0 - Math.sqrt((2.0 * F));
	double tmp;
	if (C <= -4.2e-60) {
		tmp = Math.sqrt((-0.5 / C)) * t_0;
	} else if (C <= 1.3e+104) {
		tmp = 0.0 - (Math.pow((2.0 * F), 0.5) / Math.sqrt(B_m));
	} else if (C <= 1.45e+228) {
		tmp = -1.0 / (((B_m * B_m) - (A * (4.0 * C))) / (C * Math.sqrt((F * (A * -16.0)))));
	} else {
		tmp = Math.sqrt((-0.5 / A)) * t_0;
	}
	return tmp;
}
B_m = math.fabs(B)
def code(A, B_m, C, F):
	t_0 = 0.0 - math.sqrt((2.0 * F))
	tmp = 0
	if C <= -4.2e-60:
		tmp = math.sqrt((-0.5 / C)) * t_0
	elif C <= 1.3e+104:
		tmp = 0.0 - (math.pow((2.0 * F), 0.5) / math.sqrt(B_m))
	elif C <= 1.45e+228:
		tmp = -1.0 / (((B_m * B_m) - (A * (4.0 * C))) / (C * math.sqrt((F * (A * -16.0)))))
	else:
		tmp = math.sqrt((-0.5 / A)) * t_0
	return tmp
B_m = abs(B)
function code(A, B_m, C, F)
	t_0 = Float64(0.0 - sqrt(Float64(2.0 * F)))
	tmp = 0.0
	if (C <= -4.2e-60)
		tmp = Float64(sqrt(Float64(-0.5 / C)) * t_0);
	elseif (C <= 1.3e+104)
		tmp = Float64(0.0 - Float64((Float64(2.0 * F) ^ 0.5) / sqrt(B_m)));
	elseif (C <= 1.45e+228)
		tmp = Float64(-1.0 / Float64(Float64(Float64(B_m * B_m) - Float64(A * Float64(4.0 * C))) / Float64(C * sqrt(Float64(F * Float64(A * -16.0))))));
	else
		tmp = Float64(sqrt(Float64(-0.5 / A)) * t_0);
	end
	return tmp
end
B_m = abs(B);
function tmp_2 = code(A, B_m, C, F)
	t_0 = 0.0 - sqrt((2.0 * F));
	tmp = 0.0;
	if (C <= -4.2e-60)
		tmp = sqrt((-0.5 / C)) * t_0;
	elseif (C <= 1.3e+104)
		tmp = 0.0 - (((2.0 * F) ^ 0.5) / sqrt(B_m));
	elseif (C <= 1.45e+228)
		tmp = -1.0 / (((B_m * B_m) - (A * (4.0 * C))) / (C * sqrt((F * (A * -16.0)))));
	else
		tmp = sqrt((-0.5 / A)) * t_0;
	end
	tmp_2 = tmp;
end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(0.0 - N[Sqrt[N[(2.0 * F), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -4.2e-60], N[(N[Sqrt[N[(-0.5 / C), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[C, 1.3e+104], N[(0.0 - N[(N[Power[N[(2.0 * F), $MachinePrecision], 0.5], $MachinePrecision] / N[Sqrt[B$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.45e+228], N[(-1.0 / N[(N[(N[(B$95$m * B$95$m), $MachinePrecision] - N[(A * N[(4.0 * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(C * N[Sqrt[N[(F * N[(A * -16.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(-0.5 / A), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
B_m = \left|B\right|

\\
\begin{array}{l}
t_0 := 0 - \sqrt{2 \cdot F}\\
\mathbf{if}\;C \leq -4.2 \cdot 10^{-60}:\\
\;\;\;\;\sqrt{\frac{-0.5}{C}} \cdot t\_0\\

\mathbf{elif}\;C \leq 1.3 \cdot 10^{+104}:\\
\;\;\;\;0 - \frac{{\left(2 \cdot F\right)}^{0.5}}{\sqrt{B\_m}}\\

\mathbf{elif}\;C \leq 1.45 \cdot 10^{+228}:\\
\;\;\;\;\frac{-1}{\frac{B\_m \cdot B\_m - A \cdot \left(4 \cdot C\right)}{C \cdot \sqrt{F \cdot \left(A \cdot -16\right)}}}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{-0.5}{A}} \cdot t\_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if C < -4.19999999999999982e-60

    1. Initial program 6.5%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, F\right)\right), \mathsf{sqrt.f64}\left(\color{blue}{\left(\frac{\frac{-1}{2}}{C}\right)}\right)\right)\right) \]
    9. Step-by-step derivation
      1. /-lowering-/.f6446.7%

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

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

    if -4.19999999999999982e-60 < C < 1.3e104

    1. Initial program 28.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(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\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(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\right)}{{B}^{2} - 4 \cdot \left(A \cdot C\right)}} \cdot \sqrt{2}\right) \]
      2. neg-lowering-neg.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.3e104 < C < 1.45000000000000001e228

    1. Initial program 9.9%

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

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

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

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

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{\left(-16 \cdot \left(A \cdot \left({C}^{2} \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 \cdot \left({C}^{2} \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(A, \left({C}^{2} \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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, \mathsf{*.f64}\left(\left({C}^{2}\right), 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(-16, \mathsf{*.f64}\left(A, \mathsf{*.f64}\left(\left(C \cdot C\right), 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-*.f646.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, \mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), 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. Simplified6.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.45000000000000001e228 < C

    1. Initial program 2.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(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\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(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\right)}{{B}^{2} - 4 \cdot \left(A \cdot C\right)}} \cdot \sqrt{2}\right) \]
      2. neg-lowering-neg.f64N/A

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, F\right)\right), \mathsf{sqrt.f64}\left(\color{blue}{\left(\frac{\frac{-1}{2}}{A}\right)}\right)\right)\right) \]
    9. Step-by-step derivation
      1. /-lowering-/.f6448.0%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\frac{-1}{2}, A\right)\right)\right)\right) \]
    10. Simplified48.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -4.2 \cdot 10^{-60}:\\ \;\;\;\;\sqrt{\frac{-0.5}{C}} \cdot \left(0 - \sqrt{2 \cdot F}\right)\\ \mathbf{elif}\;C \leq 1.3 \cdot 10^{+104}:\\ \;\;\;\;0 - \frac{{\left(2 \cdot F\right)}^{0.5}}{\sqrt{B}}\\ \mathbf{elif}\;C \leq 1.45 \cdot 10^{+228}:\\ \;\;\;\;\frac{-1}{\frac{B \cdot B - A \cdot \left(4 \cdot C\right)}{C \cdot \sqrt{F \cdot \left(A \cdot -16\right)}}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{-0.5}{A}} \cdot \left(0 - \sqrt{2 \cdot F}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 41.8% accurate, 2.8× speedup?

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

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

\mathbf{elif}\;C \leq 4.5 \cdot 10^{+104}:\\
\;\;\;\;0 - \frac{{\left(2 \cdot F\right)}^{0.5}}{\sqrt{B\_m}}\\

\mathbf{elif}\;C \leq 3.5 \cdot 10^{+228}:\\
\;\;\;\;\frac{-1}{\frac{B\_m \cdot B\_m - A \cdot \left(4 \cdot C\right)}{C \cdot \sqrt{F \cdot \left(A \cdot -16\right)}}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if C < -6.49999999999999992e63

    1. Initial program 0.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(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\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(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\right)}{{B}^{2} - 4 \cdot \left(A \cdot C\right)}} \cdot \sqrt{2}\right) \]
      2. neg-lowering-neg.f64N/A

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

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

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(F, C\right)\right)\right), \mathsf{sqrt.f64}\left(2\right)\right)\right) \]
    8. Simplified34.8%

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

    if -6.49999999999999992e63 < C < 4.4999999999999998e104

    1. Initial program 27.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(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\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(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\right)}{{B}^{2} - 4 \cdot \left(A \cdot C\right)}} \cdot \sqrt{2}\right) \]
      2. neg-lowering-neg.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.4999999999999998e104 < C < 3.5000000000000002e228

    1. Initial program 9.9%

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

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

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

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

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{\left(-16 \cdot \left(A \cdot \left({C}^{2} \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 \cdot \left({C}^{2} \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(A, \left({C}^{2} \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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, \mathsf{*.f64}\left(\left({C}^{2}\right), 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(-16, \mathsf{*.f64}\left(A, \mathsf{*.f64}\left(\left(C \cdot C\right), 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-*.f646.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, \mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), 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. Simplified6.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.5000000000000002e228 < C

    1. Initial program 2.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(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\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(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\right)}{{B}^{2} - 4 \cdot \left(A \cdot C\right)}} \cdot \sqrt{2}\right) \]
      2. neg-lowering-neg.f64N/A

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

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

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

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{\left(\frac{-1}{2} \cdot \frac{F}{A}\right)}\right), \mathsf{sqrt.f64}\left(2\right)\right)\right) \]
    7. Step-by-step derivation
      1. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(F, A\right)\right)\right), \mathsf{sqrt.f64}\left(2\right)\right)\right) \]
    8. Simplified44.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -6.5 \cdot 10^{+63}:\\ \;\;\;\;\sqrt{-0.5 \cdot \frac{F}{C}} \cdot \left(0 - \sqrt{2}\right)\\ \mathbf{elif}\;C \leq 4.5 \cdot 10^{+104}:\\ \;\;\;\;0 - \frac{{\left(2 \cdot F\right)}^{0.5}}{\sqrt{B}}\\ \mathbf{elif}\;C \leq 3.5 \cdot 10^{+228}:\\ \;\;\;\;\frac{-1}{\frac{B \cdot B - A \cdot \left(4 \cdot C\right)}{C \cdot \sqrt{F \cdot \left(A \cdot -16\right)}}}\\ \mathbf{else}:\\ \;\;\;\;0 - \sqrt{2} \cdot \sqrt{-0.5 \cdot \frac{F}{A}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 43.3% accurate, 2.9× speedup?

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

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

\mathbf{elif}\;B\_m \leq 95000000:\\
\;\;\;\;\sqrt{\frac{-0.5}{A}} \cdot \left(0 - \sqrt{2 \cdot F}\right)\\

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


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

    1. Initial program 21.9%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-16, \left({A}^{2}\right)\right), \left(C \cdot F\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(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(-16, \left(A \cdot A\right)\right), \left(C \cdot F\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(-16, \mathsf{*.f64}\left(A, A\right)\right), \left(C \cdot F\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-*.f6410.1%

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(C \cdot F\right) \cdot \left(-16 \cdot \left(A \cdot A\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. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(\left(C \cdot F\right) \cdot -16\right) \cdot \left(A \cdot A\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) \]
      3. sqrt-prodN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(C \cdot F\right) \cdot -16} \cdot \sqrt{A \cdot A}\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) \]
      4. pow1/2N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(C \cdot F\right) \cdot -16} \cdot {\left(A \cdot A\right)}^{\frac{1}{2}}\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) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{\left(C \cdot F\right) \cdot -16}\right), \left({\left(A \cdot A\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. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\left(C \cdot F\right) \cdot -16\right)\right), \left({\left(A \cdot A\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{sqrt.f64}\left(\left(\left(F \cdot C\right) \cdot -16\right)\right), \left({\left(A \cdot A\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. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(F \cdot \left(C \cdot -16\right)\right)\right), \left({\left(A \cdot A\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. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(F \cdot \left(-16 \cdot C\right)\right)\right), \left({\left(A \cdot A\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) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \left(-16 \cdot C\right)\right)\right), \left({\left(A \cdot A\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) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \left(C \cdot -16\right)\right)\right), \left({\left(A \cdot A\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) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{*.f64}\left(C, -16\right)\right)\right), \left({\left(A \cdot A\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) \]
      13. pow1/2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{*.f64}\left(C, -16\right)\right)\right), \left(\sqrt{A \cdot A}\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) \]
      14. rem-sqrt-squareN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{*.f64}\left(C, -16\right)\right)\right), \left(\left|A\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) \]
      15. fabs-lowering-fabs.f6417.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{*.f64}\left(C, -16\right)\right)\right), \mathsf{fabs.f64}\left(A\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) \]
    9. Applied egg-rr17.9%

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

    if 3.40000000000000014e-137 < B < 9.5e7

    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(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\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(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\right)}{{B}^{2} - 4 \cdot \left(A \cdot C\right)}} \cdot \sqrt{2}\right) \]
      2. neg-lowering-neg.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.5e7 < B

    1. Initial program 7.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 41.5% accurate, 2.9× speedup?

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

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

\mathbf{elif}\;B\_m \leq 64000000:\\
\;\;\;\;\sqrt{\frac{-0.5}{A}} \cdot \left(0 - \sqrt{2 \cdot F}\right)\\

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


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

    1. Initial program 21.2%

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(\left(2 \cdot F\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\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. pow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot \left(\left(2 \cdot F\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\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(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right), \left(\left(2 \cdot F\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\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) \]
      5. pow2N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right), \left(\left(2 \cdot F\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\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. sub-negN/A

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \left(\mathsf{neg}\left(\left(A \cdot C\right) \cdot 4\right)\right)\right), \left(\left(2 \cdot F\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\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) \]
      11. distribute-rgt-neg-inN/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(A, C\right), -4\right)\right), \mathsf{*.f64}\left(\left(2 \cdot F\right), \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\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. Applied egg-rr27.2%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(A, C\right), -4\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, F\right), \color{blue}{\left(2 \cdot A\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) \]
    8. Step-by-step derivation
      1. *-lowering-*.f6412.2%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(A, C\right), -4\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, F\right), \mathsf{*.f64}\left(2, A\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. Simplified12.2%

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

    if 1.31999999999999992e-276 < B < 6.4e7

    1. Initial program 21.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(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\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(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\right)}{{B}^{2} - 4 \cdot \left(A \cdot C\right)}} \cdot \sqrt{2}\right) \]
      2. neg-lowering-neg.f64N/A

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, F\right)\right), \mathsf{sqrt.f64}\left(\color{blue}{\left(\frac{\frac{-1}{2}}{A}\right)}\right)\right)\right) \]
    9. Step-by-step derivation
      1. /-lowering-/.f6432.5%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\frac{-1}{2}, A\right)\right)\right)\right) \]
    10. Simplified32.5%

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

    if 6.4e7 < B

    1. Initial program 7.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 41.3% accurate, 2.9× speedup?

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

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

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

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


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

    1. Initial program 21.9%

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(\left(2 \cdot F\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\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. pow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot \left(\left(2 \cdot F\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\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(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right), \left(\left(2 \cdot F\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\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) \]
      5. pow2N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right), \left(\left(2 \cdot F\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\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. sub-negN/A

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \left(\mathsf{neg}\left(\left(A \cdot C\right) \cdot 4\right)\right)\right), \left(\left(2 \cdot F\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\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) \]
      11. distribute-rgt-neg-inN/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(A, C\right), -4\right)\right), \mathsf{*.f64}\left(\left(2 \cdot F\right), \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\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. Applied egg-rr27.5%

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

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

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

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

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

    if 7.59999999999999997e-137 < B < 6.5000000000000001e-91

    1. Initial program 19.2%

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

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

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

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

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

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{\left(\frac{-1}{2} \cdot \frac{F}{A}\right)}\right), \mathsf{sqrt.f64}\left(2\right)\right)\right) \]
    7. Step-by-step derivation
      1. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{/.f64}\left(F, A\right)\right)\right), \mathsf{sqrt.f64}\left(2\right)\right)\right) \]
    8. Simplified35.1%

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

    if 6.5000000000000001e-91 < B

    1. Initial program 9.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(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\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(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\right)}{{B}^{2} - 4 \cdot \left(A \cdot C\right)}} \cdot \sqrt{2}\right) \]
      2. neg-lowering-neg.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 40.9% accurate, 3.0× speedup?

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

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

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


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

    1. Initial program 21.7%

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(\left(2 \cdot F\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\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. pow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot \left(\left(2 \cdot F\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\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(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right), \left(\left(2 \cdot F\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\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) \]
      5. pow2N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right), \left(\left(2 \cdot F\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\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. sub-negN/A

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \left(\mathsf{neg}\left(\left(A \cdot C\right) \cdot 4\right)\right)\right), \left(\left(2 \cdot F\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\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) \]
      11. distribute-rgt-neg-inN/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(A, C\right), -4\right)\right), \mathsf{*.f64}\left(\left(2 \cdot F\right), \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\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. Applied egg-rr27.3%

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

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

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

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

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

    if 3.8000000000000003e-133 < B

    1. Initial program 11.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(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\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(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\right)}{{B}^{2} - 4 \cdot \left(A \cdot C\right)}} \cdot \sqrt{2}\right) \]
      2. neg-lowering-neg.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 40.9% accurate, 3.0× speedup?

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

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

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


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

    1. Initial program 21.7%

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(\left(2 \cdot F\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\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. pow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot \left(\left(2 \cdot F\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\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(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right), \left(\left(2 \cdot F\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\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) \]
      5. pow2N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right), \left(\left(2 \cdot F\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\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. sub-negN/A

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \left(\mathsf{neg}\left(\left(A \cdot C\right) \cdot 4\right)\right)\right), \left(\left(2 \cdot F\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\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) \]
      11. distribute-rgt-neg-inN/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(A, C\right), -4\right)\right), \mathsf{*.f64}\left(\left(2 \cdot F\right), \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\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. Applied egg-rr27.3%

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

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

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

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

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

    if 4.50000000000000009e-133 < B

    1. Initial program 11.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(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\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(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\right)}{{B}^{2} - 4 \cdot \left(A \cdot C\right)}} \cdot \sqrt{2}\right) \]
      2. neg-lowering-neg.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto -\sqrt{2 \cdot F} \cdot \color{blue}{\sqrt{\frac{1}{B}}} \]
    11. Step-by-step derivation
      1. inv-powN/A

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, F\right)\right), \left({B}^{\frac{-1}{2}}\right)\right)\right) \]
      4. pow-lowering-pow.f6449.3%

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

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

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

Alternative 13: 31.9% accurate, 4.8× speedup?

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

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

\mathbf{elif}\;B\_m \leq 6 \cdot 10^{+19}:\\
\;\;\;\;\frac{C \cdot {\left(F \cdot \left(A \cdot -16\right)\right)}^{0.5}}{A \cdot \left(4 \cdot C\right) - B\_m \cdot B\_m}\\

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


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

    1. Initial program 21.3%

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(\left(B \cdot B - \left(4 \cdot A\right) \cdot C\right) \cdot \left(\left(2 \cdot F\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\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. pow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot \left(\left(2 \cdot F\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\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(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right), \left(\left(2 \cdot F\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\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) \]
      5. pow2N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right), \left(\left(2 \cdot F\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\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. sub-negN/A

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \left(\mathsf{neg}\left(\left(A \cdot C\right) \cdot 4\right)\right)\right), \left(\left(2 \cdot F\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\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) \]
      11. distribute-rgt-neg-inN/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(A, C\right), -4\right)\right), \mathsf{*.f64}\left(\left(2 \cdot F\right), \left(\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\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. Applied egg-rr27.3%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(A, C\right), -4\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, F\right), \color{blue}{\left(2 \cdot A\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) \]
    8. Step-by-step derivation
      1. *-lowering-*.f6412.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(A, C\right), -4\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, F\right), \mathsf{*.f64}\left(2, A\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. Simplified12.3%

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

    if 6.20000000000000027e-282 < B < 6e19

    1. Initial program 19.7%

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

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

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

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

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{\left(-16 \cdot \left(A \cdot \left({C}^{2} \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 \cdot \left({C}^{2} \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(A, \left({C}^{2} \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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, \mathsf{*.f64}\left(\left({C}^{2}\right), 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(-16, \mathsf{*.f64}\left(A, \mathsf{*.f64}\left(\left(C \cdot C\right), 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-*.f6417.8%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, \mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), 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. Simplified17.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\left({\left(F \cdot \left(A \cdot -16\right)\right)}^{\frac{1}{2}} \cdot {C}^{\left(\frac{2}{2}\right)}\right), \left(A \cdot \color{blue}{\left(C \cdot 4\right)} - B \cdot B\right)\right) \]
      10. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(F \cdot \left(A \cdot -16\right)\right)}^{\frac{1}{2}} \cdot {C}^{1}\right), \left(A \cdot \left(C \cdot \color{blue}{4}\right) - B \cdot B\right)\right) \]
      11. metadata-evalN/A

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

        \[\leadsto \mathsf{/.f64}\left(\left({\left(F \cdot \left(A \cdot -16\right)\right)}^{\frac{1}{2}} \cdot \frac{1}{{C}^{-1}}\right), \left(A \cdot \color{blue}{\left(C \cdot 4\right)} - B \cdot B\right)\right) \]
      13. inv-powN/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(F \cdot \left(A \cdot -16\right)\right)}^{\frac{1}{2}} \cdot \frac{1}{\frac{1}{C}}\right), \left(A \cdot \left(C \cdot \color{blue}{4}\right) - B \cdot B\right)\right) \]
      14. remove-double-divN/A

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

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

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

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

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

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

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

    if 6e19 < B

    1. Initial program 7.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{pow.f64}\left(\left(\left(2 \cdot F\right) \cdot \frac{1}{B}\right), \frac{1}{2}\right)\right) \]
      4. un-div-invN/A

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(\left(2 \cdot F\right), B\right), \frac{1}{2}\right)\right) \]
      6. *-lowering-*.f6456.3%

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

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

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

Alternative 14: 32.1% accurate, 5.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;B\_m \leq 2.3 \cdot 10^{+19}:\\
\;\;\;\;\frac{C \cdot {\left(F \cdot \left(A \cdot -16\right)\right)}^{0.5}}{A \cdot \left(4 \cdot C\right) - B\_m \cdot B\_m}\\

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


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

    1. Initial program 20.8%

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

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

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

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

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{\left(-16 \cdot \left(A \cdot \left({C}^{2} \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 \cdot \left({C}^{2} \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(A, \left({C}^{2} \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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, \mathsf{*.f64}\left(\left({C}^{2}\right), 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(-16, \mathsf{*.f64}\left(A, \mathsf{*.f64}\left(\left(C \cdot C\right), 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-*.f649.7%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, \mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), 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. Simplified9.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{1}{\frac{A \cdot \left(C \cdot 4\right) - B \cdot B}{\sqrt{F \cdot \left(A \cdot \left(-16 \cdot \left(C \cdot C\right)\right)\right)}}}} \]
    10. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \frac{\sqrt{F \cdot \left(A \cdot \left(-16 \cdot \left(C \cdot C\right)\right)\right)}}{\color{blue}{A \cdot \left(C \cdot 4\right) - B \cdot B}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{F \cdot \left(A \cdot \left(-16 \cdot \left(C \cdot C\right)\right)\right)}\right), \color{blue}{\left(A \cdot \left(C \cdot 4\right) - B \cdot B\right)}\right) \]
      3. pow1/2N/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(F \cdot \left(A \cdot \left(-16 \cdot \left(C \cdot C\right)\right)\right)\right)}^{\frac{1}{2}}\right), \left(\color{blue}{A \cdot \left(C \cdot 4\right)} - B \cdot B\right)\right) \]
      4. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(F \cdot \left(\left(A \cdot -16\right) \cdot \left(C \cdot C\right)\right)\right)}^{\frac{1}{2}}\right), \left(A \cdot \left(C \cdot 4\right) - B \cdot B\right)\right) \]
      5. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\left(F \cdot \left(A \cdot -16\right)\right) \cdot \left(C \cdot C\right)\right)}^{\frac{1}{2}}\right), \left(\color{blue}{A} \cdot \left(C \cdot 4\right) - B \cdot B\right)\right) \]
      6. unpow-prod-downN/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(F \cdot \left(A \cdot -16\right)\right)}^{\frac{1}{2}} \cdot {\left(C \cdot C\right)}^{\frac{1}{2}}\right), \left(\color{blue}{A \cdot \left(C \cdot 4\right)} - B \cdot B\right)\right) \]
      7. pow1/2N/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(F \cdot \left(A \cdot -16\right)\right)}^{\frac{1}{2}} \cdot \sqrt{C \cdot C}\right), \left(A \cdot \color{blue}{\left(C \cdot 4\right)} - B \cdot B\right)\right) \]
      8. pow2N/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(F \cdot \left(A \cdot -16\right)\right)}^{\frac{1}{2}} \cdot \sqrt{{C}^{2}}\right), \left(A \cdot \left(\color{blue}{C} \cdot 4\right) - B \cdot B\right)\right) \]
      9. sqrt-pow1N/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(F \cdot \left(A \cdot -16\right)\right)}^{\frac{1}{2}} \cdot {C}^{\left(\frac{2}{2}\right)}\right), \left(A \cdot \color{blue}{\left(C \cdot 4\right)} - B \cdot B\right)\right) \]
      10. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(F \cdot \left(A \cdot -16\right)\right)}^{\frac{1}{2}} \cdot {C}^{1}\right), \left(A \cdot \left(C \cdot \color{blue}{4}\right) - B \cdot B\right)\right) \]
      11. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(F \cdot \left(A \cdot -16\right)\right)}^{\frac{1}{2}} \cdot {C}^{\left(\mathsf{neg}\left(-1\right)\right)}\right), \left(A \cdot \left(C \cdot \color{blue}{4}\right) - B \cdot B\right)\right) \]
      12. pow-flipN/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(F \cdot \left(A \cdot -16\right)\right)}^{\frac{1}{2}} \cdot \frac{1}{{C}^{-1}}\right), \left(A \cdot \color{blue}{\left(C \cdot 4\right)} - B \cdot B\right)\right) \]
      13. inv-powN/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(F \cdot \left(A \cdot -16\right)\right)}^{\frac{1}{2}} \cdot \frac{1}{\frac{1}{C}}\right), \left(A \cdot \left(C \cdot \color{blue}{4}\right) - B \cdot B\right)\right) \]
      14. remove-double-divN/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(F \cdot \left(A \cdot -16\right)\right)}^{\frac{1}{2}} \cdot C\right), \left(A \cdot \color{blue}{\left(C \cdot 4\right)} - B \cdot B\right)\right) \]
      15. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left({\left(F \cdot \left(A \cdot -16\right)\right)}^{\frac{1}{2}}\right), C\right), \left(\color{blue}{A \cdot \left(C \cdot 4\right)} - B \cdot B\right)\right) \]
      16. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(F \cdot \left(A \cdot -16\right)\right), \frac{1}{2}\right), C\right), \left(\color{blue}{A} \cdot \left(C \cdot 4\right) - B \cdot B\right)\right) \]
      17. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(F, \left(A \cdot -16\right)\right), \frac{1}{2}\right), C\right), \left(A \cdot \left(C \cdot 4\right) - B \cdot B\right)\right) \]
      18. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(F, \mathsf{*.f64}\left(A, -16\right)\right), \frac{1}{2}\right), C\right), \left(A \cdot \left(C \cdot 4\right) - B \cdot B\right)\right) \]
      19. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(F, \mathsf{*.f64}\left(A, -16\right)\right), \frac{1}{2}\right), C\right), \mathsf{\_.f64}\left(\left(A \cdot \left(C \cdot 4\right)\right), \color{blue}{\left(B \cdot B\right)}\right)\right) \]
    11. Applied egg-rr17.1%

      \[\leadsto \color{blue}{\frac{{\left(F \cdot \left(A \cdot -16\right)\right)}^{0.5} \cdot C}{A \cdot \left(C \cdot 4\right) - B \cdot B}} \]

    if 2.3e19 < B

    1. Initial program 7.6%

      \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
    2. Add Preprocessing
    3. Taylor expanded in F around 0

      \[\leadsto \color{blue}{-1 \cdot \left(\sqrt{\frac{F \cdot \left(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\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(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\right)}{{B}^{2} - 4 \cdot \left(A \cdot C\right)}} \cdot \sqrt{2}\right) \]
      2. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{\frac{F \cdot \left(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\right)}{{B}^{2} - 4 \cdot \left(A \cdot C\right)}} \cdot \sqrt{2}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{\frac{F \cdot \left(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\right)}{{B}^{2} - 4 \cdot \left(A \cdot C\right)}}\right), \left(\sqrt{2}\right)\right)\right) \]
    5. Simplified20.5%

      \[\leadsto \color{blue}{-\sqrt{\frac{F \cdot \left(A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)\right)}{B \cdot B + -4 \cdot \left(A \cdot C\right)}} \cdot \sqrt{2}} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot \sqrt{\frac{F \cdot \left(A + \left(C + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)}{B \cdot B + -4 \cdot \left(A \cdot C\right)}}\right)\right) \]
      2. pow1/2N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot {\left(\frac{F \cdot \left(A + \left(C + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)}{B \cdot B + -4 \cdot \left(A \cdot C\right)}\right)}^{\frac{1}{2}}\right)\right) \]
      3. associate-+r+N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot {\left(\frac{F \cdot \left(\left(A + C\right) + \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)}^{\frac{1}{2}}\right)\right) \]
      4. associate-/l*N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot {\left(F \cdot \frac{\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}}{B \cdot B + -4 \cdot \left(A \cdot C\right)}\right)}^{\frac{1}{2}}\right)\right) \]
      5. unpow-prod-downN/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot \left({F}^{\frac{1}{2}} \cdot {\left(\frac{\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}}{B \cdot B + -4 \cdot \left(A \cdot C\right)}\right)}^{\frac{1}{2}}\right)\right)\right) \]
      6. associate-*r*N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\left(\sqrt{2} \cdot {F}^{\frac{1}{2}}\right) \cdot {\left(\frac{\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}}{B \cdot B + -4 \cdot \left(A \cdot C\right)}\right)}^{\frac{1}{2}}\right)\right) \]
    7. Applied egg-rr28.7%

      \[\leadsto -\color{blue}{\sqrt{2 \cdot F} \cdot \sqrt{\frac{\left(A + C\right) + \mathsf{hypot}\left(B, A - C\right)}{B \cdot B + A \cdot \left(C \cdot -4\right)}}} \]
    8. Taylor expanded in B around inf

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, F\right)\right), \color{blue}{\left(\sqrt{\frac{1}{B}}\right)}\right)\right) \]
    9. Step-by-step derivation
      1. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, F\right)\right), \mathsf{sqrt.f64}\left(\left(\frac{1}{B}\right)\right)\right)\right) \]
      2. /-lowering-/.f6467.7%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, B\right)\right)\right)\right) \]
    10. Simplified67.7%

      \[\leadsto -\sqrt{2 \cdot F} \cdot \color{blue}{\sqrt{\frac{1}{B}}} \]
    11. Step-by-step derivation
      1. sqrt-unprodN/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{\left(2 \cdot F\right) \cdot \frac{1}{B}}\right)\right) \]
      2. pow1/2N/A

        \[\leadsto \mathsf{neg.f64}\left(\left({\left(\left(2 \cdot F\right) \cdot \frac{1}{B}\right)}^{\frac{1}{2}}\right)\right) \]
      3. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{pow.f64}\left(\left(\left(2 \cdot F\right) \cdot \frac{1}{B}\right), \frac{1}{2}\right)\right) \]
      4. un-div-invN/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{pow.f64}\left(\left(\frac{2 \cdot F}{B}\right), \frac{1}{2}\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(\left(2 \cdot F\right), B\right), \frac{1}{2}\right)\right) \]
      6. *-lowering-*.f6456.3%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, F\right), B\right), \frac{1}{2}\right)\right) \]
    12. Applied egg-rr56.3%

      \[\leadsto -\color{blue}{{\left(\frac{2 \cdot F}{B}\right)}^{0.5}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification26.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 2.3 \cdot 10^{+19}:\\ \;\;\;\;\frac{C \cdot {\left(F \cdot \left(A \cdot -16\right)\right)}^{0.5}}{A \cdot \left(4 \cdot C\right) - B \cdot B}\\ \mathbf{else}:\\ \;\;\;\;0 - {\left(\frac{2 \cdot F}{B}\right)}^{0.5}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 30.4% accurate, 5.2× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ \begin{array}{l} \mathbf{if}\;A \leq 1.5 \cdot 10^{+58}:\\ \;\;\;\;0 - {\left(\frac{2 \cdot F}{B\_m}\right)}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;0 - \sqrt{\frac{4 \cdot F}{\frac{B\_m \cdot B\_m + \frac{A}{\frac{-0.25}{C}}}{A}}}\\ \end{array} \end{array} \]
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
 :precision binary64
 (if (<= A 1.5e+58)
   (- 0.0 (pow (/ (* 2.0 F) B_m) 0.5))
   (- 0.0 (sqrt (/ (* 4.0 F) (/ (+ (* B_m B_m) (/ A (/ -0.25 C))) A))))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
	double tmp;
	if (A <= 1.5e+58) {
		tmp = 0.0 - pow(((2.0 * F) / B_m), 0.5);
	} else {
		tmp = 0.0 - sqrt(((4.0 * F) / (((B_m * B_m) + (A / (-0.25 / C))) / 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 <= 1.5d+58) then
        tmp = 0.0d0 - (((2.0d0 * f) / b_m) ** 0.5d0)
    else
        tmp = 0.0d0 - sqrt(((4.0d0 * f) / (((b_m * b_m) + (a / ((-0.25d0) / c))) / 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 <= 1.5e+58) {
		tmp = 0.0 - Math.pow(((2.0 * F) / B_m), 0.5);
	} else {
		tmp = 0.0 - Math.sqrt(((4.0 * F) / (((B_m * B_m) + (A / (-0.25 / C))) / A)));
	}
	return tmp;
}
B_m = math.fabs(B)
def code(A, B_m, C, F):
	tmp = 0
	if A <= 1.5e+58:
		tmp = 0.0 - math.pow(((2.0 * F) / B_m), 0.5)
	else:
		tmp = 0.0 - math.sqrt(((4.0 * F) / (((B_m * B_m) + (A / (-0.25 / C))) / A)))
	return tmp
B_m = abs(B)
function code(A, B_m, C, F)
	tmp = 0.0
	if (A <= 1.5e+58)
		tmp = Float64(0.0 - (Float64(Float64(2.0 * F) / B_m) ^ 0.5));
	else
		tmp = Float64(0.0 - sqrt(Float64(Float64(4.0 * F) / Float64(Float64(Float64(B_m * B_m) + Float64(A / Float64(-0.25 / C))) / A))));
	end
	return tmp
end
B_m = abs(B);
function tmp_2 = code(A, B_m, C, F)
	tmp = 0.0;
	if (A <= 1.5e+58)
		tmp = 0.0 - (((2.0 * F) / B_m) ^ 0.5);
	else
		tmp = 0.0 - sqrt(((4.0 * F) / (((B_m * B_m) + (A / (-0.25 / C))) / A)));
	end
	tmp_2 = tmp;
end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := If[LessEqual[A, 1.5e+58], N[(0.0 - N[Power[N[(N[(2.0 * F), $MachinePrecision] / B$95$m), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision], N[(0.0 - N[Sqrt[N[(N[(4.0 * F), $MachinePrecision] / N[(N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(A / N[(-0.25 / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|

\\
\begin{array}{l}
\mathbf{if}\;A \leq 1.5 \cdot 10^{+58}:\\
\;\;\;\;0 - {\left(\frac{2 \cdot F}{B\_m}\right)}^{0.5}\\

\mathbf{else}:\\
\;\;\;\;0 - \sqrt{\frac{4 \cdot F}{\frac{B\_m \cdot B\_m + \frac{A}{\frac{-0.25}{C}}}{A}}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if A < 1.5000000000000001e58

    1. Initial program 17.1%

      \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
    2. Add Preprocessing
    3. Taylor expanded in F around 0

      \[\leadsto \color{blue}{-1 \cdot \left(\sqrt{\frac{F \cdot \left(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\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(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\right)}{{B}^{2} - 4 \cdot \left(A \cdot C\right)}} \cdot \sqrt{2}\right) \]
      2. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{\frac{F \cdot \left(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\right)}{{B}^{2} - 4 \cdot \left(A \cdot C\right)}} \cdot \sqrt{2}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{\frac{F \cdot \left(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\right)}{{B}^{2} - 4 \cdot \left(A \cdot C\right)}}\right), \left(\sqrt{2}\right)\right)\right) \]
    5. Simplified25.7%

      \[\leadsto \color{blue}{-\sqrt{\frac{F \cdot \left(A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)\right)}{B \cdot B + -4 \cdot \left(A \cdot C\right)}} \cdot \sqrt{2}} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot \sqrt{\frac{F \cdot \left(A + \left(C + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)}{B \cdot B + -4 \cdot \left(A \cdot C\right)}}\right)\right) \]
      2. pow1/2N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot {\left(\frac{F \cdot \left(A + \left(C + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)}{B \cdot B + -4 \cdot \left(A \cdot C\right)}\right)}^{\frac{1}{2}}\right)\right) \]
      3. associate-+r+N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot {\left(\frac{F \cdot \left(\left(A + C\right) + \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)}^{\frac{1}{2}}\right)\right) \]
      4. associate-/l*N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot {\left(F \cdot \frac{\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}}{B \cdot B + -4 \cdot \left(A \cdot C\right)}\right)}^{\frac{1}{2}}\right)\right) \]
      5. unpow-prod-downN/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot \left({F}^{\frac{1}{2}} \cdot {\left(\frac{\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}}{B \cdot B + -4 \cdot \left(A \cdot C\right)}\right)}^{\frac{1}{2}}\right)\right)\right) \]
      6. associate-*r*N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\left(\sqrt{2} \cdot {F}^{\frac{1}{2}}\right) \cdot {\left(\frac{\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}}{B \cdot B + -4 \cdot \left(A \cdot C\right)}\right)}^{\frac{1}{2}}\right)\right) \]
    7. Applied egg-rr33.6%

      \[\leadsto -\color{blue}{\sqrt{2 \cdot F} \cdot \sqrt{\frac{\left(A + C\right) + \mathsf{hypot}\left(B, A - C\right)}{B \cdot B + A \cdot \left(C \cdot -4\right)}}} \]
    8. Taylor expanded in B around inf

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, F\right)\right), \color{blue}{\left(\sqrt{\frac{1}{B}}\right)}\right)\right) \]
    9. Step-by-step derivation
      1. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, F\right)\right), \mathsf{sqrt.f64}\left(\left(\frac{1}{B}\right)\right)\right)\right) \]
      2. /-lowering-/.f6421.1%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, B\right)\right)\right)\right) \]
    10. Simplified21.1%

      \[\leadsto -\sqrt{2 \cdot F} \cdot \color{blue}{\sqrt{\frac{1}{B}}} \]
    11. Step-by-step derivation
      1. sqrt-unprodN/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{\left(2 \cdot F\right) \cdot \frac{1}{B}}\right)\right) \]
      2. pow1/2N/A

        \[\leadsto \mathsf{neg.f64}\left(\left({\left(\left(2 \cdot F\right) \cdot \frac{1}{B}\right)}^{\frac{1}{2}}\right)\right) \]
      3. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{pow.f64}\left(\left(\left(2 \cdot F\right) \cdot \frac{1}{B}\right), \frac{1}{2}\right)\right) \]
      4. un-div-invN/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{pow.f64}\left(\left(\frac{2 \cdot F}{B}\right), \frac{1}{2}\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(\left(2 \cdot F\right), B\right), \frac{1}{2}\right)\right) \]
      6. *-lowering-*.f6417.8%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, F\right), B\right), \frac{1}{2}\right)\right) \]
    12. Applied egg-rr17.8%

      \[\leadsto -\color{blue}{{\left(\frac{2 \cdot F}{B}\right)}^{0.5}} \]

    if 1.5000000000000001e58 < A

    1. Initial program 20.8%

      \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
    2. Add Preprocessing
    3. Taylor expanded in F around 0

      \[\leadsto \color{blue}{-1 \cdot \left(\sqrt{\frac{F \cdot \left(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\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(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\right)}{{B}^{2} - 4 \cdot \left(A \cdot C\right)}} \cdot \sqrt{2}\right) \]
      2. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{\frac{F \cdot \left(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\right)}{{B}^{2} - 4 \cdot \left(A \cdot C\right)}} \cdot \sqrt{2}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{\frac{F \cdot \left(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\right)}{{B}^{2} - 4 \cdot \left(A \cdot C\right)}}\right), \left(\sqrt{2}\right)\right)\right) \]
    5. Simplified30.6%

      \[\leadsto \color{blue}{-\sqrt{\frac{F \cdot \left(A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)\right)}{B \cdot B + -4 \cdot \left(A \cdot C\right)}} \cdot \sqrt{2}} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot \sqrt{\frac{F \cdot \left(A + \left(C + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)}{B \cdot B + -4 \cdot \left(A \cdot C\right)}}\right)\right) \]
      2. pow1/2N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot {\left(\frac{F \cdot \left(A + \left(C + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)}{B \cdot B + -4 \cdot \left(A \cdot C\right)}\right)}^{\frac{1}{2}}\right)\right) \]
      3. associate-+r+N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot {\left(\frac{F \cdot \left(\left(A + C\right) + \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)}^{\frac{1}{2}}\right)\right) \]
      4. associate-/l*N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot {\left(F \cdot \frac{\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}}{B \cdot B + -4 \cdot \left(A \cdot C\right)}\right)}^{\frac{1}{2}}\right)\right) \]
      5. unpow-prod-downN/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot \left({F}^{\frac{1}{2}} \cdot {\left(\frac{\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}}{B \cdot B + -4 \cdot \left(A \cdot C\right)}\right)}^{\frac{1}{2}}\right)\right)\right) \]
      6. associate-*r*N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\left(\sqrt{2} \cdot {F}^{\frac{1}{2}}\right) \cdot {\left(\frac{\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}}{B \cdot B + -4 \cdot \left(A \cdot C\right)}\right)}^{\frac{1}{2}}\right)\right) \]
    7. Applied egg-rr41.4%

      \[\leadsto -\color{blue}{\sqrt{2 \cdot F} \cdot \sqrt{\frac{\left(A + C\right) + \mathsf{hypot}\left(B, A - C\right)}{B \cdot B + A \cdot \left(C \cdot -4\right)}}} \]
    8. Taylor expanded in A around inf

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\color{blue}{\left(2 \cdot A\right)}, \mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(A, \mathsf{*.f64}\left(C, -4\right)\right)\right)\right)\right)\right)\right) \]
    9. Step-by-step derivation
      1. *-lowering-*.f6441.4%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, A\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(B, B\right), \mathsf{*.f64}\left(A, \mathsf{*.f64}\left(C, -4\right)\right)\right)\right)\right)\right)\right) \]
    10. Simplified41.4%

      \[\leadsto -\sqrt{2 \cdot F} \cdot \sqrt{\frac{\color{blue}{2 \cdot A}}{B \cdot B + A \cdot \left(C \cdot -4\right)}} \]
    11. Step-by-step derivation
      1. sqrt-unprodN/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{\left(2 \cdot F\right) \cdot \frac{2 \cdot A}{B \cdot B + A \cdot \left(C \cdot -4\right)}}\right)\right) \]
      2. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\left(2 \cdot F\right) \cdot \frac{2 \cdot A}{B \cdot B + A \cdot \left(C \cdot -4\right)}\right)\right)\right) \]
      3. associate-/l*N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\left(2 \cdot F\right) \cdot \left(2 \cdot \frac{A}{B \cdot B + A \cdot \left(C \cdot -4\right)}\right)\right)\right)\right) \]
      4. associate-*r*N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\left(\left(2 \cdot F\right) \cdot 2\right) \cdot \frac{A}{B \cdot B + A \cdot \left(C \cdot -4\right)}\right)\right)\right) \]
      5. clear-numN/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\left(\left(2 \cdot F\right) \cdot 2\right) \cdot \frac{1}{\frac{B \cdot B + A \cdot \left(C \cdot -4\right)}{A}}\right)\right)\right) \]
      6. un-div-invN/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{\left(2 \cdot F\right) \cdot 2}{\frac{B \cdot B + A \cdot \left(C \cdot -4\right)}{A}}\right)\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\left(2 \cdot F\right) \cdot 2\right), \left(\frac{B \cdot B + A \cdot \left(C \cdot -4\right)}{A}\right)\right)\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\left(F \cdot 2\right) \cdot 2\right), \left(\frac{B \cdot B + A \cdot \left(C \cdot -4\right)}{A}\right)\right)\right)\right) \]
      9. associate-*l*N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(F \cdot \left(2 \cdot 2\right)\right), \left(\frac{B \cdot B + A \cdot \left(C \cdot -4\right)}{A}\right)\right)\right)\right) \]
      10. metadata-evalN/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(F \cdot 4\right), \left(\frac{B \cdot B + A \cdot \left(C \cdot -4\right)}{A}\right)\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(F, 4\right), \left(\frac{B \cdot B + A \cdot \left(C \cdot -4\right)}{A}\right)\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(F, 4\right), \mathsf{/.f64}\left(\left(B \cdot B + A \cdot \left(C \cdot -4\right)\right), A\right)\right)\right)\right) \]
    12. Applied egg-rr34.9%

      \[\leadsto -\color{blue}{\sqrt{\frac{F \cdot 4}{\frac{B \cdot B + \frac{A}{\frac{-0.25}{C}}}{A}}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification21.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq 1.5 \cdot 10^{+58}:\\ \;\;\;\;0 - {\left(\frac{2 \cdot F}{B}\right)}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;0 - \sqrt{\frac{4 \cdot F}{\frac{B \cdot B + \frac{A}{\frac{-0.25}{C}}}{A}}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 30.5% accurate, 5.3× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ \begin{array}{l} \mathbf{if}\;B\_m \leq 1.3 \cdot 10^{-139}:\\ \;\;\;\;\frac{\sqrt{\left(-16 \cdot \left(A \cdot A\right)\right) \cdot \left(C \cdot F\right)}}{4 \cdot \left(A \cdot C\right)}\\ \mathbf{else}:\\ \;\;\;\;0 - {\left(\frac{2 \cdot F}{B\_m}\right)}^{0.5}\\ \end{array} \end{array} \]
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
 :precision binary64
 (if (<= B_m 1.3e-139)
   (/ (sqrt (* (* -16.0 (* A A)) (* C F))) (* 4.0 (* A C)))
   (- 0.0 (pow (/ (* 2.0 F) B_m) 0.5))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
	double tmp;
	if (B_m <= 1.3e-139) {
		tmp = sqrt(((-16.0 * (A * A)) * (C * F))) / (4.0 * (A * C));
	} else {
		tmp = 0.0 - pow(((2.0 * F) / B_m), 0.5);
	}
	return tmp;
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
    real(8), intent (in) :: a
    real(8), intent (in) :: b_m
    real(8), intent (in) :: c
    real(8), intent (in) :: f
    real(8) :: tmp
    if (b_m <= 1.3d-139) then
        tmp = sqrt((((-16.0d0) * (a * a)) * (c * f))) / (4.0d0 * (a * c))
    else
        tmp = 0.0d0 - (((2.0d0 * f) / b_m) ** 0.5d0)
    end if
    code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
	double tmp;
	if (B_m <= 1.3e-139) {
		tmp = Math.sqrt(((-16.0 * (A * A)) * (C * F))) / (4.0 * (A * C));
	} else {
		tmp = 0.0 - Math.pow(((2.0 * F) / B_m), 0.5);
	}
	return tmp;
}
B_m = math.fabs(B)
def code(A, B_m, C, F):
	tmp = 0
	if B_m <= 1.3e-139:
		tmp = math.sqrt(((-16.0 * (A * A)) * (C * F))) / (4.0 * (A * C))
	else:
		tmp = 0.0 - math.pow(((2.0 * F) / B_m), 0.5)
	return tmp
B_m = abs(B)
function code(A, B_m, C, F)
	tmp = 0.0
	if (B_m <= 1.3e-139)
		tmp = Float64(sqrt(Float64(Float64(-16.0 * Float64(A * A)) * Float64(C * F))) / Float64(4.0 * Float64(A * C)));
	else
		tmp = Float64(0.0 - (Float64(Float64(2.0 * F) / B_m) ^ 0.5));
	end
	return tmp
end
B_m = abs(B);
function tmp_2 = code(A, B_m, C, F)
	tmp = 0.0;
	if (B_m <= 1.3e-139)
		tmp = sqrt(((-16.0 * (A * A)) * (C * F))) / (4.0 * (A * C));
	else
		tmp = 0.0 - (((2.0 * F) / B_m) ^ 0.5);
	end
	tmp_2 = tmp;
end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := If[LessEqual[B$95$m, 1.3e-139], N[(N[Sqrt[N[(N[(-16.0 * N[(A * A), $MachinePrecision]), $MachinePrecision] * N[(C * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.0 - N[Power[N[(N[(2.0 * F), $MachinePrecision] / B$95$m), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|

\\
\begin{array}{l}
\mathbf{if}\;B\_m \leq 1.3 \cdot 10^{-139}:\\
\;\;\;\;\frac{\sqrt{\left(-16 \cdot \left(A \cdot A\right)\right) \cdot \left(C \cdot F\right)}}{4 \cdot \left(A \cdot C\right)}\\

\mathbf{else}:\\
\;\;\;\;0 - {\left(\frac{2 \cdot F}{B\_m}\right)}^{0.5}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if B < 1.2999999999999999e-139

    1. Initial program 21.9%

      \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
    2. Step-by-step derivation
      1. distribute-frac-negN/A

        \[\leadsto \mathsf{neg}\left(\frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\right) \]
      2. distribute-neg-frac2N/A

        \[\leadsto \frac{\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{\color{blue}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}\right), \color{blue}{\left(\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)\right)}\right) \]
    3. Simplified28.0%

      \[\leadsto \color{blue}{\frac{\sqrt{\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot \left(2 \cdot F\right)\right) \cdot \left(\left(A + C\right) + \mathsf{hypot}\left(B, A - C\right)\right)}}{4 \cdot \left(A \cdot C\right) - B \cdot B}} \]
    4. Add Preprocessing
    5. Taylor expanded in B around 0

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{\left(-16 \cdot \left({A}^{2} \cdot \left(C \cdot F\right)\right)\right)}\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    6. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(\left(-16 \cdot {A}^{2}\right) \cdot \left(C \cdot F\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\color{blue}{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(\left(-16 \cdot {A}^{2}\right), \left(C \cdot F\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) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-16, \left({A}^{2}\right)\right), \left(C \cdot F\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(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(-16, \left(A \cdot A\right)\right), \left(C \cdot F\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(-16, \mathsf{*.f64}\left(A, A\right)\right), \left(C \cdot F\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-*.f6410.1%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, A\right)\right), \mathsf{*.f64}\left(C, F\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    7. Simplified10.1%

      \[\leadsto \frac{\sqrt{\color{blue}{\left(-16 \cdot \left(A \cdot A\right)\right) \cdot \left(C \cdot F\right)}}}{4 \cdot \left(A \cdot C\right) - B \cdot B} \]
    8. Taylor expanded in A around inf

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, A\right)\right), \mathsf{*.f64}\left(C, F\right)\right)\right), \color{blue}{\left(4 \cdot \left(A \cdot C\right)\right)}\right) \]
    9. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, A\right)\right), \mathsf{*.f64}\left(C, F\right)\right)\right), \mathsf{*.f64}\left(4, \color{blue}{\left(A \cdot C\right)}\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, A\right)\right), \mathsf{*.f64}\left(C, F\right)\right)\right), \mathsf{*.f64}\left(4, \left(C \cdot \color{blue}{A}\right)\right)\right) \]
      3. *-lowering-*.f6410.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, A\right)\right), \mathsf{*.f64}\left(C, F\right)\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(C, \color{blue}{A}\right)\right)\right) \]
    10. Simplified10.4%

      \[\leadsto \frac{\sqrt{\left(-16 \cdot \left(A \cdot A\right)\right) \cdot \left(C \cdot F\right)}}{\color{blue}{4 \cdot \left(C \cdot A\right)}} \]

    if 1.2999999999999999e-139 < B

    1. Initial program 10.9%

      \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
    2. Add Preprocessing
    3. Taylor expanded in F around 0

      \[\leadsto \color{blue}{-1 \cdot \left(\sqrt{\frac{F \cdot \left(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\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(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\right)}{{B}^{2} - 4 \cdot \left(A \cdot C\right)}} \cdot \sqrt{2}\right) \]
      2. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{\frac{F \cdot \left(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\right)}{{B}^{2} - 4 \cdot \left(A \cdot C\right)}} \cdot \sqrt{2}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{\frac{F \cdot \left(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\right)}{{B}^{2} - 4 \cdot \left(A \cdot C\right)}}\right), \left(\sqrt{2}\right)\right)\right) \]
    5. Simplified26.6%

      \[\leadsto \color{blue}{-\sqrt{\frac{F \cdot \left(A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)\right)}{B \cdot B + -4 \cdot \left(A \cdot C\right)}} \cdot \sqrt{2}} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot \sqrt{\frac{F \cdot \left(A + \left(C + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)}{B \cdot B + -4 \cdot \left(A \cdot C\right)}}\right)\right) \]
      2. pow1/2N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot {\left(\frac{F \cdot \left(A + \left(C + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)}{B \cdot B + -4 \cdot \left(A \cdot C\right)}\right)}^{\frac{1}{2}}\right)\right) \]
      3. associate-+r+N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot {\left(\frac{F \cdot \left(\left(A + C\right) + \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)}^{\frac{1}{2}}\right)\right) \]
      4. associate-/l*N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot {\left(F \cdot \frac{\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}}{B \cdot B + -4 \cdot \left(A \cdot C\right)}\right)}^{\frac{1}{2}}\right)\right) \]
      5. unpow-prod-downN/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot \left({F}^{\frac{1}{2}} \cdot {\left(\frac{\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}}{B \cdot B + -4 \cdot \left(A \cdot C\right)}\right)}^{\frac{1}{2}}\right)\right)\right) \]
      6. associate-*r*N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\left(\sqrt{2} \cdot {F}^{\frac{1}{2}}\right) \cdot {\left(\frac{\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}}{B \cdot B + -4 \cdot \left(A \cdot C\right)}\right)}^{\frac{1}{2}}\right)\right) \]
    7. Applied egg-rr33.3%

      \[\leadsto -\color{blue}{\sqrt{2 \cdot F} \cdot \sqrt{\frac{\left(A + C\right) + \mathsf{hypot}\left(B, A - C\right)}{B \cdot B + A \cdot \left(C \cdot -4\right)}}} \]
    8. Taylor expanded in B around inf

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, F\right)\right), \color{blue}{\left(\sqrt{\frac{1}{B}}\right)}\right)\right) \]
    9. Step-by-step derivation
      1. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, F\right)\right), \mathsf{sqrt.f64}\left(\left(\frac{1}{B}\right)\right)\right)\right) \]
      2. /-lowering-/.f6448.9%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, B\right)\right)\right)\right) \]
    10. Simplified48.9%

      \[\leadsto -\sqrt{2 \cdot F} \cdot \color{blue}{\sqrt{\frac{1}{B}}} \]
    11. Step-by-step derivation
      1. sqrt-unprodN/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{\left(2 \cdot F\right) \cdot \frac{1}{B}}\right)\right) \]
      2. pow1/2N/A

        \[\leadsto \mathsf{neg.f64}\left(\left({\left(\left(2 \cdot F\right) \cdot \frac{1}{B}\right)}^{\frac{1}{2}}\right)\right) \]
      3. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{pow.f64}\left(\left(\left(2 \cdot F\right) \cdot \frac{1}{B}\right), \frac{1}{2}\right)\right) \]
      4. un-div-invN/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{pow.f64}\left(\left(\frac{2 \cdot F}{B}\right), \frac{1}{2}\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(\left(2 \cdot F\right), B\right), \frac{1}{2}\right)\right) \]
      6. *-lowering-*.f6440.8%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, F\right), B\right), \frac{1}{2}\right)\right) \]
    12. Applied egg-rr40.8%

      \[\leadsto -\color{blue}{{\left(\frac{2 \cdot F}{B}\right)}^{0.5}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification21.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 1.3 \cdot 10^{-139}:\\ \;\;\;\;\frac{\sqrt{\left(-16 \cdot \left(A \cdot A\right)\right) \cdot \left(C \cdot F\right)}}{4 \cdot \left(A \cdot C\right)}\\ \mathbf{else}:\\ \;\;\;\;0 - {\left(\frac{2 \cdot F}{B}\right)}^{0.5}\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 27.4% accurate, 5.9× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ 0 - {\left(\frac{2 \cdot F}{B\_m}\right)}^{0.5} \end{array} \]
B_m = (fabs.f64 B)
(FPCore (A B_m C F) :precision binary64 (- 0.0 (pow (/ (* 2.0 F) B_m) 0.5)))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
	return 0.0 - pow(((2.0 * F) / B_m), 0.5);
}
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 - (((2.0d0 * f) / b_m) ** 0.5d0)
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
	return 0.0 - Math.pow(((2.0 * F) / B_m), 0.5);
}
B_m = math.fabs(B)
def code(A, B_m, C, F):
	return 0.0 - math.pow(((2.0 * F) / B_m), 0.5)
B_m = abs(B)
function code(A, B_m, C, F)
	return Float64(0.0 - (Float64(Float64(2.0 * F) / B_m) ^ 0.5))
end
B_m = abs(B);
function tmp = code(A, B_m, C, F)
	tmp = 0.0 - (((2.0 * F) / B_m) ^ 0.5);
end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := N[(0.0 - N[Power[N[(N[(2.0 * F), $MachinePrecision] / B$95$m), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
B_m = \left|B\right|

\\
0 - {\left(\frac{2 \cdot F}{B\_m}\right)}^{0.5}
\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(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\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(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\right)}{{B}^{2} - 4 \cdot \left(A \cdot C\right)}} \cdot \sqrt{2}\right) \]
    2. neg-lowering-neg.f64N/A

      \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{\frac{F \cdot \left(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\right)}{{B}^{2} - 4 \cdot \left(A \cdot C\right)}} \cdot \sqrt{2}\right)\right) \]
    3. *-lowering-*.f64N/A

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{\frac{F \cdot \left(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\right)}{{B}^{2} - 4 \cdot \left(A \cdot C\right)}}\right), \left(\sqrt{2}\right)\right)\right) \]
  5. Simplified26.7%

    \[\leadsto \color{blue}{-\sqrt{\frac{F \cdot \left(A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)\right)}{B \cdot B + -4 \cdot \left(A \cdot C\right)}} \cdot \sqrt{2}} \]
  6. Step-by-step derivation
    1. *-commutativeN/A

      \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot \sqrt{\frac{F \cdot \left(A + \left(C + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)}{B \cdot B + -4 \cdot \left(A \cdot C\right)}}\right)\right) \]
    2. pow1/2N/A

      \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot {\left(\frac{F \cdot \left(A + \left(C + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)}{B \cdot B + -4 \cdot \left(A \cdot C\right)}\right)}^{\frac{1}{2}}\right)\right) \]
    3. associate-+r+N/A

      \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot {\left(\frac{F \cdot \left(\left(A + C\right) + \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)}^{\frac{1}{2}}\right)\right) \]
    4. associate-/l*N/A

      \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot {\left(F \cdot \frac{\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}}{B \cdot B + -4 \cdot \left(A \cdot C\right)}\right)}^{\frac{1}{2}}\right)\right) \]
    5. unpow-prod-downN/A

      \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot \left({F}^{\frac{1}{2}} \cdot {\left(\frac{\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}}{B \cdot B + -4 \cdot \left(A \cdot C\right)}\right)}^{\frac{1}{2}}\right)\right)\right) \]
    6. associate-*r*N/A

      \[\leadsto \mathsf{neg.f64}\left(\left(\left(\sqrt{2} \cdot {F}^{\frac{1}{2}}\right) \cdot {\left(\frac{\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}}{B \cdot B + -4 \cdot \left(A \cdot C\right)}\right)}^{\frac{1}{2}}\right)\right) \]
  7. Applied egg-rr35.2%

    \[\leadsto -\color{blue}{\sqrt{2 \cdot F} \cdot \sqrt{\frac{\left(A + C\right) + \mathsf{hypot}\left(B, A - C\right)}{B \cdot B + A \cdot \left(C \cdot -4\right)}}} \]
  8. Taylor expanded in B around inf

    \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, F\right)\right), \color{blue}{\left(\sqrt{\frac{1}{B}}\right)}\right)\right) \]
  9. Step-by-step derivation
    1. sqrt-lowering-sqrt.f64N/A

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, F\right)\right), \mathsf{sqrt.f64}\left(\left(\frac{1}{B}\right)\right)\right)\right) \]
    2. /-lowering-/.f6419.1%

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, B\right)\right)\right)\right) \]
  10. Simplified19.1%

    \[\leadsto -\sqrt{2 \cdot F} \cdot \color{blue}{\sqrt{\frac{1}{B}}} \]
  11. Step-by-step derivation
    1. sqrt-unprodN/A

      \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{\left(2 \cdot F\right) \cdot \frac{1}{B}}\right)\right) \]
    2. pow1/2N/A

      \[\leadsto \mathsf{neg.f64}\left(\left({\left(\left(2 \cdot F\right) \cdot \frac{1}{B}\right)}^{\frac{1}{2}}\right)\right) \]
    3. pow-lowering-pow.f64N/A

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{pow.f64}\left(\left(\left(2 \cdot F\right) \cdot \frac{1}{B}\right), \frac{1}{2}\right)\right) \]
    4. un-div-invN/A

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{pow.f64}\left(\left(\frac{2 \cdot F}{B}\right), \frac{1}{2}\right)\right) \]
    5. /-lowering-/.f64N/A

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(\left(2 \cdot F\right), B\right), \frac{1}{2}\right)\right) \]
    6. *-lowering-*.f6415.9%

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, F\right), B\right), \frac{1}{2}\right)\right) \]
  12. Applied egg-rr15.9%

    \[\leadsto -\color{blue}{{\left(\frac{2 \cdot F}{B}\right)}^{0.5}} \]
  13. Final simplification15.9%

    \[\leadsto 0 - {\left(\frac{2 \cdot F}{B}\right)}^{0.5} \]
  14. Add Preprocessing

Alternative 18: 27.4% accurate, 5.9× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ 0 - \sqrt{\frac{2 \cdot F}{B\_m}} \end{array} \]
B_m = (fabs.f64 B)
(FPCore (A B_m C F) :precision binary64 (- 0.0 (sqrt (/ (* 2.0 F) B_m))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
	return 0.0 - sqrt(((2.0 * F) / B_m));
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
    real(8), intent (in) :: a
    real(8), intent (in) :: b_m
    real(8), intent (in) :: c
    real(8), intent (in) :: f
    code = 0.0d0 - sqrt(((2.0d0 * f) / b_m))
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
	return 0.0 - Math.sqrt(((2.0 * F) / B_m));
}
B_m = math.fabs(B)
def code(A, B_m, C, F):
	return 0.0 - math.sqrt(((2.0 * F) / B_m))
B_m = abs(B)
function code(A, B_m, C, F)
	return Float64(0.0 - sqrt(Float64(Float64(2.0 * F) / B_m)))
end
B_m = abs(B);
function tmp = code(A, B_m, C, F)
	tmp = 0.0 - sqrt(((2.0 * F) / B_m));
end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := N[(0.0 - N[Sqrt[N[(N[(2.0 * F), $MachinePrecision] / B$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
B_m = \left|B\right|

\\
0 - \sqrt{\frac{2 \cdot F}{B\_m}}
\end{array}
Derivation
  1. Initial program 17.8%

    \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
  2. Add Preprocessing
  3. Taylor expanded in F around 0

    \[\leadsto \color{blue}{-1 \cdot \left(\sqrt{\frac{F \cdot \left(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\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(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\right)}{{B}^{2} - 4 \cdot \left(A \cdot C\right)}} \cdot \sqrt{2}\right) \]
    2. neg-lowering-neg.f64N/A

      \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{\frac{F \cdot \left(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\right)}{{B}^{2} - 4 \cdot \left(A \cdot C\right)}} \cdot \sqrt{2}\right)\right) \]
    3. *-lowering-*.f64N/A

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{\frac{F \cdot \left(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\right)}{{B}^{2} - 4 \cdot \left(A \cdot C\right)}}\right), \left(\sqrt{2}\right)\right)\right) \]
  5. Simplified26.7%

    \[\leadsto \color{blue}{-\sqrt{\frac{F \cdot \left(A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)\right)}{B \cdot B + -4 \cdot \left(A \cdot C\right)}} \cdot \sqrt{2}} \]
  6. Step-by-step derivation
    1. *-commutativeN/A

      \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot \sqrt{\frac{F \cdot \left(A + \left(C + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)}{B \cdot B + -4 \cdot \left(A \cdot C\right)}}\right)\right) \]
    2. pow1/2N/A

      \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot {\left(\frac{F \cdot \left(A + \left(C + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)}{B \cdot B + -4 \cdot \left(A \cdot C\right)}\right)}^{\frac{1}{2}}\right)\right) \]
    3. associate-+r+N/A

      \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot {\left(\frac{F \cdot \left(\left(A + C\right) + \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)}^{\frac{1}{2}}\right)\right) \]
    4. associate-/l*N/A

      \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot {\left(F \cdot \frac{\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}}{B \cdot B + -4 \cdot \left(A \cdot C\right)}\right)}^{\frac{1}{2}}\right)\right) \]
    5. unpow-prod-downN/A

      \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot \left({F}^{\frac{1}{2}} \cdot {\left(\frac{\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}}{B \cdot B + -4 \cdot \left(A \cdot C\right)}\right)}^{\frac{1}{2}}\right)\right)\right) \]
    6. associate-*r*N/A

      \[\leadsto \mathsf{neg.f64}\left(\left(\left(\sqrt{2} \cdot {F}^{\frac{1}{2}}\right) \cdot {\left(\frac{\left(A + C\right) + \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}}{B \cdot B + -4 \cdot \left(A \cdot C\right)}\right)}^{\frac{1}{2}}\right)\right) \]
  7. Applied egg-rr35.2%

    \[\leadsto -\color{blue}{\sqrt{2 \cdot F} \cdot \sqrt{\frac{\left(A + C\right) + \mathsf{hypot}\left(B, A - C\right)}{B \cdot B + A \cdot \left(C \cdot -4\right)}}} \]
  8. Taylor expanded in B around inf

    \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, F\right)\right), \color{blue}{\left(\sqrt{\frac{1}{B}}\right)}\right)\right) \]
  9. Step-by-step derivation
    1. sqrt-lowering-sqrt.f64N/A

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, F\right)\right), \mathsf{sqrt.f64}\left(\left(\frac{1}{B}\right)\right)\right)\right) \]
    2. /-lowering-/.f6419.1%

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, F\right)\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, B\right)\right)\right)\right) \]
  10. Simplified19.1%

    \[\leadsto -\sqrt{2 \cdot F} \cdot \color{blue}{\sqrt{\frac{1}{B}}} \]
  11. Step-by-step derivation
    1. sqrt-unprodN/A

      \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{\left(2 \cdot F\right) \cdot \frac{1}{B}}\right)\right) \]
    2. sqrt-lowering-sqrt.f64N/A

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\left(2 \cdot F\right) \cdot \frac{1}{B}\right)\right)\right) \]
    3. un-div-invN/A

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{2 \cdot F}{B}\right)\right)\right) \]
    4. /-lowering-/.f64N/A

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(2 \cdot F\right), B\right)\right)\right) \]
    5. *-lowering-*.f6415.7%

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, F\right), B\right)\right)\right) \]
  12. Applied egg-rr15.7%

    \[\leadsto -\color{blue}{\sqrt{\frac{2 \cdot F}{B}}} \]
  13. Final simplification15.7%

    \[\leadsto 0 - \sqrt{\frac{2 \cdot F}{B}} \]
  14. Add Preprocessing

Reproduce

?
herbie shell --seed 2024164 
(FPCore (A B C F)
  :name "ABCF->ab-angle a"
  :precision binary64
  (/ (- (sqrt (* (* 2.0 (* (- (pow B 2.0) (* (* 4.0 A) C)) F)) (+ (+ A C) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0))))))) (- (pow B 2.0) (* (* 4.0 A) C))))