ABCF->ab-angle a

Percentage Accurate: 19.2% → 53.1%
Time: 39.5s
Alternatives: 17
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 17 alternatives:

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

Initial Program: 19.2% 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: 53.1% accurate, 1.2× speedup?

\[\begin{array}{l} B = |B|\\ \\ \begin{array}{l} \mathbf{if}\;{B}^{2} \leq 5 \cdot 10^{+142}:\\ \;\;\;\;\frac{\sqrt{2 \cdot \left(F \cdot \left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right)\right)} \cdot \left(-\sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)}\right)}{B \cdot B - \left(A \cdot C\right) \cdot 4}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(\sqrt{C + \mathsf{hypot}\left(C, B\right)} \cdot \left(-\sqrt{F}\right)\right)\\ \end{array} \end{array} \]
NOTE: B should be positive before calling this function
(FPCore (A B C F)
 :precision binary64
 (if (<= (pow B 2.0) 5e+142)
   (/
    (*
     (sqrt (* 2.0 (* F (+ (* B B) (* -4.0 (* A C))))))
     (- (sqrt (+ A (+ C (hypot B (- A C)))))))
    (- (* B B) (* (* A C) 4.0)))
   (* (/ (sqrt 2.0) B) (* (sqrt (+ C (hypot C B))) (- (sqrt F))))))
B = abs(B);
double code(double A, double B, double C, double F) {
	double tmp;
	if (pow(B, 2.0) <= 5e+142) {
		tmp = (sqrt((2.0 * (F * ((B * B) + (-4.0 * (A * C)))))) * -sqrt((A + (C + hypot(B, (A - C)))))) / ((B * B) - ((A * C) * 4.0));
	} else {
		tmp = (sqrt(2.0) / B) * (sqrt((C + hypot(C, B))) * -sqrt(F));
	}
	return tmp;
}
B = Math.abs(B);
public static double code(double A, double B, double C, double F) {
	double tmp;
	if (Math.pow(B, 2.0) <= 5e+142) {
		tmp = (Math.sqrt((2.0 * (F * ((B * B) + (-4.0 * (A * C)))))) * -Math.sqrt((A + (C + Math.hypot(B, (A - C)))))) / ((B * B) - ((A * C) * 4.0));
	} else {
		tmp = (Math.sqrt(2.0) / B) * (Math.sqrt((C + Math.hypot(C, B))) * -Math.sqrt(F));
	}
	return tmp;
}
B = abs(B)
def code(A, B, C, F):
	tmp = 0
	if math.pow(B, 2.0) <= 5e+142:
		tmp = (math.sqrt((2.0 * (F * ((B * B) + (-4.0 * (A * C)))))) * -math.sqrt((A + (C + math.hypot(B, (A - C)))))) / ((B * B) - ((A * C) * 4.0))
	else:
		tmp = (math.sqrt(2.0) / B) * (math.sqrt((C + math.hypot(C, B))) * -math.sqrt(F))
	return tmp
B = abs(B)
function code(A, B, C, F)
	tmp = 0.0
	if ((B ^ 2.0) <= 5e+142)
		tmp = Float64(Float64(sqrt(Float64(2.0 * Float64(F * Float64(Float64(B * B) + Float64(-4.0 * Float64(A * C)))))) * Float64(-sqrt(Float64(A + Float64(C + hypot(B, Float64(A - C))))))) / Float64(Float64(B * B) - Float64(Float64(A * C) * 4.0)));
	else
		tmp = Float64(Float64(sqrt(2.0) / B) * Float64(sqrt(Float64(C + hypot(C, B))) * Float64(-sqrt(F))));
	end
	return tmp
end
B = abs(B)
function tmp_2 = code(A, B, C, F)
	tmp = 0.0;
	if ((B ^ 2.0) <= 5e+142)
		tmp = (sqrt((2.0 * (F * ((B * B) + (-4.0 * (A * C)))))) * -sqrt((A + (C + hypot(B, (A - C)))))) / ((B * B) - ((A * C) * 4.0));
	else
		tmp = (sqrt(2.0) / B) * (sqrt((C + hypot(C, B))) * -sqrt(F));
	end
	tmp_2 = tmp;
