Average Error: 52.5 → 32.7
Time: 20.8s
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 -1.7548547243259833 \cdot 10^{-171}:\\ \;\;\;\;\frac{\sqrt{2 \cdot \left(F \cdot \left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right)\right)}}{\sqrt{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \cdot \frac{-\sqrt{\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + B \cdot B}}}{\sqrt{B \cdot B - 4 \cdot \left(A \cdot C\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 9.65589016949328 \cdot 10^{+97}:\\ \;\;\;\;\frac{-\sqrt{\left(4 \cdot \frac{\left(C \cdot C\right) \cdot \left(F \cdot \left(B \cdot B\right)\right)}{A} + 8 \cdot \left(C \cdot \left(F \cdot \left(B \cdot B\right)\right)\right)\right) - \left(\frac{F \cdot {B}^{4}}{A} + \left(\left(C \cdot C\right) \cdot \left(A \cdot F\right)\right) \cdot 16\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 \infty:\\ \;\;\;\;\frac{-C \cdot \left(\sqrt{\left(A \cdot F\right) \cdot -8} \cdot \sqrt{2}\right)}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{-1}{A}} \cdot \left(-\sqrt{F}\right)\\ \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 -1.7548547243259833 \cdot 10^{-171}:\\
\;\;\;\;\frac{\sqrt{2 \cdot \left(F \cdot \left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right)\right)}}{\sqrt{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \cdot \frac{-\sqrt{\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + B \cdot B}}}{\sqrt{B \cdot B - 4 \cdot \left(A \cdot C\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 9.65589016949328 \cdot 10^{+97}:\\
\;\;\;\;\frac{-\sqrt{\left(4 \cdot \frac{\left(C \cdot C\right) \cdot \left(F \cdot \left(B \cdot B\right)\right)}{A} + 8 \cdot \left(C \cdot \left(F \cdot \left(B \cdot B\right)\right)\right)\right) - \left(\frac{F \cdot {B}^{4}}{A} + \left(\left(C \cdot C\right) \cdot \left(A \cdot F\right)\right) \cdot 16\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 \infty:\\
\;\;\;\;\frac{-C \cdot \left(\sqrt{\left(A \cdot F\right) \cdot -8} \cdot \sqrt{2}\right)}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\\

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

\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)))
        -1.7548547243259833e-171)
     (*
      (/
       (sqrt (* 2.0 (* F (- (* B B) (* 4.0 (* A C))))))
       (sqrt (- (* B B) (* 4.0 (* A C)))))
      (/
       (- (sqrt (+ (+ A C) (sqrt (+ (pow (- A C) 2.0) (* B B))))))
       (sqrt (- (* B B) (* 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)))
          9.65589016949328e+97)
       (/
        (-
         (sqrt
          (-
           (+
            (* 4.0 (/ (* (* C C) (* F (* B B))) A))
            (* 8.0 (* C (* F (* B B)))))
           (+ (/ (* F (pow B 4.0)) A) (* (* (* C C) (* A F)) 16.0)))))
        (- (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)))
            INFINITY)
         (/
          (- (* C (* (sqrt (* (* A F) -8.0)) (sqrt 2.0))))
          (- (pow B 2.0) (* (* 4.0 A) C)))
         (* (sqrt (/ -1.0 A)) (- (sqrt F))))))))
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))) <= -1.7548547243259833e-171) {
		tmp = (sqrt(2.0 * (F * ((B * B) - (4.0 * (A * C))))) / sqrt((B * B) - (4.0 * (A * C)))) * (-sqrt((A + C) + sqrt(pow((A - C), 2.0) + (B * B))) / sqrt((B * B) - (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))) <= 9.65589016949328e+97) {
		tmp = -sqrt(((4.0 * (((C * C) * (F * (B * B))) / A)) + (8.0 * (C * (F * (B * B))))) - (((F * pow(B, 4.0)) / A) + (((C * C) * (A * F)) * 16.0))) / (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))) <= ((double) INFINITY)) {
		tmp = -(C * (sqrt((A * F) * -8.0) * sqrt(2.0))) / (pow(B, 2.0) - ((4.0 * A) * C));
	} else {
		tmp = sqrt(-1.0 / A) * -sqrt(F);
	}
	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 4 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 or +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 46.9

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

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

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

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

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

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

      \[\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))) < -1.7548547243259833e-171

    1. Initial program 1.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. Using strategy rm
    3. Applied add-sqr-sqrt_binary641.5

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

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

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

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

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

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

    if -1.7548547243259833e-171 < (/.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))) < 9.65589016949328031e97

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

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

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

    if 9.65589016949328031e97 < (/.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 51.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. Taylor expanded around inf 15.4

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

    \[\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 -1.7548547243259833 \cdot 10^{-171}:\\ \;\;\;\;\frac{\sqrt{2 \cdot \left(F \cdot \left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right)\right)}}{\sqrt{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \cdot \frac{-\sqrt{\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + B \cdot B}}}{\sqrt{B \cdot B - 4 \cdot \left(A \cdot C\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 9.65589016949328 \cdot 10^{+97}:\\ \;\;\;\;\frac{-\sqrt{\left(4 \cdot \frac{\left(C \cdot C\right) \cdot \left(F \cdot \left(B \cdot B\right)\right)}{A} + 8 \cdot \left(C \cdot \left(F \cdot \left(B \cdot B\right)\right)\right)\right) - \left(\frac{F \cdot {B}^{4}}{A} + \left(\left(C \cdot C\right) \cdot \left(A \cdot F\right)\right) \cdot 16\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 \infty:\\ \;\;\;\;\frac{-C \cdot \left(\sqrt{\left(A \cdot F\right) \cdot -8} \cdot \sqrt{2}\right)}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{-1}{A}} \cdot \left(-\sqrt{F}\right)\\ \end{array}\]

Reproduce

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