ABCF->ab-angle b

Percentage Accurate: 19.0% → 43.7%
Time: 25.3s
Alternatives: 20
Speedup: 4.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 20 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.0% 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: 43.7% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;\left|C\right| \cdot \frac{\sqrt{F \cdot \left(A \cdot -16\right)}}{t\_0 - B\_m \cdot B\_m}\\

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


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

    1. Initial program 51.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. Simplified59.5%

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

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

    if -5e-186 < (/.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 16.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. Simplified28.0%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \color{blue}{\left(-16 \cdot \left(A \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) \]
    8. Step-by-step derivation
      1. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 40.7% accurate, 1.2× speedup?

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

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

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

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


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

    1. Initial program 12.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. Simplified21.2%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \color{blue}{\left(-16 \cdot \left(A \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) \]
    8. Step-by-step derivation
      1. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.99999999999999991e-246 < (pow.f64 B #s(literal 2 binary64)) < 2e229

    1. Initial program 39.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. Simplified48.2%

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

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

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

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

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

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

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

    1. Initial program 4.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(\sqrt{2}\right), B\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\color{blue}{F}, \mathsf{\_.f64}\left(C, \mathsf{hypot.f64}\left(B, C\right)\right)\right)\right)\right) \]
      4. sqrt-lowering-sqrt.f6428.3%

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

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

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