end
NOTE: B should be positive before calling this function
code[A_, B_, C_, F_] := If[LessEqual[N[Power[B, 2.0], $MachinePrecision], 5e+142], N[(N[(N[Sqrt[N[(2.0 * N[(F * N[(N[(B * B), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-N[Sqrt[N[(A + N[(C + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision] / N[(N[(B * B), $MachinePrecision] - N[(N[(A * C), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B), $MachinePrecision] * N[(N[Sqrt[N[(C + N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-N[Sqrt[F], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B = |B|\\
\\
\begin{array}{l}
\mathbf{if}\;{B}^{2} \leq 5 \cdot 10^{+142}:\\
\;\;\;\;\frac{\sqrt{2 \cdot \left(F \cdot \left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right)\right)} \cdot \left(-\sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)}\right)}{B \cdot B - \left(A \cdot C\right) \cdot 4}\\

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


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

    1. Initial program 23.1%

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

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

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

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

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

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

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

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

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

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

    if 5.0000000000000001e142 < (pow.f64 B 2)

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 53.1% accurate, 1.5× speedup?

\[\begin{array}{l} B = |B|\\ \\ \begin{array}{l} \mathbf{if}\;B \leq 1.6 \cdot 10^{+81}:\\ \;\;\;\;\frac{\sqrt{2 \cdot \left(F \cdot \left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right)\right)} \cdot \left(-\sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)}\right)}{B \cdot B - \left(A \cdot C\right) \cdot 4}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(\sqrt{F} \cdot \left(-\sqrt{A + \mathsf{hypot}\left(B, A\right)}\right)\right)\\ \end{array} \end{array} \]
NOTE: B should be positive before calling this function
(FPCore (A B C F)
 :precision binary64
 (if (<= B 1.6e+81)
   (/
    (*
     (sqrt (* 2.0 (* F (+ (* B B) (* -4.0 (* A C))))))
     (- (sqrt (+ A (+ C (hypot B (- A C)))))))
    (- (* B B) (* (* A C) 4.0)))
   (* (/ (sqrt 2.0) B) (* (sqrt F) (- (sqrt (+ A (hypot B A))))))))
B = abs(B);
double code(double A, double B, double C, double F) {
	double tmp;
	if (B <= 1.6e+81) {
		tmp = (sqrt((2.0 * (F * ((B * B) + (-4.0 * (A * C)))))) * -sqrt((A + (C + hypot(B, (A - C)))))) / ((B * B) - ((A * C) * 4.0));
	} else {
		tmp = (sqrt(2.0) / B) * (sqrt(F) * -sqrt((A + hypot(B, A))));
	}
	return tmp;
}
B = Math.abs(B);
public static double code(double A, double B, double C, double F) {
	double tmp;
	if (B <= 1.6e+81) {
		tmp = (Math.sqrt((2.0 * (F * ((B * B) + (-4.0 * (A * C)))))) * -Math.sqrt((A + (C + Math.hypot(B, (A - C)))))) / ((B * B) - ((A * C) * 4.0));
	} else {
		tmp = (Math.sqrt(2.0) / B) * (Math.sqrt(F) * -Math.sqrt((A + Math.hypot(B, A))));
	}
	return tmp;
}
B = abs(B)
def code(A, B, C, F):
	tmp = 0
	if B <= 1.6e+81:
		tmp = (math.sqrt((2.0 * (F * ((B * B) + (-4.0 * (A * C)))))) * -math.sqrt((A + (C + math.hypot(B, (A - C)))))) / ((B * B) - ((A * C) * 4.0))
	else:
		tmp = (math.sqrt(2.0) / B) * (math.sqrt(F) * -math.sqrt((A + math.hypot(B, A))))
	return tmp
B = abs(B)
function code(A, B, C, F)
	tmp = 0.0
	if (B <= 1.6e+81)
		tmp = Float64(Float64(sqrt(Float64(2.0 * Float64(F * Float64(Float64(B * B) + Float64(-4.0 * Float64(A * C)))))) * Float64(-sqrt(Float64(A + Float64(C + hypot(B, Float64(A - C))))))) / Float64(Float64(B * B) - Float64(Float64(A * C) * 4.0)));
	else
		tmp = Float64(Float64(sqrt(2.0) / B) * Float64(sqrt(F) * Float64(-sqrt(Float64(A + hypot(B, A))))));
	end
	return tmp
end
B = abs(B)
function tmp_2 = code(A, B, C, F)
	tmp = 0.0;
	if (B <= 1.6e+81)
		tmp = (sqrt((2.0 * (F * ((B * B) + (-4.0 * (A * C)))))) * -sqrt((A + (C + hypot(B, (A - C)))))) / ((B * B) - ((A * C) * 4.0));
	else
		tmp = (sqrt(2.0) / B) * (sqrt(F) * -sqrt((A + hypot(B, A))));
	end
	tmp_2 = tmp;
end
NOTE: B should be positive before calling this function
code[A_, B_, C_, F_] := If[LessEqual[B, 1.6e+81], N[(N[(N[Sqrt[N[(2.0 * N[(F * N[(N[(B * B), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-N[Sqrt[N[(A + N[(C + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision] / N[(N[(B * B), $MachinePrecision] - N[(N[(A * C), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B), $MachinePrecision] * N[(N[Sqrt[F], $MachinePrecision] * (-N[Sqrt[N[(A + N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B = |B|\\
\\
\begin{array}{l}
\mathbf{if}\;B \leq 1.6 \cdot 10^{+81}:\\
\;\;\;\;\frac{\sqrt{2 \cdot \left(F \cdot \left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right)\right)} \cdot \left(-\sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)}\right)}{B \cdot B - \left(A \cdot C\right) \cdot 4}\\

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


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

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

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

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

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

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

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

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

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

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

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

    if 1.6e81 < B

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

      \[\leadsto \color{blue}{-\frac{\sqrt{\left(2 \cdot \left(\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot F\right)\right) \cdot \left(C + \left(A + \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 C around 0 8.7%

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

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

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

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

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

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

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

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

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

Alternative 3: 51.0% accurate, 1.9× speedup?

\[\begin{array}{l} B = |B|\\ \\ \begin{array}{l} \mathbf{if}\;B \leq 7 \cdot 10^{+139}:\\ \;\;\;\;\frac{\sqrt{2 \cdot \left(F \cdot \left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right)\right)} \cdot \left(-\sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)}\right)}{B \cdot B - \left(A \cdot C\right) \cdot 4}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(\sqrt{B} \cdot \left(-\sqrt{F}\right)\right)\\ \end{array} \end{array} \]
NOTE: B should be positive before calling this function
(FPCore (A B C F)
 :precision binary64
 (if (<= B 7e+139)
   (/
    (*
     (sqrt (* 2.0 (* F (+ (* B B) (* -4.0 (* A C))))))
     (- (sqrt (+ A (+ C (hypot B (- A C)))))))
    (- (* B B) (* (* A C) 4.0)))
   (* (/ (sqrt 2.0) B) (* (sqrt B) (- (sqrt F))))))
B = abs(B);
double code(double A, double B, double C, double F) {
	double tmp;
	if (B <= 7e+139) {
		tmp = (sqrt((2.0 * (F * ((B * B) + (-4.0 * (A * C)))))) * -sqrt((A + (C + hypot(B, (A - C)))))) / ((B * B) - ((A * C) * 4.0));
	} else {
		tmp = (sqrt(2.0) / B) * (sqrt(B) * -sqrt(F));
	}
	return tmp;
}
B = Math.abs(B);
public static double code(double A, double B, double C, double F) {
	double tmp;
	if (B <= 7e+139) {
		tmp = (Math.sqrt((2.0 * (F * ((B * B) + (-4.0 * (A * C)))))) * -Math.sqrt((A + (C + Math.hypot(B, (A - C)))))) / ((B * B) - ((A * C) * 4.0));
	} else {
		tmp = (Math.sqrt(2.0) / B) * (Math.sqrt(B) * -Math.sqrt(F));
	}
	return tmp;
}
B = abs(B)
def code(A, B, C, F):
	tmp = 0
	if B <= 7e+139:
		tmp = (math.sqrt((2.0 * (F * ((B * B) + (-4.0 * (A * C)))))) * -math.sqrt((A + (C + math.hypot(B, (A - C)))))) / ((B * B) - ((A * C) * 4.0))
	else:
		tmp = (math.sqrt(2.0) / B) * (math.sqrt(B) * -math.sqrt(F))
	return tmp
B = abs(B)
function code(A, B, C, F)
	tmp = 0.0
	if (B <= 7e+139)
		tmp = Float64(Float64(sqrt(Float64(2.0 * Float64(F * Float64(Float64(B * B) + Float64(-4.0 * Float64(A * C)))))) * Float64(-sqrt(Float64(A + Float64(C + hypot(B, Float64(A - C))))))) / Float64(Float64(B * B) - Float64(Float64(A * C) * 4.0)));
	else
		tmp = Float64(Float64(sqrt(2.0) / B) * Float64(sqrt(B) * Float64(-sqrt(F))));
	end
	return tmp
end
B = abs(B)
function tmp_2 = code(A, B, C, F)
	tmp = 0.0;
	if (B <= 7e+139)
		tmp = (sqrt((2.0 * (F * ((B * B) + (-4.0 * (A * C)))))) * -sqrt((A + (C + hypot(B, (A - C)))))) / ((B * B) - ((A * C) * 4.0));
	else
		tmp = (sqrt(2.0) / B) * (sqrt(B) * -sqrt(F));
	end
	tmp_2 = tmp;
end
NOTE: B should be positive before calling this function
code[A_, B_, C_, F_] := If[LessEqual[B, 7e+139], N[(N[(N[Sqrt[N[(2.0 * N[(F * N[(N[(B * B), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-N[Sqrt[N[(A + N[(C + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision] / N[(N[(B * B), $MachinePrecision] - N[(N[(A * C), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B), $MachinePrecision] * N[(N[Sqrt[B], $MachinePrecision] * (-N[Sqrt[F], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B = |B|\\
\\
\begin{array}{l}
\mathbf{if}\;B \leq 7 \cdot 10^{+139}:\\
\;\;\;\;\frac{\sqrt{2 \cdot \left(F \cdot \left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right)\right)} \cdot \left(-\sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)}\right)}{B \cdot B - \left(A \cdot C\right) \cdot 4}\\

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


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

    1. Initial program 19.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. Simplified19.2%

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

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

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

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

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

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

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

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

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

    if 6.99999999999999957e139 < B

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

      \[\leadsto \color{blue}{-\frac{\sqrt{\left(2 \cdot \left(\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot F\right)\right) \cdot \left(C + \left(A + \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 C around 0 5.1%

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

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

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

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

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

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

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

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

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

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

Alternative 4: 47.9% accurate, 1.9× speedup?

\[\begin{array}{l} B = |B|\\ \\ \begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ t_1 := A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)\\ \mathbf{if}\;B \leq 1.2 \cdot 10^{-79}:\\ \;\;\;\;\frac{\sqrt{t_1} \cdot \left(-\sqrt{2 \cdot \left(-4 \cdot \left(F \cdot \left(A \cdot C\right)\right)\right)}\right)}{B \cdot B - \left(A \cdot C\right) \cdot 4}\\ \mathbf{elif}\;B \leq 8.4 \cdot 10^{+83}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot t_1\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(\sqrt{B} \cdot \left(-\sqrt{F}\right)\right)\\ \end{array} \end{array} \]
NOTE: B should be positive before calling this function
(FPCore (A B C F)
 :precision binary64
 (let* ((t_0 (+ (* B B) (* -4.0 (* A C)))) (t_1 (+ A (+ C (hypot B (- A C))))))
   (if (<= B 1.2e-79)
     (/
      (* (sqrt t_1) (- (sqrt (* 2.0 (* -4.0 (* F (* A C)))))))
      (- (* B B) (* (* A C) 4.0)))
     (if (<= B 8.4e+83)
       (/ (- (sqrt (* 2.0 (* (* F t_0) t_1)))) t_0)
       (* (/ (sqrt 2.0) B) (* (sqrt B) (- (sqrt F))))))))
B = abs(B);
double code(double A, double B, double C, double F) {
	double t_0 = (B * B) + (-4.0 * (A * C));
	double t_1 = A + (C + hypot(B, (A - C)));
	double tmp;
	if (B <= 1.2e-79) {
		tmp = (sqrt(t_1) * -sqrt((2.0 * (-4.0 * (F * (A * C)))))) / ((B * B) - ((A * C) * 4.0));
	} else if (B <= 8.4e+83) {
		tmp = -sqrt((2.0 * ((F * t_0) * t_1))) / t_0;
	} else {
		tmp = (sqrt(2.0) / B) * (sqrt(B) * -sqrt(F));
	}
	return tmp;
}
B = Math.abs(B);
public static double code(double A, double B, double C, double F) {
	double t_0 = (B * B) + (-4.0 * (A * C));
	double t_1 = A + (C + Math.hypot(B, (A - C)));
	double tmp;
	if (B <= 1.2e-79) {
		tmp = (Math.sqrt(t_1) * -Math.sqrt((2.0 * (-4.0 * (F * (A * C)))))) / ((B * B) - ((A * C) * 4.0));
	} else if (B <= 8.4e+83) {
		tmp = -Math.sqrt((2.0 * ((F * t_0) * t_1))) / t_0;
	} else {
		tmp = (Math.sqrt(2.0) / B) * (Math.sqrt(B) * -Math.sqrt(F));
	}
	return tmp;
}
B = abs(B)
def code(A, B, C, F):
	t_0 = (B * B) + (-4.0 * (A * C))
	t_1 = A + (C + math.hypot(B, (A - C)))
	tmp = 0
	if B <= 1.2e-79:
		tmp = (math.sqrt(t_1) * -math.sqrt((2.0 * (-4.0 * (F * (A * C)))))) / ((B * B) - ((A * C) * 4.0))
	elif B <= 8.4e+83:
		tmp = -math.sqrt((2.0 * ((F * t_0) * t_1))) / t_0
	else:
		tmp = (math.sqrt(2.0) / B) * (math.sqrt(B) * -math.sqrt(F))
	return tmp
B = abs(B)
function code(A, B, C, F)
	t_0 = Float64(Float64(B * B) + Float64(-4.0 * Float64(A * C)))
	t_1 = Float64(A + Float64(C + hypot(B, Float64(A - C))))
	tmp = 0.0
	if (B <= 1.2e-79)
		tmp = Float64(Float64(sqrt(t_1) * Float64(-sqrt(Float64(2.0 * Float64(-4.0 * Float64(F * Float64(A * C))))))) / Float64(Float64(B * B) - Float64(Float64(A * C) * 4.0)));
	elseif (B <= 8.4e+83)
		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(Float64(F * t_0) * t_1)))) / t_0);
	else
		tmp = Float64(Float64(sqrt(2.0) / B) * Float64(sqrt(B) * Float64(-sqrt(F))));
	end
	return tmp
end
B = abs(B)
function tmp_2 = code(A, B, C, F)
	t_0 = (B * B) + (-4.0 * (A * C));
	t_1 = A + (C + hypot(B, (A - C)));
	tmp = 0.0;
	if (B <= 1.2e-79)
		tmp = (sqrt(t_1) * -sqrt((2.0 * (-4.0 * (F * (A * C)))))) / ((B * B) - ((A * C) * 4.0));
	elseif (B <= 8.4e+83)
		tmp = -sqrt((2.0 * ((F * t_0) * t_1))) / t_0;
	else
		tmp = (sqrt(2.0) / B) * (sqrt(B) * -sqrt(F));
	end
	tmp_2 = tmp;
end
NOTE: B should be positive before calling this function
code[A_, B_, C_, F_] := Block[{t$95$0 = N[(N[(B * B), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(A + N[(C + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, 1.2e-79], N[(N[(N[Sqrt[t$95$1], $MachinePrecision] * (-N[Sqrt[N[(2.0 * N[(-4.0 * N[(F * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision] / N[(N[(B * B), $MachinePrecision] - N[(N[(A * C), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 8.4e+83], N[((-N[Sqrt[N[(2.0 * N[(N[(F * t$95$0), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B), $MachinePrecision] * N[(N[Sqrt[B], $MachinePrecision] * (-N[Sqrt[F], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
B = |B|\\
\\
\begin{array}{l}
t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\
t_1 := A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)\\
\mathbf{if}\;B \leq 1.2 \cdot 10^{-79}:\\
\;\;\;\;\frac{\sqrt{t_1} \cdot \left(-\sqrt{2 \cdot \left(-4 \cdot \left(F \cdot \left(A \cdot C\right)\right)\right)}\right)}{B \cdot B - \left(A \cdot C\right) \cdot 4}\\

\mathbf{elif}\;B \leq 8.4 \cdot 10^{+83}:\\
\;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot t_1\right)}}{t_0}\\

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.20000000000000003e-79 < B < 8.4000000000000001e83

    1. Initial program 31.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. Simplified31.6%

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

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

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

    if 8.4000000000000001e83 < B

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

      \[\leadsto \color{blue}{-\frac{\sqrt{\left(2 \cdot \left(\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot F\right)\right) \cdot \left(C + \left(A + \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 C around 0 8.7%

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

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

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

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

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

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

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

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

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

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

Alternative 5: 46.5% accurate, 2.0× speedup?

\[\begin{array}{l} B = |B|\\ \\ \begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;B \leq 6.4 \cdot 10^{+82}:\\ \;\;\;\;\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)} \cdot \frac{-1}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(\sqrt{B} \cdot \left(-\sqrt{F}\right)\right)\\ \end{array} \end{array} \]
NOTE: B should be positive before calling this function
(FPCore (A B C F)
 :precision binary64
 (let* ((t_0 (+ (* B B) (* -4.0 (* A C)))))
   (if (<= B 6.4e+82)
     (*
      (sqrt (* 2.0 (* (* F t_0) (+ A (+ C (hypot B (- A C)))))))
      (/ -1.0 t_0))
     (* (/ (sqrt 2.0) B) (* (sqrt B) (- (sqrt F)))))))
B = abs(B);
double code(double A, double B, double C, double F) {
	double t_0 = (B * B) + (-4.0 * (A * C));
	double tmp;
	if (B <= 6.4e+82) {
		tmp = sqrt((2.0 * ((F * t_0) * (A + (C + hypot(B, (A - C))))))) * (-1.0 / t_0);
	} else {
		tmp = (sqrt(2.0) / B) * (sqrt(B) * -sqrt(F));
	}
	return tmp;
}
B = Math.abs(B);
public static double code(double A, double B, double C, double F) {
	double t_0 = (B * B) + (-4.0 * (A * C));
	double tmp;
	if (B <= 6.4e+82) {
		tmp = Math.sqrt((2.0 * ((F * t_0) * (A + (C + Math.hypot(B, (A - C))))))) * (-1.0 / t_0);
	} else {
		tmp = (Math.sqrt(2.0) / B) * (Math.sqrt(B) * -Math.sqrt(F));
	}
	return tmp;
}
B = abs(B)
def code(A, B, C, F):
	t_0 = (B * B) + (-4.0 * (A * C))
	tmp = 0
	if B <= 6.4e+82:
		tmp = math.sqrt((2.0 * ((F * t_0) * (A + (C + math.hypot(B, (A - C))))))) * (-1.0 / t_0)
	else:
		tmp = (math.sqrt(2.0) / B) * (math.sqrt(B) * -math.sqrt(F))
	return tmp
B = abs(B)
function code(A, B, C, F)
	t_0 = Float64(Float64(B * B) + Float64(-4.0 * Float64(A * C)))
	tmp = 0.0
	if (B <= 6.4e+82)
		tmp = Float64(sqrt(Float64(2.0 * Float64(Float64(F * t_0) * Float64(A + Float64(C + hypot(B, Float64(A - C))))))) * Float64(-1.0 / t_0));
	else
		tmp = Float64(Float64(sqrt(2.0) / B) * Float64(sqrt(B) * Float64(-sqrt(F))));
	end
	return tmp
end
B = abs(B)
function tmp_2 = code(A, B, C, F)
	t_0 = (B * B) + (-4.0 * (A * C));
	tmp = 0.0;
	if (B <= 6.4e+82)
		tmp = sqrt((2.0 * ((F * t_0) * (A + (C + hypot(B, (A - C))))))) * (-1.0 / t_0);
	else
		tmp = (sqrt(2.0) / B) * (sqrt(B) * -sqrt(F));
	end
	tmp_2 = tmp;
end
NOTE: B should be positive before calling this function
code[A_, B_, C_, F_] := Block[{t$95$0 = N[(N[(B * B), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, 6.4e+82], N[(N[Sqrt[N[(2.0 * N[(N[(F * t$95$0), $MachinePrecision] * N[(A + N[(C + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(-1.0 / t$95$0), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B), $MachinePrecision] * N[(N[Sqrt[B], $MachinePrecision] * (-N[Sqrt[F], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
B = |B|\\
\\
\begin{array}{l}
t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\
\mathbf{if}\;B \leq 6.4 \cdot 10^{+82}:\\
\;\;\;\;\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)} \cdot \frac{-1}{t_0}\\

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


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

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

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

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

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

    if 6.3999999999999995e82 < B

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

      \[\leadsto \color{blue}{-\frac{\sqrt{\left(2 \cdot \left(\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot F\right)\right) \cdot \left(C + \left(A + \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 C around 0 8.7%

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

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

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

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

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

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

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

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

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

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

Alternative 6: 39.0% accurate, 2.7× speedup?

\[\begin{array}{l} B = |B|\\ \\ \begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;F \leq 2.6 \cdot 10^{-295}:\\ \;\;\;\;\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)} \cdot \frac{-1}{t_0}\\ \mathbf{elif}\;F \leq 0.75:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{B \cdot F}\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\ \end{array} \end{array} \]
NOTE: B should be positive before calling this function
(FPCore (A B C F)
 :precision binary64
 (let* ((t_0 (+ (* B B) (* -4.0 (* A C)))))
   (if (<= F 2.6e-295)
     (*
      (sqrt (* 2.0 (* (* F t_0) (+ A (+ C (hypot B (- A C)))))))
      (/ -1.0 t_0))
     (if (<= F 0.75)
       (* (/ (sqrt 2.0) B) (- (sqrt (* B F))))
       (* (sqrt 2.0) (- (sqrt (/ F B))))))))
B = abs(B);
double code(double A, double B, double C, double F) {
	double t_0 = (B * B) + (-4.0 * (A * C));
	double tmp;
	if (F <= 2.6e-295) {
		tmp = sqrt((2.0 * ((F * t_0) * (A + (C + hypot(B, (A - C))))))) * (-1.0 / t_0);
	} else if (F <= 0.75) {
		tmp = (sqrt(2.0) / B) * -sqrt((B * F));
	} else {
		tmp = sqrt(2.0) * -sqrt((F / B));
	}
	return tmp;
}
B = Math.abs(B);
public static double code(double A, double B, double C, double F) {
	double t_0 = (B * B) + (-4.0 * (A * C));
	double tmp;
	if (F <= 2.6e-295) {
		tmp = Math.sqrt((2.0 * ((F * t_0) * (A + (C + Math.hypot(B, (A - C))))))) * (-1.0 / t_0);
	} else if (F <= 0.75) {
		tmp = (Math.sqrt(2.0) / B) * -Math.sqrt((B * F));
	} else {
		tmp = Math.sqrt(2.0) * -Math.sqrt((F / B));
	}
	return tmp;
}
B = abs(B)
def code(A, B, C, F):
	t_0 = (B * B) + (-4.0 * (A * C))
	tmp = 0
	if F <= 2.6e-295:
		tmp = math.sqrt((2.0 * ((F * t_0) * (A + (C + math.hypot(B, (A - C))))))) * (-1.0 / t_0)
	elif F <= 0.75:
		tmp = (math.sqrt(2.0) / B) * -math.sqrt((B * F))
	else:
		tmp = math.sqrt(2.0) * -math.sqrt((F / B))
	return tmp
B = abs(B)
function code(A, B, C, F)
	t_0 = Float64(Float64(B * B) + Float64(-4.0 * Float64(A * C)))
	tmp = 0.0
	if (F <= 2.6e-295)
		tmp = Float64(sqrt(Float64(2.0 * Float64(Float64(F * t_0) * Float64(A + Float64(C + hypot(B, Float64(A - C))))))) * Float64(-1.0 / t_0));
	elseif (F <= 0.75)
		tmp = Float64(Float64(sqrt(2.0) / B) * Float64(-sqrt(Float64(B * F))));
	else
		tmp = Float64(sqrt(2.0) * Float64(-sqrt(Float64(F / B))));
	end
	return tmp
end
B = abs(B)
function tmp_2 = code(A, B, C, F)
	t_0 = (B * B) + (-4.0 * (A * C));
	tmp = 0.0;
	if (F <= 2.6e-295)
		tmp = sqrt((2.0 * ((F * t_0) * (A + (C + hypot(B, (A - C))))))) * (-1.0 / t_0);
	elseif (F <= 0.75)
		tmp = (sqrt(2.0) / B) * -sqrt((B * F));
	else
		tmp = sqrt(2.0) * -sqrt((F / B));
	end
	tmp_2 = tmp;
end
NOTE: B should be positive before calling this function
code[A_, B_, C_, F_] := Block[{t$95$0 = N[(N[(B * B), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, 2.6e-295], N[(N[Sqrt[N[(2.0 * N[(N[(F * t$95$0), $MachinePrecision] * N[(A + N[(C + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(-1.0 / t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.75], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B), $MachinePrecision] * (-N[Sqrt[N[(B * F), $MachinePrecision]], $MachinePrecision])), $MachinePrecision], N[(N[Sqrt[2.0], $MachinePrecision] * (-N[Sqrt[N[(F / B), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]]]]
\begin{array}{l}
B = |B|\\
\\
\begin{array}{l}
t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\
\mathbf{if}\;F \leq 2.6 \cdot 10^{-295}:\\
\;\;\;\;\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)} \cdot \frac{-1}{t_0}\\

\mathbf{elif}\;F \leq 0.75:\\
\;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{B \cdot F}\right)\\

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


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

    1. Initial program 21.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. Simplified21.6%

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

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

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

    if 2.59999999999999985e-295 < F < 0.75

    1. Initial program 19.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. Simplified19.3%

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

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

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

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

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

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

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

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

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

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

    if 0.75 < F

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 39.0% accurate, 2.7× speedup?

\[\begin{array}{l} B = |B|\\ \\ \begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;F \leq 2.9 \cdot 10^{-294}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;F \leq 6.7:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{B \cdot F}\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\ \end{array} \end{array} \]
NOTE: B should be positive before calling this function
(FPCore (A B C F)
 :precision binary64
 (let* ((t_0 (+ (* B B) (* -4.0 (* A C)))))
   (if (<= F 2.9e-294)
     (/ (- (sqrt (* 2.0 (* (* F t_0) (+ A (+ C (hypot B (- A C)))))))) t_0)
     (if (<= F 6.7)
       (* (/ (sqrt 2.0) B) (- (sqrt (* B F))))
       (* (sqrt 2.0) (- (sqrt (/ F B))))))))
B = abs(B);
double code(double A, double B, double C, double F) {
	double t_0 = (B * B) + (-4.0 * (A * C));
	double tmp;
	if (F <= 2.9e-294) {
		tmp = -sqrt((2.0 * ((F * t_0) * (A + (C + hypot(B, (A - C))))))) / t_0;
	} else if (F <= 6.7) {
		tmp = (sqrt(2.0) / B) * -sqrt((B * F));
	} else {
		tmp = sqrt(2.0) * -sqrt((F / B));
	}
	return tmp;
}
B = Math.abs(B);
public static double code(double A, double B, double C, double F) {
	double t_0 = (B * B) + (-4.0 * (A * C));
	double tmp;
	if (F <= 2.9e-294) {
		tmp = -Math.sqrt((2.0 * ((F * t_0) * (A + (C + Math.hypot(B, (A - C))))))) / t_0;
	} else if (F <= 6.7) {
		tmp = (Math.sqrt(2.0) / B) * -Math.sqrt((B * F));
	} else {
		tmp = Math.sqrt(2.0) * -Math.sqrt((F / B));
	}
	return tmp;
}
B = abs(B)
def code(A, B, C, F):
	t_0 = (B * B) + (-4.0 * (A * C))
	tmp = 0
	if F <= 2.9e-294:
		tmp = -math.sqrt((2.0 * ((F * t_0) * (A + (C + math.hypot(B, (A - C))))))) / t_0
	elif F <= 6.7:
		tmp = (math.sqrt(2.0) / B) * -math.sqrt((B * F))
	else:
		tmp = math.sqrt(2.0) * -math.sqrt((F / B))
	return tmp
B = abs(B)
function code(A, B, C, F)
	t_0 = Float64(Float64(B * B) + Float64(-4.0 * Float64(A * C)))
	tmp = 0.0
	if (F <= 2.9e-294)
		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(Float64(F * t_0) * Float64(A + Float64(C + hypot(B, Float64(A - C)))))))) / t_0);
	elseif (F <= 6.7)
		tmp = Float64(Float64(sqrt(2.0) / B) * Float64(-sqrt(Float64(B * F))));
	else
		tmp = Float64(sqrt(2.0) * Float64(-sqrt(Float64(F / B))));
	end
	return tmp
end
B = abs(B)
function tmp_2 = code(A, B, C, F)
	t_0 = (B * B) + (-4.0 * (A * C));
	tmp = 0.0;
	if (F <= 2.9e-294)
		tmp = -sqrt((2.0 * ((F * t_0) * (A + (C + hypot(B, (A - C))))))) / t_0;
	elseif (F <= 6.7)
		tmp = (sqrt(2.0) / B) * -sqrt((B * F));
	else
		tmp = sqrt(2.0) * -sqrt((F / B));
	end
	tmp_2 = tmp;
end
NOTE: B should be positive before calling this function
code[A_, B_, C_, F_] := Block[{t$95$0 = N[(N[(B * B), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, 2.9e-294], N[((-N[Sqrt[N[(2.0 * N[(N[(F * t$95$0), $MachinePrecision] * N[(A + N[(C + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], If[LessEqual[F, 6.7], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B), $MachinePrecision] * (-N[Sqrt[N[(B * F), $MachinePrecision]], $MachinePrecision])), $MachinePrecision], N[(N[Sqrt[2.0], $MachinePrecision] * (-N[Sqrt[N[(F / B), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]]]]
\begin{array}{l}
B = |B|\\
\\
\begin{array}{l}
t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\
\mathbf{if}\;F \leq 2.9 \cdot 10^{-294}:\\
\;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)}}{t_0}\\

\mathbf{elif}\;F \leq 6.7:\\
\;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{B \cdot F}\right)\\

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


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

    1. Initial program 21.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. Simplified21.6%

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

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

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

    if 2.9000000000000001e-294 < F < 6.70000000000000018

    1. Initial program 19.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. Simplified19.3%

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

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

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

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

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

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

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

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

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

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

    if 6.70000000000000018 < F

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 38.2% accurate, 2.7× speedup?

\[\begin{array}{l} B = |B|\\ \\ \begin{array}{l} t_0 := B \cdot B - \left(A \cdot C\right) \cdot 4\\ \mathbf{if}\;F \leq -1.2 \cdot 10^{-90}:\\ \;\;\;\;\frac{\sqrt{t_0 \cdot \left(2 \cdot F\right)} \cdot \left(-\sqrt{A + \left(A + C\right)}\right)}{t_0}\\ \mathbf{elif}\;F \leq -7.5 \cdot 10^{-298}:\\ \;\;\;\;\frac{-\sqrt{\left(2 \cdot \left(F \cdot t_0\right)\right) \cdot \left(\left(A + C\right) + \left(C - A\right)\right)}}{t_0}\\ \mathbf{elif}\;F \leq 3:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{B \cdot F}\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\ \end{array} \end{array} \]
NOTE: B should be positive before calling this function
(FPCore (A B C F)
 :precision binary64
 (let* ((t_0 (- (* B B) (* (* A C) 4.0))))
   (if (<= F -1.2e-90)
     (/ (* (sqrt (* t_0 (* 2.0 F))) (- (sqrt (+ A (+ A C))))) t_0)
     (if (<= F -7.5e-298)
       (/ (- (sqrt (* (* 2.0 (* F t_0)) (+ (+ A C) (- C A))))) t_0)
       (if (<= F 3.0)
         (* (/ (sqrt 2.0) B) (- (sqrt (* B F))))
         (* (sqrt 2.0) (- (sqrt (/ F B)))))))))
B = abs(B);
double code(double A, double B, double C, double F) {
	double t_0 = (B * B) - ((A * C) * 4.0);
	double tmp;
	if (F <= -1.2e-90) {
		tmp = (sqrt((t_0 * (2.0 * F))) * -sqrt((A + (A + C)))) / t_0;
	} else if (F <= -7.5e-298) {
		tmp = -sqrt(((2.0 * (F * t_0)) * ((A + C) + (C - A)))) / t_0;
	} else if (F <= 3.0) {
		tmp = (sqrt(2.0) / B) * -sqrt((B * F));
	} else {
		tmp = sqrt(2.0) * -sqrt((F / B));
	}
	return tmp;
}
NOTE: B should be positive before calling this function
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
    real(8) :: tmp
    t_0 = (b * b) - ((a * c) * 4.0d0)
    if (f <= (-1.2d-90)) then
        tmp = (sqrt((t_0 * (2.0d0 * f))) * -sqrt((a + (a + c)))) / t_0
    else if (f <= (-7.5d-298)) then
        tmp = -sqrt(((2.0d0 * (f * t_0)) * ((a + c) + (c - a)))) / t_0
    else if (f <= 3.0d0) then
        tmp = (sqrt(2.0d0) / b) * -sqrt((b * f))
    else
        tmp = sqrt(2.0d0) * -sqrt((f / b))
    end if
    code = tmp
end function
B = Math.abs(B);
public static double code(double A, double B, double C, double F) {
	double t_0 = (B * B) - ((A * C) * 4.0);
	double tmp;
	if (F <= -1.2e-90) {
		tmp = (Math.sqrt((t_0 * (2.0 * F))) * -Math.sqrt((A + (A + C)))) / t_0;
	} else if (F <= -7.5e-298) {
		tmp = -Math.sqrt(((2.0 * (F * t_0)) * ((A + C) + (C - A)))) / t_0;
	} else if (F <= 3.0) {
		tmp = (Math.sqrt(2.0) / B) * -Math.sqrt((B * F));
	} else {
		tmp = Math.sqrt(2.0) * -Math.sqrt((F / B));
	}
	return tmp;
}
B = abs(B)
def code(A, B, C, F):
	t_0 = (B * B) - ((A * C) * 4.0)
	tmp = 0
	if F <= -1.2e-90:
		tmp = (math.sqrt((t_0 * (2.0 * F))) * -math.sqrt((A + (A + C)))) / t_0
	elif F <= -7.5e-298:
		tmp = -math.sqrt(((2.0 * (F * t_0)) * ((A + C) + (C - A)))) / t_0
	elif F <= 3.0:
		tmp = (math.sqrt(2.0) / B) * -math.sqrt((B * F))
	else:
		tmp = math.sqrt(2.0) * -math.sqrt((F / B))
	return tmp
B = abs(B)
function code(A, B, C, F)
	t_0 = Float64(Float64(B * B) - Float64(Float64(A * C) * 4.0))
	tmp = 0.0
	if (F <= -1.2e-90)
		tmp = Float64(Float64(sqrt(Float64(t_0 * Float64(2.0 * F))) * Float64(-sqrt(Float64(A + Float64(A + C))))) / t_0);
	elseif (F <= -7.5e-298)
		tmp = Float64(Float64(-sqrt(Float64(Float64(2.0 * Float64(F * t_0)) * Float64(Float64(A + C) + Float64(C - A))))) / t_0);
	elseif (F <= 3.0)
		tmp = Float64(Float64(sqrt(2.0) / B) * Float64(-sqrt(Float64(B * F))));
	else
		tmp = Float64(sqrt(2.0) * Float64(-sqrt(Float64(F / B))));
	end
	return tmp
end
B = abs(B)
function tmp_2 = code(A, B, C, F)
	t_0 = (B * B) - ((A * C) * 4.0);
	tmp = 0.0;
	if (F <= -1.2e-90)
		tmp = (sqrt((t_0 * (2.0 * F))) * -sqrt((A + (A + C)))) / t_0;
	elseif (F <= -7.5e-298)
		tmp = -sqrt(((2.0 * (F * t_0)) * ((A + C) + (C - A)))) / t_0;
	elseif (F <= 3.0)
		tmp = (sqrt(2.0) / B) * -sqrt((B * F));
	else
		tmp = sqrt(2.0) * -sqrt((F / B));
	end
	tmp_2 = tmp;
end
NOTE: B should be positive before calling this function
code[A_, B_, C_, F_] := Block[{t$95$0 = N[(N[(B * B), $MachinePrecision] - N[(N[(A * C), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.2e-90], N[(N[(N[Sqrt[N[(t$95$0 * N[(2.0 * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-N[Sqrt[N[(A + N[(A + C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[F, -7.5e-298], N[((-N[Sqrt[N[(N[(2.0 * N[(F * t$95$0), $MachinePrecision]), $MachinePrecision] * N[(N[(A + C), $MachinePrecision] + N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], If[LessEqual[F, 3.0], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B), $MachinePrecision] * (-N[Sqrt[N[(B * F), $MachinePrecision]], $MachinePrecision])), $MachinePrecision], N[(N[Sqrt[2.0], $MachinePrecision] * (-N[Sqrt[N[(F / B), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]]]]]
\begin{array}{l}
B = |B|\\
\\
\begin{array}{l}
t_0 := B \cdot B - \left(A \cdot C\right) \cdot 4\\
\mathbf{if}\;F \leq -1.2 \cdot 10^{-90}:\\
\;\;\;\;\frac{\sqrt{t_0 \cdot \left(2 \cdot F\right)} \cdot \left(-\sqrt{A + \left(A + C\right)}\right)}{t_0}\\

\mathbf{elif}\;F \leq -7.5 \cdot 10^{-298}:\\
\;\;\;\;\frac{-\sqrt{\left(2 \cdot \left(F \cdot t_0\right)\right) \cdot \left(\left(A + C\right) + \left(C - A\right)\right)}}{t_0}\\

\mathbf{elif}\;F \leq 3:\\
\;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{B \cdot F}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if F < -1.2000000000000001e-90

    1. Initial program 18.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. Simplified18.9%

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

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

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

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

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

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

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

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

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

    if -1.2000000000000001e-90 < F < -7.49999999999999987e-298

    1. Initial program 22.6%

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

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

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

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

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

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

    if -7.49999999999999987e-298 < F < 3

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

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

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

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

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

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

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

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

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

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

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

    if 3 < F

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1.2 \cdot 10^{-90}:\\ \;\;\;\;\frac{\sqrt{\left(B \cdot B - \left(A \cdot C\right) \cdot 4\right) \cdot \left(2 \cdot F\right)} \cdot \left(-\sqrt{A + \left(A + C\right)}\right)}{B \cdot B - \left(A \cdot C\right) \cdot 4}\\ \mathbf{elif}\;F \leq -7.5 \cdot 10^{-298}:\\ \;\;\;\;\frac{-\sqrt{\left(2 \cdot \left(F \cdot \left(B \cdot B - \left(A \cdot C\right) \cdot 4\right)\right)\right) \cdot \left(\left(A + C\right) + \left(C - A\right)\right)}}{B \cdot B - \left(A \cdot C\right) \cdot 4}\\ \mathbf{elif}\;F \leq 3:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{B \cdot F}\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\ \end{array} \]

Alternative 9: 36.4% accurate, 3.0× speedup?

\[\begin{array}{l} B = |B|\\ \\ \begin{array}{l} t_0 := B \cdot B - \left(A \cdot C\right) \cdot 4\\ \mathbf{if}\;F \leq -7.5 \cdot 10^{-298}:\\ \;\;\;\;\frac{-\sqrt{\left(2 \cdot \left(F \cdot t_0\right)\right) \cdot \left(\left(A + C\right) + \left(C - A\right)\right)}}{t_0}\\ \mathbf{elif}\;F \leq 1:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{B \cdot F}\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\ \end{array} \end{array} \]
NOTE: B should be positive before calling this function
(FPCore (A B C F)
 :precision binary64
 (let* ((t_0 (- (* B B) (* (* A C) 4.0))))
   (if (<= F -7.5e-298)
     (/ (- (sqrt (* (* 2.0 (* F t_0)) (+ (+ A C) (- C A))))) t_0)
     (if (<= F 1.0)
       (* (/ (sqrt 2.0) B) (- (sqrt (* B F))))
       (* (sqrt 2.0) (- (sqrt (/ F B))))))))
B = abs(B);
double code(double A, double B, double C, double F) {
	double t_0 = (B * B) - ((A * C) * 4.0);
	double tmp;
	if (F <= -7.5e-298) {
		tmp = -sqrt(((2.0 * (F * t_0)) * ((A + C) + (C - A)))) / t_0;
	} else if (F <= 1.0) {
		tmp = (sqrt(2.0) / B) * -sqrt((B * F));
	} else {
		tmp = sqrt(2.0) * -sqrt((F / B));
	}
	return tmp;
}
NOTE: B should be positive before calling this function
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
    real(8) :: tmp
    t_0 = (b * b) - ((a * c) * 4.0d0)
    if (f <= (-7.5d-298)) then
        tmp = -sqrt(((2.0d0 * (f * t_0)) * ((a + c) + (c - a)))) / t_0
    else if (f <= 1.0d0) then
        tmp = (sqrt(2.0d0) / b) * -sqrt((b * f))
    else
        tmp = sqrt(2.0d0) * -sqrt((f / b))
    end if
    code = tmp
end function
B = Math.abs(B);
public static double code(double A, double B, double C, double F) {
	double t_0 = (B * B) - ((A * C) * 4.0);
	double tmp;
	if (F <= -7.5e-298) {
		tmp = -Math.sqrt(((2.0 * (F * t_0)) * ((A + C) + (C - A)))) / t_0;
	} else if (F <= 1.0) {
		tmp = (Math.sqrt(2.0) / B) * -Math.sqrt((B * F));
	} else {
		tmp = Math.sqrt(2.0) * -Math.sqrt((F / B));
	}
	return tmp;
}
B = abs(B)
def code(A, B, C, F):
	t_0 = (B * B) - ((A * C) * 4.0)
	tmp = 0
	if F <= -7.5e-298:
		tmp = -math.sqrt(((2.0 * (F * t_0)) * ((A + C) + (C - A)))) / t_0
	elif F <= 1.0:
		tmp = (math.sqrt(2.0) / B) * -math.sqrt((B * F))
	else:
		tmp = math.sqrt(2.0) * -math.sqrt((F / B))
	return tmp
B = abs(B)
function code(A, B, C, F)
	t_0 = Float64(Float64(B * B) - Float64(Float64(A * C) * 4.0))
	tmp = 0.0
	if (F <= -7.5e-298)
		tmp = Float64(Float64(-sqrt(Float64(Float64(2.0 * Float64(F * t_0)) * Float64(Float64(A + C) + Float64(C - A))))) / t_0);
	elseif (F <= 1.0)
		tmp = Float64(Float64(sqrt(2.0) / B) * Float64(-sqrt(Float64(B * F))));
	else
		tmp = Float64(sqrt(2.0) * Float64(-sqrt(Float64(F / B))));
	end
	return tmp
end
B = abs(B)
function tmp_2 = code(A, B, C, F)
	t_0 = (B * B) - ((A * C) * 4.0);
	tmp = 0.0;
	if (F <= -7.5e-298)
		tmp = -sqrt(((2.0 * (F * t_0)) * ((A + C) + (C - A)))) / t_0;
	elseif (F <= 1.0)
		tmp = (sqrt(2.0) / B) * -sqrt((B * F));
	else
		tmp = sqrt(2.0) * -sqrt((F / B));
	end
	tmp_2 = tmp;
end
NOTE: B should be positive before calling this function
code[A_, B_, C_, F_] := Block[{t$95$0 = N[(N[(B * B), $MachinePrecision] - N[(N[(A * C), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -7.5e-298], N[((-N[Sqrt[N[(N[(2.0 * N[(F * t$95$0), $MachinePrecision]), $MachinePrecision] * N[(N[(A + C), $MachinePrecision] + N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], If[LessEqual[F, 1.0], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B), $MachinePrecision] * (-N[Sqrt[N[(B * F), $MachinePrecision]], $MachinePrecision])), $MachinePrecision], N[(N[Sqrt[2.0], $MachinePrecision] * (-N[Sqrt[N[(F / B), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]]]]
\begin{array}{l}
B = |B|\\
\\
\begin{array}{l}
t_0 := B \cdot B - \left(A \cdot C\right) \cdot 4\\
\mathbf{if}\;F \leq -7.5 \cdot 10^{-298}:\\
\;\;\;\;\frac{-\sqrt{\left(2 \cdot \left(F \cdot t_0\right)\right) \cdot \left(\left(A + C\right) + \left(C - A\right)\right)}}{t_0}\\

\mathbf{elif}\;F \leq 1:\\
\;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{B \cdot F}\right)\\

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


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

    1. Initial program 20.2%

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

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

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

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

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

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

    if -7.49999999999999987e-298 < F < 1

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

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

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

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

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

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

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

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

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

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

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

    if 1 < F

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 29.3% accurate, 3.0× speedup?

\[\begin{array}{l} B = |B|\\ \\ \begin{array}{l} t_0 := B \cdot B - \left(A \cdot C\right) \cdot 4\\ \mathbf{if}\;B \leq 5.4 \cdot 10^{-69}:\\ \;\;\;\;\frac{-\sqrt{\left(2 \cdot \left(F \cdot t_0\right)\right) \cdot \left(\left(A + C\right) + \left(C - A\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\ \end{array} \end{array} \]
NOTE: B should be positive before calling this function
(FPCore (A B C F)
 :precision binary64
 (let* ((t_0 (- (* B B) (* (* A C) 4.0))))
   (if (<= B 5.4e-69)
     (/ (- (sqrt (* (* 2.0 (* F t_0)) (+ (+ A C) (- C A))))) t_0)
     (* (sqrt 2.0) (- (sqrt (/ F B)))))))
B = abs(B);
double code(double A, double B, double C, double F) {
	double t_0 = (B * B) - ((A * C) * 4.0);
	double tmp;
	if (B <= 5.4e-69) {
		tmp = -sqrt(((2.0 * (F * t_0)) * ((A + C) + (C - A)))) / t_0;
	} else {
		tmp = sqrt(2.0) * -sqrt((F / B));
	}
	return tmp;
}
NOTE: B should be positive before calling this function
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
    real(8) :: tmp
    t_0 = (b * b) - ((a * c) * 4.0d0)
    if (b <= 5.4d-69) then
        tmp = -sqrt(((2.0d0 * (f * t_0)) * ((a + c) + (c - a)))) / t_0
    else
        tmp = sqrt(2.0d0) * -sqrt((f / b))
    end if
    code = tmp
end function
B = Math.abs(B);
public static double code(double A, double B, double C, double F) {
	double t_0 = (B * B) - ((A * C) * 4.0);
	double tmp;
	if (B <= 5.4e-69) {
		tmp = -Math.sqrt(((2.0 * (F * t_0)) * ((A + C) + (C - A)))) / t_0;
	} else {
		tmp = Math.sqrt(2.0) * -Math.sqrt((F / B));
	}
	return tmp;
}
B = abs(B)
def code(A, B, C, F):
	t_0 = (B * B) - ((A * C) * 4.0)
	tmp = 0
	if B <= 5.4e-69:
		tmp = -math.sqrt(((2.0 * (F * t_0)) * ((A + C) + (C - A)))) / t_0
	else:
		tmp = math.sqrt(2.0) * -math.sqrt((F / B))
	return tmp
B = abs(B)
function code(A, B, C, F)
	t_0 = Float64(Float64(B * B) - Float64(Float64(A * C) * 4.0))
	tmp = 0.0
	if (B <= 5.4e-69)
		tmp = Float64(Float64(-sqrt(Float64(Float64(2.0 * Float64(F * t_0)) * Float64(Float64(A + C) + Float64(C - A))))) / t_0);
	else
		tmp = Float64(sqrt(2.0) * Float64(-sqrt(Float64(F / B))));
	end
	return tmp
end
B = abs(B)
function tmp_2 = code(A, B, C, F)
	t_0 = (B * B) - ((A * C) * 4.0);
	tmp = 0.0;
	if (B <= 5.4e-69)
		tmp = -sqrt(((2.0 * (F * t_0)) * ((A + C) + (C - A)))) / t_0;
	else
		tmp = sqrt(2.0) * -sqrt((F / B));
	end
	tmp_2 = tmp;
end
NOTE: B should be positive before calling this function
code[A_, B_, C_, F_] := Block[{t$95$0 = N[(N[(B * B), $MachinePrecision] - N[(N[(A * C), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, 5.4e-69], N[((-N[Sqrt[N[(N[(2.0 * N[(F * t$95$0), $MachinePrecision]), $MachinePrecision] * N[(N[(A + C), $MachinePrecision] + N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], N[(N[Sqrt[2.0], $MachinePrecision] * (-N[Sqrt[N[(F / B), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]]]
\begin{array}{l}
B = |B|\\
\\
\begin{array}{l}
t_0 := B \cdot B - \left(A \cdot C\right) \cdot 4\\
\mathbf{if}\;B \leq 5.4 \cdot 10^{-69}:\\
\;\;\;\;\frac{-\sqrt{\left(2 \cdot \left(F \cdot t_0\right)\right) \cdot \left(\left(A + C\right) + \left(C - A\right)\right)}}{t_0}\\

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


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

    1. Initial program 18.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. Simplified18.8%

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

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

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

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

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

    if 5.3999999999999995e-69 < B

    1. Initial program 10.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 17.1% accurate, 4.7× speedup?

\[\begin{array}{l} B = |B|\\ \\ \begin{array}{l} t_0 := B \cdot B - \left(A \cdot C\right) \cdot 4\\ t_1 := 2 \cdot \left(F \cdot t_0\right)\\ \mathbf{if}\;C \leq -4.8 \cdot 10^{+75}:\\ \;\;\;\;\frac{-\sqrt{-16 \cdot \left(F \cdot \left(C \cdot \left(A \cdot A\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;C \leq 1.9 \cdot 10^{-162}:\\ \;\;\;\;\frac{-\sqrt{t_1 \cdot \left(\left(A - C\right) + \left(A + C\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{t_1 \cdot \left(\left(A + C\right) + \left(C - A\right)\right)}}{t_0}\\ \end{array} \end{array} \]
NOTE: B should be positive before calling this function
(FPCore (A B C F)
 :precision binary64
 (let* ((t_0 (- (* B B) (* (* A C) 4.0))) (t_1 (* 2.0 (* F t_0))))
   (if (<= C -4.8e+75)
     (/ (- (sqrt (* -16.0 (* F (* C (* A A)))))) t_0)
     (if (<= C 1.9e-162)
       (/ (- (sqrt (* t_1 (+ (- A C) (+ A C))))) t_0)
       (/ (- (sqrt (* t_1 (+ (+ A C) (- C A))))) t_0)))))
B = abs(B);
double code(double A, double B, double C, double F) {
	double t_0 = (B * B) - ((A * C) * 4.0);
	double t_1 = 2.0 * (F * t_0);
	double tmp;
	if (C <= -4.8e+75) {
		tmp = -sqrt((-16.0 * (F * (C * (A * A))))) / t_0;
	} else if (C <= 1.9e-162) {
		tmp = -sqrt((t_1 * ((A - C) + (A + C)))) / t_0;
	} else {
		tmp = -sqrt((t_1 * ((A + C) + (C - A)))) / t_0;
	}
	return tmp;
}
NOTE: B should be positive before calling this function
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
    real(8) :: t_1
    real(8) :: tmp
    t_0 = (b * b) - ((a * c) * 4.0d0)
    t_1 = 2.0d0 * (f * t_0)
    if (c <= (-4.8d+75)) then
        tmp = -sqrt(((-16.0d0) * (f * (c * (a * a))))) / t_0
    else if (c <= 1.9d-162) then
        tmp = -sqrt((t_1 * ((a - c) + (a + c)))) / t_0
    else
        tmp = -sqrt((t_1 * ((a + c) + (c - a)))) / t_0
    end if
    code = tmp
end function
B = Math.abs(B);
public static double code(double A, double B, double C, double F) {
	double t_0 = (B * B) - ((A * C) * 4.0);
	double t_1 = 2.0 * (F * t_0);
	double tmp;
	if (C <= -4.8e+75) {
		tmp = -Math.sqrt((-16.0 * (F * (C * (A * A))))) / t_0;
	} else if (C <= 1.9e-162) {
		tmp = -Math.sqrt((t_1 * ((A - C) + (A + C)))) / t_0;
	} else {
		tmp = -Math.sqrt((t_1 * ((A + C) + (C - A)))) / t_0;
	}
	return tmp;
}
B = abs(B)
def code(A, B, C, F):
	t_0 = (B * B) - ((A * C) * 4.0)
	t_1 = 2.0 * (F * t_0)
	tmp = 0
	if C <= -4.8e+75:
		tmp = -math.sqrt((-16.0 * (F * (C * (A * A))))) / t_0
	elif C <= 1.9e-162:
		tmp = -math.sqrt((t_1 * ((A - C) + (A + C)))) / t_0
	else:
		tmp = -math.sqrt((t_1 * ((A + C) + (C - A)))) / t_0
	return tmp
B = abs(B)
function code(A, B, C, F)
	t_0 = Float64(Float64(B * B) - Float64(Float64(A * C) * 4.0))
	t_1 = Float64(2.0 * Float64(F * t_0))
	tmp = 0.0
	if (C <= -4.8e+75)
		tmp = Float64(Float64(-sqrt(Float64(-16.0 * Float64(F * Float64(C * Float64(A * A)))))) / t_0);
	elseif (C <= 1.9e-162)
		tmp = Float64(Float64(-sqrt(Float64(t_1 * Float64(Float64(A - C) + Float64(A + C))))) / t_0);
	else
		tmp = Float64(Float64(-sqrt(Float64(t_1 * Float64(Float64(A + C) + Float64(C - A))))) / t_0);
	end
	return tmp
end
B = abs(B)
function tmp_2 = code(A, B, C, F)
	t_0 = (B * B) - ((A * C) * 4.0);
	t_1 = 2.0 * (F * t_0);
	tmp = 0.0;
	if (C <= -4.8e+75)
		tmp = -sqrt((-16.0 * (F * (C * (A * A))))) / t_0;
	elseif (C <= 1.9e-162)
		tmp = -sqrt((t_1 * ((A - C) + (A + C)))) / t_0;
	else
		tmp = -sqrt((t_1 * ((A + C) + (C - A)))) / t_0;
	end
	tmp_2 = tmp;
end
NOTE: B should be positive before calling this function
code[A_, B_, C_, F_] := Block[{t$95$0 = N[(N[(B * B), $MachinePrecision] - N[(N[(A * C), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(2.0 * N[(F * t$95$0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -4.8e+75], N[((-N[Sqrt[N[(-16.0 * N[(F * N[(C * N[(A * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], If[LessEqual[C, 1.9e-162], N[((-N[Sqrt[N[(t$95$1 * N[(N[(A - C), $MachinePrecision] + N[(A + C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], N[((-N[Sqrt[N[(t$95$1 * N[(N[(A + C), $MachinePrecision] + N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
B = |B|\\
\\
\begin{array}{l}
t_0 := B \cdot B - \left(A \cdot C\right) \cdot 4\\
t_1 := 2 \cdot \left(F \cdot t_0\right)\\
\mathbf{if}\;C \leq -4.8 \cdot 10^{+75}:\\
\;\;\;\;\frac{-\sqrt{-16 \cdot \left(F \cdot \left(C \cdot \left(A \cdot A\right)\right)\right)}}{t_0}\\

\mathbf{elif}\;C \leq 1.9 \cdot 10^{-162}:\\
\;\;\;\;\frac{-\sqrt{t_1 \cdot \left(\left(A - C\right) + \left(A + C\right)\right)}}{t_0}\\

\mathbf{else}:\\
\;\;\;\;\frac{-\sqrt{t_1 \cdot \left(\left(A + C\right) + \left(C - A\right)\right)}}{t_0}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if C < -4.8e75

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

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

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

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

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

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

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

    if -4.8e75 < C < 1.90000000000000002e-162

    1. Initial program 21.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. Simplified21.8%

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

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

    if 1.90000000000000002e-162 < C

    1. Initial program 18.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. Simplified18.0%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -4.8 \cdot 10^{+75}:\\ \;\;\;\;\frac{-\sqrt{-16 \cdot \left(F \cdot \left(C \cdot \left(A \cdot A\right)\right)\right)}}{B \cdot B - \left(A \cdot C\right) \cdot 4}\\ \mathbf{elif}\;C \leq 1.9 \cdot 10^{-162}:\\ \;\;\;\;\frac{-\sqrt{\left(2 \cdot \left(F \cdot \left(B \cdot B - \left(A \cdot C\right) \cdot 4\right)\right)\right) \cdot \left(\left(A - C\right) + \left(A + C\right)\right)}}{B \cdot B - \left(A \cdot C\right) \cdot 4}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{\left(2 \cdot \left(F \cdot \left(B \cdot B - \left(A \cdot C\right) \cdot 4\right)\right)\right) \cdot \left(\left(A + C\right) + \left(C - A\right)\right)}}{B \cdot B - \left(A \cdot C\right) \cdot 4}\\ \end{array} \]

Alternative 12: 13.2% accurate, 4.8× speedup?

\[\begin{array}{l} B = |B|\\ \\ \begin{array}{l} t_0 := B \cdot B - \left(A \cdot C\right) \cdot 4\\ \mathbf{if}\;C \leq -3.3 \cdot 10^{+75}:\\ \;\;\;\;\frac{-\sqrt{-16 \cdot \left(F \cdot \left(C \cdot \left(A \cdot A\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(t_0 \cdot \left(2 \cdot F\right)\right) \cdot \left(A + \left(A + C\right)\right)} \cdot \frac{-1}{t_0}\\ \end{array} \end{array} \]
NOTE: B should be positive before calling this function
(FPCore (A B C F)
 :precision binary64
 (let* ((t_0 (- (* B B) (* (* A C) 4.0))))
   (if (<= C -3.3e+75)
     (/ (- (sqrt (* -16.0 (* F (* C (* A A)))))) t_0)
     (* (sqrt (* (* t_0 (* 2.0 F)) (+ A (+ A C)))) (/ -1.0 t_0)))))
B = abs(B);
double code(double A, double B, double C, double F) {
	double t_0 = (B * B) - ((A * C) * 4.0);
	double tmp;
	if (C <= -3.3e+75) {
		tmp = -sqrt((-16.0 * (F * (C * (A * A))))) / t_0;
	} else {
		tmp = sqrt(((t_0 * (2.0 * F)) * (A + (A + C)))) * (-1.0 / t_0);
	}
	return tmp;
}
NOTE: B should be positive before calling this function
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
    real(8) :: tmp
    t_0 = (b * b) - ((a * c) * 4.0d0)
    if (c <= (-3.3d+75)) then
        tmp = -sqrt(((-16.0d0) * (f * (c * (a * a))))) / t_0
    else
        tmp = sqrt(((t_0 * (2.0d0 * f)) * (a + (a + c)))) * ((-1.0d0) / t_0)
    end if
    code = tmp
end function
B = Math.abs(B);
public static double code(double A, double B, double C, double F) {
	double t_0 = (B * B) - ((A * C) * 4.0);
	double tmp;
	if (C <= -3.3e+75) {
		tmp = -Math.sqrt((-16.0 * (F * (C * (A * A))))) / t_0;
	} else {
		tmp = Math.sqrt(((t_0 * (2.0 * F)) * (A + (A + C)))) * (-1.0 / t_0);
	}
	return tmp;
}
B = abs(B)
def code(A, B, C, F):
	t_0 = (B * B) - ((A * C) * 4.0)
	tmp = 0
	if C <= -3.3e+75:
		tmp = -math.sqrt((-16.0 * (F * (C * (A * A))))) / t_0
	else:
		tmp = math.sqrt(((t_0 * (2.0 * F)) * (A + (A + C)))) * (-1.0 / t_0)
	return tmp
B = abs(B)
function code(A, B, C, F)
	t_0 = Float64(Float64(B * B) - Float64(Float64(A * C) * 4.0))
	tmp = 0.0
	if (C <= -3.3e+75)
		tmp = Float64(Float64(-sqrt(Float64(-16.0 * Float64(F * Float64(C * Float64(A * A)))))) / t_0);
	else
		tmp = Float64(sqrt(Float64(Float64(t_0 * Float64(2.0 * F)) * Float64(A + Float64(A + C)))) * Float64(-1.0 / t_0));
	end
	return tmp
end
B = abs(B)
function tmp_2 = code(A, B, C, F)
	t_0 = (B * B) - ((A * C) * 4.0);
	tmp = 0.0;
	if (C <= -3.3e+75)
		tmp = -sqrt((-16.0 * (F * (C * (A * A))))) / t_0;
	else
		tmp = sqrt(((t_0 * (2.0 * F)) * (A + (A + C)))) * (-1.0 / t_0);
	end
	tmp_2 = tmp;
end
NOTE: B should be positive before calling this function
code[A_, B_, C_, F_] := Block[{t$95$0 = N[(N[(B * B), $MachinePrecision] - N[(N[(A * C), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -3.3e+75], N[((-N[Sqrt[N[(-16.0 * N[(F * N[(C * N[(A * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], N[(N[Sqrt[N[(N[(t$95$0 * N[(2.0 * F), $MachinePrecision]), $MachinePrecision] * N[(A + N[(A + C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(-1.0 / t$95$0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
B = |B|\\
\\
\begin{array}{l}
t_0 := B \cdot B - \left(A \cdot C\right) \cdot 4\\
\mathbf{if}\;C \leq -3.3 \cdot 10^{+75}:\\
\;\;\;\;\frac{-\sqrt{-16 \cdot \left(F \cdot \left(C \cdot \left(A \cdot A\right)\right)\right)}}{t_0}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{\left(t_0 \cdot \left(2 \cdot F\right)\right) \cdot \left(A + \left(A + C\right)\right)} \cdot \frac{-1}{t_0}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if C < -3.29999999999999998e75

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

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

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

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

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

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

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

    if -3.29999999999999998e75 < C

    1. Initial program 19.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 13.2% accurate, 4.8× speedup?

\[\begin{array}{l} B = |B|\\ \\ \begin{array}{l} t_0 := B \cdot B - \left(A \cdot C\right) \cdot 4\\ \mathbf{if}\;C \leq -3.3 \cdot 10^{+75}:\\ \;\;\;\;\frac{-\sqrt{-16 \cdot \left(F \cdot \left(C \cdot \left(A \cdot A\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{\left(A + \left(A + C\right)\right) \cdot \left(2 \cdot \left(F \cdot t_0\right)\right)}}{t_0}\\ \end{array} \end{array} \]
NOTE: B should be positive before calling this function
(FPCore (A B C F)
 :precision binary64
 (let* ((t_0 (- (* B B) (* (* A C) 4.0))))
   (if (<= C -3.3e+75)
     (/ (- (sqrt (* -16.0 (* F (* C (* A A)))))) t_0)
     (/ (- (sqrt (* (+ A (+ A C)) (* 2.0 (* F t_0))))) t_0))))
B = abs(B);
double code(double A, double B, double C, double F) {
	double t_0 = (B * B) - ((A * C) * 4.0);
	double tmp;
	if (C <= -3.3e+75) {
		tmp = -sqrt((-16.0 * (F * (C * (A * A))))) / t_0;
	} else {
		tmp = -sqrt(((A + (A + C)) * (2.0 * (F * t_0)))) / t_0;
	}
	return tmp;
}
NOTE: B should be positive before calling this function
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
    real(8) :: tmp
    t_0 = (b * b) - ((a * c) * 4.0d0)
    if (c <= (-3.3d+75)) then
        tmp = -sqrt(((-16.0d0) * (f * (c * (a * a))))) / t_0
    else
        tmp = -sqrt(((a + (a + c)) * (2.0d0 * (f * t_0)))) / t_0
    end if
    code = tmp
end function
B = Math.abs(B);
public static double code(double A, double B, double C, double F) {
	double t_0 = (B * B) - ((A * C) * 4.0);
	double tmp;
	if (C <= -3.3e+75) {
		tmp = -Math.sqrt((-16.0 * (F * (C * (A * A))))) / t_0;
	} else {
		tmp = -Math.sqrt(((A + (A + C)) * (2.0 * (F * t_0)))) / t_0;
	}
	return tmp;
}
B = abs(B)
def code(A, B, C, F):
	t_0 = (B * B) - ((A * C) * 4.0)
	tmp = 0
	if C <= -3.3e+75:
		tmp = -math.sqrt((-16.0 * (F * (C * (A * A))))) / t_0
	else:
		tmp = -math.sqrt(((A + (A + C)) * (2.0 * (F * t_0)))) / t_0
	return tmp
B = abs(B)
function code(A, B, C, F)
	t_0 = Float64(Float64(B * B) - Float64(Float64(A * C) * 4.0))
	tmp = 0.0
	if (C <= -3.3e+75)
		tmp = Float64(Float64(-sqrt(Float64(-16.0 * Float64(F * Float64(C * Float64(A * A)))))) / t_0);
	else
		tmp = Float64(Float64(-sqrt(Float64(Float64(A + Float64(A + C)) * Float64(2.0 * Float64(F * t_0))))) / t_0);
	end
	return tmp
end
B = abs(B)
function tmp_2 = code(A, B, C, F)
	t_0 = (B * B) - ((A * C) * 4.0);
	tmp = 0.0;
	if (C <= -3.3e+75)
		tmp = -sqrt((-16.0 * (F * (C * (A * A))))) / t_0;
	else
		tmp = -sqrt(((A + (A + C)) * (2.0 * (F * t_0)))) / t_0;
	end
	tmp_2 = tmp;
end
NOTE: B should be positive before calling this function
code[A_, B_, C_, F_] := Block[{t$95$0 = N[(N[(B * B), $MachinePrecision] - N[(N[(A * C), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -3.3e+75], N[((-N[Sqrt[N[(-16.0 * N[(F * N[(C * N[(A * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], N[((-N[Sqrt[N[(N[(A + N[(A + C), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(F * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision]]]
\begin{array}{l}
B = |B|\\
\\
\begin{array}{l}
t_0 := B \cdot B - \left(A \cdot C\right) \cdot 4\\
\mathbf{if}\;C \leq -3.3 \cdot 10^{+75}:\\
\;\;\;\;\frac{-\sqrt{-16 \cdot \left(F \cdot \left(C \cdot \left(A \cdot A\right)\right)\right)}}{t_0}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if C < -3.29999999999999998e75

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

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

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

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

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

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

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

    if -3.29999999999999998e75 < C

    1. Initial program 19.8%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq -3.3 \cdot 10^{+75}:\\ \;\;\;\;\frac{-\sqrt{-16 \cdot \left(F \cdot \left(C \cdot \left(A \cdot A\right)\right)\right)}}{B \cdot B - \left(A \cdot C\right) \cdot 4}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{\left(A + \left(A + C\right)\right) \cdot \left(2 \cdot \left(F \cdot \left(B \cdot B - \left(A \cdot C\right) \cdot 4\right)\right)\right)}}{B \cdot B - \left(A \cdot C\right) \cdot 4}\\ \end{array} \]

Alternative 14: 12.0% accurate, 5.2× speedup?

\[\begin{array}{l} B = |B|\\ \\ \begin{array}{l} \mathbf{if}\;C \leq 3.55 \cdot 10^{-252}:\\ \;\;\;\;\frac{-\sqrt{-16 \cdot \left(F \cdot \left(C \cdot \left(A \cdot A\right)\right)\right)}}{B \cdot B - \left(A \cdot C\right) \cdot 4}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{F \cdot C} \cdot \frac{-2}{B}\\ \end{array} \end{array} \]
NOTE: B should be positive before calling this function
(FPCore (A B C F)
 :precision binary64
 (if (<= C 3.55e-252)
   (/ (- (sqrt (* -16.0 (* F (* C (* A A)))))) (- (* B B) (* (* A C) 4.0)))
   (* (sqrt (* F C)) (/ (- 2.0) B))))
B = abs(B);
double code(double A, double B, double C, double F) {
	double tmp;
	if (C <= 3.55e-252) {
		tmp = -sqrt((-16.0 * (F * (C * (A * A))))) / ((B * B) - ((A * C) * 4.0));
	} else {
		tmp = sqrt((F * C)) * (-2.0 / B);
	}
	return tmp;
}
NOTE: B should be positive before calling this function
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) :: tmp
    if (c <= 3.55d-252) then
        tmp = -sqrt(((-16.0d0) * (f * (c * (a * a))))) / ((b * b) - ((a * c) * 4.0d0))
    else
        tmp = sqrt((f * c)) * (-2.0d0 / b)
    end if
    code = tmp
end function
B = Math.abs(B);
public static double code(double A, double B, double C, double F) {
	double tmp;
	if (C <= 3.55e-252) {
		tmp = -Math.sqrt((-16.0 * (F * (C * (A * A))))) / ((B * B) - ((A * C) * 4.0));
	} else {
		tmp = Math.sqrt((F * C)) * (-2.0 / B);
	}
	return tmp;
}
B = abs(B)
def code(A, B, C, F):
	tmp = 0
	if C <= 3.55e-252:
		tmp = -math.sqrt((-16.0 * (F * (C * (A * A))))) / ((B * B) - ((A * C) * 4.0))
	else:
		tmp = math.sqrt((F * C)) * (-2.0 / B)
	return tmp
B = abs(B)
function code(A, B, C, F)
	tmp = 0.0
	if (C <= 3.55e-252)
		tmp = Float64(Float64(-sqrt(Float64(-16.0 * Float64(F * Float64(C * Float64(A * A)))))) / Float64(Float64(B * B) - Float64(Float64(A * C) * 4.0)));
	else
		tmp = Float64(sqrt(Float64(F * C)) * Float64(Float64(-2.0) / B));
	end
	return tmp
end
B = abs(B)
function tmp_2 = code(A, B, C, F)
	tmp = 0.0;
	if (C <= 3.55e-252)
		tmp = -sqrt((-16.0 * (F * (C * (A * A))))) / ((B * B) - ((A * C) * 4.0));
	else
		tmp = sqrt((F * C)) * (-2.0 / B);
	end
	tmp_2 = tmp;
end
NOTE: B should be positive before calling this function
code[A_, B_, C_, F_] := If[LessEqual[C, 3.55e-252], N[((-N[Sqrt[N[(-16.0 * N[(F * N[(C * N[(A * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / N[(N[(B * B), $MachinePrecision] - N[(N[(A * C), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(F * C), $MachinePrecision]], $MachinePrecision] * N[((-2.0) / B), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B = |B|\\
\\
\begin{array}{l}
\mathbf{if}\;C \leq 3.55 \cdot 10^{-252}:\\
\;\;\;\;\frac{-\sqrt{-16 \cdot \left(F \cdot \left(C \cdot \left(A \cdot A\right)\right)\right)}}{B \cdot B - \left(A \cdot C\right) \cdot 4}\\

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


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

    1. Initial program 14.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. Simplified14.3%

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

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

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

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

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

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

    if 3.55e-252 < C

    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. Simplified18.3%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\frac{\color{blue}{\sqrt{2} \cdot \sqrt{2}}}{B} \cdot \sqrt{C \cdot F} \]
      3. rem-square-sqrt4.9%

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

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

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

Alternative 15: 8.1% accurate, 5.7× speedup?

\[\begin{array}{l} B = |B|\\ \\ \begin{array}{l} \mathbf{if}\;A \leq 1.4 \cdot 10^{-223}:\\ \;\;\;\;\sqrt{F \cdot C} \cdot \frac{-2}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{{\left(F \cdot A\right)}^{0.5} \cdot \left(-2\right)}{B}\\ \end{array} \end{array} \]
NOTE: B should be positive before calling this function
(FPCore (A B C F)
 :precision binary64
 (if (<= A 1.4e-223)
   (* (sqrt (* F C)) (/ (- 2.0) B))
   (/ (* (pow (* F A) 0.5) (- 2.0)) B)))
B = abs(B);
double code(double A, double B, double C, double F) {
	double tmp;
	if (A <= 1.4e-223) {
		tmp = sqrt((F * C)) * (-2.0 / B);
	} else {
		tmp = (pow((F * A), 0.5) * -2.0) / B;
	}
	return tmp;
}
NOTE: B should be positive before calling this function
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) :: tmp
    if (a <= 1.4d-223) then
        tmp = sqrt((f * c)) * (-2.0d0 / b)
    else
        tmp = (((f * a) ** 0.5d0) * -2.0d0) / b
    end if
    code = tmp
end function
B = Math.abs(B);
public static double code(double A, double B, double C, double F) {
	double tmp;
	if (A <= 1.4e-223) {
		tmp = Math.sqrt((F * C)) * (-2.0 / B);
	} else {
		tmp = (Math.pow((F * A), 0.5) * -2.0) / B;
	}
	return tmp;
}
B = abs(B)
def code(A, B, C, F):
	tmp = 0
	if A <= 1.4e-223:
		tmp = math.sqrt((F * C)) * (-2.0 / B)
	else:
		tmp = (math.pow((F * A), 0.5) * -2.0) / B
	return tmp
B = abs(B)
function code(A, B, C, F)
	tmp = 0.0
	if (A <= 1.4e-223)
		tmp = Float64(sqrt(Float64(F * C)) * Float64(Float64(-2.0) / B));
	else
		tmp = Float64(Float64((Float64(F * A) ^ 0.5) * Float64(-2.0)) / B);
	end
	return tmp
end
B = abs(B)
function tmp_2 = code(A, B, C, F)
	tmp = 0.0;
	if (A <= 1.4e-223)
		tmp = sqrt((F * C)) * (-2.0 / B);
	else
		tmp = (((F * A) ^ 0.5) * -2.0) / B;
	end
	tmp_2 = tmp;
end
NOTE: B should be positive before calling this function
code[A_, B_, C_, F_] := If[LessEqual[A, 1.4e-223], N[(N[Sqrt[N[(F * C), $MachinePrecision]], $MachinePrecision] * N[((-2.0) / B), $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[N[(F * A), $MachinePrecision], 0.5], $MachinePrecision] * (-2.0)), $MachinePrecision] / B), $MachinePrecision]]
\begin{array}{l}
B = |B|\\
\\
\begin{array}{l}
\mathbf{if}\;A \leq 1.4 \cdot 10^{-223}:\\
\;\;\;\;\sqrt{F \cdot C} \cdot \frac{-2}{B}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if A < 1.40000000000000007e-223

    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. Simplified13.3%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\frac{\color{blue}{\sqrt{2} \cdot \sqrt{2}}}{B} \cdot \sqrt{C \cdot F} \]
      3. rem-square-sqrt4.4%

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

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

    if 1.40000000000000007e-223 < A

    1. Initial program 20.6%

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

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

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

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

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

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

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

        \[\leadsto -\frac{\sqrt{A \cdot F} \cdot \color{blue}{2}}{B} \]
    6. Simplified2.5%

      \[\leadsto \color{blue}{-\frac{\sqrt{A \cdot F} \cdot 2}{B}} \]
    7. Step-by-step derivation
      1. pow1/22.7%

        \[\leadsto -\frac{\color{blue}{{\left(A \cdot F\right)}^{0.5}} \cdot 2}{B} \]
      2. *-commutative2.7%

        \[\leadsto -\frac{{\color{blue}{\left(F \cdot A\right)}}^{0.5} \cdot 2}{B} \]
    8. Applied egg-rr2.7%

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

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

Alternative 16: 8.1% accurate, 5.8× speedup?

\[\begin{array}{l} B = |B|\\ \\ \begin{array}{l} \mathbf{if}\;A \leq 1.35 \cdot 10^{-224}:\\ \;\;\;\;\sqrt{F \cdot C} \cdot \frac{-2}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot \left(-\sqrt{F \cdot A}\right)}{B}\\ \end{array} \end{array} \]
NOTE: B should be positive before calling this function
(FPCore (A B C F)
 :precision binary64
 (if (<= A 1.35e-224)
   (* (sqrt (* F C)) (/ (- 2.0) B))
   (/ (* 2.0 (- (sqrt (* F A)))) B)))
B = abs(B);
double code(double A, double B, double C, double F) {
	double tmp;
	if (A <= 1.35e-224) {
		tmp = sqrt((F * C)) * (-2.0 / B);
	} else {
		tmp = (2.0 * -sqrt((F * A))) / B;
	}
	return tmp;
}
NOTE: B should be positive before calling this function
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) :: tmp
    if (a <= 1.35d-224) then
        tmp = sqrt((f * c)) * (-2.0d0 / b)
    else
        tmp = (2.0d0 * -sqrt((f * a))) / b
    end if
    code = tmp
end function
B = Math.abs(B);
public static double code(double A, double B, double C, double F) {
	double tmp;
	if (A <= 1.35e-224) {
		tmp = Math.sqrt((F * C)) * (-2.0 / B);
	} else {
		tmp = (2.0 * -Math.sqrt((F * A))) / B;
	}
	return tmp;
}
B = abs(B)
def code(A, B, C, F):
	tmp = 0
	if A <= 1.35e-224:
		tmp = math.sqrt((F * C)) * (-2.0 / B)
	else:
		tmp = (2.0 * -math.sqrt((F * A))) / B
	return tmp
B = abs(B)
function code(A, B, C, F)
	tmp = 0.0
	if (A <= 1.35e-224)
		tmp = Float64(sqrt(Float64(F * C)) * Float64(Float64(-2.0) / B));
	else
		tmp = Float64(Float64(2.0 * Float64(-sqrt(Float64(F * A)))) / B);
	end
	return tmp
end
B = abs(B)
function tmp_2 = code(A, B, C, F)
	tmp = 0.0;
	if (A <= 1.35e-224)
		tmp = sqrt((F * C)) * (-2.0 / B);
	else
		tmp = (2.0 * -sqrt((F * A))) / B;
	end
	tmp_2 = tmp;
end
NOTE: B should be positive before calling this function
code[A_, B_, C_, F_] := If[LessEqual[A, 1.35e-224], N[(N[Sqrt[N[(F * C), $MachinePrecision]], $MachinePrecision] * N[((-2.0) / B), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * (-N[Sqrt[N[(F * A), $MachinePrecision]], $MachinePrecision])), $MachinePrecision] / B), $MachinePrecision]]
\begin{array}{l}
B = |B|\\
\\
\begin{array}{l}
\mathbf{if}\;A \leq 1.35 \cdot 10^{-224}:\\
\;\;\;\;\sqrt{F \cdot C} \cdot \frac{-2}{B}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if A < 1.34999999999999999e-224

    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. Simplified13.3%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\frac{\color{blue}{\sqrt{2} \cdot \sqrt{2}}}{B} \cdot \sqrt{C \cdot F} \]
      3. rem-square-sqrt4.4%

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

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

    if 1.34999999999999999e-224 < A

    1. Initial program 20.6%

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

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

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

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

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

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

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

        \[\leadsto -\frac{\sqrt{A \cdot F} \cdot \color{blue}{2}}{B} \]
    6. Simplified2.5%

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

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

Alternative 17: 4.8% accurate, 5.9× speedup?

\[\begin{array}{l} B = |B|\\ \\ \sqrt{F \cdot C} \cdot \frac{-2}{B} \end{array} \]
NOTE: B should be positive before calling this function
(FPCore (A B C F) :precision binary64 (* (sqrt (* F C)) (/ (- 2.0) B)))
B = abs(B);
double code(double A, double B, double C, double F) {
	return sqrt((F * C)) * (-2.0 / B);
}
NOTE: B should be positive before calling this function
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
    code = sqrt((f * c)) * (-2.0d0 / b)
end function
B = Math.abs(B);
public static double code(double A, double B, double C, double F) {
	return Math.sqrt((F * C)) * (-2.0 / B);
}
B = abs(B)
def code(A, B, C, F):
	return math.sqrt((F * C)) * (-2.0 / B)
B = abs(B)
function code(A, B, C, F)
	return Float64(sqrt(Float64(F * C)) * Float64(Float64(-2.0) / B))
end
B = abs(B)
function tmp = code(A, B, C, F)
	tmp = sqrt((F * C)) * (-2.0 / B);
end
NOTE: B should be positive before calling this function
code[A_, B_, C_, F_] := N[(N[Sqrt[N[(F * C), $MachinePrecision]], $MachinePrecision] * N[((-2.0) / B), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
B = |B|\\
\\
\sqrt{F \cdot C} \cdot \frac{-2}{B}
\end{array}
Derivation
  1. Initial program 16.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. Simplified16.4%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto -\frac{\color{blue}{\sqrt{2} \cdot \sqrt{2}}}{B} \cdot \sqrt{C \cdot F} \]
    3. rem-square-sqrt2.9%

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

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

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

Reproduce

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