ABCF->ab-angle a

Percentage Accurate: 18.8% → 52.4%
Time: 29.0s
Alternatives: 17
Speedup: 4.8×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 17 alternatives:

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

Initial Program: 18.8% accurate, 1.0× speedup?

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

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

Alternative 1: 52.4% accurate, 1.0× speedup?

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

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


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

    1. Initial program 32.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. Simplified38.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. Step-by-step derivation
      1. sqrt-prod45.3%

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

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

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

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

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

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

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

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

        \[\leadsto -\frac{\sqrt{2 \cdot \left(F \cdot \color{blue}{\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)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]
      5. unpow244.3%

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

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

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

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

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

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

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

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

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

    if 1.99999999999999989e119 < (pow.f64 B 2)

    1. Initial program 10.1%

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

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

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

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

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

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

Alternative 2: 52.5% accurate, 1.5× speedup?

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

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


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

    1. Initial program 29.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. Simplified29.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. Step-by-step derivation
      1. sqrt-prod33.1%

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

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

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

        \[\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+33.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. unpow233.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-udef39.6%

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

      \[\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 2.3999999999999999e61 < B

    1. Initial program 5.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. Simplified5.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 0 13.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-neg13.2%

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

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

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

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

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

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

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

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

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

Alternative 3: 44.0% accurate, 1.9× speedup?

\[\begin{array}{l} B = |B|\\ \\ \begin{array}{l} \mathbf{if}\;B \leq 4.7 \cdot 10^{+111}:\\ \;\;\;\;\frac{\sqrt{2 \cdot \left(F \cdot \left(B \cdot B + -4 \cdot \left(C \cdot A\right)\right)\right)} \cdot \left(-\sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)}\right)}{B \cdot B - \left(C \cdot A\right) \cdot 4}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(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 4.7e+111)
   (/
    (*
     (sqrt (* 2.0 (* F (+ (* B B) (* -4.0 (* C A))))))
     (- (sqrt (+ A (+ C (hypot B (- A C)))))))
    (- (* B B) (* (* C A) 4.0)))
   (* (/ (sqrt 2.0) B) (- (sqrt (* F (+ A (hypot B A))))))))
B = abs(B);
double code(double A, double B, double C, double F) {
	double tmp;
	if (B <= 4.7e+111) {
		tmp = (sqrt((2.0 * (F * ((B * B) + (-4.0 * (C * A)))))) * -sqrt((A + (C + hypot(B, (A - C)))))) / ((B * B) - ((C * A) * 4.0));
	} else {
		tmp = (sqrt(2.0) / B) * -sqrt((F * (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 <= 4.7e+111) {
		tmp = (Math.sqrt((2.0 * (F * ((B * B) + (-4.0 * (C * A)))))) * -Math.sqrt((A + (C + Math.hypot(B, (A - C)))))) / ((B * B) - ((C * A) * 4.0));
	} else {
		tmp = (Math.sqrt(2.0) / B) * -Math.sqrt((F * (A + Math.hypot(B, A))));
	}
	return tmp;
}
B = abs(B)
def code(A, B, C, F):
	tmp = 0
	if B <= 4.7e+111:
		tmp = (math.sqrt((2.0 * (F * ((B * B) + (-4.0 * (C * A)))))) * -math.sqrt((A + (C + math.hypot(B, (A - C)))))) / ((B * B) - ((C * A) * 4.0))
	else:
		tmp = (math.sqrt(2.0) / B) * -math.sqrt((F * (A + math.hypot(B, A))))
	return tmp
B = abs(B)
function code(A, B, C, F)
	tmp = 0.0
	if (B <= 4.7e+111)
		tmp = Float64(Float64(sqrt(Float64(2.0 * Float64(F * Float64(Float64(B * B) + Float64(-4.0 * Float64(C * A)))))) * Float64(-sqrt(Float64(A + Float64(C + hypot(B, Float64(A - C))))))) / Float64(Float64(B * B) - Float64(Float64(C * A) * 4.0)));
	else
		tmp = Float64(Float64(sqrt(2.0) / B) * Float64(-sqrt(Float64(F * 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 <= 4.7e+111)
		tmp = (sqrt((2.0 * (F * ((B * B) + (-4.0 * (C * A)))))) * -sqrt((A + (C + hypot(B, (A - C)))))) / ((B * B) - ((C * A) * 4.0));
	else
		tmp = (sqrt(2.0) / B) * -sqrt((F * (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, 4.7e+111], N[(N[(N[Sqrt[N[(2.0 * N[(F * N[(N[(B * B), $MachinePrecision] + N[(-4.0 * N[(C * A), $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[(C * A), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B), $MachinePrecision] * (-N[Sqrt[N[(F * 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 4.7 \cdot 10^{+111}:\\
\;\;\;\;\frac{\sqrt{2 \cdot \left(F \cdot \left(B \cdot B + -4 \cdot \left(C \cdot A\right)\right)\right)} \cdot \left(-\sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)}\right)}{B \cdot B - \left(C \cdot A\right) \cdot 4}\\

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


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

    1. Initial program 29.0%

      \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
    2. Simplified29.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. sqrt-prod32.5%

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

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

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

        \[\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+32.7%

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

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

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

      \[\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 4.70000000000000008e111 < B

    1. Initial program 3.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. Simplified3.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. Taylor expanded in C around 0 7.7%

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

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

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

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

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

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

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

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

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

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

Alternative 4: 39.5% accurate, 2.0× speedup?

\[\begin{array}{l} B = |B|\\ \\ \begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(C \cdot A\right)\\ \mathbf{if}\;B \leq 1.5 \cdot 10^{+32}:\\ \;\;\;\;\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{F \cdot \left(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
 (let* ((t_0 (+ (* B B) (* -4.0 (* C A)))))
   (if (<= B 1.5e+32)
     (*
      (sqrt (* 2.0 (* (* F t_0) (+ A (+ C (hypot B (- A C)))))))
      (/ -1.0 t_0))
     (* (/ (sqrt 2.0) B) (- (sqrt (* F (+ A (hypot B A)))))))))
B = abs(B);
double code(double A, double B, double C, double F) {
	double t_0 = (B * B) + (-4.0 * (C * A));
	double tmp;
	if (B <= 1.5e+32) {
		tmp = sqrt((2.0 * ((F * t_0) * (A + (C + hypot(B, (A - C))))))) * (-1.0 / t_0);
	} else {
		tmp = (sqrt(2.0) / B) * -sqrt((F * (A + hypot(B, A))));
	}
	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 * (C * A));
	double tmp;
	if (B <= 1.5e+32) {
		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((F * (A + Math.hypot(B, A))));
	}
	return tmp;
}
B = abs(B)
def code(A, B, C, F):
	t_0 = (B * B) + (-4.0 * (C * A))
	tmp = 0
	if B <= 1.5e+32:
		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((F * (A + math.hypot(B, A))))
	return tmp
B = abs(B)
function code(A, B, C, F)
	t_0 = Float64(Float64(B * B) + Float64(-4.0 * Float64(C * A)))
	tmp = 0.0
	if (B <= 1.5e+32)
		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(Float64(F * Float64(A + hypot(B, A))))));
	end
	return tmp
end
B = abs(B)
function tmp_2 = code(A, B, C, F)
	t_0 = (B * B) + (-4.0 * (C * A));
	tmp = 0.0;
	if (B <= 1.5e+32)
		tmp = sqrt((2.0 * ((F * t_0) * (A + (C + hypot(B, (A - C))))))) * (-1.0 / t_0);
	else
		tmp = (sqrt(2.0) / B) * -sqrt((F * (A + hypot(B, A))));
	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[(C * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, 1.5e+32], 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[Sqrt[N[(F * N[(A + N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]]]
\begin{array}{l}
B = |B|\\
\\
\begin{array}{l}
t_0 := B \cdot B + -4 \cdot \left(C \cdot A\right)\\
\mathbf{if}\;B \leq 1.5 \cdot 10^{+32}:\\
\;\;\;\;\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{F \cdot \left(A + \mathsf{hypot}\left(B, A\right)\right)}\right)\\


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

    1. Initial program 29.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. Simplified29.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. Step-by-step derivation
      1. div-inv29.8%

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

      \[\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 1.5e32 < B

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 31.3% accurate, 2.7× speedup?

\[\begin{array}{l} B = |B|\\ \\ \begin{array}{l} t_0 := B \cdot B - \left(C \cdot A\right) \cdot 4\\ t_1 := 2 \cdot \left(F \cdot t_0\right)\\ \mathbf{if}\;A \leq -3.4 \cdot 10^{+91}:\\ \;\;\;\;\frac{-\sqrt{t_1 \cdot \left(2 \cdot C\right)}}{t_0}\\ \mathbf{elif}\;A \leq 1.72 \cdot 10^{-283}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{B \cdot F}\right)\\ \mathbf{elif}\;A \leq 5 \cdot 10^{-233}:\\ \;\;\;\;\frac{-\sqrt{\left(C + \mathsf{hypot}\left(C, B\right)\right) \cdot t_1}}{t_0}\\ \mathbf{elif}\;A \leq 2.3 \cdot 10^{-69}:\\ \;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\ \mathbf{elif}\;A \leq 5.2 \cdot 10^{-38}:\\ \;\;\;\;\frac{\sqrt{t_1} \cdot \left(-\sqrt{2 \cdot C}\right)}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{t_1 \cdot \left(2 \cdot A\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) (* (* C A) 4.0))) (t_1 (* 2.0 (* F t_0))))
   (if (<= A -3.4e+91)
     (/ (- (sqrt (* t_1 (* 2.0 C)))) t_0)
     (if (<= A 1.72e-283)
       (* (/ (sqrt 2.0) B) (- (sqrt (* B F))))
       (if (<= A 5e-233)
         (/ (- (sqrt (* (+ C (hypot C B)) t_1))) t_0)
         (if (<= A 2.3e-69)
           (* (sqrt 2.0) (- (sqrt (/ F B))))
           (if (<= A 5.2e-38)
             (/ (* (sqrt t_1) (- (sqrt (* 2.0 C)))) t_0)
             (/ (- (sqrt (* t_1 (* 2.0 A)))) t_0))))))))
B = abs(B);
double code(double A, double B, double C, double F) {
	double t_0 = (B * B) - ((C * A) * 4.0);
	double t_1 = 2.0 * (F * t_0);
	double tmp;
	if (A <= -3.4e+91) {
		tmp = -sqrt((t_1 * (2.0 * C))) / t_0;
	} else if (A <= 1.72e-283) {
		tmp = (sqrt(2.0) / B) * -sqrt((B * F));
	} else if (A <= 5e-233) {
		tmp = -sqrt(((C + hypot(C, B)) * t_1)) / t_0;
	} else if (A <= 2.3e-69) {
		tmp = sqrt(2.0) * -sqrt((F / B));
	} else if (A <= 5.2e-38) {
		tmp = (sqrt(t_1) * -sqrt((2.0 * C))) / t_0;
	} else {
		tmp = -sqrt((t_1 * (2.0 * A))) / t_0;
	}
	return tmp;
}
B = Math.abs(B);
public static double code(double A, double B, double C, double F) {
	double t_0 = (B * B) - ((C * A) * 4.0);
	double t_1 = 2.0 * (F * t_0);
	double tmp;
	if (A <= -3.4e+91) {
		tmp = -Math.sqrt((t_1 * (2.0 * C))) / t_0;
	} else if (A <= 1.72e-283) {
		tmp = (Math.sqrt(2.0) / B) * -Math.sqrt((B * F));
	} else if (A <= 5e-233) {
		tmp = -Math.sqrt(((C + Math.hypot(C, B)) * t_1)) / t_0;
	} else if (A <= 2.3e-69) {
		tmp = Math.sqrt(2.0) * -Math.sqrt((F / B));
	} else if (A <= 5.2e-38) {
		tmp = (Math.sqrt(t_1) * -Math.sqrt((2.0 * C))) / t_0;
	} else {
		tmp = -Math.sqrt((t_1 * (2.0 * A))) / t_0;
	}
	return tmp;
}
B = abs(B)
def code(A, B, C, F):
	t_0 = (B * B) - ((C * A) * 4.0)
	t_1 = 2.0 * (F * t_0)
	tmp = 0
	if A <= -3.4e+91:
		tmp = -math.sqrt((t_1 * (2.0 * C))) / t_0
	elif A <= 1.72e-283:
		tmp = (math.sqrt(2.0) / B) * -math.sqrt((B * F))
	elif A <= 5e-233:
		tmp = -math.sqrt(((C + math.hypot(C, B)) * t_1)) / t_0
	elif A <= 2.3e-69:
		tmp = math.sqrt(2.0) * -math.sqrt((F / B))
	elif A <= 5.2e-38:
		tmp = (math.sqrt(t_1) * -math.sqrt((2.0 * C))) / t_0
	else:
		tmp = -math.sqrt((t_1 * (2.0 * A))) / t_0
	return tmp
B = abs(B)
function code(A, B, C, F)
	t_0 = Float64(Float64(B * B) - Float64(Float64(C * A) * 4.0))
	t_1 = Float64(2.0 * Float64(F * t_0))
	tmp = 0.0
	if (A <= -3.4e+91)
		tmp = Float64(Float64(-sqrt(Float64(t_1 * Float64(2.0 * C)))) / t_0);
	elseif (A <= 1.72e-283)
		tmp = Float64(Float64(sqrt(2.0) / B) * Float64(-sqrt(Float64(B * F))));
	elseif (A <= 5e-233)
		tmp = Float64(Float64(-sqrt(Float64(Float64(C + hypot(C, B)) * t_1))) / t_0);
	elseif (A <= 2.3e-69)
		tmp = Float64(sqrt(2.0) * Float64(-sqrt(Float64(F / B))));
	elseif (A <= 5.2e-38)
		tmp = Float64(Float64(sqrt(t_1) * Float64(-sqrt(Float64(2.0 * C)))) / t_0);
	else
		tmp = Float64(Float64(-sqrt(Float64(t_1 * Float64(2.0 * A)))) / t_0);
	end
	return tmp
end
B = abs(B)
function tmp_2 = code(A, B, C, F)
	t_0 = (B * B) - ((C * A) * 4.0);
	t_1 = 2.0 * (F * t_0);
	tmp = 0.0;
	if (A <= -3.4e+91)
		tmp = -sqrt((t_1 * (2.0 * C))) / t_0;
	elseif (A <= 1.72e-283)
		tmp = (sqrt(2.0) / B) * -sqrt((B * F));
	elseif (A <= 5e-233)
		tmp = -sqrt(((C + hypot(C, B)) * t_1)) / t_0;
	elseif (A <= 2.3e-69)
		tmp = sqrt(2.0) * -sqrt((F / B));
	elseif (A <= 5.2e-38)
		tmp = (sqrt(t_1) * -sqrt((2.0 * C))) / t_0;
	else
		tmp = -sqrt((t_1 * (2.0 * 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[(C * A), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(2.0 * N[(F * t$95$0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -3.4e+91], N[((-N[Sqrt[N[(t$95$1 * N[(2.0 * C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], If[LessEqual[A, 1.72e-283], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B), $MachinePrecision] * (-N[Sqrt[N[(B * F), $MachinePrecision]], $MachinePrecision])), $MachinePrecision], If[LessEqual[A, 5e-233], N[((-N[Sqrt[N[(N[(C + N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], If[LessEqual[A, 2.3e-69], N[(N[Sqrt[2.0], $MachinePrecision] * (-N[Sqrt[N[(F / B), $MachinePrecision]], $MachinePrecision])), $MachinePrecision], If[LessEqual[A, 5.2e-38], N[(N[(N[Sqrt[t$95$1], $MachinePrecision] * (-N[Sqrt[N[(2.0 * C), $MachinePrecision]], $MachinePrecision])), $MachinePrecision] / t$95$0), $MachinePrecision], N[((-N[Sqrt[N[(t$95$1 * N[(2.0 * A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision]]]]]]]]
\begin{array}{l}
B = |B|\\
\\
\begin{array}{l}
t_0 := B \cdot B - \left(C \cdot A\right) \cdot 4\\
t_1 := 2 \cdot \left(F \cdot t_0\right)\\
\mathbf{if}\;A \leq -3.4 \cdot 10^{+91}:\\
\;\;\;\;\frac{-\sqrt{t_1 \cdot \left(2 \cdot C\right)}}{t_0}\\

\mathbf{elif}\;A \leq 1.72 \cdot 10^{-283}:\\
\;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{B \cdot F}\right)\\

\mathbf{elif}\;A \leq 5 \cdot 10^{-233}:\\
\;\;\;\;\frac{-\sqrt{\left(C + \mathsf{hypot}\left(C, B\right)\right) \cdot t_1}}{t_0}\\

\mathbf{elif}\;A \leq 2.3 \cdot 10^{-69}:\\
\;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\

\mathbf{elif}\;A \leq 5.2 \cdot 10^{-38}:\\
\;\;\;\;\frac{\sqrt{t_1} \cdot \left(-\sqrt{2 \cdot C}\right)}{t_0}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if A < -3.4000000000000001e91

    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 37.7%

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

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

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

    if -3.4000000000000001e91 < A < 1.7200000000000001e-283

    1. Initial program 28.7%

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(C + \color{blue}{\mathsf{hypot}\left(C, B\right)}\right)}\right) \]
    5. Simplified28.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 24.6%

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

    if 1.7200000000000001e-283 < A < 5.00000000000000012e-233

    1. Initial program 51.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. Simplified51.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. Taylor expanded in A around 0 51.1%

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

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

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

        \[\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(C + \sqrt{C \cdot C + \color{blue}{B \cdot B}}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
      4. hypot-def56.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(C + \color{blue}{\mathsf{hypot}\left(C, B\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
    5. Simplified56.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 \color{blue}{\left(C + \mathsf{hypot}\left(C, B\right)\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]

    if 5.00000000000000012e-233 < A < 2.3000000000000001e-69

    1. Initial program 29.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. Simplified29.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 29.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 \color{blue}{\left(C + \sqrt{{B}^{2} + {C}^{2}}\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
    4. Step-by-step derivation
      1. +-commutative29.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(C + \sqrt{\color{blue}{{C}^{2} + {B}^{2}}}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
      2. unpow229.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(C + \sqrt{\color{blue}{C \cdot C} + {B}^{2}}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
      3. unpow229.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(C + \sqrt{C \cdot C + \color{blue}{B \cdot B}}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
      4. hypot-def29.6%

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

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

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

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

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

    if 2.3000000000000001e-69 < A < 5.20000000000000022e-38

    1. Initial program 27.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. Simplified27.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 52.0%

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

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

      \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right)\right) \cdot \color{blue}{\left(C \cdot 2\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
    6. Step-by-step derivation
      1. sqrt-prod99.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{C \cdot 2}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
      2. *-commutative99.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{C \cdot 2}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
      3. *-commutative99.2%

        \[\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{C \cdot 2}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
      4. *-commutative99.2%

        \[\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}{2 \cdot C}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
    7. Applied egg-rr99.2%

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

    if 5.20000000000000022e-38 < A

    1. Initial program 29.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. Simplified29.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 inf 32.1%

      \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right)\right) \cdot \color{blue}{\left(C + \left(-1 \cdot C + 2 \cdot A\right)\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
    4. Step-by-step derivation
      1. associate-+r+34.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 \color{blue}{\left(\left(C + -1 \cdot C\right) + 2 \cdot A\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
      2. distribute-rgt1-in34.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(\color{blue}{\left(-1 + 1\right) \cdot C} + 2 \cdot A\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
      3. metadata-eval34.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(\color{blue}{0} \cdot C + 2 \cdot A\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
      4. mul0-lft34.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(\color{blue}{0} + 2 \cdot A\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
    5. Simplified34.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 \color{blue}{\left(0 + 2 \cdot A\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
  3. Recombined 6 regimes into one program.
  4. Final simplification32.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -3.4 \cdot 10^{+91}:\\ \;\;\;\;\frac{-\sqrt{\left(2 \cdot \left(F \cdot \left(B \cdot B - \left(C \cdot A\right) \cdot 4\right)\right)\right) \cdot \left(2 \cdot C\right)}}{B \cdot B - \left(C \cdot A\right) \cdot 4}\\ \mathbf{elif}\;A \leq 1.72 \cdot 10^{-283}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{B \cdot F}\right)\\ \mathbf{elif}\;A \leq 5 \cdot 10^{-233}:\\ \;\;\;\;\frac{-\sqrt{\left(C + \mathsf{hypot}\left(C, B\right)\right) \cdot \left(2 \cdot \left(F \cdot \left(B \cdot B - \left(C \cdot A\right) \cdot 4\right)\right)\right)}}{B \cdot B - \left(C \cdot A\right) \cdot 4}\\ \mathbf{elif}\;A \leq 2.3 \cdot 10^{-69}:\\ \;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\ \mathbf{elif}\;A \leq 5.2 \cdot 10^{-38}:\\ \;\;\;\;\frac{\sqrt{2 \cdot \left(F \cdot \left(B \cdot B - \left(C \cdot A\right) \cdot 4\right)\right)} \cdot \left(-\sqrt{2 \cdot C}\right)}{B \cdot B - \left(C \cdot A\right) \cdot 4}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{\left(2 \cdot \left(F \cdot \left(B \cdot B - \left(C \cdot A\right) \cdot 4\right)\right)\right) \cdot \left(2 \cdot A\right)}}{B \cdot B - \left(C \cdot A\right) \cdot 4}\\ \end{array} \]

Alternative 6: 32.7% accurate, 2.7× speedup?

\[\begin{array}{l} B = |B|\\ \\ \begin{array}{l} t_0 := B \cdot B - \left(C \cdot A\right) \cdot 4\\ t_1 := 2 \cdot \left(F \cdot t_0\right)\\ \mathbf{if}\;A \leq -3.35 \cdot 10^{+31}:\\ \;\;\;\;\frac{-\sqrt{t_1 \cdot \mathsf{fma}\left(-0.5, \frac{B \cdot B}{A}, 2 \cdot C\right)}}{t_0}\\ \mathbf{elif}\;A \leq 6 \cdot 10^{-284}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(B + C\right)}\right)\\ \mathbf{elif}\;A \leq 1.36 \cdot 10^{-233}:\\ \;\;\;\;\frac{-\sqrt{\left(C + \mathsf{hypot}\left(C, B\right)\right) \cdot t_1}}{t_0}\\ \mathbf{elif}\;A \leq 5 \cdot 10^{-66}:\\ \;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\ \mathbf{elif}\;A \leq 4.8 \cdot 10^{-38}:\\ \;\;\;\;\frac{\sqrt{t_1} \cdot \left(-\sqrt{2 \cdot C}\right)}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{t_1 \cdot \left(2 \cdot A\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) (* (* C A) 4.0))) (t_1 (* 2.0 (* F t_0))))
   (if (<= A -3.35e+31)
     (/ (- (sqrt (* t_1 (fma -0.5 (/ (* B B) A) (* 2.0 C))))) t_0)
     (if (<= A 6e-284)
       (* (/ (sqrt 2.0) B) (- (sqrt (* F (+ B C)))))
       (if (<= A 1.36e-233)
         (/ (- (sqrt (* (+ C (hypot C B)) t_1))) t_0)
         (if (<= A 5e-66)
           (* (sqrt 2.0) (- (sqrt (/ F B))))
           (if (<= A 4.8e-38)
             (/ (* (sqrt t_1) (- (sqrt (* 2.0 C)))) t_0)
             (/ (- (sqrt (* t_1 (* 2.0 A)))) t_0))))))))
B = abs(B);
double code(double A, double B, double C, double F) {
	double t_0 = (B * B) - ((C * A) * 4.0);
	double t_1 = 2.0 * (F * t_0);
	double tmp;
	if (A <= -3.35e+31) {
		tmp = -sqrt((t_1 * fma(-0.5, ((B * B) / A), (2.0 * C)))) / t_0;
	} else if (A <= 6e-284) {
		tmp = (sqrt(2.0) / B) * -sqrt((F * (B + C)));
	} else if (A <= 1.36e-233) {
		tmp = -sqrt(((C + hypot(C, B)) * t_1)) / t_0;
	} else if (A <= 5e-66) {
		tmp = sqrt(2.0) * -sqrt((F / B));
	} else if (A <= 4.8e-38) {
		tmp = (sqrt(t_1) * -sqrt((2.0 * C))) / t_0;
	} else {
		tmp = -sqrt((t_1 * (2.0 * A))) / t_0;
	}
	return tmp;
}
B = abs(B)
function code(A, B, C, F)
	t_0 = Float64(Float64(B * B) - Float64(Float64(C * A) * 4.0))
	t_1 = Float64(2.0 * Float64(F * t_0))
	tmp = 0.0
	if (A <= -3.35e+31)
		tmp = Float64(Float64(-sqrt(Float64(t_1 * fma(-0.5, Float64(Float64(B * B) / A), Float64(2.0 * C))))) / t_0);
	elseif (A <= 6e-284)
		tmp = Float64(Float64(sqrt(2.0) / B) * Float64(-sqrt(Float64(F * Float64(B + C)))));
	elseif (A <= 1.36e-233)
		tmp = Float64(Float64(-sqrt(Float64(Float64(C + hypot(C, B)) * t_1))) / t_0);
	elseif (A <= 5e-66)
		tmp = Float64(sqrt(2.0) * Float64(-sqrt(Float64(F / B))));
	elseif (A <= 4.8e-38)
		tmp = Float64(Float64(sqrt(t_1) * Float64(-sqrt(Float64(2.0 * C)))) / t_0);
	else
		tmp = Float64(Float64(-sqrt(Float64(t_1 * Float64(2.0 * A)))) / t_0);
	end
	return 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[(C * A), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(2.0 * N[(F * t$95$0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -3.35e+31], N[((-N[Sqrt[N[(t$95$1 * N[(-0.5 * N[(N[(B * B), $MachinePrecision] / A), $MachinePrecision] + N[(2.0 * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], If[LessEqual[A, 6e-284], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B), $MachinePrecision] * (-N[Sqrt[N[(F * N[(B + C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision], If[LessEqual[A, 1.36e-233], N[((-N[Sqrt[N[(N[(C + N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], If[LessEqual[A, 5e-66], N[(N[Sqrt[2.0], $MachinePrecision] * (-N[Sqrt[N[(F / B), $MachinePrecision]], $MachinePrecision])), $MachinePrecision], If[LessEqual[A, 4.8e-38], N[(N[(N[Sqrt[t$95$1], $MachinePrecision] * (-N[Sqrt[N[(2.0 * C), $MachinePrecision]], $MachinePrecision])), $MachinePrecision] / t$95$0), $MachinePrecision], N[((-N[Sqrt[N[(t$95$1 * N[(2.0 * A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision]]]]]]]]
\begin{array}{l}
B = |B|\\
\\
\begin{array}{l}
t_0 := B \cdot B - \left(C \cdot A\right) \cdot 4\\
t_1 := 2 \cdot \left(F \cdot t_0\right)\\
\mathbf{if}\;A \leq -3.35 \cdot 10^{+31}:\\
\;\;\;\;\frac{-\sqrt{t_1 \cdot \mathsf{fma}\left(-0.5, \frac{B \cdot B}{A}, 2 \cdot C\right)}}{t_0}\\

\mathbf{elif}\;A \leq 6 \cdot 10^{-284}:\\
\;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(B + C\right)}\right)\\

\mathbf{elif}\;A \leq 1.36 \cdot 10^{-233}:\\
\;\;\;\;\frac{-\sqrt{\left(C + \mathsf{hypot}\left(C, B\right)\right) \cdot t_1}}{t_0}\\

\mathbf{elif}\;A \leq 5 \cdot 10^{-66}:\\
\;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\

\mathbf{elif}\;A \leq 4.8 \cdot 10^{-38}:\\
\;\;\;\;\frac{\sqrt{t_1} \cdot \left(-\sqrt{2 \cdot C}\right)}{t_0}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if A < -3.35000000000000008e31

    1. Initial program 5.6%

      \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
    2. Simplified5.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 36.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 \color{blue}{\left(-0.5 \cdot \frac{{B}^{2}}{A} + 2 \cdot C\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
    4. Step-by-step derivation
      1. fma-def36.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 \color{blue}{\mathsf{fma}\left(-0.5, \frac{{B}^{2}}{A}, 2 \cdot C\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
      2. unpow236.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 \mathsf{fma}\left(-0.5, \frac{\color{blue}{B \cdot B}}{A}, 2 \cdot C\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
      3. *-commutative36.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 \mathsf{fma}\left(-0.5, \frac{B \cdot B}{A}, \color{blue}{C \cdot 2}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
    5. Simplified36.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 \color{blue}{\mathsf{fma}\left(-0.5, \frac{B \cdot B}{A}, C \cdot 2\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]

    if -3.35000000000000008e31 < A < 5.9999999999999999e-284

    1. Initial program 32.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.9999999999999999e-284 < A < 1.35999999999999994e-233

    1. Initial program 51.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. Simplified51.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. Taylor expanded in A around 0 51.1%

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

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

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

        \[\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(C + \sqrt{C \cdot C + \color{blue}{B \cdot B}}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
      4. hypot-def56.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(C + \color{blue}{\mathsf{hypot}\left(C, B\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
    5. Simplified56.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 \color{blue}{\left(C + \mathsf{hypot}\left(C, B\right)\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]

    if 1.35999999999999994e-233 < A < 4.99999999999999962e-66

    1. Initial program 29.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. Simplified29.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 29.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 \color{blue}{\left(C + \sqrt{{B}^{2} + {C}^{2}}\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
    4. Step-by-step derivation
      1. +-commutative29.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(C + \sqrt{\color{blue}{{C}^{2} + {B}^{2}}}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
      2. unpow229.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(C + \sqrt{\color{blue}{C \cdot C} + {B}^{2}}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
      3. unpow229.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(C + \sqrt{C \cdot C + \color{blue}{B \cdot B}}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
      4. hypot-def29.6%

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

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

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

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

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

    if 4.99999999999999962e-66 < A < 4.80000000000000044e-38

    1. Initial program 27.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. Simplified27.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 52.0%

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

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

      \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right)\right) \cdot \color{blue}{\left(C \cdot 2\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
    6. Step-by-step derivation
      1. sqrt-prod99.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{C \cdot 2}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
      2. *-commutative99.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{C \cdot 2}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
      3. *-commutative99.2%

        \[\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{C \cdot 2}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
      4. *-commutative99.2%

        \[\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}{2 \cdot C}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
    7. Applied egg-rr99.2%

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

    if 4.80000000000000044e-38 < A

    1. Initial program 29.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. Simplified29.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 inf 32.1%

      \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right)\right) \cdot \color{blue}{\left(C + \left(-1 \cdot C + 2 \cdot A\right)\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
    4. Step-by-step derivation
      1. associate-+r+34.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 \color{blue}{\left(\left(C + -1 \cdot C\right) + 2 \cdot A\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
      2. distribute-rgt1-in34.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(\color{blue}{\left(-1 + 1\right) \cdot C} + 2 \cdot A\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
      3. metadata-eval34.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(\color{blue}{0} \cdot C + 2 \cdot A\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
      4. mul0-lft34.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(\color{blue}{0} + 2 \cdot A\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
    5. Simplified34.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 \color{blue}{\left(0 + 2 \cdot A\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
  3. Recombined 6 regimes into one program.
  4. Final simplification33.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -3.35 \cdot 10^{+31}:\\ \;\;\;\;\frac{-\sqrt{\left(2 \cdot \left(F \cdot \left(B \cdot B - \left(C \cdot A\right) \cdot 4\right)\right)\right) \cdot \mathsf{fma}\left(-0.5, \frac{B \cdot B}{A}, 2 \cdot C\right)}}{B \cdot B - \left(C \cdot A\right) \cdot 4}\\ \mathbf{elif}\;A \leq 6 \cdot 10^{-284}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(B + C\right)}\right)\\ \mathbf{elif}\;A \leq 1.36 \cdot 10^{-233}:\\ \;\;\;\;\frac{-\sqrt{\left(C + \mathsf{hypot}\left(C, B\right)\right) \cdot \left(2 \cdot \left(F \cdot \left(B \cdot B - \left(C \cdot A\right) \cdot 4\right)\right)\right)}}{B \cdot B - \left(C \cdot A\right) \cdot 4}\\ \mathbf{elif}\;A \leq 5 \cdot 10^{-66}:\\ \;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\ \mathbf{elif}\;A \leq 4.8 \cdot 10^{-38}:\\ \;\;\;\;\frac{\sqrt{2 \cdot \left(F \cdot \left(B \cdot B - \left(C \cdot A\right) \cdot 4\right)\right)} \cdot \left(-\sqrt{2 \cdot C}\right)}{B \cdot B - \left(C \cdot A\right) \cdot 4}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{\left(2 \cdot \left(F \cdot \left(B \cdot B - \left(C \cdot A\right) \cdot 4\right)\right)\right) \cdot \left(2 \cdot A\right)}}{B \cdot B - \left(C \cdot A\right) \cdot 4}\\ \end{array} \]

Alternative 7: 38.0% accurate, 2.7× speedup?

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

\mathbf{elif}\;B \leq 2.9 \cdot 10^{+247}:\\
\;\;\;\;t_0 \cdot \left(-\sqrt{F \cdot \left(B + C\right)}\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if B < 2.50000000000000009e61

    1. Initial program 29.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. Simplified29.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. Step-by-step derivation
      1. div-inv29.9%

        \[\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-rr33.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 2.50000000000000009e61 < B < 2.9000000000000002e247

    1. Initial program 6.5%

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\sqrt{2}}{B} \cdot \left(-\sqrt{\color{blue}{B \cdot F + C \cdot F}}\right) \]
    7. Step-by-step derivation
      1. distribute-rgt-out48.5%

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

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

    if 2.9000000000000002e247 < B < 1.95e292

    1. Initial program 0.0%

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

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

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

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

        \[\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(C + \sqrt{C \cdot C + \color{blue}{B \cdot B}}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
      4. hypot-def0.0%

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

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

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

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

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

    if 1.95e292 < B

    1. Initial program 0.0%

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(C + \color{blue}{\mathsf{hypot}\left(C, B\right)}\right)}\right) \]
    5. Simplified99.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 99.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 2.5 \cdot 10^{+61}:\\ \;\;\;\;\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 + \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)} \cdot \frac{-1}{B \cdot B + -4 \cdot \left(C \cdot A\right)}\\ \mathbf{elif}\;B \leq 2.9 \cdot 10^{+247}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(B + C\right)}\right)\\ \mathbf{elif}\;B \leq 1.95 \cdot 10^{+292}:\\ \;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{B \cdot F}\right)\\ \end{array} \]

Alternative 8: 29.0% accurate, 3.0× speedup?

\[\begin{array}{l} B = |B|\\ \\ \begin{array}{l} t_0 := B \cdot B - \left(C \cdot A\right) \cdot 4\\ t_1 := \sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\ t_2 := F \cdot t_0\\ t_3 := 2 \cdot t_2\\ \mathbf{if}\;A \leq -1.3 \cdot 10^{+92}:\\ \;\;\;\;\frac{-\sqrt{t_3 \cdot \left(2 \cdot C\right)}}{t_0}\\ \mathbf{elif}\;A \leq -7.2 \cdot 10^{-85}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq -9.2 \cdot 10^{-199}:\\ \;\;\;\;\frac{-{\left(2 \cdot \left(\left(2 \cdot C\right) \cdot t_2\right)\right)}^{0.5}}{t_0}\\ \mathbf{elif}\;A \leq 1.05 \cdot 10^{-130}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{t_3 \cdot \left(2 \cdot A\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) (* (* C A) 4.0)))
        (t_1 (* (sqrt 2.0) (- (sqrt (/ F B)))))
        (t_2 (* F t_0))
        (t_3 (* 2.0 t_2)))
   (if (<= A -1.3e+92)
     (/ (- (sqrt (* t_3 (* 2.0 C)))) t_0)
     (if (<= A -7.2e-85)
       t_1
       (if (<= A -9.2e-199)
         (/ (- (pow (* 2.0 (* (* 2.0 C) t_2)) 0.5)) t_0)
         (if (<= A 1.05e-130) t_1 (/ (- (sqrt (* t_3 (* 2.0 A)))) t_0)))))))
B = abs(B);
double code(double A, double B, double C, double F) {
	double t_0 = (B * B) - ((C * A) * 4.0);
	double t_1 = sqrt(2.0) * -sqrt((F / B));
	double t_2 = F * t_0;
	double t_3 = 2.0 * t_2;
	double tmp;
	if (A <= -1.3e+92) {
		tmp = -sqrt((t_3 * (2.0 * C))) / t_0;
	} else if (A <= -7.2e-85) {
		tmp = t_1;
	} else if (A <= -9.2e-199) {
		tmp = -pow((2.0 * ((2.0 * C) * t_2)), 0.5) / t_0;
	} else if (A <= 1.05e-130) {
		tmp = t_1;
	} else {
		tmp = -sqrt((t_3 * (2.0 * 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) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_0 = (b * b) - ((c * a) * 4.0d0)
    t_1 = sqrt(2.0d0) * -sqrt((f / b))
    t_2 = f * t_0
    t_3 = 2.0d0 * t_2
    if (a <= (-1.3d+92)) then
        tmp = -sqrt((t_3 * (2.0d0 * c))) / t_0
    else if (a <= (-7.2d-85)) then
        tmp = t_1
    else if (a <= (-9.2d-199)) then
        tmp = -((2.0d0 * ((2.0d0 * c) * t_2)) ** 0.5d0) / t_0
    else if (a <= 1.05d-130) then
        tmp = t_1
    else
        tmp = -sqrt((t_3 * (2.0d0 * 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) - ((C * A) * 4.0);
	double t_1 = Math.sqrt(2.0) * -Math.sqrt((F / B));
	double t_2 = F * t_0;
	double t_3 = 2.0 * t_2;
	double tmp;
	if (A <= -1.3e+92) {
		tmp = -Math.sqrt((t_3 * (2.0 * C))) / t_0;
	} else if (A <= -7.2e-85) {
		tmp = t_1;
	} else if (A <= -9.2e-199) {
		tmp = -Math.pow((2.0 * ((2.0 * C) * t_2)), 0.5) / t_0;
	} else if (A <= 1.05e-130) {
		tmp = t_1;
	} else {
		tmp = -Math.sqrt((t_3 * (2.0 * A))) / t_0;
	}
	return tmp;
}
B = abs(B)
def code(A, B, C, F):
	t_0 = (B * B) - ((C * A) * 4.0)
	t_1 = math.sqrt(2.0) * -math.sqrt((F / B))
	t_2 = F * t_0
	t_3 = 2.0 * t_2
	tmp = 0
	if A <= -1.3e+92:
		tmp = -math.sqrt((t_3 * (2.0 * C))) / t_0
	elif A <= -7.2e-85:
		tmp = t_1
	elif A <= -9.2e-199:
		tmp = -math.pow((2.0 * ((2.0 * C) * t_2)), 0.5) / t_0
	elif A <= 1.05e-130:
		tmp = t_1
	else:
		tmp = -math.sqrt((t_3 * (2.0 * A))) / t_0
	return tmp
B = abs(B)
function code(A, B, C, F)
	t_0 = Float64(Float64(B * B) - Float64(Float64(C * A) * 4.0))
	t_1 = Float64(sqrt(2.0) * Float64(-sqrt(Float64(F / B))))
	t_2 = Float64(F * t_0)
	t_3 = Float64(2.0 * t_2)
	tmp = 0.0
	if (A <= -1.3e+92)
		tmp = Float64(Float64(-sqrt(Float64(t_3 * Float64(2.0 * C)))) / t_0);
	elseif (A <= -7.2e-85)
		tmp = t_1;
	elseif (A <= -9.2e-199)
		tmp = Float64(Float64(-(Float64(2.0 * Float64(Float64(2.0 * C) * t_2)) ^ 0.5)) / t_0);
	elseif (A <= 1.05e-130)
		tmp = t_1;
	else
		tmp = Float64(Float64(-sqrt(Float64(t_3 * Float64(2.0 * A)))) / t_0);
	end
	return tmp
end
B = abs(B)
function tmp_2 = code(A, B, C, F)
	t_0 = (B * B) - ((C * A) * 4.0);
	t_1 = sqrt(2.0) * -sqrt((F / B));
	t_2 = F * t_0;
	t_3 = 2.0 * t_2;
	tmp = 0.0;
	if (A <= -1.3e+92)
		tmp = -sqrt((t_3 * (2.0 * C))) / t_0;
	elseif (A <= -7.2e-85)
		tmp = t_1;
	elseif (A <= -9.2e-199)
		tmp = -((2.0 * ((2.0 * C) * t_2)) ^ 0.5) / t_0;
	elseif (A <= 1.05e-130)
		tmp = t_1;
	else
		tmp = -sqrt((t_3 * (2.0 * 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[(C * A), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Sqrt[2.0], $MachinePrecision] * (-N[Sqrt[N[(F / B), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]}, Block[{t$95$2 = N[(F * t$95$0), $MachinePrecision]}, Block[{t$95$3 = N[(2.0 * t$95$2), $MachinePrecision]}, If[LessEqual[A, -1.3e+92], N[((-N[Sqrt[N[(t$95$3 * N[(2.0 * C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], If[LessEqual[A, -7.2e-85], t$95$1, If[LessEqual[A, -9.2e-199], N[((-N[Power[N[(2.0 * N[(N[(2.0 * C), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]) / t$95$0), $MachinePrecision], If[LessEqual[A, 1.05e-130], t$95$1, N[((-N[Sqrt[N[(t$95$3 * N[(2.0 * A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision]]]]]]]]]
\begin{array}{l}
B = |B|\\
\\
\begin{array}{l}
t_0 := B \cdot B - \left(C \cdot A\right) \cdot 4\\
t_1 := \sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\
t_2 := F \cdot t_0\\
t_3 := 2 \cdot t_2\\
\mathbf{if}\;A \leq -1.3 \cdot 10^{+92}:\\
\;\;\;\;\frac{-\sqrt{t_3 \cdot \left(2 \cdot C\right)}}{t_0}\\

\mathbf{elif}\;A \leq -7.2 \cdot 10^{-85}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;A \leq -9.2 \cdot 10^{-199}:\\
\;\;\;\;\frac{-{\left(2 \cdot \left(\left(2 \cdot C\right) \cdot t_2\right)\right)}^{0.5}}{t_0}\\

\mathbf{elif}\;A \leq 1.05 \cdot 10^{-130}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if A < -1.2999999999999999e92

    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 37.7%

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

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

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

    if -1.2999999999999999e92 < A < -7.1999999999999996e-85 or -9.2000000000000005e-199 < A < 1.05000000000000001e-130

    1. Initial program 29.0%

      \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
    2. Simplified29.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 27.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 \color{blue}{\left(C + \sqrt{{B}^{2} + {C}^{2}}\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
    4. Step-by-step derivation
      1. +-commutative27.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(C + \sqrt{\color{blue}{{C}^{2} + {B}^{2}}}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
      2. unpow227.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(C + \sqrt{\color{blue}{C \cdot C} + {B}^{2}}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
      3. unpow227.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(C + \sqrt{C \cdot C + \color{blue}{B \cdot B}}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
      4. hypot-def29.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(C + \color{blue}{\mathsf{hypot}\left(C, B\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
    5. Simplified29.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 \color{blue}{\left(C + \mathsf{hypot}\left(C, B\right)\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
    6. Taylor expanded in C around 0 19.0%

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

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

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

    if -7.1999999999999996e-85 < A < -9.2000000000000005e-199

    1. Initial program 41.0%

      \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
    2. Simplified41.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 36.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 \color{blue}{\left(2 \cdot C\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
    4. Step-by-step derivation
      1. *-commutative36.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 \color{blue}{\left(C \cdot 2\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
    5. Simplified36.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 \color{blue}{\left(C \cdot 2\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
    6. Step-by-step derivation
      1. pow1/236.7%

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

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

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

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

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

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

    if 1.05000000000000001e-130 < A

    1. Initial program 30.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. Simplified30.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 inf 28.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 \color{blue}{\left(C + \left(-1 \cdot C + 2 \cdot A\right)\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
    4. Step-by-step derivation
      1. associate-+r+33.1%

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

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

        \[\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(\color{blue}{0} \cdot C + 2 \cdot A\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
      4. mul0-lft33.1%

        \[\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(\color{blue}{0} + 2 \cdot A\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
    5. Simplified33.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -1.3 \cdot 10^{+92}:\\ \;\;\;\;\frac{-\sqrt{\left(2 \cdot \left(F \cdot \left(B \cdot B - \left(C \cdot A\right) \cdot 4\right)\right)\right) \cdot \left(2 \cdot C\right)}}{B \cdot B - \left(C \cdot A\right) \cdot 4}\\ \mathbf{elif}\;A \leq -7.2 \cdot 10^{-85}:\\ \;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\ \mathbf{elif}\;A \leq -9.2 \cdot 10^{-199}:\\ \;\;\;\;\frac{-{\left(2 \cdot \left(\left(2 \cdot C\right) \cdot \left(F \cdot \left(B \cdot B - \left(C \cdot A\right) \cdot 4\right)\right)\right)\right)}^{0.5}}{B \cdot B - \left(C \cdot A\right) \cdot 4}\\ \mathbf{elif}\;A \leq 1.05 \cdot 10^{-130}:\\ \;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{\left(2 \cdot \left(F \cdot \left(B \cdot B - \left(C \cdot A\right) \cdot 4\right)\right)\right) \cdot \left(2 \cdot A\right)}}{B \cdot B - \left(C \cdot A\right) \cdot 4}\\ \end{array} \]

Alternative 9: 31.4% accurate, 3.0× speedup?

\[\begin{array}{l} B = |B|\\ \\ \begin{array}{l} t_0 := B \cdot B - \left(C \cdot A\right) \cdot 4\\ t_1 := 2 \cdot \left(F \cdot t_0\right)\\ \mathbf{if}\;A \leq -3.1 \cdot 10^{+90}:\\ \;\;\;\;\frac{-\sqrt{t_1 \cdot \left(2 \cdot C\right)}}{t_0}\\ \mathbf{elif}\;A \leq 6.5 \cdot 10^{-20}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(B + C\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{t_1 \cdot \left(2 \cdot A\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) (* (* C A) 4.0))) (t_1 (* 2.0 (* F t_0))))
   (if (<= A -3.1e+90)
     (/ (- (sqrt (* t_1 (* 2.0 C)))) t_0)
     (if (<= A 6.5e-20)
       (* (/ (sqrt 2.0) B) (- (sqrt (* F (+ B C)))))
       (/ (- (sqrt (* t_1 (* 2.0 A)))) t_0)))))
B = abs(B);
double code(double A, double B, double C, double F) {
	double t_0 = (B * B) - ((C * A) * 4.0);
	double t_1 = 2.0 * (F * t_0);
	double tmp;
	if (A <= -3.1e+90) {
		tmp = -sqrt((t_1 * (2.0 * C))) / t_0;
	} else if (A <= 6.5e-20) {
		tmp = (sqrt(2.0) / B) * -sqrt((F * (B + C)));
	} else {
		tmp = -sqrt((t_1 * (2.0 * 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) - ((c * a) * 4.0d0)
    t_1 = 2.0d0 * (f * t_0)
    if (a <= (-3.1d+90)) then
        tmp = -sqrt((t_1 * (2.0d0 * c))) / t_0
    else if (a <= 6.5d-20) then
        tmp = (sqrt(2.0d0) / b) * -sqrt((f * (b + c)))
    else
        tmp = -sqrt((t_1 * (2.0d0 * 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) - ((C * A) * 4.0);
	double t_1 = 2.0 * (F * t_0);
	double tmp;
	if (A <= -3.1e+90) {
		tmp = -Math.sqrt((t_1 * (2.0 * C))) / t_0;
	} else if (A <= 6.5e-20) {
		tmp = (Math.sqrt(2.0) / B) * -Math.sqrt((F * (B + C)));
	} else {
		tmp = -Math.sqrt((t_1 * (2.0 * A))) / t_0;
	}
	return tmp;
}
B = abs(B)
def code(A, B, C, F):
	t_0 = (B * B) - ((C * A) * 4.0)
	t_1 = 2.0 * (F * t_0)
	tmp = 0
	if A <= -3.1e+90:
		tmp = -math.sqrt((t_1 * (2.0 * C))) / t_0
	elif A <= 6.5e-20:
		tmp = (math.sqrt(2.0) / B) * -math.sqrt((F * (B + C)))
	else:
		tmp = -math.sqrt((t_1 * (2.0 * A))) / t_0
	return tmp
B = abs(B)
function code(A, B, C, F)
	t_0 = Float64(Float64(B * B) - Float64(Float64(C * A) * 4.0))
	t_1 = Float64(2.0 * Float64(F * t_0))
	tmp = 0.0
	if (A <= -3.1e+90)
		tmp = Float64(Float64(-sqrt(Float64(t_1 * Float64(2.0 * C)))) / t_0);
	elseif (A <= 6.5e-20)
		tmp = Float64(Float64(sqrt(2.0) / B) * Float64(-sqrt(Float64(F * Float64(B + C)))));
	else
		tmp = Float64(Float64(-sqrt(Float64(t_1 * Float64(2.0 * A)))) / t_0);
	end
	return tmp
end
B = abs(B)
function tmp_2 = code(A, B, C, F)
	t_0 = (B * B) - ((C * A) * 4.0);
	t_1 = 2.0 * (F * t_0);
	tmp = 0.0;
	if (A <= -3.1e+90)
		tmp = -sqrt((t_1 * (2.0 * C))) / t_0;
	elseif (A <= 6.5e-20)
		tmp = (sqrt(2.0) / B) * -sqrt((F * (B + C)));
	else
		tmp = -sqrt((t_1 * (2.0 * 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[(C * A), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(2.0 * N[(F * t$95$0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -3.1e+90], N[((-N[Sqrt[N[(t$95$1 * N[(2.0 * C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], If[LessEqual[A, 6.5e-20], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B), $MachinePrecision] * (-N[Sqrt[N[(F * N[(B + C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision], N[((-N[Sqrt[N[(t$95$1 * N[(2.0 * A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
B = |B|\\
\\
\begin{array}{l}
t_0 := B \cdot B - \left(C \cdot A\right) \cdot 4\\
t_1 := 2 \cdot \left(F \cdot t_0\right)\\
\mathbf{if}\;A \leq -3.1 \cdot 10^{+90}:\\
\;\;\;\;\frac{-\sqrt{t_1 \cdot \left(2 \cdot C\right)}}{t_0}\\

\mathbf{elif}\;A \leq 6.5 \cdot 10^{-20}:\\
\;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(B + C\right)}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if A < -3.09999999999999988e90

    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 37.7%

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

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

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

    if -3.09999999999999988e90 < A < 6.50000000000000032e-20

    1. Initial program 31.5%

      \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
    2. Simplified31.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 13.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-neg13.7%

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

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

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

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

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

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

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

    if 6.50000000000000032e-20 < A

    1. Initial program 29.7%

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

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

      \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right)\right) \cdot \color{blue}{\left(C + \left(-1 \cdot C + 2 \cdot A\right)\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
    4. Step-by-step derivation
      1. associate-+r+34.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 \color{blue}{\left(\left(C + -1 \cdot C\right) + 2 \cdot A\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
      2. distribute-rgt1-in34.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(\color{blue}{\left(-1 + 1\right) \cdot C} + 2 \cdot A\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
      3. metadata-eval34.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(\color{blue}{0} \cdot C + 2 \cdot A\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
      4. mul0-lft34.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(\color{blue}{0} + 2 \cdot A\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
    5. Simplified34.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 \color{blue}{\left(0 + 2 \cdot A\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification28.1%

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

Alternative 10: 31.8% accurate, 3.0× speedup?

\[\begin{array}{l} B = |B|\\ \\ \begin{array}{l} t_0 := B \cdot B - \left(C \cdot A\right) \cdot 4\\ t_1 := 2 \cdot \left(F \cdot t_0\right)\\ \mathbf{if}\;A \leq -3.15 \cdot 10^{+91}:\\ \;\;\;\;\frac{-\sqrt{t_1 \cdot \left(2 \cdot C\right)}}{t_0}\\ \mathbf{elif}\;A \leq 1.25 \cdot 10^{-20}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{B \cdot F}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{t_1 \cdot \left(2 \cdot A\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) (* (* C A) 4.0))) (t_1 (* 2.0 (* F t_0))))
   (if (<= A -3.15e+91)
     (/ (- (sqrt (* t_1 (* 2.0 C)))) t_0)
     (if (<= A 1.25e-20)
       (* (/ (sqrt 2.0) B) (- (sqrt (* B F))))
       (/ (- (sqrt (* t_1 (* 2.0 A)))) t_0)))))
B = abs(B);
double code(double A, double B, double C, double F) {
	double t_0 = (B * B) - ((C * A) * 4.0);
	double t_1 = 2.0 * (F * t_0);
	double tmp;
	if (A <= -3.15e+91) {
		tmp = -sqrt((t_1 * (2.0 * C))) / t_0;
	} else if (A <= 1.25e-20) {
		tmp = (sqrt(2.0) / B) * -sqrt((B * F));
	} else {
		tmp = -sqrt((t_1 * (2.0 * 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) - ((c * a) * 4.0d0)
    t_1 = 2.0d0 * (f * t_0)
    if (a <= (-3.15d+91)) then
        tmp = -sqrt((t_1 * (2.0d0 * c))) / t_0
    else if (a <= 1.25d-20) then
        tmp = (sqrt(2.0d0) / b) * -sqrt((b * f))
    else
        tmp = -sqrt((t_1 * (2.0d0 * 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) - ((C * A) * 4.0);
	double t_1 = 2.0 * (F * t_0);
	double tmp;
	if (A <= -3.15e+91) {
		tmp = -Math.sqrt((t_1 * (2.0 * C))) / t_0;
	} else if (A <= 1.25e-20) {
		tmp = (Math.sqrt(2.0) / B) * -Math.sqrt((B * F));
	} else {
		tmp = -Math.sqrt((t_1 * (2.0 * A))) / t_0;
	}
	return tmp;
}
B = abs(B)
def code(A, B, C, F):
	t_0 = (B * B) - ((C * A) * 4.0)
	t_1 = 2.0 * (F * t_0)
	tmp = 0
	if A <= -3.15e+91:
		tmp = -math.sqrt((t_1 * (2.0 * C))) / t_0
	elif A <= 1.25e-20:
		tmp = (math.sqrt(2.0) / B) * -math.sqrt((B * F))
	else:
		tmp = -math.sqrt((t_1 * (2.0 * A))) / t_0
	return tmp
B = abs(B)
function code(A, B, C, F)
	t_0 = Float64(Float64(B * B) - Float64(Float64(C * A) * 4.0))
	t_1 = Float64(2.0 * Float64(F * t_0))
	tmp = 0.0
	if (A <= -3.15e+91)
		tmp = Float64(Float64(-sqrt(Float64(t_1 * Float64(2.0 * C)))) / t_0);
	elseif (A <= 1.25e-20)
		tmp = Float64(Float64(sqrt(2.0) / B) * Float64(-sqrt(Float64(B * F))));
	else
		tmp = Float64(Float64(-sqrt(Float64(t_1 * Float64(2.0 * A)))) / t_0);
	end
	return tmp
end
B = abs(B)
function tmp_2 = code(A, B, C, F)
	t_0 = (B * B) - ((C * A) * 4.0);
	t_1 = 2.0 * (F * t_0);
	tmp = 0.0;
	if (A <= -3.15e+91)
		tmp = -sqrt((t_1 * (2.0 * C))) / t_0;
	elseif (A <= 1.25e-20)
		tmp = (sqrt(2.0) / B) * -sqrt((B * F));
	else
		tmp = -sqrt((t_1 * (2.0 * 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[(C * A), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(2.0 * N[(F * t$95$0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -3.15e+91], N[((-N[Sqrt[N[(t$95$1 * N[(2.0 * C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], If[LessEqual[A, 1.25e-20], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B), $MachinePrecision] * (-N[Sqrt[N[(B * F), $MachinePrecision]], $MachinePrecision])), $MachinePrecision], N[((-N[Sqrt[N[(t$95$1 * N[(2.0 * A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
B = |B|\\
\\
\begin{array}{l}
t_0 := B \cdot B - \left(C \cdot A\right) \cdot 4\\
t_1 := 2 \cdot \left(F \cdot t_0\right)\\
\mathbf{if}\;A \leq -3.15 \cdot 10^{+91}:\\
\;\;\;\;\frac{-\sqrt{t_1 \cdot \left(2 \cdot C\right)}}{t_0}\\

\mathbf{elif}\;A \leq 1.25 \cdot 10^{-20}:\\
\;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{B \cdot F}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if A < -3.15e91

    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 37.7%

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

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

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

    if -3.15e91 < A < 1.25e-20

    1. Initial program 31.5%

      \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
    2. Simplified31.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 13.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-neg13.7%

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

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

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

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

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

    if 1.25e-20 < A

    1. Initial program 29.7%

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

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

      \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right)\right) \cdot \color{blue}{\left(C + \left(-1 \cdot C + 2 \cdot A\right)\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
    4. Step-by-step derivation
      1. associate-+r+34.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 \color{blue}{\left(\left(C + -1 \cdot C\right) + 2 \cdot A\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
      2. distribute-rgt1-in34.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(\color{blue}{\left(-1 + 1\right) \cdot C} + 2 \cdot A\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
      3. metadata-eval34.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(\color{blue}{0} \cdot C + 2 \cdot A\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
      4. mul0-lft34.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(\color{blue}{0} + 2 \cdot A\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
    5. Simplified34.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 \color{blue}{\left(0 + 2 \cdot A\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification28.3%

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

Alternative 11: 21.3% accurate, 4.7× speedup?

\[\begin{array}{l} B = |B|\\ \\ \begin{array}{l} t_0 := B \cdot B - \left(C \cdot A\right) \cdot 4\\ t_1 := F \cdot t_0\\ t_2 := 2 \cdot t_1\\ \mathbf{if}\;A \leq -1.02 \cdot 10^{+30}:\\ \;\;\;\;\frac{-\sqrt{t_2 \cdot \left(2 \cdot C\right)}}{t_0}\\ \mathbf{elif}\;A \leq -2.05 \cdot 10^{-92}:\\ \;\;\;\;\frac{-\sqrt{t_2 \cdot \left(A + \left(B + C\right)\right)}}{t_0}\\ \mathbf{elif}\;A \leq 1.2 \cdot 10^{-155}:\\ \;\;\;\;\frac{-{\left(2 \cdot \left(\left(2 \cdot C\right) \cdot t_1\right)\right)}^{0.5}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{t_2 \cdot \left(2 \cdot A\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) (* (* C A) 4.0))) (t_1 (* F t_0)) (t_2 (* 2.0 t_1)))
   (if (<= A -1.02e+30)
     (/ (- (sqrt (* t_2 (* 2.0 C)))) t_0)
     (if (<= A -2.05e-92)
       (/ (- (sqrt (* t_2 (+ A (+ B C))))) t_0)
       (if (<= A 1.2e-155)
         (/ (- (pow (* 2.0 (* (* 2.0 C) t_1)) 0.5)) t_0)
         (/ (- (sqrt (* t_2 (* 2.0 A)))) t_0))))))
B = abs(B);
double code(double A, double B, double C, double F) {
	double t_0 = (B * B) - ((C * A) * 4.0);
	double t_1 = F * t_0;
	double t_2 = 2.0 * t_1;
	double tmp;
	if (A <= -1.02e+30) {
		tmp = -sqrt((t_2 * (2.0 * C))) / t_0;
	} else if (A <= -2.05e-92) {
		tmp = -sqrt((t_2 * (A + (B + C)))) / t_0;
	} else if (A <= 1.2e-155) {
		tmp = -pow((2.0 * ((2.0 * C) * t_1)), 0.5) / t_0;
	} else {
		tmp = -sqrt((t_2 * (2.0 * 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) :: t_2
    real(8) :: tmp
    t_0 = (b * b) - ((c * a) * 4.0d0)
    t_1 = f * t_0
    t_2 = 2.0d0 * t_1
    if (a <= (-1.02d+30)) then
        tmp = -sqrt((t_2 * (2.0d0 * c))) / t_0
    else if (a <= (-2.05d-92)) then
        tmp = -sqrt((t_2 * (a + (b + c)))) / t_0
    else if (a <= 1.2d-155) then
        tmp = -((2.0d0 * ((2.0d0 * c) * t_1)) ** 0.5d0) / t_0
    else
        tmp = -sqrt((t_2 * (2.0d0 * 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) - ((C * A) * 4.0);
	double t_1 = F * t_0;
	double t_2 = 2.0 * t_1;
	double tmp;
	if (A <= -1.02e+30) {
		tmp = -Math.sqrt((t_2 * (2.0 * C))) / t_0;
	} else if (A <= -2.05e-92) {
		tmp = -Math.sqrt((t_2 * (A + (B + C)))) / t_0;
	} else if (A <= 1.2e-155) {
		tmp = -Math.pow((2.0 * ((2.0 * C) * t_1)), 0.5) / t_0;
	} else {
		tmp = -Math.sqrt((t_2 * (2.0 * A))) / t_0;
	}
	return tmp;
}
B = abs(B)
def code(A, B, C, F):
	t_0 = (B * B) - ((C * A) * 4.0)
	t_1 = F * t_0
	t_2 = 2.0 * t_1
	tmp = 0
	if A <= -1.02e+30:
		tmp = -math.sqrt((t_2 * (2.0 * C))) / t_0
	elif A <= -2.05e-92:
		tmp = -math.sqrt((t_2 * (A + (B + C)))) / t_0
	elif A <= 1.2e-155:
		tmp = -math.pow((2.0 * ((2.0 * C) * t_1)), 0.5) / t_0
	else:
		tmp = -math.sqrt((t_2 * (2.0 * A))) / t_0
	return tmp
B = abs(B)
function code(A, B, C, F)
	t_0 = Float64(Float64(B * B) - Float64(Float64(C * A) * 4.0))
	t_1 = Float64(F * t_0)
	t_2 = Float64(2.0 * t_1)
	tmp = 0.0
	if (A <= -1.02e+30)
		tmp = Float64(Float64(-sqrt(Float64(t_2 * Float64(2.0 * C)))) / t_0);
	elseif (A <= -2.05e-92)
		tmp = Float64(Float64(-sqrt(Float64(t_2 * Float64(A + Float64(B + C))))) / t_0);
	elseif (A <= 1.2e-155)
		tmp = Float64(Float64(-(Float64(2.0 * Float64(Float64(2.0 * C) * t_1)) ^ 0.5)) / t_0);
	else
		tmp = Float64(Float64(-sqrt(Float64(t_2 * Float64(2.0 * A)))) / t_0);
	end
	return tmp
end
B = abs(B)
function tmp_2 = code(A, B, C, F)
	t_0 = (B * B) - ((C * A) * 4.0);
	t_1 = F * t_0;
	t_2 = 2.0 * t_1;
	tmp = 0.0;
	if (A <= -1.02e+30)
		tmp = -sqrt((t_2 * (2.0 * C))) / t_0;
	elseif (A <= -2.05e-92)
		tmp = -sqrt((t_2 * (A + (B + C)))) / t_0;
	elseif (A <= 1.2e-155)
		tmp = -((2.0 * ((2.0 * C) * t_1)) ^ 0.5) / t_0;
	else
		tmp = -sqrt((t_2 * (2.0 * 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[(C * A), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(F * t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * t$95$1), $MachinePrecision]}, If[LessEqual[A, -1.02e+30], N[((-N[Sqrt[N[(t$95$2 * N[(2.0 * C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], If[LessEqual[A, -2.05e-92], N[((-N[Sqrt[N[(t$95$2 * N[(A + N[(B + C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], If[LessEqual[A, 1.2e-155], N[((-N[Power[N[(2.0 * N[(N[(2.0 * C), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]) / t$95$0), $MachinePrecision], N[((-N[Sqrt[N[(t$95$2 * N[(2.0 * A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision]]]]]]]
\begin{array}{l}
B = |B|\\
\\
\begin{array}{l}
t_0 := B \cdot B - \left(C \cdot A\right) \cdot 4\\
t_1 := F \cdot t_0\\
t_2 := 2 \cdot t_1\\
\mathbf{if}\;A \leq -1.02 \cdot 10^{+30}:\\
\;\;\;\;\frac{-\sqrt{t_2 \cdot \left(2 \cdot C\right)}}{t_0}\\

\mathbf{elif}\;A \leq -2.05 \cdot 10^{-92}:\\
\;\;\;\;\frac{-\sqrt{t_2 \cdot \left(A + \left(B + C\right)\right)}}{t_0}\\

\mathbf{elif}\;A \leq 1.2 \cdot 10^{-155}:\\
\;\;\;\;\frac{-{\left(2 \cdot \left(\left(2 \cdot C\right) \cdot t_1\right)\right)}^{0.5}}{t_0}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if A < -1.02e30

    1. Initial program 5.6%

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

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

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

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

    if -1.02e30 < A < -2.0500000000000001e-92

    1. Initial program 41.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. Simplified41.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 inf 18.6%

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

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

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

    if -2.0500000000000001e-92 < A < 1.2e-155

    1. Initial program 34.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. Simplified34.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 -inf 26.1%

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

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

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

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

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

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

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

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

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

    if 1.2e-155 < A

    1. Initial program 29.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. Simplified29.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 27.7%

      \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right)\right) \cdot \color{blue}{\left(C + \left(-1 \cdot C + 2 \cdot A\right)\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
    4. Step-by-step derivation
      1. associate-+r+31.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 \color{blue}{\left(\left(C + -1 \cdot C\right) + 2 \cdot A\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
      2. distribute-rgt1-in31.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(\color{blue}{\left(-1 + 1\right) \cdot C} + 2 \cdot A\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
      3. metadata-eval31.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(\color{blue}{0} \cdot C + 2 \cdot A\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
      4. mul0-lft31.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(\color{blue}{0} + 2 \cdot A\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
    5. Simplified31.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 \color{blue}{\left(0 + 2 \cdot A\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification29.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq -1.02 \cdot 10^{+30}:\\ \;\;\;\;\frac{-\sqrt{\left(2 \cdot \left(F \cdot \left(B \cdot B - \left(C \cdot A\right) \cdot 4\right)\right)\right) \cdot \left(2 \cdot C\right)}}{B \cdot B - \left(C \cdot A\right) \cdot 4}\\ \mathbf{elif}\;A \leq -2.05 \cdot 10^{-92}:\\ \;\;\;\;\frac{-\sqrt{\left(2 \cdot \left(F \cdot \left(B \cdot B - \left(C \cdot A\right) \cdot 4\right)\right)\right) \cdot \left(A + \left(B + C\right)\right)}}{B \cdot B - \left(C \cdot A\right) \cdot 4}\\ \mathbf{elif}\;A \leq 1.2 \cdot 10^{-155}:\\ \;\;\;\;\frac{-{\left(2 \cdot \left(\left(2 \cdot C\right) \cdot \left(F \cdot \left(B \cdot B - \left(C \cdot A\right) \cdot 4\right)\right)\right)\right)}^{0.5}}{B \cdot B - \left(C \cdot A\right) \cdot 4}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{\left(2 \cdot \left(F \cdot \left(B \cdot B - \left(C \cdot A\right) \cdot 4\right)\right)\right) \cdot \left(2 \cdot A\right)}}{B \cdot B - \left(C \cdot A\right) \cdot 4}\\ \end{array} \]

Alternative 12: 15.7% accurate, 4.8× speedup?

\[\begin{array}{l} B = |B|\\ \\ \begin{array}{l} t_0 := B \cdot B - \left(C \cdot A\right) \cdot 4\\ \mathbf{if}\;A \leq 2.45 \cdot 10^{-37}:\\ \;\;\;\;\frac{-{\left(2 \cdot \left(\left(2 \cdot C\right) \cdot \left(F \cdot t_0\right)\right)\right)}^{0.5}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{F \cdot A} \cdot \left(B \cdot \left(-2\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) (* (* C A) 4.0))))
   (if (<= A 2.45e-37)
     (/ (- (pow (* 2.0 (* (* 2.0 C) (* F t_0))) 0.5)) t_0)
     (/ (* (sqrt (* F A)) (* B (- 2.0))) t_0))))
B = abs(B);
double code(double A, double B, double C, double F) {
	double t_0 = (B * B) - ((C * A) * 4.0);
	double tmp;
	if (A <= 2.45e-37) {
		tmp = -pow((2.0 * ((2.0 * C) * (F * t_0))), 0.5) / t_0;
	} else {
		tmp = (sqrt((F * A)) * (B * -2.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) - ((c * a) * 4.0d0)
    if (a <= 2.45d-37) then
        tmp = -((2.0d0 * ((2.0d0 * c) * (f * t_0))) ** 0.5d0) / t_0
    else
        tmp = (sqrt((f * a)) * (b * -2.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) - ((C * A) * 4.0);
	double tmp;
	if (A <= 2.45e-37) {
		tmp = -Math.pow((2.0 * ((2.0 * C) * (F * t_0))), 0.5) / t_0;
	} else {
		tmp = (Math.sqrt((F * A)) * (B * -2.0)) / t_0;
	}
	return tmp;
}
B = abs(B)
def code(A, B, C, F):
	t_0 = (B * B) - ((C * A) * 4.0)
	tmp = 0
	if A <= 2.45e-37:
		tmp = -math.pow((2.0 * ((2.0 * C) * (F * t_0))), 0.5) / t_0
	else:
		tmp = (math.sqrt((F * A)) * (B * -2.0)) / t_0
	return tmp
B = abs(B)
function code(A, B, C, F)
	t_0 = Float64(Float64(B * B) - Float64(Float64(C * A) * 4.0))
	tmp = 0.0
	if (A <= 2.45e-37)
		tmp = Float64(Float64(-(Float64(2.0 * Float64(Float64(2.0 * C) * Float64(F * t_0))) ^ 0.5)) / t_0);
	else
		tmp = Float64(Float64(sqrt(Float64(F * A)) * Float64(B * Float64(-2.0))) / t_0);
	end
	return tmp
end
B = abs(B)
function tmp_2 = code(A, B, C, F)
	t_0 = (B * B) - ((C * A) * 4.0);
	tmp = 0.0;
	if (A <= 2.45e-37)
		tmp = -((2.0 * ((2.0 * C) * (F * t_0))) ^ 0.5) / t_0;
	else
		tmp = (sqrt((F * A)) * (B * -2.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[(C * A), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, 2.45e-37], N[((-N[Power[N[(2.0 * N[(N[(2.0 * C), $MachinePrecision] * N[(F * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]) / t$95$0), $MachinePrecision], N[(N[(N[Sqrt[N[(F * A), $MachinePrecision]], $MachinePrecision] * N[(B * (-2.0)), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]]]
\begin{array}{l}
B = |B|\\
\\
\begin{array}{l}
t_0 := B \cdot B - \left(C \cdot A\right) \cdot 4\\
\mathbf{if}\;A \leq 2.45 \cdot 10^{-37}:\\
\;\;\;\;\frac{-{\left(2 \cdot \left(\left(2 \cdot C\right) \cdot \left(F \cdot t_0\right)\right)\right)}^{0.5}}{t_0}\\

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


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

    1. Initial program 23.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. Simplified23.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 25.0%

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

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

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

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

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

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

        \[\leadsto \frac{-{\left(2 \cdot \left(\left(F \cdot \left(B \cdot B - 4 \cdot \color{blue}{\left(C \cdot A\right)}\right)\right) \cdot \left(C \cdot 2\right)\right)\right)}^{0.5}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
      5. *-commutative25.1%

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

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

    if 2.45000000000000009e-37 < A

    1. Initial program 29.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. Simplified29.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 3.1%

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

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

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

        \[\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(C + \sqrt{C \cdot C + \color{blue}{B \cdot B}}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
      4. hypot-def3.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(C + \color{blue}{\mathsf{hypot}\left(C, B\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
    5. Simplified3.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 \color{blue}{\left(C + \mathsf{hypot}\left(C, B\right)\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
    6. Taylor expanded in C around -inf 8.2%

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

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

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

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

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

Alternative 13: 21.8% accurate, 4.8× speedup?

\[\begin{array}{l} B = |B|\\ \\ \begin{array}{l} t_0 := B \cdot B - \left(C \cdot A\right) \cdot 4\\ t_1 := F \cdot t_0\\ \mathbf{if}\;A \leq 3.8 \cdot 10^{-156}:\\ \;\;\;\;\frac{-{\left(2 \cdot \left(\left(2 \cdot C\right) \cdot t_1\right)\right)}^{0.5}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{\left(2 \cdot t_1\right) \cdot \left(2 \cdot A\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) (* (* C A) 4.0))) (t_1 (* F t_0)))
   (if (<= A 3.8e-156)
     (/ (- (pow (* 2.0 (* (* 2.0 C) t_1)) 0.5)) t_0)
     (/ (- (sqrt (* (* 2.0 t_1) (* 2.0 A)))) t_0))))
B = abs(B);
double code(double A, double B, double C, double F) {
	double t_0 = (B * B) - ((C * A) * 4.0);
	double t_1 = F * t_0;
	double tmp;
	if (A <= 3.8e-156) {
		tmp = -pow((2.0 * ((2.0 * C) * t_1)), 0.5) / t_0;
	} else {
		tmp = -sqrt(((2.0 * t_1) * (2.0 * 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) - ((c * a) * 4.0d0)
    t_1 = f * t_0
    if (a <= 3.8d-156) then
        tmp = -((2.0d0 * ((2.0d0 * c) * t_1)) ** 0.5d0) / t_0
    else
        tmp = -sqrt(((2.0d0 * t_1) * (2.0d0 * 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) - ((C * A) * 4.0);
	double t_1 = F * t_0;
	double tmp;
	if (A <= 3.8e-156) {
		tmp = -Math.pow((2.0 * ((2.0 * C) * t_1)), 0.5) / t_0;
	} else {
		tmp = -Math.sqrt(((2.0 * t_1) * (2.0 * A))) / t_0;
	}
	return tmp;
}
B = abs(B)
def code(A, B, C, F):
	t_0 = (B * B) - ((C * A) * 4.0)
	t_1 = F * t_0
	tmp = 0
	if A <= 3.8e-156:
		tmp = -math.pow((2.0 * ((2.0 * C) * t_1)), 0.5) / t_0
	else:
		tmp = -math.sqrt(((2.0 * t_1) * (2.0 * A))) / t_0
	return tmp
B = abs(B)
function code(A, B, C, F)
	t_0 = Float64(Float64(B * B) - Float64(Float64(C * A) * 4.0))
	t_1 = Float64(F * t_0)
	tmp = 0.0
	if (A <= 3.8e-156)
		tmp = Float64(Float64(-(Float64(2.0 * Float64(Float64(2.0 * C) * t_1)) ^ 0.5)) / t_0);
	else
		tmp = Float64(Float64(-sqrt(Float64(Float64(2.0 * t_1) * Float64(2.0 * A)))) / t_0);
	end
	return tmp
end
B = abs(B)
function tmp_2 = code(A, B, C, F)
	t_0 = (B * B) - ((C * A) * 4.0);
	t_1 = F * t_0;
	tmp = 0.0;
	if (A <= 3.8e-156)
		tmp = -((2.0 * ((2.0 * C) * t_1)) ^ 0.5) / t_0;
	else
		tmp = -sqrt(((2.0 * t_1) * (2.0 * 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[(C * A), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(F * t$95$0), $MachinePrecision]}, If[LessEqual[A, 3.8e-156], N[((-N[Power[N[(2.0 * N[(N[(2.0 * C), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]) / t$95$0), $MachinePrecision], N[((-N[Sqrt[N[(N[(2.0 * t$95$1), $MachinePrecision] * N[(2.0 * A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision]]]]
\begin{array}{l}
B = |B|\\
\\
\begin{array}{l}
t_0 := B \cdot B - \left(C \cdot A\right) \cdot 4\\
t_1 := F \cdot t_0\\
\mathbf{if}\;A \leq 3.8 \cdot 10^{-156}:\\
\;\;\;\;\frac{-{\left(2 \cdot \left(\left(2 \cdot C\right) \cdot t_1\right)\right)}^{0.5}}{t_0}\\

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


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

    1. Initial program 22.7%

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

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

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

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

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

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

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

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

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

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

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

    if 3.80000000000000008e-156 < A

    1. Initial program 29.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. Simplified29.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 27.7%

      \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right)\right) \cdot \color{blue}{\left(C + \left(-1 \cdot C + 2 \cdot A\right)\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
    4. Step-by-step derivation
      1. associate-+r+31.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 \color{blue}{\left(\left(C + -1 \cdot C\right) + 2 \cdot A\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
      2. distribute-rgt1-in31.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(\color{blue}{\left(-1 + 1\right) \cdot C} + 2 \cdot A\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
      3. metadata-eval31.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(\color{blue}{0} \cdot C + 2 \cdot A\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
      4. mul0-lft31.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(\color{blue}{0} + 2 \cdot A\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
    5. Simplified31.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 \color{blue}{\left(0 + 2 \cdot A\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification28.3%

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

Alternative 14: 15.6% accurate, 4.9× speedup?

\[\begin{array}{l} B = |B|\\ \\ \begin{array}{l} t_0 := B \cdot B - \left(C \cdot A\right) \cdot 4\\ \mathbf{if}\;A \leq 1.52 \cdot 10^{-37}:\\ \;\;\;\;\frac{-\sqrt{\left(2 \cdot \left(F \cdot t_0\right)\right) \cdot \left(2 \cdot C\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{F \cdot A} \cdot \left(B \cdot \left(-2\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) (* (* C A) 4.0))))
   (if (<= A 1.52e-37)
     (/ (- (sqrt (* (* 2.0 (* F t_0)) (* 2.0 C)))) t_0)
     (/ (* (sqrt (* F A)) (* B (- 2.0))) t_0))))
B = abs(B);
double code(double A, double B, double C, double F) {
	double t_0 = (B * B) - ((C * A) * 4.0);
	double tmp;
	if (A <= 1.52e-37) {
		tmp = -sqrt(((2.0 * (F * t_0)) * (2.0 * C))) / t_0;
	} else {
		tmp = (sqrt((F * A)) * (B * -2.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) - ((c * a) * 4.0d0)
    if (a <= 1.52d-37) then
        tmp = -sqrt(((2.0d0 * (f * t_0)) * (2.0d0 * c))) / t_0
    else
        tmp = (sqrt((f * a)) * (b * -2.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) - ((C * A) * 4.0);
	double tmp;
	if (A <= 1.52e-37) {
		tmp = -Math.sqrt(((2.0 * (F * t_0)) * (2.0 * C))) / t_0;
	} else {
		tmp = (Math.sqrt((F * A)) * (B * -2.0)) / t_0;
	}
	return tmp;
}
B = abs(B)
def code(A, B, C, F):
	t_0 = (B * B) - ((C * A) * 4.0)
	tmp = 0
	if A <= 1.52e-37:
		tmp = -math.sqrt(((2.0 * (F * t_0)) * (2.0 * C))) / t_0
	else:
		tmp = (math.sqrt((F * A)) * (B * -2.0)) / t_0
	return tmp
B = abs(B)
function code(A, B, C, F)
	t_0 = Float64(Float64(B * B) - Float64(Float64(C * A) * 4.0))
	tmp = 0.0
	if (A <= 1.52e-37)
		tmp = Float64(Float64(-sqrt(Float64(Float64(2.0 * Float64(F * t_0)) * Float64(2.0 * C)))) / t_0);
	else
		tmp = Float64(Float64(sqrt(Float64(F * A)) * Float64(B * Float64(-2.0))) / t_0);
	end
	return tmp
end
B = abs(B)
function tmp_2 = code(A, B, C, F)
	t_0 = (B * B) - ((C * A) * 4.0);
	tmp = 0.0;
	if (A <= 1.52e-37)
		tmp = -sqrt(((2.0 * (F * t_0)) * (2.0 * C))) / t_0;
	else
		tmp = (sqrt((F * A)) * (B * -2.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[(C * A), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, 1.52e-37], N[((-N[Sqrt[N[(N[(2.0 * N[(F * t$95$0), $MachinePrecision]), $MachinePrecision] * N[(2.0 * C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], N[(N[(N[Sqrt[N[(F * A), $MachinePrecision]], $MachinePrecision] * N[(B * (-2.0)), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]]]
\begin{array}{l}
B = |B|\\
\\
\begin{array}{l}
t_0 := B \cdot B - \left(C \cdot A\right) \cdot 4\\
\mathbf{if}\;A \leq 1.52 \cdot 10^{-37}:\\
\;\;\;\;\frac{-\sqrt{\left(2 \cdot \left(F \cdot t_0\right)\right) \cdot \left(2 \cdot C\right)}}{t_0}\\

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


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

    1. Initial program 23.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. Simplified23.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 25.0%

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

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

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

    if 1.52e-37 < A

    1. Initial program 29.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. Simplified29.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 3.1%

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

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

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

        \[\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(C + \sqrt{C \cdot C + \color{blue}{B \cdot B}}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
      4. hypot-def3.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(C + \color{blue}{\mathsf{hypot}\left(C, B\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
    5. Simplified3.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 \color{blue}{\left(C + \mathsf{hypot}\left(C, B\right)\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
    6. Taylor expanded in C around -inf 8.2%

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

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

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

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

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

Alternative 15: 10.2% accurate, 5.2× speedup?

\[\begin{array}{l} B = |B|\\ \\ \begin{array}{l} \mathbf{if}\;C \leq 9.6 \cdot 10^{+83}:\\ \;\;\;\;\frac{-\sqrt{-16 \cdot \left(A \cdot \left(F \cdot \left(C \cdot C\right)\right)\right)}}{B \cdot B - \left(C \cdot A\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 9.6e+83)
   (/ (- (sqrt (* -16.0 (* A (* F (* C C)))))) (- (* B B) (* (* C A) 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 <= 9.6e+83) {
		tmp = -sqrt((-16.0 * (A * (F * (C * C))))) / ((B * B) - ((C * A) * 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 <= 9.6d+83) then
        tmp = -sqrt(((-16.0d0) * (a * (f * (c * c))))) / ((b * b) - ((c * a) * 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 <= 9.6e+83) {
		tmp = -Math.sqrt((-16.0 * (A * (F * (C * C))))) / ((B * B) - ((C * A) * 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 <= 9.6e+83:
		tmp = -math.sqrt((-16.0 * (A * (F * (C * C))))) / ((B * B) - ((C * A) * 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 <= 9.6e+83)
		tmp = Float64(Float64(-sqrt(Float64(-16.0 * Float64(A * Float64(F * Float64(C * C)))))) / Float64(Float64(B * B) - Float64(Float64(C * A) * 4.0)));
	else
		tmp = Float64(sqrt(Float64(F * C)) * Float64(-2.0 / B));
	end
	return tmp
end
B = abs(B)
function tmp_2 = code(A, B, C, F)
	tmp = 0.0;
	if (C <= 9.6e+83)
		tmp = -sqrt((-16.0 * (A * (F * (C * C))))) / ((B * B) - ((C * A) * 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, 9.6e+83], N[((-N[Sqrt[N[(-16.0 * N[(A * N[(F * N[(C * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / N[(N[(B * B), $MachinePrecision] - N[(N[(C * A), $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 9.6 \cdot 10^{+83}:\\
\;\;\;\;\frac{-\sqrt{-16 \cdot \left(A \cdot \left(F \cdot \left(C \cdot C\right)\right)\right)}}{B \cdot B - \left(C \cdot A\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 < 9.59999999999999965e83

    1. Initial program 26.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. Simplified26.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 14.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 \color{blue}{\left(2 \cdot C\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
    4. Step-by-step derivation
      1. *-commutative14.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 \color{blue}{\left(C \cdot 2\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
    5. Simplified14.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 \color{blue}{\left(C \cdot 2\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
    6. Taylor expanded in B around 0 12.3%

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

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

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

    if 9.59999999999999965e83 < 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 3.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-neg3.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 7.3% accurate, 5.3× speedup?

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

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


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

    1. Initial program 22.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. Simplified22.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 11.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{C \cdot F} \cdot \frac{\color{blue}{-2}}{B} \]
    10. Simplified5.3%

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

    if 4.9000000000000001e-144 < A

    1. Initial program 29.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. Simplified29.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 7.0%

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

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

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

        \[\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(C + \sqrt{C \cdot C + \color{blue}{B \cdot B}}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
      4. hypot-def8.0%

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

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

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

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

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

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

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

Alternative 17: 4.9% 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(-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 25.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. Simplified25.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-def16.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{C \cdot F} \cdot \color{blue}{\frac{-1 \cdot 2}{B}} \]
    10. metadata-eval3.6%

      \[\leadsto \sqrt{C \cdot F} \cdot \frac{\color{blue}{-2}}{B} \]
  10. Simplified3.6%

    \[\leadsto \color{blue}{\sqrt{C \cdot F} \cdot \frac{-2}{B}} \]
  11. Final simplification3.6%

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

Reproduce

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