ABCF->ab-angle b

Percentage Accurate: 19.3% → 51.2%
Time: 26.5s
Alternatives: 20
Speedup: 5.6×

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.3% accurate, 1.0× speedup?

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

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

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

\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;\frac{\sqrt{\left(A + C\right) \cdot t\_4 - t\_3 \cdot t\_4}}{t\_2}\\

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


\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))) < 0.0

    1. Initial program 28.0%

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

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

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

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

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

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

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

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

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

    if 0.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))) < +inf.0

    1. Initial program 39.3%

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

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

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

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

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

      \[\leadsto -\frac{{\color{blue}{\left(-2 \cdot \left(B \cdot F\right)\right)}}^{0.5}}{B} \]
    11. Step-by-step derivation
      1. unpow1/2N/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(-2, F\right)\right), \left({B}^{\frac{1}{2}}\right)\right), B\right)\right) \]
      9. unpow1/2N/A

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

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

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

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

Alternative 2: 47.8% accurate, 1.9× speedup?

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

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

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

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


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

    1. Initial program 15.9%

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

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

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

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

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

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

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

    if 2.99999999999999993e-108 < B < 1.9999999999999998e125

    1. Initial program 22.8%

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

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

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

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

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

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

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

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

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

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

    if 1.9999999999999998e125 < B

    1. Initial program 5.4%

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

      \[\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.f6449.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. Simplified49.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. 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(2 \cdot \left(F \cdot \left(C - \mathsf{hypot}\left(B, C\right)\right)\right)\right)}^{0.5}}{B}} \]
    8. Taylor expanded in C around 0

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

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

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

      \[\leadsto -\frac{{\color{blue}{\left(-2 \cdot \left(B \cdot F\right)\right)}}^{0.5}}{B} \]
    11. Step-by-step derivation
      1. unpow1/2N/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(-2, F\right)\right), \left({B}^{\frac{1}{2}}\right)\right), B\right)\right) \]
      9. unpow1/2N/A

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

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

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

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

Alternative 3: 47.8% accurate, 1.9× speedup?

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

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

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

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


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

    1. Initial program 15.9%

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

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

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

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

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

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

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

    if 3.2e-108 < B < 4.30000000000000035e125

    1. Initial program 22.8%

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

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

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

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

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

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

    if 4.30000000000000035e125 < B

    1. Initial program 5.4%

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

      \[\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.f6449.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. Simplified49.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. 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(2 \cdot \left(F \cdot \left(C - \mathsf{hypot}\left(B, C\right)\right)\right)\right)}^{0.5}}{B}} \]
    8. Taylor expanded in C around 0

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

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

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

      \[\leadsto -\frac{{\color{blue}{\left(-2 \cdot \left(B \cdot F\right)\right)}}^{0.5}}{B} \]
    11. Step-by-step derivation
      1. unpow1/2N/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(-2, F\right)\right), \left({B}^{\frac{1}{2}}\right)\right), B\right)\right) \]
      9. unpow1/2N/A

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

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

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

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

