ABCF->ab-angle a

Percentage Accurate: 19.7% → 55.5%
Time: 41.8s
Alternatives: 17
Speedup: 3.1×

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 17 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.7% 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: 55.5% accurate, 0.2× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ \begin{array}{l} t_0 := C \cdot \left(4 \cdot A\right)\\ t_1 := A \cdot \left(C \cdot -4\right)\\ t_2 := \mathsf{hypot}\left(B\_m, A - C\right)\\ t_3 := t\_0 - {B\_m}^{2}\\ t_4 := \mathsf{fma}\left(B\_m, B\_m, t\_1\right)\\ t_5 := {B\_m}^{2} - t\_0\\ t_6 := 2 \cdot \left(F \cdot t\_5\right)\\ t_7 := \frac{\sqrt{t\_6 \cdot \left(\left(A + C\right) + \sqrt{{B\_m}^{2} + {\left(A - C\right)}^{2}}\right)}}{t\_3}\\ \mathbf{if}\;t\_7 \leq -1 \cdot 10^{+204}:\\ \;\;\;\;\frac{\mathsf{hypot}\left(B\_m, \sqrt{t\_1}\right) \cdot \left(\sqrt{C + \left(A + t\_2\right)} \cdot \sqrt{2 \cdot F}\right)}{-t\_4}\\ \mathbf{elif}\;t\_7 \leq -5 \cdot 10^{-219}:\\ \;\;\;\;\frac{-1}{\frac{t\_5}{\sqrt{2 \cdot \left(t\_5 \cdot \left(F \cdot \left(\left(A + C\right) + t\_2\right)\right)\right)}}}\\ \mathbf{elif}\;t\_7 \leq 10^{-68}:\\ \;\;\;\;\frac{\sqrt{t\_6 \cdot \left(-0.5 \cdot \frac{{B\_m}^{2}}{A} + 2 \cdot C\right)}}{t\_3}\\ \mathbf{elif}\;t\_7 \leq \infty:\\ \;\;\;\;\frac{\sqrt{\left(2 \cdot F\right) \cdot t\_4} \cdot \left(-\sqrt{\left(A + C\right) + \mathsf{hypot}\left(A - C, B\_m\right)}\right)}{t\_4}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B\_m} \cdot \left(\sqrt{C + \mathsf{hypot}\left(B\_m, C\right)} \cdot \left(-\sqrt{F}\right)\right)\\ \end{array} \end{array} \]
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
 :precision binary64
 (let* ((t_0 (* C (* 4.0 A)))
        (t_1 (* A (* C -4.0)))
        (t_2 (hypot B_m (- A C)))
        (t_3 (- t_0 (pow B_m 2.0)))
        (t_4 (fma B_m B_m t_1))
        (t_5 (- (pow B_m 2.0) t_0))
        (t_6 (* 2.0 (* F t_5)))
        (t_7
         (/
          (sqrt (* t_6 (+ (+ A C) (sqrt (+ (pow B_m 2.0) (pow (- A C) 2.0))))))
          t_3)))
   (if (<= t_7 -1e+204)
     (/
      (* (hypot B_m (sqrt t_1)) (* (sqrt (+ C (+ A t_2))) (sqrt (* 2.0 F))))
      (- t_4))
     (if (<= t_7 -5e-219)
       (/ -1.0 (/ t_5 (sqrt (* 2.0 (* t_5 (* F (+ (+ A C) t_2)))))))
       (if (<= t_7 1e-68)
         (/ (sqrt (* t_6 (+ (* -0.5 (/ (pow B_m 2.0) A)) (* 2.0 C)))) t_3)
         (if (<= t_7 INFINITY)
           (/
            (*
             (sqrt (* (* 2.0 F) t_4))
             (- (sqrt (+ (+ A C) (hypot (- A C) B_m)))))
            t_4)
           (*
            (/ (sqrt 2.0) B_m)
            (* (sqrt (+ C (hypot B_m C))) (- (sqrt F))))))))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
	double t_0 = C * (4.0 * A);
	double t_1 = A * (C * -4.0);
	double t_2 = hypot(B_m, (A - C));
	double t_3 = t_0 - pow(B_m, 2.0);
	double t_4 = fma(B_m, B_m, t_1);
	double t_5 = pow(B_m, 2.0) - t_0;
	double t_6 = 2.0 * (F * t_5);
	double t_7 = sqrt((t_6 * ((A + C) + sqrt((pow(B_m, 2.0) + pow((A - C), 2.0)))))) / t_3;
	double tmp;
	if (t_7 <= -1e+204) {
		tmp = (hypot(B_m, sqrt(t_1)) * (sqrt((C + (A + t_2))) * sqrt((2.0 * F)))) / -t_4;
	} else if (t_7 <= -5e-219) {
		tmp = -1.0 / (t_5 / sqrt((2.0 * (t_5 * (F * ((A + C) + t_2))))));
	} else if (t_7 <= 1e-68) {
		tmp = sqrt((t_6 * ((-0.5 * (pow(B_m, 2.0) / A)) + (2.0 * C)))) / t_3;
	} else if (t_7 <= ((double) INFINITY)) {
		tmp = (sqrt(((2.0 * F) * t_4)) * -sqrt(((A + C) + hypot((A - C), B_m)))) / t_4;
	} else {
		tmp = (sqrt(2.0) / B_m) * (sqrt((C + hypot(B_m, C))) * -sqrt(F));
	}
	return tmp;
}
B_m = abs(B)
function code(A, B_m, C, F)
	t_0 = Float64(C * Float64(4.0 * A))
	t_1 = Float64(A * Float64(C * -4.0))
	t_2 = hypot(B_m, Float64(A - C))
	t_3 = Float64(t_0 - (B_m ^ 2.0))
	t_4 = fma(B_m, B_m, t_1)
	t_5 = Float64((B_m ^ 2.0) - t_0)
	t_6 = Float64(2.0 * Float64(F * t_5))
	t_7 = Float64(sqrt(Float64(t_6 * Float64(Float64(A + C) + sqrt(Float64((B_m ^ 2.0) + (Float64(A - C) ^ 2.0)))))) / t_3)
	tmp = 0.0
	if (t_7 <= -1e+204)
		tmp = Float64(Float64(hypot(B_m, sqrt(t_1)) * Float64(sqrt(Float64(C + Float64(A + t_2))) * sqrt(Float64(2.0 * F)))) / Float64(-t_4));
	elseif (t_7 <= -5e-219)
		tmp = Float64(-1.0 / Float64(t_5 / sqrt(Float64(2.0 * Float64(t_5 * Float64(F * Float64(Float64(A + C) + t_2)))))));
	elseif (t_7 <= 1e-68)
		tmp = Float64(sqrt(Float64(t_6 * Float64(Float64(-0.5 * Float64((B_m ^ 2.0) / A)) + Float64(2.0 * C)))) / t_3);
	elseif (t_7 <= Inf)
		tmp = Float64(Float64(sqrt(Float64(Float64(2.0 * F) * t_4)) * Float64(-sqrt(Float64(Float64(A + C) + hypot(Float64(A - C), B_m))))) / t_4);
	else
		tmp = Float64(Float64(sqrt(2.0) / B_m) * Float64(sqrt(Float64(C + hypot(B_m, C))) * Float64(-sqrt(F))));
	end
	return tmp
