Cubic critical

Percentage Accurate: 53.2% → 85.6%
Time: 13.0s
Alternatives: 12
Speedup: 16.4×

Specification

?
\[\begin{array}{l} \\ \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (/ (+ (- b) (sqrt (- (* b b) (* (* 3.0 a) c)))) (* 3.0 a)))
double code(double a, double b, double c) {
	return (-b + sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a);
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    code = (-b + sqrt(((b * b) - ((3.0d0 * a) * c)))) / (3.0d0 * a)
end function
public static double code(double a, double b, double c) {
	return (-b + Math.sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a);
}
def code(a, b, c):
	return (-b + math.sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a)
function code(a, b, c)
	return Float64(Float64(Float64(-b) + sqrt(Float64(Float64(b * b) - Float64(Float64(3.0 * a) * c)))) / Float64(3.0 * a))
end
function tmp = code(a, b, c)
	tmp = (-b + sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a);
end
code[a_, b_, c_] := N[(N[((-b) + N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(N[(3.0 * a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 12 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 53.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (/ (+ (- b) (sqrt (- (* b b) (* (* 3.0 a) c)))) (* 3.0 a)))
double code(double a, double b, double c) {
	return (-b + sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a);
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    code = (-b + sqrt(((b * b) - ((3.0d0 * a) * c)))) / (3.0d0 * a)
end function
public static double code(double a, double b, double c) {
	return (-b + Math.sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a);
}
def code(a, b, c):
	return (-b + math.sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a)
function code(a, b, c)
	return Float64(Float64(Float64(-b) + sqrt(Float64(Float64(b * b) - Float64(Float64(3.0 * a) * c)))) / Float64(3.0 * a))
end
function tmp = code(a, b, c)
	tmp = (-b + sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a);
end
code[a_, b_, c_] := N[(N[((-b) + N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(N[(3.0 * a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}
\end{array}

Alternative 1: 85.6% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -2 \cdot 10^{+146}:\\ \;\;\;\;\frac{-1}{\frac{a}{b} \cdot 1.5}\\ \mathbf{elif}\;b \leq -7.8 \cdot 10^{-155}:\\ \;\;\;\;\frac{\sqrt{b \cdot b + a \cdot \left(c \cdot -3\right)} - b}{a \cdot 3}\\ \mathbf{elif}\;b \leq 2.6 \cdot 10^{-130}:\\ \;\;\;\;\frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{c \cdot \left(a \cdot -3\right)}\right)}}\\ \mathbf{elif}\;b \leq 6 \cdot 10^{-92}:\\ \;\;\;\;\left(b + \mathsf{hypot}\left(b, \sqrt{c \cdot -3} \cdot \sqrt{a}\right)\right) \cdot \frac{0.3333333333333333}{a}\\ \mathbf{elif}\;b \leq 2.2 \cdot 10^{-17} \lor \neg \left(b \leq 2.2\right):\\ \;\;\;\;-0.5 \cdot \frac{c}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{-3 \cdot \left(a \cdot c\right)} - b}{a \cdot 3}\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b -2e+146)
   (/ -1.0 (* (/ a b) 1.5))
   (if (<= b -7.8e-155)
     (/ (- (sqrt (+ (* b b) (* a (* c -3.0)))) b) (* a 3.0))
     (if (<= b 2.6e-130)
       (/ -1.0 (/ (* a 3.0) (- b (hypot b (sqrt (* c (* a -3.0)))))))
       (if (<= b 6e-92)
         (*
          (+ b (hypot b (* (sqrt (* c -3.0)) (sqrt a))))
          (/ 0.3333333333333333 a))
         (if (or (<= b 2.2e-17) (not (<= b 2.2)))
           (* -0.5 (/ c b))
           (/ (- (sqrt (* -3.0 (* a c))) b) (* a 3.0))))))))
double code(double a, double b, double c) {
	double tmp;
	if (b <= -2e+146) {
		tmp = -1.0 / ((a / b) * 1.5);
	} else if (b <= -7.8e-155) {
		tmp = (sqrt(((b * b) + (a * (c * -3.0)))) - b) / (a * 3.0);
	} else if (b <= 2.6e-130) {
		tmp = -1.0 / ((a * 3.0) / (b - hypot(b, sqrt((c * (a * -3.0))))));
	} else if (b <= 6e-92) {
		tmp = (b + hypot(b, (sqrt((c * -3.0)) * sqrt(a)))) * (0.3333333333333333 / a);
	} else if ((b <= 2.2e-17) || !(b <= 2.2)) {
		tmp = -0.5 * (c / b);
	} else {
		tmp = (sqrt((-3.0 * (a * c))) - b) / (a * 3.0);
	}
	return tmp;
}
public static double code(double a, double b, double c) {
	double tmp;
	if (b <= -2e+146) {
		tmp = -1.0 / ((a / b) * 1.5);
	} else if (b <= -7.8e-155) {
		tmp = (Math.sqrt(((b * b) + (a * (c * -3.0)))) - b) / (a * 3.0);
	} else if (b <= 2.6e-130) {
		tmp = -1.0 / ((a * 3.0) / (b - Math.hypot(b, Math.sqrt((c * (a * -3.0))))));
	} else if (b <= 6e-92) {
		tmp = (b + Math.hypot(b, (Math.sqrt((c * -3.0)) * Math.sqrt(a)))) * (0.3333333333333333 / a);
	} else if ((b <= 2.2e-17) || !(b <= 2.2)) {
		tmp = -0.5 * (c / b);
	} else {
		tmp = (Math.sqrt((-3.0 * (a * c))) - b) / (a * 3.0);
	}
	return tmp;
}
def code(a, b, c):
	tmp = 0
	if b <= -2e+146:
		tmp = -1.0 / ((a / b) * 1.5)
	elif b <= -7.8e-155:
		tmp = (math.sqrt(((b * b) + (a * (c * -3.0)))) - b) / (a * 3.0)
	elif b <= 2.6e-130:
		tmp = -1.0 / ((a * 3.0) / (b - math.hypot(b, math.sqrt((c * (a * -3.0))))))
	elif b <= 6e-92:
		tmp = (b + math.hypot(b, (math.sqrt((c * -3.0)) * math.sqrt(a)))) * (0.3333333333333333 / a)
	elif (b <= 2.2e-17) or not (b <= 2.2):
		tmp = -0.5 * (c / b)
	else:
		tmp = (math.sqrt((-3.0 * (a * c))) - b) / (a * 3.0)
	return tmp
function code(a, b, c)
	tmp = 0.0
	if (b <= -2e+146)
		tmp = Float64(-1.0 / Float64(Float64(a / b) * 1.5));
	elseif (b <= -7.8e-155)
		tmp = Float64(Float64(sqrt(Float64(Float64(b * b) + Float64(a * Float64(c * -3.0)))) - b) / Float64(a * 3.0));
	elseif (b <= 2.6e-130)
		tmp = Float64(-1.0 / Float64(Float64(a * 3.0) / Float64(b - hypot(b, sqrt(Float64(c * Float64(a * -3.0)))))));
	elseif (b <= 6e-92)
		tmp = Float64(Float64(b + hypot(b, Float64(sqrt(Float64(c * -3.0)) * sqrt(a)))) * Float64(0.3333333333333333 / a));
	elseif ((b <= 2.2e-17) || !(b <= 2.2))
		tmp = Float64(-0.5 * Float64(c / b));
	else
		tmp = Float64(Float64(sqrt(Float64(-3.0 * Float64(a * c))) - b) / Float64(a * 3.0));
	end
	return tmp
end
function tmp_2 = code(a, b, c)
	tmp = 0.0;
	if (b <= -2e+146)
		tmp = -1.0 / ((a / b) * 1.5);
	elseif (b <= -7.8e-155)
		tmp = (sqrt(((b * b) + (a * (c * -3.0)))) - b) / (a * 3.0);
	elseif (b <= 2.6e-130)
		tmp = -1.0 / ((a * 3.0) / (b - hypot(b, sqrt((c * (a * -3.0))))));
	elseif (b <= 6e-92)
		tmp = (b + hypot(b, (sqrt((c * -3.0)) * sqrt(a)))) * (0.3333333333333333 / a);
	elseif ((b <= 2.2e-17) || ~((b <= 2.2)))
		tmp = -0.5 * (c / b);
	else
		tmp = (sqrt((-3.0 * (a * c))) - b) / (a * 3.0);
	end
	tmp_2 = tmp;
end
code[a_, b_, c_] := If[LessEqual[b, -2e+146], N[(-1.0 / N[(N[(a / b), $MachinePrecision] * 1.5), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -7.8e-155], N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] + N[(a * N[(c * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.6e-130], N[(-1.0 / N[(N[(a * 3.0), $MachinePrecision] / N[(b - N[Sqrt[b ^ 2 + N[Sqrt[N[(c * N[(a * -3.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 6e-92], N[(N[(b + N[Sqrt[b ^ 2 + N[(N[Sqrt[N[(c * -3.0), $MachinePrecision]], $MachinePrecision] * N[Sqrt[a], $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] * N[(0.3333333333333333 / a), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[b, 2.2e-17], N[Not[LessEqual[b, 2.2]], $MachinePrecision]], N[(-0.5 * N[(c / b), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[N[(-3.0 * N[(a * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 3.0), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -2 \cdot 10^{+146}:\\
\;\;\;\;\frac{-1}{\frac{a}{b} \cdot 1.5}\\

\mathbf{elif}\;b \leq -7.8 \cdot 10^{-155}:\\
\;\;\;\;\frac{\sqrt{b \cdot b + a \cdot \left(c \cdot -3\right)} - b}{a \cdot 3}\\

\mathbf{elif}\;b \leq 2.6 \cdot 10^{-130}:\\
\;\;\;\;\frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{c \cdot \left(a \cdot -3\right)}\right)}}\\

\mathbf{elif}\;b \leq 6 \cdot 10^{-92}:\\
\;\;\;\;\left(b + \mathsf{hypot}\left(b, \sqrt{c \cdot -3} \cdot \sqrt{a}\right)\right) \cdot \frac{0.3333333333333333}{a}\\

\mathbf{elif}\;b \leq 2.2 \cdot 10^{-17} \lor \neg \left(b \leq 2.2\right):\\
\;\;\;\;-0.5 \cdot \frac{c}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if b < -1.99999999999999987e146

    1. Initial program 57.7%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. /-rgt-identity57.7%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{\color{blue}{\frac{3 \cdot a}{1}}} \]
      2. metadata-eval57.7%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{\frac{3 \cdot a}{\color{blue}{--1}}} \]
      3. associate-/l*57.7%

        \[\leadsto \color{blue}{\frac{\left(\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right) \cdot \left(--1\right)}{3 \cdot a}} \]
      4. associate-*r/57.6%

        \[\leadsto \color{blue}{\left(\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right) \cdot \frac{--1}{3 \cdot a}} \]
      5. *-commutative57.6%

        \[\leadsto \color{blue}{\frac{--1}{3 \cdot a} \cdot \left(\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)} \]
      6. associate-*l/57.7%

        \[\leadsto \color{blue}{\frac{\left(--1\right) \cdot \left(\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}{3 \cdot a}} \]
      7. associate-*r/57.7%

        \[\leadsto \color{blue}{\left(--1\right) \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}} \]
      8. metadata-eval57.7%

        \[\leadsto \color{blue}{1} \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      9. metadata-eval57.7%

        \[\leadsto \color{blue}{\frac{-1}{-1}} \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      10. times-frac57.7%

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}{-1 \cdot \left(3 \cdot a\right)}} \]
      11. neg-mul-157.7%

        \[\leadsto \frac{-1 \cdot \left(\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}{\color{blue}{-3 \cdot a}} \]
      12. distribute-rgt-neg-in57.7%

        \[\leadsto \frac{-1 \cdot \left(\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}{\color{blue}{3 \cdot \left(-a\right)}} \]
      13. times-frac57.7%

        \[\leadsto \color{blue}{\frac{-1}{3} \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{-a}} \]
      14. metadata-eval57.7%

        \[\leadsto \color{blue}{-0.3333333333333333} \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{-a} \]
      15. neg-mul-157.7%

        \[\leadsto -0.3333333333333333 \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{\color{blue}{-1 \cdot a}} \]
    3. Simplified57.7%

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{b - \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)}}{a}} \]
    4. Step-by-step derivation
      1. associate-*r/57.6%

        \[\leadsto \color{blue}{\frac{-0.3333333333333333 \cdot \left(b - \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)}\right)}{a}} \]
      2. associate-*r*57.6%

        \[\leadsto \frac{-0.3333333333333333 \cdot \left(b - \sqrt{\mathsf{fma}\left(b, b, \color{blue}{\left(a \cdot c\right) \cdot -3}\right)}\right)}{a} \]
      3. clear-num57.6%

        \[\leadsto \color{blue}{\frac{1}{\frac{a}{-0.3333333333333333 \cdot \left(b - \sqrt{\mathsf{fma}\left(b, b, \left(a \cdot c\right) \cdot -3\right)}\right)}}} \]
      4. frac-2neg57.6%

        \[\leadsto \color{blue}{\frac{-1}{-\frac{a}{-0.3333333333333333 \cdot \left(b - \sqrt{\mathsf{fma}\left(b, b, \left(a \cdot c\right) \cdot -3\right)}\right)}}} \]
      5. metadata-eval57.6%

        \[\leadsto \frac{\color{blue}{-1}}{-\frac{a}{-0.3333333333333333 \cdot \left(b - \sqrt{\mathsf{fma}\left(b, b, \left(a \cdot c\right) \cdot -3\right)}\right)}} \]
      6. *-un-lft-identity57.6%

        \[\leadsto \frac{-1}{-\frac{\color{blue}{1 \cdot a}}{-0.3333333333333333 \cdot \left(b - \sqrt{\mathsf{fma}\left(b, b, \left(a \cdot c\right) \cdot -3\right)}\right)}} \]
      7. associate-*r*57.6%

        \[\leadsto \frac{-1}{-\frac{1 \cdot a}{-0.3333333333333333 \cdot \left(b - \sqrt{\mathsf{fma}\left(b, b, \color{blue}{a \cdot \left(c \cdot -3\right)}\right)}\right)}} \]
      8. times-frac57.7%

        \[\leadsto \frac{-1}{-\color{blue}{\frac{1}{-0.3333333333333333} \cdot \frac{a}{b - \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)}}}} \]
      9. metadata-eval57.7%

        \[\leadsto \frac{-1}{-\color{blue}{-3} \cdot \frac{a}{b - \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)}}} \]
      10. fma-udef57.7%

        \[\leadsto \frac{-1}{--3 \cdot \frac{a}{b - \sqrt{\color{blue}{b \cdot b + a \cdot \left(c \cdot -3\right)}}}} \]
      11. add-sqr-sqrt38.2%

        \[\leadsto \frac{-1}{--3 \cdot \frac{a}{b - \sqrt{b \cdot b + \color{blue}{\sqrt{a \cdot \left(c \cdot -3\right)} \cdot \sqrt{a \cdot \left(c \cdot -3\right)}}}}} \]
    5. Applied egg-rr55.4%

      \[\leadsto \color{blue}{\frac{-1}{--3 \cdot \frac{a}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}}} \]
    6. Step-by-step derivation
      1. associate-*r/55.4%

        \[\leadsto \frac{-1}{-\color{blue}{\frac{-3 \cdot a}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}}} \]
      2. metadata-eval55.4%

        \[\leadsto \frac{-1}{-\frac{\color{blue}{\left(-3\right)} \cdot a}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}} \]
      3. distribute-lft-neg-in55.4%

        \[\leadsto \frac{-1}{-\frac{\color{blue}{-3 \cdot a}}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}} \]
      4. distribute-neg-frac55.4%

        \[\leadsto \frac{-1}{\color{blue}{\frac{-\left(-3 \cdot a\right)}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}}} \]
      5. *-commutative55.4%

        \[\leadsto \frac{-1}{\frac{-\left(-\color{blue}{a \cdot 3}\right)}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}} \]
      6. distribute-lft-neg-in55.4%

        \[\leadsto \frac{-1}{\frac{-\color{blue}{\left(-a\right) \cdot 3}}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}} \]
      7. distribute-lft-neg-out55.4%

        \[\leadsto \frac{-1}{\frac{\color{blue}{\left(-\left(-a\right)\right) \cdot 3}}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}} \]
      8. remove-double-neg55.4%

        \[\leadsto \frac{-1}{\frac{\color{blue}{a} \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}} \]
      9. associate-*r*55.4%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{\color{blue}{\left(a \cdot c\right) \cdot -3}}\right)}} \]
      10. *-commutative55.4%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{\color{blue}{-3 \cdot \left(a \cdot c\right)}}\right)}} \]
      11. metadata-eval55.4%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{\color{blue}{\left(-3\right)} \cdot \left(a \cdot c\right)}\right)}} \]
      12. distribute-lft-neg-in55.4%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{\color{blue}{-3 \cdot \left(a \cdot c\right)}}\right)}} \]
      13. associate-*r*55.4%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{-\color{blue}{\left(3 \cdot a\right) \cdot c}}\right)}} \]
      14. distribute-lft-neg-out55.4%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{\color{blue}{\left(-3 \cdot a\right) \cdot c}}\right)}} \]
      15. *-commutative55.4%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{\color{blue}{c \cdot \left(-3 \cdot a\right)}}\right)}} \]
      16. *-commutative55.4%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{c \cdot \left(-\color{blue}{a \cdot 3}\right)}\right)}} \]
      17. distribute-rgt-neg-in55.4%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{c \cdot \color{blue}{\left(a \cdot \left(-3\right)\right)}}\right)}} \]
      18. metadata-eval55.4%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{c \cdot \left(a \cdot \color{blue}{-3}\right)}\right)}} \]
    7. Simplified55.4%

      \[\leadsto \color{blue}{\frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{c \cdot \left(a \cdot -3\right)}\right)}}} \]
    8. Taylor expanded in b around -inf 95.0%

      \[\leadsto \frac{-1}{\color{blue}{1.5 \cdot \frac{a}{b}}} \]
    9. Step-by-step derivation
      1. *-commutative95.0%

        \[\leadsto \frac{-1}{\color{blue}{\frac{a}{b} \cdot 1.5}} \]
    10. Simplified95.0%

      \[\leadsto \frac{-1}{\color{blue}{\frac{a}{b} \cdot 1.5}} \]

    if -1.99999999999999987e146 < b < -7.8000000000000006e-155

    1. Initial program 87.4%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. associate-*r*87.5%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
      2. cancel-sign-sub-inv87.5%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{b \cdot b + \left(-3\right) \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
      3. metadata-eval87.5%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b + \color{blue}{-3} \cdot \left(a \cdot c\right)}}{3 \cdot a} \]
      4. *-commutative87.5%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b + \color{blue}{\left(a \cdot c\right) \cdot -3}}}{3 \cdot a} \]
      5. associate-*r*87.5%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b + \color{blue}{a \cdot \left(c \cdot -3\right)}}}{3 \cdot a} \]
    3. Applied egg-rr87.5%

      \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{b \cdot b + a \cdot \left(c \cdot -3\right)}}}{3 \cdot a} \]

    if -7.8000000000000006e-155 < b < 2.6000000000000001e-130

    1. Initial program 69.5%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. /-rgt-identity69.5%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{\color{blue}{\frac{3 \cdot a}{1}}} \]
      2. metadata-eval69.5%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{\frac{3 \cdot a}{\color{blue}{--1}}} \]
      3. associate-/l*69.5%

        \[\leadsto \color{blue}{\frac{\left(\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right) \cdot \left(--1\right)}{3 \cdot a}} \]
      4. associate-*r/69.4%

        \[\leadsto \color{blue}{\left(\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right) \cdot \frac{--1}{3 \cdot a}} \]
      5. *-commutative69.4%

        \[\leadsto \color{blue}{\frac{--1}{3 \cdot a} \cdot \left(\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)} \]
      6. associate-*l/69.5%

        \[\leadsto \color{blue}{\frac{\left(--1\right) \cdot \left(\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}{3 \cdot a}} \]
      7. associate-*r/69.5%

        \[\leadsto \color{blue}{\left(--1\right) \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}} \]
      8. metadata-eval69.5%

        \[\leadsto \color{blue}{1} \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      9. metadata-eval69.5%

        \[\leadsto \color{blue}{\frac{-1}{-1}} \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      10. times-frac69.5%

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}{-1 \cdot \left(3 \cdot a\right)}} \]
      11. neg-mul-169.5%

        \[\leadsto \frac{-1 \cdot \left(\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}{\color{blue}{-3 \cdot a}} \]
      12. distribute-rgt-neg-in69.5%

        \[\leadsto \frac{-1 \cdot \left(\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}{\color{blue}{3 \cdot \left(-a\right)}} \]
      13. times-frac69.3%

        \[\leadsto \color{blue}{\frac{-1}{3} \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{-a}} \]
      14. metadata-eval69.3%

        \[\leadsto \color{blue}{-0.3333333333333333} \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{-a} \]
      15. neg-mul-169.3%

        \[\leadsto -0.3333333333333333 \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{\color{blue}{-1 \cdot a}} \]
    3. Simplified69.4%

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{b - \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)}}{a}} \]
    4. Step-by-step derivation
      1. associate-*r/69.3%

        \[\leadsto \color{blue}{\frac{-0.3333333333333333 \cdot \left(b - \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)}\right)}{a}} \]
      2. associate-*r*69.3%

        \[\leadsto \frac{-0.3333333333333333 \cdot \left(b - \sqrt{\mathsf{fma}\left(b, b, \color{blue}{\left(a \cdot c\right) \cdot -3}\right)}\right)}{a} \]
      3. clear-num69.1%

        \[\leadsto \color{blue}{\frac{1}{\frac{a}{-0.3333333333333333 \cdot \left(b - \sqrt{\mathsf{fma}\left(b, b, \left(a \cdot c\right) \cdot -3\right)}\right)}}} \]
      4. frac-2neg69.1%

        \[\leadsto \color{blue}{\frac{-1}{-\frac{a}{-0.3333333333333333 \cdot \left(b - \sqrt{\mathsf{fma}\left(b, b, \left(a \cdot c\right) \cdot -3\right)}\right)}}} \]
      5. metadata-eval69.1%

        \[\leadsto \frac{\color{blue}{-1}}{-\frac{a}{-0.3333333333333333 \cdot \left(b - \sqrt{\mathsf{fma}\left(b, b, \left(a \cdot c\right) \cdot -3\right)}\right)}} \]
      6. *-un-lft-identity69.1%

        \[\leadsto \frac{-1}{-\frac{\color{blue}{1 \cdot a}}{-0.3333333333333333 \cdot \left(b - \sqrt{\mathsf{fma}\left(b, b, \left(a \cdot c\right) \cdot -3\right)}\right)}} \]
      7. associate-*r*69.2%

        \[\leadsto \frac{-1}{-\frac{1 \cdot a}{-0.3333333333333333 \cdot \left(b - \sqrt{\mathsf{fma}\left(b, b, \color{blue}{a \cdot \left(c \cdot -3\right)}\right)}\right)}} \]
      8. times-frac69.4%

        \[\leadsto \frac{-1}{-\color{blue}{\frac{1}{-0.3333333333333333} \cdot \frac{a}{b - \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)}}}} \]
      9. metadata-eval69.4%

        \[\leadsto \frac{-1}{-\color{blue}{-3} \cdot \frac{a}{b - \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)}}} \]
      10. fma-udef69.4%

        \[\leadsto \frac{-1}{--3 \cdot \frac{a}{b - \sqrt{\color{blue}{b \cdot b + a \cdot \left(c \cdot -3\right)}}}} \]
      11. add-sqr-sqrt69.4%

        \[\leadsto \frac{-1}{--3 \cdot \frac{a}{b - \sqrt{b \cdot b + \color{blue}{\sqrt{a \cdot \left(c \cdot -3\right)} \cdot \sqrt{a \cdot \left(c \cdot -3\right)}}}}} \]
    5. Applied egg-rr76.7%

      \[\leadsto \color{blue}{\frac{-1}{--3 \cdot \frac{a}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}}} \]
    6. Step-by-step derivation
      1. associate-*r/76.8%

        \[\leadsto \frac{-1}{-\color{blue}{\frac{-3 \cdot a}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}}} \]
      2. metadata-eval76.8%

        \[\leadsto \frac{-1}{-\frac{\color{blue}{\left(-3\right)} \cdot a}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}} \]
      3. distribute-lft-neg-in76.8%

        \[\leadsto \frac{-1}{-\frac{\color{blue}{-3 \cdot a}}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}} \]
      4. distribute-neg-frac76.8%

        \[\leadsto \frac{-1}{\color{blue}{\frac{-\left(-3 \cdot a\right)}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}}} \]
      5. *-commutative76.8%

        \[\leadsto \frac{-1}{\frac{-\left(-\color{blue}{a \cdot 3}\right)}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}} \]
      6. distribute-lft-neg-in76.8%

        \[\leadsto \frac{-1}{\frac{-\color{blue}{\left(-a\right) \cdot 3}}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}} \]
      7. distribute-lft-neg-out76.8%

        \[\leadsto \frac{-1}{\frac{\color{blue}{\left(-\left(-a\right)\right) \cdot 3}}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}} \]
      8. remove-double-neg76.8%

        \[\leadsto \frac{-1}{\frac{\color{blue}{a} \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}} \]
      9. associate-*r*76.8%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{\color{blue}{\left(a \cdot c\right) \cdot -3}}\right)}} \]
      10. *-commutative76.8%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{\color{blue}{-3 \cdot \left(a \cdot c\right)}}\right)}} \]
      11. metadata-eval76.8%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{\color{blue}{\left(-3\right)} \cdot \left(a \cdot c\right)}\right)}} \]
      12. distribute-lft-neg-in76.8%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{\color{blue}{-3 \cdot \left(a \cdot c\right)}}\right)}} \]
      13. associate-*r*76.8%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{-\color{blue}{\left(3 \cdot a\right) \cdot c}}\right)}} \]
      14. distribute-lft-neg-out76.8%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{\color{blue}{\left(-3 \cdot a\right) \cdot c}}\right)}} \]
      15. *-commutative76.8%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{\color{blue}{c \cdot \left(-3 \cdot a\right)}}\right)}} \]
      16. *-commutative76.8%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{c \cdot \left(-\color{blue}{a \cdot 3}\right)}\right)}} \]
      17. distribute-rgt-neg-in76.8%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{c \cdot \color{blue}{\left(a \cdot \left(-3\right)\right)}}\right)}} \]
      18. metadata-eval76.8%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{c \cdot \left(a \cdot \color{blue}{-3}\right)}\right)}} \]
    7. Simplified76.8%

      \[\leadsto \color{blue}{\frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{c \cdot \left(a \cdot -3\right)}\right)}}} \]

    if 2.6000000000000001e-130 < b < 6.00000000000000027e-92

    1. Initial program 45.0%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. neg-sub045.0%

        \[\leadsto \frac{\color{blue}{\left(0 - b\right)} + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      2. associate-+l-45.0%

        \[\leadsto \frac{\color{blue}{0 - \left(b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}}{3 \cdot a} \]
      3. sub0-neg45.0%

        \[\leadsto \frac{\color{blue}{-\left(b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}}{3 \cdot a} \]
      4. neg-mul-145.0%

        \[\leadsto \frac{\color{blue}{-1 \cdot \left(b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}}{3 \cdot a} \]
      5. associate-*r/45.0%

        \[\leadsto \color{blue}{-1 \cdot \frac{b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}} \]
      6. *-commutative45.0%

        \[\leadsto \color{blue}{\frac{b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \cdot -1} \]
      7. metadata-eval45.0%

        \[\leadsto \frac{b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \cdot \color{blue}{\frac{1}{-1}} \]
      8. metadata-eval45.0%

        \[\leadsto \frac{b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \cdot \frac{\color{blue}{--1}}{-1} \]
      9. times-frac45.0%

        \[\leadsto \color{blue}{\frac{\left(b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right) \cdot \left(--1\right)}{\left(3 \cdot a\right) \cdot -1}} \]
      10. *-commutative45.0%

        \[\leadsto \frac{\left(b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right) \cdot \left(--1\right)}{\color{blue}{-1 \cdot \left(3 \cdot a\right)}} \]
      11. times-frac45.0%

        \[\leadsto \color{blue}{\frac{b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{-1} \cdot \frac{--1}{3 \cdot a}} \]
    3. Simplified45.0%

      \[\leadsto \color{blue}{\left(\sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)} - b\right) \cdot \frac{0.3333333333333333}{a}} \]
    4. Step-by-step derivation
      1. sub-neg45.0%

        \[\leadsto \color{blue}{\left(\sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)} + \left(-b\right)\right)} \cdot \frac{0.3333333333333333}{a} \]
      2. fma-udef45.0%

        \[\leadsto \left(\sqrt{\color{blue}{b \cdot b + a \cdot \left(c \cdot -3\right)}} + \left(-b\right)\right) \cdot \frac{0.3333333333333333}{a} \]
      3. add-sqr-sqrt45.0%

        \[\leadsto \left(\sqrt{b \cdot b + \color{blue}{\sqrt{a \cdot \left(c \cdot -3\right)} \cdot \sqrt{a \cdot \left(c \cdot -3\right)}}} + \left(-b\right)\right) \cdot \frac{0.3333333333333333}{a} \]
      4. hypot-def45.0%

        \[\leadsto \left(\color{blue}{\mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)} + \left(-b\right)\right) \cdot \frac{0.3333333333333333}{a} \]
      5. add-sqr-sqrt0.0%

        \[\leadsto \left(\mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right) + \color{blue}{\sqrt{-b} \cdot \sqrt{-b}}\right) \cdot \frac{0.3333333333333333}{a} \]
      6. sqrt-unprod45.0%

        \[\leadsto \left(\mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right) + \color{blue}{\sqrt{\left(-b\right) \cdot \left(-b\right)}}\right) \cdot \frac{0.3333333333333333}{a} \]
      7. sqr-neg45.0%

        \[\leadsto \left(\mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right) + \sqrt{\color{blue}{b \cdot b}}\right) \cdot \frac{0.3333333333333333}{a} \]
      8. sqrt-prod45.0%

        \[\leadsto \left(\mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right) + \color{blue}{\sqrt{b} \cdot \sqrt{b}}\right) \cdot \frac{0.3333333333333333}{a} \]
      9. add-sqr-sqrt45.0%

        \[\leadsto \left(\mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right) + \color{blue}{b}\right) \cdot \frac{0.3333333333333333}{a} \]
    5. Applied egg-rr45.0%

      \[\leadsto \color{blue}{\left(\mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right) + b\right)} \cdot \frac{0.3333333333333333}{a} \]
    6. Step-by-step derivation
      1. sqrt-prod85.5%

        \[\leadsto \left(\mathsf{hypot}\left(b, \color{blue}{\sqrt{a} \cdot \sqrt{c \cdot -3}}\right) + b\right) \cdot \frac{0.3333333333333333}{a} \]
    7. Applied egg-rr85.5%

      \[\leadsto \left(\mathsf{hypot}\left(b, \color{blue}{\sqrt{a} \cdot \sqrt{c \cdot -3}}\right) + b\right) \cdot \frac{0.3333333333333333}{a} \]
    8. Step-by-step derivation
      1. *-commutative85.5%

        \[\leadsto \left(\mathsf{hypot}\left(b, \color{blue}{\sqrt{c \cdot -3} \cdot \sqrt{a}}\right) + b\right) \cdot \frac{0.3333333333333333}{a} \]
      2. *-commutative85.5%

        \[\leadsto \left(\mathsf{hypot}\left(b, \sqrt{\color{blue}{-3 \cdot c}} \cdot \sqrt{a}\right) + b\right) \cdot \frac{0.3333333333333333}{a} \]
    9. Simplified85.5%

      \[\leadsto \left(\mathsf{hypot}\left(b, \color{blue}{\sqrt{-3 \cdot c} \cdot \sqrt{a}}\right) + b\right) \cdot \frac{0.3333333333333333}{a} \]

    if 6.00000000000000027e-92 < b < 2.2e-17 or 2.2000000000000002 < b

    1. Initial program 19.1%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Taylor expanded in b around inf 87.2%

      \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b}} \]

    if 2.2e-17 < b < 2.2000000000000002

    1. Initial program 83.6%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Taylor expanded in b around 0 83.6%

      \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{-3 \cdot \left(c \cdot a\right)}}}{3 \cdot a} \]
  3. Recombined 6 regimes into one program.
  4. Final simplification86.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2 \cdot 10^{+146}:\\ \;\;\;\;\frac{-1}{\frac{a}{b} \cdot 1.5}\\ \mathbf{elif}\;b \leq -7.8 \cdot 10^{-155}:\\ \;\;\;\;\frac{\sqrt{b \cdot b + a \cdot \left(c \cdot -3\right)} - b}{a \cdot 3}\\ \mathbf{elif}\;b \leq 2.6 \cdot 10^{-130}:\\ \;\;\;\;\frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{c \cdot \left(a \cdot -3\right)}\right)}}\\ \mathbf{elif}\;b \leq 6 \cdot 10^{-92}:\\ \;\;\;\;\left(b + \mathsf{hypot}\left(b, \sqrt{c \cdot -3} \cdot \sqrt{a}\right)\right) \cdot \frac{0.3333333333333333}{a}\\ \mathbf{elif}\;b \leq 2.2 \cdot 10^{-17} \lor \neg \left(b \leq 2.2\right):\\ \;\;\;\;-0.5 \cdot \frac{c}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{-3 \cdot \left(a \cdot c\right)} - b}{a \cdot 3}\\ \end{array} \]