Alternative 3: 40.3% accurate, 1.2× speedup?

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

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

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

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


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

    1. Initial program 12.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. Simplified21.2%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \color{blue}{\left(-16 \cdot \left(A \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) \]
    8. Step-by-step derivation
      1. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.99999999999999991e-246 < (pow.f64 B #s(literal 2 binary64)) < 4.9999999999999997e165

    1. Initial program 43.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. Simplified52.7%

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

    if 4.9999999999999997e165 < (pow.f64 B #s(literal 2 binary64))

    1. Initial program 5.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 40.4% accurate, 2.6× speedup?

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

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

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

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


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

    1. Initial program 18.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \color{blue}{\left(-16 \cdot \left(A \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) \]
    8. Step-by-step derivation
      1. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.29999999999999987e-123 < B < 5.49999999999999997e82

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

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

    if 5.49999999999999997e82 < B

    1. Initial program 6.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 37.3% accurate, 2.7× speedup?

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

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

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

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


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

    1. Initial program 18.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \color{blue}{\left(-16 \cdot \left(A \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) \]
    8. Step-by-step derivation
      1. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.7e-123 < B < 7.5999999999999997e-85

    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. Simplified44.8%

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(A, \mathsf{\_.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), C\right)\right), \mathsf{*.f64}\left(2, F\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    6. Simplified44.8%

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

    if 7.5999999999999997e-85 < B

    1. Initial program 23.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 33.5% accurate, 2.8× speedup?

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

\\
\begin{array}{l}
t_0 := 4 \cdot \left(A \cdot C\right) - B\_m \cdot B\_m\\
\mathbf{if}\;B\_m \leq 3.2 \cdot 10^{-248}:\\
\;\;\;\;\frac{\sqrt{C \cdot \left(\left(A \cdot -8\right) \cdot \left(F \cdot \left(C + C\right)\right)\right)}}{t\_0}\\

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

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


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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(-8, \mathsf{*.f64}\left(A, \mathsf{*.f64}\left(C, \mathsf{*.f64}\left(F, \mathsf{\_.f64}\left(C, \left(\mathsf{neg}\left(C\right)\right)\right)\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. neg-lowering-neg.f6413.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(-8, \mathsf{*.f64}\left(A, \mathsf{*.f64}\left(C, \mathsf{*.f64}\left(F, \mathsf{\_.f64}\left(C, \mathsf{neg.f64}\left(C\right)\right)\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. Simplified13.9%

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-8, A\right), \mathsf{*.f64}\left(F, \left(C + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(C\right)\right)\right)\right)\right)\right)\right), C\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. remove-double-negN/A

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

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

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

    if 3.20000000000000017e-248 < B < 2.6999999999999997e-91

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(C, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-8, \mathsf{*.f64}\left(\mathsf{*.f64}\left(A, F\right), \left(A - -1 \cdot A\right)\right)\right), \left(2 \cdot \frac{F \cdot \left(2 \cdot \left(A \cdot {B}^{2}\right) + {B}^{2} \cdot \left(A - -1 \cdot A\right)\right)}{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) \]
      7. cancel-sign-sub-invN/A

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

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

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

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

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

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

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

    if 2.6999999999999997e-91 < B

    1. Initial program 23.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 37.4% accurate, 2.9× speedup?

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

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

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


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

    1. Initial program 18.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \color{blue}{\left(-16 \cdot \left(A \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) \]
    8. Step-by-step derivation
      1. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.16e-85 < B

    1. Initial program 23.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 31.0% accurate, 2.9× speedup?

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

\\
\begin{array}{l}
t_0 := 4 \cdot \left(A \cdot C\right) - B\_m \cdot B\_m\\
\mathbf{if}\;B\_m \leq 1.06 \cdot 10^{-247}:\\
\;\;\;\;\frac{\sqrt{C \cdot \left(\left(A \cdot -8\right) \cdot \left(F \cdot \left(C + C\right)\right)\right)}}{t\_0}\\

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

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


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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(-8, \mathsf{*.f64}\left(A, \mathsf{*.f64}\left(C, \mathsf{*.f64}\left(F, \mathsf{\_.f64}\left(C, \left(\mathsf{neg}\left(C\right)\right)\right)\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. neg-lowering-neg.f6413.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(-8, \mathsf{*.f64}\left(A, \mathsf{*.f64}\left(C, \mathsf{*.f64}\left(F, \mathsf{\_.f64}\left(C, \mathsf{neg.f64}\left(C\right)\right)\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. Simplified13.9%

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-8, A\right), \mathsf{*.f64}\left(F, \left(C + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(C\right)\right)\right)\right)\right)\right)\right), C\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. remove-double-negN/A

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

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

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

    if 1.06e-247 < B < 1.92000000000000009e-90

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(C, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-8, \mathsf{*.f64}\left(\mathsf{*.f64}\left(A, F\right), \left(A - -1 \cdot A\right)\right)\right), \left(2 \cdot \frac{F \cdot \left(2 \cdot \left(A \cdot {B}^{2}\right) + {B}^{2} \cdot \left(A - -1 \cdot A\right)\right)}{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) \]
      7. cancel-sign-sub-invN/A

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

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

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

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

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

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

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

    if 1.92000000000000009e-90 < B

    1. Initial program 23.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 20.8% accurate, 4.5× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ \begin{array}{l} t_0 := 4 \cdot \left(A \cdot C\right)\\ t_1 := t\_0 - B\_m \cdot B\_m\\ t_2 := F \cdot \left(B\_m \cdot B\_m\right)\\ \mathbf{if}\;C \leq -6.2 \cdot 10^{-85}:\\ \;\;\;\;\frac{\sqrt{-4 \cdot \left(A \cdot t\_2\right) + C \cdot \left(-16 \cdot \left(A \cdot \left(C \cdot F\right)\right) + 4 \cdot t\_2\right)}}{t\_1}\\ \mathbf{elif}\;C \leq 2.65 \cdot 10^{-32}:\\ \;\;\;\;\frac{\sqrt{-2 \cdot \left(\left(B\_m \cdot B\_m\right) \cdot \left(B\_m \cdot F\right)\right)}}{t\_1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{\left(A \cdot -8\right) \cdot \left(\left(A + A\right) \cdot \left(C \cdot F\right)\right)}}{t\_0}\\ \end{array} \end{array} \]
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
 :precision binary64
 (let* ((t_0 (* 4.0 (* A C)))
        (t_1 (- t_0 (* B_m B_m)))
        (t_2 (* F (* B_m B_m))))
   (if (<= C -6.2e-85)
     (/
      (sqrt
       (+ (* -4.0 (* A t_2)) (* C (+ (* -16.0 (* A (* C F))) (* 4.0 t_2)))))
      t_1)
     (if (<= C 2.65e-32)
       (/ (sqrt (* -2.0 (* (* B_m B_m) (* B_m F)))) t_1)
       (/ (sqrt (* (* A -8.0) (* (+ A A) (* C F)))) t_0)))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
	double t_0 = 4.0 * (A * C);
	double t_1 = t_0 - (B_m * B_m);
	double t_2 = F * (B_m * B_m);
	double tmp;
	if (C <= -6.2e-85) {
		tmp = sqrt(((-4.0 * (A * t_2)) + (C * ((-16.0 * (A * (C * F))) + (4.0 * t_2))))) / t_1;
	} else if (C <= 2.65e-32) {
		tmp = sqrt((-2.0 * ((B_m * B_m) * (B_m * F)))) / t_1;
	} else {
		tmp = sqrt(((A * -8.0) * ((A + A) * (C * F)))) / 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) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_0 = 4.0d0 * (a * c)
    t_1 = t_0 - (b_m * b_m)
    t_2 = f * (b_m * b_m)
    if (c <= (-6.2d-85)) then
        tmp = sqrt((((-4.0d0) * (a * t_2)) + (c * (((-16.0d0) * (a * (c * f))) + (4.0d0 * t_2))))) / t_1
    else if (c <= 2.65d-32) then
        tmp = sqrt(((-2.0d0) * ((b_m * b_m) * (b_m * f)))) / t_1
    else
        tmp = sqrt(((a * (-8.0d0)) * ((a + a) * (c * f)))) / 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 = 4.0 * (A * C);
	double t_1 = t_0 - (B_m * B_m);
	double t_2 = F * (B_m * B_m);
	double tmp;
	if (C <= -6.2e-85) {
		tmp = Math.sqrt(((-4.0 * (A * t_2)) + (C * ((-16.0 * (A * (C * F))) + (4.0 * t_2))))) / t_1;
	} else if (C <= 2.65e-32) {
		tmp = Math.sqrt((-2.0 * ((B_m * B_m) * (B_m * F)))) / t_1;
	} else {
		tmp = Math.sqrt(((A * -8.0) * ((A + A) * (C * F)))) / t_0;
	}
	return tmp;
}
B_m = math.fabs(B)
def code(A, B_m, C, F):
	t_0 = 4.0 * (A * C)
	t_1 = t_0 - (B_m * B_m)
	t_2 = F * (B_m * B_m)
	tmp = 0
	if C <= -6.2e-85:
		tmp = math.sqrt(((-4.0 * (A * t_2)) + (C * ((-16.0 * (A * (C * F))) + (4.0 * t_2))))) / t_1
	elif C <= 2.65e-32:
		tmp = math.sqrt((-2.0 * ((B_m * B_m) * (B_m * F)))) / t_1
	else:
		tmp = math.sqrt(((A * -8.0) * ((A + A) * (C * F)))) / t_0
	return tmp
B_m = abs(B)
function code(A, B_m, C, F)
	t_0 = Float64(4.0 * Float64(A * C))
	t_1 = Float64(t_0 - Float64(B_m * B_m))
	t_2 = Float64(F * Float64(B_m * B_m))
	tmp = 0.0
	if (C <= -6.2e-85)
		tmp = Float64(sqrt(Float64(Float64(-4.0 * Float64(A * t_2)) + Float64(C * Float64(Float64(-16.0 * Float64(A * Float64(C * F))) + Float64(4.0 * t_2))))) / t_1);
	elseif (C <= 2.65e-32)
		tmp = Float64(sqrt(Float64(-2.0 * Float64(Float64(B_m * B_m) * Float64(B_m * F)))) / t_1);
	else
		tmp = Float64(sqrt(Float64(Float64(A * -8.0) * Float64(Float64(A + A) * Float64(C * F)))) / t_0);
	end
	return tmp
end
B_m = abs(B);
function tmp_2 = code(A, B_m, C, F)
	t_0 = 4.0 * (A * C);
	t_1 = t_0 - (B_m * B_m);
	t_2 = F * (B_m * B_m);
	tmp = 0.0;
	if (C <= -6.2e-85)
		tmp = sqrt(((-4.0 * (A * t_2)) + (C * ((-16.0 * (A * (C * F))) + (4.0 * t_2))))) / t_1;
	elseif (C <= 2.65e-32)
		tmp = sqrt((-2.0 * ((B_m * B_m) * (B_m * F)))) / t_1;
	else
		tmp = sqrt(((A * -8.0) * ((A + A) * (C * F)))) / 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[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(F * N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -6.2e-85], N[(N[Sqrt[N[(N[(-4.0 * N[(A * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(C * N[(N[(-16.0 * N[(A * N[(C * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(4.0 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[C, 2.65e-32], N[(N[Sqrt[N[(-2.0 * N[(N[(B$95$m * B$95$m), $MachinePrecision] * N[(B$95$m * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$1), $MachinePrecision], N[(N[Sqrt[N[(N[(A * -8.0), $MachinePrecision] * N[(N[(A + A), $MachinePrecision] * N[(C * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision]]]]]]
\begin{array}{l}
B_m = \left|B\right|

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

\mathbf{elif}\;C \leq 2.65 \cdot 10^{-32}:\\
\;\;\;\;\frac{\sqrt{-2 \cdot \left(\left(B\_m \cdot B\_m\right) \cdot \left(B\_m \cdot F\right)\right)}}{t\_1}\\

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


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

    1. Initial program 22.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. Simplified30.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(-4 \cdot \left(A \cdot \left({B}^{2} \cdot F\right)\right) + C \cdot \left(-16 \cdot \left(A \cdot \left(C \cdot F\right)\right) + \left(\mathsf{neg}\left(-4\right)\right) \cdot \left({B}^{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) \]
      2. cancel-sign-sub-invN/A

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(A, \mathsf{*.f64}\left(\left(B \cdot B\right), F\right)\right)\right), \left(C \cdot \left(-16 \cdot \left(A \cdot \left(C \cdot F\right)\right) - -4 \cdot \left({B}^{2} \cdot F\right)\right)\right)\right)\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(-4, \mathsf{*.f64}\left(A, \mathsf{*.f64}\left(\mathsf{*.f64}\left(B, B\right), F\right)\right)\right), \left(C \cdot \left(-16 \cdot \left(A \cdot \left(C \cdot F\right)\right) - -4 \cdot \left({B}^{2} \cdot F\right)\right)\right)\right)\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(-4, \mathsf{*.f64}\left(A, \mathsf{*.f64}\left(\mathsf{*.f64}\left(B, B\right), F\right)\right)\right), \mathsf{*.f64}\left(C, \left(-16 \cdot \left(A \cdot \left(C \cdot F\right)\right) - -4 \cdot \left({B}^{2} \cdot F\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      10. cancel-sign-sub-invN/A

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

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

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

    if -6.2000000000000005e-85 < C < 2.65e-32

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

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{\left(-2 \cdot \left({B}^{3} \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. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(-2, \left({B}^{3} \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(-2, \mathsf{*.f64}\left(\left({B}^{3}\right), 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) \]
      3. cube-multN/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(B, \left(B \cdot B\right)\right), 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. *-lowering-*.f6410.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(B, \mathsf{*.f64}\left(B, B\right)\right), 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. Simplified10.0%

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(-2, \left(\left(B \cdot F\right) \cdot \left(B \cdot B\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(-2, \mathsf{*.f64}\left(\left(B \cdot F\right), \left(B \cdot B\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(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(B, F\right), \left(B \cdot B\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-*.f6410.0%

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

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

    if 2.65e-32 < C

    1. Initial program 10.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. Simplified15.8%

      \[\leadsto \color{blue}{\frac{\sqrt{\left(B \cdot B + \left(A \cdot C\right) \cdot -4\right) \cdot \left(\left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right) \cdot \left(2 \cdot F\right)\right)}}{4 \cdot \left(A \cdot C\right) - B \cdot B}} \]
    3. Add Preprocessing
    4. 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(A, \mathsf{\_.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), C\right)\right), \mathsf{*.f64}\left(2, F\right)\right)\right)\right), \color{blue}{\left(4 \cdot \left(A \cdot C\right)\right)}\right) \]
    5. 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(A, \mathsf{\_.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), C\right)\right), \mathsf{*.f64}\left(2, F\right)\right)\right)\right), \mathsf{*.f64}\left(4, \color{blue}{\left(A \cdot C\right)}\right)\right) \]
      2. *-lowering-*.f6412.8%

        \[\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(A, \mathsf{\_.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), C\right)\right), \mathsf{*.f64}\left(2, F\right)\right)\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(A, \color{blue}{C}\right)\right)\right) \]
    6. Simplified12.8%

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-8, A\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(C, F\right), \mathsf{\_.f64}\left(A, \left(-1 \cdot A\right)\right)\right)\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(A, C\right)\right)\right) \]
      8. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-8, A\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(C, F\right), \mathsf{\_.f64}\left(A, \left(\mathsf{neg}\left(A\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(A, C\right)\right)\right) \]
      9. neg-lowering-neg.f6433.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -6.2 \cdot 10^{-85}:\\ \;\;\;\;\frac{\sqrt{-4 \cdot \left(A \cdot \left(F \cdot \left(B \cdot B\right)\right)\right) + C \cdot \left(-16 \cdot \left(A \cdot \left(C \cdot F\right)\right) + 4 \cdot \left(F \cdot \left(B \cdot B\right)\right)\right)}}{4 \cdot \left(A \cdot C\right) - B \cdot B}\\ \mathbf{elif}\;C \leq 2.65 \cdot 10^{-32}:\\ \;\;\;\;\frac{\sqrt{-2 \cdot \left(\left(B \cdot B\right) \cdot \left(B \cdot F\right)\right)}}{4 \cdot \left(A \cdot C\right) - B \cdot B}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{\left(A \cdot -8\right) \cdot \left(\left(A + A\right) \cdot \left(C \cdot F\right)\right)}}{4 \cdot \left(A \cdot C\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 20.0% accurate, 4.8× speedup?

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

\\
\begin{array}{l}
t_0 := 4 \cdot \left(A \cdot C\right)\\
t_1 := t\_0 - B\_m \cdot B\_m\\
\mathbf{if}\;A \leq -1.15 \cdot 10^{-164}:\\
\;\;\;\;\frac{\sqrt{\left(A \cdot -8\right) \cdot \left(\left(A + A\right) \cdot \left(C \cdot F\right)\right)}}{t\_0}\\

\mathbf{elif}\;A \leq 2.8 \cdot 10^{-48}:\\
\;\;\;\;\frac{\sqrt{-2 \cdot \left(B\_m \cdot \left(B\_m \cdot \left(B\_m \cdot F\right)\right)\right)}}{t\_1}\\

\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{C \cdot \left(\left(A \cdot -8\right) \cdot \left(F \cdot \left(C + C\right)\right)\right)}}{t\_1}\\


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

    1. Initial program 22.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. Simplified33.3%

      \[\leadsto \color{blue}{\frac{\sqrt{\left(B \cdot B + \left(A \cdot C\right) \cdot -4\right) \cdot \left(\left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right) \cdot \left(2 \cdot F\right)\right)}}{4 \cdot \left(A \cdot C\right) - B \cdot B}} \]
    3. Add Preprocessing
    4. 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(A, \mathsf{\_.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), C\right)\right), \mathsf{*.f64}\left(2, F\right)\right)\right)\right), \color{blue}{\left(4 \cdot \left(A \cdot C\right)\right)}\right) \]
    5. 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(A, \mathsf{\_.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), C\right)\right), \mathsf{*.f64}\left(2, F\right)\right)\right)\right), \mathsf{*.f64}\left(4, \color{blue}{\left(A \cdot C\right)}\right)\right) \]
      2. *-lowering-*.f6424.0%

        \[\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(A, \mathsf{\_.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), C\right)\right), \mathsf{*.f64}\left(2, F\right)\right)\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(A, \color{blue}{C}\right)\right)\right) \]
    6. Simplified24.0%

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-8, A\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(C, F\right), \mathsf{\_.f64}\left(A, \left(-1 \cdot A\right)\right)\right)\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(A, C\right)\right)\right) \]
      8. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-8, A\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(C, F\right), \mathsf{\_.f64}\left(A, \left(\mathsf{neg}\left(A\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(A, C\right)\right)\right) \]
      9. neg-lowering-neg.f6423.1%

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

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

    if -1.14999999999999993e-164 < A < 2.80000000000000005e-48

    1. Initial program 33.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. Simplified36.9%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{\left(-2 \cdot \left({B}^{3} \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. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(-2, \left({B}^{3} \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(-2, \mathsf{*.f64}\left(\left({B}^{3}\right), 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) \]
      3. cube-multN/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(B, \left(B \cdot B\right)\right), 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. *-lowering-*.f6410.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(B, \mathsf{*.f64}\left(B, B\right)\right), 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. Simplified10.6%

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(B, \mathsf{*.f64}\left(B, \left(B \cdot F\right)\right)\right), -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) \]
      7. *-lowering-*.f6411.7%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(B, \mathsf{*.f64}\left(B, \mathsf{*.f64}\left(B, F\right)\right)\right), -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. Applied egg-rr11.7%

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

    if 2.80000000000000005e-48 < A

    1. Initial program 2.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. Simplified3.5%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(-8, \mathsf{*.f64}\left(A, \mathsf{*.f64}\left(C, \mathsf{*.f64}\left(F, \mathsf{\_.f64}\left(C, \left(\mathsf{neg}\left(C\right)\right)\right)\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. neg-lowering-neg.f6421.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-8, A\right), \mathsf{*.f64}\left(F, \left(C + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(C\right)\right)\right)\right)\right)\right)\right), C\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. remove-double-negN/A

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

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

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

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

Alternative 11: 15.6% accurate, 4.9× speedup?

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

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

\mathbf{elif}\;C \leq -3.8 \cdot 10^{-271}:\\
\;\;\;\;\frac{\sqrt{\left(A \cdot -8\right) \cdot \left(C \cdot \left(F \cdot \left(C + C\right)\right)\right)}}{t\_0}\\

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

\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{\left(C \cdot F\right) \cdot \left(-16 \cdot \left(A \cdot A\right)\right)}}{t\_0}\\


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

    1. Initial program 16.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-2, B\right), \mathsf{sqrt.f64}\left(\left(F \cdot C\right)\right)\right) \]
      6. *-lowering-*.f6416.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-2, B\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, C\right)\right)\right) \]
    11. Applied egg-rr16.0%

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

        \[\leadsto \sqrt{F \cdot C} \cdot \color{blue}{\frac{-2}{B}} \]
      2. clear-numN/A

        \[\leadsto \sqrt{F \cdot C} \cdot \frac{1}{\color{blue}{\frac{B}{-2}}} \]
      3. un-div-invN/A

        \[\leadsto \frac{\sqrt{F \cdot C}}{\color{blue}{\frac{B}{-2}}} \]
      4. /-lowering-/.f64N/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(F, C\right), \frac{1}{2}\right), \mathsf{/.f64}\left(B, \color{blue}{-2}\right)\right) \]
    13. Applied egg-rr16.1%

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

    if -7.2000000000000002e42 < C < -3.8000000000000001e-271

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

      \[\leadsto \color{blue}{\frac{\sqrt{\left(B \cdot B + \left(A \cdot C\right) \cdot -4\right) \cdot \left(\left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right) \cdot \left(2 \cdot F\right)\right)}}{4 \cdot \left(A \cdot C\right) - B \cdot B}} \]
    3. Add Preprocessing
    4. 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(A, \mathsf{\_.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), C\right)\right), \mathsf{*.f64}\left(2, F\right)\right)\right)\right), \color{blue}{\left(4 \cdot \left(A \cdot C\right)\right)}\right) \]
    5. 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(A, \mathsf{\_.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), C\right)\right), \mathsf{*.f64}\left(2, F\right)\right)\right)\right), \mathsf{*.f64}\left(4, \color{blue}{\left(A \cdot C\right)}\right)\right) \]
      2. *-lowering-*.f6416.0%

        \[\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(A, \mathsf{\_.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), C\right)\right), \mathsf{*.f64}\left(2, F\right)\right)\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(A, \color{blue}{C}\right)\right)\right) \]
    6. Simplified16.0%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-8, A\right), \mathsf{*.f64}\left(C, \mathsf{*.f64}\left(F, \mathsf{\_.f64}\left(C, \left(-1 \cdot C\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(A, C\right)\right)\right) \]
      7. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-8, A\right), \mathsf{*.f64}\left(C, \mathsf{*.f64}\left(F, \mathsf{\_.f64}\left(C, \left(\mathsf{neg}\left(C\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(A, C\right)\right)\right) \]
      8. neg-lowering-neg.f6420.1%

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

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

    if -3.8000000000000001e-271 < C < 3e-32

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

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{\left(-2 \cdot \left({B}^{3} \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. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(-2, \left({B}^{3} \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(-2, \mathsf{*.f64}\left(\left({B}^{3}\right), 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) \]
      3. cube-multN/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(B, \left(B \cdot B\right)\right), 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. *-lowering-*.f6411.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(B, \mathsf{*.f64}\left(B, B\right)\right), 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. Simplified11.9%

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(B, \mathsf{*.f64}\left(B, B\right)\right), F\right)\right)\right), \mathsf{*.f64}\left(-1, \left(B \cdot \color{blue}{B}\right)\right)\right) \]
      3. *-lowering-*.f6411.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(B, \mathsf{*.f64}\left(B, B\right)\right), F\right)\right)\right), \mathsf{*.f64}\left(-1, \mathsf{*.f64}\left(B, \color{blue}{B}\right)\right)\right) \]
    9. Simplified11.4%

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

    if 3e-32 < C

    1. Initial program 10.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. Simplified15.8%

      \[\leadsto \color{blue}{\frac{\sqrt{\left(B \cdot B + \left(A \cdot C\right) \cdot -4\right) \cdot \left(\left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right) \cdot \left(2 \cdot F\right)\right)}}{4 \cdot \left(A \cdot C\right) - B \cdot B}} \]
    3. Add Preprocessing
    4. 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(A, \mathsf{\_.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), C\right)\right), \mathsf{*.f64}\left(2, F\right)\right)\right)\right), \color{blue}{\left(4 \cdot \left(A \cdot C\right)\right)}\right) \]
    5. 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(A, \mathsf{\_.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), C\right)\right), \mathsf{*.f64}\left(2, F\right)\right)\right)\right), \mathsf{*.f64}\left(4, \color{blue}{\left(A \cdot C\right)}\right)\right) \]
      2. *-lowering-*.f6412.8%

        \[\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(A, \mathsf{\_.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), C\right)\right), \mathsf{*.f64}\left(2, F\right)\right)\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(A, \color{blue}{C}\right)\right)\right) \]
    6. Simplified12.8%

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

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

        \[\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(A, C\right)\right)\right) \]
    9. Simplified28.6%

      \[\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)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification18.6%

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