end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(C * N[(4.0 * A), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(A * N[(C * -4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]}, Block[{t$95$3 = N[(t$95$0 - N[Power[B$95$m, 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(B$95$m * B$95$m + t$95$1), $MachinePrecision]}, Block[{t$95$5 = N[(N[Power[B$95$m, 2.0], $MachinePrecision] - t$95$0), $MachinePrecision]}, Block[{t$95$6 = N[(2.0 * N[(F * t$95$5), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[(N[Sqrt[N[(t$95$6 * 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] / t$95$3), $MachinePrecision]}, If[LessEqual[t$95$7, -1e+204], N[(N[(N[Sqrt[B$95$m ^ 2 + N[Sqrt[t$95$1], $MachinePrecision] ^ 2], $MachinePrecision] * N[(N[Sqrt[N[(C + N[(A + t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(2.0 * F), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / (-t$95$4)), $MachinePrecision], If[LessEqual[t$95$7, -5e-219], N[(-1.0 / N[(t$95$5 / N[Sqrt[N[(2.0 * N[(t$95$5 * N[(F * N[(N[(A + C), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$7, 1e-68], N[(N[Sqrt[N[(t$95$6 * N[(N[(-0.5 * N[(N[Power[B$95$m, 2.0], $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision] + N[(2.0 * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$3), $MachinePrecision], If[LessEqual[t$95$7, Infinity], N[(N[(N[Sqrt[N[(N[(2.0 * F), $MachinePrecision] * t$95$4), $MachinePrecision]], $MachinePrecision] * (-N[Sqrt[N[(N[(A + C), $MachinePrecision] + N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B$95$m ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision] / t$95$4), $MachinePrecision], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B$95$m), $MachinePrecision] * N[(N[Sqrt[N[(C + N[Sqrt[B$95$m ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-N[Sqrt[F], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]
\begin{array}{l}
B_m = \left|B\right|

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

\mathbf{elif}\;t\_7 \leq -5 \cdot 10^{-219}:\\
\;\;\;\;\frac{-1}{\frac{t\_5}{\sqrt{2 \cdot \left(t\_5 \cdot \left(F \cdot \left(\left(A + C\right) + t\_2\right)\right)\right)}}}\\

\mathbf{elif}\;t\_7 \leq 10^{-68}:\\
\;\;\;\;\frac{\sqrt{t\_6 \cdot \left(-0.5 \cdot \frac{{B\_m}^{2}}{A} + 2 \cdot C\right)}}{t\_3}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 2 (*.f64 (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C)) F)) (+.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))))) (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C))) < -9.99999999999999989e203

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

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

        \[\leadsto \frac{\color{blue}{{\left(\left(\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(F \cdot 2\right)\right) \cdot \left(\left(A + C\right) + \mathsf{hypot}\left(B, A - C\right)\right)\right)}^{0.5}}}{-\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]
      2. associate-*l*16.0%

        \[\leadsto \frac{{\color{blue}{\left(\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(\left(F \cdot 2\right) \cdot \left(\left(A + C\right) + \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)}}^{0.5}}{-\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]
      3. unpow-prod-down37.8%

        \[\leadsto \frac{\color{blue}{{\left(\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\right)}^{0.5} \cdot {\left(\left(F \cdot 2\right) \cdot \left(\left(A + C\right) + \mathsf{hypot}\left(B, A - C\right)\right)\right)}^{0.5}}}{-\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]
      4. pow1/237.8%

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

        \[\leadsto \frac{\sqrt{\color{blue}{B \cdot B + A \cdot \left(C \cdot -4\right)}} \cdot {\left(\left(F \cdot 2\right) \cdot \left(\left(A + C\right) + \mathsf{hypot}\left(B, A - C\right)\right)\right)}^{0.5}}{-\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]
      6. add-sqr-sqrt30.9%

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

        \[\leadsto \frac{\color{blue}{\mathsf{hypot}\left(B, \sqrt{A \cdot \left(C \cdot -4\right)}\right)} \cdot {\left(\left(F \cdot 2\right) \cdot \left(\left(A + C\right) + \mathsf{hypot}\left(B, A - C\right)\right)\right)}^{0.5}}{-\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]
    5. Applied egg-rr30.9%

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

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

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

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

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

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

        \[\leadsto \frac{\mathsf{hypot}\left(B, \sqrt{A \cdot \left(C \cdot -4\right)}\right) \cdot \sqrt{\left(\left(C + A\right) + \sqrt{\color{blue}{{\left(A - C\right)}^{2}} + B \cdot B}\right) \cdot \left(2 \cdot F\right)}}{-\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]
      7. unpow211.5%

        \[\leadsto \frac{\mathsf{hypot}\left(B, \sqrt{A \cdot \left(C \cdot -4\right)}\right) \cdot \sqrt{\left(\left(C + A\right) + \sqrt{{\left(A - C\right)}^{2} + \color{blue}{{B}^{2}}}\right) \cdot \left(2 \cdot F\right)}}{-\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]
      8. +-commutative11.5%

        \[\leadsto \frac{\mathsf{hypot}\left(B, \sqrt{A \cdot \left(C \cdot -4\right)}\right) \cdot \sqrt{\left(\left(C + A\right) + \sqrt{\color{blue}{{B}^{2} + {\left(A - C\right)}^{2}}}\right) \cdot \left(2 \cdot F\right)}}{-\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]
      9. unpow211.5%

        \[\leadsto \frac{\mathsf{hypot}\left(B, \sqrt{A \cdot \left(C \cdot -4\right)}\right) \cdot \sqrt{\left(\left(C + A\right) + \sqrt{\color{blue}{B \cdot B} + {\left(A - C\right)}^{2}}\right) \cdot \left(2 \cdot F\right)}}{-\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]
      10. unpow211.5%

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

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

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

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

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

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

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

    if -9.99999999999999989e203 < (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 2 (*.f64 (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C)) F)) (+.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))))) (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C))) < -5.0000000000000002e-219

    1. Initial program 99.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. Step-by-step derivation
      1. clear-num99.0%

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

        \[\leadsto \color{blue}{{\left(\frac{{B}^{2} - \left(4 \cdot A\right) \cdot C}{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot 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)}^{-1}} \]
    4. Applied egg-rr99.0%

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.0000000000000002e-219 < (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 2 (*.f64 (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C)) F)) (+.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))))) (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C))) < 1.00000000000000007e-68

    1. Initial program 5.6%

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

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

    if 1.00000000000000007e-68 < (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 2 (*.f64 (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C)) F)) (+.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))))) (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C))) < +inf.0

    1. Initial program 47.6%

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

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

        \[\leadsto \frac{\color{blue}{{\left(\left(\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(F \cdot 2\right)\right) \cdot \left(\left(A + C\right) + \mathsf{hypot}\left(B, A - C\right)\right)\right)}^{0.5}}}{-\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]
      2. *-commutative64.7%

        \[\leadsto \frac{{\color{blue}{\left(\left(\left(A + C\right) + \mathsf{hypot}\left(B, A - C\right)\right) \cdot \left(\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(F \cdot 2\right)\right)\right)}}^{0.5}}{-\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]
      3. unpow-prod-down81.5%

        \[\leadsto \frac{\color{blue}{{\left(\left(A + C\right) + \mathsf{hypot}\left(B, A - C\right)\right)}^{0.5} \cdot {\left(\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(F \cdot 2\right)\right)}^{0.5}}}{-\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]
      4. pow1/281.5%

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

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

        \[\leadsto \frac{\sqrt{\color{blue}{\sqrt{B \cdot B + \left(A - C\right) \cdot \left(A - C\right)}} + \left(A + C\right)} \cdot {\left(\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(F \cdot 2\right)\right)}^{0.5}}{-\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]
      7. unpow250.8%

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

        \[\leadsto \frac{\sqrt{\sqrt{{B}^{2} + \color{blue}{{\left(A - C\right)}^{2}}} + \left(A + C\right)} \cdot {\left(\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(F \cdot 2\right)\right)}^{0.5}}{-\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]
      9. +-commutative50.8%

        \[\leadsto \frac{\sqrt{\sqrt{\color{blue}{{\left(A - C\right)}^{2} + {B}^{2}}} + \left(A + C\right)} \cdot {\left(\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(F \cdot 2\right)\right)}^{0.5}}{-\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]
      10. unpow250.8%

        \[\leadsto \frac{\sqrt{\sqrt{\color{blue}{\left(A - C\right) \cdot \left(A - C\right)} + {B}^{2}} + \left(A + C\right)} \cdot {\left(\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(F \cdot 2\right)\right)}^{0.5}}{-\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]
      11. unpow250.8%

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

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

        \[\leadsto \frac{\sqrt{\mathsf{hypot}\left(A - C, B\right) + \left(A + C\right)} \cdot \color{blue}{\sqrt{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(F \cdot 2\right)}}}{-\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]
      14. *-commutative81.5%

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

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

    if +inf.0 < (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 2 (*.f64 (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C)) F)) (+.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))))) (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 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 1.8%

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

        \[\leadsto \color{blue}{-\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{{B}^{2} + {C}^{2}}\right)}} \]
      2. unpow21.8%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{\color{blue}{B \cdot B} + {C}^{2}}\right)} \]
      3. unpow21.8%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{B \cdot B + \color{blue}{C \cdot C}}\right)} \]
      4. hypot-define16.3%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \color{blue}{\mathsf{hypot}\left(B, C\right)}\right)} \]
    5. Simplified16.3%

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

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

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot {\color{blue}{\left(\left(C + \mathsf{hypot}\left(B, C\right)\right) \cdot F\right)}}^{0.5} \]
      3. unpow-prod-down25.6%

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

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \left(\color{blue}{\sqrt{C + \mathsf{hypot}\left(B, C\right)}} \cdot {F}^{0.5}\right) \]
      5. pow1/225.6%

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

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

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

Alternative 2: 51.8% accurate, 0.7× speedup?

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

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

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

\mathbf{elif}\;{B\_m}^{2} \leq 5 \cdot 10^{+238}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (pow.f64 B 2) < 2.0000000000000001e-54 or 5.00000000000000007e121 < (pow.f64 B 2) < 4.99999999999999995e238

    1. Initial program 22.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. Step-by-step derivation
      1. associate-+l+23.0%

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

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

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

        \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \mathsf{fma}\left(\color{blue}{{\left(\sqrt[3]{A}\right)}^{2}}, \sqrt[3]{A}, C + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
      5. unpow223.1%

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

        \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \mathsf{fma}\left({\left(\sqrt[3]{A}\right)}^{2}, \sqrt[3]{A}, C + \sqrt{\left(A - C\right) \cdot \left(A - C\right) + \color{blue}{B \cdot B}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
      7. hypot-define30.9%

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

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

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

        \[\leadsto \frac{-{\color{blue}{\left(\mathsf{fma}\left({\left(\sqrt[3]{A}\right)}^{2}, \sqrt[3]{A}, C + \mathsf{hypot}\left(A - C, B\right)\right) \cdot \left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right)\right)}}^{0.5}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
      3. unpow-prod-down41.1%

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

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

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

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

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

        \[\leadsto \frac{-\sqrt{A + \left(C + \mathsf{hypot}\left(A - C, B\right)\right)} \cdot \color{blue}{\sqrt{2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)}}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
      9. associate-*r*41.3%

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

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

    if 2.0000000000000001e-54 < (pow.f64 B 2) < 5.00000000000000007e121

    1. Initial program 32.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. Simplified32.9%

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

        \[\leadsto \frac{\color{blue}{{\left(F \cdot \left(\left(\left(A + C\right) + \mathsf{hypot}\left(B, A - C\right)\right) \cdot \left(2 \cdot \mathsf{fma}\left(A, C \cdot -4, {B}^{2}\right)\right)\right)\right)}^{0.5}}}{4 \cdot \left(A \cdot C\right) - {B}^{2}} \]
      2. *-commutative32.9%

        \[\leadsto \frac{{\color{blue}{\left(\left(\left(\left(A + C\right) + \mathsf{hypot}\left(B, A - C\right)\right) \cdot \left(2 \cdot \mathsf{fma}\left(A, C \cdot -4, {B}^{2}\right)\right)\right) \cdot F\right)}}^{0.5}}{4 \cdot \left(A \cdot C\right) - {B}^{2}} \]
      3. unpow-prod-down46.7%

        \[\leadsto \frac{\color{blue}{{\left(\left(\left(A + C\right) + \mathsf{hypot}\left(B, A - C\right)\right) \cdot \left(2 \cdot \mathsf{fma}\left(A, C \cdot -4, {B}^{2}\right)\right)\right)}^{0.5} \cdot {F}^{0.5}}}{4 \cdot \left(A \cdot C\right) - {B}^{2}} \]
    5. Applied egg-rr46.7%

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

    if 4.99999999999999995e238 < (pow.f64 B 2)

    1. Initial program 1.5%

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

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

        \[\leadsto \color{blue}{-\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{{B}^{2} + {C}^{2}}\right)}} \]
      2. unpow21.8%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{\color{blue}{B \cdot B} + {C}^{2}}\right)} \]
      3. unpow21.8%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{B \cdot B + \color{blue}{C \cdot C}}\right)} \]
      4. hypot-define22.8%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \color{blue}{\mathsf{hypot}\left(B, C\right)}\right)} \]
    5. Simplified22.8%

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

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \color{blue}{{\left(F \cdot \left(C + \mathsf{hypot}\left(B, C\right)\right)\right)}^{0.5}} \]
      2. *-commutative22.8%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot {\color{blue}{\left(\left(C + \mathsf{hypot}\left(B, C\right)\right) \cdot F\right)}}^{0.5} \]
      3. unpow-prod-down35.7%

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

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \left(\color{blue}{\sqrt{C + \mathsf{hypot}\left(B, C\right)}} \cdot {F}^{0.5}\right) \]
      5. pow1/235.7%

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

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

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

Alternative 3: 43.5% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;{B\_m}^{2} \leq 5 \cdot 10^{-160}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;{B\_m}^{2} \leq 4 \cdot 10^{-27}:\\
\;\;\;\;\frac{\sqrt{t\_4 \cdot t\_2}}{t\_1}\\

\mathbf{elif}\;{B\_m}^{2} \leq 2 \cdot 10^{+39}:\\
\;\;\;\;t\_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (pow.f64 B 2) < 4.00000000000000011e-306

    1. Initial program 21.7%

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

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

    if 4.00000000000000011e-306 < (pow.f64 B 2) < 4.99999999999999994e-160 or 4.0000000000000002e-27 < (pow.f64 B 2) < 1.99999999999999988e39

    1. Initial program 16.6%

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

      \[\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. mul-1-neg7.2%

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

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{\color{blue}{B \cdot B} + {C}^{2}}\right)} \]
      3. unpow27.2%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{B \cdot B + \color{blue}{C \cdot C}}\right)} \]
      4. hypot-define7.5%

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

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

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

    if 4.99999999999999994e-160 < (pow.f64 B 2) < 4.0000000000000002e-27

    1. Initial program 37.7%

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

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

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

        \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(C + \sqrt{B \cdot B + \color{blue}{C \cdot C}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
      3. hypot-define35.7%

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

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

    if 1.99999999999999988e39 < (pow.f64 B 2)

    1. Initial program 9.5%

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

        \[\leadsto \color{blue}{-\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{{B}^{2} + {C}^{2}}\right)}} \]
      2. unpow27.0%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{\color{blue}{B \cdot B} + {C}^{2}}\right)} \]
      3. unpow27.0%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{B \cdot B + \color{blue}{C \cdot C}}\right)} \]
      4. hypot-define21.5%

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

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

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \color{blue}{{\left(F \cdot \left(C + \mathsf{hypot}\left(B, C\right)\right)\right)}^{0.5}} \]
      2. *-commutative21.5%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot {\color{blue}{\left(\left(C + \mathsf{hypot}\left(B, C\right)\right) \cdot F\right)}}^{0.5} \]
      3. unpow-prod-down31.3%

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

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \left(\color{blue}{\sqrt{C + \mathsf{hypot}\left(B, C\right)}} \cdot {F}^{0.5}\right) \]
      5. pow1/231.3%

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

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

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

Alternative 4: 44.7% accurate, 0.8× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ \begin{array}{l} t_0 := \mathsf{fma}\left(B\_m, B\_m, A \cdot \left(C \cdot -4\right)\right)\\ t_1 := \frac{\sqrt{\left(\left(2 \cdot F\right) \cdot t\_0\right) \cdot \left(\left(A + C\right) + \mathsf{hypot}\left(B\_m, A - C\right)\right)}}{-t\_0}\\ t_2 := \sqrt{F \cdot \left(-0.5 \cdot \frac{{B\_m}^{2}}{C}\right)} \cdot \frac{\sqrt{2}}{-B\_m}\\ \mathbf{if}\;{B\_m}^{2} \leq 5 \cdot 10^{-296}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;{B\_m}^{2} \leq 5 \cdot 10^{-160}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;{B\_m}^{2} \leq 4 \cdot 10^{-27}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;{B\_m}^{2} \leq 2 \cdot 10^{+39}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B\_m} \cdot \left(\sqrt{C + \mathsf{hypot}\left(B\_m, C\right)} \cdot \left(-\sqrt{F}\right)\right)\\ \end{array} \end{array} \]
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
 :precision binary64
 (let* ((t_0 (fma B_m B_m (* A (* C -4.0))))
        (t_1
         (/
          (sqrt (* (* (* 2.0 F) t_0) (+ (+ A C) (hypot B_m (- A C)))))
          (- t_0)))
        (t_2
         (* (sqrt (* F (* -0.5 (/ (pow B_m 2.0) C)))) (/ (sqrt 2.0) (- B_m)))))
   (if (<= (pow B_m 2.0) 5e-296)
     t_1
     (if (<= (pow B_m 2.0) 5e-160)
       t_2
       (if (<= (pow B_m 2.0) 4e-27)
         t_1
         (if (<= (pow B_m 2.0) 2e+39)
           t_2
           (*
            (/ (sqrt 2.0) B_m)
            (* (sqrt (+ C (hypot B_m C))) (- (sqrt F))))))))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
	double t_0 = fma(B_m, B_m, (A * (C * -4.0)));
	double t_1 = sqrt((((2.0 * F) * t_0) * ((A + C) + hypot(B_m, (A - C))))) / -t_0;
	double t_2 = sqrt((F * (-0.5 * (pow(B_m, 2.0) / C)))) * (sqrt(2.0) / -B_m);
	double tmp;
	if (pow(B_m, 2.0) <= 5e-296) {
		tmp = t_1;
	} else if (pow(B_m, 2.0) <= 5e-160) {
		tmp = t_2;
	} else if (pow(B_m, 2.0) <= 4e-27) {
		tmp = t_1;
	} else if (pow(B_m, 2.0) <= 2e+39) {
		tmp = t_2;
	} else {
		tmp = (sqrt(2.0) / B_m) * (sqrt((C + hypot(B_m, C))) * -sqrt(F));
	}
	return tmp;
}
B_m = abs(B)
function code(A, B_m, C, F)
	t_0 = fma(B_m, B_m, Float64(A * Float64(C * -4.0)))
	t_1 = Float64(sqrt(Float64(Float64(Float64(2.0 * F) * t_0) * Float64(Float64(A + C) + hypot(B_m, Float64(A - C))))) / Float64(-t_0))
	t_2 = Float64(sqrt(Float64(F * Float64(-0.5 * Float64((B_m ^ 2.0) / C)))) * Float64(sqrt(2.0) / Float64(-B_m)))
	tmp = 0.0
	if ((B_m ^ 2.0) <= 5e-296)
		tmp = t_1;
	elseif ((B_m ^ 2.0) <= 5e-160)
		tmp = t_2;
	elseif ((B_m ^ 2.0) <= 4e-27)
		tmp = t_1;
	elseif ((B_m ^ 2.0) <= 2e+39)
		tmp = t_2;
	else
		tmp = Float64(Float64(sqrt(2.0) / B_m) * Float64(sqrt(Float64(C + hypot(B_m, C))) * Float64(-sqrt(F))));
	end
	return tmp
end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(B$95$m * B$95$m + N[(A * N[(C * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Sqrt[N[(N[(N[(2.0 * F), $MachinePrecision] * t$95$0), $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]}, Block[{t$95$2 = N[(N[Sqrt[N[(F * N[(-0.5 * N[(N[Power[B$95$m, 2.0], $MachinePrecision] / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] / (-B$95$m)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Power[B$95$m, 2.0], $MachinePrecision], 5e-296], t$95$1, If[LessEqual[N[Power[B$95$m, 2.0], $MachinePrecision], 5e-160], t$95$2, If[LessEqual[N[Power[B$95$m, 2.0], $MachinePrecision], 4e-27], t$95$1, If[LessEqual[N[Power[B$95$m, 2.0], $MachinePrecision], 2e+39], t$95$2, N[(N[(N[Sqrt[2.0], $MachinePrecision] / B$95$m), $MachinePrecision] * N[(N[Sqrt[N[(C + N[Sqrt[B$95$m ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-N[Sqrt[F], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
B_m = \left|B\right|

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

\mathbf{elif}\;{B\_m}^{2} \leq 5 \cdot 10^{-160}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;{B\_m}^{2} \leq 4 \cdot 10^{-27}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;{B\_m}^{2} \leq 2 \cdot 10^{+39}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (pow.f64 B 2) < 5.0000000000000003e-296 or 4.99999999999999994e-160 < (pow.f64 B 2) < 4.0000000000000002e-27

    1. Initial program 27.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. Simplified32.9%

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

    if 5.0000000000000003e-296 < (pow.f64 B 2) < 4.99999999999999994e-160 or 4.0000000000000002e-27 < (pow.f64 B 2) < 1.99999999999999988e39

    1. Initial program 15.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 7.6%

      \[\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. mul-1-neg7.6%

        \[\leadsto \color{blue}{-\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{{B}^{2} + {C}^{2}}\right)}} \]
      2. unpow27.6%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{\color{blue}{B \cdot B} + {C}^{2}}\right)} \]
      3. unpow27.6%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{B \cdot B + \color{blue}{C \cdot C}}\right)} \]
      4. hypot-define7.9%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \color{blue}{\mathsf{hypot}\left(B, C\right)}\right)} \]
    5. Simplified7.9%

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

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

    if 1.99999999999999988e39 < (pow.f64 B 2)

    1. Initial program 9.5%

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

        \[\leadsto \color{blue}{-\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{{B}^{2} + {C}^{2}}\right)}} \]
      2. unpow27.0%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{\color{blue}{B \cdot B} + {C}^{2}}\right)} \]
      3. unpow27.0%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{B \cdot B + \color{blue}{C \cdot C}}\right)} \]
      4. hypot-define21.5%

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

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

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \color{blue}{{\left(F \cdot \left(C + \mathsf{hypot}\left(B, C\right)\right)\right)}^{0.5}} \]
      2. *-commutative21.5%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot {\color{blue}{\left(\left(C + \mathsf{hypot}\left(B, C\right)\right) \cdot F\right)}}^{0.5} \]
      3. unpow-prod-down31.3%

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

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \left(\color{blue}{\sqrt{C + \mathsf{hypot}\left(B, C\right)}} \cdot {F}^{0.5}\right) \]
      5. pow1/231.3%

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

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

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

Alternative 5: 52.8% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (pow.f64 B 2) < 4.99999999999999995e238

    1. Initial program 24.1%

      \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-+l+24.8%

        \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \color{blue}{\left(A + \left(C + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
      2. add-cube-cbrt24.9%

        \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\color{blue}{\left(\sqrt[3]{A} \cdot \sqrt[3]{A}\right) \cdot \sqrt[3]{A}} + \left(C + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
      3. fma-define24.9%

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

        \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \mathsf{fma}\left(\color{blue}{{\left(\sqrt[3]{A}\right)}^{2}}, \sqrt[3]{A}, C + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
      5. unpow224.9%

        \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \mathsf{fma}\left({\left(\sqrt[3]{A}\right)}^{2}, \sqrt[3]{A}, C + \sqrt{\color{blue}{\left(A - C\right) \cdot \left(A - C\right)} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
      6. unpow224.9%

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

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

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

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

        \[\leadsto \frac{-{\color{blue}{\left(\mathsf{fma}\left({\left(\sqrt[3]{A}\right)}^{2}, \sqrt[3]{A}, C + \mathsf{hypot}\left(A - C, B\right)\right) \cdot \left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right)\right)}}^{0.5}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
      3. unpow-prod-down39.9%

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

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

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

        \[\leadsto \frac{-\sqrt{\color{blue}{\left(\sqrt[3]{A} \cdot \sqrt[3]{A}\right)} \cdot \sqrt[3]{A} + \left(C + \mathsf{hypot}\left(A - C, B\right)\right)} \cdot {\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right)}^{0.5}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
      7. add-cube-cbrt40.0%

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

        \[\leadsto \frac{-\sqrt{A + \left(C + \mathsf{hypot}\left(A - C, B\right)\right)} \cdot \color{blue}{\sqrt{2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)}}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
      9. associate-*r*40.1%

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

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

    if 4.99999999999999995e238 < (pow.f64 B 2)

    1. Initial program 1.5%

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

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

        \[\leadsto \color{blue}{-\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{{B}^{2} + {C}^{2}}\right)}} \]
      2. unpow21.8%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{\color{blue}{B \cdot B} + {C}^{2}}\right)} \]
      3. unpow21.8%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{B \cdot B + \color{blue}{C \cdot C}}\right)} \]
      4. hypot-define22.8%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \color{blue}{\mathsf{hypot}\left(B, C\right)}\right)} \]
    5. Simplified22.8%

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

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \color{blue}{{\left(F \cdot \left(C + \mathsf{hypot}\left(B, C\right)\right)\right)}^{0.5}} \]
      2. *-commutative22.8%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot {\color{blue}{\left(\left(C + \mathsf{hypot}\left(B, C\right)\right) \cdot F\right)}}^{0.5} \]
      3. unpow-prod-down35.7%

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

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \left(\color{blue}{\sqrt{C + \mathsf{hypot}\left(B, C\right)}} \cdot {F}^{0.5}\right) \]
      5. pow1/235.7%

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

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

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

Alternative 6: 52.2% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (pow.f64 B 2) < 4.99999999999999995e238

    1. Initial program 24.1%

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

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

        \[\leadsto \frac{\color{blue}{{\left(\left(\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(F \cdot 2\right)\right) \cdot \left(\left(A + C\right) + \mathsf{hypot}\left(B, A - C\right)\right)\right)}^{0.5}}}{-\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]
      2. *-commutative30.3%

        \[\leadsto \frac{{\color{blue}{\left(\left(\left(A + C\right) + \mathsf{hypot}\left(B, A - C\right)\right) \cdot \left(\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(F \cdot 2\right)\right)\right)}}^{0.5}}{-\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]
      3. unpow-prod-down39.1%

        \[\leadsto \frac{\color{blue}{{\left(\left(A + C\right) + \mathsf{hypot}\left(B, A - C\right)\right)}^{0.5} \cdot {\left(\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(F \cdot 2\right)\right)}^{0.5}}}{-\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]
      4. pow1/239.1%

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

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

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

        \[\leadsto \frac{\sqrt{\sqrt{\color{blue}{{B}^{2}} + \left(A - C\right) \cdot \left(A - C\right)} + \left(A + C\right)} \cdot {\left(\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(F \cdot 2\right)\right)}^{0.5}}{-\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]
      8. unpow226.7%

        \[\leadsto \frac{\sqrt{\sqrt{{B}^{2} + \color{blue}{{\left(A - C\right)}^{2}}} + \left(A + C\right)} \cdot {\left(\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(F \cdot 2\right)\right)}^{0.5}}{-\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]
      9. +-commutative26.7%

        \[\leadsto \frac{\sqrt{\sqrt{\color{blue}{{\left(A - C\right)}^{2} + {B}^{2}}} + \left(A + C\right)} \cdot {\left(\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(F \cdot 2\right)\right)}^{0.5}}{-\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]
      10. unpow226.7%

        \[\leadsto \frac{\sqrt{\sqrt{\color{blue}{\left(A - C\right) \cdot \left(A - C\right)} + {B}^{2}} + \left(A + C\right)} \cdot {\left(\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(F \cdot 2\right)\right)}^{0.5}}{-\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]
      11. unpow226.7%

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

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

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

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

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

    if 4.99999999999999995e238 < (pow.f64 B 2)

    1. Initial program 1.5%

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

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

        \[\leadsto \color{blue}{-\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{{B}^{2} + {C}^{2}}\right)}} \]
      2. unpow21.8%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{\color{blue}{B \cdot B} + {C}^{2}}\right)} \]
      3. unpow21.8%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{B \cdot B + \color{blue}{C \cdot C}}\right)} \]
      4. hypot-define22.8%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \color{blue}{\mathsf{hypot}\left(B, C\right)}\right)} \]
    5. Simplified22.8%

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

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \color{blue}{{\left(F \cdot \left(C + \mathsf{hypot}\left(B, C\right)\right)\right)}^{0.5}} \]
      2. *-commutative22.8%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot {\color{blue}{\left(\left(C + \mathsf{hypot}\left(B, C\right)\right) \cdot F\right)}}^{0.5} \]
      3. unpow-prod-down35.7%

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

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \left(\color{blue}{\sqrt{C + \mathsf{hypot}\left(B, C\right)}} \cdot {F}^{0.5}\right) \]
      5. pow1/235.7%

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

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

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

Alternative 7: 45.5% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (pow.f64 B 2) < 4.0000000000000002e-27

    1. Initial program 23.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. Step-by-step derivation
      1. associate-+l+24.8%

        \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \color{blue}{\left(A + \left(C + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
      2. add-cube-cbrt25.0%

        \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\color{blue}{\left(\sqrt[3]{A} \cdot \sqrt[3]{A}\right) \cdot \sqrt[3]{A}} + \left(C + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
      3. fma-define24.9%

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

        \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \mathsf{fma}\left(\color{blue}{{\left(\sqrt[3]{A}\right)}^{2}}, \sqrt[3]{A}, C + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
      5. unpow224.9%

        \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \mathsf{fma}\left({\left(\sqrt[3]{A}\right)}^{2}, \sqrt[3]{A}, C + \sqrt{\color{blue}{\left(A - C\right) \cdot \left(A - C\right)} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
      6. unpow224.9%

        \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \mathsf{fma}\left({\left(\sqrt[3]{A}\right)}^{2}, \sqrt[3]{A}, C + \sqrt{\left(A - C\right) \cdot \left(A - C\right) + \color{blue}{B \cdot B}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
      7. hypot-define30.8%

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

      \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \color{blue}{\mathsf{fma}\left({\left(\sqrt[3]{A}\right)}^{2}, \sqrt[3]{A}, C + \mathsf{hypot}\left(A - C, B\right)\right)}}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
    5. Step-by-step derivation
      1. *-un-lft-identity30.8%

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

      \[\leadsto \color{blue}{1 \cdot \frac{-\sqrt{2 \cdot \left(\left(F \cdot \left({B}^{2} - C \cdot \left(A \cdot 4\right)\right)\right) \cdot \left(A + \left(C + \mathsf{hypot}\left(A - C, B\right)\right)\right)\right)}}{{B}^{2} - C \cdot \left(A \cdot 4\right)}} \]
    7. Step-by-step derivation
      1. *-lft-identity30.8%

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

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

        \[\leadsto \color{blue}{\frac{\sqrt{2 \cdot \left(\left(F \cdot \left({B}^{2} - C \cdot \left(A \cdot 4\right)\right)\right) \cdot \left(A + \left(C + \mathsf{hypot}\left(A - C, B\right)\right)\right)\right)}}{-\left({B}^{2} - C \cdot \left(A \cdot 4\right)\right)}} \]
      4. associate-*l*30.6%

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

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

    if 4.0000000000000002e-27 < (pow.f64 B 2) < 1.99999999999999988e39

    1. Initial program 20.8%

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

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

        \[\leadsto \color{blue}{-\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{{B}^{2} + {C}^{2}}\right)}} \]
      2. unpow28.9%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{\color{blue}{B \cdot B} + {C}^{2}}\right)} \]
      3. unpow28.9%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{B \cdot B + \color{blue}{C \cdot C}}\right)} \]
      4. hypot-define9.8%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \color{blue}{\mathsf{hypot}\left(B, C\right)}\right)} \]
    5. Simplified9.8%

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

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

    if 1.99999999999999988e39 < (pow.f64 B 2)

    1. Initial program 9.5%

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

        \[\leadsto \color{blue}{-\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{{B}^{2} + {C}^{2}}\right)}} \]
      2. unpow27.0%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{\color{blue}{B \cdot B} + {C}^{2}}\right)} \]
      3. unpow27.0%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{B \cdot B + \color{blue}{C \cdot C}}\right)} \]
      4. hypot-define21.5%

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

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

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \color{blue}{{\left(F \cdot \left(C + \mathsf{hypot}\left(B, C\right)\right)\right)}^{0.5}} \]
      2. *-commutative21.5%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot {\color{blue}{\left(\left(C + \mathsf{hypot}\left(B, C\right)\right) \cdot F\right)}}^{0.5} \]
      3. unpow-prod-down31.3%

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

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \left(\color{blue}{\sqrt{C + \mathsf{hypot}\left(B, C\right)}} \cdot {F}^{0.5}\right) \]
      5. pow1/231.3%

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

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

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