Alternative 2: 85.9% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := a \cdot \left(c \cdot -3\right)\\ \mathbf{if}\;b \leq -8.5 \cdot 10^{+146}:\\ \;\;\;\;\frac{-1}{\frac{a}{b} \cdot 1.5}\\ \mathbf{elif}\;b \leq -5 \cdot 10^{-152}:\\ \;\;\;\;\frac{\sqrt{b \cdot b + t_0} - b}{a \cdot 3}\\ \mathbf{elif}\;b \leq 2.9 \cdot 10^{-211}:\\ \;\;\;\;\frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{c \cdot \left(a \cdot -3\right)}\right)}}\\ \mathbf{elif}\;b \leq 2.9 \cdot 10^{-121}:\\ \;\;\;\;\frac{0.3333333333333333}{a} \cdot \left(b + \mathsf{hypot}\left(b, \sqrt{t_0}\right)\right)\\ \mathbf{elif}\;b \leq 2.2 \cdot 10^{-17} \lor \neg \left(b \leq 2.2\right):\\ \;\;\;\;-0.5 \cdot \frac{c}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{-3 \cdot \left(a \cdot c\right)} - b}{a \cdot 3}\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (let* ((t_0 (* a (* c -3.0))))
   (if (<= b -8.5e+146)
     (/ -1.0 (* (/ a b) 1.5))
     (if (<= b -5e-152)
       (/ (- (sqrt (+ (* b b) t_0)) b) (* a 3.0))
       (if (<= b 2.9e-211)
         (/ -1.0 (/ (* a 3.0) (- b (hypot b (sqrt (* c (* a -3.0)))))))
         (if (<= b 2.9e-121)
           (* (/ 0.3333333333333333 a) (+ b (hypot b (sqrt t_0))))
           (if (or (<= b 2.2e-17) (not (<= b 2.2)))
             (* -0.5 (/ c b))
             (/ (- (sqrt (* -3.0 (* a c))) b) (* a 3.0)))))))))