Alternative 12: 15.9% accurate, 4.9× speedup?

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

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

\mathbf{elif}\;C \leq -4.9 \cdot 10^{-86}:\\
\;\;\;\;\frac{\sqrt{-16 \cdot \left(A \cdot \left(F \cdot \left(C \cdot C\right)\right)\right)}}{t\_0}\\

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

\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{\left(C \cdot F\right) \cdot \left(-16 \cdot \left(A \cdot A\right)\right)}}{t\_0}\\


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

    1. Initial program 16.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-2, B\right), \mathsf{sqrt.f64}\left(\left(F \cdot C\right)\right)\right) \]
      6. *-lowering-*.f6416.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-2, B\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, C\right)\right)\right) \]
    11. Applied egg-rr16.0%

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

        \[\leadsto \sqrt{F \cdot C} \cdot \color{blue}{\frac{-2}{B}} \]
      2. clear-numN/A

        \[\leadsto \sqrt{F \cdot C} \cdot \frac{1}{\color{blue}{\frac{B}{-2}}} \]
      3. un-div-invN/A

        \[\leadsto \frac{\sqrt{F \cdot C}}{\color{blue}{\frac{B}{-2}}} \]
      4. /-lowering-/.f64N/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(F, C\right), \frac{1}{2}\right), \mathsf{/.f64}\left(B, \color{blue}{-2}\right)\right) \]
    13. Applied egg-rr16.1%

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

    if -5.0999999999999999e42 < C < -4.89999999999999972e-86

    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. Simplified36.0%

      \[\leadsto \color{blue}{\frac{\sqrt{\left(B \cdot B + \left(A \cdot C\right) \cdot -4\right) \cdot \left(\left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right) \cdot \left(2 \cdot F\right)\right)}}{4 \cdot \left(A \cdot C\right) - B \cdot B}} \]
    3. Add Preprocessing
    4. 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(A, \mathsf{\_.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), C\right)\right), \mathsf{*.f64}\left(2, F\right)\right)\right)\right), \color{blue}{\left(4 \cdot \left(A \cdot C\right)\right)}\right) \]
    5. 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(A, \mathsf{\_.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), C\right)\right), \mathsf{*.f64}\left(2, F\right)\right)\right)\right), \mathsf{*.f64}\left(4, \color{blue}{\left(A \cdot C\right)}\right)\right) \]
      2. *-lowering-*.f6425.1%

        \[\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(A, \mathsf{\_.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), C\right)\right), \mathsf{*.f64}\left(2, F\right)\right)\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(A, \color{blue}{C}\right)\right)\right) \]
    6. Simplified25.1%

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

      \[\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(4, \mathsf{*.f64}\left(A, C\right)\right)\right) \]
    8. 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(4, \mathsf{*.f64}\left(A, C\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(4, \mathsf{*.f64}\left(A, C\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(4, \mathsf{*.f64}\left(A, C\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(4, \mathsf{*.f64}\left(A, C\right)\right)\right) \]
      5. *-lowering-*.f6426.9%

        \[\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(4, \mathsf{*.f64}\left(A, C\right)\right)\right) \]
    9. Simplified26.9%

      \[\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)} \]

    if -4.89999999999999972e-86 < C < 3e-32

    1. Initial program 24.4%

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

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{\left(-2 \cdot \left({B}^{3} \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. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(-2, \left({B}^{3} \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(-2, \mathsf{*.f64}\left(\left({B}^{3}\right), 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) \]
      3. cube-multN/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(B, \left(B \cdot B\right)\right), 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. *-lowering-*.f6410.1%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(B, \mathsf{*.f64}\left(B, B\right)\right), 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. Simplified10.1%

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(B, \mathsf{*.f64}\left(B, B\right)\right), F\right)\right)\right), \mathsf{*.f64}\left(-1, \left(B \cdot \color{blue}{B}\right)\right)\right) \]
      3. *-lowering-*.f649.5%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(B, \mathsf{*.f64}\left(B, B\right)\right), F\right)\right)\right), \mathsf{*.f64}\left(-1, \mathsf{*.f64}\left(B, \color{blue}{B}\right)\right)\right) \]
    9. Simplified9.5%

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

    if 3e-32 < C

    1. Initial program 10.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. Simplified15.8%

      \[\leadsto \color{blue}{\frac{\sqrt{\left(B \cdot B + \left(A \cdot C\right) \cdot -4\right) \cdot \left(\left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right) \cdot \left(2 \cdot F\right)\right)}}{4 \cdot \left(A \cdot C\right) - B \cdot B}} \]
    3. Add Preprocessing
    4. 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(A, \mathsf{\_.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), C\right)\right), \mathsf{*.f64}\left(2, F\right)\right)\right)\right), \color{blue}{\left(4 \cdot \left(A \cdot C\right)\right)}\right) \]
    5. 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(A, \mathsf{\_.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), C\right)\right), \mathsf{*.f64}\left(2, F\right)\right)\right)\right), \mathsf{*.f64}\left(4, \color{blue}{\left(A \cdot C\right)}\right)\right) \]
      2. *-lowering-*.f6412.8%

        \[\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(A, \mathsf{\_.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), C\right)\right), \mathsf{*.f64}\left(2, F\right)\right)\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(A, \color{blue}{C}\right)\right)\right) \]
    6. Simplified12.8%

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

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

        \[\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(A, C\right)\right)\right) \]
    9. Simplified28.6%

      \[\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)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification17.2%

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

Alternative 13: 20.0% accurate, 4.9× speedup?

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