Alternative 8: 46.1% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (pow.f64 B 2) < 2e4

    1. Initial program 24.6%

      \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-+l+25.6%

        \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \color{blue}{\left(A + \left(C + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
      2. add-cube-cbrt25.8%

        \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\color{blue}{\left(\sqrt[3]{A} \cdot \sqrt[3]{A}\right) \cdot \sqrt[3]{A}} + \left(C + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
      3. fma-define25.7%

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

        \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \mathsf{fma}\left(\color{blue}{{\left(\sqrt[3]{A}\right)}^{2}}, \sqrt[3]{A}, C + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
      5. unpow225.7%

        \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \mathsf{fma}\left({\left(\sqrt[3]{A}\right)}^{2}, \sqrt[3]{A}, C + \sqrt{\color{blue}{\left(A - C\right) \cdot \left(A - C\right)} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
      6. unpow225.7%

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

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

      \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \color{blue}{\mathsf{fma}\left({\left(\sqrt[3]{A}\right)}^{2}, \sqrt[3]{A}, C + \mathsf{hypot}\left(A - C, B\right)\right)}}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
    5. Step-by-step derivation
      1. div-inv30.8%

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

      \[\leadsto \color{blue}{\left(-\sqrt{2 \cdot \left(\left(F \cdot \left({B}^{2} - C \cdot \left(A \cdot 4\right)\right)\right) \cdot \left(A + \left(C + \mathsf{hypot}\left(A - C, B\right)\right)\right)\right)}\right) \cdot \frac{1}{{B}^{2} - C \cdot \left(A \cdot 4\right)}} \]
    7. Step-by-step derivation
      1. distribute-lft-neg-out30.8%

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

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

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

    if 2e4 < (pow.f64 B 2) < 1.99999999999999988e39

    1. Initial program 11.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 2.6%

      \[\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. mul-1-neg2.6%

        \[\leadsto \color{blue}{-\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{{B}^{2} + {C}^{2}}\right)}} \]
      2. unpow22.6%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{\color{blue}{B \cdot B} + {C}^{2}}\right)} \]
      3. unpow22.6%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{B \cdot B + \color{blue}{C \cdot C}}\right)} \]
      4. hypot-define3.8%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \color{blue}{\mathsf{hypot}\left(B, C\right)}\right)} \]
    5. Simplified3.8%

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

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

    if 1.99999999999999988e39 < (pow.f64 B 2)

    1. Initial program 9.5%

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

        \[\leadsto \color{blue}{-\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{{B}^{2} + {C}^{2}}\right)}} \]
      2. unpow27.0%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{\color{blue}{B \cdot B} + {C}^{2}}\right)} \]
      3. unpow27.0%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{B \cdot B + \color{blue}{C \cdot C}}\right)} \]
      4. hypot-define21.5%

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

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

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \color{blue}{{\left(F \cdot \left(C + \mathsf{hypot}\left(B, C\right)\right)\right)}^{0.5}} \]
      2. *-commutative21.5%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot {\color{blue}{\left(\left(C + \mathsf{hypot}\left(B, C\right)\right) \cdot F\right)}}^{0.5} \]
      3. unpow-prod-down31.3%

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

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \left(\color{blue}{\sqrt{C + \mathsf{hypot}\left(B, C\right)}} \cdot {F}^{0.5}\right) \]
      5. pow1/231.3%

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

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

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

