Average Error: 52.7 → 39.0
Time: 36.3s
Precision: binary64
\[[A, C] = \mathsf{sort}([A, 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} \]
\[\begin{array}{l} t_0 := \sqrt{-0.5 \cdot F}\\ t_1 := -t_0 \cdot \sqrt{\frac{2}{C}}\\ \mathbf{if}\;B \leq -5.192355289516512 \cdot 10^{+145}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\begin{array}{l} t_2 := \mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)\\ t_3 := \sqrt{t_2}\\ t_4 := \sqrt{2 \cdot \left(F \cdot \left(\left(C + A\right) - \mathsf{hypot}\left(B, A - C\right)\right)\right)}\\ \mathbf{if}\;B \leq -1.9368627004399634 \cdot 10^{+62}:\\ \;\;\;\;\frac{-t_3}{\frac{t_2}{t_4}}\\ \mathbf{elif}\;B \leq -1.1887020586003648 \cdot 10^{-9}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\begin{array}{l} t_5 := \sqrt{-8 \cdot \left(F \cdot C\right)}\\ t_6 := \sqrt{2} \cdot t_5\\ t_7 := \frac{\mathsf{fma}\left(A, t_6, \frac{F \cdot \left(\left(B \cdot B\right) \cdot \sqrt{2}\right)}{t_5}\right)}{t_2}\\ \mathbf{if}\;B \leq -1.6488967253407525 \cdot 10^{-202}:\\ \;\;\;\;t_7\\ \mathbf{elif}\;B \leq -7.764483043690051 \cdot 10^{-244}:\\ \;\;\;\;\begin{array}{l} t_8 := \sqrt{\sqrt{C}}\\ -\frac{t_0}{t_8} \cdot \frac{\sqrt{2}}{t_8} \end{array}\\ \mathbf{elif}\;B \leq 1.808071538330122 \cdot 10^{-259}:\\ \;\;\;\;\frac{A \cdot t_6}{t_2}\\ \mathbf{elif}\;B \leq 1.5834672922955202 \cdot 10^{-160}:\\ \;\;\;\;\frac{-\sqrt{t_2 \cdot \left(2 \cdot \left(F \cdot \mathsf{fma}\left(2, A, 0.5 \cdot \frac{B \cdot B}{A}\right)\right)\right)}}{t_2}\\ \mathbf{elif}\;B \leq 1.9689375832376793 \cdot 10^{-100}:\\ \;\;\;\;t_7\\ \mathbf{elif}\;B \leq 3.5954420532414973 \cdot 10^{-12}:\\ \;\;\;\;-\frac{t_4}{t_3}\\ \mathbf{elif}\;B \leq 5.757347306203787 \cdot 10^{+100}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;-\sqrt{F \cdot \left(A - \mathsf{hypot}\left(A, B\right)\right)} \cdot \frac{\sqrt{2}}{B}\\ \end{array}\\ \end{array}\\ \end{array} \]
\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}
\begin{array}{l}
t_0 := \sqrt{-0.5 \cdot F}\\
t_1 := -t_0 \cdot \sqrt{\frac{2}{C}}\\
\mathbf{if}\;B \leq -5.192355289516512 \cdot 10^{+145}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;\begin{array}{l}
t_2 := \mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)\\
t_3 := \sqrt{t_2}\\
t_4 := \sqrt{2 \cdot \left(F \cdot \left(\left(C + A\right) - \mathsf{hypot}\left(B, A - C\right)\right)\right)}\\
\mathbf{if}\;B \leq -1.9368627004399634 \cdot 10^{+62}:\\
\;\;\;\;\frac{-t_3}{\frac{t_2}{t_4}}\\