double code(double a, double b, double c) {
	double t_0 = a * (c * -3.0);
	double tmp;
	if (b <= -8.5e+146) {
		tmp = -1.0 / ((a / b) * 1.5);
	} else if (b <= -5e-152) {
		tmp = (sqrt(((b * b) + t_0)) - b) / (a * 3.0);
	} else if (b <= 2.9e-211) {
		tmp = -1.0 / ((a * 3.0) / (b - hypot(b, sqrt((c * (a * -3.0))))));
	} else if (b <= 2.9e-121) {
		tmp = (0.3333333333333333 / a) * (b + hypot(b, sqrt(t_0)));
	} else if ((b <= 2.2e-17) || !(b <= 2.2)) {
		tmp = -0.5 * (c / b);
	} else {
		tmp = (sqrt((-3.0 * (a * c))) - b) / (a * 3.0);
	}
	return tmp;
}
public static double code(double a, double b, double c) {
	double t_0 = a * (c * -3.0);
	double tmp;
	if (b <= -8.5e+146) {
		tmp = -1.0 / ((a / b) * 1.5);
	} else if (b <= -5e-152) {
		tmp = (Math.sqrt(((b * b) + t_0)) - b) / (a * 3.0);
	} else if (b <= 2.9e-211) {
		tmp = -1.0 / ((a * 3.0) / (b - Math.hypot(b, Math.sqrt((c * (a * -3.0))))));
	} else if (b <= 2.9e-121) {
		tmp = (0.3333333333333333 / a) * (b + Math.hypot(b, Math.sqrt(t_0)));
	} else if ((b <= 2.2e-17) || !(b <= 2.2)) {
		tmp = -0.5 * (c / b);
	} else {
		tmp = (Math.sqrt((-3.0 * (a * c))) - b) / (a * 3.0);
	}
	return tmp;
}
def code(a, b, c):
	t_0 = a * (c * -3.0)
	tmp = 0
	if b <= -8.5e+146:
		tmp = -1.0 / ((a / b) * 1.5)
	elif b <= -5e-152:
		tmp = (math.sqrt(((b * b) + t_0)) - b) / (a * 3.0)
	elif b <= 2.9e-211:
		tmp = -1.0 / ((a * 3.0) / (b - math.hypot(b, math.sqrt((c * (a * -3.0))))))
	elif b <= 2.9e-121:
		tmp = (0.3333333333333333 / a) * (b + math.hypot(b, math.sqrt(t_0)))
	elif (b <= 2.2e-17) or not (b <= 2.2):
		tmp = -0.5 * (c / b)
	else:
		tmp = (math.sqrt((-3.0 * (a * c))) - b) / (a * 3.0)
	return tmp
function code(a, b, c)
	t_0 = Float64(a * Float64(c * -3.0))
	tmp = 0.0
	if (b <= -8.5e+146)
		tmp = Float64(-1.0 / Float64(Float64(a / b) * 1.5));
	elseif (b <= -5e-152)
		tmp = Float64(Float64(sqrt(Float64(Float64(b * b) + t_0)) - b) / Float64(a * 3.0));
	elseif (b <= 2.9e-211)
		tmp = Float64(-1.0 / Float64(Float64(a * 3.0) / Float64(b - hypot(b, sqrt(Float64(c * Float64(a * -3.0)))))));
	elseif (b <= 2.9e-121)
		tmp = Float64(Float64(0.3333333333333333 / a) * Float64(b + hypot(b, sqrt(t_0))));
	elseif ((b <= 2.2e-17) || !(b <= 2.2))
		tmp = Float64(-0.5 * Float64(c / b));
	else
		tmp = Float64(Float64(sqrt(Float64(-3.0 * Float64(a * c))) - b) / Float64(a * 3.0));
	end
	return tmp
end
function tmp_2 = code(a, b, c)
	t_0 = a * (c * -3.0);
	tmp = 0.0;
	if (b <= -8.5e+146)
		tmp = -1.0 / ((a / b) * 1.5);
	elseif (b <= -5e-152)
		tmp = (sqrt(((b * b) + t_0)) - b) / (a * 3.0);
	elseif (b <= 2.9e-211)
		tmp = -1.0 / ((a * 3.0) / (b - hypot(b, sqrt((c * (a * -3.0))))));
	elseif (b <= 2.9e-121)
		tmp = (0.3333333333333333 / a) * (b + hypot(b, sqrt(t_0)));
	elseif ((b <= 2.2e-17) || ~((b <= 2.2)))
		tmp = -0.5 * (c / b);
	else
		tmp = (sqrt((-3.0 * (a * c))) - b) / (a * 3.0);
	end
	tmp_2 = tmp;