Alternative 9: 44.4% accurate, 1.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if F < -4.999999999999985e-310

    1. Initial program 34.0%

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

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

      \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot \left(A \cdot \left(C \cdot F\right)\right)\right)} \cdot \left(\left(A + C\right) + \mathsf{hypot}\left(B, A - C\right)\right)}}{-\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]
    5. Step-by-step derivation
      1. associate-*r*39.4%

        \[\leadsto \frac{\sqrt{\color{blue}{\left(\left(-8 \cdot A\right) \cdot \left(C \cdot F\right)\right)} \cdot \left(\left(A + C\right) + \mathsf{hypot}\left(B, A - C\right)\right)}}{-\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]
    6. Simplified39.4%

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

    if -4.999999999999985e-310 < F

    1. Initial program 13.9%

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

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

        \[\leadsto \color{blue}{-\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A + \sqrt{{A}^{2} + {B}^{2}}\right)}} \]
      2. +-commutative7.9%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A + \sqrt{\color{blue}{{B}^{2} + {A}^{2}}}\right)} \]
      3. unpow27.9%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A + \sqrt{\color{blue}{B \cdot B} + {A}^{2}}\right)} \]
      4. unpow27.9%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A + \sqrt{B \cdot B + \color{blue}{A \cdot A}}\right)} \]
      5. hypot-define14.8%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A + \color{blue}{\mathsf{hypot}\left(B, A\right)}\right)} \]
    5. Simplified14.8%

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

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \color{blue}{{\left(F \cdot \left(A + \mathsf{hypot}\left(B, A\right)\right)\right)}^{0.5}} \]
      2. *-commutative14.8%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot {\color{blue}{\left(\left(A + \mathsf{hypot}\left(B, A\right)\right) \cdot F\right)}}^{0.5} \]
      3. unpow-prod-down19.7%

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

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \left(\color{blue}{\sqrt{A + \mathsf{hypot}\left(B, A\right)}} \cdot {F}^{0.5}\right) \]
      5. pow1/219.7%

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

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

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

