Average Error: 52.1 → 35.2
Time: 54.9s
Precision: binary64
[A C]: =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:\\ \;\;\;\;-\left(\sqrt[3]{\sqrt{2}} \cdot \sqrt[3]{\sqrt{2}}\right) \cdot \left(\sqrt[3]{\sqrt{2}} \cdot \sqrt{-0.5 \cdot \frac{F}{A}}\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.167652541943331 \cdot 10^{-210}:\\ \;\;\;\;\frac{-\sqrt{\left(A + C\right) \cdot \left(2 \cdot \left(F \cdot \left(B \cdot B - \left(4 \cdot A\right) \cdot C\right)\right)\right) + \left(2 \cdot \left(F \cdot \left(B \cdot B - \left(4 \cdot A\right) \cdot C\right)\right)\right) \cdot \sqrt{{\left(A - C\right)}^{2} + B \cdot B}}}{{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{F \cdot \frac{-1}{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{-C \cdot \left(\sqrt{2} \cdot \sqrt{\left(A \cdot F\right) \cdot -8}\right)}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\\ \mathbf{else}:\\ \;\;\;\;-{\left(-\frac{F}{A}\right)}^{0.5}\\ \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:\\
\;\;\;\;-\left(\sqrt[3]{\sqrt{2}} \cdot \sqrt[3]{\sqrt{2}}\right) \cdot \left(\sqrt[3]{\sqrt{2}} \cdot \sqrt{-0.5 \cdot \frac{F}{A}}\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.167652541943331 \cdot 10^{-210}:\\
\;\;\;\;\frac{-\sqrt{\left(A + C\right) \cdot \left(2 \cdot \left(F \cdot \left(B \cdot B - \left(4 \cdot A\right) \cdot C\right)\right)\right) + \left(2 \cdot \left(F \cdot \left(B \cdot B - \left(4 \cdot A\right) \cdot C\right)\right)\right) \cdot \sqrt{{\left(A - C\right)}^{2} + B \cdot B}}}{{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{F \cdot \frac{-1}{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{-C \cdot \left(\sqrt{2} \cdot \sqrt{\left(A \cdot F\right) \cdot -8}\right)}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\\

\mathbf{else}:\\
\;\;\;\;-{\left(-\frac{F}{A}\right)}^{0.5}\\

\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))
   (-
    (*
     (* (cbrt (sqrt 2.0)) (cbrt (sqrt 2.0)))
     (* (cbrt (sqrt 2.0)) (sqrt (* -0.5 (/ 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)))
        -9.167652541943331e-210)
     (/
      (-
       (sqrt
        (+
         (* (+ A C) (* 2.0 (* F (- (* B B) (* (* 4.0 A) C)))))
         (*
          (* 2.0 (* F (- (* B B) (* (* 4.0 A) C))))
          (sqrt (+ (pow (- A C) 2.0) (* B B)))))))
      (- (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 (* F (/ -1.0 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)))))
          (- (pow B 2.0) (* (* 4.0 A) C)))
         (- (pow (- (/ F A)) 0.5)))))))
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 = -((cbrt(sqrt(2.0)) * cbrt(sqrt(2.0))) * (cbrt(sqrt(2.0)) * sqrt(-0.5 * (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))) <= -9.167652541943331e-210) {
		tmp = -sqrt(((A + C) * (2.0 * (F * ((B * B) - ((4.0 * A) * C))))) + ((2.0 * (F * ((B * B) - ((4.0 * A) * C)))) * sqrt(pow((A - C), 2.0) + (B * B)))) / (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(F * (-1.0 / 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))) / (pow(B, 2.0) - ((4.0 * A) * C));
	} else {
		tmp = -pow(-(F / A), 0.5);
	}
	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.2

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

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

      \[\leadsto -\color{blue}{\left(\left(\sqrt[3]{\sqrt{2}} \cdot \sqrt[3]{\sqrt{2}}\right) \cdot \sqrt[3]{\sqrt{2}}\right)} \cdot \sqrt{-0.5 \cdot \frac{F}{A}}\]
    6. Applied associate-*l*_binary64_342934.2

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

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

    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))) < -9.16765254194333118e-210

    1. Initial program 1.2

      \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\]
    2. Using strategy rm
    3. Applied distribute-rgt-in_binary64_34381.3

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

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

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

    if -9.16765254194333118e-210 < (/.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 61.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. Taylor expanded around inf 31.3

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

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

      \[\leadsto -\color{blue}{\left(\sqrt{\sqrt{2}} \cdot \sqrt{\sqrt{2}}\right)} \cdot \sqrt{-0.5 \cdot \frac{F}{A}}\]
    6. Applied associate-*l*_binary64_342931.3

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

      \[\leadsto -\sqrt{\sqrt{2}} \cdot \color{blue}{\left(\sqrt{-0.5 \cdot \frac{F}{A}} \cdot \sqrt{\sqrt{2}}\right)}\]
    8. Using strategy rm
    9. Applied sqrt-unprod_binary64_350831.2

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

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

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

    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 39.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. Taylor expanded around inf 15.7

      \[\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. Simplified15.7

      \[\leadsto \frac{-\color{blue}{C \cdot \left(\sqrt{2} \cdot \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 52.9

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

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

      \[\leadsto -\sqrt{2} \cdot \color{blue}{{\left(-0.5 \cdot \frac{F}{A}\right)}^{0.5}}\]
    6. Applied pow1/2_binary64_356852.9

      \[\leadsto -\color{blue}{{2}^{0.5}} \cdot {\left(-0.5 \cdot \frac{F}{A}\right)}^{0.5}\]
    7. Applied pow-prod-down_binary64_355952.9

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

      \[\leadsto -{\color{blue}{\left(-\frac{F}{A}\right)}}^{0.5}\]
  3. Recombined 5 regimes into one program.
  4. Final simplification35.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:\\ \;\;\;\;-\left(\sqrt[3]{\sqrt{2}} \cdot \sqrt[3]{\sqrt{2}}\right) \cdot \left(\sqrt[3]{\sqrt{2}} \cdot \sqrt{-0.5 \cdot \frac{F}{A}}\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.167652541943331 \cdot 10^{-210}:\\ \;\;\;\;\frac{-\sqrt{\left(A + C\right) \cdot \left(2 \cdot \left(F \cdot \left(B \cdot B - \left(4 \cdot A\right) \cdot C\right)\right)\right) + \left(2 \cdot \left(F \cdot \left(B \cdot B - \left(4 \cdot A\right) \cdot C\right)\right)\right) \cdot \sqrt{{\left(A - C\right)}^{2} + B \cdot B}}}{{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{F \cdot \frac{-1}{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{-C \cdot \left(\sqrt{2} \cdot \sqrt{\left(A \cdot F\right) \cdot -8}\right)}{{B}^{2} - \left(4 \cdot A\right) \cdot C}\\ \mathbf{else}:\\ \;\;\;\;-{\left(-\frac{F}{A}\right)}^{0.5}\\ \end{array}\]

Reproduce

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