end
code[a_, b_, c_] := Block[{t$95$0 = N[(a * N[(c * -3.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -8.5e+146], N[(-1.0 / N[(N[(a / b), $MachinePrecision] * 1.5), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -5e-152], N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] + t$95$0), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.9e-211], N[(-1.0 / N[(N[(a * 3.0), $MachinePrecision] / N[(b - N[Sqrt[b ^ 2 + N[Sqrt[N[(c * N[(a * -3.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.9e-121], N[(N[(0.3333333333333333 / a), $MachinePrecision] * N[(b + N[Sqrt[b ^ 2 + N[Sqrt[t$95$0], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[b, 2.2e-17], N[Not[LessEqual[b, 2.2]], $MachinePrecision]], N[(-0.5 * N[(c / b), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[N[(-3.0 * N[(a * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 3.0), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := a \cdot \left(c \cdot -3\right)\\
\mathbf{if}\;b \leq -8.5 \cdot 10^{+146}:\\
\;\;\;\;\frac{-1}{\frac{a}{b} \cdot 1.5}\\

\mathbf{elif}\;b \leq -5 \cdot 10^{-152}:\\
\;\;\;\;\frac{\sqrt{b \cdot b + t_0} - b}{a \cdot 3}\\

\mathbf{elif}\;b \leq 2.9 \cdot 10^{-211}:\\
\;\;\;\;\frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{c \cdot \left(a \cdot -3\right)}\right)}}\\

\mathbf{elif}\;b \leq 2.9 \cdot 10^{-121}:\\
\;\;\;\;\frac{0.3333333333333333}{a} \cdot \left(b + \mathsf{hypot}\left(b, \sqrt{t_0}\right)\right)\\

\mathbf{elif}\;b \leq 2.2 \cdot 10^{-17} \lor \neg \left(b \leq 2.2\right):\\
\;\;\;\;-0.5 \cdot \frac{c}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if b < -8.5e146

    1. Initial program 57.7%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. /-rgt-identity57.7%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{\color{blue}{\frac{3 \cdot a}{1}}} \]
      2. metadata-eval57.7%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{\frac{3 \cdot a}{\color{blue}{--1}}} \]
      3. associate-/l*57.7%

        \[\leadsto \color{blue}{\frac{\left(\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right) \cdot \left(--1\right)}{3 \cdot a}} \]
      4. associate-*r/57.6%

        \[\leadsto \color{blue}{\left(\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right) \cdot \frac{--1}{3 \cdot a}} \]
      5. *-commutative57.6%

        \[\leadsto \color{blue}{\frac{--1}{3 \cdot a} \cdot \left(\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)} \]
      6. associate-*l/57.7%

        \[\leadsto \color{blue}{\frac{\left(--1\right) \cdot \left(\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}{3 \cdot a}} \]
      7. associate-*r/57.7%

        \[\leadsto \color{blue}{\left(--1\right) \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}} \]
      8. metadata-eval57.7%

        \[\leadsto \color{blue}{1} \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      9. metadata-eval57.7%

        \[\leadsto \color{blue}{\frac{-1}{-1}} \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      10. times-frac57.7%

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}{-1 \cdot \left(3 \cdot a\right)}} \]
      11. neg-mul-157.7%

        \[\leadsto \frac{-1 \cdot \left(\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}{\color{blue}{-3 \cdot a}} \]
      12. distribute-rgt-neg-in57.7%

        \[\leadsto \frac{-1 \cdot \left(\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}{\color{blue}{3 \cdot \left(-a\right)}} \]
      13. times-frac57.7%

        \[\leadsto \color{blue}{\frac{-1}{3} \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{-a}} \]
      14. metadata-eval57.7%

        \[\leadsto \color{blue}{-0.3333333333333333} \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{-a} \]
      15. neg-mul-157.7%

        \[\leadsto -0.3333333333333333 \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{\color{blue}{-1 \cdot a}} \]
    3. Simplified57.7%

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{b - \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)}}{a}} \]
    4. Step-by-step derivation
      1. associate-*r/57.6%

        \[\leadsto \color{blue}{\frac{-0.3333333333333333 \cdot \left(b - \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)}\right)}{a}} \]
      2. associate-*r*57.6%

        \[\leadsto \frac{-0.3333333333333333 \cdot \left(b - \sqrt{\mathsf{fma}\left(b, b, \color{blue}{\left(a \cdot c\right) \cdot -3}\right)}\right)}{a} \]
      3. clear-num57.6%

        \[\leadsto \color{blue}{\frac{1}{\frac{a}{-0.3333333333333333 \cdot \left(b - \sqrt{\mathsf{fma}\left(b, b, \left(a \cdot c\right) \cdot -3\right)}\right)}}} \]
      4. frac-2neg57.6%

        \[\leadsto \color{blue}{\frac{-1}{-\frac{a}{-0.3333333333333333 \cdot \left(b - \sqrt{\mathsf{fma}\left(b, b, \left(a \cdot c\right) \cdot -3\right)}\right)}}} \]
      5. metadata-eval57.6%

        \[\leadsto \frac{\color{blue}{-1}}{-\frac{a}{-0.3333333333333333 \cdot \left(b - \sqrt{\mathsf{fma}\left(b, b, \left(a \cdot c\right) \cdot -3\right)}\right)}} \]
      6. *-un-lft-identity57.6%

        \[\leadsto \frac{-1}{-\frac{\color{blue}{1 \cdot a}}{-0.3333333333333333 \cdot \left(b - \sqrt{\mathsf{fma}\left(b, b, \left(a \cdot c\right) \cdot -3\right)}\right)}} \]
      7. associate-*r*57.6%

        \[\leadsto \frac{-1}{-\frac{1 \cdot a}{-0.3333333333333333 \cdot \left(b - \sqrt{\mathsf{fma}\left(b, b, \color{blue}{a \cdot \left(c \cdot -3\right)}\right)}\right)}} \]
      8. times-frac57.7%

        \[\leadsto \frac{-1}{-\color{blue}{\frac{1}{-0.3333333333333333} \cdot \frac{a}{b - \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)}}}} \]
      9. metadata-eval57.7%

        \[\leadsto \frac{-1}{-\color{blue}{-3} \cdot \frac{a}{b - \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)}}} \]
      10. fma-udef57.7%

        \[\leadsto \frac{-1}{--3 \cdot \frac{a}{b - \sqrt{\color{blue}{b \cdot b + a \cdot \left(c \cdot -3\right)}}}} \]
      11. add-sqr-sqrt38.2%

        \[\leadsto \frac{-1}{--3 \cdot \frac{a}{b - \sqrt{b \cdot b + \color{blue}{\sqrt{a \cdot \left(c \cdot -3\right)} \cdot \sqrt{a \cdot \left(c \cdot -3\right)}}}}} \]
    5. Applied egg-rr55.4%

      \[\leadsto \color{blue}{\frac{-1}{--3 \cdot \frac{a}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}}} \]
    6. Step-by-step derivation
      1. associate-*r/55.4%

        \[\leadsto \frac{-1}{-\color{blue}{\frac{-3 \cdot a}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}}} \]
      2. metadata-eval55.4%

        \[\leadsto \frac{-1}{-\frac{\color{blue}{\left(-3\right)} \cdot a}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}} \]
      3. distribute-lft-neg-in55.4%

        \[\leadsto \frac{-1}{-\frac{\color{blue}{-3 \cdot a}}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}} \]
      4. distribute-neg-frac55.4%

        \[\leadsto \frac{-1}{\color{blue}{\frac{-\left(-3 \cdot a\right)}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}}} \]
      5. *-commutative55.4%

        \[\leadsto \frac{-1}{\frac{-\left(-\color{blue}{a \cdot 3}\right)}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}} \]
      6. distribute-lft-neg-in55.4%

        \[\leadsto \frac{-1}{\frac{-\color{blue}{\left(-a\right) \cdot 3}}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}} \]
      7. distribute-lft-neg-out55.4%

        \[\leadsto \frac{-1}{\frac{\color{blue}{\left(-\left(-a\right)\right) \cdot 3}}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}} \]
      8. remove-double-neg55.4%

        \[\leadsto \frac{-1}{\frac{\color{blue}{a} \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}} \]
      9. associate-*r*55.4%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{\color{blue}{\left(a \cdot c\right) \cdot -3}}\right)}} \]
      10. *-commutative55.4%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{\color{blue}{-3 \cdot \left(a \cdot c\right)}}\right)}} \]
      11. metadata-eval55.4%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{\color{blue}{\left(-3\right)} \cdot \left(a \cdot c\right)}\right)}} \]
      12. distribute-lft-neg-in55.4%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{\color{blue}{-3 \cdot \left(a \cdot c\right)}}\right)}} \]
      13. associate-*r*55.4%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{-\color{blue}{\left(3 \cdot a\right) \cdot c}}\right)}} \]
      14. distribute-lft-neg-out55.4%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{\color{blue}{\left(-3 \cdot a\right) \cdot c}}\right)}} \]
      15. *-commutative55.4%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{\color{blue}{c \cdot \left(-3 \cdot a\right)}}\right)}} \]
      16. *-commutative55.4%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{c \cdot \left(-\color{blue}{a \cdot 3}\right)}\right)}} \]
      17. distribute-rgt-neg-in55.4%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{c \cdot \color{blue}{\left(a \cdot \left(-3\right)\right)}}\right)}} \]
      18. metadata-eval55.4%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{c \cdot \left(a \cdot \color{blue}{-3}\right)}\right)}} \]
    7. Simplified55.4%

      \[\leadsto \color{blue}{\frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{c \cdot \left(a \cdot -3\right)}\right)}}} \]
    8. Taylor expanded in b around -inf 95.0%

      \[\leadsto \frac{-1}{\color{blue}{1.5 \cdot \frac{a}{b}}} \]
    9. Step-by-step derivation
      1. *-commutative95.0%

        \[\leadsto \frac{-1}{\color{blue}{\frac{a}{b} \cdot 1.5}} \]
    10. Simplified95.0%

      \[\leadsto \frac{-1}{\color{blue}{\frac{a}{b} \cdot 1.5}} \]

    if -8.5e146 < b < -4.9999999999999997e-152

    1. Initial program 87.4%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. associate-*r*87.5%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
      2. cancel-sign-sub-inv87.5%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{b \cdot b + \left(-3\right) \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
      3. metadata-eval87.5%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b + \color{blue}{-3} \cdot \left(a \cdot c\right)}}{3 \cdot a} \]
      4. *-commutative87.5%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b + \color{blue}{\left(a \cdot c\right) \cdot -3}}}{3 \cdot a} \]
      5. associate-*r*87.5%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b + \color{blue}{a \cdot \left(c \cdot -3\right)}}}{3 \cdot a} \]
    3. Applied egg-rr87.5%

      \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{b \cdot b + a \cdot \left(c \cdot -3\right)}}}{3 \cdot a} \]

    if -4.9999999999999997e-152 < b < 2.90000000000000014e-211

    1. Initial program 69.5%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. /-rgt-identity69.5%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{\color{blue}{\frac{3 \cdot a}{1}}} \]
      2. metadata-eval69.5%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{\frac{3 \cdot a}{\color{blue}{--1}}} \]
      3. associate-/l*69.5%

        \[\leadsto \color{blue}{\frac{\left(\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right) \cdot \left(--1\right)}{3 \cdot a}} \]
      4. associate-*r/69.4%

        \[\leadsto \color{blue}{\left(\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right) \cdot \frac{--1}{3 \cdot a}} \]
      5. *-commutative69.4%

        \[\leadsto \color{blue}{\frac{--1}{3 \cdot a} \cdot \left(\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)} \]
      6. associate-*l/69.5%

        \[\leadsto \color{blue}{\frac{\left(--1\right) \cdot \left(\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}{3 \cdot a}} \]
      7. associate-*r/69.5%

        \[\leadsto \color{blue}{\left(--1\right) \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}} \]
      8. metadata-eval69.5%

        \[\leadsto \color{blue}{1} \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      9. metadata-eval69.5%

        \[\leadsto \color{blue}{\frac{-1}{-1}} \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      10. times-frac69.5%

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}{-1 \cdot \left(3 \cdot a\right)}} \]
      11. neg-mul-169.5%

        \[\leadsto \frac{-1 \cdot \left(\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}{\color{blue}{-3 \cdot a}} \]
      12. distribute-rgt-neg-in69.5%

        \[\leadsto \frac{-1 \cdot \left(\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}{\color{blue}{3 \cdot \left(-a\right)}} \]
      13. times-frac69.2%

        \[\leadsto \color{blue}{\frac{-1}{3} \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{-a}} \]
      14. metadata-eval69.2%

        \[\leadsto \color{blue}{-0.3333333333333333} \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{-a} \]
      15. neg-mul-169.2%

        \[\leadsto -0.3333333333333333 \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{\color{blue}{-1 \cdot a}} \]
    3. Simplified69.3%

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{b - \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)}}{a}} \]
    4. Step-by-step derivation
      1. associate-*r/69.2%

        \[\leadsto \color{blue}{\frac{-0.3333333333333333 \cdot \left(b - \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)}\right)}{a}} \]
      2. associate-*r*69.2%

        \[\leadsto \frac{-0.3333333333333333 \cdot \left(b - \sqrt{\mathsf{fma}\left(b, b, \color{blue}{\left(a \cdot c\right) \cdot -3}\right)}\right)}{a} \]
      3. clear-num69.1%

        \[\leadsto \color{blue}{\frac{1}{\frac{a}{-0.3333333333333333 \cdot \left(b - \sqrt{\mathsf{fma}\left(b, b, \left(a \cdot c\right) \cdot -3\right)}\right)}}} \]
      4. frac-2neg69.1%

        \[\leadsto \color{blue}{\frac{-1}{-\frac{a}{-0.3333333333333333 \cdot \left(b - \sqrt{\mathsf{fma}\left(b, b, \left(a \cdot c\right) \cdot -3\right)}\right)}}} \]
      5. metadata-eval69.1%

        \[\leadsto \frac{\color{blue}{-1}}{-\frac{a}{-0.3333333333333333 \cdot \left(b - \sqrt{\mathsf{fma}\left(b, b, \left(a \cdot c\right) \cdot -3\right)}\right)}} \]
      6. *-un-lft-identity69.1%

        \[\leadsto \frac{-1}{-\frac{\color{blue}{1 \cdot a}}{-0.3333333333333333 \cdot \left(b - \sqrt{\mathsf{fma}\left(b, b, \left(a \cdot c\right) \cdot -3\right)}\right)}} \]
      7. associate-*r*69.2%

        \[\leadsto \frac{-1}{-\frac{1 \cdot a}{-0.3333333333333333 \cdot \left(b - \sqrt{\mathsf{fma}\left(b, b, \color{blue}{a \cdot \left(c \cdot -3\right)}\right)}\right)}} \]
      8. times-frac69.4%

        \[\leadsto \frac{-1}{-\color{blue}{\frac{1}{-0.3333333333333333} \cdot \frac{a}{b - \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)}}}} \]
      9. metadata-eval69.4%

        \[\leadsto \frac{-1}{-\color{blue}{-3} \cdot \frac{a}{b - \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)}}} \]
      10. fma-udef69.4%

        \[\leadsto \frac{-1}{--3 \cdot \frac{a}{b - \sqrt{\color{blue}{b \cdot b + a \cdot \left(c \cdot -3\right)}}}} \]
      11. add-sqr-sqrt69.4%

        \[\leadsto \frac{-1}{--3 \cdot \frac{a}{b - \sqrt{b \cdot b + \color{blue}{\sqrt{a \cdot \left(c \cdot -3\right)} \cdot \sqrt{a \cdot \left(c \cdot -3\right)}}}}} \]
    5. Applied egg-rr78.9%

      \[\leadsto \color{blue}{\frac{-1}{--3 \cdot \frac{a}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}}} \]
    6. Step-by-step derivation
      1. associate-*r/79.1%

        \[\leadsto \frac{-1}{-\color{blue}{\frac{-3 \cdot a}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}}} \]
      2. metadata-eval79.1%

        \[\leadsto \frac{-1}{-\frac{\color{blue}{\left(-3\right)} \cdot a}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}} \]
      3. distribute-lft-neg-in79.1%

        \[\leadsto \frac{-1}{-\frac{\color{blue}{-3 \cdot a}}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}} \]
      4. distribute-neg-frac79.1%

        \[\leadsto \frac{-1}{\color{blue}{\frac{-\left(-3 \cdot a\right)}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}}} \]
      5. *-commutative79.1%

        \[\leadsto \frac{-1}{\frac{-\left(-\color{blue}{a \cdot 3}\right)}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}} \]
      6. distribute-lft-neg-in79.1%

        \[\leadsto \frac{-1}{\frac{-\color{blue}{\left(-a\right) \cdot 3}}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}} \]
      7. distribute-lft-neg-out79.1%

        \[\leadsto \frac{-1}{\frac{\color{blue}{\left(-\left(-a\right)\right) \cdot 3}}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}} \]
      8. remove-double-neg79.1%

        \[\leadsto \frac{-1}{\frac{\color{blue}{a} \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}} \]
      9. associate-*r*79.0%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{\color{blue}{\left(a \cdot c\right) \cdot -3}}\right)}} \]
      10. *-commutative79.0%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{\color{blue}{-3 \cdot \left(a \cdot c\right)}}\right)}} \]
      11. metadata-eval79.0%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{\color{blue}{\left(-3\right)} \cdot \left(a \cdot c\right)}\right)}} \]
      12. distribute-lft-neg-in79.0%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{\color{blue}{-3 \cdot \left(a \cdot c\right)}}\right)}} \]
      13. associate-*r*79.1%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{-\color{blue}{\left(3 \cdot a\right) \cdot c}}\right)}} \]
      14. distribute-lft-neg-out79.1%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{\color{blue}{\left(-3 \cdot a\right) \cdot c}}\right)}} \]
      15. *-commutative79.1%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{\color{blue}{c \cdot \left(-3 \cdot a\right)}}\right)}} \]
      16. *-commutative79.1%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{c \cdot \left(-\color{blue}{a \cdot 3}\right)}\right)}} \]
      17. distribute-rgt-neg-in79.1%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{c \cdot \color{blue}{\left(a \cdot \left(-3\right)\right)}}\right)}} \]
      18. metadata-eval79.1%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{c \cdot \left(a \cdot \color{blue}{-3}\right)}\right)}} \]
    7. Simplified79.1%

      \[\leadsto \color{blue}{\frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{c \cdot \left(a \cdot -3\right)}\right)}}} \]

    if 2.90000000000000014e-211 < b < 2.9e-121

    1. Initial program 69.3%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. neg-sub069.3%

        \[\leadsto \frac{\color{blue}{\left(0 - b\right)} + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      2. associate-+l-69.3%

        \[\leadsto \frac{\color{blue}{0 - \left(b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}}{3 \cdot a} \]
      3. sub0-neg69.3%

        \[\leadsto \frac{\color{blue}{-\left(b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}}{3 \cdot a} \]
      4. neg-mul-169.3%

        \[\leadsto \frac{\color{blue}{-1 \cdot \left(b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}}{3 \cdot a} \]
      5. associate-*r/69.3%

        \[\leadsto \color{blue}{-1 \cdot \frac{b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}} \]
      6. *-commutative69.3%

        \[\leadsto \color{blue}{\frac{b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \cdot -1} \]
      7. metadata-eval69.3%

        \[\leadsto \frac{b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \cdot \color{blue}{\frac{1}{-1}} \]
      8. metadata-eval69.3%

        \[\leadsto \frac{b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \cdot \frac{\color{blue}{--1}}{-1} \]
      9. times-frac69.3%

        \[\leadsto \color{blue}{\frac{\left(b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right) \cdot \left(--1\right)}{\left(3 \cdot a\right) \cdot -1}} \]
      10. *-commutative69.3%

        \[\leadsto \frac{\left(b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right) \cdot \left(--1\right)}{\color{blue}{-1 \cdot \left(3 \cdot a\right)}} \]
      11. times-frac69.3%

        \[\leadsto \color{blue}{\frac{b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{-1} \cdot \frac{--1}{3 \cdot a}} \]
    3. Simplified69.2%

      \[\leadsto \color{blue}{\left(\sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)} - b\right) \cdot \frac{0.3333333333333333}{a}} \]
    4. Step-by-step derivation
      1. sub-neg69.2%

        \[\leadsto \color{blue}{\left(\sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)} + \left(-b\right)\right)} \cdot \frac{0.3333333333333333}{a} \]
      2. fma-udef69.2%

        \[\leadsto \left(\sqrt{\color{blue}{b \cdot b + a \cdot \left(c \cdot -3\right)}} + \left(-b\right)\right) \cdot \frac{0.3333333333333333}{a} \]
      3. add-sqr-sqrt69.2%

        \[\leadsto \left(\sqrt{b \cdot b + \color{blue}{\sqrt{a \cdot \left(c \cdot -3\right)} \cdot \sqrt{a \cdot \left(c \cdot -3\right)}}} + \left(-b\right)\right) \cdot \frac{0.3333333333333333}{a} \]
      4. hypot-def69.3%

        \[\leadsto \left(\color{blue}{\mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)} + \left(-b\right)\right) \cdot \frac{0.3333333333333333}{a} \]
      5. add-sqr-sqrt0.0%

        \[\leadsto \left(\mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right) + \color{blue}{\sqrt{-b} \cdot \sqrt{-b}}\right) \cdot \frac{0.3333333333333333}{a} \]
      6. sqrt-unprod69.7%

        \[\leadsto \left(\mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right) + \color{blue}{\sqrt{\left(-b\right) \cdot \left(-b\right)}}\right) \cdot \frac{0.3333333333333333}{a} \]
      7. sqr-neg69.7%

        \[\leadsto \left(\mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right) + \sqrt{\color{blue}{b \cdot b}}\right) \cdot \frac{0.3333333333333333}{a} \]
      8. sqrt-prod69.7%

        \[\leadsto \left(\mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right) + \color{blue}{\sqrt{b} \cdot \sqrt{b}}\right) \cdot \frac{0.3333333333333333}{a} \]
      9. add-sqr-sqrt69.7%

        \[\leadsto \left(\mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right) + \color{blue}{b}\right) \cdot \frac{0.3333333333333333}{a} \]
    5. Applied egg-rr69.7%

      \[\leadsto \color{blue}{\left(\mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right) + b\right)} \cdot \frac{0.3333333333333333}{a} \]

    if 2.9e-121 < b < 2.2e-17 or 2.2000000000000002 < b

    1. Initial program 19.5%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Taylor expanded in b around inf 84.6%

      \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b}} \]

    if 2.2e-17 < b < 2.2000000000000002

    1. Initial program 83.6%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Taylor expanded in b around 0 83.6%

      \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{-3 \cdot \left(c \cdot a\right)}}}{3 \cdot a} \]
  3. Recombined 6 regimes into one program.
  4. Final simplification85.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -8.5 \cdot 10^{+146}:\\ \;\;\;\;\frac{-1}{\frac{a}{b} \cdot 1.5}\\ \mathbf{elif}\;b \leq -5 \cdot 10^{-152}:\\ \;\;\;\;\frac{\sqrt{b \cdot b + a \cdot \left(c \cdot -3\right)} - b}{a \cdot 3}\\ \mathbf{elif}\;b \leq 2.9 \cdot 10^{-211}:\\ \;\;\;\;\frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{c \cdot \left(a \cdot -3\right)}\right)}}\\ \mathbf{elif}\;b \leq 2.9 \cdot 10^{-121}:\\ \;\;\;\;\frac{0.3333333333333333}{a} \cdot \left(b + \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)\right)\\ \mathbf{elif}\;b \leq 2.2 \cdot 10^{-17} \lor \neg \left(b \leq 2.2\right):\\ \;\;\;\;-0.5 \cdot \frac{c}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{-3 \cdot \left(a \cdot c\right)} - b}{a \cdot 3}\\ \end{array} \]