\\
\begin{array}{l}
t_0 := 4 \cdot \left(A \cdot C\right)\\
\mathbf{if}\;A \leq -5.4 \cdot 10^{-163}:\\
\;\;\;\;\frac{\sqrt{\left(A \cdot -8\right) \cdot \left(\left(A + A\right) \cdot \left(C \cdot F\right)\right)}}{t\_0}\\

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

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


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

    1. Initial program 22.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. Simplified33.3%

      \[\leadsto \color{blue}{\frac{\sqrt{\left(B \cdot B + \left(A \cdot C\right) \cdot -4\right) \cdot \left(\left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right) \cdot \left(2 \cdot F\right)\right)}}{4 \cdot \left(A \cdot C\right) - B \cdot B}} \]
    3. Add Preprocessing
    4. 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(A, \mathsf{\_.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), C\right)\right), \mathsf{*.f64}\left(2, F\right)\right)\right)\right), \color{blue}{\left(4 \cdot \left(A \cdot C\right)\right)}\right) \]
    5. 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(A, \mathsf{\_.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), C\right)\right), \mathsf{*.f64}\left(2, F\right)\right)\right)\right), \mathsf{*.f64}\left(4, \color{blue}{\left(A \cdot C\right)}\right)\right) \]
      2. *-lowering-*.f6424.0%

        \[\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(A, \mathsf{\_.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), C\right)\right), \mathsf{*.f64}\left(2, F\right)\right)\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(A, \color{blue}{C}\right)\right)\right) \]
    6. Simplified24.0%

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-8, A\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(C, F\right), \mathsf{\_.f64}\left(A, \left(-1 \cdot A\right)\right)\right)\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(A, C\right)\right)\right) \]
      8. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-8, A\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(C, F\right), \mathsf{\_.f64}\left(A, \left(\mathsf{neg}\left(A\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(A, C\right)\right)\right) \]
      9. neg-lowering-neg.f6423.1%

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

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

    if -5.40000000000000029e-163 < A < 3.9999999999999999e-48

    1. Initial program 33.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. Simplified36.9%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{\left(-2 \cdot \left({B}^{3} \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. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(-2, \left({B}^{3} \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(-2, \mathsf{*.f64}\left(\left({B}^{3}\right), 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) \]
      3. cube-multN/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(B, \left(B \cdot B\right)\right), 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. *-lowering-*.f6410.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(B, \mathsf{*.f64}\left(B, B\right)\right), 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. Simplified10.6%

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(B, \mathsf{*.f64}\left(B, \left(B \cdot F\right)\right)\right), -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) \]
      7. *-lowering-*.f6411.7%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(B, \mathsf{*.f64}\left(B, \mathsf{*.f64}\left(B, F\right)\right)\right), -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. Applied egg-rr11.7%

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

    if 3.9999999999999999e-48 < A

    1. Initial program 2.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. Simplified3.5%

      \[\leadsto \color{blue}{\frac{\sqrt{\left(B \cdot B + \left(A \cdot C\right) \cdot -4\right) \cdot \left(\left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right) \cdot \left(2 \cdot F\right)\right)}}{4 \cdot \left(A \cdot C\right) - B \cdot B}} \]
    3. Add Preprocessing
    4. 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(A, \mathsf{\_.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), C\right)\right), \mathsf{*.f64}\left(2, F\right)\right)\right)\right), \color{blue}{\left(4 \cdot \left(A \cdot C\right)\right)}\right) \]
    5. 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(A, \mathsf{\_.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), C\right)\right), \mathsf{*.f64}\left(2, F\right)\right)\right)\right), \mathsf{*.f64}\left(4, \color{blue}{\left(A \cdot C\right)}\right)\right) \]
      2. *-lowering-*.f642.4%

        \[\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(A, \mathsf{\_.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), C\right)\right), \mathsf{*.f64}\left(2, F\right)\right)\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(A, \color{blue}{C}\right)\right)\right) \]
    6. Simplified2.4%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-8, A\right), \mathsf{*.f64}\left(C, \mathsf{*.f64}\left(F, \mathsf{\_.f64}\left(C, \left(-1 \cdot C\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(A, C\right)\right)\right) \]
      7. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-8, A\right), \mathsf{*.f64}\left(C, \mathsf{*.f64}\left(F, \mathsf{\_.f64}\left(C, \left(\mathsf{neg}\left(C\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(A, C\right)\right)\right) \]
      8. neg-lowering-neg.f6424.0%

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

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

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

Alternative 14: 20.0% accurate, 4.9× speedup?

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

\\
\begin{array}{l}
t_0 := 4 \cdot \left(A \cdot C\right)\\
\mathbf{if}\;A \leq -3.8 \cdot 10^{-162}:\\
\;\;\;\;\frac{\sqrt{\left(A \cdot -8\right) \cdot \left(\left(A + A\right) \cdot \left(C \cdot F\right)\right)}}{t\_0}\\

\mathbf{elif}\;A \leq 2.25 \cdot 10^{-48}:\\
\;\;\;\;\frac{\sqrt{-2 \cdot \left(\left(B\_m \cdot B\_m\right) \cdot \left(B\_m \cdot F\right)\right)}}{t\_0 - B\_m \cdot B\_m}\\

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


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

    1. Initial program 22.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. Simplified33.3%

      \[\leadsto \color{blue}{\frac{\sqrt{\left(B \cdot B + \left(A \cdot C\right) \cdot -4\right) \cdot \left(\left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right) \cdot \left(2 \cdot F\right)\right)}}{4 \cdot \left(A \cdot C\right) - B \cdot B}} \]
    3. Add Preprocessing
    4. 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(A, \mathsf{\_.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), C\right)\right), \mathsf{*.f64}\left(2, F\right)\right)\right)\right), \color{blue}{\left(4 \cdot \left(A \cdot C\right)\right)}\right) \]
    5. 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(A, \mathsf{\_.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), C\right)\right), \mathsf{*.f64}\left(2, F\right)\right)\right)\right), \mathsf{*.f64}\left(4, \color{blue}{\left(A \cdot C\right)}\right)\right) \]
      2. *-lowering-*.f6424.0%

        \[\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(A, \mathsf{\_.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), C\right)\right), \mathsf{*.f64}\left(2, F\right)\right)\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(A, \color{blue}{C}\right)\right)\right) \]
    6. Simplified24.0%

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-8, A\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(C, F\right), \mathsf{\_.f64}\left(A, \left(-1 \cdot A\right)\right)\right)\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(A, C\right)\right)\right) \]
      8. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-8, A\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(C, F\right), \mathsf{\_.f64}\left(A, \left(\mathsf{neg}\left(A\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(A, C\right)\right)\right) \]
      9. neg-lowering-neg.f6423.1%

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

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

    if -3.80000000000000005e-162 < A < 2.24999999999999994e-48

    1. Initial program 33.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. Simplified36.9%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{\left(-2 \cdot \left({B}^{3} \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. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(-2, \left({B}^{3} \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(-2, \mathsf{*.f64}\left(\left({B}^{3}\right), 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) \]
      3. cube-multN/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(B, \left(B \cdot B\right)\right), 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. *-lowering-*.f6410.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(B, \mathsf{*.f64}\left(B, B\right)\right), 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. Simplified10.6%

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(-2, \left(\left(B \cdot F\right) \cdot \left(B \cdot B\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(-2, \mathsf{*.f64}\left(\left(B \cdot F\right), \left(B \cdot B\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(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(B, F\right), \left(B \cdot B\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-*.f6411.8%

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

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

    if 2.24999999999999994e-48 < A

    1. Initial program 2.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. Simplified3.5%

      \[\leadsto \color{blue}{\frac{\sqrt{\left(B \cdot B + \left(A \cdot C\right) \cdot -4\right) \cdot \left(\left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right) \cdot \left(2 \cdot F\right)\right)}}{4 \cdot \left(A \cdot C\right) - B \cdot B}} \]
    3. Add Preprocessing
    4. 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(A, \mathsf{\_.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), C\right)\right), \mathsf{*.f64}\left(2, F\right)\right)\right)\right), \color{blue}{\left(4 \cdot \left(A \cdot C\right)\right)}\right) \]
    5. 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(A, \mathsf{\_.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), C\right)\right), \mathsf{*.f64}\left(2, F\right)\right)\right)\right), \mathsf{*.f64}\left(4, \color{blue}{\left(A \cdot C\right)}\right)\right) \]
      2. *-lowering-*.f642.4%

        \[\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(A, \mathsf{\_.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), C\right)\right), \mathsf{*.f64}\left(2, F\right)\right)\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(A, \color{blue}{C}\right)\right)\right) \]
    6. Simplified2.4%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-8, A\right), \mathsf{*.f64}\left(C, \mathsf{*.f64}\left(F, \mathsf{\_.f64}\left(C, \left(-1 \cdot C\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(A, C\right)\right)\right) \]
      7. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-8, A\right), \mathsf{*.f64}\left(C, \mathsf{*.f64}\left(F, \mathsf{\_.f64}\left(C, \left(\mathsf{neg}\left(C\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(A, C\right)\right)\right) \]
      8. neg-lowering-neg.f6424.0%

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

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

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

Alternative 15: 18.9% accurate, 5.0× speedup?

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

\\
\begin{array}{l}
t_0 := 4 \cdot \left(A \cdot C\right)\\
\mathbf{if}\;A \leq -1 \cdot 10^{-162}:\\
\;\;\;\;\frac{\sqrt{\left(A \cdot -8\right) \cdot \left(\left(A + A\right) \cdot \left(C \cdot F\right)\right)}}{t\_0}\\

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

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


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

    1. Initial program 22.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. Simplified33.3%

      \[\leadsto \color{blue}{\frac{\sqrt{\left(B \cdot B + \left(A \cdot C\right) \cdot -4\right) \cdot \left(\left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right) \cdot \left(2 \cdot F\right)\right)}}{4 \cdot \left(A \cdot C\right) - B \cdot B}} \]
    3. Add Preprocessing
    4. 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(A, \mathsf{\_.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), C\right)\right), \mathsf{*.f64}\left(2, F\right)\right)\right)\right), \color{blue}{\left(4 \cdot \left(A \cdot C\right)\right)}\right) \]
    5. 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(A, \mathsf{\_.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), C\right)\right), \mathsf{*.f64}\left(2, F\right)\right)\right)\right), \mathsf{*.f64}\left(4, \color{blue}{\left(A \cdot C\right)}\right)\right) \]
      2. *-lowering-*.f6424.0%

        \[\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(A, \mathsf{\_.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), C\right)\right), \mathsf{*.f64}\left(2, F\right)\right)\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(A, \color{blue}{C}\right)\right)\right) \]
    6. Simplified24.0%

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-8, A\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(C, F\right), \mathsf{\_.f64}\left(A, \left(-1 \cdot A\right)\right)\right)\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(A, C\right)\right)\right) \]
      8. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-8, A\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(C, F\right), \mathsf{\_.f64}\left(A, \left(\mathsf{neg}\left(A\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(A, C\right)\right)\right) \]
      9. neg-lowering-neg.f6423.1%

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

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

    if -9.99999999999999954e-163 < A < 1.99999999999999993e-64

    1. Initial program 33.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. Simplified36.3%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{\left(-2 \cdot \left({B}^{3} \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. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(-2, \left({B}^{3} \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(-2, \mathsf{*.f64}\left(\left({B}^{3}\right), 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) \]
      3. cube-multN/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(B, \left(B \cdot B\right)\right), 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. *-lowering-*.f6410.7%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(B, \mathsf{*.f64}\left(B, B\right)\right), 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. Simplified10.7%

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(B, \mathsf{*.f64}\left(B, B\right)\right), F\right)\right)\right), \mathsf{*.f64}\left(-1, \mathsf{*.f64}\left(B, \color{blue}{B}\right)\right)\right) \]
    9. Simplified10.3%

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

    if 1.99999999999999993e-64 < A

    1. Initial program 4.1%

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

      \[\leadsto \color{blue}{\frac{\sqrt{\left(B \cdot B + \left(A \cdot C\right) \cdot -4\right) \cdot \left(\left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right) \cdot \left(2 \cdot F\right)\right)}}{4 \cdot \left(A \cdot C\right) - B \cdot B}} \]
    3. Add Preprocessing
    4. 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(A, \mathsf{\_.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), C\right)\right), \mathsf{*.f64}\left(2, F\right)\right)\right)\right), \color{blue}{\left(4 \cdot \left(A \cdot C\right)\right)}\right) \]
    5. 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(A, \mathsf{\_.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), C\right)\right), \mathsf{*.f64}\left(2, F\right)\right)\right)\right), \mathsf{*.f64}\left(4, \color{blue}{\left(A \cdot C\right)}\right)\right) \]
      2. *-lowering-*.f642.6%

        \[\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(A, \mathsf{\_.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), C\right)\right), \mathsf{*.f64}\left(2, F\right)\right)\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(A, \color{blue}{C}\right)\right)\right) \]
    6. Simplified2.6%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-8, A\right), \mathsf{*.f64}\left(C, \mathsf{*.f64}\left(F, \mathsf{\_.f64}\left(C, \left(-1 \cdot C\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(A, C\right)\right)\right) \]
      7. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-8, A\right), \mathsf{*.f64}\left(C, \mathsf{*.f64}\left(F, \mathsf{\_.f64}\left(C, \left(\mathsf{neg}\left(C\right)\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(A, C\right)\right)\right) \]
      8. neg-lowering-neg.f6423.5%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-8, A\right), \mathsf{*.f64}\left(C, \mathsf{*.f64}\left(F, \mathsf{\_.f64}\left(C, \mathsf{neg.f64}\left(C\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(A, C\right)\right)\right) \]
    9. Simplified23.5%

      \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right) \cdot \left(C \cdot \left(F \cdot \left(C - \left(-C\right)\right)\right)\right)}}}{4 \cdot \left(A \cdot C\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification19.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -1 \cdot 10^{-162}:\\ \;\;\;\;\frac{\sqrt{\left(A \cdot -8\right) \cdot \left(\left(A + A\right) \cdot \left(C \cdot F\right)\right)}}{4 \cdot \left(A \cdot C\right)}\\ \mathbf{elif}\;A \leq 2 \cdot 10^{-64}:\\ \;\;\;\;0 - \frac{\sqrt{-2 \cdot \left(F \cdot \left(B \cdot \left(B \cdot B\right)\right)\right)}}{B \cdot B}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{\left(A \cdot -8\right) \cdot \left(C \cdot \left(F \cdot \left(C + C\right)\right)\right)}}{4 \cdot \left(A \cdot C\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 13.2% accurate, 5.1× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ \begin{array}{l} \mathbf{if}\;B\_m \leq 2 \cdot 10^{-157}:\\ \;\;\;\;\frac{\sqrt{-16 \cdot \left(A \cdot \left(F \cdot \left(C \cdot C\right)\right)\right)}}{4 \cdot \left(A \cdot C\right)}\\ \mathbf{elif}\;B\_m \leq 3.9 \cdot 10^{+90}:\\ \;\;\;\;0 - \frac{\sqrt{-2 \cdot \left(F \cdot \left(B\_m \cdot \left(B\_m \cdot B\_m\right)\right)\right)}}{B\_m \cdot B\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{B\_m}{-2 \cdot {\left(C \cdot F\right)}^{0.5}}}\\ \end{array} \end{array} \]
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
 :precision binary64
 (if (<= B_m 2e-157)
   (/ (sqrt (* -16.0 (* A (* F (* C C))))) (* 4.0 (* A C)))
   (if (<= B_m 3.9e+90)
     (- 0.0 (/ (sqrt (* -2.0 (* F (* B_m (* B_m B_m))))) (* B_m B_m)))
     (/ 1.0 (/ B_m (* -2.0 (pow (* C F) 0.5)))))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
	double tmp;
	if (B_m <= 2e-157) {
		tmp = sqrt((-16.0 * (A * (F * (C * C))))) / (4.0 * (A * C));
	} else if (B_m <= 3.9e+90) {
		tmp = 0.0 - (sqrt((-2.0 * (F * (B_m * (B_m * B_m))))) / (B_m * B_m));
	} else {
		tmp = 1.0 / (B_m / (-2.0 * pow((C * F), 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 <= 2d-157) then
        tmp = sqrt(((-16.0d0) * (a * (f * (c * c))))) / (4.0d0 * (a * c))
    else if (b_m <= 3.9d+90) then
        tmp = 0.0d0 - (sqrt(((-2.0d0) * (f * (b_m * (b_m * b_m))))) / (b_m * b_m))
    else
        tmp = 1.0d0 / (b_m / ((-2.0d0) * ((c * f) ** 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 <= 2e-157) {
		tmp = Math.sqrt((-16.0 * (A * (F * (C * C))))) / (4.0 * (A * C));
	} else if (B_m <= 3.9e+90) {
		tmp = 0.0 - (Math.sqrt((-2.0 * (F * (B_m * (B_m * B_m))))) / (B_m * B_m));
	} else {
		tmp = 1.0 / (B_m / (-2.0 * Math.pow((C * F), 0.5)));
	}
	return tmp;
}
B_m = math.fabs(B)
def code(A, B_m, C, F):
	tmp = 0
	if B_m <= 2e-157:
		tmp = math.sqrt((-16.0 * (A * (F * (C * C))))) / (4.0 * (A * C))
	elif B_m <= 3.9e+90:
		tmp = 0.0 - (math.sqrt((-2.0 * (F * (B_m * (B_m * B_m))))) / (B_m * B_m))
	else:
		tmp = 1.0 / (B_m / (-2.0 * math.pow((C * F), 0.5)))
	return tmp
B_m = abs(B)
function code(A, B_m, C, F)
	tmp = 0.0
	if (B_m <= 2e-157)
		tmp = Float64(sqrt(Float64(-16.0 * Float64(A * Float64(F * Float64(C * C))))) / Float64(4.0 * Float64(A * C)));
	elseif (B_m <= 3.9e+90)
		tmp = Float64(0.0 - Float64(sqrt(Float64(-2.0 * Float64(F * Float64(B_m * Float64(B_m * B_m))))) / Float64(B_m * B_m)));
	else
		tmp = Float64(1.0 / Float64(B_m / Float64(-2.0 * (Float64(C * F) ^ 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 <= 2e-157)
		tmp = sqrt((-16.0 * (A * (F * (C * C))))) / (4.0 * (A * C));
	elseif (B_m <= 3.9e+90)
		tmp = 0.0 - (sqrt((-2.0 * (F * (B_m * (B_m * B_m))))) / (B_m * B_m));
	else
		tmp = 1.0 / (B_m / (-2.0 * ((C * F) ^ 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, 2e-157], N[(N[Sqrt[N[(-16.0 * N[(A * N[(F * N[(C * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B$95$m, 3.9e+90], N[(0.0 - N[(N[Sqrt[N[(-2.0 * N[(F * N[(B$95$m * N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(B$95$m / N[(-2.0 * N[Power[N[(C * F), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
B_m = \left|B\right|

\\
\begin{array}{l}
\mathbf{if}\;B\_m \leq 2 \cdot 10^{-157}:\\
\;\;\;\;\frac{\sqrt{-16 \cdot \left(A \cdot \left(F \cdot \left(C \cdot C\right)\right)\right)}}{4 \cdot \left(A \cdot C\right)}\\

\mathbf{elif}\;B\_m \leq 3.9 \cdot 10^{+90}:\\
\;\;\;\;0 - \frac{\sqrt{-2 \cdot \left(F \cdot \left(B\_m \cdot \left(B\_m \cdot B\_m\right)\right)\right)}}{B\_m \cdot B\_m}\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{B\_m}{-2 \cdot {\left(C \cdot F\right)}^{0.5}}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if B < 1.99999999999999989e-157

    1. Initial program 19.1%

      \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
    2. Simplified25.6%

      \[\leadsto \color{blue}{\frac{\sqrt{\left(B \cdot B + \left(A \cdot C\right) \cdot -4\right) \cdot \left(\left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right) \cdot \left(2 \cdot F\right)\right)}}{4 \cdot \left(A \cdot C\right) - B \cdot B}} \]
    3. Add Preprocessing
    4. 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(A, \mathsf{\_.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), C\right)\right), \mathsf{*.f64}\left(2, F\right)\right)\right)\right), \color{blue}{\left(4 \cdot \left(A \cdot C\right)\right)}\right) \]
    5. 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(A, \mathsf{\_.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), C\right)\right), \mathsf{*.f64}\left(2, F\right)\right)\right)\right), \mathsf{*.f64}\left(4, \color{blue}{\left(A \cdot C\right)}\right)\right) \]
      2. *-lowering-*.f6416.4%

        \[\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(A, \mathsf{\_.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), C\right)\right), \mathsf{*.f64}\left(2, F\right)\right)\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(A, \color{blue}{C}\right)\right)\right) \]
    6. Simplified16.4%

      \[\leadsto \frac{\sqrt{\left(B \cdot B + \left(A \cdot C\right) \cdot -4\right) \cdot \left(\left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right) \cdot \left(2 \cdot F\right)\right)}}{\color{blue}{4 \cdot \left(A \cdot C\right)}} \]
    7. Taylor expanded in B around 0

      \[\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(4, \mathsf{*.f64}\left(A, C\right)\right)\right) \]
    8. 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(4, \mathsf{*.f64}\left(A, C\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(4, \mathsf{*.f64}\left(A, C\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(4, \mathsf{*.f64}\left(A, C\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(4, \mathsf{*.f64}\left(A, C\right)\right)\right) \]
      5. *-lowering-*.f6410.5%

        \[\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(4, \mathsf{*.f64}\left(A, C\right)\right)\right) \]
    9. Simplified10.5%

      \[\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)} \]

    if 1.99999999999999989e-157 < B < 3.9000000000000002e90

    1. Initial program 38.3%

      \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
    2. Simplified46.6%

      \[\leadsto \color{blue}{\frac{\sqrt{\left(B \cdot B + \left(A \cdot C\right) \cdot -4\right) \cdot \left(\left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right) \cdot \left(2 \cdot F\right)\right)}}{4 \cdot \left(A \cdot C\right) - B \cdot B}} \]
    3. Add Preprocessing
    4. Taylor expanded in B around inf

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{\left(-2 \cdot \left({B}^{3} \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. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(-2, \left({B}^{3} \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(-2, \mathsf{*.f64}\left(\left({B}^{3}\right), 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) \]
      3. cube-multN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(-2, \mathsf{*.f64}\left(\left(B \cdot \left(B \cdot B\right)\right), 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(-2, \mathsf{*.f64}\left(\left(B \cdot {B}^{2}\right), 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(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(B, \left({B}^{2}\right)\right), 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. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(B, \left(B \cdot B\right)\right), 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. *-lowering-*.f6423.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(B, \mathsf{*.f64}\left(B, B\right)\right), 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. Simplified23.3%

      \[\leadsto \frac{\sqrt{\color{blue}{-2 \cdot \left(\left(B \cdot \left(B \cdot B\right)\right) \cdot F\right)}}}{4 \cdot \left(A \cdot C\right) - B \cdot B} \]
    7. Taylor expanded in A around 0

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(B, \mathsf{*.f64}\left(B, B\right)\right), F\right)\right)\right), \color{blue}{\left(-1 \cdot {B}^{2}\right)}\right) \]
    8. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(B, \mathsf{*.f64}\left(B, B\right)\right), F\right)\right)\right), \mathsf{*.f64}\left(-1, \color{blue}{\left({B}^{2}\right)}\right)\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(B, \mathsf{*.f64}\left(B, B\right)\right), F\right)\right)\right), \mathsf{*.f64}\left(-1, \left(B \cdot \color{blue}{B}\right)\right)\right) \]
      3. *-lowering-*.f6423.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(-2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(B, \mathsf{*.f64}\left(B, B\right)\right), F\right)\right)\right), \mathsf{*.f64}\left(-1, \mathsf{*.f64}\left(B, \color{blue}{B}\right)\right)\right) \]
    9. Simplified23.0%

      \[\leadsto \frac{\sqrt{-2 \cdot \left(\left(B \cdot \left(B \cdot B\right)\right) \cdot F\right)}}{\color{blue}{-1 \cdot \left(B \cdot B\right)}} \]

    if 3.9000000000000002e90 < B

    1. Initial program 6.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. Simplified6.4%

      \[\leadsto \color{blue}{\frac{\sqrt{\left(B \cdot B + \left(A \cdot C\right) \cdot -4\right) \cdot \left(\left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right) \cdot \left(2 \cdot F\right)\right)}}{4 \cdot \left(A \cdot C\right) - B \cdot B}} \]
    3. Add Preprocessing
    4. Taylor expanded in C around -inf

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{\left({C}^{2} \cdot \left(-16 \cdot \left(A \cdot F\right) + -1 \cdot \frac{-4 \cdot \left({B}^{2} \cdot F\right) + 4 \cdot \frac{A \cdot \left({B}^{2} \cdot F\right)}{C}}{C}\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. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left({C}^{2}\right), \left(-16 \cdot \left(A \cdot F\right) + -1 \cdot \frac{-4 \cdot \left({B}^{2} \cdot F\right) + 4 \cdot \frac{A \cdot \left({B}^{2} \cdot F\right)}{C}}{C}\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. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(C \cdot C\right), \left(-16 \cdot \left(A \cdot F\right) + -1 \cdot \frac{-4 \cdot \left({B}^{2} \cdot F\right) + 4 \cdot \frac{A \cdot \left({B}^{2} \cdot F\right)}{C}}{C}\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(C, C\right), \left(-16 \cdot \left(A \cdot F\right) + -1 \cdot \frac{-4 \cdot \left({B}^{2} \cdot F\right) + 4 \cdot \frac{A \cdot \left({B}^{2} \cdot F\right)}{C}}{C}\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. fma-defineN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \left(\mathsf{fma}\left(-16, A \cdot F, -1 \cdot \frac{-4 \cdot \left({B}^{2} \cdot F\right) + 4 \cdot \frac{A \cdot \left({B}^{2} \cdot F\right)}{C}}{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) \]
      5. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \left(\mathsf{fma}\left(-16, A \cdot F, \mathsf{neg}\left(\frac{-4 \cdot \left({B}^{2} \cdot F\right) + 4 \cdot \frac{A \cdot \left({B}^{2} \cdot F\right)}{C}}{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. fmm-undefN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \left(-16 \cdot \left(A \cdot F\right) - \frac{-4 \cdot \left({B}^{2} \cdot F\right) + 4 \cdot \frac{A \cdot \left({B}^{2} \cdot F\right)}{C}}{C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      7. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \mathsf{\_.f64}\left(\left(-16 \cdot \left(A \cdot F\right)\right), \left(\frac{-4 \cdot \left({B}^{2} \cdot F\right) + 4 \cdot \frac{A \cdot \left({B}^{2} \cdot F\right)}{C}}{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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(-16, \left(A \cdot F\right)\right), \left(\frac{-4 \cdot \left({B}^{2} \cdot F\right) + 4 \cdot \frac{A \cdot \left({B}^{2} \cdot F\right)}{C}}{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) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, F\right)\right), \left(\frac{-4 \cdot \left({B}^{2} \cdot F\right) + 4 \cdot \frac{A \cdot \left({B}^{2} \cdot F\right)}{C}}{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) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, F\right)\right), \mathsf{/.f64}\left(\left(-4 \cdot \left({B}^{2} \cdot F\right) + 4 \cdot \frac{A \cdot \left({B}^{2} \cdot F\right)}{C}\right), 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) \]
    6. Simplified0.2%

      \[\leadsto \frac{\sqrt{\color{blue}{\left(C \cdot C\right) \cdot \left(-16 \cdot \left(A \cdot F\right) - \frac{-4 \cdot \left(\left(B \cdot B\right) \cdot F\right) + \frac{4 \cdot \left(A \cdot \left(\left(B \cdot B\right) \cdot F\right)\right)}{C}}{C}\right)}}}{4 \cdot \left(A \cdot C\right) - B \cdot B} \]
    7. Taylor expanded in A around 0

      \[\leadsto \color{blue}{-2 \cdot \left(\frac{1}{B} \cdot \sqrt{C \cdot F}\right)} \]
    8. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(-2 \cdot \frac{1}{B}\right) \cdot \color{blue}{\sqrt{C \cdot F}} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(-2 \cdot \frac{1}{B}\right), \color{blue}{\left(\sqrt{C \cdot F}\right)}\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-2, \left(\frac{1}{B}\right)\right), \left(\sqrt{\color{blue}{C \cdot F}}\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-2, \mathsf{/.f64}\left(1, B\right)\right), \left(\sqrt{C \cdot \color{blue}{F}}\right)\right) \]
      5. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-2, \mathsf{/.f64}\left(1, B\right)\right), \mathsf{sqrt.f64}\left(\left(C \cdot F\right)\right)\right) \]
      6. *-lowering-*.f6412.6%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-2, \mathsf{/.f64}\left(1, B\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(C, F\right)\right)\right) \]
    9. Simplified12.6%

      \[\leadsto \color{blue}{\left(-2 \cdot \frac{1}{B}\right) \cdot \sqrt{C \cdot F}} \]
    10. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(-2 \cdot \frac{1}{B}\right), \color{blue}{\left(\sqrt{C \cdot F}\right)}\right) \]
      2. un-div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{-2}{B}\right), \left(\sqrt{\color{blue}{C \cdot F}}\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-2, B\right), \left(\sqrt{\color{blue}{C \cdot F}}\right)\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-2, B\right), \mathsf{sqrt.f64}\left(\left(C \cdot F\right)\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-2, B\right), \mathsf{sqrt.f64}\left(\left(F \cdot C\right)\right)\right) \]
      6. *-lowering-*.f6412.6%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-2, B\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, C\right)\right)\right) \]
    11. Applied egg-rr12.6%

      \[\leadsto \color{blue}{\frac{-2}{B} \cdot \sqrt{F \cdot C}} \]
    12. Step-by-step derivation
      1. associate-*l/N/A

        \[\leadsto \frac{-2 \cdot \sqrt{F \cdot C}}{\color{blue}{B}} \]
      2. clear-numN/A

        \[\leadsto \frac{1}{\color{blue}{\frac{B}{-2 \cdot \sqrt{F \cdot C}}}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(1, \color{blue}{\left(\frac{B}{-2 \cdot \sqrt{F \cdot C}}\right)}\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(B, \color{blue}{\left(-2 \cdot \sqrt{F \cdot C}\right)}\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(B, \mathsf{*.f64}\left(-2, \color{blue}{\left(\sqrt{F \cdot C}\right)}\right)\right)\right) \]
      6. pow1/2N/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(B, \mathsf{*.f64}\left(-2, \left({\left(F \cdot C\right)}^{\color{blue}{\frac{1}{2}}}\right)\right)\right)\right) \]
      7. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(B, \mathsf{*.f64}\left(-2, \mathsf{pow.f64}\left(\left(F \cdot C\right), \color{blue}{\frac{1}{2}}\right)\right)\right)\right) \]
      8. *-lowering-*.f6412.7%

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(B, \mathsf{*.f64}\left(-2, \mathsf{pow.f64}\left(\mathsf{*.f64}\left(F, C\right), \frac{1}{2}\right)\right)\right)\right) \]
    13. Applied egg-rr12.7%

      \[\leadsto \color{blue}{\frac{1}{\frac{B}{-2 \cdot {\left(F \cdot C\right)}^{0.5}}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification13.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 2 \cdot 10^{-157}:\\ \;\;\;\;\frac{\sqrt{-16 \cdot \left(A \cdot \left(F \cdot \left(C \cdot C\right)\right)\right)}}{4 \cdot \left(A \cdot C\right)}\\ \mathbf{elif}\;B \leq 3.9 \cdot 10^{+90}:\\ \;\;\;\;0 - \frac{\sqrt{-2 \cdot \left(F \cdot \left(B \cdot \left(B \cdot B\right)\right)\right)}}{B \cdot B}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{B}{-2 \cdot {\left(C \cdot F\right)}^{0.5}}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 9.4% accurate, 5.3× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ \begin{array}{l} \mathbf{if}\;C \leq -1.15 \cdot 10^{+43}:\\ \;\;\;\;\frac{{\left(C \cdot F\right)}^{0.5}}{\frac{B\_m}{-2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{-16 \cdot \left(A \cdot \left(F \cdot \left(C \cdot C\right)\right)\right)}}{4 \cdot \left(A \cdot C\right)}\\ \end{array} \end{array} \]
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
 :precision binary64
 (if (<= C -1.15e+43)
   (/ (pow (* C F) 0.5) (/ B_m -2.0))
   (/ (sqrt (* -16.0 (* A (* F (* C C))))) (* 4.0 (* A C)))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
	double tmp;
	if (C <= -1.15e+43) {
		tmp = pow((C * F), 0.5) / (B_m / -2.0);
	} else {
		tmp = sqrt((-16.0 * (A * (F * (C * C))))) / (4.0 * (A * C));
	}
	return tmp;
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
    real(8), intent (in) :: a
    real(8), intent (in) :: b_m
    real(8), intent (in) :: c
    real(8), intent (in) :: f
    real(8) :: tmp
    if (c <= (-1.15d+43)) then
        tmp = ((c * f) ** 0.5d0) / (b_m / (-2.0d0))
    else
        tmp = sqrt(((-16.0d0) * (a * (f * (c * c))))) / (4.0d0 * (a * c))
    end if
    code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
	double tmp;
	if (C <= -1.15e+43) {
		tmp = Math.pow((C * F), 0.5) / (B_m / -2.0);
	} else {
		tmp = Math.sqrt((-16.0 * (A * (F * (C * C))))) / (4.0 * (A * C));
	}
	return tmp;
}
B_m = math.fabs(B)
def code(A, B_m, C, F):
	tmp = 0
	if C <= -1.15e+43:
		tmp = math.pow((C * F), 0.5) / (B_m / -2.0)
	else:
		tmp = math.sqrt((-16.0 * (A * (F * (C * C))))) / (4.0 * (A * C))
	return tmp
B_m = abs(B)
function code(A, B_m, C, F)
	tmp = 0.0
	if (C <= -1.15e+43)
		tmp = Float64((Float64(C * F) ^ 0.5) / Float64(B_m / -2.0));
	else
		tmp = Float64(sqrt(Float64(-16.0 * Float64(A * Float64(F * Float64(C * C))))) / Float64(4.0 * Float64(A * C)));
	end
	return tmp
end
B_m = abs(B);
function tmp_2 = code(A, B_m, C, F)
	tmp = 0.0;
	if (C <= -1.15e+43)
		tmp = ((C * F) ^ 0.5) / (B_m / -2.0);
	else
		tmp = sqrt((-16.0 * (A * (F * (C * C))))) / (4.0 * (A * C));
	end
	tmp_2 = tmp;
end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := If[LessEqual[C, -1.15e+43], N[(N[Power[N[(C * F), $MachinePrecision], 0.5], $MachinePrecision] / N[(B$95$m / -2.0), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(-16.0 * N[(A * N[(F * N[(C * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|

\\
\begin{array}{l}
\mathbf{if}\;C \leq -1.15 \cdot 10^{+43}:\\
\;\;\;\;\frac{{\left(C \cdot F\right)}^{0.5}}{\frac{B\_m}{-2}}\\

\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{-16 \cdot \left(A \cdot \left(F \cdot \left(C \cdot C\right)\right)\right)}}{4 \cdot \left(A \cdot C\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if C < -1.1500000000000001e43

    1. Initial program 16.6%

      \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
    2. Simplified27.1%

      \[\leadsto \color{blue}{\frac{\sqrt{\left(B \cdot B + \left(A \cdot C\right) \cdot -4\right) \cdot \left(\left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right) \cdot \left(2 \cdot F\right)\right)}}{4 \cdot \left(A \cdot C\right) - B \cdot B}} \]
    3. Add Preprocessing
    4. Taylor expanded in C around -inf

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{\left({C}^{2} \cdot \left(-16 \cdot \left(A \cdot F\right) + -1 \cdot \frac{-4 \cdot \left({B}^{2} \cdot F\right) + 4 \cdot \frac{A \cdot \left({B}^{2} \cdot F\right)}{C}}{C}\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. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left({C}^{2}\right), \left(-16 \cdot \left(A \cdot F\right) + -1 \cdot \frac{-4 \cdot \left({B}^{2} \cdot F\right) + 4 \cdot \frac{A \cdot \left({B}^{2} \cdot F\right)}{C}}{C}\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. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(C \cdot C\right), \left(-16 \cdot \left(A \cdot F\right) + -1 \cdot \frac{-4 \cdot \left({B}^{2} \cdot F\right) + 4 \cdot \frac{A \cdot \left({B}^{2} \cdot F\right)}{C}}{C}\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(C, C\right), \left(-16 \cdot \left(A \cdot F\right) + -1 \cdot \frac{-4 \cdot \left({B}^{2} \cdot F\right) + 4 \cdot \frac{A \cdot \left({B}^{2} \cdot F\right)}{C}}{C}\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. fma-defineN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \left(\mathsf{fma}\left(-16, A \cdot F, -1 \cdot \frac{-4 \cdot \left({B}^{2} \cdot F\right) + 4 \cdot \frac{A \cdot \left({B}^{2} \cdot F\right)}{C}}{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) \]
      5. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \left(\mathsf{fma}\left(-16, A \cdot F, \mathsf{neg}\left(\frac{-4 \cdot \left({B}^{2} \cdot F\right) + 4 \cdot \frac{A \cdot \left({B}^{2} \cdot F\right)}{C}}{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. fmm-undefN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \left(-16 \cdot \left(A \cdot F\right) - \frac{-4 \cdot \left({B}^{2} \cdot F\right) + 4 \cdot \frac{A \cdot \left({B}^{2} \cdot F\right)}{C}}{C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      7. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \mathsf{\_.f64}\left(\left(-16 \cdot \left(A \cdot F\right)\right), \left(\frac{-4 \cdot \left({B}^{2} \cdot F\right) + 4 \cdot \frac{A \cdot \left({B}^{2} \cdot F\right)}{C}}{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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(-16, \left(A \cdot F\right)\right), \left(\frac{-4 \cdot \left({B}^{2} \cdot F\right) + 4 \cdot \frac{A \cdot \left({B}^{2} \cdot F\right)}{C}}{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) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, F\right)\right), \left(\frac{-4 \cdot \left({B}^{2} \cdot F\right) + 4 \cdot \frac{A \cdot \left({B}^{2} \cdot F\right)}{C}}{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) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, F\right)\right), \mathsf{/.f64}\left(\left(-4 \cdot \left({B}^{2} \cdot F\right) + 4 \cdot \frac{A \cdot \left({B}^{2} \cdot F\right)}{C}\right), 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) \]
    6. Simplified12.1%

      \[\leadsto \frac{\sqrt{\color{blue}{\left(C \cdot C\right) \cdot \left(-16 \cdot \left(A \cdot F\right) - \frac{-4 \cdot \left(\left(B \cdot B\right) \cdot F\right) + \frac{4 \cdot \left(A \cdot \left(\left(B \cdot B\right) \cdot F\right)\right)}{C}}{C}\right)}}}{4 \cdot \left(A \cdot C\right) - B \cdot B} \]
    7. Taylor expanded in A around 0

      \[\leadsto \color{blue}{-2 \cdot \left(\frac{1}{B} \cdot \sqrt{C \cdot F}\right)} \]
    8. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(-2 \cdot \frac{1}{B}\right) \cdot \color{blue}{\sqrt{C \cdot F}} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(-2 \cdot \frac{1}{B}\right), \color{blue}{\left(\sqrt{C \cdot F}\right)}\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-2, \left(\frac{1}{B}\right)\right), \left(\sqrt{\color{blue}{C \cdot F}}\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-2, \mathsf{/.f64}\left(1, B\right)\right), \left(\sqrt{C \cdot \color{blue}{F}}\right)\right) \]
      5. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-2, \mathsf{/.f64}\left(1, B\right)\right), \mathsf{sqrt.f64}\left(\left(C \cdot F\right)\right)\right) \]
      6. *-lowering-*.f6416.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-2, \mathsf{/.f64}\left(1, B\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(C, F\right)\right)\right) \]
    9. Simplified16.0%

      \[\leadsto \color{blue}{\left(-2 \cdot \frac{1}{B}\right) \cdot \sqrt{C \cdot F}} \]
    10. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(-2 \cdot \frac{1}{B}\right), \color{blue}{\left(\sqrt{C \cdot F}\right)}\right) \]
      2. un-div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{-2}{B}\right), \left(\sqrt{\color{blue}{C \cdot F}}\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-2, B\right), \left(\sqrt{\color{blue}{C \cdot F}}\right)\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-2, B\right), \mathsf{sqrt.f64}\left(\left(C \cdot F\right)\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-2, B\right), \mathsf{sqrt.f64}\left(\left(F \cdot C\right)\right)\right) \]
      6. *-lowering-*.f6416.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-2, B\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, C\right)\right)\right) \]
    11. Applied egg-rr16.0%

      \[\leadsto \color{blue}{\frac{-2}{B} \cdot \sqrt{F \cdot C}} \]
    12. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \sqrt{F \cdot C} \cdot \color{blue}{\frac{-2}{B}} \]
      2. clear-numN/A

        \[\leadsto \sqrt{F \cdot C} \cdot \frac{1}{\color{blue}{\frac{B}{-2}}} \]
      3. un-div-invN/A

        \[\leadsto \frac{\sqrt{F \cdot C}}{\color{blue}{\frac{B}{-2}}} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{F \cdot C}\right), \color{blue}{\left(\frac{B}{-2}\right)}\right) \]
      5. pow1/2N/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(F \cdot C\right)}^{\frac{1}{2}}\right), \left(\frac{\color{blue}{B}}{-2}\right)\right) \]
      6. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(F \cdot C\right), \frac{1}{2}\right), \left(\frac{\color{blue}{B}}{-2}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(F, C\right), \frac{1}{2}\right), \left(\frac{B}{-2}\right)\right) \]
      8. /-lowering-/.f6416.1%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(F, C\right), \frac{1}{2}\right), \mathsf{/.f64}\left(B, \color{blue}{-2}\right)\right) \]
    13. Applied egg-rr16.1%

      \[\leadsto \color{blue}{\frac{{\left(F \cdot C\right)}^{0.5}}{\frac{B}{-2}}} \]

    if -1.1500000000000001e43 < C

    1. Initial program 21.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. Simplified25.6%

      \[\leadsto \color{blue}{\frac{\sqrt{\left(B \cdot B + \left(A \cdot C\right) \cdot -4\right) \cdot \left(\left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right) \cdot \left(2 \cdot F\right)\right)}}{4 \cdot \left(A \cdot C\right) - B \cdot B}} \]
    3. Add Preprocessing
    4. 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(A, \mathsf{\_.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), C\right)\right), \mathsf{*.f64}\left(2, F\right)\right)\right)\right), \color{blue}{\left(4 \cdot \left(A \cdot C\right)\right)}\right) \]
    5. 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(A, \mathsf{\_.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), C\right)\right), \mathsf{*.f64}\left(2, F\right)\right)\right)\right), \mathsf{*.f64}\left(4, \color{blue}{\left(A \cdot C\right)}\right)\right) \]
      2. *-lowering-*.f6411.7%

        \[\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(A, \mathsf{\_.f64}\left(\mathsf{hypot.f64}\left(B, \mathsf{\_.f64}\left(A, C\right)\right), C\right)\right), \mathsf{*.f64}\left(2, F\right)\right)\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(A, \color{blue}{C}\right)\right)\right) \]
    6. Simplified11.7%

      \[\leadsto \frac{\sqrt{\left(B \cdot B + \left(A \cdot C\right) \cdot -4\right) \cdot \left(\left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right) \cdot \left(2 \cdot F\right)\right)}}{\color{blue}{4 \cdot \left(A \cdot C\right)}} \]
    7. Taylor expanded in B around 0

      \[\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(4, \mathsf{*.f64}\left(A, C\right)\right)\right) \]
    8. 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(4, \mathsf{*.f64}\left(A, C\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(4, \mathsf{*.f64}\left(A, C\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(4, \mathsf{*.f64}\left(A, C\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(4, \mathsf{*.f64}\left(A, C\right)\right)\right) \]
      5. *-lowering-*.f649.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(4, \mathsf{*.f64}\left(A, C\right)\right)\right) \]
    9. Simplified9.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)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification11.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -1.15 \cdot 10^{+43}:\\ \;\;\;\;\frac{{\left(C \cdot F\right)}^{0.5}}{\frac{B}{-2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{-16 \cdot \left(A \cdot \left(F \cdot \left(C \cdot C\right)\right)\right)}}{4 \cdot \left(A \cdot C\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 5.1% accurate, 5.9× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ \frac{{\left(C \cdot F\right)}^{0.5}}{\frac{B\_m}{-2}} \end{array} \]
B_m = (fabs.f64 B)
(FPCore (A B_m C F) :precision binary64 (/ (pow (* C F) 0.5) (/ B_m -2.0)))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
	return pow((C * F), 0.5) / (B_m / -2.0);
}
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 = ((c * f) ** 0.5d0) / (b_m / (-2.0d0))
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
	return Math.pow((C * F), 0.5) / (B_m / -2.0);
}
B_m = math.fabs(B)
def code(A, B_m, C, F):
	return math.pow((C * F), 0.5) / (B_m / -2.0)
B_m = abs(B)
function code(A, B_m, C, F)
	return Float64((Float64(C * F) ^ 0.5) / Float64(B_m / -2.0))
end
B_m = abs(B);
function tmp = code(A, B_m, C, F)
	tmp = ((C * F) ^ 0.5) / (B_m / -2.0);
end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := N[(N[Power[N[(C * F), $MachinePrecision], 0.5], $MachinePrecision] / N[(B$95$m / -2.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
B_m = \left|B\right|

\\
\frac{{\left(C \cdot F\right)}^{0.5}}{\frac{B\_m}{-2}}
\end{array}
Derivation
  1. Initial program 20.4%

    \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
  2. Simplified25.9%

    \[\leadsto \color{blue}{\frac{\sqrt{\left(B \cdot B + \left(A \cdot C\right) \cdot -4\right) \cdot \left(\left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right) \cdot \left(2 \cdot F\right)\right)}}{4 \cdot \left(A \cdot C\right) - B \cdot B}} \]
  3. Add Preprocessing
  4. Taylor expanded in C around -inf

    \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{\left({C}^{2} \cdot \left(-16 \cdot \left(A \cdot F\right) + -1 \cdot \frac{-4 \cdot \left({B}^{2} \cdot F\right) + 4 \cdot \frac{A \cdot \left({B}^{2} \cdot F\right)}{C}}{C}\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. Step-by-step derivation
    1. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left({C}^{2}\right), \left(-16 \cdot \left(A \cdot F\right) + -1 \cdot \frac{-4 \cdot \left({B}^{2} \cdot F\right) + 4 \cdot \frac{A \cdot \left({B}^{2} \cdot F\right)}{C}}{C}\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. unpow2N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(C \cdot C\right), \left(-16 \cdot \left(A \cdot F\right) + -1 \cdot \frac{-4 \cdot \left({B}^{2} \cdot F\right) + 4 \cdot \frac{A \cdot \left({B}^{2} \cdot F\right)}{C}}{C}\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(C, C\right), \left(-16 \cdot \left(A \cdot F\right) + -1 \cdot \frac{-4 \cdot \left({B}^{2} \cdot F\right) + 4 \cdot \frac{A \cdot \left({B}^{2} \cdot F\right)}{C}}{C}\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. fma-defineN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \left(\mathsf{fma}\left(-16, A \cdot F, -1 \cdot \frac{-4 \cdot \left({B}^{2} \cdot F\right) + 4 \cdot \frac{A \cdot \left({B}^{2} \cdot F\right)}{C}}{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) \]
    5. mul-1-negN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \left(\mathsf{fma}\left(-16, A \cdot F, \mathsf{neg}\left(\frac{-4 \cdot \left({B}^{2} \cdot F\right) + 4 \cdot \frac{A \cdot \left({B}^{2} \cdot F\right)}{C}}{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. fmm-undefN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \left(-16 \cdot \left(A \cdot F\right) - \frac{-4 \cdot \left({B}^{2} \cdot F\right) + 4 \cdot \frac{A \cdot \left({B}^{2} \cdot F\right)}{C}}{C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    7. --lowering--.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \mathsf{\_.f64}\left(\left(-16 \cdot \left(A \cdot F\right)\right), \left(\frac{-4 \cdot \left({B}^{2} \cdot F\right) + 4 \cdot \frac{A \cdot \left({B}^{2} \cdot F\right)}{C}}{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. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(-16, \left(A \cdot F\right)\right), \left(\frac{-4 \cdot \left({B}^{2} \cdot F\right) + 4 \cdot \frac{A \cdot \left({B}^{2} \cdot F\right)}{C}}{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) \]
    9. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, F\right)\right), \left(\frac{-4 \cdot \left({B}^{2} \cdot F\right) + 4 \cdot \frac{A \cdot \left({B}^{2} \cdot F\right)}{C}}{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) \]
    10. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, F\right)\right), \mathsf{/.f64}\left(\left(-4 \cdot \left({B}^{2} \cdot F\right) + 4 \cdot \frac{A \cdot \left({B}^{2} \cdot F\right)}{C}\right), 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) \]
  6. Simplified8.7%

    \[\leadsto \frac{\sqrt{\color{blue}{\left(C \cdot C\right) \cdot \left(-16 \cdot \left(A \cdot F\right) - \frac{-4 \cdot \left(\left(B \cdot B\right) \cdot F\right) + \frac{4 \cdot \left(A \cdot \left(\left(B \cdot B\right) \cdot F\right)\right)}{C}}{C}\right)}}}{4 \cdot \left(A \cdot C\right) - B \cdot B} \]
  7. Taylor expanded in A around 0

    \[\leadsto \color{blue}{-2 \cdot \left(\frac{1}{B} \cdot \sqrt{C \cdot F}\right)} \]
  8. Step-by-step derivation
    1. associate-*r*N/A

      \[\leadsto \left(-2 \cdot \frac{1}{B}\right) \cdot \color{blue}{\sqrt{C \cdot F}} \]
    2. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\left(-2 \cdot \frac{1}{B}\right), \color{blue}{\left(\sqrt{C \cdot F}\right)}\right) \]
    3. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-2, \left(\frac{1}{B}\right)\right), \left(\sqrt{\color{blue}{C \cdot F}}\right)\right) \]
    4. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-2, \mathsf{/.f64}\left(1, B\right)\right), \left(\sqrt{C \cdot \color{blue}{F}}\right)\right) \]
    5. sqrt-lowering-sqrt.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-2, \mathsf{/.f64}\left(1, B\right)\right), \mathsf{sqrt.f64}\left(\left(C \cdot F\right)\right)\right) \]
    6. *-lowering-*.f645.3%

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-2, \mathsf{/.f64}\left(1, B\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(C, F\right)\right)\right) \]
  9. Simplified5.3%

    \[\leadsto \color{blue}{\left(-2 \cdot \frac{1}{B}\right) \cdot \sqrt{C \cdot F}} \]
  10. Step-by-step derivation
    1. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\left(-2 \cdot \frac{1}{B}\right), \color{blue}{\left(\sqrt{C \cdot F}\right)}\right) \]
    2. un-div-invN/A

      \[\leadsto \mathsf{*.f64}\left(\left(\frac{-2}{B}\right), \left(\sqrt{\color{blue}{C \cdot F}}\right)\right) \]
    3. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-2, B\right), \left(\sqrt{\color{blue}{C \cdot F}}\right)\right) \]
    4. sqrt-lowering-sqrt.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-2, B\right), \mathsf{sqrt.f64}\left(\left(C \cdot F\right)\right)\right) \]
    5. *-commutativeN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-2, B\right), \mathsf{sqrt.f64}\left(\left(F \cdot C\right)\right)\right) \]
    6. *-lowering-*.f645.3%

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-2, B\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, C\right)\right)\right) \]
  11. Applied egg-rr5.3%

    \[\leadsto \color{blue}{\frac{-2}{B} \cdot \sqrt{F \cdot C}} \]
  12. Step-by-step derivation
    1. *-commutativeN/A

      \[\leadsto \sqrt{F \cdot C} \cdot \color{blue}{\frac{-2}{B}} \]
    2. clear-numN/A

      \[\leadsto \sqrt{F \cdot C} \cdot \frac{1}{\color{blue}{\frac{B}{-2}}} \]
    3. un-div-invN/A

      \[\leadsto \frac{\sqrt{F \cdot C}}{\color{blue}{\frac{B}{-2}}} \]
    4. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{F \cdot C}\right), \color{blue}{\left(\frac{B}{-2}\right)}\right) \]
    5. pow1/2N/A

      \[\leadsto \mathsf{/.f64}\left(\left({\left(F \cdot C\right)}^{\frac{1}{2}}\right), \left(\frac{\color{blue}{B}}{-2}\right)\right) \]
    6. pow-lowering-pow.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(F \cdot C\right), \frac{1}{2}\right), \left(\frac{\color{blue}{B}}{-2}\right)\right) \]
    7. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(F, C\right), \frac{1}{2}\right), \left(\frac{B}{-2}\right)\right) \]
    8. /-lowering-/.f645.4%

      \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(F, C\right), \frac{1}{2}\right), \mathsf{/.f64}\left(B, \color{blue}{-2}\right)\right) \]
  13. Applied egg-rr5.4%

    \[\leadsto \color{blue}{\frac{{\left(F \cdot C\right)}^{0.5}}{\frac{B}{-2}}} \]
  14. Final simplification5.4%

    \[\leadsto \frac{{\left(C \cdot F\right)}^{0.5}}{\frac{B}{-2}} \]
  15. Add Preprocessing