\mathbf{elif}\;B \leq -1.1887020586003648 \cdot 10^{-9}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;\begin{array}{l}
t_5 := \sqrt{-8 \cdot \left(F \cdot C\right)}\\
t_6 := \sqrt{2} \cdot t_5\\
t_7 := \frac{\mathsf{fma}\left(A, t_6, \frac{F \cdot \left(\left(B \cdot B\right) \cdot \sqrt{2}\right)}{t_5}\right)}{t_2}\\
\mathbf{if}\;B \leq -1.6488967253407525 \cdot 10^{-202}:\\
\;\;\;\;t_7\\

\mathbf{elif}\;B \leq -7.764483043690051 \cdot 10^{-244}:\\
\;\;\;\;\begin{array}{l}
t_8 := \sqrt{\sqrt{C}}\\
-\frac{t_0}{t_8} \cdot \frac{\sqrt{2}}{t_8}
\end{array}\\

\mathbf{elif}\;B \leq 1.808071538330122 \cdot 10^{-259}:\\
\;\;\;\;\frac{A \cdot t_6}{t_2}\\

\mathbf{elif}\;B \leq 1.5834672922955202 \cdot 10^{-160}:\\
\;\;\;\;\frac{-\sqrt{t_2 \cdot \left(2 \cdot \left(F \cdot \mathsf{fma}\left(2, A, 0.5 \cdot \frac{B \cdot B}{A}\right)\right)\right)}}{t_2}\\

\mathbf{elif}\;B \leq 1.9689375832376793 \cdot 10^{-100}:\\
\;\;\;\;t_7\\

\mathbf{elif}\;B \leq 3.5954420532414973 \cdot 10^{-12}:\\
\;\;\;\;-\frac{t_4}{t_3}\\

\mathbf{elif}\;B \leq 5.757347306203787 \cdot 10^{+100}:\\
\;\;\;\;t_1\\

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


\end{array}\\


\end{array}\\


\end{array}
(FPCore (A B C F)
 :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))))
(FPCore (A B C F)
 :precision binary64
 (let* ((t_0 (sqrt (* -0.5 F))) (t_1 (- (* t_0 (sqrt (/ 2.0 C))))))
   (if (<= B -5.192355289516512e+145)
     t_1
     (let* ((t_2 (fma A (* C -4.0) (* B B)))
            (t_3 (sqrt t_2))
            (t_4 (sqrt (* 2.0 (* F (- (+ C A) (hypot B (- A C))))))))
       (if (<= B -1.9368627004399634e+62)
         (/ (- t_3) (/ t_2 t_4))
         (if (<= B -1.1887020586003648e-9)
           t_1
           (let* ((t_5 (sqrt (* -8.0 (* F C))))
                  (t_6 (* (sqrt 2.0) t_5))
                  (t_7
                   (/ (fma A t_6 (/ (* F (* (* B B) (sqrt 2.0))) t_5)) t_2)))
             (if (<= B -1.6488967253407525e-202)
               t_7
               (if (<= B -7.764483043690051e-244)
                 (let* ((t_8 (sqrt (sqrt C))))
                   (- (* (/ t_0 t_8) (/ (sqrt 2.0) t_8))))
                 (if (<= B 1.808071538330122e-259)
                   (/ (* A t_6) t_2)
                   (if (<= B 1.5834672922955202e-160)
                     (/
                      (-
                       (sqrt
                        (*
                         t_2
                         (* 2.0 (* F (fma 2.0 A (* 0.5 (/ (* B B) A))))))))
                      t_2)
                     (if (<= B 1.9689375832376793e-100)
                       t_7
                       (if (<= B 3.5954420532414973e-12)
                         (- (/ t_4 t_3))
                         (if (<= B 5.757347306203787e+100)
                           t_1
                           (-
                            (*
                             (sqrt (* F (- A (hypot A B))))
                             (/ (sqrt 2.0) B)))))))))))))))))