Alternative 3: 81.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -3.8 \cdot 10^{-57}:\\ \;\;\;\;-0.6666666666666666 \cdot \frac{b}{a} + \frac{c}{b} \cdot 0.5\\ \mathbf{elif}\;b \leq 1.3 \cdot 10^{-121} \lor \neg \left(b \leq 1.95 \cdot 10^{-17}\right) \land b \leq 2.2:\\ \;\;\;\;\frac{\sqrt{-3 \cdot \left(a \cdot c\right)} - b}{a \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b}\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b -3.8e-57)
   (+ (* -0.6666666666666666 (/ b a)) (* (/ c b) 0.5))
   (if (or (<= b 1.3e-121) (and (not (<= b 1.95e-17)) (<= b 2.2)))
     (/ (- (sqrt (* -3.0 (* a c))) b) (* a 3.0))
     (* -0.5 (/ c b)))))
double code(double a, double b, double c) {
	double tmp;
	if (b <= -3.8e-57) {
		tmp = (-0.6666666666666666 * (b / a)) + ((c / b) * 0.5);
	} else if ((b <= 1.3e-121) || (!(b <= 1.95e-17) && (b <= 2.2))) {
		tmp = (sqrt((-3.0 * (a * c))) - b) / (a * 3.0);
	} else {
		tmp = -0.5 * (c / b);
	}
	return tmp;
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: tmp
    if (b <= (-3.8d-57)) then
        tmp = ((-0.6666666666666666d0) * (b / a)) + ((c / b) * 0.5d0)
    else if ((b <= 1.3d-121) .or. (.not. (b <= 1.95d-17)) .and. (b <= 2.2d0)) then
        tmp = (sqrt(((-3.0d0) * (a * c))) - b) / (a * 3.0d0)
    else
        tmp = (-0.5d0) * (c / b)
    end if
    code = tmp
end function
public static double code(double a, double b, double c) {
	double tmp;
	if (b <= -3.8e-57) {
		tmp = (-0.6666666666666666 * (b / a)) + ((c / b) * 0.5);
	} else if ((b <= 1.3e-121) || (!(b <= 1.95e-17) && (b <= 2.2))) {
		tmp = (Math.sqrt((-3.0 * (a * c))) - b) / (a * 3.0);
	} else {
		tmp = -0.5 * (c / b);
	}
	return tmp;
}
def code(a, b, c):
	tmp = 0
	if b <= -3.8e-57:
		tmp = (-0.6666666666666666 * (b / a)) + ((c / b) * 0.5)
	elif (b <= 1.3e-121) or (not (b <= 1.95e-17) and (b <= 2.2)):
		tmp = (math.sqrt((-3.0 * (a * c))) - b) / (a * 3.0)
	else:
		tmp = -0.5 * (c / b)
	return tmp
function code(a, b, c)
	tmp = 0.0
	if (b <= -3.8e-57)
		tmp = Float64(Float64(-0.6666666666666666 * Float64(b / a)) + Float64(Float64(c / b) * 0.5));
	elseif ((b <= 1.3e-121) || (!(b <= 1.95e-17) && (b <= 2.2)))
		tmp = Float64(Float64(sqrt(Float64(-3.0 * Float64(a * c))) - b) / Float64(a * 3.0));
	else
		tmp = Float64(-0.5 * Float64(c / b));
	end
	return tmp
end
function tmp_2 = code(a, b, c)
	tmp = 0.0;
	if (b <= -3.8e-57)
		tmp = (-0.6666666666666666 * (b / a)) + ((c / b) * 0.5);
	elseif ((b <= 1.3e-121) || (~((b <= 1.95e-17)) && (b <= 2.2)))
		tmp = (sqrt((-3.0 * (a * c))) - b) / (a * 3.0);
	else
		tmp = -0.5 * (c / b);
	end
	tmp_2 = tmp;
end
code[a_, b_, c_] := If[LessEqual[b, -3.8e-57], N[(N[(-0.6666666666666666 * N[(b / a), $MachinePrecision]), $MachinePrecision] + N[(N[(c / b), $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[b, 1.3e-121], And[N[Not[LessEqual[b, 1.95e-17]], $MachinePrecision], LessEqual[b, 2.2]]], N[(N[(N[Sqrt[N[(-3.0 * N[(a * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 3.0), $MachinePrecision]), $MachinePrecision], N[(-0.5 * N[(c / b), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.8 \cdot 10^{-57}:\\
\;\;\;\;-0.6666666666666666 \cdot \frac{b}{a} + \frac{c}{b} \cdot 0.5\\

\mathbf{elif}\;b \leq 1.3 \cdot 10^{-121} \lor \neg \left(b \leq 1.95 \cdot 10^{-17}\right) \land b \leq 2.2:\\
\;\;\;\;\frac{\sqrt{-3 \cdot \left(a \cdot c\right)} - b}{a \cdot 3}\\

\mathbf{else}:\\
\;\;\;\;-0.5 \cdot \frac{c}{b}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -3.7999999999999997e-57

    1. Initial program 74.7%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Taylor expanded in b around -inf 84.0%

      \[\leadsto \color{blue}{-0.6666666666666666 \cdot \frac{b}{a} + 0.5 \cdot \frac{c}{b}} \]

    if -3.7999999999999997e-57 < b < 1.29999999999999993e-121 or 1.94999999999999995e-17 < b < 2.2000000000000002

    1. Initial program 73.5%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Taylor expanded in b around 0 68.0%

      \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{-3 \cdot \left(c \cdot a\right)}}}{3 \cdot a} \]

    if 1.29999999999999993e-121 < b < 1.94999999999999995e-17 or 2.2000000000000002 < b

    1. Initial program 19.5%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Taylor expanded in b around inf 84.6%

      \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification79.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -3.8 \cdot 10^{-57}:\\ \;\;\;\;-0.6666666666666666 \cdot \frac{b}{a} + \frac{c}{b} \cdot 0.5\\ \mathbf{elif}\;b \leq 1.3 \cdot 10^{-121} \lor \neg \left(b \leq 1.95 \cdot 10^{-17}\right) \land b \leq 2.2:\\ \;\;\;\;\frac{\sqrt{-3 \cdot \left(a \cdot c\right)} - b}{a \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b}\\ \end{array} \]

Alternative 4: 81.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -7 \cdot 10^{-63}:\\ \;\;\;\;-0.6666666666666666 \cdot \frac{b}{a} + \frac{c}{b} \cdot 0.5\\ \mathbf{elif}\;b \leq 5.6 \cdot 10^{-121}:\\ \;\;\;\;\frac{\sqrt{c \cdot \left(a \cdot -3\right)} - b}{a \cdot 3}\\ \mathbf{elif}\;b \leq 3.7 \cdot 10^{-19} \lor \neg \left(b \leq 2.2\right):\\ \;\;\;\;-0.5 \cdot \frac{c}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{-3 \cdot \left(a \cdot c\right)} - b}{a \cdot 3}\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b -7e-63)
   (+ (* -0.6666666666666666 (/ b a)) (* (/ c b) 0.5))
   (if (<= b 5.6e-121)
     (/ (- (sqrt (* c (* a -3.0))) b) (* a 3.0))
     (if (or (<= b 3.7e-19) (not (<= b 2.2)))
       (* -0.5 (/ c b))
       (/ (- (sqrt (* -3.0 (* a c))) b) (* a 3.0))))))
double code(double a, double b, double c) {
	double tmp;
	if (b <= -7e-63) {
		tmp = (-0.6666666666666666 * (b / a)) + ((c / b) * 0.5);
	} else if (b <= 5.6e-121) {
		tmp = (sqrt((c * (a * -3.0))) - b) / (a * 3.0);
	} else if ((b <= 3.7e-19) || !(b <= 2.2)) {
		tmp = -0.5 * (c / b);
	} else {
		tmp = (sqrt((-3.0 * (a * c))) - b) / (a * 3.0);
	}
	return tmp;
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: tmp
    if (b <= (-7d-63)) then
        tmp = ((-0.6666666666666666d0) * (b / a)) + ((c / b) * 0.5d0)
    else if (b <= 5.6d-121) then
        tmp = (sqrt((c * (a * (-3.0d0)))) - b) / (a * 3.0d0)
    else if ((b <= 3.7d-19) .or. (.not. (b <= 2.2d0))) then
        tmp = (-0.5d0) * (c / b)
    else
        tmp = (sqrt(((-3.0d0) * (a * c))) - b) / (a * 3.0d0)
    end if
    code = tmp
end function
public static double code(double a, double b, double c) {
	double tmp;
	if (b <= -7e-63) {
		tmp = (-0.6666666666666666 * (b / a)) + ((c / b) * 0.5);
	} else if (b <= 5.6e-121) {
		tmp = (Math.sqrt((c * (a * -3.0))) - b) / (a * 3.0);
	} else if ((b <= 3.7e-19) || !(b <= 2.2)) {
		tmp = -0.5 * (c / b);
	} else {
		tmp = (Math.sqrt((-3.0 * (a * c))) - b) / (a * 3.0);
	}
	return tmp;
}
def code(a, b, c):
	tmp = 0
	if b <= -7e-63:
		tmp = (-0.6666666666666666 * (b / a)) + ((c / b) * 0.5)
	elif b <= 5.6e-121:
		tmp = (math.sqrt((c * (a * -3.0))) - b) / (a * 3.0)
	elif (b <= 3.7e-19) or not (b <= 2.2):
		tmp = -0.5 * (c / b)
	else:
		tmp = (math.sqrt((-3.0 * (a * c))) - b) / (a * 3.0)
	return tmp
function code(a, b, c)
	tmp = 0.0
	if (b <= -7e-63)
		tmp = Float64(Float64(-0.6666666666666666 * Float64(b / a)) + Float64(Float64(c / b) * 0.5));
	elseif (b <= 5.6e-121)
		tmp = Float64(Float64(sqrt(Float64(c * Float64(a * -3.0))) - b) / Float64(a * 3.0));
	elseif ((b <= 3.7e-19) || !(b <= 2.2))
		tmp = Float64(-0.5 * Float64(c / b));
	else
		tmp = Float64(Float64(sqrt(Float64(-3.0 * Float64(a * c))) - b) / Float64(a * 3.0));
	end
	return tmp
end
function tmp_2 = code(a, b, c)
	tmp = 0.0;
	if (b <= -7e-63)
		tmp = (-0.6666666666666666 * (b / a)) + ((c / b) * 0.5);
	elseif (b <= 5.6e-121)
		tmp = (sqrt((c * (a * -3.0))) - b) / (a * 3.0);
	elseif ((b <= 3.7e-19) || ~((b <= 2.2)))
		tmp = -0.5 * (c / b);
	else
		tmp = (sqrt((-3.0 * (a * c))) - b) / (a * 3.0);
	end
	tmp_2 = tmp;
end
code[a_, b_, c_] := If[LessEqual[b, -7e-63], N[(N[(-0.6666666666666666 * N[(b / a), $MachinePrecision]), $MachinePrecision] + N[(N[(c / b), $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5.6e-121], N[(N[(N[Sqrt[N[(c * N[(a * -3.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 3.0), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[b, 3.7e-19], N[Not[LessEqual[b, 2.2]], $MachinePrecision]], N[(-0.5 * N[(c / b), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[N[(-3.0 * N[(a * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 3.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -7 \cdot 10^{-63}:\\
\;\;\;\;-0.6666666666666666 \cdot \frac{b}{a} + \frac{c}{b} \cdot 0.5\\

\mathbf{elif}\;b \leq 5.6 \cdot 10^{-121}:\\
\;\;\;\;\frac{\sqrt{c \cdot \left(a \cdot -3\right)} - b}{a \cdot 3}\\

\mathbf{elif}\;b \leq 3.7 \cdot 10^{-19} \lor \neg \left(b \leq 2.2\right):\\
\;\;\;\;-0.5 \cdot \frac{c}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -7.00000000000000006e-63

    1. Initial program 74.7%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Taylor expanded in b around -inf 84.0%

      \[\leadsto \color{blue}{-0.6666666666666666 \cdot \frac{b}{a} + 0.5 \cdot \frac{c}{b}} \]

    if -7.00000000000000006e-63 < b < 5.6000000000000002e-121

    1. Initial program 72.6%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Taylor expanded in b around 0 66.7%

      \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{-3 \cdot \left(c \cdot a\right)}}}{3 \cdot a} \]
    3. Step-by-step derivation
      1. *-commutative66.7%

        \[\leadsto \frac{\left(-b\right) + \sqrt{-3 \cdot \color{blue}{\left(a \cdot c\right)}}}{3 \cdot a} \]
      2. metadata-eval66.7%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{\left(-3\right)} \cdot \left(a \cdot c\right)}}{3 \cdot a} \]
      3. distribute-lft-neg-in66.7%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{-3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
      4. associate-*r*66.8%

        \[\leadsto \frac{\left(-b\right) + \sqrt{-\color{blue}{\left(3 \cdot a\right) \cdot c}}}{3 \cdot a} \]
      5. distribute-lft-neg-out66.8%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{\left(-3 \cdot a\right) \cdot c}}}{3 \cdot a} \]
      6. *-commutative66.8%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{c \cdot \left(-3 \cdot a\right)}}}{3 \cdot a} \]
      7. *-commutative66.8%

        \[\leadsto \frac{\left(-b\right) + \sqrt{c \cdot \left(-\color{blue}{a \cdot 3}\right)}}{3 \cdot a} \]
      8. distribute-rgt-neg-in66.8%

        \[\leadsto \frac{\left(-b\right) + \sqrt{c \cdot \color{blue}{\left(a \cdot \left(-3\right)\right)}}}{3 \cdot a} \]
      9. metadata-eval66.8%

        \[\leadsto \frac{\left(-b\right) + \sqrt{c \cdot \left(a \cdot \color{blue}{-3}\right)}}{3 \cdot a} \]
    4. Simplified66.8%

      \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{c \cdot \left(a \cdot -3\right)}}}{3 \cdot a} \]

    if 5.6000000000000002e-121 < b < 3.70000000000000005e-19 or 2.2000000000000002 < b

    1. Initial program 19.5%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Taylor expanded in b around inf 84.6%

      \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b}} \]

    if 3.70000000000000005e-19 < b < 2.2000000000000002

    1. Initial program 83.6%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Taylor expanded in b around 0 83.6%

      \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{-3 \cdot \left(c \cdot a\right)}}}{3 \cdot a} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification79.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -7 \cdot 10^{-63}:\\ \;\;\;\;-0.6666666666666666 \cdot \frac{b}{a} + \frac{c}{b} \cdot 0.5\\ \mathbf{elif}\;b \leq 5.6 \cdot 10^{-121}:\\ \;\;\;\;\frac{\sqrt{c \cdot \left(a \cdot -3\right)} - b}{a \cdot 3}\\ \mathbf{elif}\;b \leq 3.7 \cdot 10^{-19} \lor \neg \left(b \leq 2.2\right):\\ \;\;\;\;-0.5 \cdot \frac{c}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{-3 \cdot \left(a \cdot c\right)} - b}{a \cdot 3}\\ \end{array} \]

Alternative 5: 85.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -1 \cdot 10^{+147}:\\ \;\;\;\;\frac{-1}{\frac{a}{b} \cdot 1.5}\\ \mathbf{elif}\;b \leq 5.6 \cdot 10^{-121}:\\ \;\;\;\;\frac{\sqrt{b \cdot b + a \cdot \left(c \cdot -3\right)} - b}{a \cdot 3}\\ \mathbf{elif}\;b \leq 2.2 \cdot 10^{-17} \lor \neg \left(b \leq 2.3\right):\\ \;\;\;\;-0.5 \cdot \frac{c}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{-3 \cdot \left(a \cdot c\right)} - b}{a \cdot 3}\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b -1e+147)
   (/ -1.0 (* (/ a b) 1.5))
   (if (<= b 5.6e-121)
     (/ (- (sqrt (+ (* b b) (* a (* c -3.0)))) b) (* a 3.0))
     (if (or (<= b 2.2e-17) (not (<= b 2.3)))
       (* -0.5 (/ c b))
       (/ (- (sqrt (* -3.0 (* a c))) b) (* a 3.0))))))
double code(double a, double b, double c) {
	double tmp;
	if (b <= -1e+147) {
		tmp = -1.0 / ((a / b) * 1.5);
	} else if (b <= 5.6e-121) {
		tmp = (sqrt(((b * b) + (a * (c * -3.0)))) - b) / (a * 3.0);
	} else if ((b <= 2.2e-17) || !(b <= 2.3)) {
		tmp = -0.5 * (c / b);
	} else {
		tmp = (sqrt((-3.0 * (a * c))) - b) / (a * 3.0);
	}
	return tmp;
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: tmp
    if (b <= (-1d+147)) then
        tmp = (-1.0d0) / ((a / b) * 1.5d0)
    else if (b <= 5.6d-121) then
        tmp = (sqrt(((b * b) + (a * (c * (-3.0d0))))) - b) / (a * 3.0d0)
    else if ((b <= 2.2d-17) .or. (.not. (b <= 2.3d0))) then
        tmp = (-0.5d0) * (c / b)
    else
        tmp = (sqrt(((-3.0d0) * (a * c))) - b) / (a * 3.0d0)
    end if
    code = tmp
end function
public static double code(double a, double b, double c) {
	double tmp;
	if (b <= -1e+147) {
		tmp = -1.0 / ((a / b) * 1.5);
	} else if (b <= 5.6e-121) {
		tmp = (Math.sqrt(((b * b) + (a * (c * -3.0)))) - b) / (a * 3.0);
	} else if ((b <= 2.2e-17) || !(b <= 2.3)) {
		tmp = -0.5 * (c / b);
	} else {
		tmp = (Math.sqrt((-3.0 * (a * c))) - b) / (a * 3.0);
	}
	return tmp;
}
def code(a, b, c):
	tmp = 0
	if b <= -1e+147:
		tmp = -1.0 / ((a / b) * 1.5)
	elif b <= 5.6e-121:
		tmp = (math.sqrt(((b * b) + (a * (c * -3.0)))) - b) / (a * 3.0)
	elif (b <= 2.2e-17) or not (b <= 2.3):
		tmp = -0.5 * (c / b)
	else:
		tmp = (math.sqrt((-3.0 * (a * c))) - b) / (a * 3.0)
	return tmp
function code(a, b, c)
	tmp = 0.0
	if (b <= -1e+147)
		tmp = Float64(-1.0 / Float64(Float64(a / b) * 1.5));
	elseif (b <= 5.6e-121)
		tmp = Float64(Float64(sqrt(Float64(Float64(b * b) + Float64(a * Float64(c * -3.0)))) - b) / Float64(a * 3.0));
	elseif ((b <= 2.2e-17) || !(b <= 2.3))
		tmp = Float64(-0.5 * Float64(c / b));
	else
		tmp = Float64(Float64(sqrt(Float64(-3.0 * Float64(a * c))) - b) / Float64(a * 3.0));
	end
	return tmp
end
function tmp_2 = code(a, b, c)
	tmp = 0.0;
	if (b <= -1e+147)
		tmp = -1.0 / ((a / b) * 1.5);
	elseif (b <= 5.6e-121)
		tmp = (sqrt(((b * b) + (a * (c * -3.0)))) - b) / (a * 3.0);
	elseif ((b <= 2.2e-17) || ~((b <= 2.3)))
		tmp = -0.5 * (c / b);
	else
		tmp = (sqrt((-3.0 * (a * c))) - b) / (a * 3.0);
	end
	tmp_2 = tmp;
end
code[a_, b_, c_] := If[LessEqual[b, -1e+147], N[(-1.0 / N[(N[(a / b), $MachinePrecision] * 1.5), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5.6e-121], N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] + N[(a * N[(c * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 3.0), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[b, 2.2e-17], N[Not[LessEqual[b, 2.3]], $MachinePrecision]], N[(-0.5 * N[(c / b), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[N[(-3.0 * N[(a * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 3.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -1 \cdot 10^{+147}:\\
\;\;\;\;\frac{-1}{\frac{a}{b} \cdot 1.5}\\

\mathbf{elif}\;b \leq 5.6 \cdot 10^{-121}:\\
\;\;\;\;\frac{\sqrt{b \cdot b + a \cdot \left(c \cdot -3\right)} - b}{a \cdot 3}\\

\mathbf{elif}\;b \leq 2.2 \cdot 10^{-17} \lor \neg \left(b \leq 2.3\right):\\
\;\;\;\;-0.5 \cdot \frac{c}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -9.9999999999999998e146

    1. Initial program 57.7%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. /-rgt-identity57.7%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{\color{blue}{\frac{3 \cdot a}{1}}} \]
      2. metadata-eval57.7%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{\frac{3 \cdot a}{\color{blue}{--1}}} \]
      3. associate-/l*57.7%

        \[\leadsto \color{blue}{\frac{\left(\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right) \cdot \left(--1\right)}{3 \cdot a}} \]
      4. associate-*r/57.6%

        \[\leadsto \color{blue}{\left(\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right) \cdot \frac{--1}{3 \cdot a}} \]
      5. *-commutative57.6%

        \[\leadsto \color{blue}{\frac{--1}{3 \cdot a} \cdot \left(\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)} \]
      6. associate-*l/57.7%

        \[\leadsto \color{blue}{\frac{\left(--1\right) \cdot \left(\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}{3 \cdot a}} \]
      7. associate-*r/57.7%

        \[\leadsto \color{blue}{\left(--1\right) \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}} \]
      8. metadata-eval57.7%

        \[\leadsto \color{blue}{1} \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      9. metadata-eval57.7%

        \[\leadsto \color{blue}{\frac{-1}{-1}} \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      10. times-frac57.7%

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}{-1 \cdot \left(3 \cdot a\right)}} \]
      11. neg-mul-157.7%

        \[\leadsto \frac{-1 \cdot \left(\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}{\color{blue}{-3 \cdot a}} \]
      12. distribute-rgt-neg-in57.7%

        \[\leadsto \frac{-1 \cdot \left(\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}{\color{blue}{3 \cdot \left(-a\right)}} \]
      13. times-frac57.7%

        \[\leadsto \color{blue}{\frac{-1}{3} \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{-a}} \]
      14. metadata-eval57.7%

        \[\leadsto \color{blue}{-0.3333333333333333} \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{-a} \]
      15. neg-mul-157.7%

        \[\leadsto -0.3333333333333333 \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{\color{blue}{-1 \cdot a}} \]
    3. Simplified57.7%

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{b - \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)}}{a}} \]
    4. Step-by-step derivation
      1. associate-*r/57.6%

        \[\leadsto \color{blue}{\frac{-0.3333333333333333 \cdot \left(b - \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)}\right)}{a}} \]
      2. associate-*r*57.6%

        \[\leadsto \frac{-0.3333333333333333 \cdot \left(b - \sqrt{\mathsf{fma}\left(b, b, \color{blue}{\left(a \cdot c\right) \cdot -3}\right)}\right)}{a} \]
      3. clear-num57.6%

        \[\leadsto \color{blue}{\frac{1}{\frac{a}{-0.3333333333333333 \cdot \left(b - \sqrt{\mathsf{fma}\left(b, b, \left(a \cdot c\right) \cdot -3\right)}\right)}}} \]
      4. frac-2neg57.6%

        \[\leadsto \color{blue}{\frac{-1}{-\frac{a}{-0.3333333333333333 \cdot \left(b - \sqrt{\mathsf{fma}\left(b, b, \left(a \cdot c\right) \cdot -3\right)}\right)}}} \]
      5. metadata-eval57.6%

        \[\leadsto \frac{\color{blue}{-1}}{-\frac{a}{-0.3333333333333333 \cdot \left(b - \sqrt{\mathsf{fma}\left(b, b, \left(a \cdot c\right) \cdot -3\right)}\right)}} \]
      6. *-un-lft-identity57.6%

        \[\leadsto \frac{-1}{-\frac{\color{blue}{1 \cdot a}}{-0.3333333333333333 \cdot \left(b - \sqrt{\mathsf{fma}\left(b, b, \left(a \cdot c\right) \cdot -3\right)}\right)}} \]
      7. associate-*r*57.6%

        \[\leadsto \frac{-1}{-\frac{1 \cdot a}{-0.3333333333333333 \cdot \left(b - \sqrt{\mathsf{fma}\left(b, b, \color{blue}{a \cdot \left(c \cdot -3\right)}\right)}\right)}} \]
      8. times-frac57.7%

        \[\leadsto \frac{-1}{-\color{blue}{\frac{1}{-0.3333333333333333} \cdot \frac{a}{b - \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)}}}} \]
      9. metadata-eval57.7%

        \[\leadsto \frac{-1}{-\color{blue}{-3} \cdot \frac{a}{b - \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)}}} \]
      10. fma-udef57.7%

        \[\leadsto \frac{-1}{--3 \cdot \frac{a}{b - \sqrt{\color{blue}{b \cdot b + a \cdot \left(c \cdot -3\right)}}}} \]
      11. add-sqr-sqrt38.2%

        \[\leadsto \frac{-1}{--3 \cdot \frac{a}{b - \sqrt{b \cdot b + \color{blue}{\sqrt{a \cdot \left(c \cdot -3\right)} \cdot \sqrt{a \cdot \left(c \cdot -3\right)}}}}} \]
    5. Applied egg-rr55.4%

      \[\leadsto \color{blue}{\frac{-1}{--3 \cdot \frac{a}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}}} \]
    6. Step-by-step derivation
      1. associate-*r/55.4%

        \[\leadsto \frac{-1}{-\color{blue}{\frac{-3 \cdot a}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}}} \]
      2. metadata-eval55.4%

        \[\leadsto \frac{-1}{-\frac{\color{blue}{\left(-3\right)} \cdot a}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}} \]
      3. distribute-lft-neg-in55.4%

        \[\leadsto \frac{-1}{-\frac{\color{blue}{-3 \cdot a}}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}} \]
      4. distribute-neg-frac55.4%

        \[\leadsto \frac{-1}{\color{blue}{\frac{-\left(-3 \cdot a\right)}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}}} \]
      5. *-commutative55.4%

        \[\leadsto \frac{-1}{\frac{-\left(-\color{blue}{a \cdot 3}\right)}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}} \]
      6. distribute-lft-neg-in55.4%

        \[\leadsto \frac{-1}{\frac{-\color{blue}{\left(-a\right) \cdot 3}}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}} \]
      7. distribute-lft-neg-out55.4%

        \[\leadsto \frac{-1}{\frac{\color{blue}{\left(-\left(-a\right)\right) \cdot 3}}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}} \]
      8. remove-double-neg55.4%

        \[\leadsto \frac{-1}{\frac{\color{blue}{a} \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}} \]
      9. associate-*r*55.4%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{\color{blue}{\left(a \cdot c\right) \cdot -3}}\right)}} \]
      10. *-commutative55.4%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{\color{blue}{-3 \cdot \left(a \cdot c\right)}}\right)}} \]
      11. metadata-eval55.4%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{\color{blue}{\left(-3\right)} \cdot \left(a \cdot c\right)}\right)}} \]
      12. distribute-lft-neg-in55.4%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{\color{blue}{-3 \cdot \left(a \cdot c\right)}}\right)}} \]
      13. associate-*r*55.4%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{-\color{blue}{\left(3 \cdot a\right) \cdot c}}\right)}} \]
      14. distribute-lft-neg-out55.4%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{\color{blue}{\left(-3 \cdot a\right) \cdot c}}\right)}} \]
      15. *-commutative55.4%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{\color{blue}{c \cdot \left(-3 \cdot a\right)}}\right)}} \]
      16. *-commutative55.4%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{c \cdot \left(-\color{blue}{a \cdot 3}\right)}\right)}} \]
      17. distribute-rgt-neg-in55.4%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{c \cdot \color{blue}{\left(a \cdot \left(-3\right)\right)}}\right)}} \]
      18. metadata-eval55.4%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{c \cdot \left(a \cdot \color{blue}{-3}\right)}\right)}} \]
    7. Simplified55.4%

      \[\leadsto \color{blue}{\frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{c \cdot \left(a \cdot -3\right)}\right)}}} \]
    8. Taylor expanded in b around -inf 95.0%

      \[\leadsto \frac{-1}{\color{blue}{1.5 \cdot \frac{a}{b}}} \]
    9. Step-by-step derivation
      1. *-commutative95.0%

        \[\leadsto \frac{-1}{\color{blue}{\frac{a}{b} \cdot 1.5}} \]
    10. Simplified95.0%

      \[\leadsto \frac{-1}{\color{blue}{\frac{a}{b} \cdot 1.5}} \]

    if -9.9999999999999998e146 < b < 5.6000000000000002e-121

    1. Initial program 78.8%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. associate-*r*78.8%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
      2. cancel-sign-sub-inv78.8%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{b \cdot b + \left(-3\right) \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
      3. metadata-eval78.8%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b + \color{blue}{-3} \cdot \left(a \cdot c\right)}}{3 \cdot a} \]
      4. *-commutative78.8%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b + \color{blue}{\left(a \cdot c\right) \cdot -3}}}{3 \cdot a} \]
      5. associate-*r*78.8%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b + \color{blue}{a \cdot \left(c \cdot -3\right)}}}{3 \cdot a} \]
    3. Applied egg-rr78.8%

      \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{b \cdot b + a \cdot \left(c \cdot -3\right)}}}{3 \cdot a} \]

    if 5.6000000000000002e-121 < b < 2.2e-17 or 2.2999999999999998 < b

    1. Initial program 19.5%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Taylor expanded in b around inf 84.6%

      \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b}} \]

    if 2.2e-17 < b < 2.2999999999999998

    1. Initial program 83.6%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Taylor expanded in b around 0 83.6%

      \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{-3 \cdot \left(c \cdot a\right)}}}{3 \cdot a} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification83.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1 \cdot 10^{+147}:\\ \;\;\;\;\frac{-1}{\frac{a}{b} \cdot 1.5}\\ \mathbf{elif}\;b \leq 5.6 \cdot 10^{-121}:\\ \;\;\;\;\frac{\sqrt{b \cdot b + a \cdot \left(c \cdot -3\right)} - b}{a \cdot 3}\\ \mathbf{elif}\;b \leq 2.2 \cdot 10^{-17} \lor \neg \left(b \leq 2.3\right):\\ \;\;\;\;-0.5 \cdot \frac{c}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{-3 \cdot \left(a \cdot c\right)} - b}{a \cdot 3}\\ \end{array} \]

