Average Error: 19.9 → 8.1
Time: 6.6s
Precision: binary64
\[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \end{array}\]
\[\begin{array}{l} \mathbf{if}\;b \leq -1.0288136512639993 \cdot 10^{+92}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;-0.5 \cdot \left(\frac{\sqrt[3]{2 \cdot \left(b - \frac{c}{b} \cdot a\right)} \cdot \sqrt[3]{2 \cdot \left(b - \frac{c}{b} \cdot a\right)}}{\sqrt[3]{a} \cdot \sqrt[3]{a}} \cdot \frac{\sqrt[3]{2 \cdot \left(b - \frac{c}{b} \cdot a\right)}}{\sqrt[3]{a}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(2 \cdot \left(\frac{a}{\sqrt[3]{b} \cdot \sqrt[3]{b}} \cdot \frac{c}{\sqrt[3]{b}}\right) - b\right) - b}\\ \end{array}\\ \mathbf{elif}\;b \leq -4.0127078141426725 \cdot 10^{-167}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\left(-b\right) - \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{2 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b}\\ \end{array}\\ \mathbf{elif}\;b \leq -9.704665002374583 \cdot 10^{-213}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;-0.5 \cdot \left(\frac{\sqrt[3]{2 \cdot \left(b - \frac{c}{b} \cdot a\right)} \cdot \sqrt[3]{2 \cdot \left(b - \frac{c}{b} \cdot a\right)}}{\sqrt[3]{a} \cdot \sqrt[3]{a}} \cdot \frac{\sqrt[3]{2 \cdot \left(b - \frac{c}{b} \cdot a\right)}}{\sqrt[3]{a}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(2 \cdot \left(\frac{a}{\sqrt[3]{b} \cdot \sqrt[3]{b}} \cdot \frac{c}{\sqrt[3]{b}}\right) - b\right) - b}\\ \end{array}\\ \mathbf{elif}\;b \leq 1.234913879083865 \cdot 10^{+67}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\left(-b\right) - \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{2 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b}\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;-0.5 \cdot \left(2 \cdot \left(\frac{b}{a} - \frac{c}{b}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(2 \cdot \left(\frac{a}{\sqrt[3]{b} \cdot \sqrt[3]{b}} \cdot \frac{c}{\sqrt[3]{b}}\right) - b\right) - b}\\ \end{array}\]
\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\

\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\

\end{array}
\begin{array}{l}
\mathbf{if}\;b \leq -1.0288136512639993 \cdot 10^{+92}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;-0.5 \cdot \left(\frac{\sqrt[3]{2 \cdot \left(b - \frac{c}{b} \cdot a\right)} \cdot \sqrt[3]{2 \cdot \left(b - \frac{c}{b} \cdot a\right)}}{\sqrt[3]{a} \cdot \sqrt[3]{a}} \cdot \frac{\sqrt[3]{2 \cdot \left(b - \frac{c}{b} \cdot a\right)}}{\sqrt[3]{a}}\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\left(2 \cdot \left(\frac{a}{\sqrt[3]{b} \cdot \sqrt[3]{b}} \cdot \frac{c}{\sqrt[3]{b}}\right) - b\right) - b}\\

\end{array}\\

\mathbf{elif}\;b \leq -4.0127078141426725 \cdot 10^{-167}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{2 \cdot a}\\

\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b}\\

\end{array}\\

\mathbf{elif}\;b \leq -9.704665002374583 \cdot 10^{-213}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;-0.5 \cdot \left(\frac{\sqrt[3]{2 \cdot \left(b - \frac{c}{b} \cdot a\right)} \cdot \sqrt[3]{2 \cdot \left(b - \frac{c}{b} \cdot a\right)}}{\sqrt[3]{a} \cdot \sqrt[3]{a}} \cdot \frac{\sqrt[3]{2 \cdot \left(b - \frac{c}{b} \cdot a\right)}}{\sqrt[3]{a}}\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\left(2 \cdot \left(\frac{a}{\sqrt[3]{b} \cdot \sqrt[3]{b}} \cdot \frac{c}{\sqrt[3]{b}}\right) - b\right) - b}\\

\end{array}\\

\mathbf{elif}\;b \leq 1.234913879083865 \cdot 10^{+67}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{2 \cdot a}\\

\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b}\\

\end{array}\\

\mathbf{elif}\;b \geq 0:\\
\;\;\;\;-0.5 \cdot \left(2 \cdot \left(\frac{b}{a} - \frac{c}{b}\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\left(2 \cdot \left(\frac{a}{\sqrt[3]{b} \cdot \sqrt[3]{b}} \cdot \frac{c}{\sqrt[3]{b}}\right) - b\right) - b}\\

\end{array}
(FPCore (a b c)
 :precision binary64
 (if (>= b 0.0)
   (/ (- (- b) (sqrt (- (* b b) (* (* 4.0 a) c)))) (* 2.0 a))
   (/ (* 2.0 c) (+ (- b) (sqrt (- (* b b) (* (* 4.0 a) c)))))))
(FPCore (a b c)
 :precision binary64
 (if (<= b -1.0288136512639993e+92)
   (if (>= b 0.0)
     (*
      -0.5
      (*
       (/
        (*
         (cbrt (* 2.0 (- b (* (/ c b) a))))
         (cbrt (* 2.0 (- b (* (/ c b) a)))))
        (* (cbrt a) (cbrt a)))
       (/ (cbrt (* 2.0 (- b (* (/ c b) a)))) (cbrt a))))
     (/
      (* 2.0 c)
      (- (- (* 2.0 (* (/ a (* (cbrt b) (cbrt b))) (/ c (cbrt b)))) b) b)))
   (if (<= b -4.0127078141426725e-167)
     (if (>= b 0.0)
       (/ (- (- b) (sqrt (- (* b b) (* c (* a 4.0))))) (* 2.0 a))
       (/ (* 2.0 c) (- (sqrt (- (* b b) (* c (* a 4.0)))) b)))
     (if (<= b -9.704665002374583e-213)
       (if (>= b 0.0)
         (*
          -0.5
          (*
           (/
            (*
             (cbrt (* 2.0 (- b (* (/ c b) a))))
             (cbrt (* 2.0 (- b (* (/ c b) a)))))
            (* (cbrt a) (cbrt a)))
           (/ (cbrt (* 2.0 (- b (* (/ c b) a)))) (cbrt a))))
         (/
          (* 2.0 c)
          (- (- (* 2.0 (* (/ a (* (cbrt b) (cbrt b))) (/ c (cbrt b)))) b) b)))
       (if (<= b 1.234913879083865e+67)
         (if (>= b 0.0)
           (/ (- (- b) (sqrt (- (* b b) (* c (* a 4.0))))) (* 2.0 a))
           (/ (* 2.0 c) (- (sqrt (- (* b b) (* c (* a 4.0)))) b)))
         (if (>= b 0.0)
           (* -0.5 (* 2.0 (- (/ b a) (/ c b))))
           (/
            (* 2.0 c)
            (-
             (- (* 2.0 (* (/ a (* (cbrt b) (cbrt b))) (/ c (cbrt b)))) b)
             b))))))))
double code(double a, double b, double c) {
	double tmp;
	if (b >= 0.0) {
		tmp = (-b - sqrt((b * b) - ((4.0 * a) * c))) / (2.0 * a);
	} else {
		tmp = (2.0 * c) / (-b + sqrt((b * b) - ((4.0 * a) * c)));
	}
	return tmp;
}
double code(double a, double b, double c) {
	double tmp;
	if (b <= -1.0288136512639993e+92) {
		double tmp_1;
		if (b >= 0.0) {
			tmp_1 = -0.5 * (((cbrt(2.0 * (b - ((c / b) * a))) * cbrt(2.0 * (b - ((c / b) * a)))) / (cbrt(a) * cbrt(a))) * (cbrt(2.0 * (b - ((c / b) * a))) / cbrt(a)));
		} else {
			tmp_1 = (2.0 * c) / (((2.0 * ((a / (cbrt(b) * cbrt(b))) * (c / cbrt(b)))) - b) - b);
		}
		tmp = tmp_1;
	} else if (b <= -4.0127078141426725e-167) {
		double tmp_2;
		if (b >= 0.0) {
			tmp_2 = (-b - sqrt((b * b) - (c * (a * 4.0)))) / (2.0 * a);
		} else {
			tmp_2 = (2.0 * c) / (sqrt((b * b) - (c * (a * 4.0))) - b);
		}
		tmp = tmp_2;
	} else if (b <= -9.704665002374583e-213) {
		double tmp_3;
		if (b >= 0.0) {
			tmp_3 = -0.5 * (((cbrt(2.0 * (b - ((c / b) * a))) * cbrt(2.0 * (b - ((c / b) * a)))) / (cbrt(a) * cbrt(a))) * (cbrt(2.0 * (b - ((c / b) * a))) / cbrt(a)));
		} else {
			tmp_3 = (2.0 * c) / (((2.0 * ((a / (cbrt(b) * cbrt(b))) * (c / cbrt(b)))) - b) - b);
		}
		tmp = tmp_3;
	} else if (b <= 1.234913879083865e+67) {
		double tmp_4;
		if (b >= 0.0) {
			tmp_4 = (-b - sqrt((b * b) - (c * (a * 4.0)))) / (2.0 * a);
		} else {
			tmp_4 = (2.0 * c) / (sqrt((b * b) - (c * (a * 4.0))) - b);
		}
		tmp = tmp_4;
	} else if (b >= 0.0) {
		tmp = -0.5 * (2.0 * ((b / a) - (c / b)));
	} else {
		tmp = (2.0 * c) / (((2.0 * ((a / (cbrt(b) * cbrt(b))) * (c / cbrt(b)))) - b) - b);
	}
	return tmp;
}

Error

Bits error versus a

Bits error versus b

Bits error versus c

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 3 regimes
  2. if b < -1.0288136512639993e92 or -4.0127078141426725e-167 < b < -9.7046650023745833e-213

    1. Initial program 27.8

      \[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \end{array}\]
    2. Simplified27.8

      \[\leadsto \color{blue}{\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;-0.5 \cdot \frac{b + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} - b}\\ \end{array}}\]
    3. Taylor expanded around -inf 11.9

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;-0.5 \cdot \frac{b + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{\color{blue}{c \cdot 2}}{\left(2 \cdot \frac{a \cdot c}{b} - b\right) - b}\\ \end{array}\]
    4. Using strategy rm
    5. Applied add-cube-cbrt_binary64_11311.9

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;-0.5 \cdot \frac{b + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{\left(2 \cdot \frac{a \cdot c}{\left(\sqrt[3]{b} \cdot \sqrt[3]{b}\right) \cdot \sqrt[3]{b}} - b\right) - b}\\ \end{array}\]
    6. Applied times-frac_binary64_848.4

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;-0.5 \cdot \frac{b + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{\left(2 \cdot \left(\frac{a}{\sqrt[3]{b} \cdot \sqrt[3]{b}} \cdot \frac{c}{\sqrt[3]{b}}\right) - b\right) - b}\\ \end{array}\]
    7. Taylor expanded around inf 8.4

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;-0.5 \cdot \frac{b + \color{blue}{\left(b - 2 \cdot \frac{a \cdot c}{b}\right)}}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{\left(2 \cdot \left(\frac{a}{\sqrt[3]{b} \cdot \sqrt[3]{b}} \cdot \frac{c}{\sqrt[3]{b}}\right) - b\right) - b}\\ \end{array}\]
    8. Simplified8.4

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;-0.5 \cdot \frac{b + \color{blue}{\left(b - 2 \cdot \left(\frac{c}{b} \cdot a\right)\right)}}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{\left(2 \cdot \left(\frac{a}{\sqrt[3]{b} \cdot \sqrt[3]{b}} \cdot \frac{c}{\sqrt[3]{b}}\right) - b\right) - b}\\ \end{array}\]
    9. Using strategy rm
    10. Applied add-cube-cbrt_binary64_1138.4

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;-0.5 \cdot \frac{b + \left(b - 2 \cdot \left(\frac{c}{b} \cdot a\right)\right)}{\color{blue}{\left(\sqrt[3]{a} \cdot \sqrt[3]{a}\right) \cdot \sqrt[3]{a}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{\left(2 \cdot \left(\frac{a}{\sqrt[3]{b} \cdot \sqrt[3]{b}} \cdot \frac{c}{\sqrt[3]{b}}\right) - b\right) - b}\\ \end{array}\]
    11. Applied add-cube-cbrt_binary64_1138.4

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;-0.5 \cdot \frac{\color{blue}{\left(\sqrt[3]{b + \left(b - 2 \cdot \left(\frac{c}{b} \cdot a\right)\right)} \cdot \sqrt[3]{b + \left(b - 2 \cdot \left(\frac{c}{b} \cdot a\right)\right)}\right) \cdot \sqrt[3]{b + \left(b - 2 \cdot \left(\frac{c}{b} \cdot a\right)\right)}}}{\left(\sqrt[3]{a} \cdot \sqrt[3]{a}\right) \cdot \sqrt[3]{a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{\left(2 \cdot \left(\frac{a}{\sqrt[3]{b} \cdot \sqrt[3]{b}} \cdot \frac{c}{\sqrt[3]{b}}\right) - b\right) - b}\\ \end{array}\]
    12. Applied times-frac_binary64_848.4

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;-0.5 \cdot \color{blue}{\left(\frac{\sqrt[3]{b + \left(b - 2 \cdot \left(\frac{c}{b} \cdot a\right)\right)} \cdot \sqrt[3]{b + \left(b - 2 \cdot \left(\frac{c}{b} \cdot a\right)\right)}}{\sqrt[3]{a} \cdot \sqrt[3]{a}} \cdot \frac{\sqrt[3]{b + \left(b - 2 \cdot \left(\frac{c}{b} \cdot a\right)\right)}}{\sqrt[3]{a}}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{\left(2 \cdot \left(\frac{a}{\sqrt[3]{b} \cdot \sqrt[3]{b}} \cdot \frac{c}{\sqrt[3]{b}}\right) - b\right) - b}\\ \end{array}\]
    13. Simplified8.4

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;-0.5 \cdot \left(\color{blue}{\frac{\sqrt[3]{2 \cdot \left(b - \frac{c}{b} \cdot a\right)} \cdot \sqrt[3]{2 \cdot \left(b - \frac{c}{b} \cdot a\right)}}{\sqrt[3]{a} \cdot \sqrt[3]{a}}} \cdot \frac{\sqrt[3]{b + \left(b - 2 \cdot \left(\frac{c}{b} \cdot a\right)\right)}}{\sqrt[3]{a}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{\left(2 \cdot \left(\frac{a}{\sqrt[3]{b} \cdot \sqrt[3]{b}} \cdot \frac{c}{\sqrt[3]{b}}\right) - b\right) - b}\\ \end{array}\]
    14. Simplified8.4

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;-0.5 \cdot \left(\frac{\sqrt[3]{2 \cdot \left(b - \frac{c}{b} \cdot a\right)} \cdot \sqrt[3]{2 \cdot \left(b - \frac{c}{b} \cdot a\right)}}{\sqrt[3]{a} \cdot \sqrt[3]{a}} \cdot \color{blue}{\frac{\sqrt[3]{2 \cdot \left(b - \frac{c}{b} \cdot a\right)}}{\sqrt[3]{a}}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{\left(2 \cdot \left(\frac{a}{\sqrt[3]{b} \cdot \sqrt[3]{b}} \cdot \frac{c}{\sqrt[3]{b}}\right) - b\right) - b}\\ \end{array}\]

    if -1.0288136512639993e92 < b < -4.0127078141426725e-167 or -9.7046650023745833e-213 < b < 1.234913879083865e67

    1. Initial program 8.9

      \[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \end{array}\]

    if 1.234913879083865e67 < b

    1. Initial program 40.7

      \[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \end{array}\]
    2. Simplified40.7

      \[\leadsto \color{blue}{\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;-0.5 \cdot \frac{b + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} - b}\\ \end{array}}\]
    3. Taylor expanded around -inf 40.7

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;-0.5 \cdot \frac{b + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{\color{blue}{c \cdot 2}}{\left(2 \cdot \frac{a \cdot c}{b} - b\right) - b}\\ \end{array}\]
    4. Using strategy rm
    5. Applied add-cube-cbrt_binary64_11340.7

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;-0.5 \cdot \frac{b + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{\left(2 \cdot \frac{a \cdot c}{\left(\sqrt[3]{b} \cdot \sqrt[3]{b}\right) \cdot \sqrt[3]{b}} - b\right) - b}\\ \end{array}\]
    6. Applied times-frac_binary64_8440.7

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;-0.5 \cdot \frac{b + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{\left(2 \cdot \left(\frac{a}{\sqrt[3]{b} \cdot \sqrt[3]{b}} \cdot \frac{c}{\sqrt[3]{b}}\right) - b\right) - b}\\ \end{array}\]
    7. Taylor expanded around inf 9.9

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;-0.5 \cdot \frac{b + \color{blue}{\left(b - 2 \cdot \frac{a \cdot c}{b}\right)}}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{\left(2 \cdot \left(\frac{a}{\sqrt[3]{b} \cdot \sqrt[3]{b}} \cdot \frac{c}{\sqrt[3]{b}}\right) - b\right) - b}\\ \end{array}\]
    8. Simplified5.1

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;-0.5 \cdot \frac{b + \color{blue}{\left(b - 2 \cdot \left(\frac{c}{b} \cdot a\right)\right)}}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{\left(2 \cdot \left(\frac{a}{\sqrt[3]{b} \cdot \sqrt[3]{b}} \cdot \frac{c}{\sqrt[3]{b}}\right) - b\right) - b}\\ \end{array}\]
    9. Using strategy rm
    10. Applied *-un-lft-identity_binary64_785.1

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;-0.5 \cdot \frac{b + \left(b - 2 \cdot \left(\frac{c}{b} \cdot a\right)\right)}{\color{blue}{1 \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{\left(2 \cdot \left(\frac{a}{\sqrt[3]{b} \cdot \sqrt[3]{b}} \cdot \frac{c}{\sqrt[3]{b}}\right) - b\right) - b}\\ \end{array}\]
    11. Applied *-un-lft-identity_binary64_785.1

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;-0.5 \cdot \frac{\color{blue}{1 \cdot \left(b + \left(b - 2 \cdot \left(\frac{c}{b} \cdot a\right)\right)\right)}}{1 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{\left(2 \cdot \left(\frac{a}{\sqrt[3]{b} \cdot \sqrt[3]{b}} \cdot \frac{c}{\sqrt[3]{b}}\right) - b\right) - b}\\ \end{array}\]
    12. Applied times-frac_binary64_845.1

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;-0.5 \cdot \color{blue}{\left(\frac{1}{1} \cdot \frac{b + \left(b - 2 \cdot \left(\frac{c}{b} \cdot a\right)\right)}{a}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{\left(2 \cdot \left(\frac{a}{\sqrt[3]{b} \cdot \sqrt[3]{b}} \cdot \frac{c}{\sqrt[3]{b}}\right) - b\right) - b}\\ \end{array}\]
    13. Simplified5.1

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;-0.5 \cdot \left(\color{blue}{1} \cdot \frac{b + \left(b - 2 \cdot \left(\frac{c}{b} \cdot a\right)\right)}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{\left(2 \cdot \left(\frac{a}{\sqrt[3]{b} \cdot \sqrt[3]{b}} \cdot \frac{c}{\sqrt[3]{b}}\right) - b\right) - b}\\ \end{array}\]
    14. Simplified5.0

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;-0.5 \cdot \left(1 \cdot \color{blue}{\left(2 \cdot \left(\frac{b}{a} - \frac{c}{b}\right)\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{\left(2 \cdot \left(\frac{a}{\sqrt[3]{b} \cdot \sqrt[3]{b}} \cdot \frac{c}{\sqrt[3]{b}}\right) - b\right) - b}\\ \end{array}\]
  3. Recombined 3 regimes into one program.
  4. Final simplification8.1

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.0288136512639993 \cdot 10^{+92}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;-0.5 \cdot \left(\frac{\sqrt[3]{2 \cdot \left(b - \frac{c}{b} \cdot a\right)} \cdot \sqrt[3]{2 \cdot \left(b - \frac{c}{b} \cdot a\right)}}{\sqrt[3]{a} \cdot \sqrt[3]{a}} \cdot \frac{\sqrt[3]{2 \cdot \left(b - \frac{c}{b} \cdot a\right)}}{\sqrt[3]{a}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(2 \cdot \left(\frac{a}{\sqrt[3]{b} \cdot \sqrt[3]{b}} \cdot \frac{c}{\sqrt[3]{b}}\right) - b\right) - b}\\ \end{array}\\ \mathbf{elif}\;b \leq -4.0127078141426725 \cdot 10^{-167}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\left(-b\right) - \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{2 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b}\\ \end{array}\\ \mathbf{elif}\;b \leq -9.704665002374583 \cdot 10^{-213}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;-0.5 \cdot \left(\frac{\sqrt[3]{2 \cdot \left(b - \frac{c}{b} \cdot a\right)} \cdot \sqrt[3]{2 \cdot \left(b - \frac{c}{b} \cdot a\right)}}{\sqrt[3]{a} \cdot \sqrt[3]{a}} \cdot \frac{\sqrt[3]{2 \cdot \left(b - \frac{c}{b} \cdot a\right)}}{\sqrt[3]{a}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(2 \cdot \left(\frac{a}{\sqrt[3]{b} \cdot \sqrt[3]{b}} \cdot \frac{c}{\sqrt[3]{b}}\right) - b\right) - b}\\ \end{array}\\ \mathbf{elif}\;b \leq 1.234913879083865 \cdot 10^{+67}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\left(-b\right) - \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{2 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b}\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;-0.5 \cdot \left(2 \cdot \left(\frac{b}{a} - \frac{c}{b}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(2 \cdot \left(\frac{a}{\sqrt[3]{b} \cdot \sqrt[3]{b}} \cdot \frac{c}{\sqrt[3]{b}}\right) - b\right) - b}\\ \end{array}\]

Reproduce

herbie shell --seed 2020346 
(FPCore (a b c)
  :name "jeff quadratic root 1"
  :precision binary64
  (if (>= b 0.0) (/ (- (- b) (sqrt (- (* b b) (* (* 4.0 a) c)))) (* 2.0 a)) (/ (* 2.0 c) (+ (- b) (sqrt (- (* b b) (* (* 4.0 a) c)))))))