ABCF->ab-angle b

Percentage Accurate: 19.1% → 52.0%
Time: 24.0s
Alternatives: 16
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 16 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.1% 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: 52.0% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_3 \leq 0:\\
\;\;\;\;\frac{\sqrt{t\_0 \cdot \left(\left(2 \cdot F\right) \cdot \left(C + C\right) - \frac{F \cdot \left(B\_m \cdot B\_m\right)}{A}\right)}}{t\_4}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (/.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))) < -5.0000000000000001e-180

    1. Initial program 40.9%

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

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

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

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

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

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

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

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

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

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

    if -5.0000000000000001e-180 < (/.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.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. Step-by-step derivation
      1. distribute-frac-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(2\right), B\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{\_.f64}\left(C, \left(\mathsf{hypot}\left(B, C\right)\right)\right)\right)\right)\right) \]
      12. hypot-lowering-hypot.f6417.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. Simplified17.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-rr17.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.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. Simplified16.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 45.6% accurate, 1.9× speedup?

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

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

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

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


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

    1. Initial program 21.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.79999999999999992e-126 < B < 3.1999999999999999e32

    1. Initial program 23.1%

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

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

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

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

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

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

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

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

    if 3.1999999999999999e32 < B

    1. Initial program 14.2%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(2\right), B\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{\_.f64}\left(C, \left(\mathsf{hypot}\left(B, C\right)\right)\right)\right)\right)\right) \]
      12. hypot-lowering-hypot.f6443.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. Simplified43.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-rr43.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 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 45.3% accurate, 2.6× speedup?

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

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

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

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


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

    1. Initial program 21.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.8999999999999999e-126 < B < 4.99999999999999973e33

    1. Initial program 23.1%

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

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

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

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

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

    if 4.99999999999999973e33 < B

    1. Initial program 14.2%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(2\right), B\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{\_.f64}\left(C, \left(\mathsf{hypot}\left(B, C\right)\right)\right)\right)\right)\right) \]
      12. hypot-lowering-hypot.f6443.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. Simplified43.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-rr43.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 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 46.4% accurate, 2.7× speedup?

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

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

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


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

    1. Initial program 21.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.20000000000000001e32 < B

    1. Initial program 14.2%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(2\right), B\right)\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, \mathsf{\_.f64}\left(C, \left(\mathsf{hypot}\left(B, C\right)\right)\right)\right)\right)\right) \]
      12. hypot-lowering-hypot.f6443.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. Simplified43.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-rr43.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 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 41.7% accurate, 3.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;B\_m \leq 1.28 \cdot 10^{-55}:\\
\;\;\;\;\frac{\frac{1}{{\left(C \cdot \left(F \cdot \left(-16 \cdot \left(A \cdot C\right)\right)\right)\right)}^{-0.5}}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\

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


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

    1. Initial program 21.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.27999999999999994e-55 < B

    1. Initial program 15.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 33.4% accurate, 5.0× speedup?

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

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


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

    1. Initial program 21.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.35000000000000002e-55 < B

    1. Initial program 15.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 33.3% accurate, 5.1× speedup?

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

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


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

    1. Initial program 21.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.27999999999999994e-55 < B

    1. Initial program 15.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 33.4% accurate, 5.2× speedup?

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

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


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

    1. Initial program 21.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(\mathsf{*.f64}\left(F, \mathsf{*.f64}\left(C, A\right)\right), C\right)\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(C, \color{blue}{A}\right)\right)\right) \]
    12. Simplified17.8%

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

    if 1.27999999999999994e-55 < B

    1. Initial program 15.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 33.4% accurate, 5.2× speedup?

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

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


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

    1. Initial program 21.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(-16, \mathsf{*.f64}\left(\mathsf{*.f64}\left(F, \mathsf{*.f64}\left(C, A\right)\right), C\right)\right)\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(C, \color{blue}{A}\right)\right)\right) \]
    12. Simplified17.8%

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

    if 1.35999999999999993e-55 < B

    1. Initial program 15.4%

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 27.6% accurate, 5.2× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if C < 1.79999999999999996e94

    1. Initial program 23.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.79999999999999996e94 < C

    1. Initial program 1.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.f646.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. Simplified6.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-rr6.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 27.5% accurate, 5.3× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if C < 1.35e93

    1. Initial program 23.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-\frac{{\left(2 \cdot \left(F \cdot \left(C - \mathsf{hypot}\left(B, C\right)\right)\right)\right)}^{0.5}}{B}} \]
    8. 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-*.f6413.7%

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

      \[\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(\mathsf{*.f64}\left(\color{blue}{\left(C - B\right)}, \mathsf{*.f64}\left(2, F\right)\right)\right), B\right)\right) \]
    11. Step-by-step derivation
      1. --lowering--.f6413.0%

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

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

    if 1.35e93 < C

    1. Initial program 1.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.f646.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. Simplified6.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-rr6.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 27.6% accurate, 5.3× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if C < 7.2e90

    1. Initial program 23.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-\frac{{\left(2 \cdot \left(F \cdot \left(C - \mathsf{hypot}\left(B, C\right)\right)\right)\right)}^{0.5}}{B}} \]
    8. 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-*.f6413.7%

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

      \[\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(\mathsf{*.f64}\left(\color{blue}{\left(C - B\right)}, \mathsf{*.f64}\left(2, F\right)\right)\right), B\right)\right) \]
    11. Step-by-step derivation
      1. --lowering--.f6413.0%

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

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

    if 7.2e90 < C

    1. Initial program 1.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.f646.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. Simplified6.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. Taylor expanded in C around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 27.4% accurate, 5.4× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if C < 5.29999999999999997e91

    1. Initial program 23.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-\frac{{\left(2 \cdot \left(F \cdot \left(C - \mathsf{hypot}\left(B, C\right)\right)\right)\right)}^{0.5}}{B}} \]
    8. 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-*.f6413.7%

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

      \[\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(\mathsf{*.f64}\left(\color{blue}{\left(C - B\right)}, \mathsf{*.f64}\left(2, F\right)\right)\right), B\right)\right) \]
    11. Step-by-step derivation
      1. --lowering--.f6413.0%

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

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

    if 5.29999999999999997e91 < C

    1. Initial program 1.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.f646.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. Simplified6.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-rr6.4%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto -\color{blue}{\frac{\sqrt{\left(C - \mathsf{hypot}\left(C, B\right)\right) \cdot \left(2 \cdot F\right)}}{B}} \]
    10. Taylor expanded in C around 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-*.f6417.2%

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

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

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