Alternative 10: 44.4% accurate, 1.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if F < -4.999999999999985e-310

    1. Initial program 34.0%

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

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

      \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot \left(A \cdot \left(C \cdot F\right)\right)\right)} \cdot \left(\left(A + C\right) + \mathsf{hypot}\left(B, A - C\right)\right)}}{-\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]
    5. Step-by-step derivation
      1. associate-*r*39.4%

        \[\leadsto \frac{\sqrt{\color{blue}{\left(\left(-8 \cdot A\right) \cdot \left(C \cdot F\right)\right)} \cdot \left(\left(A + C\right) + \mathsf{hypot}\left(B, A - C\right)\right)}}{-\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]
    6. Simplified39.4%

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

    if -4.999999999999985e-310 < F

    1. Initial program 13.9%

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

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

        \[\leadsto \color{blue}{-\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{{B}^{2} + {C}^{2}}\right)}} \]
      2. unpow27.7%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{\color{blue}{B \cdot B} + {C}^{2}}\right)} \]
      3. unpow27.7%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{B \cdot B + \color{blue}{C \cdot C}}\right)} \]
      4. hypot-define15.6%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \color{blue}{\mathsf{hypot}\left(B, C\right)}\right)} \]
    5. Simplified15.6%

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

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \color{blue}{{\left(F \cdot \left(C + \mathsf{hypot}\left(B, C\right)\right)\right)}^{0.5}} \]
      2. *-commutative15.6%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot {\color{blue}{\left(\left(C + \mathsf{hypot}\left(B, C\right)\right) \cdot F\right)}}^{0.5} \]
      3. unpow-prod-down20.9%

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

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \left(\color{blue}{\sqrt{C + \mathsf{hypot}\left(B, C\right)}} \cdot {F}^{0.5}\right) \]
      5. pow1/220.9%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \left(\sqrt{C + \mathsf{hypot}\left(B, C\right)} \cdot \color{blue}{\sqrt{F}}\right) \]
    7. Applied egg-rr20.9%

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

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

