Cubic critical, narrow range

Percentage Accurate: 55.7% → 91.4%
Time: 16.6s
Alternatives: 12
Speedup: 23.2×

Specification

?
\[\left(\left(1.0536712127723509 \cdot 10^{-8} < a \land a < 94906265.62425156\right) \land \left(1.0536712127723509 \cdot 10^{-8} < b \land b < 94906265.62425156\right)\right) \land \left(1.0536712127723509 \cdot 10^{-8} < c \land c < 94906265.62425156\right)\]
\[\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: 55.7% 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: 91.4% accurate, 0.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\\ t_1 := \frac{{c}^{4}}{{b}^{8}}\\ t_2 := \frac{{c}^{3}}{{b}^{6}} \cdot -1.4765625\\ t_3 := \frac{{c}^{2}}{{b}^{4}} \cdot -0.84375\\ \mathbf{if}\;\frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b}{3 \cdot a} \leq -0.03:\\ \;\;\;\;\frac{\frac{t_0 - {b}^{2}}{b + \sqrt{t_0}}}{3 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-0.5, \frac{c}{b}, 0.3333333333333333 \cdot \left(a \cdot \mathsf{fma}\left(0.5625, \frac{{c}^{2}}{{b}^{3}}, 2 \cdot \left(b \cdot t_3\right)\right) + \left({a}^{2} \cdot \mathsf{fma}\left(-1.5, \frac{c}{\frac{b}{t_3}}, 2 \cdot \left(b \cdot t_2\right)\right) + {a}^{3} \cdot \mathsf{fma}\left(-1.5, \frac{c \cdot t_2}{b}, \mathsf{fma}\left(2, b \cdot \left(t_1 \cdot -5.37890625 + t_1 \cdot 2.33349609375\right), b \cdot {t_3}^{2}\right)\right)\right)\right)\right)\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (let* ((t_0 (fma a (* c -3.0) (pow b 2.0)))
        (t_1 (/ (pow c 4.0) (pow b 8.0)))
        (t_2 (* (/ (pow c 3.0) (pow b 6.0)) -1.4765625))
        (t_3 (* (/ (pow c 2.0) (pow b 4.0)) -0.84375)))
   (if (<= (/ (- (sqrt (- (* b b) (* (* 3.0 a) c))) b) (* 3.0 a)) -0.03)
     (/ (/ (- t_0 (pow b 2.0)) (+ b (sqrt t_0))) (* 3.0 a))
     (fma
      -0.5
      (/ c b)
      (*
       0.3333333333333333
       (+
        (* a (fma 0.5625 (/ (pow c 2.0) (pow b 3.0)) (* 2.0 (* b t_3))))
        (+
         (* (pow a 2.0) (fma -1.5 (/ c (/ b t_3)) (* 2.0 (* b t_2))))
         (*
          (pow a 3.0)
          (fma
           -1.5
           (/ (* c t_2) b)
           (fma
            2.0
            (* b (+ (* t_1 -5.37890625) (* t_1 2.33349609375)))
            (* b (pow t_3 2.0))))))))))))
double code(double a, double b, double c) {
	double t_0 = fma(a, (c * -3.0), pow(b, 2.0));
	double t_1 = pow(c, 4.0) / pow(b, 8.0);
	double t_2 = (pow(c, 3.0) / pow(b, 6.0)) * -1.4765625;
	double t_3 = (pow(c, 2.0) / pow(b, 4.0)) * -0.84375;
	double tmp;
	if (((sqrt(((b * b) - ((3.0 * a) * c))) - b) / (3.0 * a)) <= -0.03) {
		tmp = ((t_0 - pow(b, 2.0)) / (b + sqrt(t_0))) / (3.0 * a);
	} else {
		tmp = fma(-0.5, (c / b), (0.3333333333333333 * ((a * fma(0.5625, (pow(c, 2.0) / pow(b, 3.0)), (2.0 * (b * t_3)))) + ((pow(a, 2.0) * fma(-1.5, (c / (b / t_3)), (2.0 * (b * t_2)))) + (pow(a, 3.0) * fma(-1.5, ((c * t_2) / b), fma(2.0, (b * ((t_1 * -5.37890625) + (t_1 * 2.33349609375))), (b * pow(t_3, 2.0)))))))));
	}
	return tmp;
}
function code(a, b, c)
	t_0 = fma(a, Float64(c * -3.0), (b ^ 2.0))
	t_1 = Float64((c ^ 4.0) / (b ^ 8.0))
	t_2 = Float64(Float64((c ^ 3.0) / (b ^ 6.0)) * -1.4765625)
	t_3 = Float64(Float64((c ^ 2.0) / (b ^ 4.0)) * -0.84375)
	tmp = 0.0
	if (Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(Float64(3.0 * a) * c))) - b) / Float64(3.0 * a)) <= -0.03)
		tmp = Float64(Float64(Float64(t_0 - (b ^ 2.0)) / Float64(b + sqrt(t_0))) / Float64(3.0 * a));
	else
		tmp = fma(-0.5, Float64(c / b), Float64(0.3333333333333333 * Float64(Float64(a * fma(0.5625, Float64((c ^ 2.0) / (b ^ 3.0)), Float64(2.0 * Float64(b * t_3)))) + Float64(Float64((a ^ 2.0) * fma(-1.5, Float64(c / Float64(b / t_3)), Float64(2.0 * Float64(b * t_2)))) + Float64((a ^ 3.0) * fma(-1.5, Float64(Float64(c * t_2) / b), fma(2.0, Float64(b * Float64(Float64(t_1 * -5.37890625) + Float64(t_1 * 2.33349609375))), Float64(b * (t_3 ^ 2.0)))))))));
	end
	return tmp
