ABCF->ab-angle b

Percentage Accurate: 19.4% → 44.3%
Time: 25.4s
Alternatives: 18
Speedup: 5.8×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 18 alternatives:

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

Initial Program: 19.4% accurate, 1.0× speedup?

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

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

Alternative 1: 44.3% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_4 \leq 0:\\
\;\;\;\;\frac{\sqrt{\left(A \cdot -8\right) \cdot \left(\left(C \cdot F\right) \cdot \left(C + C\right)\right)}}{-4 \cdot \left(0 - A \cdot C\right)}\\

\mathbf{elif}\;t\_4 \leq \infty:\\
\;\;\;\;\frac{{\left(2 \cdot F\right)}^{0.5} \cdot \sqrt{t\_0 \cdot t\_1}}{t\_2}\\

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


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

    1. Initial program 40.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. Simplified53.1%

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

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

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

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

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

    if -2e-197 < (/.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 3.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 inf

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-8, A\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(C, F\right), \left(C - -1 \cdot C\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{pow.f64}\left(B, 2\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)\right)\right) \]
      7. cancel-sign-sub-invN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-8, A\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(C, F\right), \mathsf{+.f64}\left(C, \left(1 \cdot C\right)\right)\right)\right)\right)\right), \mathsf{\_.f64}\left(\mathsf{pow.f64}\left(B, 2\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(4, A\right), C\right)\right)\right) \]
      10. *-lowering-*.f6427.0%

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-8, A\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(C, F\right), \mathsf{+.f64}\left(C, \mathsf{*.f64}\left(1, C\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(-4, \left(C \cdot \color{blue}{A}\right)\right)\right) \]
      3. *-lowering-*.f6434.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{neg.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-8, A\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(C, F\right), \mathsf{+.f64}\left(C, \mathsf{*.f64}\left(1, C\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(C, \color{blue}{A}\right)\right)\right) \]
    8. Simplified34.4%

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

    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 44.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. Simplified50.0%

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

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

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

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

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

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

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

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

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

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

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

    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.f6419.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. Simplified19.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-rr19.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}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification40.1%

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

