ABCF->ab-angle a

Percentage Accurate: 19.7% → 52.2%
Time: 29.7s
Alternatives: 15
Speedup: 3.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 15 alternatives:

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

Initial Program: 19.7% accurate, 1.0× speedup?

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

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

Alternative 1: 52.2% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 26.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.00000000000000015e191 < (pow.f64 B 2)

    1. Initial program 4.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. Taylor expanded in A around 0 2.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\sqrt{C + \mathsf{hypot}\left(B, C\right)} \cdot \sqrt{F}\right)} \cdot \left(-\frac{\sqrt{2}}{B}\right) \]
    7. Step-by-step derivation
      1. div-inv28.9%

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

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

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

Alternative 2: 40.1% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(B_m, B_m, A \cdot \left(C \cdot -4\right)\right)\\
t_1 := \frac{\sqrt{2}}{B_m}\\
t_2 := -t_1\\
\mathbf{if}\;{B_m}^{2} \leq 5 \cdot 10^{-318}:\\
\;\;\;\;\sqrt{\frac{-F}{A}}\\

\mathbf{elif}\;{B_m}^{2} \leq 1.1 \cdot 10^{-85}:\\
\;\;\;\;\frac{-\sqrt{\left(t_0 \cdot \left(2 \cdot F\right)\right) \cdot \left(A + A\right)}}{t_0}\\

\mathbf{elif}\;{B_m}^{2} \leq 4 \cdot 10^{-36}:\\
\;\;\;\;\frac{\sqrt{2} \cdot \left(-\sqrt{F \cdot \left(A + \mathsf{hypot}\left(B_m, A\right)\right)}\right)}{B_m}\\

\mathbf{elif}\;{B_m}^{2} \leq 0.001:\\
\;\;\;\;t_2 \cdot \sqrt{F \cdot \left(\frac{{B_m}^{2}}{C} \cdot -0.5\right)}\\

\mathbf{elif}\;{B_m}^{2} \leq 2 \cdot 10^{+97}:\\
\;\;\;\;t_1 \cdot \left(-\sqrt{F \cdot \left(C + \mathsf{hypot}\left(B_m, C\right)\right)}\right)\\