Alternative 19: 4.9% accurate, 5.9× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ \frac{-2 \cdot \sqrt{C \cdot F}}{B\_m} \end{array} \]
B_m = (fabs.f64 B)
(FPCore (A B_m C F) :precision binary64 (/ (* -2.0 (sqrt (* C F))) B_m))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
	return (-2.0 * sqrt((C * 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 = ((-2.0d0) * sqrt((c * f))) / b_m
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
	return (-2.0 * Math.sqrt((C * F))) / B_m;
}
B_m = math.fabs(B)
def code(A, B_m, C, F):
	return (-2.0 * math.sqrt((C * F))) / B_m
B_m = abs(B)
function code(A, B_m, C, F)
	return Float64(Float64(-2.0 * sqrt(Float64(C * F))) / B_m)
end
B_m = abs(B);
function tmp = code(A, B_m, C, F)
	tmp = (-2.0 * sqrt((C * F))) / B_m;
end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := N[(N[(-2.0 * N[Sqrt[N[(C * F), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / B$95$m), $MachinePrecision]
\begin{array}{l}
B_m = \left|B\right|

\\
\frac{-2 \cdot \sqrt{C \cdot F}}{B\_m}
\end{array}
Derivation
  1. Initial program 20.4%

    \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
  2. Simplified25.9%

    \[\leadsto \color{blue}{\frac{\sqrt{\left(B \cdot B + \left(A \cdot C\right) \cdot -4\right) \cdot \left(\left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right) \cdot \left(2 \cdot F\right)\right)}}{4 \cdot \left(A \cdot C\right) - B \cdot B}} \]
  3. Add Preprocessing
  4. Taylor expanded in C around -inf

    \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{\left({C}^{2} \cdot \left(-16 \cdot \left(A \cdot F\right) + -1 \cdot \frac{-4 \cdot \left({B}^{2} \cdot F\right) + 4 \cdot \frac{A \cdot \left({B}^{2} \cdot F\right)}{C}}{C}\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. Step-by-step derivation
    1. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left({C}^{2}\right), \left(-16 \cdot \left(A \cdot F\right) + -1 \cdot \frac{-4 \cdot \left({B}^{2} \cdot F\right) + 4 \cdot \frac{A \cdot \left({B}^{2} \cdot F\right)}{C}}{C}\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. unpow2N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(C \cdot C\right), \left(-16 \cdot \left(A \cdot F\right) + -1 \cdot \frac{-4 \cdot \left({B}^{2} \cdot F\right) + 4 \cdot \frac{A \cdot \left({B}^{2} \cdot F\right)}{C}}{C}\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(C, C\right), \left(-16 \cdot \left(A \cdot F\right) + -1 \cdot \frac{-4 \cdot \left({B}^{2} \cdot F\right) + 4 \cdot \frac{A \cdot \left({B}^{2} \cdot F\right)}{C}}{C}\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. fma-defineN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \left(\mathsf{fma}\left(-16, A \cdot F, -1 \cdot \frac{-4 \cdot \left({B}^{2} \cdot F\right) + 4 \cdot \frac{A \cdot \left({B}^{2} \cdot F\right)}{C}}{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) \]
    5. mul-1-negN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \left(\mathsf{fma}\left(-16, A \cdot F, \mathsf{neg}\left(\frac{-4 \cdot \left({B}^{2} \cdot F\right) + 4 \cdot \frac{A \cdot \left({B}^{2} \cdot F\right)}{C}}{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. fmm-undefN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \left(-16 \cdot \left(A \cdot F\right) - \frac{-4 \cdot \left({B}^{2} \cdot F\right) + 4 \cdot \frac{A \cdot \left({B}^{2} \cdot F\right)}{C}}{C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    7. --lowering--.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \mathsf{\_.f64}\left(\left(-16 \cdot \left(A \cdot F\right)\right), \left(\frac{-4 \cdot \left({B}^{2} \cdot F\right) + 4 \cdot \frac{A \cdot \left({B}^{2} \cdot F\right)}{C}}{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. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(-16, \left(A \cdot F\right)\right), \left(\frac{-4 \cdot \left({B}^{2} \cdot F\right) + 4 \cdot \frac{A \cdot \left({B}^{2} \cdot F\right)}{C}}{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) \]
    9. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, F\right)\right), \left(\frac{-4 \cdot \left({B}^{2} \cdot F\right) + 4 \cdot \frac{A \cdot \left({B}^{2} \cdot F\right)}{C}}{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) \]
    10. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, F\right)\right), \mathsf{/.f64}\left(\left(-4 \cdot \left({B}^{2} \cdot F\right) + 4 \cdot \frac{A \cdot \left({B}^{2} \cdot F\right)}{C}\right), 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) \]
  6. Simplified8.7%

    \[\leadsto \frac{\sqrt{\color{blue}{\left(C \cdot C\right) \cdot \left(-16 \cdot \left(A \cdot F\right) - \frac{-4 \cdot \left(\left(B \cdot B\right) \cdot F\right) + \frac{4 \cdot \left(A \cdot \left(\left(B \cdot B\right) \cdot F\right)\right)}{C}}{C}\right)}}}{4 \cdot \left(A \cdot C\right) - B \cdot B} \]
  7. Taylor expanded in A around 0

    \[\leadsto \color{blue}{-2 \cdot \left(\frac{1}{B} \cdot \sqrt{C \cdot F}\right)} \]
  8. Step-by-step derivation
    1. associate-*r*N/A

      \[\leadsto \left(-2 \cdot \frac{1}{B}\right) \cdot \color{blue}{\sqrt{C \cdot F}} \]
    2. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\left(-2 \cdot \frac{1}{B}\right), \color{blue}{\left(\sqrt{C \cdot F}\right)}\right) \]
    3. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-2, \left(\frac{1}{B}\right)\right), \left(\sqrt{\color{blue}{C \cdot F}}\right)\right) \]
    4. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-2, \mathsf{/.f64}\left(1, B\right)\right), \left(\sqrt{C \cdot \color{blue}{F}}\right)\right) \]
    5. sqrt-lowering-sqrt.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-2, \mathsf{/.f64}\left(1, B\right)\right), \mathsf{sqrt.f64}\left(\left(C \cdot F\right)\right)\right) \]
    6. *-lowering-*.f645.3%

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-2, \mathsf{/.f64}\left(1, B\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(C, F\right)\right)\right) \]
  9. Simplified5.3%

    \[\leadsto \color{blue}{\left(-2 \cdot \frac{1}{B}\right) \cdot \sqrt{C \cdot F}} \]
  10. Step-by-step derivation
    1. *-commutativeN/A

      \[\leadsto \sqrt{C \cdot F} \cdot \color{blue}{\left(-2 \cdot \frac{1}{B}\right)} \]
    2. un-div-invN/A

      \[\leadsto \sqrt{C \cdot F} \cdot \frac{-2}{\color{blue}{B}} \]
    3. associate-*r/N/A

      \[\leadsto \frac{\sqrt{C \cdot F} \cdot -2}{\color{blue}{B}} \]
    4. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{C \cdot F} \cdot -2\right), \color{blue}{B}\right) \]
    5. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{C \cdot F}\right), -2\right), B\right) \]
    6. sqrt-lowering-sqrt.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(C \cdot F\right)\right), -2\right), B\right) \]
    7. *-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(F \cdot C\right)\right), -2\right), B\right) \]
    8. *-lowering-*.f645.3%

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, C\right)\right), -2\right), B\right) \]
  11. Applied egg-rr5.3%

    \[\leadsto \color{blue}{\frac{\sqrt{F \cdot C} \cdot -2}{B}} \]
  12. Final simplification5.3%

    \[\leadsto \frac{-2 \cdot \sqrt{C \cdot F}}{B} \]
  13. Add Preprocessing

