Average Error: 52.4 → 32.2
Time: 18.9s
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} \mathbf{if}\;\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \leq -\infty:\\ \;\;\;\;\sqrt{\frac{-1}{A}} \cdot \left(-\sqrt{F}\right)\\ \mathbf{elif}\;\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \leq -2.2256569729151864 \cdot 10^{-162}:\\ \;\;\;\;\frac{-\sqrt{\left(\left(A + C\right) + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right) \cdot \left(2 \cdot \left({B}^{2} \cdot F - 4 \cdot \left(C \cdot \left(A \cdot F\right)\right)\right)\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\\ \mathbf{elif}\;\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \leq 0:\\ \;\;\;\;-\sqrt{\sqrt{F}} \cdot \sqrt{-\frac{\sqrt{F}}{A}}\\ \mathbf{elif}\;\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \leq \infty:\\ \;\;\;\;\frac{-\left(C \cdot \left(\sqrt{2} \cdot \sqrt{\left(A \cdot F\right) \cdot -8}\right) + \frac{\left(B \cdot B\right) \cdot \left(F \cdot \sqrt{2}\right)}{\sqrt{\left(A \cdot F\right) \cdot -8}}\right)}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\\ \mathbf{else}:\\ \;\;\;\;-\left|\frac{\sqrt[3]{F}}{\sqrt[3]{A}}\right| \cdot \sqrt{-\frac{\sqrt[3]{F}}{\sqrt[3]{A}}}\\ \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}
\mathbf{if}\;\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \leq -\infty:\\
\;\;\;\;\sqrt{\frac{-1}{A}} \cdot \left(-\sqrt{F}\right)\\

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

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

\mathbf{elif}\;\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \leq \infty:\\
\;\;\;\;\frac{-\left(C \cdot \left(\sqrt{2} \cdot \sqrt{\left(A \cdot F\right) \cdot -8}\right) + \frac{\left(B \cdot B\right) \cdot \left(F \cdot \sqrt{2}\right)}{\sqrt{\left(A \cdot F\right) \cdot -8}}\right)}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\\

\mathbf{else}:\\
\;\;\;\;-\left|\frac{\sqrt[3]{F}}{\sqrt[3]{A}}\right| \cdot \sqrt{-\frac{\sqrt[3]{F}}{\sqrt[3]{A}}}\\

\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
 (if (<=
      (/
       (-
        (sqrt
         (*
          (* 2.0 (* (- (pow B 2.0) (* (* 4.0 A) C)) F))
          (+ (+ A C) (sqrt (+ (pow B 2.0) (pow (- A C) 2.0)))))))
       (- (pow B 2.0) (* (* 4.0 A) C)))
      (- INFINITY))
   (* (sqrt (/ -1.0 A)) (- (sqrt F)))
   (if (<=
        (/
         (-
          (sqrt
           (*
            (* 2.0 (* (- (pow B 2.0) (* (* 4.0 A) C)) F))
            (+ (+ A C) (sqrt (+ (pow B 2.0) (pow (- A C) 2.0)))))))
         (- (pow B 2.0) (* (* 4.0 A) C)))
        -2.2256569729151864e-162)
     (/
      (-
       (sqrt
        (*
         (+ (+ A C) (sqrt (+ (pow B 2.0) (pow (- A C) 2.0))))
         (* 2.0 (- (* (pow B 2.0) F) (* 4.0 (* C (* A F))))))))
      (- (pow B 2.0) (* (* 4.0 A) C)))
     (if (<=
          (/
           (-
            (sqrt
             (*
              (* 2.0 (* (- (pow B 2.0) (* (* 4.0 A) C)) F))
              (+ (+ A C) (sqrt (+ (pow B 2.0) (pow (- A C) 2.0)))))))
           (- (pow B 2.0) (* (* 4.0 A) C)))
          0.0)
       (- (* (sqrt (sqrt F)) (sqrt (- (/ (sqrt F) A)))))
       (if (<=
            (/
             (-
              (sqrt
               (*
                (* 2.0 (* (- (pow B 2.0) (* (* 4.0 A) C)) F))
                (+ (+ A C) (sqrt (+ (pow B 2.0) (pow (- A C) 2.0)))))))
             (- (pow B 2.0) (* (* 4.0 A) C)))
            INFINITY)
         (/
          (-
           (+
            (* C (* (sqrt 2.0) (sqrt (* (* A F) -8.0))))
            (/ (* (* B B) (* F (sqrt 2.0))) (sqrt (* (* A F) -8.0)))))
          (- (pow B 2.0) (* (* 4.0 A) C)))
         (-
          (*
           (fabs (/ (cbrt F) (cbrt A)))
           (sqrt (- (/ (cbrt F) (cbrt A)))))))))))
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 tmp;
	if ((-sqrt((2.0 * ((pow(B, 2.0) - ((4.0 * A) * C)) * F)) * ((A + C) + sqrt(pow(B, 2.0) + pow((A - C), 2.0)))) / (pow(B, 2.0) - ((4.0 * A) * C))) <= -((double) INFINITY)) {
		tmp = sqrt(-1.0 / A) * -sqrt(F);
	} else if ((-sqrt((2.0 * ((pow(B, 2.0) - ((4.0 * A) * C)) * F)) * ((A + C) + sqrt(pow(B, 2.0) + pow((A - C), 2.0)))) / (pow(B, 2.0) - ((4.0 * A) * C))) <= -2.2256569729151864e-162) {
		tmp = -sqrt(((A + C) + sqrt(pow(B, 2.0) + pow((A - C), 2.0))) * (2.0 * ((pow(B, 2.0) * F) - (4.0 * (C * (A * F)))))) / (pow(B, 2.0) - ((4.0 * A) * C));
	} else if ((-sqrt((2.0 * ((pow(B, 2.0) - ((4.0 * A) * C)) * F)) * ((A + C) + sqrt(pow(B, 2.0) + pow((A - C), 2.0)))) / (pow(B, 2.0) - ((4.0 * A) * C))) <= 0.0) {
		tmp = -(sqrt(sqrt(F)) * sqrt(-(sqrt(F) / A)));
	} else if ((-sqrt((2.0 * ((pow(B, 2.0) - ((4.0 * A) * C)) * F)) * ((A + C) + sqrt(pow(B, 2.0) + pow((A - C), 2.0)))) / (pow(B, 2.0) - ((4.0 * A) * C))) <= ((double) INFINITY)) {
		tmp = -((C * (sqrt(2.0) * sqrt((A * F) * -8.0))) + (((B * B) * (F * sqrt(2.0))) / sqrt((A * F) * -8.0))) / (pow(B, 2.0) - ((4.0 * A) * C));
	} else {
		tmp = -(fabs(cbrt(F) / cbrt(A)) * sqrt(-(cbrt(F) / cbrt(A))));
	}
	return tmp;
}