\mathbf{else}:\\
\;\;\;\;t_2 \cdot \left(\sqrt{F} \cdot \sqrt{B_m}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if (pow.f64 B 2) < 4.9999987e-318

    1. Initial program 13.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{\color{blue}{-1 \cdot \frac{F}{A}}} \]
    7. Step-by-step derivation
      1. mul-1-neg25.7%

        \[\leadsto \sqrt{\color{blue}{-\frac{F}{A}}} \]
    8. Simplified25.7%

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

    if 4.9999987e-318 < (pow.f64 B 2) < 1.1e-85

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

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

      \[\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(A + \color{blue}{\left(A + \left(C + -1 \cdot C\right)\right)}\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]
    4. Step-by-step derivation
      1. distribute-rgt1-in38.9%

        \[\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(A + \left(A + \color{blue}{\left(-1 + 1\right) \cdot C}\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]
      2. metadata-eval38.9%

        \[\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(A + \left(A + \color{blue}{0} \cdot C\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]
      3. mul0-lft38.9%

        \[\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(A + \left(A + \color{blue}{0}\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]
    5. Simplified38.9%

      \[\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(A + \color{blue}{\left(A + 0\right)}\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]

    if 1.1e-85 < (pow.f64 B 2) < 3.9999999999999998e-36

    1. Initial program 46.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. Taylor expanded in C around 0 10.2%

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

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

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

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

        \[\leadsto \frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(A + \sqrt{\color{blue}{B \cdot B} + {A}^{2}}\right)}\right) \]
      5. unpow210.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-def10.2%

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

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

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

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

    if 3.9999999999999998e-36 < (pow.f64 B 2) < 1e-3

    1. Initial program 2.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. Taylor expanded in A around 0 2.0%

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{F \cdot \color{blue}{\left(-0.5 \cdot \frac{{B}^{2}}{C}\right)}} \cdot \left(-\frac{\sqrt{2}}{B}\right) \]
    6. Step-by-step derivation
      1. *-commutative2.2%

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

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

    if 1e-3 < (pow.f64 B 2) < 2.0000000000000001e97

    1. Initial program 42.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. Taylor expanded in A around 0 22.0%

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

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

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

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

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

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

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

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

    if 2.0000000000000001e97 < (pow.f64 B 2)

    1. Initial program 8.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. Taylor expanded in A around 0 4.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;{B}^{2} \leq 5 \cdot 10^{-318}:\\ \;\;\;\;\sqrt{\frac{-F}{A}}\\ \mathbf{elif}\;{B}^{2} \leq 1.1 \cdot 10^{-85}:\\ \;\;\;\;\frac{-\sqrt{\left(\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(2 \cdot F\right)\right) \cdot \left(A + A\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}\\ \mathbf{elif}\;{B}^{2} \leq 4 \cdot 10^{-36}:\\ \;\;\;\;\frac{\sqrt{2} \cdot \left(-\sqrt{F \cdot \left(A + \mathsf{hypot}\left(B, A\right)\right)}\right)}{B}\\ \mathbf{elif}\;{B}^{2} \leq 0.001:\\ \;\;\;\;\left(-\frac{\sqrt{2}}{B}\right) \cdot \sqrt{F \cdot \left(\frac{{B}^{2}}{C} \cdot -0.5\right)}\\ \mathbf{elif}\;{B}^{2} \leq 2 \cdot 10^{+97}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(C + \mathsf{hypot}\left(B, C\right)\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(-\frac{\sqrt{2}}{B}\right) \cdot \left(\sqrt{F} \cdot \sqrt{B}\right)\\ \end{array} \]

Alternative 3: 45.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, \left(C \cdot A\right) \cdot -4\right)\\ \mathbf{if}\;{B_m}^{2} \leq 2 \cdot 10^{-323}:\\ \;\;\;\;\sqrt{\frac{-F}{A}}\\ \mathbf{elif}\;{B_m}^{2} \leq 2 \cdot 10^{+40}:\\ \;\;\;\;\frac{-\sqrt{\left(2 \cdot F\right) \cdot \left(t_0 \cdot \left(\left(C + A\right) + \mathsf{hypot}\left(A - C, B_m\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\left(\sqrt{C + \mathsf{hypot}\left(B_m, C\right)} \cdot \sqrt{F}\right) \cdot \left(\sqrt{2} \cdot \frac{-1}{B_m}\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 (* (* C A) -4.0))))
   (if (<= (pow B_m 2.0) 2e-323)
     (sqrt (/ (- F) A))
     (if (<= (pow B_m 2.0) 2e+40)
       (/ (- (sqrt (* (* 2.0 F) (* t_0 (+ (+ C A) (hypot (- A C) B_m)))))) t_0)
       (*
        (* (sqrt (+ C (hypot B_m C))) (sqrt F))
        (* (sqrt 2.0) (/ -1.0 B_m)))))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
	double t_0 = fma(B_m, B_m, ((C * A) * -4.0));
	double tmp;
	if (pow(B_m, 2.0) <= 2e-323) {
		tmp = sqrt((-F / A));
	} else if (pow(B_m, 2.0) <= 2e+40) {
		tmp = -sqrt(((2.0 * F) * (t_0 * ((C + A) + hypot((A - C), B_m))))) / t_0;
	} else {
		tmp = (sqrt((C + hypot(B_m, C))) * sqrt(F)) * (sqrt(2.0) * (-1.0 / B_m));
	}
	return tmp;
}
B_m = abs(B)
function code(A, B_m, C, F)
	t_0 = fma(B_m, B_m, Float64(Float64(C * A) * -4.0))
	tmp = 0.0
	if ((B_m ^ 2.0) <= 2e-323)
		tmp = sqrt(Float64(Float64(-F) / A));
	elseif ((B_m ^ 2.0) <= 2e+40)
		tmp = Float64(Float64(-sqrt(Float64(Float64(2.0 * F) * Float64(t_0 * Float64(Float64(C + A) + hypot(Float64(A - C), B_m)))))) / t_0);
	else
		tmp = Float64(Float64(sqrt(Float64(C + hypot(B_m, C))) * sqrt(F)) * Float64(sqrt(2.0) * Float64(-1.0 / B_m)));
	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[(N[(C * A), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Power[B$95$m, 2.0], $MachinePrecision], 2e-323], N[Sqrt[N[((-F) / A), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[Power[B$95$m, 2.0], $MachinePrecision], 2e+40], N[((-N[Sqrt[N[(N[(2.0 * F), $MachinePrecision] * N[(t$95$0 * N[(N[(C + A), $MachinePrecision] + N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B$95$m ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], N[(N[(N[Sqrt[N[(C + N[Sqrt[B$95$m ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[F], $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] * N[(-1.0 / B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
B_m = \left|B\right|

\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(B_m, B_m, \left(C \cdot A\right) \cdot -4\right)\\
\mathbf{if}\;{B_m}^{2} \leq 2 \cdot 10^{-323}:\\
\;\;\;\;\sqrt{\frac{-F}{A}}\\

\mathbf{elif}\;{B_m}^{2} \leq 2 \cdot 10^{+40}:\\
\;\;\;\;\frac{-\sqrt{\left(2 \cdot F\right) \cdot \left(t_0 \cdot \left(\left(C + A\right) + \mathsf{hypot}\left(A - C, B_m\right)\right)\right)}}{t_0}\\

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


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

    1. Initial program 13.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{\color{blue}{-1 \cdot \frac{F}{A}}} \]
    7. Step-by-step derivation
      1. mul-1-neg26.0%

        \[\leadsto \sqrt{\color{blue}{-\frac{F}{A}}} \]
    8. Simplified26.0%

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

    if 1.97626e-323 < (pow.f64 B 2) < 2.00000000000000006e40

    1. Initial program 32.5%

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

        \[\leadsto \frac{\color{blue}{0 - \sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \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. div-sub32.5%

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

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

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

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

    if 2.00000000000000006e40 < (pow.f64 B 2)

    1. Initial program 13.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. Taylor expanded in A around 0 6.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\sqrt{C + \mathsf{hypot}\left(B, C\right)} \cdot \sqrt{F}\right)} \cdot \left(-\frac{\sqrt{2}}{B}\right) \]
    7. Step-by-step derivation
      1. div-inv27.0%

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

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

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

Alternative 4: 47.0% 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^{-323}:\\ \;\;\;\;\sqrt{\frac{-F}{A}}\\ \mathbf{elif}\;{B_m}^{2} \leq 10^{+50}:\\ \;\;\;\;\frac{-\sqrt{\left(t_0 \cdot \left(2 \cdot F\right)\right) \cdot \left(A + \left(C + \mathsf{hypot}\left(B_m, A - C\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\left(\sqrt{C + \mathsf{hypot}\left(B_m, C\right)} \cdot \sqrt{F}\right) \cdot \left(\sqrt{2} \cdot \frac{-1}{B_m}\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-323)
     (sqrt (/ (- F) A))
     (if (<= (pow B_m 2.0) 1e+50)
       (/ (- (sqrt (* (* t_0 (* 2.0 F)) (+ A (+ C (hypot B_m (- A C))))))) t_0)
       (*
        (* (sqrt (+ C (hypot B_m C))) (sqrt F))
        (* (sqrt 2.0) (/ -1.0 B_m)))))))
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-323) {
		tmp = sqrt((-F / A));
	} else if (pow(B_m, 2.0) <= 1e+50) {
		tmp = -sqrt(((t_0 * (2.0 * F)) * (A + (C + hypot(B_m, (A - C)))))) / t_0;
	} else {
		tmp = (sqrt((C + hypot(B_m, C))) * sqrt(F)) * (sqrt(2.0) * (-1.0 / B_m));
	}
	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-323)
		tmp = sqrt(Float64(Float64(-F) / A));
	elseif ((B_m ^ 2.0) <= 1e+50)
		tmp = Float64(Float64(-sqrt(Float64(Float64(t_0 * Float64(2.0 * F)) * Float64(A + Float64(C + hypot(B_m, Float64(A - C))))))) / t_0);
	else
		tmp = Float64(Float64(sqrt(Float64(C + hypot(B_m, C))) * sqrt(F)) * Float64(sqrt(2.0) * Float64(-1.0 / B_m)));
	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-323], N[Sqrt[N[((-F) / A), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[Power[B$95$m, 2.0], $MachinePrecision], 1e+50], N[((-N[Sqrt[N[(N[(t$95$0 * N[(2.0 * F), $MachinePrecision]), $MachinePrecision] * N[(A + N[(C + N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], N[(N[(N[Sqrt[N[(C + N[Sqrt[B$95$m ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[F], $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] * N[(-1.0 / B$95$m), $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^{-323}:\\
\;\;\;\;\sqrt{\frac{-F}{A}}\\

\mathbf{elif}\;{B_m}^{2} \leq 10^{+50}:\\
\;\;\;\;\frac{-\sqrt{\left(t_0 \cdot \left(2 \cdot F\right)\right) \cdot \left(A + \left(C + \mathsf{hypot}\left(B_m, A - C\right)\right)\right)}}{t_0}\\

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


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

    1. Initial program 13.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{\color{blue}{-1 \cdot \frac{F}{A}}} \]
    7. Step-by-step derivation
      1. mul-1-neg26.0%

        \[\leadsto \sqrt{\color{blue}{-\frac{F}{A}}} \]
    8. Simplified26.0%

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

    if 1.97626e-323 < (pow.f64 B 2) < 1.0000000000000001e50

    1. Initial program 32.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. Simplified42.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(A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}} \]

    if 1.0000000000000001e50 < (pow.f64 B 2)

    1. Initial program 12.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\sqrt{C + \mathsf{hypot}\left(B, C\right)} \cdot \sqrt{F}\right)} \cdot \left(-\frac{\sqrt{2}}{B}\right) \]
    7. Step-by-step derivation
      1. div-inv27.3%

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

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

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

Alternative 5: 43.8% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_0 := {B_m}^{2} - C \cdot \left(A \cdot 4\right)\\
\mathbf{if}\;{B_m}^{2} \leq 2 \cdot 10^{-323}:\\
\;\;\;\;\sqrt{\frac{-F}{A}}\\

\mathbf{elif}\;{B_m}^{2} \leq 0.2:\\
\;\;\;\;\frac{-\sqrt{\left(2 \cdot \left(F \cdot t_0\right)\right) \cdot \left(A + \mathsf{hypot}\left(B_m, A\right)\right)}}{t_0}\\

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


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

    1. Initial program 13.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{\color{blue}{-1 \cdot \frac{F}{A}}} \]
    7. Step-by-step derivation
      1. mul-1-neg26.0%

        \[\leadsto \sqrt{\color{blue}{-\frac{F}{A}}} \]
    8. Simplified26.0%

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

    if 1.97626e-323 < (pow.f64 B 2) < 0.20000000000000001

    1. Initial program 32.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. Taylor expanded in C around 0 31.3%

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

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

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

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

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

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

    if 0.20000000000000001 < (pow.f64 B 2)

    1. Initial program 13.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 43.1% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;F \leq 6.3 \cdot 10^{-299}:\\
\;\;\;\;\sqrt{\frac{-F}{C}}\\

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


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

    1. Initial program 25.4%

      \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
    2. Step-by-step derivation
      1. add-sqr-sqrt25.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{\color{blue}{-1 \cdot \frac{F}{C}}} \]
    7. Step-by-step derivation
      1. mul-1-neg41.0%

        \[\leadsto \sqrt{\color{blue}{-\frac{F}{C}}} \]
    8. Simplified41.0%

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

    if 6.29999999999999951e-299 < F

    1. Initial program 17.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq 6.3 \cdot 10^{-299}:\\ \;\;\;\;\sqrt{\frac{-F}{C}}\\ \mathbf{else}:\\ \;\;\;\;\left(\sqrt{C + \mathsf{hypot}\left(B, C\right)} \cdot \sqrt{F}\right) \cdot \left(\sqrt{2} \cdot \frac{-1}{B}\right)\\ \end{array} \]

Alternative 7: 43.2% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;F \leq 6.3 \cdot 10^{-299}:\\
\;\;\;\;\sqrt{\frac{-F}{C}}\\

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


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

    1. Initial program 25.4%

      \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
    2. Step-by-step derivation
      1. add-sqr-sqrt25.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{\color{blue}{-1 \cdot \frac{F}{C}}} \]
    7. Step-by-step derivation
      1. mul-1-neg41.0%

        \[\leadsto \sqrt{\color{blue}{-\frac{F}{C}}} \]
    8. Simplified41.0%

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

    if 6.29999999999999951e-299 < F

    1. Initial program 17.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 39.5% accurate, 2.0× speedup?

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

\\
\begin{array}{l}
t_0 := \frac{\sqrt{2}}{B_m}\\
\mathbf{if}\;B_m \leq 3.55 \cdot 10^{-228}:\\
\;\;\;\;\sqrt{\frac{-F}{A}}\\

\mathbf{elif}\;B_m \leq 2.6 \cdot 10^{-50}:\\
\;\;\;\;\sqrt{\frac{-F}{C}}\\

\mathbf{elif}\;B_m \leq 1.15 \cdot 10^{+49}:\\
\;\;\;\;t_0 \cdot \left(-\sqrt{F \cdot \left(C + \mathsf{hypot}\left(B_m, C\right)\right)}\right)\\

\mathbf{else}:\\
\;\;\;\;\left(-t_0\right) \cdot \left(\sqrt{F} \cdot \sqrt{B_m}\right)\\


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

    1. Initial program 18.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{\color{blue}{-1 \cdot \frac{F}{A}}} \]
    7. Step-by-step derivation
      1. mul-1-neg11.4%

        \[\leadsto \sqrt{\color{blue}{-\frac{F}{A}}} \]
    8. Simplified11.4%

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

    if 3.5500000000000003e-228 < B < 2.6000000000000001e-50

    1. Initial program 24.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{\color{blue}{-1 \cdot \frac{F}{C}}} \]
    7. Step-by-step derivation
      1. mul-1-neg23.2%

        \[\leadsto \sqrt{\color{blue}{-\frac{F}{C}}} \]
    8. Simplified23.2%

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

    if 2.6000000000000001e-50 < B < 1.15000000000000001e49

    1. Initial program 29.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. Taylor expanded in A around 0 34.3%

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

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

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

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

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

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

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

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

    if 1.15000000000000001e49 < B

    1. Initial program 9.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 3.55 \cdot 10^{-228}:\\ \;\;\;\;\sqrt{\frac{-F}{A}}\\ \mathbf{elif}\;B \leq 2.6 \cdot 10^{-50}:\\ \;\;\;\;\sqrt{\frac{-F}{C}}\\ \mathbf{elif}\;B \leq 1.15 \cdot 10^{+49}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(C + \mathsf{hypot}\left(B, C\right)\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(-\frac{\sqrt{2}}{B}\right) \cdot \left(\sqrt{F} \cdot \sqrt{B}\right)\\ \end{array} \]

Alternative 9: 39.2% accurate, 2.0× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ \begin{array}{l} \mathbf{if}\;F \leq 6.3 \cdot 10^{-299}:\\ \;\;\;\;\sqrt{\frac{-F}{C}}\\ \mathbf{else}:\\ \;\;\;\;\left(-\frac{\sqrt{2}}{B_m}\right) \cdot \left(\sqrt{F} \cdot \sqrt{B_m}\right)\\ \end{array} \end{array} \]
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
 :precision binary64
 (if (<= F 6.3e-299)
   (sqrt (/ (- F) C))
   (* (- (/ (sqrt 2.0) B_m)) (* (sqrt F) (sqrt B_m)))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
	double tmp;
	if (F <= 6.3e-299) {
		tmp = sqrt((-F / C));
	} else {
		tmp = -(sqrt(2.0) / B_m) * (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 <= 6.3d-299) then
        tmp = sqrt((-f / c))
    else
        tmp = -(sqrt(2.0d0) / b_m) * (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 <= 6.3e-299) {
		tmp = Math.sqrt((-F / C));
	} else {
		tmp = -(Math.sqrt(2.0) / B_m) * (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 <= 6.3e-299:
		tmp = math.sqrt((-F / C))
	else:
		tmp = -(math.sqrt(2.0) / B_m) * (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 <= 6.3e-299)
		tmp = sqrt(Float64(Float64(-F) / C));
	else
		tmp = Float64(Float64(-Float64(sqrt(2.0) / B_m)) * Float64(sqrt(F) * 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 <= 6.3e-299)
		tmp = sqrt((-F / C));
	else
		tmp = -(sqrt(2.0) / B_m) * (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, 6.3e-299], N[Sqrt[N[((-F) / C), $MachinePrecision]], $MachinePrecision], N[((-N[(N[Sqrt[2.0], $MachinePrecision] / B$95$m), $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 6.3 \cdot 10^{-299}:\\
\;\;\;\;\sqrt{\frac{-F}{C}}\\

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


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

    1. Initial program 25.4%

      \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
    2. Step-by-step derivation
      1. add-sqr-sqrt25.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{\color{blue}{-1 \cdot \frac{F}{C}}} \]
    7. Step-by-step derivation
      1. mul-1-neg41.0%

        \[\leadsto \sqrt{\color{blue}{-\frac{F}{C}}} \]
    8. Simplified41.0%

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

    if 6.29999999999999951e-299 < F

    1. Initial program 17.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq 6.3 \cdot 10^{-299}:\\ \;\;\;\;\sqrt{\frac{-F}{C}}\\ \mathbf{else}:\\ \;\;\;\;\left(-\frac{\sqrt{2}}{B}\right) \cdot \left(\sqrt{F} \cdot \sqrt{B}\right)\\ \end{array} \]

Alternative 10: 38.3% accurate, 3.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;F \leq 6.3 \cdot 10^{-299}:\\
\;\;\;\;\sqrt{\frac{-F}{C}}\\

\mathbf{elif}\;F \leq 2.25 \cdot 10^{+14}:\\
\;\;\;\;\left(-\frac{\sqrt{2}}{B_m}\right) \cdot \sqrt{B_m \cdot F}\\

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


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

    1. Initial program 25.4%

      \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
    2. Step-by-step derivation
      1. add-sqr-sqrt25.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{\color{blue}{-1 \cdot \frac{F}{C}}} \]
    7. Step-by-step derivation
      1. mul-1-neg41.0%

        \[\leadsto \sqrt{\color{blue}{-\frac{F}{C}}} \]
    8. Simplified41.0%

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

    if 6.29999999999999951e-299 < F < 2.25e14

    1. Initial program 20.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. Taylor expanded in A around 0 8.8%

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

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

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

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

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

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

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

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

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

    if 2.25e14 < F

    1. Initial program 13.9%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq 6.3 \cdot 10^{-299}:\\ \;\;\;\;\sqrt{\frac{-F}{C}}\\ \mathbf{elif}\;F \leq 2.25 \cdot 10^{+14}:\\ \;\;\;\;\left(-\frac{\sqrt{2}}{B}\right) \cdot \sqrt{B \cdot F}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\ \end{array} \]

Alternative 11: 30.5% accurate, 3.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;F \leq 1.25 \cdot 10^{-212}:\\
\;\;\;\;\sqrt{\frac{-F}{C}}\\

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


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

    1. Initial program 23.9%

      \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
    2. Step-by-step derivation
      1. add-sqr-sqrt14.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{\color{blue}{-1 \cdot \frac{F}{C}}} \]
    7. Step-by-step derivation
      1. mul-1-neg27.5%

        \[\leadsto \sqrt{\color{blue}{-\frac{F}{C}}} \]
    8. Simplified27.5%

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

    if 1.25000000000000011e-212 < F

    1. Initial program 16.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. Taylor expanded in A around 0 7.3%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq 1.25 \cdot 10^{-212}:\\ \;\;\;\;\sqrt{\frac{-F}{C}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\ \end{array} \]

Alternative 12: 12.4% accurate, 5.6× speedup?

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

\\
\begin{array}{l}
t_0 := \sqrt{\frac{-F}{A}}\\
\mathbf{if}\;B_m \leq 1.6 \cdot 10^{-228}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;B_m \leq 4.1 \cdot 10^{-32}:\\
\;\;\;\;\sqrt{\frac{-F}{C}}\\

\mathbf{elif}\;B_m \leq 7.8 \cdot 10^{+15}:\\
\;\;\;\;t_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if B < 1.60000000000000011e-228 or 4.09999999999999975e-32 < B < 7.8e15

    1. Initial program 17.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{\color{blue}{-1 \cdot \frac{F}{A}}} \]
    7. Step-by-step derivation
      1. mul-1-neg12.8%

        \[\leadsto \sqrt{\color{blue}{-\frac{F}{A}}} \]
    8. Simplified12.8%

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

    if 1.60000000000000011e-228 < B < 4.09999999999999975e-32

    1. Initial program 26.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{\color{blue}{-1 \cdot \frac{F}{C}}} \]
    7. Step-by-step derivation
      1. mul-1-neg25.0%

        \[\leadsto \sqrt{\color{blue}{-\frac{F}{C}}} \]
    8. Simplified25.0%

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

    if 7.8e15 < B

    1. Initial program 15.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\sqrt{F \cdot C} \cdot \frac{{2}^{\color{blue}{1}}}{B} \]
      3. metadata-eval10.4%

        \[\leadsto -\sqrt{F \cdot C} \cdot \frac{\color{blue}{2}}{B} \]
      4. associate-*r/10.4%

        \[\leadsto -\color{blue}{\frac{\sqrt{F \cdot C} \cdot 2}{B}} \]
      5. *-commutative10.4%

        \[\leadsto -\frac{\sqrt{\color{blue}{C \cdot F}} \cdot 2}{B} \]
    9. Applied egg-rr10.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 1.6 \cdot 10^{-228}:\\ \;\;\;\;\sqrt{\frac{-F}{A}}\\ \mathbf{elif}\;B \leq 4.1 \cdot 10^{-32}:\\ \;\;\;\;\sqrt{\frac{-F}{C}}\\ \mathbf{elif}\;B \leq 7.8 \cdot 10^{+15}:\\ \;\;\;\;\sqrt{\frac{-F}{A}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{F \cdot C} \cdot \left(-2\right)}{B}\\ \end{array} \]

Alternative 13: 12.4% accurate, 5.6× speedup?

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

\\
\begin{array}{l}
t_0 := \sqrt{\frac{-F}{A}}\\
\mathbf{if}\;B_m \leq 2.9 \cdot 10^{-228}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;B_m \leq 6.5 \cdot 10^{-32}:\\
\;\;\;\;\sqrt{\frac{-F}{C}}\\

\mathbf{elif}\;B_m \leq 1.72 \cdot 10^{+15}:\\
\;\;\;\;t_0\\

\mathbf{else}:\\
\;\;\;\;\sqrt{F \cdot C} \cdot \frac{-2}{B_m}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if B < 2.9000000000000001e-228 or 6.49999999999999988e-32 < B < 1.72e15

    1. Initial program 17.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{\color{blue}{-1 \cdot \frac{F}{A}}} \]
    7. Step-by-step derivation
      1. mul-1-neg12.8%

        \[\leadsto \sqrt{\color{blue}{-\frac{F}{A}}} \]
    8. Simplified12.8%

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

    if 2.9000000000000001e-228 < B < 6.49999999999999988e-32

    1. Initial program 26.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{\color{blue}{-1 \cdot \frac{F}{C}}} \]
    7. Step-by-step derivation
      1. mul-1-neg25.0%

        \[\leadsto \sqrt{\color{blue}{-\frac{F}{C}}} \]
    8. Simplified25.0%

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

    if 1.72e15 < B

    1. Initial program 15.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(\frac{{\left(\sqrt{2}\right)}^{2}}{B} \cdot \sqrt{C \cdot F}\right)} \]
    8. Step-by-step derivation
      1. mul-1-neg10.3%

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

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

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

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

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

        \[\leadsto \sqrt{F \cdot C} \cdot \left(-1 \cdot \frac{\color{blue}{\sqrt{2} \cdot \sqrt{2}}}{B}\right) \]
      7. rem-square-sqrt10.4%

        \[\leadsto \sqrt{F \cdot C} \cdot \left(-1 \cdot \frac{\color{blue}{2}}{B}\right) \]
      8. associate-*r/10.4%

        \[\leadsto \sqrt{F \cdot C} \cdot \color{blue}{\frac{-1 \cdot 2}{B}} \]
      9. metadata-eval10.4%

        \[\leadsto \sqrt{F \cdot C} \cdot \frac{\color{blue}{-2}}{B} \]
    9. Simplified10.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 2.9 \cdot 10^{-228}:\\ \;\;\;\;\sqrt{\frac{-F}{A}}\\ \mathbf{elif}\;B \leq 6.5 \cdot 10^{-32}:\\ \;\;\;\;\sqrt{\frac{-F}{C}}\\ \mathbf{elif}\;B \leq 1.72 \cdot 10^{+15}:\\ \;\;\;\;\sqrt{\frac{-F}{A}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{F \cdot C} \cdot \frac{-2}{B}\\ \end{array} \]

Alternative 14: 15.0% accurate, 5.8× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ \begin{array}{l} \mathbf{if}\;A \leq -2.1 \cdot 10^{-15} \lor \neg \left(A \leq -2.8 \cdot 10^{-236}\right) \land A \leq 2.5 \cdot 10^{-50}:\\ \;\;\;\;\sqrt{\frac{-F}{A}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{-F}{C}}\\ \end{array} \end{array} \]
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
 :precision binary64
 (if (or (<= A -2.1e-15) (and (not (<= A -2.8e-236)) (<= A 2.5e-50)))
   (sqrt (/ (- F) A))
   (sqrt (/ (- F) C))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
	double tmp;
	if ((A <= -2.1e-15) || (!(A <= -2.8e-236) && (A <= 2.5e-50))) {
		tmp = sqrt((-F / A));
	} else {
		tmp = sqrt((-F / C));
	}
	return tmp;
}
B_m = abs(B)
real(8) function code(a, b_m, c, f)
    real(8), intent (in) :: a
    real(8), intent (in) :: b_m
    real(8), intent (in) :: c
    real(8), intent (in) :: f
    real(8) :: tmp
    if ((a <= (-2.1d-15)) .or. (.not. (a <= (-2.8d-236))) .and. (a <= 2.5d-50)) then
        tmp = sqrt((-f / a))
    else
        tmp = sqrt((-f / c))
    end if
    code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
	double tmp;
	if ((A <= -2.1e-15) || (!(A <= -2.8e-236) && (A <= 2.5e-50))) {
		tmp = Math.sqrt((-F / A));
	} else {
		tmp = Math.sqrt((-F / C));
	}
	return tmp;
}
B_m = math.fabs(B)
def code(A, B_m, C, F):
	tmp = 0
	if (A <= -2.1e-15) or (not (A <= -2.8e-236) and (A <= 2.5e-50)):
		tmp = math.sqrt((-F / A))
	else:
		tmp = math.sqrt((-F / C))
	return tmp
B_m = abs(B)
function code(A, B_m, C, F)
	tmp = 0.0
	if ((A <= -2.1e-15) || (!(A <= -2.8e-236) && (A <= 2.5e-50)))
		tmp = sqrt(Float64(Float64(-F) / A));
	else
		tmp = sqrt(Float64(Float64(-F) / C));
	end
	return tmp
end
B_m = abs(B);
function tmp_2 = code(A, B_m, C, F)
	tmp = 0.0;
	if ((A <= -2.1e-15) || (~((A <= -2.8e-236)) && (A <= 2.5e-50)))
		tmp = sqrt((-F / A));
	else
		tmp = sqrt((-F / C));
	end
	tmp_2 = tmp;
end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := If[Or[LessEqual[A, -2.1e-15], And[N[Not[LessEqual[A, -2.8e-236]], $MachinePrecision], LessEqual[A, 2.5e-50]]], N[Sqrt[N[((-F) / A), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[((-F) / C), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|

\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.1 \cdot 10^{-15} \lor \neg \left(A \leq -2.8 \cdot 10^{-236}\right) \land A \leq 2.5 \cdot 10^{-50}:\\
\;\;\;\;\sqrt{\frac{-F}{A}}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{-F}{C}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if A < -2.09999999999999981e-15 or -2.79999999999999986e-236 < A < 2.49999999999999984e-50

    1. Initial program 16.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{\color{blue}{-1 \cdot \frac{F}{A}}} \]
    7. Step-by-step derivation
      1. mul-1-neg17.1%

        \[\leadsto \sqrt{\color{blue}{-\frac{F}{A}}} \]
    8. Simplified17.1%

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

    if -2.09999999999999981e-15 < A < -2.79999999999999986e-236 or 2.49999999999999984e-50 < A

    1. Initial program 20.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{\color{blue}{-1 \cdot \frac{F}{C}}} \]
    7. Step-by-step derivation
      1. mul-1-neg18.3%

        \[\leadsto \sqrt{\color{blue}{-\frac{F}{C}}} \]
    8. Simplified18.3%

      \[\leadsto \sqrt{\color{blue}{-\frac{F}{C}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification17.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -2.1 \cdot 10^{-15} \lor \neg \left(A \leq -2.8 \cdot 10^{-236}\right) \land A \leq 2.5 \cdot 10^{-50}:\\ \;\;\;\;\sqrt{\frac{-F}{A}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{-F}{C}}\\ \end{array} \]

Alternative 15: 11.5% accurate, 6.1× speedup?

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

\\
\sqrt{\frac{-F}{A}}
\end{array}
Derivation
  1. Initial program 18.3%

    \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
  2. Step-by-step derivation
    1. add-sqr-sqrt4.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \sqrt{\color{blue}{-1 \cdot \frac{F}{A}}} \]
  7. Step-by-step derivation
    1. mul-1-neg12.1%

      \[\leadsto \sqrt{\color{blue}{-\frac{F}{A}}} \]
  8. Simplified12.1%

    \[\leadsto \sqrt{\color{blue}{-\frac{F}{A}}} \]
  9. Final simplification12.1%

    \[\leadsto \sqrt{\frac{-F}{A}} \]

Reproduce

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