Alternative 6: 67.1% accurate, 8.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -1 \cdot 10^{-309}:\\ \;\;\;\;-0.6666666666666666 \cdot \frac{b}{a} + \frac{c}{b} \cdot 0.5\\ \mathbf{else}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b}\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b -1e-309)
   (+ (* -0.6666666666666666 (/ b a)) (* (/ c b) 0.5))
   (* -0.5 (/ c b))))
double code(double a, double b, double c) {
	double tmp;
	if (b <= -1e-309) {
		tmp = (-0.6666666666666666 * (b / a)) + ((c / b) * 0.5);
	} else {
		tmp = -0.5 * (c / b);
	}
	return tmp;
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: tmp
    if (b <= (-1d-309)) then
        tmp = ((-0.6666666666666666d0) * (b / a)) + ((c / b) * 0.5d0)
    else
        tmp = (-0.5d0) * (c / b)
    end if
    code = tmp
end function
public static double code(double a, double b, double c) {
	double tmp;
	if (b <= -1e-309) {
		tmp = (-0.6666666666666666 * (b / a)) + ((c / b) * 0.5);
	} else {
		tmp = -0.5 * (c / b);
	}
	return tmp;
}
def code(a, b, c):
	tmp = 0
	if b <= -1e-309:
		tmp = (-0.6666666666666666 * (b / a)) + ((c / b) * 0.5)
	else:
		tmp = -0.5 * (c / b)
	return tmp
function code(a, b, c)
	tmp = 0.0
	if (b <= -1e-309)
		tmp = Float64(Float64(-0.6666666666666666 * Float64(b / a)) + Float64(Float64(c / b) * 0.5));
	else
		tmp = Float64(-0.5 * Float64(c / b));
	end
	return tmp
end
function tmp_2 = code(a, b, c)
	tmp = 0.0;
	if (b <= -1e-309)
		tmp = (-0.6666666666666666 * (b / a)) + ((c / b) * 0.5);
	else
		tmp = -0.5 * (c / b);
	end
	tmp_2 = tmp;
end
code[a_, b_, c_] := If[LessEqual[b, -1e-309], N[(N[(-0.6666666666666666 * N[(b / a), $MachinePrecision]), $MachinePrecision] + N[(N[(c / b), $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision], N[(-0.5 * N[(c / b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -1 \cdot 10^{-309}:\\
\;\;\;\;-0.6666666666666666 \cdot \frac{b}{a} + \frac{c}{b} \cdot 0.5\\

\mathbf{else}:\\
\;\;\;\;-0.5 \cdot \frac{c}{b}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -1.000000000000002e-309

    1. Initial program 74.3%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Taylor expanded in b around -inf 68.1%

      \[\leadsto \color{blue}{-0.6666666666666666 \cdot \frac{b}{a} + 0.5 \cdot \frac{c}{b}} \]

    if -1.000000000000002e-309 < b

    1. Initial program 36.2%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Taylor expanded in b around inf 61.4%

      \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification64.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1 \cdot 10^{-309}:\\ \;\;\;\;-0.6666666666666666 \cdot \frac{b}{a} + \frac{c}{b} \cdot 0.5\\ \mathbf{else}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b}\\ \end{array} \]

Alternative 7: 66.9% accurate, 12.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -1 \cdot 10^{-309}:\\ \;\;\;\;\frac{-1}{\frac{a \cdot 1.5}{b}}\\ \mathbf{else}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b}\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b -1e-309) (/ -1.0 (/ (* a 1.5) b)) (* -0.5 (/ c b))))
double code(double a, double b, double c) {
	double tmp;
	if (b <= -1e-309) {
		tmp = -1.0 / ((a * 1.5) / b);
	} else {
		tmp = -0.5 * (c / b);
	}
	return tmp;
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: tmp
    if (b <= (-1d-309)) then
        tmp = (-1.0d0) / ((a * 1.5d0) / b)
    else
        tmp = (-0.5d0) * (c / b)
    end if
    code = tmp
end function
public static double code(double a, double b, double c) {
	double tmp;
	if (b <= -1e-309) {
		tmp = -1.0 / ((a * 1.5) / b);
	} else {
		tmp = -0.5 * (c / b);
	}
	return tmp;
}
def code(a, b, c):
	tmp = 0
	if b <= -1e-309:
		tmp = -1.0 / ((a * 1.5) / b)
	else:
		tmp = -0.5 * (c / b)
	return tmp
function code(a, b, c)
	tmp = 0.0
	if (b <= -1e-309)
		tmp = Float64(-1.0 / Float64(Float64(a * 1.5) / b));
	else
		tmp = Float64(-0.5 * Float64(c / b));
	end
	return tmp
end
function tmp_2 = code(a, b, c)
	tmp = 0.0;
	if (b <= -1e-309)
		tmp = -1.0 / ((a * 1.5) / b);
	else
		tmp = -0.5 * (c / b);
	end
	tmp_2 = tmp;
end
code[a_, b_, c_] := If[LessEqual[b, -1e-309], N[(-1.0 / N[(N[(a * 1.5), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision], N[(-0.5 * N[(c / b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -1 \cdot 10^{-309}:\\
\;\;\;\;\frac{-1}{\frac{a \cdot 1.5}{b}}\\

\mathbf{else}:\\
\;\;\;\;-0.5 \cdot \frac{c}{b}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -1.000000000000002e-309

    1. Initial program 74.3%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. /-rgt-identity74.3%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{\color{blue}{\frac{3 \cdot a}{1}}} \]
      2. metadata-eval74.3%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{\frac{3 \cdot a}{\color{blue}{--1}}} \]
      3. associate-/l*74.3%

        \[\leadsto \color{blue}{\frac{\left(\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right) \cdot \left(--1\right)}{3 \cdot a}} \]
      4. associate-*r/74.3%

        \[\leadsto \color{blue}{\left(\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right) \cdot \frac{--1}{3 \cdot a}} \]
      5. *-commutative74.3%

        \[\leadsto \color{blue}{\frac{--1}{3 \cdot a} \cdot \left(\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)} \]
      6. associate-*l/74.3%

        \[\leadsto \color{blue}{\frac{\left(--1\right) \cdot \left(\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}{3 \cdot a}} \]
      7. associate-*r/74.3%

        \[\leadsto \color{blue}{\left(--1\right) \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}} \]
      8. metadata-eval74.3%

        \[\leadsto \color{blue}{1} \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      9. metadata-eval74.3%

        \[\leadsto \color{blue}{\frac{-1}{-1}} \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      10. times-frac74.3%

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}{-1 \cdot \left(3 \cdot a\right)}} \]
      11. neg-mul-174.3%

        \[\leadsto \frac{-1 \cdot \left(\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}{\color{blue}{-3 \cdot a}} \]
      12. distribute-rgt-neg-in74.3%

        \[\leadsto \frac{-1 \cdot \left(\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}{\color{blue}{3 \cdot \left(-a\right)}} \]
      13. times-frac74.1%

        \[\leadsto \color{blue}{\frac{-1}{3} \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{-a}} \]
      14. metadata-eval74.1%

        \[\leadsto \color{blue}{-0.3333333333333333} \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{-a} \]
      15. neg-mul-174.1%

        \[\leadsto -0.3333333333333333 \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{\color{blue}{-1 \cdot a}} \]
    3. Simplified74.2%

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{b - \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)}}{a}} \]
    4. Step-by-step derivation
      1. associate-*r/74.2%

        \[\leadsto \color{blue}{\frac{-0.3333333333333333 \cdot \left(b - \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)}\right)}{a}} \]
      2. associate-*r*74.2%

        \[\leadsto \frac{-0.3333333333333333 \cdot \left(b - \sqrt{\mathsf{fma}\left(b, b, \color{blue}{\left(a \cdot c\right) \cdot -3}\right)}\right)}{a} \]
      3. clear-num74.2%

        \[\leadsto \color{blue}{\frac{1}{\frac{a}{-0.3333333333333333 \cdot \left(b - \sqrt{\mathsf{fma}\left(b, b, \left(a \cdot c\right) \cdot -3\right)}\right)}}} \]
      4. frac-2neg74.2%

        \[\leadsto \color{blue}{\frac{-1}{-\frac{a}{-0.3333333333333333 \cdot \left(b - \sqrt{\mathsf{fma}\left(b, b, \left(a \cdot c\right) \cdot -3\right)}\right)}}} \]
      5. metadata-eval74.2%

        \[\leadsto \frac{\color{blue}{-1}}{-\frac{a}{-0.3333333333333333 \cdot \left(b - \sqrt{\mathsf{fma}\left(b, b, \left(a \cdot c\right) \cdot -3\right)}\right)}} \]
      6. *-un-lft-identity74.2%

        \[\leadsto \frac{-1}{-\frac{\color{blue}{1 \cdot a}}{-0.3333333333333333 \cdot \left(b - \sqrt{\mathsf{fma}\left(b, b, \left(a \cdot c\right) \cdot -3\right)}\right)}} \]
      7. associate-*r*74.2%

        \[\leadsto \frac{-1}{-\frac{1 \cdot a}{-0.3333333333333333 \cdot \left(b - \sqrt{\mathsf{fma}\left(b, b, \color{blue}{a \cdot \left(c \cdot -3\right)}\right)}\right)}} \]
      8. times-frac74.2%

        \[\leadsto \frac{-1}{-\color{blue}{\frac{1}{-0.3333333333333333} \cdot \frac{a}{b - \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)}}}} \]
      9. metadata-eval74.2%

        \[\leadsto \frac{-1}{-\color{blue}{-3} \cdot \frac{a}{b - \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)}}} \]
      10. fma-udef74.2%

        \[\leadsto \frac{-1}{--3 \cdot \frac{a}{b - \sqrt{\color{blue}{b \cdot b + a \cdot \left(c \cdot -3\right)}}}} \]
      11. add-sqr-sqrt56.3%

        \[\leadsto \frac{-1}{--3 \cdot \frac{a}{b - \sqrt{b \cdot b + \color{blue}{\sqrt{a \cdot \left(c \cdot -3\right)} \cdot \sqrt{a \cdot \left(c \cdot -3\right)}}}}} \]
    5. Applied egg-rr64.7%

      \[\leadsto \color{blue}{\frac{-1}{--3 \cdot \frac{a}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}}} \]
    6. Step-by-step derivation
      1. associate-*r/64.8%

        \[\leadsto \frac{-1}{-\color{blue}{\frac{-3 \cdot a}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}}} \]
      2. metadata-eval64.8%

        \[\leadsto \frac{-1}{-\frac{\color{blue}{\left(-3\right)} \cdot a}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}} \]
      3. distribute-lft-neg-in64.8%

        \[\leadsto \frac{-1}{-\frac{\color{blue}{-3 \cdot a}}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}} \]
      4. distribute-neg-frac64.8%

        \[\leadsto \frac{-1}{\color{blue}{\frac{-\left(-3 \cdot a\right)}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}}} \]
      5. *-commutative64.8%

        \[\leadsto \frac{-1}{\frac{-\left(-\color{blue}{a \cdot 3}\right)}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}} \]
      6. distribute-lft-neg-in64.8%

        \[\leadsto \frac{-1}{\frac{-\color{blue}{\left(-a\right) \cdot 3}}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}} \]
      7. distribute-lft-neg-out64.8%

        \[\leadsto \frac{-1}{\frac{\color{blue}{\left(-\left(-a\right)\right) \cdot 3}}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}} \]
      8. remove-double-neg64.8%

        \[\leadsto \frac{-1}{\frac{\color{blue}{a} \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}} \]
      9. associate-*r*64.7%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{\color{blue}{\left(a \cdot c\right) \cdot -3}}\right)}} \]
      10. *-commutative64.7%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{\color{blue}{-3 \cdot \left(a \cdot c\right)}}\right)}} \]
      11. metadata-eval64.7%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{\color{blue}{\left(-3\right)} \cdot \left(a \cdot c\right)}\right)}} \]
      12. distribute-lft-neg-in64.7%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{\color{blue}{-3 \cdot \left(a \cdot c\right)}}\right)}} \]
      13. associate-*r*64.8%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{-\color{blue}{\left(3 \cdot a\right) \cdot c}}\right)}} \]
      14. distribute-lft-neg-out64.8%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{\color{blue}{\left(-3 \cdot a\right) \cdot c}}\right)}} \]
      15. *-commutative64.8%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{\color{blue}{c \cdot \left(-3 \cdot a\right)}}\right)}} \]
      16. *-commutative64.8%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{c \cdot \left(-\color{blue}{a \cdot 3}\right)}\right)}} \]
      17. distribute-rgt-neg-in64.8%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{c \cdot \color{blue}{\left(a \cdot \left(-3\right)\right)}}\right)}} \]
      18. metadata-eval64.8%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{c \cdot \left(a \cdot \color{blue}{-3}\right)}\right)}} \]
    7. Simplified64.8%

      \[\leadsto \color{blue}{\frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{c \cdot \left(a \cdot -3\right)}\right)}}} \]
    8. Taylor expanded in b around -inf 67.7%

      \[\leadsto \frac{-1}{\color{blue}{1.5 \cdot \frac{a}{b}}} \]
    9. Step-by-step derivation
      1. *-commutative67.7%

        \[\leadsto \frac{-1}{\color{blue}{\frac{a}{b} \cdot 1.5}} \]
    10. Simplified67.7%

      \[\leadsto \frac{-1}{\color{blue}{\frac{a}{b} \cdot 1.5}} \]
    11. Step-by-step derivation
      1. associate-*l/67.7%

        \[\leadsto \frac{-1}{\color{blue}{\frac{a \cdot 1.5}{b}}} \]
    12. Applied egg-rr67.7%

      \[\leadsto \frac{-1}{\color{blue}{\frac{a \cdot 1.5}{b}}} \]

    if -1.000000000000002e-309 < b

    1. Initial program 36.2%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Taylor expanded in b around inf 61.4%

      \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification64.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1 \cdot 10^{-309}:\\ \;\;\;\;\frac{-1}{\frac{a \cdot 1.5}{b}}\\ \mathbf{else}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b}\\ \end{array} \]

