ABCF->ab-angle a

Percentage Accurate: 18.7% → 56.6%
Time: 46.7s
Alternatives: 17
Speedup: 6.0×

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: 18.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: 56.6% accurate, 0.3× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ \begin{array}{l} t_0 := 4 \cdot \left(A \cdot C\right) - {B\_m}^{2}\\ t_1 := \mathsf{fma}\left(B\_m, B\_m, A \cdot \left(C \cdot -4\right)\right)\\ t_2 := \left(4 \cdot A\right) \cdot C\\ t_3 := \frac{\sqrt{\left(2 \cdot \left(\left({B\_m}^{2} - t\_2\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{B\_m}^{2} + {\left(A - C\right)}^{2}}\right)}}{t\_2 - {B\_m}^{2}}\\ \mathbf{if}\;t\_3 \leq -1 \cdot 10^{-211}:\\ \;\;\;\;\frac{\left(\sqrt{\left(A + C\right) + \mathsf{hypot}\left(B\_m, A - C\right)} \cdot \sqrt{F}\right) \cdot \sqrt{2 \cdot \mathsf{fma}\left(A, C \cdot -4, {B\_m}^{2}\right)}}{t\_0}\\ \mathbf{elif}\;t\_3 \leq 0:\\ \;\;\;\;\frac{\sqrt{\mathsf{fma}\left(-16, A \cdot \left(F \cdot {C}^{2}\right), \mathsf{fma}\left(-2, F \cdot \frac{\mathsf{fma}\left(-2, {B\_m}^{2} \cdot {C}^{2}, 0.5 \cdot {B\_m}^{4}\right)}{A}, 8 \cdot \left(F \cdot \left({B\_m}^{2} \cdot C\right)\right)\right)\right)}}{t\_0}\\ \mathbf{elif}\;t\_3 \leq \infty:\\ \;\;\;\;\frac{\sqrt{\left(A + C\right) + \mathsf{hypot}\left(A - C, B\_m\right)} \cdot \sqrt{t\_1 \cdot \left(2 \cdot F\right)}}{-t\_1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B\_m} \cdot \left(\sqrt{A + \mathsf{hypot}\left(B\_m, A\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 (- (* 4.0 (* A C)) (pow B_m 2.0)))
        (t_1 (fma B_m B_m (* A (* C -4.0))))
        (t_2 (* (* 4.0 A) C))
        (t_3
         (/
          (sqrt
           (*
            (* 2.0 (* (- (pow B_m 2.0) t_2) F))
            (+ (+ A C) (sqrt (+ (pow B_m 2.0) (pow (- A C) 2.0))))))
          (- t_2 (pow B_m 2.0)))))
   (if (<= t_3 -1e-211)
     (/
      (*
       (* (sqrt (+ (+ A C) (hypot B_m (- A C)))) (sqrt F))
       (sqrt (* 2.0 (fma A (* C -4.0) (pow B_m 2.0)))))
      t_0)
     (if (<= t_3 0.0)
       (/
        (sqrt
         (fma
          -16.0
          (* A (* F (pow C 2.0)))
          (fma
           -2.0
           (*
            F
            (/
             (fma -2.0 (* (pow B_m 2.0) (pow C 2.0)) (* 0.5 (pow B_m 4.0)))
             A))
           (* 8.0 (* F (* (pow B_m 2.0) C))))))
        t_0)
       (if (<= t_3 INFINITY)
         (/
          (* (sqrt (+ (+ A C) (hypot (- A C) B_m))) (sqrt (* t_1 (* 2.0 F))))
          (- t_1))
         (*
          (/ (sqrt 2.0) B_m)
          (* (sqrt (+ A (hypot B_m A))) (- (sqrt F)))))))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
	double t_0 = (4.0 * (A * C)) - pow(B_m, 2.0);
	double t_1 = fma(B_m, B_m, (A * (C * -4.0)));
	double t_2 = (4.0 * A) * C;
	double t_3 = sqrt(((2.0 * ((pow(B_m, 2.0) - t_2) * F)) * ((A + C) + sqrt((pow(B_m, 2.0) + pow((A - C), 2.0)))))) / (t_2 - pow(B_m, 2.0));
	double tmp;
	if (t_3 <= -1e-211) {
		tmp = ((sqrt(((A + C) + hypot(B_m, (A - C)))) * sqrt(F)) * sqrt((2.0 * fma(A, (C * -4.0), pow(B_m, 2.0))))) / t_0;
	} else if (t_3 <= 0.0) {
		tmp = sqrt(fma(-16.0, (A * (F * pow(C, 2.0))), fma(-2.0, (F * (fma(-2.0, (pow(B_m, 2.0) * pow(C, 2.0)), (0.5 * pow(B_m, 4.0))) / A)), (8.0 * (F * (pow(B_m, 2.0) * C)))))) / t_0;
	} else if (t_3 <= ((double) INFINITY)) {
		tmp = (sqrt(((A + C) + hypot((A - C), B_m))) * sqrt((t_1 * (2.0 * F)))) / -t_1;
	} else {
		tmp = (sqrt(2.0) / B_m) * (sqrt((A + hypot(B_m, A))) * -sqrt(F));
	}
	return tmp;
}
B_m = abs(B)
function code(A, B_m, C, F)
	t_0 = Float64(Float64(4.0 * Float64(A * C)) - (B_m ^ 2.0))
	t_1 = fma(B_m, B_m, Float64(A * Float64(C * -4.0)))
	t_2 = Float64(Float64(4.0 * A) * C)
	t_3 = Float64(sqrt(Float64(Float64(2.0 * Float64(Float64((B_m ^ 2.0) - t_2) * F)) * Float64(Float64(A + C) + sqrt(Float64((B_m ^ 2.0) + (Float64(A - C) ^ 2.0)))))) / Float64(t_2 - (B_m ^ 2.0)))
	tmp = 0.0
	if (t_3 <= -1e-211)
		tmp = Float64(Float64(Float64(sqrt(Float64(Float64(A + C) + hypot(B_m, Float64(A - C)))) * sqrt(F)) * sqrt(Float64(2.0 * fma(A, Float64(C * -4.0), (B_m ^ 2.0))))) / t_0);
	elseif (t_3 <= 0.0)
		tmp = Float64(sqrt(fma(-16.0, Float64(A * Float64(F * (C ^ 2.0))), fma(-2.0, Float64(F * Float64(fma(-2.0, Float64((B_m ^ 2.0) * (C ^ 2.0)), Float64(0.5 * (B_m ^ 4.0))) / A)), Float64(8.0 * Float64(F * Float64((B_m ^ 2.0) * C)))))) / t_0);
	elseif (t_3 <= Inf)
		tmp = Float64(Float64(sqrt(Float64(Float64(A + C) + hypot(Float64(A - C), B_m))) * sqrt(Float64(t_1 * Float64(2.0 * F)))) / Float64(-t_1));
	else
		tmp = Float64(Float64(sqrt(2.0) / B_m) * Float64(sqrt(Float64(A + hypot(B_m, A))) * 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[(N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision] - N[Power[B$95$m, 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(B$95$m * B$95$m + N[(A * N[(C * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision]}, Block[{t$95$3 = N[(N[Sqrt[N[(N[(2.0 * N[(N[(N[Power[B$95$m, 2.0], $MachinePrecision] - t$95$2), $MachinePrecision] * F), $MachinePrecision]), $MachinePrecision] * N[(N[(A + C), $MachinePrecision] + N[Sqrt[N[(N[Power[B$95$m, 2.0], $MachinePrecision] + N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(t$95$2 - N[Power[B$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, -1e-211], N[(N[(N[(N[Sqrt[N[(N[(A + C), $MachinePrecision] + N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[F], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(2.0 * N[(A * N[(C * -4.0), $MachinePrecision] + N[Power[B$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[t$95$3, 0.0], N[(N[Sqrt[N[(-16.0 * N[(A * N[(F * N[Power[C, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-2.0 * N[(F * N[(N[(-2.0 * N[(N[Power[B$95$m, 2.0], $MachinePrecision] * N[Power[C, 2.0], $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[Power[B$95$m, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision] + N[(8.0 * N[(F * N[(N[Power[B$95$m, 2.0], $MachinePrecision] * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[(N[(N[Sqrt[N[(N[(A + C), $MachinePrecision] + N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B$95$m ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(t$95$1 * N[(2.0 * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / (-t$95$1)), $MachinePrecision], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B$95$m), $MachinePrecision] * N[(N[Sqrt[N[(A + N[Sqrt[B$95$m ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-N[Sqrt[F], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
B_m = \left|B\right|

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

\mathbf{elif}\;t\_3 \leq 0:\\
\;\;\;\;\frac{\sqrt{\mathsf{fma}\left(-16, A \cdot \left(F \cdot {C}^{2}\right), \mathsf{fma}\left(-2, F \cdot \frac{\mathsf{fma}\left(-2, {B\_m}^{2} \cdot {C}^{2}, 0.5 \cdot {B\_m}^{4}\right)}{A}, 8 \cdot \left(F \cdot \left({B\_m}^{2} \cdot C\right)\right)\right)\right)}}{t\_0}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 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))) < -1.00000000000000009e-211

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

      \[\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/242.4%

        \[\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. associate-*r*54.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.00000000000000009e-211 < (/.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))) < -0.0

    1. Initial program 3.5%

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

      \[\leadsto \frac{\sqrt{\color{blue}{-16 \cdot \left(A \cdot \left({C}^{2} \cdot F\right)\right) + \left(-2 \cdot \frac{F \cdot \left(-2 \cdot \left({B}^{2} \cdot {C}^{2}\right) + 0.5 \cdot {B}^{4}\right)}{A} + 8 \cdot \left({B}^{2} \cdot \left(C \cdot F\right)\right)\right)}}}{4 \cdot \left(A \cdot C\right) - {B}^{2}} \]
    5. Step-by-step derivation
      1. fma-define32.7%

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

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

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

        \[\leadsto \frac{\sqrt{\mathsf{fma}\left(-16, A \cdot \left({C}^{2} \cdot F\right), \mathsf{fma}\left(-2, F \cdot \frac{\color{blue}{\mathsf{fma}\left(-2, {B}^{2} \cdot {C}^{2}, 0.5 \cdot {B}^{4}\right)}}{A}, 8 \cdot \left({B}^{2} \cdot \left(C \cdot F\right)\right)\right)\right)}}{4 \cdot \left(A \cdot C\right) - {B}^{2}} \]
      5. associate-*r*34.5%

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

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

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

    1. Initial program 33.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. Simplified63.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
    4. Step-by-step derivation
      1. pow1/263.9%

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

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

        \[\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/276.3%

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

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

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

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

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

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

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

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

        \[\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/276.3%

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

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

      \[\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 C around 0 2.1%

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

        \[\leadsto \color{blue}{-\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A + \sqrt{{A}^{2} + {B}^{2}}\right)}} \]
      2. distribute-rgt-neg-in2.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 55.7% accurate, 0.4× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ \begin{array}{l} t_0 := \left(4 \cdot A\right) \cdot C\\ t_1 := \frac{\sqrt{\left(2 \cdot \left(\left({B\_m}^{2} - t\_0\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{B\_m}^{2} + {\left(A - C\right)}^{2}}\right)}}{t\_0 - {B\_m}^{2}}\\ t_2 := \mathsf{fma}\left(B\_m, B\_m, A \cdot \left(C \cdot -4\right)\right)\\ \mathbf{if}\;t\_1 \leq 0:\\ \;\;\;\;\frac{\left(\sqrt{\left(A + C\right) + \mathsf{hypot}\left(B\_m, A - C\right)} \cdot \sqrt{F}\right) \cdot \sqrt{2 \cdot \mathsf{fma}\left(A, C \cdot -4, {B\_m}^{2}\right)}}{4 \cdot \left(A \cdot C\right) - {B\_m}^{2}}\\ \mathbf{elif}\;t\_1 \leq \infty:\\ \;\;\;\;\frac{\sqrt{\left(A + C\right) + \mathsf{hypot}\left(A - C, B\_m\right)} \cdot \sqrt{t\_2 \cdot \left(2 \cdot F\right)}}{-t\_2}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B\_m} \cdot \left(\sqrt{A + \mathsf{hypot}\left(B\_m, A\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 (* (* 4.0 A) C))
        (t_1
         (/
          (sqrt
           (*
            (* 2.0 (* (- (pow B_m 2.0) t_0) F))
            (+ (+ A C) (sqrt (+ (pow B_m 2.0) (pow (- A C) 2.0))))))
          (- t_0 (pow B_m 2.0))))
        (t_2 (fma B_m B_m (* A (* C -4.0)))))
   (if (<= t_1 0.0)
     (/
      (*
       (* (sqrt (+ (+ A C) (hypot B_m (- A C)))) (sqrt F))
       (sqrt (* 2.0 (fma A (* C -4.0) (pow B_m 2.0)))))
      (- (* 4.0 (* A C)) (pow B_m 2.0)))
     (if (<= t_1 INFINITY)
       (/
        (* (sqrt (+ (+ A C) (hypot (- A C) B_m))) (sqrt (* t_2 (* 2.0 F))))
        (- t_2))
       (* (/ (sqrt 2.0) B_m) (* (sqrt (+ A (hypot B_m A))) (- (sqrt F))))))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
	double t_0 = (4.0 * A) * C;
	double t_1 = sqrt(((2.0 * ((pow(B_m, 2.0) - t_0) * F)) * ((A + C) + sqrt((pow(B_m, 2.0) + pow((A - C), 2.0)))))) / (t_0 - pow(B_m, 2.0));
	double t_2 = fma(B_m, B_m, (A * (C * -4.0)));
	double tmp;
	if (t_1 <= 0.0) {
		tmp = ((sqrt(((A + C) + hypot(B_m, (A - C)))) * sqrt(F)) * sqrt((2.0 * fma(A, (C * -4.0), pow(B_m, 2.0))))) / ((4.0 * (A * C)) - pow(B_m, 2.0));
	} else if (t_1 <= ((double) INFINITY)) {
		tmp = (sqrt(((A + C) + hypot((A - C), B_m))) * sqrt((t_2 * (2.0 * F)))) / -t_2;
	} else {
		tmp = (sqrt(2.0) / B_m) * (sqrt((A + hypot(B_m, A))) * -sqrt(F));
	}
	return tmp;
}
B_m = abs(B)
function code(A, B_m, C, F)
	t_0 = Float64(Float64(4.0 * A) * C)
	t_1 = Float64(sqrt(Float64(Float64(2.0 * Float64(Float64((B_m ^ 2.0) - t_0) * F)) * Float64(Float64(A + C) + sqrt(Float64((B_m ^ 2.0) + (Float64(A - C) ^ 2.0)))))) / Float64(t_0 - (B_m ^ 2.0)))
	t_2 = fma(B_m, B_m, Float64(A * Float64(C * -4.0)))
	tmp = 0.0
	if (t_1 <= 0.0)
		tmp = Float64(Float64(Float64(sqrt(Float64(Float64(A + C) + hypot(B_m, Float64(A - C)))) * sqrt(F)) * sqrt(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 (t_1 <= Inf)
		tmp = Float64(Float64(sqrt(Float64(Float64(A + C) + hypot(Float64(A - C), B_m))) * sqrt(Float64(t_2 * Float64(2.0 * F)))) / Float64(-t_2));
	else
		tmp = Float64(Float64(sqrt(2.0) / B_m) * Float64(sqrt(Float64(A + hypot(B_m, A))) * 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[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision]}, Block[{t$95$1 = N[(N[Sqrt[N[(N[(2.0 * N[(N[(N[Power[B$95$m, 2.0], $MachinePrecision] - t$95$0), $MachinePrecision] * F), $MachinePrecision]), $MachinePrecision] * N[(N[(A + C), $MachinePrecision] + N[Sqrt[N[(N[Power[B$95$m, 2.0], $MachinePrecision] + N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(t$95$0 - N[Power[B$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(B$95$m * B$95$m + N[(A * N[(C * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 0.0], N[(N[(N[(N[Sqrt[N[(N[(A + C), $MachinePrecision] + N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[F], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(2.0 * N[(A * N[(C * -4.0), $MachinePrecision] + N[Power[B$95$m, 2.0], $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[t$95$1, Infinity], N[(N[(N[Sqrt[N[(N[(A + C), $MachinePrecision] + N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B$95$m ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(t$95$2 * N[(2.0 * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / (-t$95$2)), $MachinePrecision], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B$95$m), $MachinePrecision] * N[(N[Sqrt[N[(A + N[Sqrt[B$95$m ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-N[Sqrt[F], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
B_m = \left|B\right|

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

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

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


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

    1. Initial program 37.1%

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

      \[\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/234.3%

        \[\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. associate-*r*43.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 33.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. Simplified63.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
    4. Step-by-step derivation
      1. pow1/263.9%

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

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

        \[\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/276.3%

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

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

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

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

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

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

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

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

        \[\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/276.3%

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

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

      \[\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 C around 0 2.1%

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

        \[\leadsto \color{blue}{-\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A + \sqrt{{A}^{2} + {B}^{2}}\right)}} \]
      2. distribute-rgt-neg-in2.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 51.5% 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 2 \cdot 10^{+117}:\\ \;\;\;\;\frac{\sqrt{\left(A + C\right) + \mathsf{hypot}\left(A - C, B\_m\right)} \cdot \sqrt{t\_0 \cdot \left(2 \cdot F\right)}}{-t\_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B\_m} \cdot \left(\sqrt{A + \mathsf{hypot}\left(B\_m, A\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) 2e+117)
     (/
      (* (sqrt (+ (+ A C) (hypot (- A C) B_m))) (sqrt (* t_0 (* 2.0 F))))
      (- t_0))
     (* (/ (sqrt 2.0) B_m) (* (sqrt (+ A (hypot B_m A))) (- (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) <= 2e+117) {
		tmp = (sqrt(((A + C) + hypot((A - C), B_m))) * sqrt((t_0 * (2.0 * F)))) / -t_0;
	} else {
		tmp = (sqrt(2.0) / B_m) * (sqrt((A + hypot(B_m, A))) * -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) <= 2e+117)
		tmp = Float64(Float64(sqrt(Float64(Float64(A + C) + hypot(Float64(A - C), B_m))) * sqrt(Float64(t_0 * Float64(2.0 * F)))) / Float64(-t_0));
	else
		tmp = Float64(Float64(sqrt(2.0) / B_m) * Float64(sqrt(Float64(A + hypot(B_m, A))) * 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], 2e+117], N[(N[(N[Sqrt[N[(N[(A + C), $MachinePrecision] + N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B$95$m ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(t$95$0 * N[(2.0 * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / (-t$95$0)), $MachinePrecision], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B$95$m), $MachinePrecision] * N[(N[Sqrt[N[(A + N[Sqrt[B$95$m ^ 2 + A ^ 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 2 \cdot 10^{+117}:\\
\;\;\;\;\frac{\sqrt{\left(A + C\right) + \mathsf{hypot}\left(A - C, B\_m\right)} \cdot \sqrt{t\_0 \cdot \left(2 \cdot F\right)}}{-t\_0}\\

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


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

    1. Initial program 30.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. Simplified39.0%

      \[\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/239.0%

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

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

        \[\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/247.2%

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

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

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

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

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

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

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

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

        \[\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/247.2%

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

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

      \[\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 2.0000000000000001e117 < (pow.f64 B 2)

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

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

        \[\leadsto \color{blue}{-\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A + \sqrt{{A}^{2} + {B}^{2}}\right)}} \]
      2. distribute-rgt-neg-in11.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 48.3% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 30.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. Simplified35.2%

      \[\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 F around 0 30.0%

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

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

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

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

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

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

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

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

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

    if 2.0000000000000001e117 < (pow.f64 B 2)

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

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

        \[\leadsto \color{blue}{-\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A + \sqrt{{A}^{2} + {B}^{2}}\right)}} \]
      2. distribute-rgt-neg-in11.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 47.4% accurate, 1.5× 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 \leq 5 \cdot 10^{+58}:\\ \;\;\;\;\frac{\sqrt{\left(\left(A + C\right) + \mathsf{hypot}\left(B\_m, A - C\right)\right) \cdot \left(t\_0 \cdot \left(2 \cdot F\right)\right)}}{-t\_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B\_m} \cdot \left(\sqrt{A + \mathsf{hypot}\left(B\_m, A\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 (<= B_m 5e+58)
     (/ (sqrt (* (+ (+ A C) (hypot B_m (- A C))) (* t_0 (* 2.0 F)))) (- t_0))
     (* (/ (sqrt 2.0) B_m) (* (sqrt (+ A (hypot B_m A))) (- (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 (B_m <= 5e+58) {
		tmp = sqrt((((A + C) + hypot(B_m, (A - C))) * (t_0 * (2.0 * F)))) / -t_0;
	} else {
		tmp = (sqrt(2.0) / B_m) * (sqrt((A + hypot(B_m, A))) * -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 <= 5e+58)
		tmp = Float64(sqrt(Float64(Float64(Float64(A + C) + hypot(B_m, Float64(A - C))) * Float64(t_0 * Float64(2.0 * F)))) / Float64(-t_0));
	else
		tmp = Float64(Float64(sqrt(2.0) / B_m) * Float64(sqrt(Float64(A + hypot(B_m, A))) * 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[B$95$m, 5e+58], N[(N[Sqrt[N[(N[(N[(A + C), $MachinePrecision] + N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] * N[(t$95$0 * N[(2.0 * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / (-t$95$0)), $MachinePrecision], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B$95$m), $MachinePrecision] * N[(N[Sqrt[N[(A + N[Sqrt[B$95$m ^ 2 + A ^ 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 \leq 5 \cdot 10^{+58}:\\
\;\;\;\;\frac{\sqrt{\left(\left(A + C\right) + \mathsf{hypot}\left(B\_m, A - C\right)\right) \cdot \left(t\_0 \cdot \left(2 \cdot F\right)\right)}}{-t\_0}\\

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


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

    1. Initial program 24.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. Simplified31.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

    if 4.99999999999999986e58 < B

    1. Initial program 10.1%

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

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

        \[\leadsto \color{blue}{-\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A + \sqrt{{A}^{2} + {B}^{2}}\right)}} \]
      2. distribute-rgt-neg-in18.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 44.2% accurate, 1.5× speedup?

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

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

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


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

    1. Initial program 22.6%

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

      \[\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 18.8%

      \[\leadsto \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)}}{-\color{blue}{-4 \cdot \left(A \cdot C\right)}} \]
    5. Step-by-step derivation
      1. *-commutative18.8%

        \[\leadsto \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)}}{-\color{blue}{\left(A \cdot C\right) \cdot -4}} \]
      2. associate-*r*18.8%

        \[\leadsto \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)}}{-\color{blue}{A \cdot \left(C \cdot -4\right)}} \]
    6. Simplified18.8%

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

    if 2.9999999999999998e-136 < B

    1. Initial program 18.6%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{2}}{B} \cdot \left(-\color{blue}{{\left(A + \mathsf{hypot}\left(B, A\right)\right)}^{0.5} \cdot {F}^{0.5}}\right) \]
      4. pow1/261.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/261.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-rr61.7%

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

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

Alternative 7: 41.6% accurate, 1.9× speedup?

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

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

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

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


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

    1. Initial program 21.3%

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

      \[\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 42.6%

      \[\leadsto \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)}}{-\color{blue}{-4 \cdot \left(A \cdot C\right)}} \]
    5. Step-by-step derivation
      1. *-commutative42.6%

        \[\leadsto \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)}}{-\color{blue}{\left(A \cdot C\right) \cdot -4}} \]
      2. associate-*r*42.6%

        \[\leadsto \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)}}{-\color{blue}{A \cdot \left(C \cdot -4\right)}} \]
    6. Simplified42.6%

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

    if -4.29999999999999978e-296 < F < 15500

    1. Initial program 20.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 15500 < F

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(\sqrt{\frac{F}{B}} \cdot \sqrt{2}\right)} \]
    7. Step-by-step derivation
      1. mul-1-neg30.6%

        \[\leadsto \color{blue}{-\sqrt{\frac{F}{B}} \cdot \sqrt{2}} \]
    8. Simplified30.6%

      \[\leadsto \color{blue}{-\sqrt{\frac{F}{B}} \cdot \sqrt{2}} \]
    9. Step-by-step derivation
      1. sqrt-div32.1%

        \[\leadsto -\color{blue}{\frac{\sqrt{F}}{\sqrt{B}}} \cdot \sqrt{2} \]
    10. Applied egg-rr32.1%

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

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

Alternative 8: 41.1% accurate, 1.9× speedup?

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

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

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

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


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

    1. Initial program 21.3%

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

      \[\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 34.9%

      \[\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)} \]

    if -4.29999999999999978e-296 < F < 5.5e5

    1. Initial program 20.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.5e5 < F

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(\sqrt{\frac{F}{B}} \cdot \sqrt{2}\right)} \]
    7. Step-by-step derivation
      1. mul-1-neg30.6%

        \[\leadsto \color{blue}{-\sqrt{\frac{F}{B}} \cdot \sqrt{2}} \]
    8. Simplified30.6%

      \[\leadsto \color{blue}{-\sqrt{\frac{F}{B}} \cdot \sqrt{2}} \]
    9. Step-by-step derivation
      1. sqrt-div32.1%

        \[\leadsto -\color{blue}{\frac{\sqrt{F}}{\sqrt{B}}} \cdot \sqrt{2} \]
    10. Applied egg-rr32.1%

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

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

Alternative 9: 39.3% accurate, 2.0× speedup?

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

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

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

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


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

    1. Initial program 21.3%

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

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

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

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

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

    if -4.29999999999999978e-296 < F < 16000

    1. Initial program 20.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 16000 < F

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(\sqrt{\frac{F}{B}} \cdot \sqrt{2}\right)} \]
    7. Step-by-step derivation
      1. mul-1-neg30.6%

        \[\leadsto \color{blue}{-\sqrt{\frac{F}{B}} \cdot \sqrt{2}} \]
    8. Simplified30.6%

      \[\leadsto \color{blue}{-\sqrt{\frac{F}{B}} \cdot \sqrt{2}} \]
    9. Step-by-step derivation
      1. sqrt-div32.1%

        \[\leadsto -\color{blue}{\frac{\sqrt{F}}{\sqrt{B}}} \cdot \sqrt{2} \]
    10. Applied egg-rr32.1%

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

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

Alternative 10: 39.3% accurate, 2.0× speedup?

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

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

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

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


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

    1. Initial program 21.3%

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

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

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

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

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

    if -4.29999999999999978e-296 < F < 9200

    1. Initial program 20.4%

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

      \[\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/217.7%

        \[\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. associate-*r*28.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A + \mathsf{hypot}\left(B, A\right)\right)}} \]
      6. distribute-rgt-neg-in28.5%

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

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

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

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

    if 9200 < F

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(\sqrt{\frac{F}{B}} \cdot \sqrt{2}\right)} \]
    7. Step-by-step derivation
      1. mul-1-neg30.6%

        \[\leadsto \color{blue}{-\sqrt{\frac{F}{B}} \cdot \sqrt{2}} \]
    8. Simplified30.6%

      \[\leadsto \color{blue}{-\sqrt{\frac{F}{B}} \cdot \sqrt{2}} \]
    9. Step-by-step derivation
      1. sqrt-div32.1%

        \[\leadsto -\color{blue}{\frac{\sqrt{F}}{\sqrt{B}}} \cdot \sqrt{2} \]
    10. Applied egg-rr32.1%

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

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

Alternative 11: 39.3% accurate, 2.0× speedup?

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

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

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

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


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

    1. Initial program 21.3%

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

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

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

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

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

    if -4.29999999999999978e-296 < F < 165000

    1. Initial program 20.4%

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

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

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

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

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

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

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

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

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

    if 165000 < F

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(\sqrt{\frac{F}{B}} \cdot \sqrt{2}\right)} \]
    7. Step-by-step derivation
      1. mul-1-neg30.6%

        \[\leadsto \color{blue}{-\sqrt{\frac{F}{B}} \cdot \sqrt{2}} \]
    8. Simplified30.6%

      \[\leadsto \color{blue}{-\sqrt{\frac{F}{B}} \cdot \sqrt{2}} \]
    9. Step-by-step derivation
      1. sqrt-div32.1%

        \[\leadsto -\color{blue}{\frac{\sqrt{F}}{\sqrt{B}}} \cdot \sqrt{2} \]
    10. Applied egg-rr32.1%

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

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

Alternative 12: 37.8% accurate, 2.0× speedup?

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

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

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


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

    1. Initial program 21.3%

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

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

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

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

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

    if -4.29999999999999978e-296 < F

    1. Initial program 20.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 12.7%

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

        \[\leadsto \color{blue}{-\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A + \sqrt{{A}^{2} + {B}^{2}}\right)}} \]
      2. distribute-rgt-neg-in12.7%

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(\sqrt{\frac{F}{B}} \cdot \sqrt{2}\right)} \]
    7. Step-by-step derivation
      1. mul-1-neg20.1%

        \[\leadsto \color{blue}{-\sqrt{\frac{F}{B}} \cdot \sqrt{2}} \]
    8. Simplified20.1%

      \[\leadsto \color{blue}{-\sqrt{\frac{F}{B}} \cdot \sqrt{2}} \]
    9. Step-by-step derivation
      1. sqrt-div26.0%

        \[\leadsto -\color{blue}{\frac{\sqrt{F}}{\sqrt{B}}} \cdot \sqrt{2} \]
    10. Applied egg-rr26.0%

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

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

Alternative 13: 36.6% accurate, 2.8× speedup?

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

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

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

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


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

    1. Initial program 21.3%

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

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

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

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

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

    if -4.29999999999999978e-296 < F < 1.79999999999999999e37

    1. Initial program 20.4%

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

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

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

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

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

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

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

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

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

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

    if 1.79999999999999999e37 < F

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(\sqrt{\frac{F}{B}} \cdot \sqrt{2}\right)} \]
    7. Step-by-step derivation
      1. mul-1-neg31.0%

        \[\leadsto \color{blue}{-\sqrt{\frac{F}{B}} \cdot \sqrt{2}} \]
    8. Simplified31.0%

      \[\leadsto \color{blue}{-\sqrt{\frac{F}{B}} \cdot \sqrt{2}} \]
    9. Step-by-step derivation
      1. sqrt-unprod31.3%

        \[\leadsto -\color{blue}{\sqrt{\frac{F}{B} \cdot 2}} \]
    10. Applied egg-rr31.3%

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

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

Alternative 14: 33.9% accurate, 3.0× speedup?

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

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

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


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

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

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

        \[\leadsto \color{blue}{-\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A + \sqrt{{A}^{2} + {B}^{2}}\right)}} \]
      2. distribute-rgt-neg-in9.5%

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

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

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

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

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

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

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

    if 1.75e37 < F

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(\sqrt{\frac{F}{B}} \cdot \sqrt{2}\right)} \]
    7. Step-by-step derivation
      1. mul-1-neg31.0%

        \[\leadsto \color{blue}{-\sqrt{\frac{F}{B}} \cdot \sqrt{2}} \]
    8. Simplified31.0%

      \[\leadsto \color{blue}{-\sqrt{\frac{F}{B}} \cdot \sqrt{2}} \]
    9. Step-by-step derivation
      1. sqrt-unprod31.3%

        \[\leadsto -\color{blue}{\sqrt{\frac{F}{B} \cdot 2}} \]
    10. Applied egg-rr31.3%

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

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

Alternative 15: 27.5% accurate, 5.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;A \leq 3.4 \cdot 10^{+122}:\\
\;\;\;\;-{\left(2 \cdot \frac{F}{B\_m}\right)}^{0.5}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if A < 3.4e122

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(\sqrt{\frac{F}{B}} \cdot \sqrt{2}\right)} \]
    7. Step-by-step derivation
      1. mul-1-neg20.4%

        \[\leadsto \color{blue}{-\sqrt{\frac{F}{B}} \cdot \sqrt{2}} \]
    8. Simplified20.4%

      \[\leadsto \color{blue}{-\sqrt{\frac{F}{B}} \cdot \sqrt{2}} \]
    9. Step-by-step derivation
      1. sqrt-unprod20.5%

        \[\leadsto -\color{blue}{\sqrt{\frac{F}{B} \cdot 2}} \]
      2. pow1/220.6%

        \[\leadsto -\color{blue}{{\left(\frac{F}{B} \cdot 2\right)}^{0.5}} \]
    10. Applied egg-rr20.6%

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

    if 3.4e122 < A

    1. Initial program 9.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-\sqrt{A \cdot F} \cdot \frac{{\left(\sqrt{2}\right)}^{2}}{B}} \]
      2. distribute-rgt-neg-in15.4%

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

        \[\leadsto \sqrt{A \cdot F} \cdot \left(-\frac{\color{blue}{\sqrt{2} \cdot \sqrt{2}}}{B}\right) \]
      4. rem-square-sqrt15.5%

        \[\leadsto \sqrt{A \cdot F} \cdot \left(-\frac{\color{blue}{2}}{B}\right) \]
    10. Simplified15.5%

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

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

Alternative 16: 27.2% accurate, 5.9× speedup?

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

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

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

      \[\leadsto \color{blue}{-\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A + \sqrt{{A}^{2} + {B}^{2}}\right)}} \]
    2. distribute-rgt-neg-in11.0%

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

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

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

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

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

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

    \[\leadsto \color{blue}{-1 \cdot \left(\sqrt{\frac{F}{B}} \cdot \sqrt{2}\right)} \]
  7. Step-by-step derivation
    1. mul-1-neg17.4%

      \[\leadsto \color{blue}{-\sqrt{\frac{F}{B}} \cdot \sqrt{2}} \]
  8. Simplified17.4%

    \[\leadsto \color{blue}{-\sqrt{\frac{F}{B}} \cdot \sqrt{2}} \]
  9. Step-by-step derivation
    1. sqrt-unprod17.5%

      \[\leadsto -\color{blue}{\sqrt{\frac{F}{B} \cdot 2}} \]
    2. pow1/217.6%

      \[\leadsto -\color{blue}{{\left(\frac{F}{B} \cdot 2\right)}^{0.5}} \]
  10. Applied egg-rr17.6%

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

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

Alternative 17: 27.2% accurate, 6.0× speedup?

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

\\
-\sqrt{2 \cdot \frac{F}{B\_m}}
\end{array}
Derivation
  1. Initial program 20.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 11.0%

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

      \[\leadsto \color{blue}{-\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A + \sqrt{{A}^{2} + {B}^{2}}\right)}} \]
    2. distribute-rgt-neg-in11.0%

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

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

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

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

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

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

    \[\leadsto \color{blue}{-1 \cdot \left(\sqrt{\frac{F}{B}} \cdot \sqrt{2}\right)} \]
  7. Step-by-step derivation
    1. mul-1-neg17.4%

      \[\leadsto \color{blue}{-\sqrt{\frac{F}{B}} \cdot \sqrt{2}} \]
  8. Simplified17.4%

    \[\leadsto \color{blue}{-\sqrt{\frac{F}{B}} \cdot \sqrt{2}} \]
  9. Step-by-step derivation
    1. sqrt-unprod17.5%

      \[\leadsto -\color{blue}{\sqrt{\frac{F}{B} \cdot 2}} \]
  10. Applied egg-rr17.5%

    \[\leadsto -\color{blue}{\sqrt{\frac{F}{B} \cdot 2}} \]
  11. Final simplification17.5%

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

Reproduce

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