Error

Bits error versus A

Bits error versus B

Bits error versus C

Bits error versus F

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 5 regimes
  2. if (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 2 (*.f64 (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C)) F)) (+.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))))) (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C))) < -inf.0

    1. Initial program 64.0

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

      \[\leadsto \color{blue}{-1 \cdot \left(\sqrt{-0.5 \cdot \frac{F}{A}} \cdot \sqrt{2}\right)}\]
    3. Simplified34.1

      \[\leadsto \color{blue}{-\sqrt{2} \cdot \sqrt{-0.5 \cdot \frac{F}{A}}}\]
    4. Using strategy rm
    5. Applied sqrt-unprod_binary6434.0

      \[\leadsto -\color{blue}{\sqrt{2 \cdot \left(-0.5 \cdot \frac{F}{A}\right)}}\]
    6. Simplified34.0

      \[\leadsto -\sqrt{\color{blue}{-\frac{F}{A}}}\]
    7. Using strategy rm
    8. Applied div-inv_binary6434.0

      \[\leadsto -\sqrt{-\color{blue}{F \cdot \frac{1}{A}}}\]
    9. Applied distribute-rgt-neg-in_binary6434.0

      \[\leadsto -\sqrt{\color{blue}{F \cdot \left(-\frac{1}{A}\right)}}\]
    10. Applied sqrt-prod_binary6423.2

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

    if -inf.0 < (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 2 (*.f64 (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C)) F)) (+.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))))) (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C))) < -2.2256569729151864e-162

    1. Initial program 1.3

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

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

    if -2.2256569729151864e-162 < (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 2 (*.f64 (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C)) F)) (+.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))))) (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C))) < -0.0

    1. Initial program 56.8

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

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

      \[\leadsto \color{blue}{-\sqrt{2} \cdot \sqrt{-0.5 \cdot \frac{F}{A}}}\]
    4. Using strategy rm
    5. Applied sqrt-unprod_binary6435.3

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

      \[\leadsto -\sqrt{\color{blue}{-\frac{F}{A}}}\]
    7. Using strategy rm
    8. Applied *-un-lft-identity_binary6435.3

      \[\leadsto -\sqrt{-\frac{F}{\color{blue}{1 \cdot A}}}\]
    9. Applied add-sqr-sqrt_binary6435.4

      \[\leadsto -\sqrt{-\frac{\color{blue}{\sqrt{F} \cdot \sqrt{F}}}{1 \cdot A}}\]
    10. Applied times-frac_binary6435.4

      \[\leadsto -\sqrt{-\color{blue}{\frac{\sqrt{F}}{1} \cdot \frac{\sqrt{F}}{A}}}\]
    11. Applied distribute-rgt-neg-in_binary6435.4

      \[\leadsto -\sqrt{\color{blue}{\frac{\sqrt{F}}{1} \cdot \left(-\frac{\sqrt{F}}{A}\right)}}\]
    12. Applied sqrt-prod_binary6431.2

      \[\leadsto -\color{blue}{\sqrt{\frac{\sqrt{F}}{1}} \cdot \sqrt{-\frac{\sqrt{F}}{A}}}\]
    13. Simplified31.2

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

    if -0.0 < (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 2 (*.f64 (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C)) F)) (+.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))))) (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C))) < +inf.0

    1. Initial program 38.5

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

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

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

    if +inf.0 < (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 2 (*.f64 (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C)) F)) (+.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))))) (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C)))

    1. Initial program 64.0

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

      \[\leadsto \color{blue}{-1 \cdot \left(\sqrt{-0.5 \cdot \frac{F}{A}} \cdot \sqrt{2}\right)}\]
    3. Simplified53.3

      \[\leadsto \color{blue}{-\sqrt{2} \cdot \sqrt{-0.5 \cdot \frac{F}{A}}}\]
    4. Using strategy rm
    5. Applied sqrt-unprod_binary6453.2

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

      \[\leadsto -\sqrt{\color{blue}{-\frac{F}{A}}}\]
    7. Using strategy rm
    8. Applied add-cube-cbrt_binary6453.3

      \[\leadsto -\sqrt{-\frac{F}{\color{blue}{\left(\sqrt[3]{A} \cdot \sqrt[3]{A}\right) \cdot \sqrt[3]{A}}}}\]
    9. Applied add-cube-cbrt_binary6453.3

      \[\leadsto -\sqrt{-\frac{\color{blue}{\left(\sqrt[3]{F} \cdot \sqrt[3]{F}\right) \cdot \sqrt[3]{F}}}{\left(\sqrt[3]{A} \cdot \sqrt[3]{A}\right) \cdot \sqrt[3]{A}}}\]
    10. Applied times-frac_binary6453.3

      \[\leadsto -\sqrt{-\color{blue}{\frac{\sqrt[3]{F} \cdot \sqrt[3]{F}}{\sqrt[3]{A} \cdot \sqrt[3]{A}} \cdot \frac{\sqrt[3]{F}}{\sqrt[3]{A}}}}\]
    11. Applied distribute-rgt-neg-in_binary6453.3

      \[\leadsto -\sqrt{\color{blue}{\frac{\sqrt[3]{F} \cdot \sqrt[3]{F}}{\sqrt[3]{A} \cdot \sqrt[3]{A}} \cdot \left(-\frac{\sqrt[3]{F}}{\sqrt[3]{A}}\right)}}\]
    12. Applied sqrt-prod_binary6450.6

      \[\leadsto -\color{blue}{\sqrt{\frac{\sqrt[3]{F} \cdot \sqrt[3]{F}}{\sqrt[3]{A} \cdot \sqrt[3]{A}}} \cdot \sqrt{-\frac{\sqrt[3]{F}}{\sqrt[3]{A}}}}\]
    13. Simplified49.4

      \[\leadsto -\color{blue}{\left|\frac{\sqrt[3]{F}}{\sqrt[3]{A}}\right|} \cdot \sqrt{-\frac{\sqrt[3]{F}}{\sqrt[3]{A}}}\]
  3. Recombined 5 regimes into one program.
  4. Final simplification32.2

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \leq -\infty:\\ \;\;\;\;\sqrt{\frac{-1}{A}} \cdot \left(-\sqrt{F}\right)\\ \mathbf{elif}\;\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \leq -2.2256569729151864 \cdot 10^{-162}:\\ \;\;\;\;\frac{-\sqrt{\left(\left(A + C\right) + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right) \cdot \left(2 \cdot \left({B}^{2} \cdot F - 4 \cdot \left(C \cdot \left(A \cdot F\right)\right)\right)\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\\ \mathbf{elif}\;\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \leq 0:\\ \;\;\;\;-\sqrt{\sqrt{F}} \cdot \sqrt{-\frac{\sqrt{F}}{A}}\\ \mathbf{elif}\;\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \leq \infty:\\ \;\;\;\;\frac{-\left(C \cdot \left(\sqrt{2} \cdot \sqrt{\left(A \cdot F\right) \cdot -8}\right) + \frac{\left(B \cdot B\right) \cdot \left(F \cdot \sqrt{2}\right)}{\sqrt{\left(A \cdot F\right) \cdot -8}}\right)}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\\ \mathbf{else}:\\ \;\;\;\;-\left|\frac{\sqrt[3]{F}}{\sqrt[3]{A}}\right| \cdot \sqrt{-\frac{\sqrt[3]{F}}{\sqrt[3]{A}}}\\ \end{array}\]

Reproduce

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