Alternative 20: 4.9% accurate, 5.9× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ \sqrt{C \cdot F} \cdot \frac{-2}{B\_m} \end{array} \]
B_m = (fabs.f64 B)
(FPCore (A B_m C F) :precision binary64 (* (sqrt (* C F)) (/ -2.0 B_m)))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
	return sqrt((C * F)) * (-2.0 / B_m);
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
    real(8), intent (in) :: a
    real(8), intent (in) :: b_m
    real(8), intent (in) :: c
    real(8), intent (in) :: f
    code = sqrt((c * f)) * ((-2.0d0) / b_m)
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
	return Math.sqrt((C * F)) * (-2.0 / B_m);
}
B_m = math.fabs(B)
def code(A, B_m, C, F):
	return math.sqrt((C * F)) * (-2.0 / B_m)
B_m = abs(B)
function code(A, B_m, C, F)
	return Float64(sqrt(Float64(C * F)) * Float64(-2.0 / B_m))
end
B_m = abs(B);
function tmp = code(A, B_m, C, F)
	tmp = sqrt((C * F)) * (-2.0 / B_m);
end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := N[(N[Sqrt[N[(C * F), $MachinePrecision]], $MachinePrecision] * N[(-2.0 / B$95$m), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
B_m = \left|B\right|

\\
\sqrt{C \cdot F} \cdot \frac{-2}{B\_m}
\end{array}
Derivation
  1. Initial program 20.4%

    \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
  2. Simplified25.9%

    \[\leadsto \color{blue}{\frac{\sqrt{\left(B \cdot B + \left(A \cdot C\right) \cdot -4\right) \cdot \left(\left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right) \cdot \left(2 \cdot F\right)\right)}}{4 \cdot \left(A \cdot C\right) - B \cdot B}} \]
  3. Add Preprocessing
  4. Taylor expanded in C around -inf

    \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{\left({C}^{2} \cdot \left(-16 \cdot \left(A \cdot F\right) + -1 \cdot \frac{-4 \cdot \left({B}^{2} \cdot F\right) + 4 \cdot \frac{A \cdot \left({B}^{2} \cdot F\right)}{C}}{C}\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. Step-by-step derivation
    1. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left({C}^{2}\right), \left(-16 \cdot \left(A \cdot F\right) + -1 \cdot \frac{-4 \cdot \left({B}^{2} \cdot F\right) + 4 \cdot \frac{A \cdot \left({B}^{2} \cdot F\right)}{C}}{C}\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. unpow2N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(C \cdot C\right), \left(-16 \cdot \left(A \cdot F\right) + -1 \cdot \frac{-4 \cdot \left({B}^{2} \cdot F\right) + 4 \cdot \frac{A \cdot \left({B}^{2} \cdot F\right)}{C}}{C}\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(C, C\right), \left(-16 \cdot \left(A \cdot F\right) + -1 \cdot \frac{-4 \cdot \left({B}^{2} \cdot F\right) + 4 \cdot \frac{A \cdot \left({B}^{2} \cdot F\right)}{C}}{C}\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. fma-defineN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \left(\mathsf{fma}\left(-16, A \cdot F, -1 \cdot \frac{-4 \cdot \left({B}^{2} \cdot F\right) + 4 \cdot \frac{A \cdot \left({B}^{2} \cdot F\right)}{C}}{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) \]
    5. mul-1-negN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \left(\mathsf{fma}\left(-16, A \cdot F, \mathsf{neg}\left(\frac{-4 \cdot \left({B}^{2} \cdot F\right) + 4 \cdot \frac{A \cdot \left({B}^{2} \cdot F\right)}{C}}{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. fmm-undefN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \left(-16 \cdot \left(A \cdot F\right) - \frac{-4 \cdot \left({B}^{2} \cdot F\right) + 4 \cdot \frac{A \cdot \left({B}^{2} \cdot F\right)}{C}}{C}\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    7. --lowering--.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \mathsf{\_.f64}\left(\left(-16 \cdot \left(A \cdot F\right)\right), \left(\frac{-4 \cdot \left({B}^{2} \cdot F\right) + 4 \cdot \frac{A \cdot \left({B}^{2} \cdot F\right)}{C}}{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. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(-16, \left(A \cdot F\right)\right), \left(\frac{-4 \cdot \left({B}^{2} \cdot F\right) + 4 \cdot \frac{A \cdot \left({B}^{2} \cdot F\right)}{C}}{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) \]
    9. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, F\right)\right), \left(\frac{-4 \cdot \left({B}^{2} \cdot F\right) + 4 \cdot \frac{A \cdot \left({B}^{2} \cdot F\right)}{C}}{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) \]
    10. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(C, C\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(A, F\right)\right), \mathsf{/.f64}\left(\left(-4 \cdot \left({B}^{2} \cdot F\right) + 4 \cdot \frac{A \cdot \left({B}^{2} \cdot F\right)}{C}\right), 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) \]
  6. Simplified8.7%

    \[\leadsto \frac{\sqrt{\color{blue}{\left(C \cdot C\right) \cdot \left(-16 \cdot \left(A \cdot F\right) - \frac{-4 \cdot \left(\left(B \cdot B\right) \cdot F\right) + \frac{4 \cdot \left(A \cdot \left(\left(B \cdot B\right) \cdot F\right)\right)}{C}}{C}\right)}}}{4 \cdot \left(A \cdot C\right) - B \cdot B} \]
  7. Taylor expanded in A around 0

    \[\leadsto \color{blue}{-2 \cdot \left(\frac{1}{B} \cdot \sqrt{C \cdot F}\right)} \]
  8. Step-by-step derivation
    1. associate-*r*N/A

      \[\leadsto \left(-2 \cdot \frac{1}{B}\right) \cdot \color{blue}{\sqrt{C \cdot F}} \]
    2. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\left(-2 \cdot \frac{1}{B}\right), \color{blue}{\left(\sqrt{C \cdot F}\right)}\right) \]
    3. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-2, \left(\frac{1}{B}\right)\right), \left(\sqrt{\color{blue}{C \cdot F}}\right)\right) \]
    4. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-2, \mathsf{/.f64}\left(1, B\right)\right), \left(\sqrt{C \cdot \color{blue}{F}}\right)\right) \]
    5. sqrt-lowering-sqrt.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-2, \mathsf{/.f64}\left(1, B\right)\right), \mathsf{sqrt.f64}\left(\left(C \cdot F\right)\right)\right) \]
    6. *-lowering-*.f645.3%

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-2, \mathsf{/.f64}\left(1, B\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(C, F\right)\right)\right) \]
  9. Simplified5.3%

    \[\leadsto \color{blue}{\left(-2 \cdot \frac{1}{B}\right) \cdot \sqrt{C \cdot F}} \]
  10. Step-by-step derivation
    1. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\left(-2 \cdot \frac{1}{B}\right), \color{blue}{\left(\sqrt{C \cdot F}\right)}\right) \]
    2. un-div-invN/A

      \[\leadsto \mathsf{*.f64}\left(\left(\frac{-2}{B}\right), \left(\sqrt{\color{blue}{C \cdot F}}\right)\right) \]
    3. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-2, B\right), \left(\sqrt{\color{blue}{C \cdot F}}\right)\right) \]
    4. sqrt-lowering-sqrt.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-2, B\right), \mathsf{sqrt.f64}\left(\left(C \cdot F\right)\right)\right) \]
    5. *-commutativeN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-2, B\right), \mathsf{sqrt.f64}\left(\left(F \cdot C\right)\right)\right) \]
    6. *-lowering-*.f645.3%

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(-2, B\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, C\right)\right)\right) \]
  11. Applied egg-rr5.3%

    \[\leadsto \color{blue}{\frac{-2}{B} \cdot \sqrt{F \cdot C}} \]
  12. Final simplification5.3%

    \[\leadsto \sqrt{C \cdot F} \cdot \frac{-2}{B} \]
  13. Add Preprocessing

Reproduce

?
herbie shell --seed 2024155 
(FPCore (A B C F)
  :name "ABCF->ab-angle b"
  :precision binary64
  (/ (- (sqrt (* (* 2.0 (* (- (pow B 2.0) (* (* 4.0 A) C)) F)) (- (+ A C) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0))))))) (- (pow B 2.0) (* (* 4.0 A) C))))