end
code[a_, b_, c_] := Block[{t$95$0 = N[(a * N[(c * -3.0), $MachinePrecision] + N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Power[c, 4.0], $MachinePrecision] / N[Power[b, 8.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[Power[c, 3.0], $MachinePrecision] / N[Power[b, 6.0], $MachinePrecision]), $MachinePrecision] * -1.4765625), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[Power[c, 2.0], $MachinePrecision] / N[Power[b, 4.0], $MachinePrecision]), $MachinePrecision] * -0.84375), $MachinePrecision]}, If[LessEqual[N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(N[(3.0 * a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision], -0.03], N[(N[(N[(t$95$0 - N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision] / N[(b + N[Sqrt[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision], N[(-0.5 * N[(c / b), $MachinePrecision] + N[(0.3333333333333333 * N[(N[(a * N[(0.5625 * N[(N[Power[c, 2.0], $MachinePrecision] / N[Power[b, 3.0], $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(b * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[Power[a, 2.0], $MachinePrecision] * N[(-1.5 * N[(c / N[(b / t$95$3), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(b * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Power[a, 3.0], $MachinePrecision] * N[(-1.5 * N[(N[(c * t$95$2), $MachinePrecision] / b), $MachinePrecision] + N[(2.0 * N[(b * N[(N[(t$95$1 * -5.37890625), $MachinePrecision] + N[(t$95$1 * 2.33349609375), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[Power[t$95$3, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\\
t_1 := \frac{{c}^{4}}{{b}^{8}}\\
t_2 := \frac{{c}^{3}}{{b}^{6}} \cdot -1.4765625\\
t_3 := \frac{{c}^{2}}{{b}^{4}} \cdot -0.84375\\
\mathbf{if}\;\frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b}{3 \cdot a} \leq -0.03:\\
\;\;\;\;\frac{\frac{t_0 - {b}^{2}}{b + \sqrt{t_0}}}{3 \cdot a}\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-0.5, \frac{c}{b}, 0.3333333333333333 \cdot \left(a \cdot \mathsf{fma}\left(0.5625, \frac{{c}^{2}}{{b}^{3}}, 2 \cdot \left(b \cdot t_3\right)\right) + \left({a}^{2} \cdot \mathsf{fma}\left(-1.5, \frac{c}{\frac{b}{t_3}}, 2 \cdot \left(b \cdot t_2\right)\right) + {a}^{3} \cdot \mathsf{fma}\left(-1.5, \frac{c \cdot t_2}{b}, \mathsf{fma}\left(2, b \cdot \left(t_1 \cdot -5.37890625 + t_1 \cdot 2.33349609375\right), b \cdot {t_3}^{2}\right)\right)\right)\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (*.f64 3 a)) < -0.029999999999999999

    1. Initial program 84.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. Simplified84.8%

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

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

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

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

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

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

          \[\leadsto \frac{\sqrt{\color{blue}{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)}} - b}{3 \cdot a} \]
        7. add-cbrt-cube83.0%

          \[\leadsto \frac{\color{blue}{\sqrt[3]{\left(\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)} \cdot \sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)}\right) \cdot \sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)}}} - b}{3 \cdot a} \]
        8. pow1/380.3%

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

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

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

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

          \[\leadsto \frac{{\left({\color{blue}{\left(c \cdot \left(a \cdot -3\right) + b \cdot b\right)}}^{\left(\frac{3}{2}\right)}\right)}^{0.3333333333333333} - b}{3 \cdot a} \]
        13. *-commutative80.2%

          \[\leadsto \frac{{\left({\left(\color{blue}{\left(a \cdot -3\right) \cdot c} + b \cdot b\right)}^{\left(\frac{3}{2}\right)}\right)}^{0.3333333333333333} - b}{3 \cdot a} \]
        14. associate-*r*80.2%

          \[\leadsto \frac{{\left({\left(\color{blue}{a \cdot \left(-3 \cdot c\right)} + b \cdot b\right)}^{\left(\frac{3}{2}\right)}\right)}^{0.3333333333333333} - b}{3 \cdot a} \]
        15. *-commutative80.2%

          \[\leadsto \frac{{\left({\left(a \cdot \color{blue}{\left(c \cdot -3\right)} + b \cdot b\right)}^{\left(\frac{3}{2}\right)}\right)}^{0.3333333333333333} - b}{3 \cdot a} \]
        16. fma-udef80.2%

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

          \[\leadsto \frac{{\left({\left(\mathsf{fma}\left(a, c \cdot -3, \color{blue}{{b}^{2}}\right)\right)}^{\left(\frac{3}{2}\right)}\right)}^{0.3333333333333333} - b}{3 \cdot a} \]
        18. metadata-eval80.2%

          \[\leadsto \frac{{\left({\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{\color{blue}{1.5}}\right)}^{0.3333333333333333} - b}{3 \cdot a} \]
      3. Applied egg-rr80.2%

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

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

        \[\leadsto \frac{\color{blue}{\sqrt[3]{{\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{1.5}}} - b}{3 \cdot a} \]
      6. Step-by-step derivation
        1. flip--83.0%

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

          \[\leadsto \frac{\frac{\color{blue}{\sqrt[3]{{\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{1.5} \cdot {\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{1.5}}} - b \cdot b}{\sqrt[3]{{\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{1.5}} + b}}{3 \cdot a} \]
        3. pow-prod-up84.6%

          \[\leadsto \frac{\frac{\sqrt[3]{\color{blue}{{\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{\left(1.5 + 1.5\right)}}} - b \cdot b}{\sqrt[3]{{\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{1.5}} + b}}{3 \cdot a} \]
        4. metadata-eval84.6%

          \[\leadsto \frac{\frac{\sqrt[3]{{\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{\color{blue}{3}}} - b \cdot b}{\sqrt[3]{{\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{1.5}} + b}}{3 \cdot a} \]
        5. pow384.7%

          \[\leadsto \frac{\frac{\sqrt[3]{\color{blue}{\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right) \cdot \mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right) \cdot \mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)}} - b \cdot b}{\sqrt[3]{{\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{1.5}} + b}}{3 \cdot a} \]
        6. add-cbrt-cube86.0%

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

          \[\leadsto \frac{\frac{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right) - \color{blue}{{b}^{2}}}{\sqrt[3]{{\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{1.5}} + b}}{3 \cdot a} \]
        8. pow1/385.8%

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

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

          \[\leadsto \frac{\frac{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right) - {b}^{2}}{{\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{\color{blue}{0.5}} + b}}{3 \cdot a} \]
        11. pow1/286.0%

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

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

      if -0.029999999999999999 < (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (*.f64 3 a))

      1. Initial program 44.9%

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

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

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

            \[\leadsto \frac{\color{blue}{{\left(\sqrt{\sqrt{\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)}}\right)}^{2}} - b}{3 \cdot a} \]
          3. pow1/244.4%

            \[\leadsto \frac{{\left(\sqrt{\color{blue}{{\left(\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)\right)}^{0.5}}}\right)}^{2} - b}{3 \cdot a} \]
          4. sqrt-pow144.8%

            \[\leadsto \frac{{\color{blue}{\left({\left(\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)\right)}^{\left(\frac{0.5}{2}\right)}\right)}}^{2} - b}{3 \cdot a} \]
          5. pow244.8%

            \[\leadsto \frac{{\left({\left(\mathsf{fma}\left(a, c \cdot -3, \color{blue}{{b}^{2}}\right)\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2} - b}{3 \cdot a} \]
          6. metadata-eval44.8%

            \[\leadsto \frac{{\left({\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{\color{blue}{0.25}}\right)}^{2} - b}{3 \cdot a} \]
        3. Applied egg-rr44.8%

          \[\leadsto \frac{\color{blue}{{\left({\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{0.25}\right)}^{2}} - b}{3 \cdot a} \]
        4. Taylor expanded in a around 0 96.3%

          \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b} + \left(0.3333333333333333 \cdot \left(a \cdot \left(0.5625 \cdot \frac{{c}^{2}}{{b}^{3}} + 2 \cdot \left(b \cdot \left(-1.125 \cdot \frac{{c}^{2}}{{b}^{4}} + 0.28125 \cdot \frac{{c}^{2}}{{b}^{4}}\right)\right)\right)\right) + \left(0.3333333333333333 \cdot \left({a}^{2} \cdot \left(-1.5 \cdot \frac{c \cdot \left(-1.125 \cdot \frac{{c}^{2}}{{b}^{4}} + 0.28125 \cdot \frac{{c}^{2}}{{b}^{4}}\right)}{b} + 2 \cdot \left(b \cdot \left(-2.25 \cdot \frac{{c}^{3}}{{b}^{6}} + \left(-0.0703125 \cdot \frac{{c}^{3}}{{b}^{6}} + 0.84375 \cdot \frac{{c}^{3}}{{b}^{6}}\right)\right)\right)\right)\right) + 0.3333333333333333 \cdot \left({a}^{3} \cdot \left(-1.5 \cdot \frac{c \cdot \left(-2.25 \cdot \frac{{c}^{3}}{{b}^{6}} + \left(-0.0703125 \cdot \frac{{c}^{3}}{{b}^{6}} + 0.84375 \cdot \frac{{c}^{3}}{{b}^{6}}\right)\right)}{b} + \left(2 \cdot \left(b \cdot \left(-5.0625 \cdot \frac{{c}^{4}}{{b}^{8}} + \left(-0.31640625 \cdot \frac{{c}^{4}}{{b}^{8}} + \left(0.01318359375 \cdot \frac{{c}^{4}}{{b}^{8}} + \left(0.6328125 \cdot \frac{{c}^{4}}{{b}^{8}} + 1.6875 \cdot \frac{{c}^{4}}{{b}^{8}}\right)\right)\right)\right)\right) + b \cdot {\left(-1.125 \cdot \frac{{c}^{2}}{{b}^{4}} + 0.28125 \cdot \frac{{c}^{2}}{{b}^{4}}\right)}^{2}\right)\right)\right)\right)\right)} \]
        5. Simplified96.3%

          \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5, \frac{c}{b}, 0.3333333333333333 \cdot \left(a \cdot \mathsf{fma}\left(0.5625, \frac{{c}^{2}}{{b}^{3}}, 2 \cdot \left(b \cdot \left(\frac{{c}^{2}}{{b}^{4}} \cdot -0.84375\right)\right)\right) + \left({a}^{2} \cdot \mathsf{fma}\left(-1.5, \frac{c}{\frac{b}{\frac{{c}^{2}}{{b}^{4}} \cdot -0.84375}}, 2 \cdot \left(b \cdot \left(\frac{{c}^{3}}{{b}^{6}} \cdot -1.4765625\right)\right)\right) + {a}^{3} \cdot \mathsf{fma}\left(-1.5, \frac{c \cdot \left(\frac{{c}^{3}}{{b}^{6}} \cdot -1.4765625\right)}{b}, \mathsf{fma}\left(2, b \cdot \left(\frac{{c}^{4}}{{b}^{8}} \cdot -5.37890625 + \frac{{c}^{4}}{{b}^{8}} \cdot 2.33349609375\right), b \cdot {\left(\frac{{c}^{2}}{{b}^{4}} \cdot -0.84375\right)}^{2}\right)\right)\right)\right)\right)} \]
      3. Recombined 2 regimes into one program.
      4. Final simplification94.1%

        \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b}{3 \cdot a} \leq -0.03:\\ \;\;\;\;\frac{\frac{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right) - {b}^{2}}{b + \sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)}}}{3 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-0.5, \frac{c}{b}, 0.3333333333333333 \cdot \left(a \cdot \mathsf{fma}\left(0.5625, \frac{{c}^{2}}{{b}^{3}}, 2 \cdot \left(b \cdot \left(\frac{{c}^{2}}{{b}^{4}} \cdot -0.84375\right)\right)\right) + \left({a}^{2} \cdot \mathsf{fma}\left(-1.5, \frac{c}{\frac{b}{\frac{{c}^{2}}{{b}^{4}} \cdot -0.84375}}, 2 \cdot \left(b \cdot \left(\frac{{c}^{3}}{{b}^{6}} \cdot -1.4765625\right)\right)\right) + {a}^{3} \cdot \mathsf{fma}\left(-1.5, \frac{c \cdot \left(\frac{{c}^{3}}{{b}^{6}} \cdot -1.4765625\right)}{b}, \mathsf{fma}\left(2, b \cdot \left(\frac{{c}^{4}}{{b}^{8}} \cdot -5.37890625 + \frac{{c}^{4}}{{b}^{8}} \cdot 2.33349609375\right), b \cdot {\left(\frac{{c}^{2}}{{b}^{4}} \cdot -0.84375\right)}^{2}\right)\right)\right)\right)\right)\\ \end{array} \]

      Alternative 2: 91.4% accurate, 0.1× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := \mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\\ \mathbf{if}\;\frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b}{3 \cdot a} \leq -0.03:\\ \;\;\;\;\frac{\frac{t_0 - {b}^{2}}{b + \sqrt{t_0}}}{3 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;-0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + -0.16666666666666666 \cdot \left(\frac{{\left(a \cdot c\right)}^{4}}{a} \cdot \frac{6.328125}{{b}^{7}}\right)\right)\right)\\ \end{array} \end{array} \]
      (FPCore (a b c)
       :precision binary64
       (let* ((t_0 (fma a (* c -3.0) (pow b 2.0))))
         (if (<= (/ (- (sqrt (- (* b b) (* (* 3.0 a) c))) b) (* 3.0 a)) -0.03)
           (/ (/ (- t_0 (pow b 2.0)) (+ b (sqrt t_0))) (* 3.0 a))
           (+
            (* -0.5625 (/ (* (pow a 2.0) (pow c 3.0)) (pow b 5.0)))
            (+
             (* -0.5 (/ c b))
             (+
              (* -0.375 (/ (* a (pow c 2.0)) (pow b 3.0)))
              (*
               -0.16666666666666666
               (* (/ (pow (* a c) 4.0) a) (/ 6.328125 (pow b 7.0))))))))))
      double code(double a, double b, double c) {
      	double t_0 = fma(a, (c * -3.0), pow(b, 2.0));
      	double tmp;
      	if (((sqrt(((b * b) - ((3.0 * a) * c))) - b) / (3.0 * a)) <= -0.03) {
      		tmp = ((t_0 - pow(b, 2.0)) / (b + sqrt(t_0))) / (3.0 * a);
      	} else {
      		tmp = (-0.5625 * ((pow(a, 2.0) * pow(c, 3.0)) / pow(b, 5.0))) + ((-0.5 * (c / b)) + ((-0.375 * ((a * pow(c, 2.0)) / pow(b, 3.0))) + (-0.16666666666666666 * ((pow((a * c), 4.0) / a) * (6.328125 / pow(b, 7.0))))));
      	}
      	return tmp;
      }
      
      function code(a, b, c)
      	t_0 = fma(a, Float64(c * -3.0), (b ^ 2.0))
      	tmp = 0.0
      	if (Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(Float64(3.0 * a) * c))) - b) / Float64(3.0 * a)) <= -0.03)
      		tmp = Float64(Float64(Float64(t_0 - (b ^ 2.0)) / Float64(b + sqrt(t_0))) / Float64(3.0 * a));
      	else
      		tmp = Float64(Float64(-0.5625 * Float64(Float64((a ^ 2.0) * (c ^ 3.0)) / (b ^ 5.0))) + Float64(Float64(-0.5 * Float64(c / b)) + Float64(Float64(-0.375 * Float64(Float64(a * (c ^ 2.0)) / (b ^ 3.0))) + Float64(-0.16666666666666666 * Float64(Float64((Float64(a * c) ^ 4.0) / a) * Float64(6.328125 / (b ^ 7.0)))))));
      	end
      	return tmp
      end
      
      code[a_, b_, c_] := Block[{t$95$0 = N[(a * N[(c * -3.0), $MachinePrecision] + N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(N[(3.0 * a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision], -0.03], N[(N[(N[(t$95$0 - N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision] / N[(b + N[Sqrt[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision], N[(N[(-0.5625 * N[(N[(N[Power[a, 2.0], $MachinePrecision] * N[Power[c, 3.0], $MachinePrecision]), $MachinePrecision] / N[Power[b, 5.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(-0.5 * N[(c / b), $MachinePrecision]), $MachinePrecision] + N[(N[(-0.375 * N[(N[(a * N[Power[c, 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[b, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-0.16666666666666666 * N[(N[(N[Power[N[(a * c), $MachinePrecision], 4.0], $MachinePrecision] / a), $MachinePrecision] * N[(6.328125 / N[Power[b, 7.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := \mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\\
      \mathbf{if}\;\frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b}{3 \cdot a} \leq -0.03:\\
      \;\;\;\;\frac{\frac{t_0 - {b}^{2}}{b + \sqrt{t_0}}}{3 \cdot a}\\
      
      \mathbf{else}:\\
      \;\;\;\;-0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + -0.16666666666666666 \cdot \left(\frac{{\left(a \cdot c\right)}^{4}}{a} \cdot \frac{6.328125}{{b}^{7}}\right)\right)\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (*.f64 3 a)) < -0.029999999999999999

        1. Initial program 84.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. Simplified84.8%

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

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

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

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

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

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

              \[\leadsto \frac{\sqrt{\color{blue}{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)}} - b}{3 \cdot a} \]
            7. add-cbrt-cube83.0%

              \[\leadsto \frac{\color{blue}{\sqrt[3]{\left(\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)} \cdot \sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)}\right) \cdot \sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)}}} - b}{3 \cdot a} \]
            8. pow1/380.3%

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

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

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

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

              \[\leadsto \frac{{\left({\color{blue}{\left(c \cdot \left(a \cdot -3\right) + b \cdot b\right)}}^{\left(\frac{3}{2}\right)}\right)}^{0.3333333333333333} - b}{3 \cdot a} \]
            13. *-commutative80.2%

              \[\leadsto \frac{{\left({\left(\color{blue}{\left(a \cdot -3\right) \cdot c} + b \cdot b\right)}^{\left(\frac{3}{2}\right)}\right)}^{0.3333333333333333} - b}{3 \cdot a} \]
            14. associate-*r*80.2%

              \[\leadsto \frac{{\left({\left(\color{blue}{a \cdot \left(-3 \cdot c\right)} + b \cdot b\right)}^{\left(\frac{3}{2}\right)}\right)}^{0.3333333333333333} - b}{3 \cdot a} \]
            15. *-commutative80.2%

              \[\leadsto \frac{{\left({\left(a \cdot \color{blue}{\left(c \cdot -3\right)} + b \cdot b\right)}^{\left(\frac{3}{2}\right)}\right)}^{0.3333333333333333} - b}{3 \cdot a} \]
            16. fma-udef80.2%

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

              \[\leadsto \frac{{\left({\left(\mathsf{fma}\left(a, c \cdot -3, \color{blue}{{b}^{2}}\right)\right)}^{\left(\frac{3}{2}\right)}\right)}^{0.3333333333333333} - b}{3 \cdot a} \]
            18. metadata-eval80.2%

              \[\leadsto \frac{{\left({\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{\color{blue}{1.5}}\right)}^{0.3333333333333333} - b}{3 \cdot a} \]
          3. Applied egg-rr80.2%

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

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

            \[\leadsto \frac{\color{blue}{\sqrt[3]{{\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{1.5}}} - b}{3 \cdot a} \]
          6. Step-by-step derivation
            1. flip--83.0%

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

              \[\leadsto \frac{\frac{\color{blue}{\sqrt[3]{{\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{1.5} \cdot {\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{1.5}}} - b \cdot b}{\sqrt[3]{{\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{1.5}} + b}}{3 \cdot a} \]
            3. pow-prod-up84.6%

              \[\leadsto \frac{\frac{\sqrt[3]{\color{blue}{{\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{\left(1.5 + 1.5\right)}}} - b \cdot b}{\sqrt[3]{{\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{1.5}} + b}}{3 \cdot a} \]
            4. metadata-eval84.6%

              \[\leadsto \frac{\frac{\sqrt[3]{{\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{\color{blue}{3}}} - b \cdot b}{\sqrt[3]{{\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{1.5}} + b}}{3 \cdot a} \]
            5. pow384.7%

              \[\leadsto \frac{\frac{\sqrt[3]{\color{blue}{\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right) \cdot \mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right) \cdot \mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)}} - b \cdot b}{\sqrt[3]{{\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{1.5}} + b}}{3 \cdot a} \]
            6. add-cbrt-cube86.0%

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

              \[\leadsto \frac{\frac{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right) - \color{blue}{{b}^{2}}}{\sqrt[3]{{\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{1.5}} + b}}{3 \cdot a} \]
            8. pow1/385.8%

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

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

              \[\leadsto \frac{\frac{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right) - {b}^{2}}{{\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{\color{blue}{0.5}} + b}}{3 \cdot a} \]
            11. pow1/286.0%

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

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

          if -0.029999999999999999 < (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (*.f64 3 a))

          1. Initial program 44.9%

            \[\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 96.3%

            \[\leadsto \color{blue}{-0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + -0.16666666666666666 \cdot \frac{5.0625 \cdot \left({a}^{4} \cdot {c}^{4}\right) + {\left(-1.125 \cdot \left({a}^{2} \cdot {c}^{2}\right)\right)}^{2}}{a \cdot {b}^{7}}\right)\right)} \]
          3. Taylor expanded in c around 0 96.3%

            \[\leadsto -0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + \color{blue}{-0.16666666666666666 \cdot \frac{{c}^{4} \cdot \left(1.265625 \cdot {a}^{4} + 5.0625 \cdot {a}^{4}\right)}{a \cdot {b}^{7}}}\right)\right) \]
          4. Step-by-step derivation
            1. distribute-rgt-out96.3%

              \[\leadsto -0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + -0.16666666666666666 \cdot \frac{{c}^{4} \cdot \color{blue}{\left({a}^{4} \cdot \left(1.265625 + 5.0625\right)\right)}}{a \cdot {b}^{7}}\right)\right) \]
            2. associate-*r*96.3%

              \[\leadsto -0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + -0.16666666666666666 \cdot \frac{\color{blue}{\left({c}^{4} \cdot {a}^{4}\right) \cdot \left(1.265625 + 5.0625\right)}}{a \cdot {b}^{7}}\right)\right) \]
            3. *-commutative96.3%

              \[\leadsto -0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + -0.16666666666666666 \cdot \frac{\color{blue}{\left({a}^{4} \cdot {c}^{4}\right)} \cdot \left(1.265625 + 5.0625\right)}{a \cdot {b}^{7}}\right)\right) \]
            4. times-frac96.3%

              \[\leadsto -0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + -0.16666666666666666 \cdot \color{blue}{\left(\frac{{a}^{4} \cdot {c}^{4}}{a} \cdot \frac{1.265625 + 5.0625}{{b}^{7}}\right)}\right)\right) \]
          5. Simplified96.3%

            \[\leadsto -0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + \color{blue}{-0.16666666666666666 \cdot \left(\frac{{\left(a \cdot c\right)}^{4}}{a} \cdot \frac{6.328125}{{b}^{7}}\right)}\right)\right) \]
        3. Recombined 2 regimes into one program.
        4. Final simplification94.0%

          \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b}{3 \cdot a} \leq -0.03:\\ \;\;\;\;\frac{\frac{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right) - {b}^{2}}{b + \sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)}}}{3 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;-0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + -0.16666666666666666 \cdot \left(\frac{{\left(a \cdot c\right)}^{4}}{a} \cdot \frac{6.328125}{{b}^{7}}\right)\right)\right)\\ \end{array} \]

        Alternative 3: 89.8% accurate, 0.1× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_0 := \mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\\ \mathbf{if}\;\frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b}{3 \cdot a} \leq -0.03:\\ \;\;\;\;\frac{\frac{t_0 - {b}^{2}}{b + \sqrt{t_0}}}{3 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-0.5, \frac{c}{b}, \mathsf{fma}\left(-0.375, {c}^{2} \cdot \frac{a}{{b}^{3}}, \frac{{c}^{3} \cdot \left({a}^{2} \cdot -0.5625\right)}{{b}^{5}}\right)\right)\\ \end{array} \end{array} \]
        (FPCore (a b c)
         :precision binary64
         (let* ((t_0 (fma a (* c -3.0) (pow b 2.0))))
           (if (<= (/ (- (sqrt (- (* b b) (* (* 3.0 a) c))) b) (* 3.0 a)) -0.03)
             (/ (/ (- t_0 (pow b 2.0)) (+ b (sqrt t_0))) (* 3.0 a))
             (fma
              -0.5
              (/ c b)
              (fma
               -0.375
               (* (pow c 2.0) (/ a (pow b 3.0)))
               (/ (* (pow c 3.0) (* (pow a 2.0) -0.5625)) (pow b 5.0)))))))
        double code(double a, double b, double c) {
        	double t_0 = fma(a, (c * -3.0), pow(b, 2.0));
        	double tmp;
        	if (((sqrt(((b * b) - ((3.0 * a) * c))) - b) / (3.0 * a)) <= -0.03) {
        		tmp = ((t_0 - pow(b, 2.0)) / (b + sqrt(t_0))) / (3.0 * a);
        	} else {
        		tmp = fma(-0.5, (c / b), fma(-0.375, (pow(c, 2.0) * (a / pow(b, 3.0))), ((pow(c, 3.0) * (pow(a, 2.0) * -0.5625)) / pow(b, 5.0))));
        	}
        	return tmp;
        }
        
        function code(a, b, c)
        	t_0 = fma(a, Float64(c * -3.0), (b ^ 2.0))
        	tmp = 0.0
        	if (Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(Float64(3.0 * a) * c))) - b) / Float64(3.0 * a)) <= -0.03)
        		tmp = Float64(Float64(Float64(t_0 - (b ^ 2.0)) / Float64(b + sqrt(t_0))) / Float64(3.0 * a));
        	else
        		tmp = fma(-0.5, Float64(c / b), fma(-0.375, Float64((c ^ 2.0) * Float64(a / (b ^ 3.0))), Float64(Float64((c ^ 3.0) * Float64((a ^ 2.0) * -0.5625)) / (b ^ 5.0))));
        	end
        	return tmp
        end
        
        code[a_, b_, c_] := Block[{t$95$0 = N[(a * N[(c * -3.0), $MachinePrecision] + N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(N[(3.0 * a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision], -0.03], N[(N[(N[(t$95$0 - N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision] / N[(b + N[Sqrt[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision], N[(-0.5 * N[(c / b), $MachinePrecision] + N[(-0.375 * N[(N[Power[c, 2.0], $MachinePrecision] * N[(a / N[Power[b, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[Power[c, 3.0], $MachinePrecision] * N[(N[Power[a, 2.0], $MachinePrecision] * -0.5625), $MachinePrecision]), $MachinePrecision] / N[Power[b, 5.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_0 := \mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\\
        \mathbf{if}\;\frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b}{3 \cdot a} \leq -0.03:\\
        \;\;\;\;\frac{\frac{t_0 - {b}^{2}}{b + \sqrt{t_0}}}{3 \cdot a}\\
        
        \mathbf{else}:\\
        \;\;\;\;\mathsf{fma}\left(-0.5, \frac{c}{b}, \mathsf{fma}\left(-0.375, {c}^{2} \cdot \frac{a}{{b}^{3}}, \frac{{c}^{3} \cdot \left({a}^{2} \cdot -0.5625\right)}{{b}^{5}}\right)\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (*.f64 3 a)) < -0.029999999999999999

          1. Initial program 84.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. Simplified84.8%

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

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

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

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

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

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

                \[\leadsto \frac{\sqrt{\color{blue}{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)}} - b}{3 \cdot a} \]
              7. add-cbrt-cube83.0%

                \[\leadsto \frac{\color{blue}{\sqrt[3]{\left(\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)} \cdot \sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)}\right) \cdot \sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)}}} - b}{3 \cdot a} \]
              8. pow1/380.3%

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

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

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

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

                \[\leadsto \frac{{\left({\color{blue}{\left(c \cdot \left(a \cdot -3\right) + b \cdot b\right)}}^{\left(\frac{3}{2}\right)}\right)}^{0.3333333333333333} - b}{3 \cdot a} \]
              13. *-commutative80.2%

                \[\leadsto \frac{{\left({\left(\color{blue}{\left(a \cdot -3\right) \cdot c} + b \cdot b\right)}^{\left(\frac{3}{2}\right)}\right)}^{0.3333333333333333} - b}{3 \cdot a} \]
              14. associate-*r*80.2%

                \[\leadsto \frac{{\left({\left(\color{blue}{a \cdot \left(-3 \cdot c\right)} + b \cdot b\right)}^{\left(\frac{3}{2}\right)}\right)}^{0.3333333333333333} - b}{3 \cdot a} \]
              15. *-commutative80.2%

                \[\leadsto \frac{{\left({\left(a \cdot \color{blue}{\left(c \cdot -3\right)} + b \cdot b\right)}^{\left(\frac{3}{2}\right)}\right)}^{0.3333333333333333} - b}{3 \cdot a} \]
              16. fma-udef80.2%

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

                \[\leadsto \frac{{\left({\left(\mathsf{fma}\left(a, c \cdot -3, \color{blue}{{b}^{2}}\right)\right)}^{\left(\frac{3}{2}\right)}\right)}^{0.3333333333333333} - b}{3 \cdot a} \]
              18. metadata-eval80.2%

                \[\leadsto \frac{{\left({\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{\color{blue}{1.5}}\right)}^{0.3333333333333333} - b}{3 \cdot a} \]
            3. Applied egg-rr80.2%

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

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

              \[\leadsto \frac{\color{blue}{\sqrt[3]{{\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{1.5}}} - b}{3 \cdot a} \]
            6. Step-by-step derivation
              1. flip--83.0%

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

                \[\leadsto \frac{\frac{\color{blue}{\sqrt[3]{{\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{1.5} \cdot {\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{1.5}}} - b \cdot b}{\sqrt[3]{{\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{1.5}} + b}}{3 \cdot a} \]
              3. pow-prod-up84.6%

                \[\leadsto \frac{\frac{\sqrt[3]{\color{blue}{{\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{\left(1.5 + 1.5\right)}}} - b \cdot b}{\sqrt[3]{{\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{1.5}} + b}}{3 \cdot a} \]
              4. metadata-eval84.6%

                \[\leadsto \frac{\frac{\sqrt[3]{{\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{\color{blue}{3}}} - b \cdot b}{\sqrt[3]{{\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{1.5}} + b}}{3 \cdot a} \]
              5. pow384.7%

                \[\leadsto \frac{\frac{\sqrt[3]{\color{blue}{\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right) \cdot \mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right) \cdot \mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)}} - b \cdot b}{\sqrt[3]{{\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{1.5}} + b}}{3 \cdot a} \]
              6. add-cbrt-cube86.0%

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

                \[\leadsto \frac{\frac{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right) - \color{blue}{{b}^{2}}}{\sqrt[3]{{\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{1.5}} + b}}{3 \cdot a} \]
              8. pow1/385.8%

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

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

                \[\leadsto \frac{\frac{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right) - {b}^{2}}{{\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{\color{blue}{0.5}} + b}}{3 \cdot a} \]
              11. pow1/286.0%

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

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

            if -0.029999999999999999 < (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (*.f64 3 a))

            1. Initial program 44.9%

              \[\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 94.6%

              \[\leadsto \frac{\color{blue}{-1.6875 \cdot \frac{{a}^{3} \cdot {c}^{3}}{{b}^{5}} + \left(-1.5 \cdot \frac{a \cdot c}{b} + -1.125 \cdot \frac{{a}^{2} \cdot {c}^{2}}{{b}^{3}}\right)}}{3 \cdot a} \]
            3. Step-by-step derivation
              1. fma-def94.6%

                \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(-1.6875, \frac{{a}^{3} \cdot {c}^{3}}{{b}^{5}}, -1.5 \cdot \frac{a \cdot c}{b} + -1.125 \cdot \frac{{a}^{2} \cdot {c}^{2}}{{b}^{3}}\right)}}{3 \cdot a} \]
              2. cube-prod94.6%

                \[\leadsto \frac{\mathsf{fma}\left(-1.6875, \frac{\color{blue}{{\left(a \cdot c\right)}^{3}}}{{b}^{5}}, -1.5 \cdot \frac{a \cdot c}{b} + -1.125 \cdot \frac{{a}^{2} \cdot {c}^{2}}{{b}^{3}}\right)}{3 \cdot a} \]
              3. fma-def94.6%

                \[\leadsto \frac{\mathsf{fma}\left(-1.6875, \frac{{\left(a \cdot c\right)}^{3}}{{b}^{5}}, \color{blue}{\mathsf{fma}\left(-1.5, \frac{a \cdot c}{b}, -1.125 \cdot \frac{{a}^{2} \cdot {c}^{2}}{{b}^{3}}\right)}\right)}{3 \cdot a} \]
              4. associate-/l*94.6%

                \[\leadsto \frac{\mathsf{fma}\left(-1.6875, \frac{{\left(a \cdot c\right)}^{3}}{{b}^{5}}, \mathsf{fma}\left(-1.5, \color{blue}{\frac{a}{\frac{b}{c}}}, -1.125 \cdot \frac{{a}^{2} \cdot {c}^{2}}{{b}^{3}}\right)\right)}{3 \cdot a} \]
              5. associate-/l*94.6%

                \[\leadsto \frac{\mathsf{fma}\left(-1.6875, \frac{{\left(a \cdot c\right)}^{3}}{{b}^{5}}, \mathsf{fma}\left(-1.5, \frac{a}{\frac{b}{c}}, -1.125 \cdot \color{blue}{\frac{{a}^{2}}{\frac{{b}^{3}}{{c}^{2}}}}\right)\right)}{3 \cdot a} \]
            4. Simplified94.6%

              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(-1.6875, \frac{{\left(a \cdot c\right)}^{3}}{{b}^{5}}, \mathsf{fma}\left(-1.5, \frac{a}{\frac{b}{c}}, -1.125 \cdot \frac{{a}^{2}}{\frac{{b}^{3}}{{c}^{2}}}\right)\right)}}{3 \cdot a} \]
            5. Taylor expanded in a around 0 94.9%

              \[\leadsto \color{blue}{-0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + -0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}}\right)} \]
            6. Step-by-step derivation
              1. +-commutative94.9%

                \[\leadsto \color{blue}{\left(-0.5 \cdot \frac{c}{b} + -0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}}\right) + -0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}}} \]
              2. associate-+l+94.9%

                \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + -0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}}\right)} \]
              3. +-commutative94.9%

                \[\leadsto -0.5 \cdot \frac{c}{b} + \color{blue}{\left(-0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + -0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}}\right)} \]
              4. fma-def94.9%

                \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5, \frac{c}{b}, -0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + -0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}}\right)} \]
              5. +-commutative94.9%

                \[\leadsto \mathsf{fma}\left(-0.5, \frac{c}{b}, \color{blue}{-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + -0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}}}\right) \]
              6. fma-def94.9%

                \[\leadsto \mathsf{fma}\left(-0.5, \frac{c}{b}, \color{blue}{\mathsf{fma}\left(-0.375, \frac{a \cdot {c}^{2}}{{b}^{3}}, -0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}}\right)}\right) \]
              7. associate-/l*94.9%

                \[\leadsto \mathsf{fma}\left(-0.5, \frac{c}{b}, \mathsf{fma}\left(-0.375, \color{blue}{\frac{a}{\frac{{b}^{3}}{{c}^{2}}}}, -0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}}\right)\right) \]
              8. associate-/r/94.9%

                \[\leadsto \mathsf{fma}\left(-0.5, \frac{c}{b}, \mathsf{fma}\left(-0.375, \color{blue}{\frac{a}{{b}^{3}} \cdot {c}^{2}}, -0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}}\right)\right) \]
              9. associate-*r/94.9%

                \[\leadsto \mathsf{fma}\left(-0.5, \frac{c}{b}, \mathsf{fma}\left(-0.375, \frac{a}{{b}^{3}} \cdot {c}^{2}, \color{blue}{\frac{-0.5625 \cdot \left({a}^{2} \cdot {c}^{3}\right)}{{b}^{5}}}\right)\right) \]
              10. associate-*r*94.9%

                \[\leadsto \mathsf{fma}\left(-0.5, \frac{c}{b}, \mathsf{fma}\left(-0.375, \frac{a}{{b}^{3}} \cdot {c}^{2}, \frac{\color{blue}{\left(-0.5625 \cdot {a}^{2}\right) \cdot {c}^{3}}}{{b}^{5}}\right)\right) \]
            7. Simplified94.9%

              \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5, \frac{c}{b}, \mathsf{fma}\left(-0.375, \frac{a}{{b}^{3}} \cdot {c}^{2}, \frac{\left(-0.5625 \cdot {a}^{2}\right) \cdot {c}^{3}}{{b}^{5}}\right)\right)} \]
          3. Recombined 2 regimes into one program.
          4. Final simplification93.0%

            \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b}{3 \cdot a} \leq -0.03:\\ \;\;\;\;\frac{\frac{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right) - {b}^{2}}{b + \sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)}}}{3 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-0.5, \frac{c}{b}, \mathsf{fma}\left(-0.375, {c}^{2} \cdot \frac{a}{{b}^{3}}, \frac{{c}^{3} \cdot \left({a}^{2} \cdot -0.5625\right)}{{b}^{5}}\right)\right)\\ \end{array} \]

          Alternative 4: 89.8% accurate, 0.2× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_0 := \mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\\ \mathbf{if}\;\frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b}{3 \cdot a} \leq -0.03:\\ \;\;\;\;\frac{\frac{t_0 - {b}^{2}}{b + \sqrt{t_0}}}{3 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;-0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + -0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}}\right)\\ \end{array} \end{array} \]
          (FPCore (a b c)
           :precision binary64
           (let* ((t_0 (fma a (* c -3.0) (pow b 2.0))))
             (if (<= (/ (- (sqrt (- (* b b) (* (* 3.0 a) c))) b) (* 3.0 a)) -0.03)
               (/ (/ (- t_0 (pow b 2.0)) (+ b (sqrt t_0))) (* 3.0 a))
               (+
                (* -0.5625 (/ (* (pow a 2.0) (pow c 3.0)) (pow b 5.0)))
                (+ (* -0.5 (/ c b)) (* -0.375 (/ (* a (pow c 2.0)) (pow b 3.0))))))))
          double code(double a, double b, double c) {
          	double t_0 = fma(a, (c * -3.0), pow(b, 2.0));
          	double tmp;
          	if (((sqrt(((b * b) - ((3.0 * a) * c))) - b) / (3.0 * a)) <= -0.03) {
          		tmp = ((t_0 - pow(b, 2.0)) / (b + sqrt(t_0))) / (3.0 * a);
          	} else {
          		tmp = (-0.5625 * ((pow(a, 2.0) * pow(c, 3.0)) / pow(b, 5.0))) + ((-0.5 * (c / b)) + (-0.375 * ((a * pow(c, 2.0)) / pow(b, 3.0))));
          	}
          	return tmp;
          }
          
          function code(a, b, c)
          	t_0 = fma(a, Float64(c * -3.0), (b ^ 2.0))
          	tmp = 0.0
          	if (Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(Float64(3.0 * a) * c))) - b) / Float64(3.0 * a)) <= -0.03)
          		tmp = Float64(Float64(Float64(t_0 - (b ^ 2.0)) / Float64(b + sqrt(t_0))) / Float64(3.0 * a));
          	else
          		tmp = Float64(Float64(-0.5625 * Float64(Float64((a ^ 2.0) * (c ^ 3.0)) / (b ^ 5.0))) + Float64(Float64(-0.5 * Float64(c / b)) + Float64(-0.375 * Float64(Float64(a * (c ^ 2.0)) / (b ^ 3.0)))));
          	end
          	return tmp
          end
          
          code[a_, b_, c_] := Block[{t$95$0 = N[(a * N[(c * -3.0), $MachinePrecision] + N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(N[(3.0 * a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision], -0.03], N[(N[(N[(t$95$0 - N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision] / N[(b + N[Sqrt[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision], N[(N[(-0.5625 * N[(N[(N[Power[a, 2.0], $MachinePrecision] * N[Power[c, 3.0], $MachinePrecision]), $MachinePrecision] / N[Power[b, 5.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(-0.5 * N[(c / b), $MachinePrecision]), $MachinePrecision] + N[(-0.375 * N[(N[(a * N[Power[c, 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[b, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_0 := \mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\\
          \mathbf{if}\;\frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b}{3 \cdot a} \leq -0.03:\\
          \;\;\;\;\frac{\frac{t_0 - {b}^{2}}{b + \sqrt{t_0}}}{3 \cdot a}\\
          
          \mathbf{else}:\\
          \;\;\;\;-0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + -0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}}\right)\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (*.f64 3 a)) < -0.029999999999999999

            1. Initial program 84.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. Simplified84.8%

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

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

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

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

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

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

                  \[\leadsto \frac{\sqrt{\color{blue}{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)}} - b}{3 \cdot a} \]
                7. add-cbrt-cube83.0%

                  \[\leadsto \frac{\color{blue}{\sqrt[3]{\left(\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)} \cdot \sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)}\right) \cdot \sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)}}} - b}{3 \cdot a} \]
                8. pow1/380.3%

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

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

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

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

                  \[\leadsto \frac{{\left({\color{blue}{\left(c \cdot \left(a \cdot -3\right) + b \cdot b\right)}}^{\left(\frac{3}{2}\right)}\right)}^{0.3333333333333333} - b}{3 \cdot a} \]
                13. *-commutative80.2%

                  \[\leadsto \frac{{\left({\left(\color{blue}{\left(a \cdot -3\right) \cdot c} + b \cdot b\right)}^{\left(\frac{3}{2}\right)}\right)}^{0.3333333333333333} - b}{3 \cdot a} \]
                14. associate-*r*80.2%

                  \[\leadsto \frac{{\left({\left(\color{blue}{a \cdot \left(-3 \cdot c\right)} + b \cdot b\right)}^{\left(\frac{3}{2}\right)}\right)}^{0.3333333333333333} - b}{3 \cdot a} \]
                15. *-commutative80.2%

                  \[\leadsto \frac{{\left({\left(a \cdot \color{blue}{\left(c \cdot -3\right)} + b \cdot b\right)}^{\left(\frac{3}{2}\right)}\right)}^{0.3333333333333333} - b}{3 \cdot a} \]
                16. fma-udef80.2%

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

                  \[\leadsto \frac{{\left({\left(\mathsf{fma}\left(a, c \cdot -3, \color{blue}{{b}^{2}}\right)\right)}^{\left(\frac{3}{2}\right)}\right)}^{0.3333333333333333} - b}{3 \cdot a} \]
                18. metadata-eval80.2%

                  \[\leadsto \frac{{\left({\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{\color{blue}{1.5}}\right)}^{0.3333333333333333} - b}{3 \cdot a} \]
              3. Applied egg-rr80.2%

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

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

                \[\leadsto \frac{\color{blue}{\sqrt[3]{{\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{1.5}}} - b}{3 \cdot a} \]
              6. Step-by-step derivation
                1. flip--83.0%

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

                  \[\leadsto \frac{\frac{\color{blue}{\sqrt[3]{{\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{1.5} \cdot {\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{1.5}}} - b \cdot b}{\sqrt[3]{{\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{1.5}} + b}}{3 \cdot a} \]
                3. pow-prod-up84.6%

                  \[\leadsto \frac{\frac{\sqrt[3]{\color{blue}{{\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{\left(1.5 + 1.5\right)}}} - b \cdot b}{\sqrt[3]{{\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{1.5}} + b}}{3 \cdot a} \]
                4. metadata-eval84.6%

                  \[\leadsto \frac{\frac{\sqrt[3]{{\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{\color{blue}{3}}} - b \cdot b}{\sqrt[3]{{\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{1.5}} + b}}{3 \cdot a} \]
                5. pow384.7%

                  \[\leadsto \frac{\frac{\sqrt[3]{\color{blue}{\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right) \cdot \mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right) \cdot \mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)}} - b \cdot b}{\sqrt[3]{{\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{1.5}} + b}}{3 \cdot a} \]
                6. add-cbrt-cube86.0%

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

                  \[\leadsto \frac{\frac{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right) - \color{blue}{{b}^{2}}}{\sqrt[3]{{\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{1.5}} + b}}{3 \cdot a} \]
                8. pow1/385.8%

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

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

                  \[\leadsto \frac{\frac{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right) - {b}^{2}}{{\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{\color{blue}{0.5}} + b}}{3 \cdot a} \]
                11. pow1/286.0%

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

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

              if -0.029999999999999999 < (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (*.f64 3 a))

              1. Initial program 44.9%

                \[\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 94.9%

                \[\leadsto \color{blue}{-0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + -0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}}\right)} \]
            3. Recombined 2 regimes into one program.
            4. Final simplification92.9%

              \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b}{3 \cdot a} \leq -0.03:\\ \;\;\;\;\frac{\frac{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right) - {b}^{2}}{b + \sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)}}}{3 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;-0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + -0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}}\right)\\ \end{array} \]

            Alternative 5: 89.4% accurate, 0.2× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b}{3 \cdot a} \leq -0.03:\\ \;\;\;\;\frac{1}{\frac{a}{\frac{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} - b}{3}}}\\ \mathbf{else}:\\ \;\;\;\;-0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + -0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}}\right)\\ \end{array} \end{array} \]
            (FPCore (a b c)
             :precision binary64
             (if (<= (/ (- (sqrt (- (* b b) (* (* 3.0 a) c))) b) (* 3.0 a)) -0.03)
               (/ 1.0 (/ a (/ (- (sqrt (fma a (* c -3.0) (pow b 2.0))) b) 3.0)))
               (+
                (* -0.5625 (/ (* (pow a 2.0) (pow c 3.0)) (pow b 5.0)))
                (+ (* -0.5 (/ c b)) (* -0.375 (/ (* a (pow c 2.0)) (pow b 3.0)))))))
            double code(double a, double b, double c) {
            	double tmp;
            	if (((sqrt(((b * b) - ((3.0 * a) * c))) - b) / (3.0 * a)) <= -0.03) {
            		tmp = 1.0 / (a / ((sqrt(fma(a, (c * -3.0), pow(b, 2.0))) - b) / 3.0));
            	} else {
            		tmp = (-0.5625 * ((pow(a, 2.0) * pow(c, 3.0)) / pow(b, 5.0))) + ((-0.5 * (c / b)) + (-0.375 * ((a * pow(c, 2.0)) / pow(b, 3.0))));
            	}
            	return tmp;
            }
            
            function code(a, b, c)
            	tmp = 0.0
            	if (Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(Float64(3.0 * a) * c))) - b) / Float64(3.0 * a)) <= -0.03)
            		tmp = Float64(1.0 / Float64(a / Float64(Float64(sqrt(fma(a, Float64(c * -3.0), (b ^ 2.0))) - b) / 3.0)));
            	else
            		tmp = Float64(Float64(-0.5625 * Float64(Float64((a ^ 2.0) * (c ^ 3.0)) / (b ^ 5.0))) + Float64(Float64(-0.5 * Float64(c / b)) + Float64(-0.375 * Float64(Float64(a * (c ^ 2.0)) / (b ^ 3.0)))));
            	end
            	return tmp
            end
            
            code[a_, b_, c_] := If[LessEqual[N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(N[(3.0 * a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision], -0.03], N[(1.0 / N[(a / N[(N[(N[Sqrt[N[(a * N[(c * -3.0), $MachinePrecision] + N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-0.5625 * N[(N[(N[Power[a, 2.0], $MachinePrecision] * N[Power[c, 3.0], $MachinePrecision]), $MachinePrecision] / N[Power[b, 5.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(-0.5 * N[(c / b), $MachinePrecision]), $MachinePrecision] + N[(-0.375 * N[(N[(a * N[Power[c, 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[b, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;\frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b}{3 \cdot a} \leq -0.03:\\
            \;\;\;\;\frac{1}{\frac{a}{\frac{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} - b}{3}}}\\
            
            \mathbf{else}:\\
            \;\;\;\;-0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + -0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}}\right)\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (*.f64 3 a)) < -0.029999999999999999

              1. Initial program 84.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. Simplified84.8%

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

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

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

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

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

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

                    \[\leadsto \frac{\sqrt{\color{blue}{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)}} - b}{3 \cdot a} \]
                  7. add-cbrt-cube83.0%

                    \[\leadsto \frac{\color{blue}{\sqrt[3]{\left(\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)} \cdot \sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)}\right) \cdot \sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)}}} - b}{3 \cdot a} \]
                  8. pow1/380.3%

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

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

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

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

                    \[\leadsto \frac{{\left({\color{blue}{\left(c \cdot \left(a \cdot -3\right) + b \cdot b\right)}}^{\left(\frac{3}{2}\right)}\right)}^{0.3333333333333333} - b}{3 \cdot a} \]
                  13. *-commutative80.2%

                    \[\leadsto \frac{{\left({\left(\color{blue}{\left(a \cdot -3\right) \cdot c} + b \cdot b\right)}^{\left(\frac{3}{2}\right)}\right)}^{0.3333333333333333} - b}{3 \cdot a} \]
                  14. associate-*r*80.2%

                    \[\leadsto \frac{{\left({\left(\color{blue}{a \cdot \left(-3 \cdot c\right)} + b \cdot b\right)}^{\left(\frac{3}{2}\right)}\right)}^{0.3333333333333333} - b}{3 \cdot a} \]
                  15. *-commutative80.2%

                    \[\leadsto \frac{{\left({\left(a \cdot \color{blue}{\left(c \cdot -3\right)} + b \cdot b\right)}^{\left(\frac{3}{2}\right)}\right)}^{0.3333333333333333} - b}{3 \cdot a} \]
                  16. fma-udef80.2%

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

                    \[\leadsto \frac{{\left({\left(\mathsf{fma}\left(a, c \cdot -3, \color{blue}{{b}^{2}}\right)\right)}^{\left(\frac{3}{2}\right)}\right)}^{0.3333333333333333} - b}{3 \cdot a} \]
                  18. metadata-eval80.2%

                    \[\leadsto \frac{{\left({\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{\color{blue}{1.5}}\right)}^{0.3333333333333333} - b}{3 \cdot a} \]
                3. Applied egg-rr80.2%

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

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

                  \[\leadsto \frac{\color{blue}{\sqrt[3]{{\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{1.5}}} - b}{3 \cdot a} \]
                6. Step-by-step derivation
                  1. clear-num83.1%

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

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

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

                    \[\leadsto {\left(\frac{a \cdot 3}{\color{blue}{{\left({\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{1.5}\right)}^{0.3333333333333333}} - b}\right)}^{-1} \]
                  5. pow-pow84.8%

                    \[\leadsto {\left(\frac{a \cdot 3}{\color{blue}{{\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{\left(1.5 \cdot 0.3333333333333333\right)}} - b}\right)}^{-1} \]
                  6. metadata-eval84.8%

                    \[\leadsto {\left(\frac{a \cdot 3}{{\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{\color{blue}{0.5}} - b}\right)}^{-1} \]
                  7. pow1/284.8%

                    \[\leadsto {\left(\frac{a \cdot 3}{\color{blue}{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)}} - b}\right)}^{-1} \]
                7. Applied egg-rr84.8%

                  \[\leadsto \color{blue}{{\left(\frac{a \cdot 3}{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} - b}\right)}^{-1}} \]
                8. Step-by-step derivation
                  1. unpow-184.8%

                    \[\leadsto \color{blue}{\frac{1}{\frac{a \cdot 3}{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} - b}}} \]
                  2. associate-/l*84.8%

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

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

                if -0.029999999999999999 < (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (*.f64 3 a))

                1. Initial program 44.9%

                  \[\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 94.9%

                  \[\leadsto \color{blue}{-0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + -0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}}\right)} \]
              3. Recombined 2 regimes into one program.
              4. Final simplification92.7%

                \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b}{3 \cdot a} \leq -0.03:\\ \;\;\;\;\frac{1}{\frac{a}{\frac{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} - b}{3}}}\\ \mathbf{else}:\\ \;\;\;\;-0.5625 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + -0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}}\right)\\ \end{array} \]

              Alternative 6: 89.1% accurate, 0.2× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b}{3 \cdot a} \leq -0.03:\\ \;\;\;\;\frac{1}{\frac{a}{\frac{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} - b}{3}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(-1.6875, \frac{{\left(a \cdot c\right)}^{3}}{{b}^{5}}, -1.5 \cdot \frac{a \cdot c}{b} + -1.125 \cdot \frac{\left(a \cdot c\right) \cdot \left(a \cdot c\right)}{{b}^{3}}\right)}{3 \cdot a}\\ \end{array} \end{array} \]
              (FPCore (a b c)
               :precision binary64
               (if (<= (/ (- (sqrt (- (* b b) (* (* 3.0 a) c))) b) (* 3.0 a)) -0.03)
                 (/ 1.0 (/ a (/ (- (sqrt (fma a (* c -3.0) (pow b 2.0))) b) 3.0)))
                 (/
                  (fma
                   -1.6875
                   (/ (pow (* a c) 3.0) (pow b 5.0))
                   (+ (* -1.5 (/ (* a c) b)) (* -1.125 (/ (* (* a c) (* a c)) (pow b 3.0)))))
                  (* 3.0 a))))
              double code(double a, double b, double c) {
              	double tmp;
              	if (((sqrt(((b * b) - ((3.0 * a) * c))) - b) / (3.0 * a)) <= -0.03) {
              		tmp = 1.0 / (a / ((sqrt(fma(a, (c * -3.0), pow(b, 2.0))) - b) / 3.0));
              	} else {
              		tmp = fma(-1.6875, (pow((a * c), 3.0) / pow(b, 5.0)), ((-1.5 * ((a * c) / b)) + (-1.125 * (((a * c) * (a * c)) / pow(b, 3.0))))) / (3.0 * a);
              	}
              	return tmp;
              }
              
              function code(a, b, c)
              	tmp = 0.0
              	if (Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(Float64(3.0 * a) * c))) - b) / Float64(3.0 * a)) <= -0.03)
              		tmp = Float64(1.0 / Float64(a / Float64(Float64(sqrt(fma(a, Float64(c * -3.0), (b ^ 2.0))) - b) / 3.0)));
              	else
              		tmp = Float64(fma(-1.6875, Float64((Float64(a * c) ^ 3.0) / (b ^ 5.0)), Float64(Float64(-1.5 * Float64(Float64(a * c) / b)) + Float64(-1.125 * Float64(Float64(Float64(a * c) * Float64(a * c)) / (b ^ 3.0))))) / Float64(3.0 * a));
              	end
              	return tmp
              end
              
              code[a_, b_, c_] := If[LessEqual[N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(N[(3.0 * a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision], -0.03], N[(1.0 / N[(a / N[(N[(N[Sqrt[N[(a * N[(c * -3.0), $MachinePrecision] + N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-1.6875 * N[(N[Power[N[(a * c), $MachinePrecision], 3.0], $MachinePrecision] / N[Power[b, 5.0], $MachinePrecision]), $MachinePrecision] + N[(N[(-1.5 * N[(N[(a * c), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision] + N[(-1.125 * N[(N[(N[(a * c), $MachinePrecision] * N[(a * c), $MachinePrecision]), $MachinePrecision] / N[Power[b, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              \mathbf{if}\;\frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b}{3 \cdot a} \leq -0.03:\\
              \;\;\;\;\frac{1}{\frac{a}{\frac{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} - b}{3}}}\\
              
              \mathbf{else}:\\
              \;\;\;\;\frac{\mathsf{fma}\left(-1.6875, \frac{{\left(a \cdot c\right)}^{3}}{{b}^{5}}, -1.5 \cdot \frac{a \cdot c}{b} + -1.125 \cdot \frac{\left(a \cdot c\right) \cdot \left(a \cdot c\right)}{{b}^{3}}\right)}{3 \cdot a}\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (*.f64 3 a)) < -0.029999999999999999

                1. Initial program 84.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. Simplified84.8%

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

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

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

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

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

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

                      \[\leadsto \frac{\sqrt{\color{blue}{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)}} - b}{3 \cdot a} \]
                    7. add-cbrt-cube83.0%

                      \[\leadsto \frac{\color{blue}{\sqrt[3]{\left(\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)} \cdot \sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)}\right) \cdot \sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)}}} - b}{3 \cdot a} \]
                    8. pow1/380.3%

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

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

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

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

                      \[\leadsto \frac{{\left({\color{blue}{\left(c \cdot \left(a \cdot -3\right) + b \cdot b\right)}}^{\left(\frac{3}{2}\right)}\right)}^{0.3333333333333333} - b}{3 \cdot a} \]
                    13. *-commutative80.2%

                      \[\leadsto \frac{{\left({\left(\color{blue}{\left(a \cdot -3\right) \cdot c} + b \cdot b\right)}^{\left(\frac{3}{2}\right)}\right)}^{0.3333333333333333} - b}{3 \cdot a} \]
                    14. associate-*r*80.2%

                      \[\leadsto \frac{{\left({\left(\color{blue}{a \cdot \left(-3 \cdot c\right)} + b \cdot b\right)}^{\left(\frac{3}{2}\right)}\right)}^{0.3333333333333333} - b}{3 \cdot a} \]
                    15. *-commutative80.2%

                      \[\leadsto \frac{{\left({\left(a \cdot \color{blue}{\left(c \cdot -3\right)} + b \cdot b\right)}^{\left(\frac{3}{2}\right)}\right)}^{0.3333333333333333} - b}{3 \cdot a} \]
                    16. fma-udef80.2%

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

                      \[\leadsto \frac{{\left({\left(\mathsf{fma}\left(a, c \cdot -3, \color{blue}{{b}^{2}}\right)\right)}^{\left(\frac{3}{2}\right)}\right)}^{0.3333333333333333} - b}{3 \cdot a} \]
                    18. metadata-eval80.2%

                      \[\leadsto \frac{{\left({\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{\color{blue}{1.5}}\right)}^{0.3333333333333333} - b}{3 \cdot a} \]
                  3. Applied egg-rr80.2%

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

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

                    \[\leadsto \frac{\color{blue}{\sqrt[3]{{\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{1.5}}} - b}{3 \cdot a} \]
                  6. Step-by-step derivation
                    1. clear-num83.1%

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

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

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

                      \[\leadsto {\left(\frac{a \cdot 3}{\color{blue}{{\left({\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{1.5}\right)}^{0.3333333333333333}} - b}\right)}^{-1} \]
                    5. pow-pow84.8%

                      \[\leadsto {\left(\frac{a \cdot 3}{\color{blue}{{\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{\left(1.5 \cdot 0.3333333333333333\right)}} - b}\right)}^{-1} \]
                    6. metadata-eval84.8%

                      \[\leadsto {\left(\frac{a \cdot 3}{{\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{\color{blue}{0.5}} - b}\right)}^{-1} \]
                    7. pow1/284.8%

                      \[\leadsto {\left(\frac{a \cdot 3}{\color{blue}{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)}} - b}\right)}^{-1} \]
                  7. Applied egg-rr84.8%

                    \[\leadsto \color{blue}{{\left(\frac{a \cdot 3}{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} - b}\right)}^{-1}} \]
                  8. Step-by-step derivation
                    1. unpow-184.8%

                      \[\leadsto \color{blue}{\frac{1}{\frac{a \cdot 3}{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} - b}}} \]
                    2. associate-/l*84.8%

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

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

                  if -0.029999999999999999 < (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (*.f64 3 a))

                  1. Initial program 44.9%

                    \[\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 94.6%

                    \[\leadsto \frac{\color{blue}{-1.6875 \cdot \frac{{a}^{3} \cdot {c}^{3}}{{b}^{5}} + \left(-1.5 \cdot \frac{a \cdot c}{b} + -1.125 \cdot \frac{{a}^{2} \cdot {c}^{2}}{{b}^{3}}\right)}}{3 \cdot a} \]
                  3. Step-by-step derivation
                    1. fma-def94.6%

                      \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(-1.6875, \frac{{a}^{3} \cdot {c}^{3}}{{b}^{5}}, -1.5 \cdot \frac{a \cdot c}{b} + -1.125 \cdot \frac{{a}^{2} \cdot {c}^{2}}{{b}^{3}}\right)}}{3 \cdot a} \]
                    2. cube-prod94.6%

                      \[\leadsto \frac{\mathsf{fma}\left(-1.6875, \frac{\color{blue}{{\left(a \cdot c\right)}^{3}}}{{b}^{5}}, -1.5 \cdot \frac{a \cdot c}{b} + -1.125 \cdot \frac{{a}^{2} \cdot {c}^{2}}{{b}^{3}}\right)}{3 \cdot a} \]
                    3. fma-def94.6%

                      \[\leadsto \frac{\mathsf{fma}\left(-1.6875, \frac{{\left(a \cdot c\right)}^{3}}{{b}^{5}}, \color{blue}{\mathsf{fma}\left(-1.5, \frac{a \cdot c}{b}, -1.125 \cdot \frac{{a}^{2} \cdot {c}^{2}}{{b}^{3}}\right)}\right)}{3 \cdot a} \]
                    4. associate-/l*94.6%

                      \[\leadsto \frac{\mathsf{fma}\left(-1.6875, \frac{{\left(a \cdot c\right)}^{3}}{{b}^{5}}, \mathsf{fma}\left(-1.5, \color{blue}{\frac{a}{\frac{b}{c}}}, -1.125 \cdot \frac{{a}^{2} \cdot {c}^{2}}{{b}^{3}}\right)\right)}{3 \cdot a} \]
                    5. associate-/l*94.6%

                      \[\leadsto \frac{\mathsf{fma}\left(-1.6875, \frac{{\left(a \cdot c\right)}^{3}}{{b}^{5}}, \mathsf{fma}\left(-1.5, \frac{a}{\frac{b}{c}}, -1.125 \cdot \color{blue}{\frac{{a}^{2}}{\frac{{b}^{3}}{{c}^{2}}}}\right)\right)}{3 \cdot a} \]
                  4. Simplified94.6%

                    \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(-1.6875, \frac{{\left(a \cdot c\right)}^{3}}{{b}^{5}}, \mathsf{fma}\left(-1.5, \frac{a}{\frac{b}{c}}, -1.125 \cdot \frac{{a}^{2}}{\frac{{b}^{3}}{{c}^{2}}}\right)\right)}}{3 \cdot a} \]
                  5. Taylor expanded in a around 0 94.6%

                    \[\leadsto \frac{\mathsf{fma}\left(-1.6875, \frac{{\left(a \cdot c\right)}^{3}}{{b}^{5}}, \color{blue}{-1.5 \cdot \frac{a \cdot c}{b} + -1.125 \cdot \frac{{a}^{2} \cdot {c}^{2}}{{b}^{3}}}\right)}{3 \cdot a} \]
                  6. Step-by-step derivation
                    1. add-cube-cbrt94.6%

                      \[\leadsto \frac{\mathsf{fma}\left(-1.6875, \frac{{\left(a \cdot c\right)}^{3}}{{b}^{5}}, -1.5 \cdot \frac{a \cdot c}{b} + -1.125 \cdot \color{blue}{\left(\left(\sqrt[3]{\frac{{a}^{2} \cdot {c}^{2}}{{b}^{3}}} \cdot \sqrt[3]{\frac{{a}^{2} \cdot {c}^{2}}{{b}^{3}}}\right) \cdot \sqrt[3]{\frac{{a}^{2} \cdot {c}^{2}}{{b}^{3}}}\right)}\right)}{3 \cdot a} \]
                    2. pow294.6%

                      \[\leadsto \frac{\mathsf{fma}\left(-1.6875, \frac{{\left(a \cdot c\right)}^{3}}{{b}^{5}}, -1.5 \cdot \frac{a \cdot c}{b} + -1.125 \cdot \left(\color{blue}{{\left(\sqrt[3]{\frac{{a}^{2} \cdot {c}^{2}}{{b}^{3}}}\right)}^{2}} \cdot \sqrt[3]{\frac{{a}^{2} \cdot {c}^{2}}{{b}^{3}}}\right)\right)}{3 \cdot a} \]
                    3. cbrt-div94.6%

                      \[\leadsto \frac{\mathsf{fma}\left(-1.6875, \frac{{\left(a \cdot c\right)}^{3}}{{b}^{5}}, -1.5 \cdot \frac{a \cdot c}{b} + -1.125 \cdot \left({\color{blue}{\left(\frac{\sqrt[3]{{a}^{2} \cdot {c}^{2}}}{\sqrt[3]{{b}^{3}}}\right)}}^{2} \cdot \sqrt[3]{\frac{{a}^{2} \cdot {c}^{2}}{{b}^{3}}}\right)\right)}{3 \cdot a} \]
                    4. pow-prod-down94.6%

                      \[\leadsto \frac{\mathsf{fma}\left(-1.6875, \frac{{\left(a \cdot c\right)}^{3}}{{b}^{5}}, -1.5 \cdot \frac{a \cdot c}{b} + -1.125 \cdot \left({\left(\frac{\sqrt[3]{\color{blue}{{\left(a \cdot c\right)}^{2}}}}{\sqrt[3]{{b}^{3}}}\right)}^{2} \cdot \sqrt[3]{\frac{{a}^{2} \cdot {c}^{2}}{{b}^{3}}}\right)\right)}{3 \cdot a} \]
                    5. unpow394.6%

                      \[\leadsto \frac{\mathsf{fma}\left(-1.6875, \frac{{\left(a \cdot c\right)}^{3}}{{b}^{5}}, -1.5 \cdot \frac{a \cdot c}{b} + -1.125 \cdot \left({\left(\frac{\sqrt[3]{{\left(a \cdot c\right)}^{2}}}{\sqrt[3]{\color{blue}{\left(b \cdot b\right) \cdot b}}}\right)}^{2} \cdot \sqrt[3]{\frac{{a}^{2} \cdot {c}^{2}}{{b}^{3}}}\right)\right)}{3 \cdot a} \]
                    6. add-cbrt-cube94.6%

                      \[\leadsto \frac{\mathsf{fma}\left(-1.6875, \frac{{\left(a \cdot c\right)}^{3}}{{b}^{5}}, -1.5 \cdot \frac{a \cdot c}{b} + -1.125 \cdot \left({\left(\frac{\sqrt[3]{{\left(a \cdot c\right)}^{2}}}{\color{blue}{b}}\right)}^{2} \cdot \sqrt[3]{\frac{{a}^{2} \cdot {c}^{2}}{{b}^{3}}}\right)\right)}{3 \cdot a} \]
                    7. cbrt-div94.6%

                      \[\leadsto \frac{\mathsf{fma}\left(-1.6875, \frac{{\left(a \cdot c\right)}^{3}}{{b}^{5}}, -1.5 \cdot \frac{a \cdot c}{b} + -1.125 \cdot \left({\left(\frac{\sqrt[3]{{\left(a \cdot c\right)}^{2}}}{b}\right)}^{2} \cdot \color{blue}{\frac{\sqrt[3]{{a}^{2} \cdot {c}^{2}}}{\sqrt[3]{{b}^{3}}}}\right)\right)}{3 \cdot a} \]
                    8. pow-prod-down94.6%

                      \[\leadsto \frac{\mathsf{fma}\left(-1.6875, \frac{{\left(a \cdot c\right)}^{3}}{{b}^{5}}, -1.5 \cdot \frac{a \cdot c}{b} + -1.125 \cdot \left({\left(\frac{\sqrt[3]{{\left(a \cdot c\right)}^{2}}}{b}\right)}^{2} \cdot \frac{\sqrt[3]{\color{blue}{{\left(a \cdot c\right)}^{2}}}}{\sqrt[3]{{b}^{3}}}\right)\right)}{3 \cdot a} \]
                    9. unpow394.6%

                      \[\leadsto \frac{\mathsf{fma}\left(-1.6875, \frac{{\left(a \cdot c\right)}^{3}}{{b}^{5}}, -1.5 \cdot \frac{a \cdot c}{b} + -1.125 \cdot \left({\left(\frac{\sqrt[3]{{\left(a \cdot c\right)}^{2}}}{b}\right)}^{2} \cdot \frac{\sqrt[3]{{\left(a \cdot c\right)}^{2}}}{\sqrt[3]{\color{blue}{\left(b \cdot b\right) \cdot b}}}\right)\right)}{3 \cdot a} \]
                    10. add-cbrt-cube94.6%

                      \[\leadsto \frac{\mathsf{fma}\left(-1.6875, \frac{{\left(a \cdot c\right)}^{3}}{{b}^{5}}, -1.5 \cdot \frac{a \cdot c}{b} + -1.125 \cdot \left({\left(\frac{\sqrt[3]{{\left(a \cdot c\right)}^{2}}}{b}\right)}^{2} \cdot \frac{\sqrt[3]{{\left(a \cdot c\right)}^{2}}}{\color{blue}{b}}\right)\right)}{3 \cdot a} \]
                  7. Applied egg-rr94.6%

                    \[\leadsto \frac{\mathsf{fma}\left(-1.6875, \frac{{\left(a \cdot c\right)}^{3}}{{b}^{5}}, -1.5 \cdot \frac{a \cdot c}{b} + -1.125 \cdot \color{blue}{\left({\left(\frac{\sqrt[3]{{\left(a \cdot c\right)}^{2}}}{b}\right)}^{2} \cdot \frac{\sqrt[3]{{\left(a \cdot c\right)}^{2}}}{b}\right)}\right)}{3 \cdot a} \]
                  8. Step-by-step derivation
                    1. pow-plus94.6%

                      \[\leadsto \frac{\mathsf{fma}\left(-1.6875, \frac{{\left(a \cdot c\right)}^{3}}{{b}^{5}}, -1.5 \cdot \frac{a \cdot c}{b} + -1.125 \cdot \color{blue}{{\left(\frac{\sqrt[3]{{\left(a \cdot c\right)}^{2}}}{b}\right)}^{\left(2 + 1\right)}}\right)}{3 \cdot a} \]
                    2. metadata-eval94.6%

                      \[\leadsto \frac{\mathsf{fma}\left(-1.6875, \frac{{\left(a \cdot c\right)}^{3}}{{b}^{5}}, -1.5 \cdot \frac{a \cdot c}{b} + -1.125 \cdot {\left(\frac{\sqrt[3]{{\left(a \cdot c\right)}^{2}}}{b}\right)}^{\color{blue}{3}}\right)}{3 \cdot a} \]
                    3. cube-div94.6%

                      \[\leadsto \frac{\mathsf{fma}\left(-1.6875, \frac{{\left(a \cdot c\right)}^{3}}{{b}^{5}}, -1.5 \cdot \frac{a \cdot c}{b} + -1.125 \cdot \color{blue}{\frac{{\left(\sqrt[3]{{\left(a \cdot c\right)}^{2}}\right)}^{3}}{{b}^{3}}}\right)}{3 \cdot a} \]
                    4. rem-cube-cbrt94.6%

                      \[\leadsto \frac{\mathsf{fma}\left(-1.6875, \frac{{\left(a \cdot c\right)}^{3}}{{b}^{5}}, -1.5 \cdot \frac{a \cdot c}{b} + -1.125 \cdot \frac{\color{blue}{{\left(a \cdot c\right)}^{2}}}{{b}^{3}}\right)}{3 \cdot a} \]
                  9. Simplified94.6%

                    \[\leadsto \frac{\mathsf{fma}\left(-1.6875, \frac{{\left(a \cdot c\right)}^{3}}{{b}^{5}}, -1.5 \cdot \frac{a \cdot c}{b} + -1.125 \cdot \color{blue}{\frac{{\left(a \cdot c\right)}^{2}}{{b}^{3}}}\right)}{3 \cdot a} \]
                  10. Step-by-step derivation
                    1. unpow294.6%

                      \[\leadsto \frac{\mathsf{fma}\left(-1.6875, \frac{{\left(a \cdot c\right)}^{3}}{{b}^{5}}, -1.5 \cdot \frac{a \cdot c}{b} + -1.125 \cdot \frac{\color{blue}{\left(a \cdot c\right) \cdot \left(a \cdot c\right)}}{{b}^{3}}\right)}{3 \cdot a} \]
                  11. Applied egg-rr94.6%

                    \[\leadsto \frac{\mathsf{fma}\left(-1.6875, \frac{{\left(a \cdot c\right)}^{3}}{{b}^{5}}, -1.5 \cdot \frac{a \cdot c}{b} + -1.125 \cdot \frac{\color{blue}{\left(a \cdot c\right) \cdot \left(a \cdot c\right)}}{{b}^{3}}\right)}{3 \cdot a} \]
                3. Recombined 2 regimes into one program.
                4. Final simplification92.5%

                  \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b}{3 \cdot a} \leq -0.03:\\ \;\;\;\;\frac{1}{\frac{a}{\frac{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} - b}{3}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(-1.6875, \frac{{\left(a \cdot c\right)}^{3}}{{b}^{5}}, -1.5 \cdot \frac{a \cdot c}{b} + -1.125 \cdot \frac{\left(a \cdot c\right) \cdot \left(a \cdot c\right)}{{b}^{3}}\right)}{3 \cdot a}\\ \end{array} \]

                Alternative 7: 85.7% accurate, 0.3× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b}{3 \cdot a} \leq -0.03:\\ \;\;\;\;\frac{1}{\frac{a}{\frac{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} - b}{3}}}\\ \mathbf{else}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b} + -0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}}\\ \end{array} \end{array} \]
                (FPCore (a b c)
                 :precision binary64
                 (if (<= (/ (- (sqrt (- (* b b) (* (* 3.0 a) c))) b) (* 3.0 a)) -0.03)
                   (/ 1.0 (/ a (/ (- (sqrt (fma a (* c -3.0) (pow b 2.0))) b) 3.0)))
                   (+ (* -0.5 (/ c b)) (* -0.375 (/ (* a (pow c 2.0)) (pow b 3.0))))))
                double code(double a, double b, double c) {
                	double tmp;
                	if (((sqrt(((b * b) - ((3.0 * a) * c))) - b) / (3.0 * a)) <= -0.03) {
                		tmp = 1.0 / (a / ((sqrt(fma(a, (c * -3.0), pow(b, 2.0))) - b) / 3.0));
                	} else {
                		tmp = (-0.5 * (c / b)) + (-0.375 * ((a * pow(c, 2.0)) / pow(b, 3.0)));
                	}
                	return tmp;
                }
                
                function code(a, b, c)
                	tmp = 0.0
                	if (Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(Float64(3.0 * a) * c))) - b) / Float64(3.0 * a)) <= -0.03)
                		tmp = Float64(1.0 / Float64(a / Float64(Float64(sqrt(fma(a, Float64(c * -3.0), (b ^ 2.0))) - b) / 3.0)));
                	else
                		tmp = Float64(Float64(-0.5 * Float64(c / b)) + Float64(-0.375 * Float64(Float64(a * (c ^ 2.0)) / (b ^ 3.0))));
                	end
                	return tmp
                end
                
                code[a_, b_, c_] := If[LessEqual[N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(N[(3.0 * a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision], -0.03], N[(1.0 / N[(a / N[(N[(N[Sqrt[N[(a * N[(c * -3.0), $MachinePrecision] + N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-0.5 * N[(c / b), $MachinePrecision]), $MachinePrecision] + N[(-0.375 * N[(N[(a * N[Power[c, 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[b, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;\frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b}{3 \cdot a} \leq -0.03:\\
                \;\;\;\;\frac{1}{\frac{a}{\frac{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} - b}{3}}}\\
                
                \mathbf{else}:\\
                \;\;\;\;-0.5 \cdot \frac{c}{b} + -0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}}\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (*.f64 3 a)) < -0.029999999999999999

                  1. Initial program 84.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. Simplified84.8%

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

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

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

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

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

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

                        \[\leadsto \frac{\sqrt{\color{blue}{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)}} - b}{3 \cdot a} \]
                      7. add-cbrt-cube83.0%

                        \[\leadsto \frac{\color{blue}{\sqrt[3]{\left(\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)} \cdot \sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)}\right) \cdot \sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)}}} - b}{3 \cdot a} \]
                      8. pow1/380.3%

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

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

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

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

                        \[\leadsto \frac{{\left({\color{blue}{\left(c \cdot \left(a \cdot -3\right) + b \cdot b\right)}}^{\left(\frac{3}{2}\right)}\right)}^{0.3333333333333333} - b}{3 \cdot a} \]
                      13. *-commutative80.2%

                        \[\leadsto \frac{{\left({\left(\color{blue}{\left(a \cdot -3\right) \cdot c} + b \cdot b\right)}^{\left(\frac{3}{2}\right)}\right)}^{0.3333333333333333} - b}{3 \cdot a} \]
                      14. associate-*r*80.2%

                        \[\leadsto \frac{{\left({\left(\color{blue}{a \cdot \left(-3 \cdot c\right)} + b \cdot b\right)}^{\left(\frac{3}{2}\right)}\right)}^{0.3333333333333333} - b}{3 \cdot a} \]
                      15. *-commutative80.2%

                        \[\leadsto \frac{{\left({\left(a \cdot \color{blue}{\left(c \cdot -3\right)} + b \cdot b\right)}^{\left(\frac{3}{2}\right)}\right)}^{0.3333333333333333} - b}{3 \cdot a} \]
                      16. fma-udef80.2%

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

                        \[\leadsto \frac{{\left({\left(\mathsf{fma}\left(a, c \cdot -3, \color{blue}{{b}^{2}}\right)\right)}^{\left(\frac{3}{2}\right)}\right)}^{0.3333333333333333} - b}{3 \cdot a} \]
                      18. metadata-eval80.2%

                        \[\leadsto \frac{{\left({\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{\color{blue}{1.5}}\right)}^{0.3333333333333333} - b}{3 \cdot a} \]
                    3. Applied egg-rr80.2%

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

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

                      \[\leadsto \frac{\color{blue}{\sqrt[3]{{\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{1.5}}} - b}{3 \cdot a} \]
                    6. Step-by-step derivation
                      1. clear-num83.1%

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

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

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

                        \[\leadsto {\left(\frac{a \cdot 3}{\color{blue}{{\left({\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{1.5}\right)}^{0.3333333333333333}} - b}\right)}^{-1} \]
                      5. pow-pow84.8%

                        \[\leadsto {\left(\frac{a \cdot 3}{\color{blue}{{\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{\left(1.5 \cdot 0.3333333333333333\right)}} - b}\right)}^{-1} \]
                      6. metadata-eval84.8%

                        \[\leadsto {\left(\frac{a \cdot 3}{{\left(\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)\right)}^{\color{blue}{0.5}} - b}\right)}^{-1} \]
                      7. pow1/284.8%

                        \[\leadsto {\left(\frac{a \cdot 3}{\color{blue}{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)}} - b}\right)}^{-1} \]
                    7. Applied egg-rr84.8%

                      \[\leadsto \color{blue}{{\left(\frac{a \cdot 3}{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} - b}\right)}^{-1}} \]
                    8. Step-by-step derivation
                      1. unpow-184.8%

                        \[\leadsto \color{blue}{\frac{1}{\frac{a \cdot 3}{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} - b}}} \]
                      2. associate-/l*84.8%

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

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

                    if -0.029999999999999999 < (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (*.f64 3 a))

                    1. Initial program 44.9%

                      \[\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 90.4%

                      \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b} + -0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}}} \]
                  3. Recombined 2 regimes into one program.
                  4. Final simplification89.1%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b}{3 \cdot a} \leq -0.03:\\ \;\;\;\;\frac{1}{\frac{a}{\frac{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} - b}{3}}}\\ \mathbf{else}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b} + -0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}}\\ \end{array} \]

                  Alternative 8: 85.7% accurate, 0.4× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b}{3 \cdot a} \leq -0.03:\\ \;\;\;\;\frac{\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)} - b}{3 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b} + -0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}}\\ \end{array} \end{array} \]
                  (FPCore (a b c)
                   :precision binary64
                   (if (<= (/ (- (sqrt (- (* b b) (* (* 3.0 a) c))) b) (* 3.0 a)) -0.03)
                     (/ (- (sqrt (fma b b (* c (* a -3.0)))) b) (* 3.0 a))
                     (+ (* -0.5 (/ c b)) (* -0.375 (/ (* a (pow c 2.0)) (pow b 3.0))))))
                  double code(double a, double b, double c) {
                  	double tmp;
                  	if (((sqrt(((b * b) - ((3.0 * a) * c))) - b) / (3.0 * a)) <= -0.03) {
                  		tmp = (sqrt(fma(b, b, (c * (a * -3.0)))) - b) / (3.0 * a);
                  	} else {
                  		tmp = (-0.5 * (c / b)) + (-0.375 * ((a * pow(c, 2.0)) / pow(b, 3.0)));
                  	}
                  	return tmp;
                  }
                  
                  function code(a, b, c)
                  	tmp = 0.0
                  	if (Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(Float64(3.0 * a) * c))) - b) / Float64(3.0 * a)) <= -0.03)
                  		tmp = Float64(Float64(sqrt(fma(b, b, Float64(c * Float64(a * -3.0)))) - b) / Float64(3.0 * a));
                  	else
                  		tmp = Float64(Float64(-0.5 * Float64(c / b)) + Float64(-0.375 * Float64(Float64(a * (c ^ 2.0)) / (b ^ 3.0))));
                  	end
                  	return tmp
                  end
                  
                  code[a_, b_, c_] := If[LessEqual[N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(N[(3.0 * a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision], -0.03], N[(N[(N[Sqrt[N[(b * b + N[(c * N[(a * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision], N[(N[(-0.5 * N[(c / b), $MachinePrecision]), $MachinePrecision] + N[(-0.375 * N[(N[(a * N[Power[c, 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[b, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;\frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b}{3 \cdot a} \leq -0.03:\\
                  \;\;\;\;\frac{\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)} - b}{3 \cdot a}\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;-0.5 \cdot \frac{c}{b} + -0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}}\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (*.f64 3 a)) < -0.029999999999999999

                    1. Initial program 84.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. Simplified84.8%

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

                      if -0.029999999999999999 < (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (*.f64 3 a))

                      1. Initial program 44.9%

                        \[\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 90.4%

                        \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b} + -0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}}} \]
                    3. Recombined 2 regimes into one program.
                    4. Final simplification89.1%

                      \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b}{3 \cdot a} \leq -0.03:\\ \;\;\;\;\frac{\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)} - b}{3 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b} + -0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}}\\ \end{array} \]

                    Alternative 9: 76.3% accurate, 0.4× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b}{3 \cdot a} \leq -7 \cdot 10^{-7}:\\ \;\;\;\;\frac{\sqrt{\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)} - b}{3 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b}\\ \end{array} \end{array} \]
                    (FPCore (a b c)
                     :precision binary64
                     (if (<= (/ (- (sqrt (- (* b b) (* (* 3.0 a) c))) b) (* 3.0 a)) -7e-7)
                       (/ (- (sqrt (fma a (* c -3.0) (* b b))) b) (* 3.0 a))
                       (* -0.5 (/ c b))))
                    double code(double a, double b, double c) {
                    	double tmp;
                    	if (((sqrt(((b * b) - ((3.0 * a) * c))) - b) / (3.0 * a)) <= -7e-7) {
                    		tmp = (sqrt(fma(a, (c * -3.0), (b * b))) - b) / (3.0 * a);
                    	} else {
                    		tmp = -0.5 * (c / b);
                    	}
                    	return tmp;
                    }
                    
                    function code(a, b, c)
                    	tmp = 0.0
                    	if (Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(Float64(3.0 * a) * c))) - b) / Float64(3.0 * a)) <= -7e-7)
                    		tmp = Float64(Float64(sqrt(fma(a, Float64(c * -3.0), Float64(b * b))) - b) / Float64(3.0 * a));
                    	else
                    		tmp = Float64(-0.5 * Float64(c / b));
                    	end
                    	return tmp
                    end
                    
                    code[a_, b_, c_] := If[LessEqual[N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(N[(3.0 * a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision], -7e-7], N[(N[(N[Sqrt[N[(a * N[(c * -3.0), $MachinePrecision] + N[(b * b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision], N[(-0.5 * N[(c / b), $MachinePrecision]), $MachinePrecision]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    \mathbf{if}\;\frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b}{3 \cdot a} \leq -7 \cdot 10^{-7}:\\
                    \;\;\;\;\frac{\sqrt{\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)} - b}{3 \cdot a}\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;-0.5 \cdot \frac{c}{b}\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (*.f64 3 a)) < -6.99999999999999968e-7

                      1. Initial program 72.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. Simplified72.4%

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

                        if -6.99999999999999968e-7 < (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (*.f64 3 a))

                        1. Initial program 29.0%

                          \[\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 85.8%

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

                        \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b}{3 \cdot a} \leq -7 \cdot 10^{-7}:\\ \;\;\;\;\frac{\sqrt{\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)} - b}{3 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b}\\ \end{array} \]

                      Alternative 10: 76.4% accurate, 0.4× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b}{3 \cdot a} \leq -7 \cdot 10^{-7}:\\ \;\;\;\;\frac{\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)} - b}{3 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b}\\ \end{array} \end{array} \]
                      (FPCore (a b c)
                       :precision binary64
                       (if (<= (/ (- (sqrt (- (* b b) (* (* 3.0 a) c))) b) (* 3.0 a)) -7e-7)
                         (/ (- (sqrt (fma b b (* c (* a -3.0)))) b) (* 3.0 a))
                         (* -0.5 (/ c b))))
                      double code(double a, double b, double c) {
                      	double tmp;
                      	if (((sqrt(((b * b) - ((3.0 * a) * c))) - b) / (3.0 * a)) <= -7e-7) {
                      		tmp = (sqrt(fma(b, b, (c * (a * -3.0)))) - b) / (3.0 * a);
                      	} else {
                      		tmp = -0.5 * (c / b);
                      	}
                      	return tmp;
                      }
                      
                      function code(a, b, c)
                      	tmp = 0.0
                      	if (Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(Float64(3.0 * a) * c))) - b) / Float64(3.0 * a)) <= -7e-7)
                      		tmp = Float64(Float64(sqrt(fma(b, b, Float64(c * Float64(a * -3.0)))) - b) / Float64(3.0 * a));
                      	else
                      		tmp = Float64(-0.5 * Float64(c / b));
                      	end
                      	return tmp
                      end
                      
                      code[a_, b_, c_] := If[LessEqual[N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(N[(3.0 * a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision], -7e-7], N[(N[(N[Sqrt[N[(b * b + N[(c * N[(a * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision], N[(-0.5 * N[(c / b), $MachinePrecision]), $MachinePrecision]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      \mathbf{if}\;\frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b}{3 \cdot a} \leq -7 \cdot 10^{-7}:\\
                      \;\;\;\;\frac{\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)} - b}{3 \cdot a}\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;-0.5 \cdot \frac{c}{b}\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (*.f64 3 a)) < -6.99999999999999968e-7

                        1. Initial program 72.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. Simplified72.5%

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

                          if -6.99999999999999968e-7 < (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (*.f64 3 a))

                          1. Initial program 29.0%

                            \[\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 85.8%

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

                          \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b}{3 \cdot a} \leq -7 \cdot 10^{-7}:\\ \;\;\;\;\frac{\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)} - b}{3 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b}\\ \end{array} \]

                        Alternative 11: 76.3% accurate, 0.5× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b}{3 \cdot a}\\ \mathbf{if}\;t_0 \leq -7 \cdot 10^{-7}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b}\\ \end{array} \end{array} \]
                        (FPCore (a b c)
                         :precision binary64
                         (let* ((t_0 (/ (- (sqrt (- (* b b) (* (* 3.0 a) c))) b) (* 3.0 a))))
                           (if (<= t_0 -7e-7) t_0 (* -0.5 (/ c b)))))
                        double code(double a, double b, double c) {
                        	double t_0 = (sqrt(((b * b) - ((3.0 * a) * c))) - b) / (3.0 * a);
                        	double tmp;
                        	if (t_0 <= -7e-7) {
                        		tmp = t_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) :: t_0
                            real(8) :: tmp
                            t_0 = (sqrt(((b * b) - ((3.0d0 * a) * c))) - b) / (3.0d0 * a)
                            if (t_0 <= (-7d-7)) then
                                tmp = t_0
                            else
                                tmp = (-0.5d0) * (c / b)
                            end if
                            code = tmp
                        end function
                        
                        public static double code(double a, double b, double c) {
                        	double t_0 = (Math.sqrt(((b * b) - ((3.0 * a) * c))) - b) / (3.0 * a);
                        	double tmp;
                        	if (t_0 <= -7e-7) {
                        		tmp = t_0;
                        	} else {
                        		tmp = -0.5 * (c / b);
                        	}
                        	return tmp;
                        }
                        
                        def code(a, b, c):
                        	t_0 = (math.sqrt(((b * b) - ((3.0 * a) * c))) - b) / (3.0 * a)
                        	tmp = 0
                        	if t_0 <= -7e-7:
                        		tmp = t_0
                        	else:
                        		tmp = -0.5 * (c / b)
                        	return tmp
                        
                        function code(a, b, c)
                        	t_0 = Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(Float64(3.0 * a) * c))) - b) / Float64(3.0 * a))
                        	tmp = 0.0
                        	if (t_0 <= -7e-7)
                        		tmp = t_0;
                        	else
                        		tmp = Float64(-0.5 * Float64(c / b));
                        	end
                        	return tmp
                        end
                        
                        function tmp_2 = code(a, b, c)
                        	t_0 = (sqrt(((b * b) - ((3.0 * a) * c))) - b) / (3.0 * a);
                        	tmp = 0.0;
                        	if (t_0 <= -7e-7)
                        		tmp = t_0;
                        	else
                        		tmp = -0.5 * (c / b);
                        	end
                        	tmp_2 = tmp;
                        end
                        
                        code[a_, b_, c_] := Block[{t$95$0 = N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(N[(3.0 * a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -7e-7], t$95$0, N[(-0.5 * N[(c / b), $MachinePrecision]), $MachinePrecision]]]
                        
                        \begin{array}{l}
                        
                        \\
                        \begin{array}{l}
                        t_0 := \frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b}{3 \cdot a}\\
                        \mathbf{if}\;t_0 \leq -7 \cdot 10^{-7}:\\
                        \;\;\;\;t_0\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;-0.5 \cdot \frac{c}{b}\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 2 regimes
                        2. if (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (*.f64 3 a)) < -6.99999999999999968e-7

                          1. Initial program 72.4%

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

                          if -6.99999999999999968e-7 < (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (*.f64 3 a))

                          1. Initial program 29.0%

                            \[\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 85.8%

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

                          \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b}{3 \cdot a} \leq -7 \cdot 10^{-7}:\\ \;\;\;\;\frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b}{3 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b}\\ \end{array} \]

                        Alternative 12: 64.2% 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 53.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 inf 65.9%

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

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

                        Reproduce

                        ?
                        herbie shell --seed 2023307 
                        (FPCore (a b c)
                          :name "Cubic critical, narrow range"
                          :precision binary64
                          :pre (and (and (and (< 1.0536712127723509e-8 a) (< a 94906265.62425156)) (and (< 1.0536712127723509e-8 b) (< b 94906265.62425156))) (and (< 1.0536712127723509e-8 c) (< c 94906265.62425156)))
                          (/ (+ (- b) (sqrt (- (* b b) (* (* 3.0 a) c)))) (* 3.0 a)))