Alternative 11: 40.8% accurate, 1.9× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if F < -2.40000000000000022e-302

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

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

      \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot \left(A \cdot \left(C \cdot F\right)\right)\right)} \cdot \left(\left(A + C\right) + \mathsf{hypot}\left(B, A - C\right)\right)}}{-\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]
    5. Step-by-step derivation
      1. associate-*r*40.3%

        \[\leadsto \frac{\sqrt{\color{blue}{\left(\left(-8 \cdot A\right) \cdot \left(C \cdot F\right)\right)} \cdot \left(\left(A + C\right) + \mathsf{hypot}\left(B, A - C\right)\right)}}{-\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]
    6. Simplified40.3%

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

    if -2.40000000000000022e-302 < F < 9.4999999999999994e90

    1. Initial program 15.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 8.5%

      \[\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. mul-1-neg8.5%

        \[\leadsto \color{blue}{-\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{{B}^{2} + {C}^{2}}\right)}} \]
      2. unpow28.5%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{\color{blue}{B \cdot B} + {C}^{2}}\right)} \]
      3. unpow28.5%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{B \cdot B + \color{blue}{C \cdot C}}\right)} \]
      4. hypot-define20.8%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \color{blue}{\mathsf{hypot}\left(B, C\right)}\right)} \]
    5. Simplified20.8%

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

        \[\leadsto -\color{blue}{\frac{\sqrt{2} \cdot \sqrt{F \cdot \left(C + \mathsf{hypot}\left(B, C\right)\right)}}{B}} \]
      2. pow1/220.8%

        \[\leadsto -\frac{\color{blue}{{2}^{0.5}} \cdot \sqrt{F \cdot \left(C + \mathsf{hypot}\left(B, C\right)\right)}}{B} \]
      3. pow1/220.8%

        \[\leadsto -\frac{{2}^{0.5} \cdot \color{blue}{{\left(F \cdot \left(C + \mathsf{hypot}\left(B, C\right)\right)\right)}^{0.5}}}{B} \]
      4. pow-prod-down20.9%

        \[\leadsto -\frac{\color{blue}{{\left(2 \cdot \left(F \cdot \left(C + \mathsf{hypot}\left(B, C\right)\right)\right)\right)}^{0.5}}}{B} \]
    7. Applied egg-rr20.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. unpow1/220.9%

        \[\leadsto -\frac{\color{blue}{\sqrt{2 \cdot \left(F \cdot \left(C + \mathsf{hypot}\left(B, C\right)\right)\right)}}}{B} \]
      2. associate-*r*20.9%

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

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

    if 9.4999999999999994e90 < F

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

      \[\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. mul-1-neg6.3%

        \[\leadsto \color{blue}{-\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{{B}^{2} + {C}^{2}}\right)}} \]
      2. unpow26.3%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{\color{blue}{B \cdot B} + {C}^{2}}\right)} \]
      3. unpow26.3%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{B \cdot B + \color{blue}{C \cdot C}}\right)} \]
      4. hypot-define7.8%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \color{blue}{\mathsf{hypot}\left(B, C\right)}\right)} \]
    5. Simplified7.8%

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

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

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