double code(double A, double B, double C, double F) {
	return -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));
}
double code(double A, double B, double C, double F) {
	double t_0 = sqrt(-0.5 * F);
	double t_1 = -(t_0 * sqrt(2.0 / C));
	double tmp;
	if (B <= -5.192355289516512e+145) {
		tmp = t_1;
	} else {
		double t_2 = fma(A, (C * -4.0), (B * B));
		double t_3 = sqrt(t_2);
		double t_4 = sqrt(2.0 * (F * ((C + A) - hypot(B, (A - C)))));
		double tmp_1;
		if (B <= -1.9368627004399634e+62) {
			tmp_1 = -t_3 / (t_2 / t_4);
		} else if (B <= -1.1887020586003648e-9) {
			tmp_1 = t_1;
		} else {
			double t_5 = sqrt(-8.0 * (F * C));
			double t_6 = sqrt(2.0) * t_5;
			double t_7 = fma(A, t_6, ((F * ((B * B) * sqrt(2.0))) / t_5)) / t_2;
			double tmp_2;
			if (B <= -1.6488967253407525e-202) {
				tmp_2 = t_7;
			} else if (B <= -7.764483043690051e-244) {
				double t_8 = sqrt(sqrt(C));
				tmp_2 = -((t_0 / t_8) * (sqrt(2.0) / t_8));
			} else if (B <= 1.808071538330122e-259) {
				tmp_2 = (A * t_6) / t_2;
			} else if (B <= 1.5834672922955202e-160) {
				tmp_2 = -sqrt(t_2 * (2.0 * (F * fma(2.0, A, (0.5 * ((B * B) / A)))))) / t_2;
			} else if (B <= 1.9689375832376793e-100) {
				tmp_2 = t_7;
			} else if (B <= 3.5954420532414973e-12) {
				tmp_2 = -(t_4 / t_3);
			} else if (B <= 5.757347306203787e+100) {
				tmp_2 = t_1;
			} else {
				tmp_2 = -(sqrt(F * (A - hypot(A, B))) * (sqrt(2.0) / B));
			}
			tmp_1 = tmp_2;
		}
		tmp = tmp_1;
	}
	return tmp;
}

Error

Bits error versus A

Bits error versus B

Bits error versus C

Bits error versus F