Alternative 14: 7.8% accurate, 5.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;C \leq -3.9 \cdot 10^{-98}:\\
\;\;\;\;\frac{\sqrt{4 \cdot \left(C \cdot F\right)}}{0 - B\_m}\\

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


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

    1. Initial program 27.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.f649.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. Simplified9.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-rr9.9%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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(4 \cdot \left(C \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(4, \left(C \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(4, \left(F \cdot C\right)\right)\right), B\right)\right) \]
      3. *-lowering-*.f642.4%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(4, \mathsf{*.f64}\left(F, C\right)\right)\right), B\right)\right) \]
    12. Simplified2.4%

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

    if -3.89999999999999971e-98 < C

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

      \[\leadsto \color{blue}{-1 \cdot \left(\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A - \sqrt{{A}^{2} + {B}^{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(A - \sqrt{{A}^{2} + {B}^{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(A - \sqrt{{A}^{2} + {B}^{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(A - \sqrt{{A}^{2} + {B}^{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(A - \sqrt{{A}^{2} + {B}^{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}{A} - \sqrt{{A}^{2} + {B}^{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(A - \sqrt{{A}^{2} + {B}^{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(A - \sqrt{{A}^{2} + {B}^{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(A, \left(\sqrt{{A}^{2} + {B}^{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(A, \left(\sqrt{A \cdot A + {B}^{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(A, \left(\sqrt{A \cdot A + B \cdot B}\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(A, \left(\mathsf{hypot}\left(A, B\right)\right)\right)\right)\right)\right) \]
      12. hypot-lowering-hypot.f6414.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(A, \mathsf{hypot.f64}\left(A, B\right)\right)\right)\right)\right) \]
    5. Simplified14.4%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(F, A\right)\right), \mathsf{/.f64}\left(-2, \color{blue}{B}\right)\right) \]
    8. Simplified3.0%

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

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

Alternative 15: 26.4% accurate, 5.8× speedup?

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

\\
\frac{\sqrt{F \cdot \left(B\_m \cdot -2\right)}}{0 - B\_m}
\end{array}
Derivation
  1. Initial program 19.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.f6412.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. Simplified12.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-rr12.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 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-*.f6412.5%

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

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

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

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

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

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

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

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

Alternative 16: 4.8% accurate, 5.9× speedup?

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

\\
\sqrt{A \cdot F} \cdot \frac{-2}{B\_m}
\end{array}
Derivation
  1. Initial program 19.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 C around 0

    \[\leadsto \color{blue}{-1 \cdot \left(\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A - \sqrt{{A}^{2} + {B}^{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(A - \sqrt{{A}^{2} + {B}^{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(A - \sqrt{{A}^{2} + {B}^{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(A - \sqrt{{A}^{2} + {B}^{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(A - \sqrt{{A}^{2} + {B}^{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}{A} - \sqrt{{A}^{2} + {B}^{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(A - \sqrt{{A}^{2} + {B}^{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(A - \sqrt{{A}^{2} + {B}^{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(A, \left(\sqrt{{A}^{2} + {B}^{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(A, \left(\sqrt{A \cdot A + {B}^{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(A, \left(\sqrt{A \cdot A + B \cdot B}\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(A, \left(\mathsf{hypot}\left(A, B\right)\right)\right)\right)\right)\right) \]
    12. hypot-lowering-hypot.f6413.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(A, \mathsf{hypot.f64}\left(A, B\right)\right)\right)\right)\right) \]
  5. Simplified13.1%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\sqrt{F \cdot A} \cdot \frac{-2}{B}} \]
  9. Final simplification2.4%

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

Reproduce

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