Alternative 12: 37.9% accurate, 2.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if F < -4.999999999999985e-310

    1. Initial program 34.0%

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

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

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

    if -4.999999999999985e-310 < F < 9.4999999999999994e90

    1. Initial program 15.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 8.6%

      \[\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. mul-1-neg8.6%

        \[\leadsto \color{blue}{-\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{{B}^{2} + {C}^{2}}\right)}} \]
      2. unpow28.6%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{\color{blue}{B \cdot B} + {C}^{2}}\right)} \]
      3. unpow28.6%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{B \cdot B + \color{blue}{C \cdot C}}\right)} \]
      4. hypot-define20.9%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \color{blue}{\mathsf{hypot}\left(B, C\right)}\right)} \]
    5. Simplified20.9%

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

        \[\leadsto -\color{blue}{\frac{\sqrt{2} \cdot \sqrt{F \cdot \left(C + \mathsf{hypot}\left(B, C\right)\right)}}{B}} \]
      2. pow1/220.9%

        \[\leadsto -\frac{\color{blue}{{2}^{0.5}} \cdot \sqrt{F \cdot \left(C + \mathsf{hypot}\left(B, C\right)\right)}}{B} \]
      3. pow1/220.9%

        \[\leadsto -\frac{{2}^{0.5} \cdot \color{blue}{{\left(F \cdot \left(C + \mathsf{hypot}\left(B, C\right)\right)\right)}^{0.5}}}{B} \]
      4. pow-prod-down21.0%

        \[\leadsto -\frac{\color{blue}{{\left(2 \cdot \left(F \cdot \left(C + \mathsf{hypot}\left(B, C\right)\right)\right)\right)}^{0.5}}}{B} \]
    7. Applied egg-rr21.0%

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

        \[\leadsto -\frac{\color{blue}{\sqrt{2 \cdot \left(F \cdot \left(C + \mathsf{hypot}\left(B, C\right)\right)\right)}}}{B} \]
      2. associate-*r*21.0%

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

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

    if 9.4999999999999994e90 < F

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

      \[\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. mul-1-neg6.3%

        \[\leadsto \color{blue}{-\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{{B}^{2} + {C}^{2}}\right)}} \]
      2. unpow26.3%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{\color{blue}{B \cdot B} + {C}^{2}}\right)} \]
      3. unpow26.3%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{B \cdot B + \color{blue}{C \cdot C}}\right)} \]
      4. hypot-define7.8%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \color{blue}{\mathsf{hypot}\left(B, C\right)}\right)} \]
    5. Simplified7.8%

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

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

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