Derivation

  1. Split input into 8 regimes
  2. if B < -5.1923552895165125e145 or -1.9368627004399634e62 < B < -1.1887020586003648e-9 or 3.59544205324149731e-12 < B < 5.7573473062037871e100

    1. Initial program 52.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. Simplified50.8

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

      \[\leadsto \color{blue}{-1 \cdot \left(\sqrt{-0.5 \cdot \frac{F}{C}} \cdot \sqrt{2}\right)} \]
    4. Simplified50.7

      \[\leadsto \color{blue}{-\sqrt{-0.5 \cdot \frac{F}{C}} \cdot \sqrt{2}} \]
    5. Applied associate-*r/_binary6450.7

      \[\leadsto -\sqrt{\color{blue}{\frac{-0.5 \cdot F}{C}}} \cdot \sqrt{2} \]
    6. Applied sqrt-div_binary6446.6

      \[\leadsto -\color{blue}{\frac{\sqrt{-0.5 \cdot F}}{\sqrt{C}}} \cdot \sqrt{2} \]
    7. Applied div-inv_binary6446.6

      \[\leadsto -\color{blue}{\left(\sqrt{-0.5 \cdot F} \cdot \frac{1}{\sqrt{C}}\right)} \cdot \sqrt{2} \]
    8. Applied associate-*l*_binary6446.6

      \[\leadsto -\color{blue}{\sqrt{-0.5 \cdot F} \cdot \left(\frac{1}{\sqrt{C}} \cdot \sqrt{2}\right)} \]
    9. Simplified46.6

      \[\leadsto -\sqrt{-0.5 \cdot F} \cdot \color{blue}{\frac{\sqrt{2}}{\sqrt{C}}} \]
    10. Applied sqrt-undiv_binary6446.6

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

    if -5.1923552895165125e145 < B < -1.9368627004399634e62

    1. Initial program 49.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. Simplified46.1

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

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

      \[\leadsto \frac{\color{blue}{\left(-\sqrt{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}\right) \cdot \sqrt{2 \cdot \left(F \cdot \left(\left(A + C\right) - \mathsf{hypot}\left(B, A - C\right)\right)\right)}}}{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)} \]
    5. Applied associate-/l*_binary6433.4

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

    if -1.1887020586003648e-9 < B < -1.6488967253407525e-202 or 1.5834672922955202e-160 < B < 1.96893758323767929e-100

    1. Initial program 49.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. Simplified43.9

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

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

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

    if -1.6488967253407525e-202 < B < -7.7644830436900508e-244

    1. Initial program 52.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. Simplified50.4

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

      \[\leadsto \color{blue}{-1 \cdot \left(\sqrt{-0.5 \cdot \frac{F}{C}} \cdot \sqrt{2}\right)} \]
    4. Simplified41.1

      \[\leadsto \color{blue}{-\sqrt{-0.5 \cdot \frac{F}{C}} \cdot \sqrt{2}} \]
    5. Applied associate-*r/_binary6441.1

      \[\leadsto -\sqrt{\color{blue}{\frac{-0.5 \cdot F}{C}}} \cdot \sqrt{2} \]
    6. Applied sqrt-div_binary6433.8

      \[\leadsto -\color{blue}{\frac{\sqrt{-0.5 \cdot F}}{\sqrt{C}}} \cdot \sqrt{2} \]
    7. Applied div-inv_binary6433.8

      \[\leadsto -\color{blue}{\left(\sqrt{-0.5 \cdot F} \cdot \frac{1}{\sqrt{C}}\right)} \cdot \sqrt{2} \]
    8. Applied associate-*l*_binary6433.8

      \[\leadsto -\color{blue}{\sqrt{-0.5 \cdot F} \cdot \left(\frac{1}{\sqrt{C}} \cdot \sqrt{2}\right)} \]
    9. Simplified33.8

      \[\leadsto -\sqrt{-0.5 \cdot F} \cdot \color{blue}{\frac{\sqrt{2}}{\sqrt{C}}} \]
    10. Applied add-sqr-sqrt_binary6433.9

      \[\leadsto -\sqrt{-0.5 \cdot F} \cdot \frac{\sqrt{2}}{\color{blue}{\sqrt{\sqrt{C}} \cdot \sqrt{\sqrt{C}}}} \]
    11. Applied *-un-lft-identity_binary6433.9

      \[\leadsto -\sqrt{-0.5 \cdot F} \cdot \frac{\sqrt{\color{blue}{1 \cdot 2}}}{\sqrt{\sqrt{C}} \cdot \sqrt{\sqrt{C}}} \]
    12. Applied sqrt-prod_binary6433.9

      \[\leadsto -\sqrt{-0.5 \cdot F} \cdot \frac{\color{blue}{\sqrt{1} \cdot \sqrt{2}}}{\sqrt{\sqrt{C}} \cdot \sqrt{\sqrt{C}}} \]
    13. Applied times-frac_binary6433.9

      \[\leadsto -\sqrt{-0.5 \cdot F} \cdot \color{blue}{\left(\frac{\sqrt{1}}{\sqrt{\sqrt{C}}} \cdot \frac{\sqrt{2}}{\sqrt{\sqrt{C}}}\right)} \]
    14. Applied associate-*r*_binary6433.9

      \[\leadsto -\color{blue}{\left(\sqrt{-0.5 \cdot F} \cdot \frac{\sqrt{1}}{\sqrt{\sqrt{C}}}\right) \cdot \frac{\sqrt{2}}{\sqrt{\sqrt{C}}}} \]
    15. Simplified33.9

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

    if -7.7644830436900508e-244 < B < 1.8080715383301219e-259

    1. Initial program 51.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. Simplified47.0

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

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

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

    if 1.8080715383301219e-259 < B < 1.5834672922955202e-160

    1. Initial program 54.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. Simplified47.8

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

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

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

    if 1.96893758323767929e-100 < B < 3.59544205324149731e-12

    1. Initial program 46.1

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

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

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

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

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

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

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

    if 5.7573473062037871e100 < B

    1. Initial program 60.5

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -5.192355289516512 \cdot 10^{+145}:\\ \;\;\;\;-\sqrt{-0.5 \cdot F} \cdot \sqrt{\frac{2}{C}}\\ \mathbf{elif}\;B \leq -1.9368627004399634 \cdot 10^{+62}:\\ \;\;\;\;\frac{-\sqrt{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}}{\frac{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}{\sqrt{2 \cdot \left(F \cdot \left(\left(C + A\right) - \mathsf{hypot}\left(B, A - C\right)\right)\right)}}}\\ \mathbf{elif}\;B \leq -1.1887020586003648 \cdot 10^{-9}:\\ \;\;\;\;-\sqrt{-0.5 \cdot F} \cdot \sqrt{\frac{2}{C}}\\ \mathbf{elif}\;B \leq -1.6488967253407525 \cdot 10^{-202}:\\ \;\;\;\;\frac{\mathsf{fma}\left(A, \sqrt{2} \cdot \sqrt{-8 \cdot \left(F \cdot C\right)}, \frac{F \cdot \left(\left(B \cdot B\right) \cdot \sqrt{2}\right)}{\sqrt{-8 \cdot \left(F \cdot C\right)}}\right)}{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}\\ \mathbf{elif}\;B \leq -7.764483043690051 \cdot 10^{-244}:\\ \;\;\;\;-\frac{\sqrt{-0.5 \cdot F}}{\sqrt{\sqrt{C}}} \cdot \frac{\sqrt{2}}{\sqrt{\sqrt{C}}}\\ \mathbf{elif}\;B \leq 1.808071538330122 \cdot 10^{-259}:\\ \;\;\;\;\frac{A \cdot \left(\sqrt{2} \cdot \sqrt{-8 \cdot \left(F \cdot C\right)}\right)}{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}\\ \mathbf{elif}\;B \leq 1.5834672922955202 \cdot 10^{-160}:\\ \;\;\;\;\frac{-\sqrt{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right) \cdot \left(2 \cdot \left(F \cdot \mathsf{fma}\left(2, A, 0.5 \cdot \frac{B \cdot B}{A}\right)\right)\right)}}{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}\\ \mathbf{elif}\;B \leq 1.9689375832376793 \cdot 10^{-100}:\\ \;\;\;\;\frac{\mathsf{fma}\left(A, \sqrt{2} \cdot \sqrt{-8 \cdot \left(F \cdot C\right)}, \frac{F \cdot \left(\left(B \cdot B\right) \cdot \sqrt{2}\right)}{\sqrt{-8 \cdot \left(F \cdot C\right)}}\right)}{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}\\ \mathbf{elif}\;B \leq 3.5954420532414973 \cdot 10^{-12}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(F \cdot \left(\left(C + A\right) - \mathsf{hypot}\left(B, A - C\right)\right)\right)}}{\sqrt{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}}\\ \mathbf{elif}\;B \leq 5.757347306203787 \cdot 10^{+100}:\\ \;\;\;\;-\sqrt{-0.5 \cdot F} \cdot \sqrt{\frac{2}{C}}\\ \mathbf{else}:\\ \;\;\;\;-\sqrt{F \cdot \left(A - \mathsf{hypot}\left(A, B\right)\right)} \cdot \frac{\sqrt{2}}{B}\\ \end{array} \]

Reproduce

herbie shell --seed 2022082 
(FPCore (A B C F)
  :name "ABCF->ab-angle b"
  :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))))