ABCF->ab-angle a

Percentage Accurate: 18.6% → 52.2%
Time: 37.2s
Alternatives: 20
Speedup: 3.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 20 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.6% accurate, 1.0× speedup?

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

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

Alternative 1: 52.2% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 23.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.00000000000000036e69 < (pow.f64 B 2)

    1. Initial program 11.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 48.7% accurate, 1.2× speedup?

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

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

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


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

    1. Initial program 23.0%

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

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

    if 5.00000000000000036e69 < (pow.f64 B 2)

    1. Initial program 11.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 40.3% accurate, 1.2× speedup?

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

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

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


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

    1. Initial program 17.4%

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

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

    if 4.9999999999999998e-82 < (pow.f64 B 2)

    1. Initial program 18.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 45.2% accurate, 1.4× speedup?

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

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

\mathbf{elif}\;B\_m \leq 5.2 \cdot 10^{-7}:\\
\;\;\;\;\frac{-\sqrt{t\_2 \cdot \left(A + \mathsf{hypot}\left(B\_m, A\right)\right)}}{t\_0}\\

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

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


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

    1. Initial program 19.1%

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

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

    if 3.8499999999999999e-41 < B < 5.19999999999999998e-7

    1. Initial program 35.9%

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

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

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

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

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

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

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

    if 5.19999999999999998e-7 < B < 1

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

    if 1 < B

    1. Initial program 12.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 45.1% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
t_0 := {B\_m}^{2} - C \cdot \left(A \cdot 4\right)\\
t_1 := 2 \cdot \left(F \cdot t\_0\right)\\
\mathbf{if}\;B\_m \leq 2.6 \cdot 10^{-41}:\\
\;\;\;\;\frac{-\sqrt{t\_1 \cdot \left(2 \cdot C\right)}}{t\_0}\\