Alternative 2: 38.1% accurate, 1.8× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ \begin{array}{l} t_0 := 4 \cdot \left(A \cdot C\right) - B\_m \cdot B\_m\\ \mathbf{if}\;B\_m \leq 1.65 \cdot 10^{-242}:\\ \;\;\;\;\frac{\sqrt{-16 \cdot \left(\left(C \cdot F\right) \cdot \left(A \cdot C\right)\right)}}{t\_0}\\ \mathbf{elif}\;B\_m \leq 6.8 \cdot 10^{-102}:\\ \;\;\;\;\sqrt{-0.5 \cdot \frac{F}{A}} \cdot \left(0 - \sqrt{2}\right)\\ \mathbf{elif}\;B\_m \leq 2.7 \cdot 10^{+103}:\\ \;\;\;\;\frac{\sqrt{B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)} \cdot \sqrt{\left(\left(A + C\right) - \mathsf{hypot}\left(B\_m, A - C\right)\right) \cdot \left(2 \cdot F\right)}}{t\_0}\\ \mathbf{elif}\;B\_m \leq 9 \cdot 10^{+272}:\\ \;\;\;\;\frac{-1}{\frac{B\_m}{\sqrt{\left(2 \cdot F\right) \cdot \left(C - \mathsf{hypot}\left(C, B\_m\right)\right)}}}\\ \mathbf{else}:\\ \;\;\;\;0 - \sqrt{2} \cdot \sqrt{\frac{F}{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 1.65e-242)
     (/ (sqrt (* -16.0 (* (* C F) (* A C)))) t_0)
     (if (<= B_m 6.8e-102)
       (* (sqrt (* -0.5 (/ F A))) (- 0.0 (sqrt 2.0)))
       (if (<= B_m 2.7e+103)
         (/
          (*
           (sqrt (+ (* B_m B_m) (* -4.0 (* A C))))
           (sqrt (* (- (+ A C) (hypot B_m (- A C))) (* 2.0 F))))
          t_0)
         (if (<= B_m 9e+272)
           (/ -1.0 (/ B_m (sqrt (* (* 2.0 F) (- C (hypot C B_m))))))
           (- 0.0 (* (sqrt 2.0) (sqrt (/ F (- 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 <= 1.65e-242) {
		tmp = sqrt((-16.0 * ((C * F) * (A * C)))) / t_0;
	} else if (B_m <= 6.8e-102) {
		tmp = sqrt((-0.5 * (F / A))) * (0.0 - sqrt(2.0));
	} else if (B_m <= 2.7e+103) {
		tmp = (sqrt(((B_m * B_m) + (-4.0 * (A * C)))) * sqrt((((A + C) - hypot(B_m, (A - C))) * (2.0 * F)))) / t_0;
	} else if (B_m <= 9e+272) {
		tmp = -1.0 / (B_m / sqrt(((2.0 * F) * (C - hypot(C, B_m)))));
	} else {
		tmp = 0.0 - (sqrt(2.0) * sqrt((F / (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 <= 1.65e-242) {
		tmp = Math.sqrt((-16.0 * ((C * F) * (A * C)))) / t_0;
	} else if (B_m <= 6.8e-102) {
		tmp = Math.sqrt((-0.5 * (F / A))) * (0.0 - Math.sqrt(2.0));
	} else if (B_m <= 2.7e+103) {
		tmp = (Math.sqrt(((B_m * B_m) + (-4.0 * (A * C)))) * Math.sqrt((((A + C) - Math.hypot(B_m, (A - C))) * (2.0 * F)))) / t_0;
	} else if (B_m <= 9e+272) {
		tmp = -1.0 / (B_m / Math.sqrt(((2.0 * F) * (C - Math.hypot(C, B_m)))));
	} else {
		tmp = 0.0 - (Math.sqrt(2.0) * Math.sqrt((F / (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 <= 1.65e-242:
		tmp = math.sqrt((-16.0 * ((C * F) * (A * C)))) / t_0
	elif B_m <= 6.8e-102:
		tmp = math.sqrt((-0.5 * (F / A))) * (0.0 - math.sqrt(2.0))
	elif B_m <= 2.7e+103:
		tmp = (math.sqrt(((B_m * B_m) + (-4.0 * (A * C)))) * math.sqrt((((A + C) - math.hypot(B_m, (A - C))) * (2.0 * F)))) / t_0
	elif B_m <= 9e+272:
		tmp = -1.0 / (B_m / math.sqrt(((2.0 * F) * (C - math.hypot(C, B_m)))))
	else:
		tmp = 0.0 - (math.sqrt(2.0) * math.sqrt((F / (0.0 - B_m))))
	return tmp
B_m = abs(B)
function code(A, B_m, C, F)
	t_0 = Float64(Float64(4.0 * Float64(A * C)) - Float64(B_m * B_m))
	tmp = 0.0
	if (B_m <= 1.65e-242)
		tmp = Float64(sqrt(Float64(-16.0 * Float64(Float64(C * F) * Float64(A * C)))) / t_0);
	elseif (B_m <= 6.8e-102)
		tmp = Float64(sqrt(Float64(-0.5 * Float64(F / A))) * Float64(0.0 - sqrt(2.0)));
	elseif (B_m <= 2.7e+103)
		tmp = Float64(Float64(sqrt(Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C)))) * sqrt(Float64(Float64(Float64(A + C) - hypot(B_m, Float64(A - C))) * Float64(2.0 * F)))) / t_0);
	elseif (B_m <= 9e+272)
		tmp = Float64(-1.0 / Float64(B_m / sqrt(Float64(Float64(2.0 * F) * Float64(C - hypot(C, B_m))))));
	else
		tmp = Float64(0.0 - Float64(sqrt(2.0) * sqrt(Float64(F / 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 <= 1.65e-242)
		tmp = sqrt((-16.0 * ((C * F) * (A * C)))) / t_0;
	elseif (B_m <= 6.8e-102)
		tmp = sqrt((-0.5 * (F / A))) * (0.0 - sqrt(2.0));
	elseif (B_m <= 2.7e+103)
		tmp = (sqrt(((B_m * B_m) + (-4.0 * (A * C)))) * sqrt((((A + C) - hypot(B_m, (A - C))) * (2.0 * F)))) / t_0;
	elseif (B_m <= 9e+272)
		tmp = -1.0 / (B_m / sqrt(((2.0 * F) * (C - hypot(C, B_m)))));
	else
		tmp = 0.0 - (sqrt(2.0) * sqrt((F / (0.0 - B_m))));
	end
	tmp_2 = tmp;
end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B$95$m, 1.65e-242], N[(N[Sqrt[N[(-16.0 * N[(N[(C * F), $MachinePrecision] * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[B$95$m, 6.8e-102], N[(N[Sqrt[N[(-0.5 * N[(F / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(0.0 - N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B$95$m, 2.7e+103], N[(N[(N[Sqrt[N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(N[(N[(A + C), $MachinePrecision] - N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] * N[(2.0 * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[B$95$m, 9e+272], N[(-1.0 / N[(B$95$m / N[Sqrt[N[(N[(2.0 * F), $MachinePrecision] * N[(C - N[Sqrt[C ^ 2 + B$95$m ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.0 - N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(F / N[(0.0 - B$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
B_m = \left|B\right|

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if B < 1.64999999999999991e-242

    1. Initial program 14.8%

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

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

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

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

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

        \[\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(4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    6. Simplified13.4%

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

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

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

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

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

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

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

    if 1.64999999999999991e-242 < B < 6.80000000000000026e-102

    1. Initial program 16.5%

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

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

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

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

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

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

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

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

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

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

    if 6.80000000000000026e-102 < B < 2.69999999999999993e103

    1. Initial program 34.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. Simplified42.1%

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

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

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

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

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

    if 2.69999999999999993e103 < B < 9.00000000000000059e272

    1. Initial program 5.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.f6457.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. Simplified57.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-rr57.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. Step-by-step derivation
      1. neg-mul-1N/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(-1, \mathsf{/.f64}\left(B, \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)\right)\right) \]
      12. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(-1, \mathsf{/.f64}\left(B, \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)\right)\right) \]
      13. hypot-defineN/A

        \[\leadsto \mathsf{/.f64}\left(-1, \mathsf{/.f64}\left(B, \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)\right)\right) \]
      14. hypot-lowering-hypot.f64N/A

        \[\leadsto \mathsf{/.f64}\left(-1, \mathsf{/.f64}\left(B, \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)\right)\right) \]
      15. *-lowering-*.f6457.6%

        \[\leadsto \mathsf{/.f64}\left(-1, \mathsf{/.f64}\left(B, \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)\right)\right) \]
    9. Applied egg-rr57.6%

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

    if 9.00000000000000059e272 < B

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 39.0% accurate, 2.6× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ \begin{array}{l} t_0 := 4 \cdot \left(A \cdot C\right) - B\_m \cdot B\_m\\ \mathbf{if}\;B\_m \leq 1.4 \cdot 10^{-242}:\\ \;\;\;\;\frac{\sqrt{-16 \cdot \left(\left(C \cdot F\right) \cdot \left(A \cdot C\right)\right)}}{t\_0}\\ \mathbf{elif}\;B\_m \leq 9.4 \cdot 10^{-171}:\\ \;\;\;\;\sqrt{-0.5 \cdot \frac{F}{A}} \cdot \left(0 - \sqrt{2}\right)\\ \mathbf{elif}\;B\_m \leq 3.9 \cdot 10^{+52}:\\ \;\;\;\;\frac{\sqrt{\left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right) \cdot \left(\left(2 \cdot F\right) \cdot \left(A + \left(C - \mathsf{hypot}\left(B\_m, A - C\right)\right)\right)\right)}}{t\_0}\\ \mathbf{elif}\;B\_m \leq 10^{+271}:\\ \;\;\;\;\frac{-1}{\frac{B\_m}{\sqrt{\left(2 \cdot F\right) \cdot \left(C - \mathsf{hypot}\left(C, B\_m\right)\right)}}}\\ \mathbf{else}:\\ \;\;\;\;0 - \sqrt{2} \cdot \sqrt{\frac{F}{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 1.4e-242)
     (/ (sqrt (* -16.0 (* (* C F) (* A C)))) t_0)
     (if (<= B_m 9.4e-171)
       (* (sqrt (* -0.5 (/ F A))) (- 0.0 (sqrt 2.0)))
       (if (<= B_m 3.9e+52)
         (/
          (sqrt
           (*
            (+ (* B_m B_m) (* -4.0 (* A C)))
            (* (* 2.0 F) (+ A (- C (hypot B_m (- A C)))))))
          t_0)
         (if (<= B_m 1e+271)
           (/ -1.0 (/ B_m (sqrt (* (* 2.0 F) (- C (hypot C B_m))))))
           (- 0.0 (* (sqrt 2.0) (sqrt (/ F (- 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 <= 1.4e-242) {
		tmp = sqrt((-16.0 * ((C * F) * (A * C)))) / t_0;
	} else if (B_m <= 9.4e-171) {
		tmp = sqrt((-0.5 * (F / A))) * (0.0 - sqrt(2.0));
	} else if (B_m <= 3.9e+52) {
		tmp = sqrt((((B_m * B_m) + (-4.0 * (A * C))) * ((2.0 * F) * (A + (C - hypot(B_m, (A - C))))))) / t_0;
	} else if (B_m <= 1e+271) {
		tmp = -1.0 / (B_m / sqrt(((2.0 * F) * (C - hypot(C, B_m)))));
	} else {
		tmp = 0.0 - (sqrt(2.0) * sqrt((F / (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 <= 1.4e-242) {
		tmp = Math.sqrt((-16.0 * ((C * F) * (A * C)))) / t_0;
	} else if (B_m <= 9.4e-171) {
		tmp = Math.sqrt((-0.5 * (F / A))) * (0.0 - Math.sqrt(2.0));
	} else if (B_m <= 3.9e+52) {
		tmp = Math.sqrt((((B_m * B_m) + (-4.0 * (A * C))) * ((2.0 * F) * (A + (C - Math.hypot(B_m, (A - C))))))) / t_0;
	} else if (B_m <= 1e+271) {
		tmp = -1.0 / (B_m / Math.sqrt(((2.0 * F) * (C - Math.hypot(C, B_m)))));
	} else {
		tmp = 0.0 - (Math.sqrt(2.0) * Math.sqrt((F / (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 <= 1.4e-242:
		tmp = math.sqrt((-16.0 * ((C * F) * (A * C)))) / t_0
	elif B_m <= 9.4e-171:
		tmp = math.sqrt((-0.5 * (F / A))) * (0.0 - math.sqrt(2.0))
	elif B_m <= 3.9e+52:
		tmp = math.sqrt((((B_m * B_m) + (-4.0 * (A * C))) * ((2.0 * F) * (A + (C - math.hypot(B_m, (A - C))))))) / t_0
	elif B_m <= 1e+271:
		tmp = -1.0 / (B_m / math.sqrt(((2.0 * F) * (C - math.hypot(C, B_m)))))
	else:
		tmp = 0.0 - (math.sqrt(2.0) * math.sqrt((F / (0.0 - B_m))))
	return tmp
B_m = abs(B)
function code(A, B_m, C, F)
	t_0 = Float64(Float64(4.0 * Float64(A * C)) - Float64(B_m * B_m))
	tmp = 0.0
	if (B_m <= 1.4e-242)
		tmp = Float64(sqrt(Float64(-16.0 * Float64(Float64(C * F) * Float64(A * C)))) / t_0);
	elseif (B_m <= 9.4e-171)
		tmp = Float64(sqrt(Float64(-0.5 * Float64(F / A))) * Float64(0.0 - sqrt(2.0)));
	elseif (B_m <= 3.9e+52)
		tmp = Float64(sqrt(Float64(Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C))) * Float64(Float64(2.0 * F) * Float64(A + Float64(C - hypot(B_m, Float64(A - C))))))) / t_0);
	elseif (B_m <= 1e+271)
		tmp = Float64(-1.0 / Float64(B_m / sqrt(Float64(Float64(2.0 * F) * Float64(C - hypot(C, B_m))))));
	else
		tmp = Float64(0.0 - Float64(sqrt(2.0) * sqrt(Float64(F / 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 <= 1.4e-242)
		tmp = sqrt((-16.0 * ((C * F) * (A * C)))) / t_0;
	elseif (B_m <= 9.4e-171)
		tmp = sqrt((-0.5 * (F / A))) * (0.0 - sqrt(2.0));
	elseif (B_m <= 3.9e+52)
		tmp = sqrt((((B_m * B_m) + (-4.0 * (A * C))) * ((2.0 * F) * (A + (C - hypot(B_m, (A - C))))))) / t_0;
	elseif (B_m <= 1e+271)
		tmp = -1.0 / (B_m / sqrt(((2.0 * F) * (C - hypot(C, B_m)))));
	else
		tmp = 0.0 - (sqrt(2.0) * sqrt((F / (0.0 - B_m))));
	end
	tmp_2 = tmp;
end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B$95$m, 1.4e-242], N[(N[Sqrt[N[(-16.0 * N[(N[(C * F), $MachinePrecision] * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[B$95$m, 9.4e-171], N[(N[Sqrt[N[(-0.5 * N[(F / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(0.0 - N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B$95$m, 3.9e+52], N[(N[Sqrt[N[(N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 * F), $MachinePrecision] * N[(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, 1e+271], N[(-1.0 / N[(B$95$m / N[Sqrt[N[(N[(2.0 * F), $MachinePrecision] * N[(C - N[Sqrt[C ^ 2 + B$95$m ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.0 - N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(F / N[(0.0 - B$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
B_m = \left|B\right|

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if B < 1.39999999999999992e-242

    1. Initial program 14.8%

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

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

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

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

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

        \[\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(4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    6. Simplified13.4%

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

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

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

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

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

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

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

    if 1.39999999999999992e-242 < B < 9.39999999999999929e-171

    1. Initial program 10.4%

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

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

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

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

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

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

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

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

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

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

    if 9.39999999999999929e-171 < B < 3.9e52

    1. Initial program 35.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. Simplified45.8%

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

    if 3.9e52 < B < 9.99999999999999953e270

    1. Initial program 8.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.f6452.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. Simplified52.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-rr52.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. neg-mul-1N/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(-1, \mathsf{/.f64}\left(B, \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)\right)\right) \]
      12. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(-1, \mathsf{/.f64}\left(B, \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)\right)\right) \]
      13. hypot-defineN/A

        \[\leadsto \mathsf{/.f64}\left(-1, \mathsf{/.f64}\left(B, \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)\right)\right) \]
      14. hypot-lowering-hypot.f64N/A

        \[\leadsto \mathsf{/.f64}\left(-1, \mathsf{/.f64}\left(B, \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)\right)\right) \]
      15. *-lowering-*.f6452.6%

        \[\leadsto \mathsf{/.f64}\left(-1, \mathsf{/.f64}\left(B, \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)\right)\right) \]
    9. Applied egg-rr52.6%

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

    if 9.99999999999999953e270 < B

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 37.5% accurate, 2.7× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if B < 1.9000000000000001e-242

    1. Initial program 14.8%

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

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

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

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

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

        \[\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(4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    6. Simplified13.4%

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

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

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

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

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

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

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

    if 1.9000000000000001e-242 < B < 6.80000000000000026e-102

    1. Initial program 16.5%

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

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

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

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

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

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

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

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

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

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

    if 6.80000000000000026e-102 < B < 3.05e97

    1. Initial program 35.4%

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

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

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

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

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

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

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

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

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

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

    if 3.05e97 < B < 2.20000000000000008e272

    1. Initial program 5.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.f6454.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. Simplified54.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-rr55.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. neg-mul-1N/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(-1, \mathsf{/.f64}\left(B, \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)\right)\right) \]
      12. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(-1, \mathsf{/.f64}\left(B, \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)\right)\right) \]
      13. hypot-defineN/A

        \[\leadsto \mathsf{/.f64}\left(-1, \mathsf{/.f64}\left(B, \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)\right)\right) \]
      14. hypot-lowering-hypot.f64N/A

        \[\leadsto \mathsf{/.f64}\left(-1, \mathsf{/.f64}\left(B, \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)\right)\right) \]
      15. *-lowering-*.f6455.1%

        \[\leadsto \mathsf{/.f64}\left(-1, \mathsf{/.f64}\left(B, \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)\right)\right) \]
    9. Applied egg-rr55.1%

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

    if 2.20000000000000008e272 < B

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 35.2% accurate, 2.8× speedup?

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

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

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

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

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


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

    1. Initial program 7.2%

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

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

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

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

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

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

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

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

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

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

    if -1.1e116 < A < -3.5999999999999999e-53

    1. Initial program 31.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. Simplified34.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\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(4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    6. Simplified40.3%

      \[\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)}}}{4 \cdot \left(A \cdot C\right) - B \cdot B} \]

    if -3.5999999999999999e-53 < A < 3.69999999999999998e-40

    1. Initial program 21.7%

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

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

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

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

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

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

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

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

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

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

    if 3.69999999999999998e-40 < A

    1. Initial program 5.9%

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 33.1% accurate, 2.8× speedup?

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

\\
\begin{array}{l}
t_0 := F \cdot \left(B\_m \cdot B\_m\right)\\
\mathbf{if}\;A \leq -2.4 \cdot 10^{+116}:\\
\;\;\;\;\frac{{\left(0 - \frac{t\_0}{C}\right)}^{0.5}}{0 - B\_m}\\

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

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

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


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

    1. Initial program 7.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.f643.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. Simplified3.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-rr3.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 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. associate-*r/N/A

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

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

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

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

    if -2.4e116 < A < -1.30000000000000001e-54

    1. Initial program 31.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. Simplified34.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\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(4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    6. Simplified40.3%

      \[\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)}}}{4 \cdot \left(A \cdot C\right) - B \cdot B} \]

    if -1.30000000000000001e-54 < A < 3.69999999999999998e-40

    1. Initial program 21.7%

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

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

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

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

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

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

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

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

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

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

    if 3.69999999999999998e-40 < A

    1. Initial program 5.9%

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 36.2% accurate, 3.0× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ \begin{array}{l} \mathbf{if}\;F \leq -1.8 \cdot 10^{+31}:\\ \;\;\;\;0 - \sqrt{2} \cdot \sqrt{\frac{F}{0 - B\_m}}\\ \mathbf{elif}\;F \leq -4.2 \cdot 10^{-5}:\\ \;\;\;\;\frac{1}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m} \cdot \sqrt{F \cdot \left(-16 \cdot \left(C \cdot \left(A \cdot C\right)\right)\right) + 2 \cdot \left(\left(B\_m \cdot B\_m\right) \cdot \left(\left(2 \cdot F\right) \cdot \left(C + \frac{A}{\frac{A - C}{C}}\right) + F \cdot \left(\left(B\_m \cdot B\_m\right) \cdot \left(\frac{C \cdot \left(A \cdot -0.5\right)}{\left(A - C\right) \cdot \left(\left(A - C\right) \cdot \left(A - C\right)\right)} + \frac{-0.5}{A - C}\right)\right)\right)\right)}\\ \mathbf{elif}\;F \leq 2.6 \cdot 10^{-262}:\\ \;\;\;\;\frac{\sqrt{-2 \cdot \left(B\_m \cdot F\right)}}{0 - B\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{-16 \cdot \left(\left(C \cdot F\right) \cdot \left(A \cdot C\right)\right)}}{4 \cdot \left(A \cdot C\right) - B\_m \cdot B\_m}\\ \end{array} \end{array} \]
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
 :precision binary64
 (if (<= F -1.8e+31)
   (- 0.0 (* (sqrt 2.0) (sqrt (/ F (- 0.0 B_m)))))
   (if (<= F -4.2e-5)
     (*
      (/ 1.0 (- (* (* 4.0 A) C) (* B_m B_m)))
      (sqrt
       (+
        (* F (* -16.0 (* C (* A C))))
        (*
         2.0
         (*
          (* B_m B_m)
          (+
           (* (* 2.0 F) (+ C (/ A (/ (- A C) C))))
           (*
            F
            (*
             (* B_m B_m)
             (+
              (/ (* C (* A -0.5)) (* (- A C) (* (- A C) (- A C))))
              (/ -0.5 (- A C)))))))))))
     (if (<= F 2.6e-262)
       (/ (sqrt (* -2.0 (* B_m F))) (- 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 (F <= -1.8e+31) {
		tmp = 0.0 - (sqrt(2.0) * sqrt((F / (0.0 - B_m))));
	} else if (F <= -4.2e-5) {
		tmp = (1.0 / (((4.0 * A) * C) - (B_m * B_m))) * sqrt(((F * (-16.0 * (C * (A * C)))) + (2.0 * ((B_m * B_m) * (((2.0 * F) * (C + (A / ((A - C) / C)))) + (F * ((B_m * B_m) * (((C * (A * -0.5)) / ((A - C) * ((A - C) * (A - C)))) + (-0.5 / (A - C))))))))));
	} else if (F <= 2.6e-262) {
		tmp = sqrt((-2.0 * (B_m * F))) / (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 (f <= (-1.8d+31)) then
        tmp = 0.0d0 - (sqrt(2.0d0) * sqrt((f / (0.0d0 - b_m))))
    else if (f <= (-4.2d-5)) then
        tmp = (1.0d0 / (((4.0d0 * a) * c) - (b_m * b_m))) * sqrt(((f * ((-16.0d0) * (c * (a * c)))) + (2.0d0 * ((b_m * b_m) * (((2.0d0 * f) * (c + (a / ((a - c) / c)))) + (f * ((b_m * b_m) * (((c * (a * (-0.5d0))) / ((a - c) * ((a - c) * (a - c)))) + ((-0.5d0) / (a - c))))))))))
    else if (f <= 2.6d-262) then
        tmp = sqrt(((-2.0d0) * (b_m * f))) / (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 (F <= -1.8e+31) {
		tmp = 0.0 - (Math.sqrt(2.0) * Math.sqrt((F / (0.0 - B_m))));
	} else if (F <= -4.2e-5) {
		tmp = (1.0 / (((4.0 * A) * C) - (B_m * B_m))) * Math.sqrt(((F * (-16.0 * (C * (A * C)))) + (2.0 * ((B_m * B_m) * (((2.0 * F) * (C + (A / ((A - C) / C)))) + (F * ((B_m * B_m) * (((C * (A * -0.5)) / ((A - C) * ((A - C) * (A - C)))) + (-0.5 / (A - C))))))))));
	} else if (F <= 2.6e-262) {
		tmp = Math.sqrt((-2.0 * (B_m * F))) / (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 F <= -1.8e+31:
		tmp = 0.0 - (math.sqrt(2.0) * math.sqrt((F / (0.0 - B_m))))
	elif F <= -4.2e-5:
		tmp = (1.0 / (((4.0 * A) * C) - (B_m * B_m))) * math.sqrt(((F * (-16.0 * (C * (A * C)))) + (2.0 * ((B_m * B_m) * (((2.0 * F) * (C + (A / ((A - C) / C)))) + (F * ((B_m * B_m) * (((C * (A * -0.5)) / ((A - C) * ((A - C) * (A - C)))) + (-0.5 / (A - C))))))))))
	elif F <= 2.6e-262:
		tmp = math.sqrt((-2.0 * (B_m * F))) / (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 (F <= -1.8e+31)
		tmp = Float64(0.0 - Float64(sqrt(2.0) * sqrt(Float64(F / Float64(0.0 - B_m)))));
	elseif (F <= -4.2e-5)
		tmp = Float64(Float64(1.0 / Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m))) * sqrt(Float64(Float64(F * Float64(-16.0 * Float64(C * Float64(A * C)))) + Float64(2.0 * Float64(Float64(B_m * B_m) * Float64(Float64(Float64(2.0 * F) * Float64(C + Float64(A / Float64(Float64(A - C) / C)))) + Float64(F * Float64(Float64(B_m * B_m) * Float64(Float64(Float64(C * Float64(A * -0.5)) / Float64(Float64(A - C) * Float64(Float64(A - C) * Float64(A - C)))) + Float64(-0.5 / Float64(A - C)))))))))));
	elseif (F <= 2.6e-262)
		tmp = Float64(sqrt(Float64(-2.0 * Float64(B_m * F))) / Float64(0.0 - B_m));
	else
		tmp = Float64(sqrt(Float64(-16.0 * Float64(Float64(C * F) * Float64(A * C)))) / Float64(Float64(4.0 * Float64(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 (F <= -1.8e+31)
		tmp = 0.0 - (sqrt(2.0) * sqrt((F / (0.0 - B_m))));
	elseif (F <= -4.2e-5)
		tmp = (1.0 / (((4.0 * A) * C) - (B_m * B_m))) * sqrt(((F * (-16.0 * (C * (A * C)))) + (2.0 * ((B_m * B_m) * (((2.0 * F) * (C + (A / ((A - C) / C)))) + (F * ((B_m * B_m) * (((C * (A * -0.5)) / ((A - C) * ((A - C) * (A - C)))) + (-0.5 / (A - C))))))))));
	elseif (F <= 2.6e-262)
		tmp = sqrt((-2.0 * (B_m * F))) / (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[F, -1.8e+31], N[(0.0 - N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(F / N[(0.0 - B$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -4.2e-5], N[(N[(1.0 / N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(F * N[(-16.0 * N[(C * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(N[(B$95$m * B$95$m), $MachinePrecision] * N[(N[(N[(2.0 * F), $MachinePrecision] * N[(C + N[(A / N[(N[(A - C), $MachinePrecision] / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(F * N[(N[(B$95$m * B$95$m), $MachinePrecision] * N[(N[(N[(C * N[(A * -0.5), $MachinePrecision]), $MachinePrecision] / N[(N[(A - C), $MachinePrecision] * N[(N[(A - C), $MachinePrecision] * N[(A - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-0.5 / N[(A - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.6e-262], N[(N[Sqrt[N[(-2.0 * N[(B$95$m * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(0.0 - B$95$m), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(-16.0 * N[(N[(C * F), $MachinePrecision] * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
B_m = \left|B\right|

\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.8 \cdot 10^{+31}:\\
\;\;\;\;0 - \sqrt{2} \cdot \sqrt{\frac{F}{0 - B\_m}}\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if F < -1.79999999999999998e31

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

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

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

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

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

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

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

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

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

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

    if -1.79999999999999998e31 < F < -4.19999999999999977e-5

    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. Simplified17.0%

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

      \[\leadsto \frac{\sqrt{\color{blue}{-16 \cdot \left(\left(A \cdot \left(C \cdot C\right)\right) \cdot F\right) + \left(B \cdot B\right) \cdot \left(2 \cdot \left(F \cdot \left(2 \cdot \left(C + A \cdot \frac{C}{A - C}\right)\right) + \left(\left(B \cdot B\right) \cdot F\right) \cdot \left(\frac{-0.5 \cdot \left(A \cdot C\right)}{\left(A - C\right) \cdot \left(\left(A - C\right) \cdot \left(A - C\right)\right)} - \frac{0.5}{A - C}\right)\right)\right)}}}{4 \cdot \left(A \cdot C\right) - B \cdot B} \]
    6. Applied egg-rr54.0%

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

    if -4.19999999999999977e-5 < F < 2.5999999999999999e-262

    1. Initial program 20.3%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(2\right), B\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{\_.f64}\left(C, \left(\mathsf{hypot}\left(B, C\right)\right)\right)\right)\right)\right) \]
      12. hypot-lowering-hypot.f6426.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. Simplified26.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-rr26.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-*.f6426.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-rr26.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 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-*.f6421.9%

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

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

    if 2.5999999999999999e-262 < F

    1. Initial program 27.2%

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

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

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

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

        \[\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(4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    6. Simplified23.0%

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

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

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

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

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

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

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

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

Alternative 8: 28.3% accurate, 5.0× speedup?

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

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

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


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

    1. Initial program 9.6%

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

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

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

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

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

    if -2.6e115 < A < 7.9999999999999993e131

    1. Initial program 20.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.f6421.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. Simplified21.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-rr21.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-*.f6418.9%

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

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

    if 7.9999999999999993e131 < 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. Simplified2.5%

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

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

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

        \[\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(4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    6. Simplified31.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 28.3% accurate, 5.0× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\frac{C \cdot \sqrt{-16 \cdot \left(A \cdot F\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 < -2.6e115

    1. Initial program 9.6%

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

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

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

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

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

    if -2.6e115 < A < 3.99999999999999996e132

    1. Initial program 20.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.f6421.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. Simplified21.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-rr21.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-*.f6418.9%

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

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

    if 3.99999999999999996e132 < 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. Simplified2.5%

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

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

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

        \[\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(4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    6. Simplified31.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 32.9% accurate, 5.0× speedup?

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

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

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


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

    1. Initial program 16.8%

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

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

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

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

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

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

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

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

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

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

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

    if 1.44999999999999993e-62 < B

    1. Initial program 16.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.f6443.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. Simplified43.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-rr43.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) + C \cdot \left(-1 \cdot \frac{C \cdot F}{B} + 2 \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(\left(-2 \cdot \left(B \cdot F\right)\right), \left(C \cdot \left(-1 \cdot \frac{C \cdot F}{B} + 2 \cdot F\right)\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(\mathsf{*.f64}\left(-2, \left(B \cdot F\right)\right), \left(C \cdot \left(-1 \cdot \frac{C \cdot F}{B} + 2 \cdot F\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(\mathsf{*.f64}\left(-2, \mathsf{*.f64}\left(B, F\right)\right), \left(C \cdot \left(-1 \cdot \frac{C \cdot F}{B} + 2 \cdot F\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(\mathsf{*.f64}\left(-2, \mathsf{*.f64}\left(B, F\right)\right), \mathsf{*.f64}\left(C, \left(-1 \cdot \frac{C \cdot F}{B} + 2 \cdot F\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(\mathsf{*.f64}\left(-2, \mathsf{*.f64}\left(B, F\right)\right), \mathsf{*.f64}\left(C, \mathsf{+.f64}\left(\left(-1 \cdot \frac{C \cdot F}{B}\right), \left(2 \cdot F\right)\right)\right)\right), \frac{1}{2}\right), B\right)\right) \]
      6. mul-1-negN/A

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

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

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

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

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

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

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

Alternative 11: 32.9% accurate, 5.1× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ \begin{array}{l} \mathbf{if}\;B\_m \leq 3.8 \cdot 10^{-76}:\\ \;\;\;\;\frac{\sqrt{-16 \cdot \left(\left(C \cdot F\right) \cdot \left(A \cdot C\right)\right)}}{4 \cdot \left(A \cdot C\right) - B\_m \cdot 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 (<= B_m 3.8e-76)
   (/ (sqrt (* -16.0 (* (* C F) (* A C)))) (- (* 4.0 (* A C)) (* B_m 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 (B_m <= 3.8e-76) {
		tmp = sqrt((-16.0 * ((C * F) * (A * C)))) / ((4.0 * (A * C)) - (B_m * 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 (b_m <= 3.8d-76) then
        tmp = sqrt(((-16.0d0) * ((c * f) * (a * c)))) / ((4.0d0 * (a * c)) - (b_m * 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 (B_m <= 3.8e-76) {
		tmp = Math.sqrt((-16.0 * ((C * F) * (A * C)))) / ((4.0 * (A * C)) - (B_m * 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 B_m <= 3.8e-76:
		tmp = math.sqrt((-16.0 * ((C * F) * (A * C)))) / ((4.0 * (A * C)) - (B_m * 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 (B_m <= 3.8e-76)
		tmp = Float64(sqrt(Float64(-16.0 * Float64(Float64(C * F) * Float64(A * C)))) / Float64(Float64(4.0 * Float64(A * C)) - Float64(B_m * 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 (B_m <= 3.8e-76)
		tmp = sqrt((-16.0 * ((C * F) * (A * C)))) / ((4.0 * (A * C)) - (B_m * 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[B$95$m, 3.8e-76], N[(N[Sqrt[N[(-16.0 * N[(N[(C * F), $MachinePrecision] * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[N[(-2.0 * N[(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}\;B\_m \leq 3.8 \cdot 10^{-76}:\\
\;\;\;\;\frac{\sqrt{-16 \cdot \left(\left(C \cdot F\right) \cdot \left(A \cdot C\right)\right)}}{4 \cdot \left(A \cdot C\right) - B\_m \cdot 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 B < 3.8000000000000002e-76

    1. Initial program 17.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. Simplified23.2%

      \[\leadsto \color{blue}{\frac{\sqrt{\left(B \cdot B + \left(A \cdot C\right) \cdot -4\right) \cdot \left(\left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right) \cdot \left(2 \cdot F\right)\right)}}{4 \cdot \left(A \cdot C\right) - B \cdot B}} \]
    3. Add Preprocessing
    4. Taylor expanded in B around 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(4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    5. Step-by-step derivation
      1. *-lowering-*.f64N/A

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

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

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

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

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

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

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

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

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

    if 3.8000000000000002e-76 < B

    1. Initial program 15.8%

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

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

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

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

Alternative 12: 30.8% accurate, 5.1× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ \begin{array}{l} \mathbf{if}\;B\_m \leq 1.9 \cdot 10^{-76}:\\ \;\;\;\;\frac{\sqrt{-16 \cdot \left(F \cdot \left(A \cdot \left(C \cdot C\right)\right)\right)}}{4 \cdot \left(A \cdot C\right) - B\_m \cdot 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 (<= B_m 1.9e-76)
   (/ (sqrt (* -16.0 (* F (* A (* C C))))) (- (* 4.0 (* A C)) (* B_m 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 (B_m <= 1.9e-76) {
		tmp = sqrt((-16.0 * (F * (A * (C * C))))) / ((4.0 * (A * C)) - (B_m * 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 (b_m <= 1.9d-76) then
        tmp = sqrt(((-16.0d0) * (f * (a * (c * c))))) / ((4.0d0 * (a * c)) - (b_m * 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 (B_m <= 1.9e-76) {
		tmp = Math.sqrt((-16.0 * (F * (A * (C * C))))) / ((4.0 * (A * C)) - (B_m * 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 B_m <= 1.9e-76:
		tmp = math.sqrt((-16.0 * (F * (A * (C * C))))) / ((4.0 * (A * C)) - (B_m * 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 (B_m <= 1.9e-76)
		tmp = Float64(sqrt(Float64(-16.0 * Float64(F * Float64(A * Float64(C * C))))) / Float64(Float64(4.0 * Float64(A * C)) - Float64(B_m * 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 (B_m <= 1.9e-76)
		tmp = sqrt((-16.0 * (F * (A * (C * C))))) / ((4.0 * (A * C)) - (B_m * 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[B$95$m, 1.9e-76], N[(N[Sqrt[N[(-16.0 * N[(F * N[(A * N[(C * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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}\;B\_m \leq 1.9 \cdot 10^{-76}:\\
\;\;\;\;\frac{\sqrt{-16 \cdot \left(F \cdot \left(A \cdot \left(C \cdot C\right)\right)\right)}}{4 \cdot \left(A \cdot C\right) - B\_m \cdot 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 B < 1.9000000000000001e-76

    1. Initial program 17.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. Simplified23.2%

      \[\leadsto \color{blue}{\frac{\sqrt{\left(B \cdot B + \left(A \cdot C\right) \cdot -4\right) \cdot \left(\left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right) \cdot \left(2 \cdot F\right)\right)}}{4 \cdot \left(A \cdot C\right) - B \cdot B}} \]
    3. Add Preprocessing
    4. Taylor expanded in B around 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(4, \mathsf{*.f64}\left(A, C\right)\right), \mathsf{*.f64}\left(B, B\right)\right)\right) \]
    5. Step-by-step derivation
      1. *-lowering-*.f64N/A

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

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

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

    if 1.9000000000000001e-76 < B

    1. Initial program 15.8%

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

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

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

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

Alternative 13: 27.7% accurate, 5.3× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ \begin{array}{l} \mathbf{if}\;A \leq -2.2 \cdot 10^{+115}:\\ \;\;\;\;\frac{{\left(0 - \frac{F \cdot \left(B\_m \cdot B\_m\right)}{C}\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 (<= A -2.2e+115)
   (/ (pow (- 0.0 (/ (* F (* B_m B_m)) C)) 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 (A <= -2.2e+115) {
		tmp = pow((0.0 - ((F * (B_m * B_m)) / C)), 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 (a <= (-2.2d+115)) then
        tmp = ((0.0d0 - ((f * (b_m * b_m)) / c)) ** 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 (A <= -2.2e+115) {
		tmp = Math.pow((0.0 - ((F * (B_m * B_m)) / C)), 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 A <= -2.2e+115:
		tmp = math.pow((0.0 - ((F * (B_m * B_m)) / C)), 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 (A <= -2.2e+115)
		tmp = Float64((Float64(0.0 - Float64(Float64(F * Float64(B_m * B_m)) / C)) ^ 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 (A <= -2.2e+115)
		tmp = ((0.0 - ((F * (B_m * B_m)) / C)) ^ 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[A, -2.2e+115], N[(N[Power[N[(0.0 - N[(N[(F * N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision] / C), $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}\;A \leq -2.2 \cdot 10^{+115}:\\
\;\;\;\;\frac{{\left(0 - \frac{F \cdot \left(B\_m \cdot B\_m\right)}{C}\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 A < -2.2e115

    1. Initial program 9.6%

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

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

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

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

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

    if -2.2e115 < A

    1. Initial program 17.8%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -2.2 \cdot 10^{+115}:\\ \;\;\;\;\frac{{\left(0 - \frac{F \cdot \left(B \cdot B\right)}{C}\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 14: 27.6% accurate, 5.4× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ \begin{array}{l} \mathbf{if}\;A \leq -2.5 \cdot 10^{+115}:\\ \;\;\;\;\frac{\sqrt{0 - \frac{F \cdot \left(B\_m \cdot B\_m\right)}{C}}}{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.5e+115)
   (/ (sqrt (- 0.0 (/ (* F (* 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.5e+115) {
		tmp = sqrt((0.0 - ((F * (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.5d+115)) then
        tmp = sqrt((0.0d0 - ((f * (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.5e+115) {
		tmp = Math.sqrt((0.0 - ((F * (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.5e+115:
		tmp = math.sqrt((0.0 - ((F * (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.5e+115)
		tmp = Float64(sqrt(Float64(0.0 - Float64(Float64(F * 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.5e+115)
		tmp = sqrt((0.0 - ((F * (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.5e+115], N[(N[Sqrt[N[(0.0 - N[(N[(F * N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision] / C), $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.5 \cdot 10^{+115}:\\
\;\;\;\;\frac{\sqrt{0 - \frac{F \cdot \left(B\_m \cdot B\_m\right)}{C}}}{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.50000000000000004e115

    1. Initial program 9.6%

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

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

      \[\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-*.f6413.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. Simplified13.8%

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

    if -2.50000000000000004e115 < A

    1. Initial program 17.8%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -2.5 \cdot 10^{+115}:\\ \;\;\;\;\frac{\sqrt{0 - \frac{F \cdot \left(B \cdot B\right)}{C}}}{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.6% accurate, 5.5× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ \begin{array}{l} \mathbf{if}\;A \leq -5.5 \cdot 10^{+190}:\\ \;\;\;\;-2 \cdot \left(\sqrt{A \cdot F} \cdot \frac{1}{B\_m}\right)\\ \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 -5.5e+190)
   (* -2.0 (* (sqrt (* A F)) (/ 1.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 <= -5.5e+190) {
		tmp = -2.0 * (sqrt((A * F)) * (1.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 <= (-5.5d+190)) then
        tmp = (-2.0d0) * (sqrt((a * f)) * (1.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 <= -5.5e+190) {
		tmp = -2.0 * (Math.sqrt((A * F)) * (1.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 <= -5.5e+190:
		tmp = -2.0 * (math.sqrt((A * F)) * (1.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 <= -5.5e+190)
		tmp = Float64(-2.0 * Float64(sqrt(Float64(A * F)) * Float64(1.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 <= -5.5e+190)
		tmp = -2.0 * (sqrt((A * F)) * (1.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, -5.5e+190], N[(-2.0 * N[(N[Sqrt[N[(A * F), $MachinePrecision]], $MachinePrecision] * N[(1.0 / B$95$m), $MachinePrecision]), $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 -5.5 \cdot 10^{+190}:\\
\;\;\;\;-2 \cdot \left(\sqrt{A \cdot F} \cdot \frac{1}{B\_m}\right)\\

\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 < -5.5e190

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.5e190 < A

    1. Initial program 18.3%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(2\right), B\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{\_.f64}\left(C, \left(\mathsf{hypot}\left(B, C\right)\right)\right)\right)\right)\right) \]
      12. hypot-lowering-hypot.f6418.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. Simplified18.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-rr18.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-*.f6416.1%

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

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

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

Alternative 16: 27.0% accurate, 5.8× speedup?

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

\\
\frac{{\left(-2 \cdot \left(B\_m \cdot F\right)\right)}^{0.5}}{0 - B\_m}
\end{array}
Derivation
  1. Initial program 16.6%

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

    \[\leadsto -\frac{{\color{blue}{\left(-2 \cdot \left(B \cdot F\right)\right)}}^{0.5}}{B} \]
  11. Final simplification14.8%

    \[\leadsto \frac{{\left(-2 \cdot \left(B \cdot F\right)\right)}^{0.5}}{0 - B} \]
  12. Add Preprocessing

Alternative 17: 27.0% accurate, 5.8× speedup?

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

\\
\frac{\sqrt{-2 \cdot \left(B\_m \cdot F\right)}}{0 - B\_m}
\end{array}
Derivation
  1. Initial program 16.6%

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

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

    \[\leadsto -\frac{\sqrt{\color{blue}{-2 \cdot \left(F \cdot B\right)}}}{B} \]
  13. Final simplification14.8%

    \[\leadsto \frac{\sqrt{-2 \cdot \left(B \cdot F\right)}}{0 - B} \]
  14. Add Preprocessing

Alternative 18: 4.8% accurate, 5.9× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ -2 \cdot \frac{\sqrt{C \cdot F}}{B\_m} \end{array} \]
B_m = (fabs.f64 B)
(FPCore (A B_m C F) :precision binary64 (* -2.0 (/ (sqrt (* C F)) B_m)))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
	return -2.0 * (sqrt((C * F)) / B_m);
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
    real(8), intent (in) :: a
    real(8), intent (in) :: b_m
    real(8), intent (in) :: c
    real(8), intent (in) :: f
    code = (-2.0d0) * (sqrt((c * f)) / b_m)
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
	return -2.0 * (Math.sqrt((C * F)) / B_m);
}
B_m = math.fabs(B)
def code(A, B_m, C, F):
	return -2.0 * (math.sqrt((C * F)) / B_m)
B_m = abs(B)
function code(A, B_m, C, F)
	return Float64(-2.0 * Float64(sqrt(Float64(C * F)) / B_m))
end
B_m = abs(B);
function tmp = code(A, B_m, C, F)
	tmp = -2.0 * (sqrt((C * F)) / B_m);
end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := N[(-2.0 * N[(N[Sqrt[N[(C * F), $MachinePrecision]], $MachinePrecision] / B$95$m), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
B_m = \left|B\right|

\\
-2 \cdot \frac{\sqrt{C \cdot F}}{B\_m}
\end{array}
Derivation
  1. Initial program 16.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\frac{-2}{B} \cdot \sqrt{F \cdot C}} \]
  12. Taylor expanded in B around 0

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

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

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

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

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

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

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

      \[\leadsto \mathsf{*.f64}\left(-2, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, C\right)\right), B\right)\right) \]
  14. Simplified3.4%

    \[\leadsto \color{blue}{-2 \cdot \frac{\sqrt{F \cdot C}}{B}} \]
  15. Final simplification3.4%

    \[\leadsto -2 \cdot \frac{\sqrt{C \cdot F}}{B} \]
  16. Add Preprocessing

Reproduce

?
herbie shell --seed 2024152 
(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))))