Alternative 8: 67.0% accurate, 12.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -1 \cdot 10^{-309}:\\ \;\;\;\;\frac{b \cdot -2}{a \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b}\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b -1e-309) (/ (* b -2.0) (* a 3.0)) (* -0.5 (/ c b))))
double code(double a, double b, double c) {
	double tmp;
	if (b <= -1e-309) {
		tmp = (b * -2.0) / (a * 3.0);
	} else {
		tmp = -0.5 * (c / b);
	}
	return tmp;
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: tmp
    if (b <= (-1d-309)) then
        tmp = (b * (-2.0d0)) / (a * 3.0d0)
    else
        tmp = (-0.5d0) * (c / b)
    end if
    code = tmp
end function
public static double code(double a, double b, double c) {
	double tmp;
	if (b <= -1e-309) {
		tmp = (b * -2.0) / (a * 3.0);
	} else {
		tmp = -0.5 * (c / b);
	}
	return tmp;
}
def code(a, b, c):
	tmp = 0
	if b <= -1e-309:
		tmp = (b * -2.0) / (a * 3.0)
	else:
		tmp = -0.5 * (c / b)
	return tmp
function code(a, b, c)
	tmp = 0.0
	if (b <= -1e-309)
		tmp = Float64(Float64(b * -2.0) / Float64(a * 3.0));
	else
		tmp = Float64(-0.5 * Float64(c / b));
	end
	return tmp
end
function tmp_2 = code(a, b, c)
	tmp = 0.0;
	if (b <= -1e-309)
		tmp = (b * -2.0) / (a * 3.0);
	else
		tmp = -0.5 * (c / b);
	end
	tmp_2 = tmp;
end
code[a_, b_, c_] := If[LessEqual[b, -1e-309], N[(N[(b * -2.0), $MachinePrecision] / N[(a * 3.0), $MachinePrecision]), $MachinePrecision], N[(-0.5 * N[(c / b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -1 \cdot 10^{-309}:\\
\;\;\;\;\frac{b \cdot -2}{a \cdot 3}\\

\mathbf{else}:\\
\;\;\;\;-0.5 \cdot \frac{c}{b}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -1.000000000000002e-309

    1. Initial program 74.3%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Taylor expanded in b around -inf 67.8%

      \[\leadsto \frac{\color{blue}{-2 \cdot b}}{3 \cdot a} \]
    3. Step-by-step derivation
      1. *-commutative67.8%

        \[\leadsto \frac{\color{blue}{b \cdot -2}}{3 \cdot a} \]
    4. Simplified67.8%

      \[\leadsto \frac{\color{blue}{b \cdot -2}}{3 \cdot a} \]

    if -1.000000000000002e-309 < b

    1. Initial program 36.2%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Taylor expanded in b around inf 61.4%

      \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification64.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1 \cdot 10^{-309}:\\ \;\;\;\;\frac{b \cdot -2}{a \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b}\\ \end{array} \]

Alternative 9: 66.9% accurate, 16.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -1 \cdot 10^{-309}:\\ \;\;\;\;-0.6666666666666666 \cdot \frac{b}{a}\\ \mathbf{else}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b}\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b -1e-309) (* -0.6666666666666666 (/ b a)) (* -0.5 (/ c b))))
double code(double a, double b, double c) {
	double tmp;
	if (b <= -1e-309) {
		tmp = -0.6666666666666666 * (b / a);
	} else {
		tmp = -0.5 * (c / b);
	}
	return tmp;
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: tmp
    if (b <= (-1d-309)) then
        tmp = (-0.6666666666666666d0) * (b / a)
    else
        tmp = (-0.5d0) * (c / b)
    end if
    code = tmp
end function
public static double code(double a, double b, double c) {
	double tmp;
	if (b <= -1e-309) {
		tmp = -0.6666666666666666 * (b / a);
	} else {
		tmp = -0.5 * (c / b);
	}
	return tmp;
}
def code(a, b, c):
	tmp = 0
	if b <= -1e-309:
		tmp = -0.6666666666666666 * (b / a)
	else:
		tmp = -0.5 * (c / b)
	return tmp
function code(a, b, c)
	tmp = 0.0
	if (b <= -1e-309)
		tmp = Float64(-0.6666666666666666 * Float64(b / a));
	else
		tmp = Float64(-0.5 * Float64(c / b));
	end
	return tmp
end
function tmp_2 = code(a, b, c)
	tmp = 0.0;
	if (b <= -1e-309)
		tmp = -0.6666666666666666 * (b / a);
	else
		tmp = -0.5 * (c / b);
	end
	tmp_2 = tmp;
end
code[a_, b_, c_] := If[LessEqual[b, -1e-309], N[(-0.6666666666666666 * N[(b / a), $MachinePrecision]), $MachinePrecision], N[(-0.5 * N[(c / b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -1 \cdot 10^{-309}:\\
\;\;\;\;-0.6666666666666666 \cdot \frac{b}{a}\\

\mathbf{else}:\\
\;\;\;\;-0.5 \cdot \frac{c}{b}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -1.000000000000002e-309

    1. Initial program 74.3%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Taylor expanded in b around -inf 67.7%

      \[\leadsto \color{blue}{-0.6666666666666666 \cdot \frac{b}{a}} \]
    3. Step-by-step derivation
      1. *-commutative67.7%

        \[\leadsto \color{blue}{\frac{b}{a} \cdot -0.6666666666666666} \]
    4. Simplified67.7%

      \[\leadsto \color{blue}{\frac{b}{a} \cdot -0.6666666666666666} \]

    if -1.000000000000002e-309 < b

    1. Initial program 36.2%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Taylor expanded in b around inf 61.4%

      \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification64.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1 \cdot 10^{-309}:\\ \;\;\;\;-0.6666666666666666 \cdot \frac{b}{a}\\ \mathbf{else}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b}\\ \end{array} \]

Alternative 10: 66.9% accurate, 16.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -1 \cdot 10^{-309}:\\ \;\;\;\;\frac{b}{\frac{a}{-0.6666666666666666}}\\ \mathbf{else}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b}\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b -1e-309) (/ b (/ a -0.6666666666666666)) (* -0.5 (/ c b))))
double code(double a, double b, double c) {
	double tmp;
	if (b <= -1e-309) {
		tmp = b / (a / -0.6666666666666666);
	} else {
		tmp = -0.5 * (c / b);
	}
	return tmp;
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: tmp
    if (b <= (-1d-309)) then
        tmp = b / (a / (-0.6666666666666666d0))
    else
        tmp = (-0.5d0) * (c / b)
    end if
    code = tmp
end function
public static double code(double a, double b, double c) {
	double tmp;
	if (b <= -1e-309) {
		tmp = b / (a / -0.6666666666666666);
	} else {
		tmp = -0.5 * (c / b);
	}
	return tmp;
}
def code(a, b, c):
	tmp = 0
	if b <= -1e-309:
		tmp = b / (a / -0.6666666666666666)
	else:
		tmp = -0.5 * (c / b)
	return tmp
function code(a, b, c)
	tmp = 0.0
	if (b <= -1e-309)
		tmp = Float64(b / Float64(a / -0.6666666666666666));
	else
		tmp = Float64(-0.5 * Float64(c / b));
	end
	return tmp
end
function tmp_2 = code(a, b, c)
	tmp = 0.0;
	if (b <= -1e-309)
		tmp = b / (a / -0.6666666666666666);
	else
		tmp = -0.5 * (c / b);
	end
	tmp_2 = tmp;
end
code[a_, b_, c_] := If[LessEqual[b, -1e-309], N[(b / N[(a / -0.6666666666666666), $MachinePrecision]), $MachinePrecision], N[(-0.5 * N[(c / b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -1 \cdot 10^{-309}:\\
\;\;\;\;\frac{b}{\frac{a}{-0.6666666666666666}}\\

\mathbf{else}:\\
\;\;\;\;-0.5 \cdot \frac{c}{b}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -1.000000000000002e-309

    1. Initial program 74.3%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. /-rgt-identity74.3%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{\color{blue}{\frac{3 \cdot a}{1}}} \]
      2. metadata-eval74.3%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{\frac{3 \cdot a}{\color{blue}{--1}}} \]
      3. associate-/l*74.3%

        \[\leadsto \color{blue}{\frac{\left(\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right) \cdot \left(--1\right)}{3 \cdot a}} \]
      4. associate-*r/74.3%

        \[\leadsto \color{blue}{\left(\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right) \cdot \frac{--1}{3 \cdot a}} \]
      5. *-commutative74.3%

        \[\leadsto \color{blue}{\frac{--1}{3 \cdot a} \cdot \left(\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)} \]
      6. associate-*l/74.3%

        \[\leadsto \color{blue}{\frac{\left(--1\right) \cdot \left(\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}{3 \cdot a}} \]
      7. associate-*r/74.3%

        \[\leadsto \color{blue}{\left(--1\right) \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}} \]
      8. metadata-eval74.3%

        \[\leadsto \color{blue}{1} \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      9. metadata-eval74.3%

        \[\leadsto \color{blue}{\frac{-1}{-1}} \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      10. times-frac74.3%

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}{-1 \cdot \left(3 \cdot a\right)}} \]
      11. neg-mul-174.3%

        \[\leadsto \frac{-1 \cdot \left(\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}{\color{blue}{-3 \cdot a}} \]
      12. distribute-rgt-neg-in74.3%

        \[\leadsto \frac{-1 \cdot \left(\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}{\color{blue}{3 \cdot \left(-a\right)}} \]
      13. times-frac74.1%

        \[\leadsto \color{blue}{\frac{-1}{3} \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{-a}} \]
      14. metadata-eval74.1%

        \[\leadsto \color{blue}{-0.3333333333333333} \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{-a} \]
      15. neg-mul-174.1%

        \[\leadsto -0.3333333333333333 \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{\color{blue}{-1 \cdot a}} \]
    3. Simplified74.2%

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{b - \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)}}{a}} \]
    4. Step-by-step derivation
      1. associate-*r/74.2%

        \[\leadsto \color{blue}{\frac{-0.3333333333333333 \cdot \left(b - \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)}\right)}{a}} \]
      2. associate-*r*74.2%

        \[\leadsto \frac{-0.3333333333333333 \cdot \left(b - \sqrt{\mathsf{fma}\left(b, b, \color{blue}{\left(a \cdot c\right) \cdot -3}\right)}\right)}{a} \]
      3. clear-num74.2%

        \[\leadsto \color{blue}{\frac{1}{\frac{a}{-0.3333333333333333 \cdot \left(b - \sqrt{\mathsf{fma}\left(b, b, \left(a \cdot c\right) \cdot -3\right)}\right)}}} \]
      4. frac-2neg74.2%

        \[\leadsto \color{blue}{\frac{-1}{-\frac{a}{-0.3333333333333333 \cdot \left(b - \sqrt{\mathsf{fma}\left(b, b, \left(a \cdot c\right) \cdot -3\right)}\right)}}} \]
      5. metadata-eval74.2%

        \[\leadsto \frac{\color{blue}{-1}}{-\frac{a}{-0.3333333333333333 \cdot \left(b - \sqrt{\mathsf{fma}\left(b, b, \left(a \cdot c\right) \cdot -3\right)}\right)}} \]
      6. *-un-lft-identity74.2%

        \[\leadsto \frac{-1}{-\frac{\color{blue}{1 \cdot a}}{-0.3333333333333333 \cdot \left(b - \sqrt{\mathsf{fma}\left(b, b, \left(a \cdot c\right) \cdot -3\right)}\right)}} \]
      7. associate-*r*74.2%

        \[\leadsto \frac{-1}{-\frac{1 \cdot a}{-0.3333333333333333 \cdot \left(b - \sqrt{\mathsf{fma}\left(b, b, \color{blue}{a \cdot \left(c \cdot -3\right)}\right)}\right)}} \]
      8. times-frac74.2%

        \[\leadsto \frac{-1}{-\color{blue}{\frac{1}{-0.3333333333333333} \cdot \frac{a}{b - \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)}}}} \]
      9. metadata-eval74.2%

        \[\leadsto \frac{-1}{-\color{blue}{-3} \cdot \frac{a}{b - \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)}}} \]
      10. fma-udef74.2%

        \[\leadsto \frac{-1}{--3 \cdot \frac{a}{b - \sqrt{\color{blue}{b \cdot b + a \cdot \left(c \cdot -3\right)}}}} \]
      11. add-sqr-sqrt56.3%

        \[\leadsto \frac{-1}{--3 \cdot \frac{a}{b - \sqrt{b \cdot b + \color{blue}{\sqrt{a \cdot \left(c \cdot -3\right)} \cdot \sqrt{a \cdot \left(c \cdot -3\right)}}}}} \]
    5. Applied egg-rr64.7%

      \[\leadsto \color{blue}{\frac{-1}{--3 \cdot \frac{a}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}}} \]
    6. Step-by-step derivation
      1. associate-*r/64.8%

        \[\leadsto \frac{-1}{-\color{blue}{\frac{-3 \cdot a}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}}} \]
      2. metadata-eval64.8%

        \[\leadsto \frac{-1}{-\frac{\color{blue}{\left(-3\right)} \cdot a}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}} \]
      3. distribute-lft-neg-in64.8%

        \[\leadsto \frac{-1}{-\frac{\color{blue}{-3 \cdot a}}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}} \]
      4. distribute-neg-frac64.8%

        \[\leadsto \frac{-1}{\color{blue}{\frac{-\left(-3 \cdot a\right)}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}}} \]
      5. *-commutative64.8%

        \[\leadsto \frac{-1}{\frac{-\left(-\color{blue}{a \cdot 3}\right)}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}} \]
      6. distribute-lft-neg-in64.8%

        \[\leadsto \frac{-1}{\frac{-\color{blue}{\left(-a\right) \cdot 3}}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}} \]
      7. distribute-lft-neg-out64.8%

        \[\leadsto \frac{-1}{\frac{\color{blue}{\left(-\left(-a\right)\right) \cdot 3}}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}} \]
      8. remove-double-neg64.8%

        \[\leadsto \frac{-1}{\frac{\color{blue}{a} \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}} \]
      9. associate-*r*64.7%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{\color{blue}{\left(a \cdot c\right) \cdot -3}}\right)}} \]
      10. *-commutative64.7%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{\color{blue}{-3 \cdot \left(a \cdot c\right)}}\right)}} \]
      11. metadata-eval64.7%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{\color{blue}{\left(-3\right)} \cdot \left(a \cdot c\right)}\right)}} \]
      12. distribute-lft-neg-in64.7%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{\color{blue}{-3 \cdot \left(a \cdot c\right)}}\right)}} \]
      13. associate-*r*64.8%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{-\color{blue}{\left(3 \cdot a\right) \cdot c}}\right)}} \]
      14. distribute-lft-neg-out64.8%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{\color{blue}{\left(-3 \cdot a\right) \cdot c}}\right)}} \]
      15. *-commutative64.8%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{\color{blue}{c \cdot \left(-3 \cdot a\right)}}\right)}} \]
      16. *-commutative64.8%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{c \cdot \left(-\color{blue}{a \cdot 3}\right)}\right)}} \]
      17. distribute-rgt-neg-in64.8%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{c \cdot \color{blue}{\left(a \cdot \left(-3\right)\right)}}\right)}} \]
      18. metadata-eval64.8%

        \[\leadsto \frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{c \cdot \left(a \cdot \color{blue}{-3}\right)}\right)}} \]
    7. Simplified64.8%

      \[\leadsto \color{blue}{\frac{-1}{\frac{a \cdot 3}{b - \mathsf{hypot}\left(b, \sqrt{c \cdot \left(a \cdot -3\right)}\right)}}} \]
    8. Taylor expanded in b around -inf 67.7%

      \[\leadsto \color{blue}{-0.6666666666666666 \cdot \frac{b}{a}} \]
    9. Step-by-step derivation
      1. *-commutative67.7%

        \[\leadsto \color{blue}{\frac{b}{a} \cdot -0.6666666666666666} \]
      2. associate-/r/67.7%

        \[\leadsto \color{blue}{\frac{b}{\frac{a}{-0.6666666666666666}}} \]
    10. Simplified67.7%

      \[\leadsto \color{blue}{\frac{b}{\frac{a}{-0.6666666666666666}}} \]

    if -1.000000000000002e-309 < b

    1. Initial program 36.2%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Taylor expanded in b around inf 61.4%

      \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification64.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1 \cdot 10^{-309}:\\ \;\;\;\;\frac{b}{\frac{a}{-0.6666666666666666}}\\ \mathbf{else}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b}\\ \end{array} \]