\mathbf{elif}\;B\_m \leq 0.96:\\
\;\;\;\;\frac{-\sqrt{t\_1 \cdot \left(A + \mathsf{hypot}\left(B\_m, A\right)\right)}}{t\_0}\\

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


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

    1. Initial program 19.1%

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

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

    if 2.5999999999999999e-41 < B < 0.95999999999999996

    1. Initial program 45.0%

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

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

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

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

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

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

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

    if 0.95999999999999996 < B

    1. Initial program 12.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 44.7% accurate, 1.5× speedup?

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

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

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


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

    1. Initial program 19.1%

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

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

    if 3.8000000000000002e-39 < B

    1. Initial program 15.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 44.7% accurate, 1.5× speedup?

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

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

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


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

    1. Initial program 19.1%

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

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

    if 2.2200000000000001e-41 < B

    1. Initial program 15.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 38.5% accurate, 1.9× speedup?

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

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

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

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

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


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

    1. Initial program 26.3%

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\sqrt{2}}{B} \cdot \left(-\sqrt{\color{blue}{-0.5 \cdot \frac{{B}^{2} \cdot F}{A}}}\right) \]
    7. Step-by-step derivation
      1. add-sqr-sqrt12.6%

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

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

        \[\leadsto \frac{\sqrt{2}}{B} \cdot \left(-\color{blue}{\sqrt{-\sqrt{-0.5 \cdot \frac{{B}^{2} \cdot F}{A}}} \cdot \sqrt{-\sqrt{-0.5 \cdot \frac{{B}^{2} \cdot F}{A}}}}\right) \]
      4. add-sqr-sqrt31.8%

        \[\leadsto \frac{\sqrt{2}}{B} \cdot \left(-\color{blue}{\left(-\sqrt{-0.5 \cdot \frac{{B}^{2} \cdot F}{A}}\right)}\right) \]
      5. add-sqr-sqrt31.8%

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

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

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

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

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

        \[\leadsto \frac{\sqrt{2}}{B} \cdot \left(-{\left(-0.5 \cdot \frac{{B}^{2}}{\frac{A}{F}}\right)}^{\color{blue}{0.25}} \cdot \left(-\sqrt{\sqrt{-0.5 \cdot \frac{{B}^{2} \cdot F}{A}}}\right)\right) \]
      11. pow1/217.5%

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

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

      \[\leadsto \frac{\sqrt{2}}{B} \cdot \left(-\color{blue}{{\left(-0.5 \cdot \frac{{B}^{2}}{\frac{A}{F}}\right)}^{0.25} \cdot \left(-{\left(-0.5 \cdot \frac{{B}^{2}}{\frac{A}{F}}\right)}^{0.25}\right)}\right) \]
    9. Step-by-step derivation
      1. distribute-rgt-neg-out17.7%

        \[\leadsto \frac{\sqrt{2}}{B} \cdot \left(-\color{blue}{\left(-{\left(-0.5 \cdot \frac{{B}^{2}}{\frac{A}{F}}\right)}^{0.25} \cdot {\left(-0.5 \cdot \frac{{B}^{2}}{\frac{A}{F}}\right)}^{0.25}\right)}\right) \]
      2. pow-sqr17.8%

        \[\leadsto \frac{\sqrt{2}}{B} \cdot \left(-\left(-\color{blue}{{\left(-0.5 \cdot \frac{{B}^{2}}{\frac{A}{F}}\right)}^{\left(2 \cdot 0.25\right)}}\right)\right) \]
      3. metadata-eval17.8%

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

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

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

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

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

    if -3.80000000000000017e-184 < F < -9.999999999999969e-311

    1. Initial program 30.2%

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

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

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

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

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

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

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

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

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

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

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

    if -9.999999999999969e-311 < F < 2.69999999999999991e68

    1. Initial program 23.1%

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

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

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

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

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

      \[\leadsto -\color{blue}{\sqrt[3]{{\left(\frac{{\left(2 \cdot \left(F \cdot \left(C + \mathsf{hypot}\left(C, B\right)\right)\right)\right)}^{0.5}}{B}\right)}^{3}}} \]
    8. Step-by-step derivation
      1. rem-cbrt-cube24.5%

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

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

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

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

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

    if 2.69999999999999991e68 < F

    1. Initial program 6.2%

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 38.6% accurate, 1.9× speedup?

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

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

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

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


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

    1. Initial program 27.9%

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

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

    if -9.999999999999969e-311 < F < 7.99999999999999986e67

    1. Initial program 23.1%

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

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

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

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

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

      \[\leadsto -\color{blue}{\sqrt[3]{{\left(\frac{{\left(2 \cdot \left(F \cdot \left(C + \mathsf{hypot}\left(C, B\right)\right)\right)\right)}^{0.5}}{B}\right)}^{3}}} \]
    8. Step-by-step derivation
      1. rem-cbrt-cube24.5%

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

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

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

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

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

    if 7.99999999999999986e67 < F

    1. Initial program 6.2%

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 37.6% accurate, 2.0× speedup?

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

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

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

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


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

    1. Initial program 27.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.99999999999999938e-279 < F < 5.1999999999999996e68

    1. Initial program 23.4%

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

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

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

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

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

      \[\leadsto -\color{blue}{\sqrt[3]{{\left(\frac{{\left(2 \cdot \left(F \cdot \left(C + \mathsf{hypot}\left(C, B\right)\right)\right)\right)}^{0.5}}{B}\right)}^{3}}} \]
    8. Step-by-step derivation
      1. rem-cbrt-cube24.0%

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

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

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

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

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

    if 5.1999999999999996e68 < F

    1. Initial program 6.2%

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 38.2% accurate, 2.0× speedup?

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

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

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

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


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

    1. Initial program 28.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{2}}{B} \cdot \left(-{\left(-0.5 \cdot \frac{{B}^{2}}{\frac{A}{F}}\right)}^{\color{blue}{0.25}} \cdot \left(-\sqrt{\sqrt{-0.5 \cdot \frac{{B}^{2} \cdot F}{A}}}\right)\right) \]
      11. pow1/212.4%

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

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

      \[\leadsto \frac{\sqrt{2}}{B} \cdot \left(-\color{blue}{{\left(-0.5 \cdot \frac{{B}^{2}}{\frac{A}{F}}\right)}^{0.25} \cdot \left(-{\left(-0.5 \cdot \frac{{B}^{2}}{\frac{A}{F}}\right)}^{0.25}\right)}\right) \]
    9. Step-by-step derivation
      1. distribute-rgt-neg-out12.5%

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

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

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

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

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

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

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

    if -8.5e-304 < F < 1.3199999999999999e70

    1. Initial program 23.0%

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.3199999999999999e70 < F

    1. Initial program 6.2%

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 35.5% accurate, 2.9× speedup?

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

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

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


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

    1. Initial program 24.1%

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.3199999999999999e70 < F

    1. Initial program 6.2%

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 35.6% accurate, 2.9× speedup?

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

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

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


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

    1. Initial program 24.1%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(-\frac{{\left(2 \cdot \left(F \cdot \left(C + \mathsf{hypot}\left(C, B\right)\right)\right)\right)}^{0.5}}{B}\right)} - 1} \]
    7. Step-by-step derivation
      1. expm1-def16.6%

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

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

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

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

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

    if 1.54999999999999994e72 < F

    1. Initial program 6.2%

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 27.8% accurate, 3.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if C < 3.8000000000000002e133

    1. Initial program 21.4%

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

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

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

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

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

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

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

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

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

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

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

    if 3.8000000000000002e133 < C

    1. Initial program 3.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\left(\sqrt{F} \cdot \sqrt{C}\right)} \cdot \frac{2}{B} \]
    10. Applied egg-rr16.3%

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

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