Alternative 13: 37.8% accurate, 2.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if F < -4.999999999999985e-310

    1. Initial program 34.0%

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

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

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

        \[\leadsto \frac{\sqrt{\color{blue}{\left(-16 \cdot A\right) \cdot \left({C}^{2} \cdot F\right)}}}{4 \cdot \left(A \cdot C\right) - {B}^{2}} \]
    6. Simplified18.6%

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

    if -4.999999999999985e-310 < F < 1.2500000000000001e91

    1. Initial program 15.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 8.6%

      \[\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. mul-1-neg8.6%

        \[\leadsto \color{blue}{-\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{{B}^{2} + {C}^{2}}\right)}} \]
      2. unpow28.6%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{\color{blue}{B \cdot B} + {C}^{2}}\right)} \]
      3. unpow28.6%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{B \cdot B + \color{blue}{C \cdot C}}\right)} \]
      4. hypot-define20.9%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \color{blue}{\mathsf{hypot}\left(B, C\right)}\right)} \]
    5. Simplified20.9%

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

        \[\leadsto -\color{blue}{\frac{\sqrt{2} \cdot \sqrt{F \cdot \left(C + \mathsf{hypot}\left(B, C\right)\right)}}{B}} \]
      2. pow1/220.9%

        \[\leadsto -\frac{\color{blue}{{2}^{0.5}} \cdot \sqrt{F \cdot \left(C + \mathsf{hypot}\left(B, C\right)\right)}}{B} \]
      3. pow1/220.9%

        \[\leadsto -\frac{{2}^{0.5} \cdot \color{blue}{{\left(F \cdot \left(C + \mathsf{hypot}\left(B, C\right)\right)\right)}^{0.5}}}{B} \]
      4. pow-prod-down21.0%

        \[\leadsto -\frac{\color{blue}{{\left(2 \cdot \left(F \cdot \left(C + \mathsf{hypot}\left(B, C\right)\right)\right)\right)}^{0.5}}}{B} \]
    7. Applied egg-rr21.0%

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

        \[\leadsto -\frac{\color{blue}{\sqrt{2 \cdot \left(F \cdot \left(C + \mathsf{hypot}\left(B, C\right)\right)\right)}}}{B} \]
      2. associate-*r*21.0%

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

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

    if 1.2500000000000001e91 < F

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

      \[\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. mul-1-neg6.3%

        \[\leadsto \color{blue}{-\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{{B}^{2} + {C}^{2}}\right)}} \]
      2. unpow26.3%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{\color{blue}{B \cdot B} + {C}^{2}}\right)} \]
      3. unpow26.3%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{B \cdot B + \color{blue}{C \cdot C}}\right)} \]
      4. hypot-define7.8%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \color{blue}{\mathsf{hypot}\left(B, C\right)}\right)} \]
    5. Simplified7.8%

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

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

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

Alternative 14: 36.4% accurate, 2.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if F < 5.79999999999999986e64

    1. Initial program 20.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 C around 0 6.9%

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

        \[\leadsto \color{blue}{-\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A + \sqrt{{A}^{2} + {B}^{2}}\right)}} \]
      2. +-commutative6.9%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A + \sqrt{\color{blue}{{B}^{2} + {A}^{2}}}\right)} \]
      3. unpow26.9%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A + \sqrt{\color{blue}{B \cdot B} + {A}^{2}}\right)} \]
      4. unpow26.9%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A + \sqrt{B \cdot B + \color{blue}{A \cdot A}}\right)} \]
      5. hypot-define16.0%

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

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

        \[\leadsto -\color{blue}{\frac{\sqrt{2} \cdot \sqrt{F \cdot \left(A + \mathsf{hypot}\left(B, A\right)\right)}}{B}} \]
      2. pow1/216.0%

        \[\leadsto -\frac{\color{blue}{{2}^{0.5}} \cdot \sqrt{F \cdot \left(A + \mathsf{hypot}\left(B, A\right)\right)}}{B} \]
      3. pow1/216.1%

        \[\leadsto -\frac{{2}^{0.5} \cdot \color{blue}{{\left(F \cdot \left(A + \mathsf{hypot}\left(B, A\right)\right)\right)}^{0.5}}}{B} \]
      4. pow-prod-down16.2%

        \[\leadsto -\frac{\color{blue}{{\left(2 \cdot \left(F \cdot \left(A + \mathsf{hypot}\left(B, A\right)\right)\right)\right)}^{0.5}}}{B} \]
    7. Applied egg-rr16.2%

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

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

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

    if 5.79999999999999986e64 < F

    1. Initial program 12.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 6.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. mul-1-neg6.0%

        \[\leadsto \color{blue}{-\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{{B}^{2} + {C}^{2}}\right)}} \]
      2. unpow26.0%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{\color{blue}{B \cdot B} + {C}^{2}}\right)} \]
      3. unpow26.0%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{B \cdot B + \color{blue}{C \cdot C}}\right)} \]
      4. hypot-define7.3%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \color{blue}{\mathsf{hypot}\left(B, C\right)}\right)} \]
    5. Simplified7.3%

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

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

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

Alternative 15: 35.9% accurate, 2.9× speedup?

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

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

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


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

    1. Initial program 19.9%

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

      \[\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. mul-1-neg6.5%

        \[\leadsto \color{blue}{-\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{{B}^{2} + {C}^{2}}\right)}} \]
      2. unpow26.5%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{\color{blue}{B \cdot B} + {C}^{2}}\right)} \]
      3. unpow26.5%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{B \cdot B + \color{blue}{C \cdot C}}\right)} \]
      4. hypot-define15.7%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \color{blue}{\mathsf{hypot}\left(B, C\right)}\right)} \]
    5. Simplified15.7%

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

        \[\leadsto -\color{blue}{\frac{\sqrt{2} \cdot \sqrt{F \cdot \left(C + \mathsf{hypot}\left(B, C\right)\right)}}{B}} \]
      2. pow1/215.8%

        \[\leadsto -\frac{\color{blue}{{2}^{0.5}} \cdot \sqrt{F \cdot \left(C + \mathsf{hypot}\left(B, C\right)\right)}}{B} \]
      3. pow1/215.9%

        \[\leadsto -\frac{{2}^{0.5} \cdot \color{blue}{{\left(F \cdot \left(C + \mathsf{hypot}\left(B, C\right)\right)\right)}^{0.5}}}{B} \]
      4. pow-prod-down16.0%

        \[\leadsto -\frac{\color{blue}{{\left(2 \cdot \left(F \cdot \left(C + \mathsf{hypot}\left(B, C\right)\right)\right)\right)}^{0.5}}}{B} \]
    7. Applied egg-rr16.0%

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

        \[\leadsto -\frac{\color{blue}{\sqrt{2 \cdot \left(F \cdot \left(C + \mathsf{hypot}\left(B, C\right)\right)\right)}}}{B} \]
      2. associate-*r*15.8%

        \[\leadsto -\frac{\sqrt{\color{blue}{\left(2 \cdot F\right) \cdot \left(C + \mathsf{hypot}\left(B, C\right)\right)}}}{B} \]
    9. Simplified15.8%

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

    if 9.4999999999999994e90 < F

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

      \[\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. mul-1-neg6.3%

        \[\leadsto \color{blue}{-\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{{B}^{2} + {C}^{2}}\right)}} \]
      2. unpow26.3%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{\color{blue}{B \cdot B} + {C}^{2}}\right)} \]
      3. unpow26.3%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{B \cdot B + \color{blue}{C \cdot C}}\right)} \]
      4. hypot-define7.8%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \color{blue}{\mathsf{hypot}\left(B, C\right)}\right)} \]
    5. Simplified7.8%

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

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

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

Alternative 16: 33.9% accurate, 3.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if F < 7.49999999999999994e80

    1. Initial program 19.9%

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

      \[\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. mul-1-neg6.6%

        \[\leadsto \color{blue}{-\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{{B}^{2} + {C}^{2}}\right)}} \]
      2. unpow26.6%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{\color{blue}{B \cdot B} + {C}^{2}}\right)} \]
      3. unpow26.6%

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

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

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

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

    if 7.49999999999999994e80 < F

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

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

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

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{\color{blue}{B \cdot B} + {C}^{2}}\right)} \]
      3. unpow26.1%

        \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{B \cdot B + \color{blue}{C \cdot C}}\right)} \]
      4. hypot-define7.5%

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

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

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

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

Alternative 17: 27.6% accurate, 3.1× speedup?

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

\\
\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B\_m}}\right)
\end{array}
Derivation
  1. Initial program 17.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 6.4%

    \[\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. mul-1-neg6.4%

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

      \[\leadsto -\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{\color{blue}{B \cdot B} + {C}^{2}}\right)} \]
    3. unpow26.4%

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

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

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

    \[\leadsto -\color{blue}{\sqrt{\frac{F}{B}} \cdot \sqrt{2}} \]
  7. Final simplification10.9%

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

Reproduce

?
herbie shell --seed 2024044 
(FPCore (A B C F)
  :name "ABCF->ab-angle a"
  :precision binary64
  (/ (- (sqrt (* (* 2.0 (* (- (pow B 2.0) (* (* 4.0 A) C)) F)) (+ (+ A C) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0))))))) (- (pow B 2.0) (* (* 4.0 A) C))))