Alternative 4: 41.8% accurate, 2.6× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ \begin{array}{l} t_0 := \left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m\\ \mathbf{if}\;B\_m \leq 3 \cdot 10^{-102}:\\ \;\;\;\;\frac{\sqrt{C \cdot \left(F \cdot \left(\left(A \cdot C\right) \cdot -16\right)\right)}}{t\_0}\\ \mathbf{elif}\;B\_m \leq 8100000000:\\ \;\;\;\;\frac{\sqrt{\left(2 \cdot F\right) \cdot \left(\left(B\_m \cdot B\_m + C \cdot \left(A \cdot -4\right)\right) \cdot \left(A + \left(C - \mathsf{hypot}\left(B\_m, A - C\right)\right)\right)\right)}}{t\_0}\\ \mathbf{elif}\;B\_m \leq 5.5 \cdot 10^{+96}:\\ \;\;\;\;\frac{\sqrt{\left(2 \cdot F\right) \cdot \left(-0.5 \cdot \frac{B\_m \cdot B\_m}{C}\right)}}{0 - B\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{F \cdot -2} \cdot \sqrt{B\_m}}{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 3e-102)
     (/ (sqrt (* C (* F (* (* A C) -16.0)))) t_0)
     (if (<= B_m 8100000000.0)
       (/
        (sqrt
         (*
          (* 2.0 F)
          (*
           (+ (* B_m B_m) (* C (* A -4.0)))
           (+ A (- C (hypot B_m (- A C)))))))
        t_0)
       (if (<= B_m 5.5e+96)
         (/ (sqrt (* (* 2.0 F) (* -0.5 (/ (* B_m B_m) C)))) (- 0.0 B_m))
         (/ (* (sqrt (* F -2.0)) (sqrt B_m)) (- 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 <= 3e-102) {
		tmp = sqrt((C * (F * ((A * C) * -16.0)))) / t_0;
	} else if (B_m <= 8100000000.0) {
		tmp = sqrt(((2.0 * F) * (((B_m * B_m) + (C * (A * -4.0))) * (A + (C - hypot(B_m, (A - C))))))) / t_0;
	} else if (B_m <= 5.5e+96) {
		tmp = sqrt(((2.0 * F) * (-0.5 * ((B_m * B_m) / C)))) / (0.0 - B_m);
	} else {
		tmp = (sqrt((F * -2.0)) * sqrt(B_m)) / (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 <= 3e-102) {
		tmp = Math.sqrt((C * (F * ((A * C) * -16.0)))) / t_0;
	} else if (B_m <= 8100000000.0) {
		tmp = Math.sqrt(((2.0 * F) * (((B_m * B_m) + (C * (A * -4.0))) * (A + (C - Math.hypot(B_m, (A - C))))))) / t_0;
	} else if (B_m <= 5.5e+96) {
		tmp = Math.sqrt(((2.0 * F) * (-0.5 * ((B_m * B_m) / C)))) / (0.0 - B_m);
	} else {
		tmp = (Math.sqrt((F * -2.0)) * Math.sqrt(B_m)) / (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 <= 3e-102:
		tmp = math.sqrt((C * (F * ((A * C) * -16.0)))) / t_0
	elif B_m <= 8100000000.0:
		tmp = math.sqrt(((2.0 * F) * (((B_m * B_m) + (C * (A * -4.0))) * (A + (C - math.hypot(B_m, (A - C))))))) / t_0
	elif B_m <= 5.5e+96:
		tmp = math.sqrt(((2.0 * F) * (-0.5 * ((B_m * B_m) / C)))) / (0.0 - B_m)
	else:
		tmp = (math.sqrt((F * -2.0)) * math.sqrt(B_m)) / (0.0 - B_m)
	return tmp
B_m = abs(B)
function code(A, B_m, C, F)
	t_0 = Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m))
	tmp = 0.0
	if (B_m <= 3e-102)
		tmp = Float64(sqrt(Float64(C * Float64(F * Float64(Float64(A * C) * -16.0)))) / t_0);
	elseif (B_m <= 8100000000.0)
		tmp = Float64(sqrt(Float64(Float64(2.0 * F) * Float64(Float64(Float64(B_m * B_m) + Float64(C * Float64(A * -4.0))) * Float64(A + Float64(C - hypot(B_m, Float64(A - C))))))) / t_0);
	elseif (B_m <= 5.5e+96)
		tmp = Float64(sqrt(Float64(Float64(2.0 * F) * Float64(-0.5 * Float64(Float64(B_m * B_m) / C)))) / Float64(0.0 - B_m));
	else
		tmp = Float64(Float64(sqrt(Float64(F * -2.0)) * sqrt(B_m)) / 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 <= 3e-102)
		tmp = sqrt((C * (F * ((A * C) * -16.0)))) / t_0;
	elseif (B_m <= 8100000000.0)
		tmp = sqrt(((2.0 * F) * (((B_m * B_m) + (C * (A * -4.0))) * (A + (C - hypot(B_m, (A - C))))))) / t_0;
	elseif (B_m <= 5.5e+96)
		tmp = sqrt(((2.0 * F) * (-0.5 * ((B_m * B_m) / C)))) / (0.0 - B_m);
	else
		tmp = (sqrt((F * -2.0)) * sqrt(B_m)) / (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[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B$95$m, 3e-102], N[(N[Sqrt[N[(C * N[(F * N[(N[(A * C), $MachinePrecision] * -16.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[B$95$m, 8100000000.0], N[(N[Sqrt[N[(N[(2.0 * F), $MachinePrecision] * N[(N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(C * N[(A * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(A + N[(C - N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[B$95$m, 5.5e+96], N[(N[Sqrt[N[(N[(2.0 * F), $MachinePrecision] * N[(-0.5 * N[(N[(B$95$m * B$95$m), $MachinePrecision] / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(0.0 - B$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[N[(F * -2.0), $MachinePrecision]], $MachinePrecision] * N[Sqrt[B$95$m], $MachinePrecision]), $MachinePrecision] / N[(0.0 - B$95$m), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
B_m = \left|B\right|

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

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

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

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


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

    1. Initial program 15.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3e-102 < B < 8.1e9

    1. Initial program 34.9%

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

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

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

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

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

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

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

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

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

    if 8.1e9 < B < 5.5000000000000002e96

    1. Initial program 10.5%

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

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

      \[\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-rr22.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(C, \mathsf{hypot.f64}\left(C, B\right)\right), \left(2 \cdot F\right)\right)\right), B\right)\right) \]
      11. *-lowering-*.f6422.0%

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

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

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

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

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

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

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

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

    if 5.5000000000000002e96 < B

    1. Initial program 7.6%

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

        \[\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. Simplified47.2%

      \[\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-rr47.2%

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

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

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

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

      \[\leadsto -\frac{{\color{blue}{\left(-2 \cdot \left(B \cdot F\right)\right)}}^{0.5}}{B} \]
    11. Step-by-step derivation
      1. unpow1/2N/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(-2, F\right)\right), \left({B}^{\frac{1}{2}}\right)\right), B\right)\right) \]
      9. unpow1/2N/A

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

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

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

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

Alternative 5: 46.8% accurate, 2.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if B < 3.0000000000000001e98

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(\left(B \cdot B + C \cdot \left(\mathsf{neg}\left(4 \cdot A\right)\right)\right) \cdot \left(\left(2 \cdot F\right) \cdot \left(\left(A + C\right) - \sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
      5. distribute-rgt-neg-inN/A

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

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

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

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

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

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

    if 3.0000000000000001e98 < B

    1. Initial program 7.6%

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

        \[\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. Simplified47.2%

      \[\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-rr47.2%

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

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

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

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

      \[\leadsto -\frac{{\color{blue}{\left(-2 \cdot \left(B \cdot F\right)\right)}}^{0.5}}{B} \]
    11. Step-by-step derivation
      1. unpow1/2N/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(-2, F\right)\right), \left({B}^{\frac{1}{2}}\right)\right), B\right)\right) \]
      9. unpow1/2N/A

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

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

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

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

Alternative 6: 42.6% accurate, 2.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;B\_m \leq 7800000000:\\
\;\;\;\;\frac{\sqrt{\left(\left(B\_m \cdot B\_m + C \cdot \left(A \cdot -4\right)\right) \cdot \left(2 \cdot F\right)\right) \cdot \left(\left(A + C\right) - \mathsf{hypot}\left(B\_m, A - C\right)\right)}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\

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

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


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

    1. Initial program 18.0%

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

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

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

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

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

    if 7.8e9 < B < 5.5000000000000002e96

    1. Initial program 10.5%

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

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

      \[\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-rr22.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(C, \mathsf{hypot.f64}\left(C, B\right)\right), \left(2 \cdot F\right)\right)\right), B\right)\right) \]
      11. *-lowering-*.f6422.0%

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

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

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

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

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

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

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

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

    if 5.5000000000000002e96 < B

    1. Initial program 7.6%

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

        \[\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. Simplified47.2%

      \[\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-rr47.2%

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

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

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

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

      \[\leadsto -\frac{{\color{blue}{\left(-2 \cdot \left(B \cdot F\right)\right)}}^{0.5}}{B} \]
    11. Step-by-step derivation
      1. unpow1/2N/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(-2, F\right)\right), \left({B}^{\frac{1}{2}}\right)\right), B\right)\right) \]
      9. unpow1/2N/A

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

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

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

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

Alternative 7: 38.4% accurate, 2.8× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;\left(0.25 \cdot \sqrt{\frac{1}{A}}\right) \cdot \sqrt{F \cdot -16}\\


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

    1. Initial program 14.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.9000000000000001e-64 < A < 4.8000000000000002e207

    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. 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.f6422.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. Simplified22.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-rr22.7%

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

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

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

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

      \[\leadsto -\frac{{\color{blue}{\left(-2 \cdot \left(B \cdot F\right)\right)}}^{0.5}}{B} \]
    11. Step-by-step derivation
      1. unpow1/2N/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(-2, F\right)\right), \left({B}^{\frac{1}{2}}\right)\right), B\right)\right) \]
      9. unpow1/2N/A

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

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

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

    if 4.8000000000000002e207 < A

    1. Initial program 0.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{sqrt.f64}\left(\left(\frac{1}{A}\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \color{blue}{-16}\right)\right)\right) \]
      3. /-lowering-/.f6449.1%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, A\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, -16\right)\right)\right) \]
    14. Simplified49.1%

      \[\leadsto \color{blue}{\left(0.25 \cdot \sqrt{\frac{1}{A}}\right)} \cdot \sqrt{F \cdot -16} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification28.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -1.9 \cdot 10^{-64}:\\ \;\;\;\;\left(\frac{-1}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \cdot \sqrt{A \cdot -8}\right) \cdot \sqrt{\left(A + A\right) \cdot \left(C \cdot F\right)}\\ \mathbf{elif}\;A \leq 4.8 \cdot 10^{+207}:\\ \;\;\;\;\frac{\sqrt{F \cdot -2} \cdot \sqrt{B}}{0 - B}\\ \mathbf{else}:\\ \;\;\;\;\left(0.25 \cdot \sqrt{\frac{1}{A}}\right) \cdot \sqrt{F \cdot -16}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 37.5% accurate, 2.8× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ \begin{array}{l} \mathbf{if}\;B\_m \leq 5 \cdot 10^{-218}:\\ \;\;\;\;\frac{\sqrt{\left(A + A\right) \cdot \left(F \cdot \left(\left(A \cdot C\right) \cdot -8\right)\right)}}{4 \cdot \left(A \cdot C\right) - B\_m \cdot B\_m}\\ \mathbf{elif}\;B\_m \leq 65000:\\ \;\;\;\;\frac{\sqrt{C \cdot \left(-16 \cdot \left(A \cdot \left(C \cdot F\right)\right) + 8 \cdot \left(F \cdot \left(B\_m \cdot B\_m\right)\right)\right)}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\ \mathbf{elif}\;B\_m \leq 6.4 \cdot 10^{+96}:\\ \;\;\;\;\frac{\sqrt{\left(2 \cdot F\right) \cdot \left(-0.5 \cdot \frac{B\_m \cdot B\_m}{C}\right)}}{0 - B\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{F \cdot -2} \cdot \sqrt{B\_m}}{0 - B\_m}\\ \end{array} \end{array} \]
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
 :precision binary64
 (if (<= B_m 5e-218)
   (/
    (sqrt (* (+ A A) (* F (* (* A C) -8.0))))
    (- (* 4.0 (* A C)) (* B_m B_m)))
   (if (<= B_m 65000.0)
     (/
      (sqrt (* C (+ (* -16.0 (* A (* C F))) (* 8.0 (* F (* B_m B_m))))))
      (- (* (* 4.0 A) C) (* B_m B_m)))
     (if (<= B_m 6.4e+96)
       (/ (sqrt (* (* 2.0 F) (* -0.5 (/ (* B_m B_m) C)))) (- 0.0 B_m))
       (/ (* (sqrt (* F -2.0)) (sqrt B_m)) (- 0.0 B_m))))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
	double tmp;
	if (B_m <= 5e-218) {
		tmp = sqrt(((A + A) * (F * ((A * C) * -8.0)))) / ((4.0 * (A * C)) - (B_m * B_m));
	} else if (B_m <= 65000.0) {
		tmp = sqrt((C * ((-16.0 * (A * (C * F))) + (8.0 * (F * (B_m * B_m)))))) / (((4.0 * A) * C) - (B_m * B_m));
	} else if (B_m <= 6.4e+96) {
		tmp = sqrt(((2.0 * F) * (-0.5 * ((B_m * B_m) / C)))) / (0.0 - B_m);
	} else {
		tmp = (sqrt((F * -2.0)) * sqrt(B_m)) / (0.0 - B_m);
	}
	return tmp;
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
    real(8), intent (in) :: a
    real(8), intent (in) :: b_m
    real(8), intent (in) :: c
    real(8), intent (in) :: f
    real(8) :: tmp
    if (b_m <= 5d-218) then
        tmp = sqrt(((a + a) * (f * ((a * c) * (-8.0d0))))) / ((4.0d0 * (a * c)) - (b_m * b_m))
    else if (b_m <= 65000.0d0) then
        tmp = sqrt((c * (((-16.0d0) * (a * (c * f))) + (8.0d0 * (f * (b_m * b_m)))))) / (((4.0d0 * a) * c) - (b_m * b_m))
    else if (b_m <= 6.4d+96) then
        tmp = sqrt(((2.0d0 * f) * ((-0.5d0) * ((b_m * b_m) / c)))) / (0.0d0 - b_m)
    else
        tmp = (sqrt((f * (-2.0d0))) * sqrt(b_m)) / (0.0d0 - b_m)
    end if
    code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
	double tmp;
	if (B_m <= 5e-218) {
		tmp = Math.sqrt(((A + A) * (F * ((A * C) * -8.0)))) / ((4.0 * (A * C)) - (B_m * B_m));
	} else if (B_m <= 65000.0) {
		tmp = Math.sqrt((C * ((-16.0 * (A * (C * F))) + (8.0 * (F * (B_m * B_m)))))) / (((4.0 * A) * C) - (B_m * B_m));
	} else if (B_m <= 6.4e+96) {
		tmp = Math.sqrt(((2.0 * F) * (-0.5 * ((B_m * B_m) / C)))) / (0.0 - B_m);
	} else {
		tmp = (Math.sqrt((F * -2.0)) * Math.sqrt(B_m)) / (0.0 - B_m);
	}
	return tmp;
}
B_m = math.fabs(B)
def code(A, B_m, C, F):
	tmp = 0
	if B_m <= 5e-218:
		tmp = math.sqrt(((A + A) * (F * ((A * C) * -8.0)))) / ((4.0 * (A * C)) - (B_m * B_m))
	elif B_m <= 65000.0:
		tmp = math.sqrt((C * ((-16.0 * (A * (C * F))) + (8.0 * (F * (B_m * B_m)))))) / (((4.0 * A) * C) - (B_m * B_m))
	elif B_m <= 6.4e+96:
		tmp = math.sqrt(((2.0 * F) * (-0.5 * ((B_m * B_m) / C)))) / (0.0 - B_m)
	else:
		tmp = (math.sqrt((F * -2.0)) * math.sqrt(B_m)) / (0.0 - B_m)
	return tmp
B_m = abs(B)
function code(A, B_m, C, F)
	tmp = 0.0
	if (B_m <= 5e-218)
		tmp = Float64(sqrt(Float64(Float64(A + A) * Float64(F * Float64(Float64(A * C) * -8.0)))) / Float64(Float64(4.0 * Float64(A * C)) - Float64(B_m * B_m)));
	elseif (B_m <= 65000.0)
		tmp = Float64(sqrt(Float64(C * Float64(Float64(-16.0 * Float64(A * Float64(C * F))) + Float64(8.0 * Float64(F * Float64(B_m * B_m)))))) / Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m)));
	elseif (B_m <= 6.4e+96)
		tmp = Float64(sqrt(Float64(Float64(2.0 * F) * Float64(-0.5 * Float64(Float64(B_m * B_m) / C)))) / Float64(0.0 - B_m));
	else
		tmp = Float64(Float64(sqrt(Float64(F * -2.0)) * sqrt(B_m)) / 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 <= 5e-218)
		tmp = sqrt(((A + A) * (F * ((A * C) * -8.0)))) / ((4.0 * (A * C)) - (B_m * B_m));
	elseif (B_m <= 65000.0)
		tmp = sqrt((C * ((-16.0 * (A * (C * F))) + (8.0 * (F * (B_m * B_m)))))) / (((4.0 * A) * C) - (B_m * B_m));
	elseif (B_m <= 6.4e+96)
		tmp = sqrt(((2.0 * F) * (-0.5 * ((B_m * B_m) / C)))) / (0.0 - B_m);
	else
		tmp = (sqrt((F * -2.0)) * sqrt(B_m)) / (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, 5e-218], N[(N[Sqrt[N[(N[(A + A), $MachinePrecision] * N[(F * N[(N[(A * C), $MachinePrecision] * -8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B$95$m, 65000.0], N[(N[Sqrt[N[(C * N[(N[(-16.0 * N[(A * N[(C * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(8.0 * N[(F * N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B$95$m, 6.4e+96], N[(N[Sqrt[N[(N[(2.0 * F), $MachinePrecision] * N[(-0.5 * N[(N[(B$95$m * B$95$m), $MachinePrecision] / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(0.0 - B$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[N[(F * -2.0), $MachinePrecision]], $MachinePrecision] * N[Sqrt[B$95$m], $MachinePrecision]), $MachinePrecision] / N[(0.0 - B$95$m), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
B_m = \left|B\right|

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

\mathbf{elif}\;B\_m \leq 65000:\\
\;\;\;\;\frac{\sqrt{C \cdot \left(-16 \cdot \left(A \cdot \left(C \cdot F\right)\right) + 8 \cdot \left(F \cdot \left(B\_m \cdot B\_m\right)\right)\right)}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\

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

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


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

    1. Initial program 15.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\left(-8 \cdot A\right) \cdot \left(C \cdot \left(F \cdot \left(A - \left(\mathsf{neg}\left(A\right)\right)\right)\right)\right)} \cdot \frac{1}{\left(4 \cdot A\right) \cdot C - \color{blue}{B} \cdot B} \]
      3. *-commutativeN/A

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

        \[\leadsto \sqrt{\left(-8 \cdot A\right) \cdot \left(C \cdot \left(F \cdot \left(A - \left(\mathsf{neg}\left(A\right)\right)\right)\right)\right)} \cdot \frac{1}{C \cdot \left(A \cdot 4\right) - \color{blue}{B} \cdot B} \]
      5. un-div-invN/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\left(-8 \cdot A\right) \cdot \left(C \cdot \left(F \cdot \left(A - \left(\mathsf{neg}\left(A\right)\right)\right)\right)\right)}\right), \color{blue}{\left(C \cdot \left(A \cdot 4\right) - B \cdot B\right)}\right) \]
    10. Applied egg-rr17.2%

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

    if 5.00000000000000041e-218 < B < 65000

    1. Initial program 24.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 65000 < B < 6.40000000000000013e96

    1. Initial program 9.9%

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

      \[\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.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. Simplified20.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-rr20.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.40000000000000013e96 < B

    1. Initial program 7.6%

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

        \[\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. Simplified47.2%

      \[\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-rr47.2%

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

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

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

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

      \[\leadsto -\frac{{\color{blue}{\left(-2 \cdot \left(B \cdot F\right)\right)}}^{0.5}}{B} \]
    11. Step-by-step derivation
      1. unpow1/2N/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(-2, F\right)\right), \left({B}^{\frac{1}{2}}\right)\right), B\right)\right) \]
      9. unpow1/2N/A

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

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

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

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

Alternative 9: 28.6% accurate, 4.6× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if A < -1.2e19

    1. Initial program 9.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.f644.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. Simplified4.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. 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-rr4.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.2e19 < A < -1.9999999999999998e-71

    1. Initial program 33.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.9999999999999998e-71 < A < 9.00000000000000023e-6

    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. 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.f6425.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. Simplified25.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. 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-rr25.6%

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

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

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

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(B, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, F\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(C \cdot F\right), B\right)\right)\right)\right), \frac{1}{2}\right), B\right)\right) \]
      6. *-lowering-*.f6421.6%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(B, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, F\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(C, F\right), B\right)\right)\right)\right), \frac{1}{2}\right), B\right)\right) \]
    10. Simplified21.6%

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

    if 9.00000000000000023e-6 < A

    1. Initial program 4.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 27.6% accurate, 4.9× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{-16 \cdot \left(C \cdot \left(F \cdot \left(A \cdot C\right)\right)\right)}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\


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

    1. Initial program 14.1%

      \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
    2. 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.f644.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. Simplified4.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-rr4.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.9000000000000001e-64 < A < 3.4e11

    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. 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.f6425.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. Simplified25.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. 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-rr25.6%

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

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

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

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(B, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, F\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(C \cdot F\right), B\right)\right)\right)\right), \frac{1}{2}\right), B\right)\right) \]
      6. *-lowering-*.f6421.6%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(B, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, F\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(C, F\right), B\right)\right)\right)\right), \frac{1}{2}\right), B\right)\right) \]
    10. Simplified21.6%

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

    if 3.4e11 < A

    1. Initial program 4.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 27.6% accurate, 4.9× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{-16 \cdot \left(\left(A \cdot C\right) \cdot \left(C \cdot F\right)\right)}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\


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

    1. Initial program 14.1%

      \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
    2. 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.f644.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. Simplified4.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-rr4.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.59999999999999988e-64 < A < 0.045999999999999999

    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. 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.f6425.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. Simplified25.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. 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-rr25.6%

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

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

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

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(B, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, F\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(C \cdot F\right), B\right)\right)\right)\right), \frac{1}{2}\right), B\right)\right) \]
      6. *-lowering-*.f6421.6%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(B, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, F\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(C, F\right), B\right)\right)\right)\right), \frac{1}{2}\right), B\right)\right) \]
    10. Simplified21.6%

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

    if 0.045999999999999999 < A

    1. Initial program 4.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 26.5% accurate, 4.9× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{-16 \cdot \left(F \cdot \left(A \cdot \left(C \cdot C\right)\right)\right)}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\


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

    1. Initial program 14.1%

      \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
    2. 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.f644.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. Simplified4.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-rr4.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.3000000000000001e-65 < A < 3.70000000000000001e169

    1. Initial program 19.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(B, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, F\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(C \cdot F\right), B\right)\right)\right)\right), \frac{1}{2}\right), B\right)\right) \]
      6. *-lowering-*.f6420.0%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(B, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, F\right), \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(C, F\right), B\right)\right)\right)\right), \frac{1}{2}\right), B\right)\right) \]
    10. Simplified20.0%

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

    if 3.70000000000000001e169 < A

    1. Initial program 0.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 25.6% accurate, 5.2× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ \begin{array}{l} \mathbf{if}\;A \leq -6 \cdot 10^{-65}:\\ \;\;\;\;\frac{\sqrt{\left(2 \cdot F\right) \cdot \left(-0.5 \cdot \frac{B\_m \cdot B\_m}{C}\right)}}{0 - B\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{{\left(B\_m \cdot \left(F \cdot -2 + 2 \cdot \frac{C \cdot F}{B\_m}\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 (<= A -6e-65)
   (/ (sqrt (* (* 2.0 F) (* -0.5 (/ (* B_m B_m) C)))) (- 0.0 B_m))
   (/ (pow (* B_m (+ (* F -2.0) (* 2.0 (/ (* C F) B_m)))) 0.5) (- 0.0 B_m))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
	double tmp;
	if (A <= -6e-65) {
		tmp = sqrt(((2.0 * F) * (-0.5 * ((B_m * B_m) / C)))) / (0.0 - B_m);
	} else {
		tmp = pow((B_m * ((F * -2.0) + (2.0 * ((C * F) / B_m)))), 0.5) / (0.0 - B_m);
	}
	return tmp;
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
    real(8), intent (in) :: a
    real(8), intent (in) :: b_m
    real(8), intent (in) :: c
    real(8), intent (in) :: f
    real(8) :: tmp
    if (a <= (-6d-65)) then
        tmp = sqrt(((2.0d0 * f) * ((-0.5d0) * ((b_m * b_m) / c)))) / (0.0d0 - b_m)
    else
        tmp = ((b_m * ((f * (-2.0d0)) + (2.0d0 * ((c * f) / b_m)))) ** 0.5d0) / (0.0d0 - b_m)
    end if
    code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
	double tmp;
	if (A <= -6e-65) {
		tmp = Math.sqrt(((2.0 * F) * (-0.5 * ((B_m * B_m) / C)))) / (0.0 - B_m);
	} else {
		tmp = Math.pow((B_m * ((F * -2.0) + (2.0 * ((C * F) / B_m)))), 0.5) / (0.0 - B_m);
	}
	return tmp;
}
B_m = math.fabs(B)
def code(A, B_m, C, F):
	tmp = 0
	if A <= -6e-65:
		tmp = math.sqrt(((2.0 * F) * (-0.5 * ((B_m * B_m) / C)))) / (0.0 - B_m)
	else:
		tmp = math.pow((B_m * ((F * -2.0) + (2.0 * ((C * F) / B_m)))), 0.5) / (0.0 - B_m)
	return tmp
B_m = abs(B)
function code(A, B_m, C, F)
	tmp = 0.0
	if (A <= -6e-65)
		tmp = Float64(sqrt(Float64(Float64(2.0 * F) * Float64(-0.5 * Float64(Float64(B_m * B_m) / C)))) / Float64(0.0 - B_m));
	else
		tmp = Float64((Float64(B_m * Float64(Float64(F * -2.0) + Float64(2.0 * Float64(Float64(C * F) / B_m)))) ^ 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 (A <= -6e-65)
		tmp = sqrt(((2.0 * F) * (-0.5 * ((B_m * B_m) / C)))) / (0.0 - B_m);
	else
		tmp = ((B_m * ((F * -2.0) + (2.0 * ((C * F) / B_m)))) ^ 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[A, -6e-65], N[(N[Sqrt[N[(N[(2.0 * F), $MachinePrecision] * N[(-0.5 * N[(N[(B$95$m * B$95$m), $MachinePrecision] / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(0.0 - B$95$m), $MachinePrecision]), $MachinePrecision], N[(N[Power[N[(B$95$m * N[(N[(F * -2.0), $MachinePrecision] + N[(2.0 * N[(N[(C * F), $MachinePrecision] / B$95$m), $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}\;A \leq -6 \cdot 10^{-65}:\\
\;\;\;\;\frac{\sqrt{\left(2 \cdot F\right) \cdot \left(-0.5 \cdot \frac{B\_m \cdot B\_m}{C}\right)}}{0 - B\_m}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if A < -5.99999999999999996e-65

    1. Initial program 14.1%

      \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
    2. 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.f644.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. Simplified4.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-rr4.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.99999999999999996e-65 < A

    1. Initial program 16.4%

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

      \[\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.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. Simplified20.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. 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-rr20.5%

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

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

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

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

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

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

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

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

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

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

Alternative 14: 26.6% accurate, 5.3× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ \begin{array}{l} \mathbf{if}\;A \leq -2.65 \cdot 10^{-18}:\\ \;\;\;\;\frac{\sqrt{\left(2 \cdot F\right) \cdot \left(-0.5 \cdot \frac{B\_m \cdot B\_m}{C}\right)}}{0 - B\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{{\left(-2 \cdot \left(B\_m \cdot F\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 (<= A -2.65e-18)
   (/ (sqrt (* (* 2.0 F) (* -0.5 (/ (* B_m B_m) C)))) (- 0.0 B_m))
   (/ (pow (* -2.0 (* B_m F)) 0.5) (- 0.0 B_m))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
	double tmp;
	if (A <= -2.65e-18) {
		tmp = sqrt(((2.0 * F) * (-0.5 * ((B_m * B_m) / C)))) / (0.0 - B_m);
	} else {
		tmp = pow((-2.0 * (B_m * F)), 0.5) / (0.0 - B_m);
	}
	return tmp;
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
    real(8), intent (in) :: a
    real(8), intent (in) :: b_m
    real(8), intent (in) :: c
    real(8), intent (in) :: f
    real(8) :: tmp
    if (a <= (-2.65d-18)) then
        tmp = sqrt(((2.0d0 * f) * ((-0.5d0) * ((b_m * b_m) / c)))) / (0.0d0 - b_m)
    else
        tmp = (((-2.0d0) * (b_m * f)) ** 0.5d0) / (0.0d0 - b_m)
    end if
    code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
	double tmp;
	if (A <= -2.65e-18) {
		tmp = Math.sqrt(((2.0 * F) * (-0.5 * ((B_m * B_m) / C)))) / (0.0 - B_m);
	} else {
		tmp = Math.pow((-2.0 * (B_m * F)), 0.5) / (0.0 - B_m);
	}
	return tmp;
}
B_m = math.fabs(B)
def code(A, B_m, C, F):
	tmp = 0
	if A <= -2.65e-18:
		tmp = math.sqrt(((2.0 * F) * (-0.5 * ((B_m * B_m) / C)))) / (0.0 - B_m)
	else:
		tmp = math.pow((-2.0 * (B_m * F)), 0.5) / (0.0 - B_m)
	return tmp
B_m = abs(B)
function code(A, B_m, C, F)
	tmp = 0.0
	if (A <= -2.65e-18)
		tmp = Float64(sqrt(Float64(Float64(2.0 * F) * Float64(-0.5 * Float64(Float64(B_m * B_m) / C)))) / Float64(0.0 - B_m));
	else
		tmp = Float64((Float64(-2.0 * Float64(B_m * F)) ^ 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 (A <= -2.65e-18)
		tmp = sqrt(((2.0 * F) * (-0.5 * ((B_m * B_m) / C)))) / (0.0 - B_m);
	else
		tmp = ((-2.0 * (B_m * F)) ^ 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[A, -2.65e-18], N[(N[Sqrt[N[(N[(2.0 * F), $MachinePrecision] * N[(-0.5 * N[(N[(B$95$m * B$95$m), $MachinePrecision] / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(0.0 - B$95$m), $MachinePrecision]), $MachinePrecision], N[(N[Power[N[(-2.0 * N[(B$95$m * F), $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}\;A \leq -2.65 \cdot 10^{-18}:\\
\;\;\;\;\frac{\sqrt{\left(2 \cdot F\right) \cdot \left(-0.5 \cdot \frac{B\_m \cdot B\_m}{C}\right)}}{0 - B\_m}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if A < -2.65000000000000015e-18

    1. Initial program 14.4%

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

      \[\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.f644.2%

        \[\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. Simplified4.2%

      \[\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-rr4.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.65000000000000015e-18 < A

    1. Initial program 16.2%

      \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
    2. Add Preprocessing
    3. Taylor expanded in 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.f6419.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. Simplified19.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. 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-rr19.5%

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

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

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

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

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

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

Alternative 15: 27.7% accurate, 5.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.2 \cdot 10^{+90}:\\
\;\;\;\;\frac{{\left(\frac{F \cdot \left(B\_m \cdot B\_m\right)}{0 - C}\right)}^{0.5}}{0 - B\_m}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if A < -1.20000000000000005e90

    1. Initial program 7.7%

      \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
    2. Add Preprocessing
    3. Taylor expanded in 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.f642.8%

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

      \[\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-rr2.9%

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

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

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

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left({B}^{2}\right), F\right), C\right)\right), \frac{1}{2}\right), B\right)\right) \]
      6. unpow2N/A

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

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

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

    if -1.20000000000000005e90 < A

    1. Initial program 17.9%

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

      \[\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.f6418.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. Simplified18.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-rr18.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 27.7% accurate, 5.4× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if A < -4.99999999999999983e89

    1. Initial program 7.7%

      \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
    2. Add Preprocessing
    3. Taylor expanded in 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.f642.8%

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

      \[\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-rr2.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{/.f64}\left(\mathsf{*.f64}\left(F, \left(B \cdot B\right)\right), C\right)\right)\right), B\right)\right) \]
      8. *-lowering-*.f6422.8%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{/.f64}\left(\mathsf{*.f64}\left(F, \mathsf{*.f64}\left(B, B\right)\right), C\right)\right)\right), B\right)\right) \]
    12. Simplified22.8%

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

    if -4.99999999999999983e89 < A

    1. Initial program 17.9%

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

      \[\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.f6418.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. Simplified18.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-rr18.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 17: 27.7% accurate, 5.5× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ \begin{array}{l} \mathbf{if}\;C \leq -9 \cdot 10^{+93}:\\ \;\;\;\;\frac{{\left(4 \cdot \left(C \cdot F\right)\right)}^{0.5}}{0 - B\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{{\left(-2 \cdot \left(B\_m \cdot F\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 (<= C -9e+93)
   (/ (pow (* 4.0 (* C F)) 0.5) (- 0.0 B_m))
   (/ (pow (* -2.0 (* B_m F)) 0.5) (- 0.0 B_m))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
	double tmp;
	if (C <= -9e+93) {
		tmp = pow((4.0 * (C * F)), 0.5) / (0.0 - B_m);
	} else {
		tmp = pow((-2.0 * (B_m * F)), 0.5) / (0.0 - B_m);
	}
	return tmp;
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
    real(8), intent (in) :: a
    real(8), intent (in) :: b_m
    real(8), intent (in) :: c
    real(8), intent (in) :: f
    real(8) :: tmp
    if (c <= (-9d+93)) then
        tmp = ((4.0d0 * (c * f)) ** 0.5d0) / (0.0d0 - b_m)
    else
        tmp = (((-2.0d0) * (b_m * f)) ** 0.5d0) / (0.0d0 - b_m)
    end if
    code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
	double tmp;
	if (C <= -9e+93) {
		tmp = Math.pow((4.0 * (C * F)), 0.5) / (0.0 - B_m);
	} else {
		tmp = Math.pow((-2.0 * (B_m * F)), 0.5) / (0.0 - B_m);
	}
	return tmp;
}
B_m = math.fabs(B)
def code(A, B_m, C, F):
	tmp = 0
	if C <= -9e+93:
		tmp = math.pow((4.0 * (C * F)), 0.5) / (0.0 - B_m)
	else:
		tmp = math.pow((-2.0 * (B_m * F)), 0.5) / (0.0 - B_m)
	return tmp
B_m = abs(B)
function code(A, B_m, C, F)
	tmp = 0.0
	if (C <= -9e+93)
		tmp = Float64((Float64(4.0 * Float64(C * F)) ^ 0.5) / Float64(0.0 - B_m));
	else
		tmp = Float64((Float64(-2.0 * Float64(B_m * F)) ^ 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 (C <= -9e+93)
		tmp = ((4.0 * (C * F)) ^ 0.5) / (0.0 - B_m);
	else
		tmp = ((-2.0 * (B_m * F)) ^ 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[C, -9e+93], N[(N[Power[N[(4.0 * N[(C * F), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision] / N[(0.0 - B$95$m), $MachinePrecision]), $MachinePrecision], N[(N[Power[N[(-2.0 * N[(B$95$m * F), $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}\;C \leq -9 \cdot 10^{+93}:\\
\;\;\;\;\frac{{\left(4 \cdot \left(C \cdot F\right)\right)}^{0.5}}{0 - B\_m}\\

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


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

    1. Initial program 14.2%

      \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
    2. Add Preprocessing
    3. Taylor expanded in 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.f649.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. Simplified9.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-rr9.4%

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(4, \left(C \cdot F\right)\right), \frac{1}{2}\right), B\right)\right) \]
      2. *-lowering-*.f649.6%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(4, \mathsf{*.f64}\left(C, F\right)\right), \frac{1}{2}\right), B\right)\right) \]
    10. Simplified9.6%

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

    if -8.99999999999999981e93 < C

    1. Initial program 16.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.f6416.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. Simplified16.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. 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-rr16.4%

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

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

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(-2, \left(B \cdot F\right)\right), \frac{1}{2}\right), B\right)\right) \]
      2. *-lowering-*.f6414.6%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(-2, \mathsf{*.f64}\left(B, F\right)\right), \frac{1}{2}\right), B\right)\right) \]
    10. Simplified14.6%

      \[\leadsto -\frac{{\color{blue}{\left(-2 \cdot \left(B \cdot F\right)\right)}}^{0.5}}{B} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification13.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -9 \cdot 10^{+93}:\\ \;\;\;\;\frac{{\left(4 \cdot \left(C \cdot F\right)\right)}^{0.5}}{0 - B}\\ \mathbf{else}:\\ \;\;\;\;\frac{{\left(-2 \cdot \left(B \cdot F\right)\right)}^{0.5}}{0 - B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 27.7% accurate, 5.5× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ \begin{array}{l} \mathbf{if}\;C \leq -7.5 \cdot 10^{+95}:\\ \;\;\;\;\sqrt{C \cdot F} \cdot \frac{-2}{B\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{{\left(-2 \cdot \left(B\_m \cdot F\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 (<= C -7.5e+95)
   (* (sqrt (* C F)) (/ -2.0 B_m))
   (/ (pow (* -2.0 (* B_m F)) 0.5) (- 0.0 B_m))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
	double tmp;
	if (C <= -7.5e+95) {
		tmp = sqrt((C * F)) * (-2.0 / B_m);
	} else {
		tmp = pow((-2.0 * (B_m * F)), 0.5) / (0.0 - B_m);
	}
	return tmp;
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
    real(8), intent (in) :: a
    real(8), intent (in) :: b_m
    real(8), intent (in) :: c
    real(8), intent (in) :: f
    real(8) :: tmp
    if (c <= (-7.5d+95)) then
        tmp = sqrt((c * f)) * ((-2.0d0) / b_m)
    else
        tmp = (((-2.0d0) * (b_m * f)) ** 0.5d0) / (0.0d0 - b_m)
    end if
    code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
	double tmp;
	if (C <= -7.5e+95) {
		tmp = Math.sqrt((C * F)) * (-2.0 / B_m);
	} else {
		tmp = Math.pow((-2.0 * (B_m * F)), 0.5) / (0.0 - B_m);
	}
	return tmp;
}
B_m = math.fabs(B)
def code(A, B_m, C, F):
	tmp = 0
	if C <= -7.5e+95:
		tmp = math.sqrt((C * F)) * (-2.0 / B_m)
	else:
		tmp = math.pow((-2.0 * (B_m * F)), 0.5) / (0.0 - B_m)
	return tmp
B_m = abs(B)
function code(A, B_m, C, F)
	tmp = 0.0
	if (C <= -7.5e+95)
		tmp = Float64(sqrt(Float64(C * F)) * Float64(-2.0 / B_m));
	else
		tmp = Float64((Float64(-2.0 * Float64(B_m * F)) ^ 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 (C <= -7.5e+95)
		tmp = sqrt((C * F)) * (-2.0 / B_m);
	else
		tmp = ((-2.0 * (B_m * F)) ^ 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[C, -7.5e+95], N[(N[Sqrt[N[(C * F), $MachinePrecision]], $MachinePrecision] * N[(-2.0 / B$95$m), $MachinePrecision]), $MachinePrecision], N[(N[Power[N[(-2.0 * N[(B$95$m * F), $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}\;C \leq -7.5 \cdot 10^{+95}:\\
\;\;\;\;\sqrt{C \cdot F} \cdot \frac{-2}{B\_m}\\

\mathbf{else}:\\
\;\;\;\;\frac{{\left(-2 \cdot \left(B\_m \cdot F\right)\right)}^{0.5}}{0 - B\_m}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if C < -7.5000000000000001e95

    1. Initial program 14.2%

      \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
    2. Add Preprocessing
    3. Taylor expanded in 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.f649.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. Simplified9.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-rr9.4%

      \[\leadsto \color{blue}{-\frac{{\left(2 \cdot \left(F \cdot \left(C - \mathsf{hypot}\left(B, C\right)\right)\right)\right)}^{0.5}}{B}} \]
    8. Step-by-step derivation
      1. unpow1/2N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{\sqrt{2 \cdot \left(F \cdot \left(C - \sqrt{B \cdot B + C \cdot C}\right)\right)}}{B}\right)\right) \]
      2. sqrt-prodN/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) \]
      3. associate-/l*N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot \frac{\sqrt{F \cdot \left(C - \sqrt{B \cdot B + C \cdot C}\right)}}{B}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{2}\right), \left(\frac{\sqrt{F \cdot \left(C - \sqrt{B \cdot B + C \cdot C}\right)}}{B}\right)\right)\right) \]
      5. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \left(\frac{\sqrt{F \cdot \left(C - \sqrt{B \cdot B + C \cdot C}\right)}}{B}\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{/.f64}\left(\left(\sqrt{F \cdot \left(C - \sqrt{B \cdot B + C \cdot C}\right)}\right), B\right)\right)\right) \]
      7. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(F \cdot \left(C - \sqrt{B \cdot B + C \cdot C}\right)\right)\right), B\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \left(C - \sqrt{B \cdot B + C \cdot C}\right)\right)\right), B\right)\right)\right) \]
      9. --lowering--.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{\_.f64}\left(C, \left(\sqrt{B \cdot B + C \cdot C}\right)\right)\right)\right), B\right)\right)\right) \]
      10. +-commutativeN/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{\_.f64}\left(C, \left(\sqrt{C \cdot C + B \cdot B}\right)\right)\right)\right), B\right)\right)\right) \]
      11. hypot-defineN/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{\_.f64}\left(C, \left(\mathsf{hypot}\left(C, B\right)\right)\right)\right)\right), B\right)\right)\right) \]
      12. hypot-lowering-hypot.f649.1%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{\_.f64}\left(C, \mathsf{hypot.f64}\left(C, B\right)\right)\right)\right), B\right)\right)\right) \]
    9. Applied egg-rr9.1%

      \[\leadsto -\color{blue}{\sqrt{2} \cdot \frac{\sqrt{F \cdot \left(C - \mathsf{hypot}\left(C, B\right)\right)}}{B}} \]
    10. Taylor expanded in C around -inf

      \[\leadsto \color{blue}{\frac{{\left(\sqrt{-1}\right)}^{2} \cdot {\left(\sqrt{2}\right)}^{2}}{B} \cdot \sqrt{C \cdot F}} \]
    11. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \sqrt{C \cdot F} \cdot \color{blue}{\frac{{\left(\sqrt{-1}\right)}^{2} \cdot {\left(\sqrt{2}\right)}^{2}}{B}} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{C \cdot F}\right), \color{blue}{\left(\frac{{\left(\sqrt{-1}\right)}^{2} \cdot {\left(\sqrt{2}\right)}^{2}}{B}\right)}\right) \]
      3. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(C \cdot F\right)\right), \left(\frac{\color{blue}{{\left(\sqrt{-1}\right)}^{2} \cdot {\left(\sqrt{2}\right)}^{2}}}{B}\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(F \cdot C\right)\right), \left(\frac{\color{blue}{{\left(\sqrt{-1}\right)}^{2}} \cdot {\left(\sqrt{2}\right)}^{2}}{B}\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, C\right)\right), \left(\frac{\color{blue}{{\left(\sqrt{-1}\right)}^{2}} \cdot {\left(\sqrt{2}\right)}^{2}}{B}\right)\right) \]
      6. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, C\right)\right), \left(\frac{\left(\sqrt{-1} \cdot \sqrt{-1}\right) \cdot {\left(\sqrt{2}\right)}^{2}}{B}\right)\right) \]
      7. rem-square-sqrtN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, C\right)\right), \left(\frac{-1 \cdot {\left(\sqrt{2}\right)}^{2}}{B}\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, C\right)\right), \left(\frac{-1 \cdot \left(\sqrt{2} \cdot \sqrt{2}\right)}{B}\right)\right) \]
      9. rem-square-sqrtN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, C\right)\right), \left(\frac{-1 \cdot 2}{B}\right)\right) \]
      10. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, C\right)\right), \left(\frac{-2}{B}\right)\right) \]
      11. /-lowering-/.f649.2%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, C\right)\right), \mathsf{/.f64}\left(-2, \color{blue}{B}\right)\right) \]
    12. Simplified9.2%

      \[\leadsto \color{blue}{\sqrt{F \cdot C} \cdot \frac{-2}{B}} \]

    if -7.5000000000000001e95 < C

    1. Initial program 16.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.f6416.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. Simplified16.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. 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-rr16.4%

      \[\leadsto \color{blue}{-\frac{{\left(2 \cdot \left(F \cdot \left(C - \mathsf{hypot}\left(B, C\right)\right)\right)\right)}^{0.5}}{B}} \]
    8. Taylor expanded in C around 0

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\color{blue}{\left(-2 \cdot \left(B \cdot F\right)\right)}, \frac{1}{2}\right), B\right)\right) \]
    9. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(-2, \left(B \cdot F\right)\right), \frac{1}{2}\right), B\right)\right) \]
      2. *-lowering-*.f6414.6%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(-2, \mathsf{*.f64}\left(B, F\right)\right), \frac{1}{2}\right), B\right)\right) \]
    10. Simplified14.6%

      \[\leadsto -\frac{{\color{blue}{\left(-2 \cdot \left(B \cdot F\right)\right)}}^{0.5}}{B} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification13.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -7.5 \cdot 10^{+95}:\\ \;\;\;\;\sqrt{C \cdot F} \cdot \frac{-2}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{{\left(-2 \cdot \left(B \cdot F\right)\right)}^{0.5}}{0 - B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 27.7% accurate, 5.6× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ \begin{array}{l} \mathbf{if}\;C \leq -6 \cdot 10^{+95}:\\ \;\;\;\;\sqrt{C \cdot F} \cdot \frac{-2}{B\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{-2 \cdot \left(B\_m \cdot F\right)}}{0 - B\_m}\\ \end{array} \end{array} \]
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
 :precision binary64
 (if (<= C -6e+95)
   (* (sqrt (* C F)) (/ -2.0 B_m))
   (/ (sqrt (* -2.0 (* B_m F))) (- 0.0 B_m))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
	double tmp;
	if (C <= -6e+95) {
		tmp = sqrt((C * F)) * (-2.0 / B_m);
	} else {
		tmp = sqrt((-2.0 * (B_m * F))) / (0.0 - B_m);
	}
	return tmp;
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
    real(8), intent (in) :: a
    real(8), intent (in) :: b_m
    real(8), intent (in) :: c
    real(8), intent (in) :: f
    real(8) :: tmp
    if (c <= (-6d+95)) then
        tmp = sqrt((c * f)) * ((-2.0d0) / b_m)
    else
        tmp = sqrt(((-2.0d0) * (b_m * f))) / (0.0d0 - b_m)
    end if
    code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
	double tmp;
	if (C <= -6e+95) {
		tmp = Math.sqrt((C * F)) * (-2.0 / B_m);
	} else {
		tmp = Math.sqrt((-2.0 * (B_m * F))) / (0.0 - B_m);
	}
	return tmp;
}
B_m = math.fabs(B)
def code(A, B_m, C, F):
	tmp = 0
	if C <= -6e+95:
		tmp = math.sqrt((C * F)) * (-2.0 / B_m)
	else:
		tmp = math.sqrt((-2.0 * (B_m * F))) / (0.0 - B_m)
	return tmp
B_m = abs(B)
function code(A, B_m, C, F)
	tmp = 0.0
	if (C <= -6e+95)
		tmp = Float64(sqrt(Float64(C * F)) * Float64(-2.0 / B_m));
	else
		tmp = Float64(sqrt(Float64(-2.0 * Float64(B_m * F))) / 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 (C <= -6e+95)
		tmp = sqrt((C * F)) * (-2.0 / B_m);
	else
		tmp = sqrt((-2.0 * (B_m * F))) / (0.0 - B_m);
	end
	tmp_2 = tmp;
end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := If[LessEqual[C, -6e+95], N[(N[Sqrt[N[(C * F), $MachinePrecision]], $MachinePrecision] * N[(-2.0 / B$95$m), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(-2.0 * N[(B$95$m * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(0.0 - B$95$m), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|

\\
\begin{array}{l}
\mathbf{if}\;C \leq -6 \cdot 10^{+95}:\\
\;\;\;\;\sqrt{C \cdot F} \cdot \frac{-2}{B\_m}\\

\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{-2 \cdot \left(B\_m \cdot F\right)}}{0 - B\_m}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if C < -5.99999999999999982e95

    1. Initial program 14.2%

      \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
    2. Add Preprocessing
    3. Taylor expanded in 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.f649.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. Simplified9.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-rr9.4%

      \[\leadsto \color{blue}{-\frac{{\left(2 \cdot \left(F \cdot \left(C - \mathsf{hypot}\left(B, C\right)\right)\right)\right)}^{0.5}}{B}} \]
    8. Step-by-step derivation
      1. unpow1/2N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{\sqrt{2 \cdot \left(F \cdot \left(C - \sqrt{B \cdot B + C \cdot C}\right)\right)}}{B}\right)\right) \]
      2. sqrt-prodN/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) \]
      3. associate-/l*N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot \frac{\sqrt{F \cdot \left(C - \sqrt{B \cdot B + C \cdot C}\right)}}{B}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{2}\right), \left(\frac{\sqrt{F \cdot \left(C - \sqrt{B \cdot B + C \cdot C}\right)}}{B}\right)\right)\right) \]
      5. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \left(\frac{\sqrt{F \cdot \left(C - \sqrt{B \cdot B + C \cdot C}\right)}}{B}\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{/.f64}\left(\left(\sqrt{F \cdot \left(C - \sqrt{B \cdot B + C \cdot C}\right)}\right), B\right)\right)\right) \]
      7. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(F \cdot \left(C - \sqrt{B \cdot B + C \cdot C}\right)\right)\right), B\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \left(C - \sqrt{B \cdot B + C \cdot C}\right)\right)\right), B\right)\right)\right) \]
      9. --lowering--.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{\_.f64}\left(C, \left(\sqrt{B \cdot B + C \cdot C}\right)\right)\right)\right), B\right)\right)\right) \]
      10. +-commutativeN/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{\_.f64}\left(C, \left(\sqrt{C \cdot C + B \cdot B}\right)\right)\right)\right), B\right)\right)\right) \]
      11. hypot-defineN/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{\_.f64}\left(C, \left(\mathsf{hypot}\left(C, B\right)\right)\right)\right)\right), B\right)\right)\right) \]
      12. hypot-lowering-hypot.f649.1%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{\_.f64}\left(C, \mathsf{hypot.f64}\left(C, B\right)\right)\right)\right), B\right)\right)\right) \]
    9. Applied egg-rr9.1%

      \[\leadsto -\color{blue}{\sqrt{2} \cdot \frac{\sqrt{F \cdot \left(C - \mathsf{hypot}\left(C, B\right)\right)}}{B}} \]
    10. Taylor expanded in C around -inf

      \[\leadsto \color{blue}{\frac{{\left(\sqrt{-1}\right)}^{2} \cdot {\left(\sqrt{2}\right)}^{2}}{B} \cdot \sqrt{C \cdot F}} \]
    11. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \sqrt{C \cdot F} \cdot \color{blue}{\frac{{\left(\sqrt{-1}\right)}^{2} \cdot {\left(\sqrt{2}\right)}^{2}}{B}} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{C \cdot F}\right), \color{blue}{\left(\frac{{\left(\sqrt{-1}\right)}^{2} \cdot {\left(\sqrt{2}\right)}^{2}}{B}\right)}\right) \]
      3. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(C \cdot F\right)\right), \left(\frac{\color{blue}{{\left(\sqrt{-1}\right)}^{2} \cdot {\left(\sqrt{2}\right)}^{2}}}{B}\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(F \cdot C\right)\right), \left(\frac{\color{blue}{{\left(\sqrt{-1}\right)}^{2}} \cdot {\left(\sqrt{2}\right)}^{2}}{B}\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, C\right)\right), \left(\frac{\color{blue}{{\left(\sqrt{-1}\right)}^{2}} \cdot {\left(\sqrt{2}\right)}^{2}}{B}\right)\right) \]
      6. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, C\right)\right), \left(\frac{\left(\sqrt{-1} \cdot \sqrt{-1}\right) \cdot {\left(\sqrt{2}\right)}^{2}}{B}\right)\right) \]
      7. rem-square-sqrtN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, C\right)\right), \left(\frac{-1 \cdot {\left(\sqrt{2}\right)}^{2}}{B}\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, C\right)\right), \left(\frac{-1 \cdot \left(\sqrt{2} \cdot \sqrt{2}\right)}{B}\right)\right) \]
      9. rem-square-sqrtN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, C\right)\right), \left(\frac{-1 \cdot 2}{B}\right)\right) \]
      10. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, C\right)\right), \left(\frac{-2}{B}\right)\right) \]
      11. /-lowering-/.f649.2%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, C\right)\right), \mathsf{/.f64}\left(-2, \color{blue}{B}\right)\right) \]
    12. Simplified9.2%

      \[\leadsto \color{blue}{\sqrt{F \cdot C} \cdot \frac{-2}{B}} \]

    if -5.99999999999999982e95 < C

    1. Initial program 16.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.f6416.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. Simplified16.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. 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-rr16.4%

      \[\leadsto \color{blue}{-\frac{{\left(2 \cdot \left(F \cdot \left(C - \mathsf{hypot}\left(B, C\right)\right)\right)\right)}^{0.5}}{B}} \]
    8. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left({\left(2 \cdot \left(F \cdot \left(C - \sqrt{B \cdot B + C \cdot C}\right)\right)\right)}^{\frac{1}{2}}\right), B\right)\right) \]
      2. unpow1/2N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(\sqrt{2 \cdot \left(F \cdot \left(C - \sqrt{B \cdot B + C \cdot C}\right)\right)}\right), B\right)\right) \]
      3. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(2 \cdot \left(F \cdot \left(C - \sqrt{B \cdot B + C \cdot C}\right)\right)\right)\right), B\right)\right) \]
      4. associate-*r*N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(\left(2 \cdot F\right) \cdot \left(C - \sqrt{B \cdot B + C \cdot C}\right)\right)\right), B\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(\left(C - \sqrt{B \cdot B + C \cdot C}\right) \cdot \left(2 \cdot F\right)\right)\right), B\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(C - \sqrt{B \cdot B + C \cdot C}\right), \left(2 \cdot F\right)\right)\right), B\right)\right) \]
      7. --lowering--.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(C, \left(\sqrt{B \cdot B + C \cdot C}\right)\right), \left(2 \cdot F\right)\right)\right), B\right)\right) \]
      8. +-commutativeN/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(C, \left(\sqrt{C \cdot C + B \cdot B}\right)\right), \left(2 \cdot F\right)\right)\right), B\right)\right) \]
      9. hypot-defineN/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(C, \left(\mathsf{hypot}\left(C, B\right)\right)\right), \left(2 \cdot F\right)\right)\right), B\right)\right) \]
      10. hypot-lowering-hypot.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(C, \mathsf{hypot.f64}\left(C, B\right)\right), \left(2 \cdot F\right)\right)\right), B\right)\right) \]
      11. *-lowering-*.f6416.4%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(C, \mathsf{hypot.f64}\left(C, B\right)\right), \mathsf{*.f64}\left(2, F\right)\right)\right), B\right)\right) \]
    9. Applied egg-rr16.4%

      \[\leadsto -\color{blue}{\frac{\sqrt{\left(C - \mathsf{hypot}\left(C, B\right)\right) \cdot \left(2 \cdot F\right)}}{B}} \]
    10. Taylor expanded in C around 0

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{\left(-2 \cdot \left(B \cdot F\right)\right)}\right), B\right)\right) \]
    11. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(-2, \left(B \cdot F\right)\right)\right), B\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(-2, \left(F \cdot B\right)\right)\right), B\right)\right) \]
      3. *-lowering-*.f6414.6%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(-2, \mathsf{*.f64}\left(F, B\right)\right)\right), B\right)\right) \]
    12. Simplified14.6%

      \[\leadsto -\frac{\sqrt{\color{blue}{-2 \cdot \left(F \cdot B\right)}}}{B} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification13.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -6 \cdot 10^{+95}:\\ \;\;\;\;\sqrt{C \cdot F} \cdot \frac{-2}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{-2 \cdot \left(B \cdot F\right)}}{0 - B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 5.0% 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 15.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.f6415.2%

      \[\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. Simplified15.2%

    \[\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-rr15.3%

    \[\leadsto \color{blue}{-\frac{{\left(2 \cdot \left(F \cdot \left(C - \mathsf{hypot}\left(B, C\right)\right)\right)\right)}^{0.5}}{B}} \]
  8. Step-by-step derivation
    1. unpow1/2N/A

      \[\leadsto \mathsf{neg.f64}\left(\left(\frac{\sqrt{2 \cdot \left(F \cdot \left(C - \sqrt{B \cdot B + C \cdot C}\right)\right)}}{B}\right)\right) \]
    2. sqrt-prodN/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) \]
    3. associate-/l*N/A

      \[\leadsto \mathsf{neg.f64}\left(\left(\sqrt{2} \cdot \frac{\sqrt{F \cdot \left(C - \sqrt{B \cdot B + C \cdot C}\right)}}{B}\right)\right) \]
    4. *-lowering-*.f64N/A

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{2}\right), \left(\frac{\sqrt{F \cdot \left(C - \sqrt{B \cdot B + C \cdot C}\right)}}{B}\right)\right)\right) \]
    5. sqrt-lowering-sqrt.f64N/A

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \left(\frac{\sqrt{F \cdot \left(C - \sqrt{B \cdot B + C \cdot C}\right)}}{B}\right)\right)\right) \]
    6. /-lowering-/.f64N/A

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{/.f64}\left(\left(\sqrt{F \cdot \left(C - \sqrt{B \cdot B + C \cdot C}\right)}\right), B\right)\right)\right) \]
    7. sqrt-lowering-sqrt.f64N/A

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(F \cdot \left(C - \sqrt{B \cdot B + C \cdot C}\right)\right)\right), B\right)\right)\right) \]
    8. *-lowering-*.f64N/A

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \left(C - \sqrt{B \cdot B + C \cdot C}\right)\right)\right), B\right)\right)\right) \]
    9. --lowering--.f64N/A

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{\_.f64}\left(C, \left(\sqrt{B \cdot B + C \cdot C}\right)\right)\right)\right), B\right)\right)\right) \]
    10. +-commutativeN/A

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{\_.f64}\left(C, \left(\sqrt{C \cdot C + B \cdot B}\right)\right)\right)\right), B\right)\right)\right) \]
    11. hypot-defineN/A

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{\_.f64}\left(C, \left(\mathsf{hypot}\left(C, B\right)\right)\right)\right)\right), B\right)\right)\right) \]
    12. hypot-lowering-hypot.f6415.2%

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(2\right), \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{\_.f64}\left(C, \mathsf{hypot.f64}\left(C, B\right)\right)\right)\right), B\right)\right)\right) \]
  9. Applied egg-rr15.2%

    \[\leadsto -\color{blue}{\sqrt{2} \cdot \frac{\sqrt{F \cdot \left(C - \mathsf{hypot}\left(C, B\right)\right)}}{B}} \]
  10. Taylor expanded in C around -inf

    \[\leadsto \color{blue}{\frac{{\left(\sqrt{-1}\right)}^{2} \cdot {\left(\sqrt{2}\right)}^{2}}{B} \cdot \sqrt{C \cdot F}} \]
  11. Step-by-step derivation
    1. *-commutativeN/A

      \[\leadsto \sqrt{C \cdot F} \cdot \color{blue}{\frac{{\left(\sqrt{-1}\right)}^{2} \cdot {\left(\sqrt{2}\right)}^{2}}{B}} \]
    2. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{C \cdot F}\right), \color{blue}{\left(\frac{{\left(\sqrt{-1}\right)}^{2} \cdot {\left(\sqrt{2}\right)}^{2}}{B}\right)}\right) \]
    3. sqrt-lowering-sqrt.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(C \cdot F\right)\right), \left(\frac{\color{blue}{{\left(\sqrt{-1}\right)}^{2} \cdot {\left(\sqrt{2}\right)}^{2}}}{B}\right)\right) \]
    4. *-commutativeN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(F \cdot C\right)\right), \left(\frac{\color{blue}{{\left(\sqrt{-1}\right)}^{2}} \cdot {\left(\sqrt{2}\right)}^{2}}{B}\right)\right) \]
    5. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, C\right)\right), \left(\frac{\color{blue}{{\left(\sqrt{-1}\right)}^{2}} \cdot {\left(\sqrt{2}\right)}^{2}}{B}\right)\right) \]
    6. unpow2N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, C\right)\right), \left(\frac{\left(\sqrt{-1} \cdot \sqrt{-1}\right) \cdot {\left(\sqrt{2}\right)}^{2}}{B}\right)\right) \]
    7. rem-square-sqrtN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, C\right)\right), \left(\frac{-1 \cdot {\left(\sqrt{2}\right)}^{2}}{B}\right)\right) \]
    8. unpow2N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, C\right)\right), \left(\frac{-1 \cdot \left(\sqrt{2} \cdot \sqrt{2}\right)}{B}\right)\right) \]
    9. rem-square-sqrtN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, C\right)\right), \left(\frac{-1 \cdot 2}{B}\right)\right) \]
    10. metadata-evalN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, C\right)\right), \left(\frac{-2}{B}\right)\right) \]
    11. /-lowering-/.f643.2%

      \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, C\right)\right), \mathsf{/.f64}\left(-2, \color{blue}{B}\right)\right) \]
  12. Simplified3.2%

    \[\leadsto \color{blue}{\sqrt{F \cdot C} \cdot \frac{-2}{B}} \]
  13. Final simplification3.2%

    \[\leadsto \sqrt{C \cdot F} \cdot \frac{-2}{B} \]
  14. Add Preprocessing

Reproduce

?
herbie shell --seed 2024148 
(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))))