Alternative 11: 35.0% accurate, 23.2× speedup?

\[\begin{array}{l} \\ -0.5 \cdot \frac{c}{b} \end{array} \]
(FPCore (a b c) :precision binary64 (* -0.5 (/ c b)))
double code(double a, double b, double c) {
	return -0.5 * (c / b);
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    code = (-0.5d0) * (c / b)
end function
public static double code(double a, double b, double c) {
	return -0.5 * (c / b);
}
def code(a, b, c):
	return -0.5 * (c / b)
function code(a, b, c)
	return Float64(-0.5 * Float64(c / b))
end
function tmp = code(a, b, c)
	tmp = -0.5 * (c / b);
end
code[a_, b_, c_] := N[(-0.5 * N[(c / b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
-0.5 \cdot \frac{c}{b}
\end{array}
Derivation
  1. Initial program 54.7%

    \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
  2. Taylor expanded in b around inf 32.7%

    \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b}} \]
  3. Final simplification32.7%

    \[\leadsto -0.5 \cdot \frac{c}{b} \]

Alternative 12: 10.9% accurate, 116.0× speedup?

\[\begin{array}{l} \\ 0 \end{array} \]
(FPCore (a b c) :precision binary64 0.0)
double code(double a, double b, double c) {
	return 0.0;
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    code = 0.0d0
end function
public static double code(double a, double b, double c) {
	return 0.0;
}
def code(a, b, c):
	return 0.0
function code(a, b, c)
	return 0.0
end
function tmp = code(a, b, c)
	tmp = 0.0;
end
code[a_, b_, c_] := 0.0
\begin{array}{l}

\\
0
\end{array}
Derivation
  1. Initial program 54.7%

    \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
  2. Taylor expanded in b around inf 30.1%

    \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{{b}^{2}}}}{3 \cdot a} \]
  3. Step-by-step derivation
    1. unpow230.1%

      \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{b \cdot b}}}{3 \cdot a} \]
  4. Simplified30.1%

    \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{b \cdot b}}}{3 \cdot a} \]
  5. Taylor expanded in b around 0 12.1%

    \[\leadsto \color{blue}{0} \]
  6. Final simplification12.1%

    \[\leadsto 0 \]

Reproduce

?
herbie shell --seed 2023224 
(FPCore (a b c)
  :name "Cubic critical"
  :precision binary64
  (/ (+ (- b) (sqrt (- (* b b) (* (* 3.0 a) c)))) (* 3.0 a)))