Alternative 15: 33.3% accurate, 3.0× speedup?

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

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

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


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

    1. Initial program 24.3%

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

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

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

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

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

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

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

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

    if 1.8000000000000001e57 < F

    1. Initial program 6.8%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 26.9% accurate, 3.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if C < 9.50000000000000004e124

    1. Initial program 21.4%

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

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

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

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

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

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

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

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

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

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

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

    if 9.50000000000000004e124 < C

    1. Initial program 3.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 17: 8.4% accurate, 5.6× speedup?

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

\\
\begin{array}{l}
t_0 := \frac{-2}{B\_m}\\
\mathbf{if}\;A \leq 4.5 \cdot 10^{-174}:\\
\;\;\;\;{\left(C \cdot F\right)}^{0.5} \cdot t\_0\\

\mathbf{else}:\\
\;\;\;\;\sqrt{A \cdot F} \cdot t\_0\\


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

    1. Initial program 13.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.49999999999999964e-174 < A

    1. Initial program 24.2%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\frac{\color{blue}{\sqrt{2} \cdot \sqrt{2}}}{B} \cdot \sqrt{A \cdot F} \]
      4. rem-square-sqrt10.5%

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

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

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

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

Alternative 18: 8.3% accurate, 5.6× speedup?

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

\\
\begin{array}{l}
t_0 := \frac{-2}{B\_m}\\
\mathbf{if}\;A \leq 3.2 \cdot 10^{-171}:\\
\;\;\;\;\sqrt{C \cdot F} \cdot t\_0\\

\mathbf{else}:\\
\;\;\;\;\sqrt{A \cdot F} \cdot t\_0\\


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

    1. Initial program 13.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.2000000000000001e-171 < A

    1. Initial program 24.2%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\frac{\color{blue}{\sqrt{2} \cdot \sqrt{2}}}{B} \cdot \sqrt{A \cdot F} \]
      4. rem-square-sqrt10.5%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq 3.2 \cdot 10^{-171}:\\ \;\;\;\;\sqrt{C \cdot F} \cdot \frac{-2}{B}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{A \cdot F} \cdot \frac{-2}{B}\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 5.0% accurate, 5.9× speedup?

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

\\
\sqrt{C \cdot F} \cdot \frac{-2}{B\_m}
\end{array}
Derivation
  1. Initial program 18.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 20: 5.0% accurate, 5.9× speedup?

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

\\
\frac{\sqrt{C \cdot F} \cdot -2}{B\_m}
\end{array}
Derivation
  1. Initial program 18.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{-\color{blue}{\sqrt{C \cdot F} \cdot 2}}{B} \]
    7. distribute-rgt-neg-in3.4%

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

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

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

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

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

Reproduce

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