Cubic critical, narrow range

Percentage Accurate: 55.5% → 91.7%
Time: 18.5s
Alternatives: 13
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 13 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.5% 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.7% accurate, 0.1× speedup?

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

\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(b, b, c \cdot \left(-3 \cdot a\right)\right)\\
\mathbf{if}\;b \leq 1.5:\\
\;\;\;\;\frac{t_0 - b \cdot b}{b + \sqrt{t_0}} \cdot \frac{0.3333333333333333}{a}\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-0.5625, \frac{{c}^{3}}{\frac{{b}^{5}}{a \cdot a}}, \mathsf{fma}\left(-0.16666666666666666, \frac{{\left(c \cdot a\right)}^{4}}{{b}^{7}} \cdot \frac{6.328125}{a}, \mathsf{fma}\left(-0.5, \frac{c}{b}, -0.375 \cdot \frac{a \cdot \left(c \cdot c\right)}{{b}^{3}}\right)\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < 1.5

    1. Initial program 86.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right) - b \cdot b}{\sqrt{\mathsf{fma}\left(b, b, \color{blue}{\left(\sqrt[3]{a \cdot \left(c \cdot -3\right)} \cdot \sqrt[3]{a \cdot \left(c \cdot -3\right)}\right) \cdot \sqrt[3]{a \cdot \left(c \cdot -3\right)}}\right)} + b} \cdot \frac{0.3333333333333333}{a} \]
      6. add-cube-cbrt86.9%

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

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

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

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

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

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

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

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

    if 1.5 < b

    1. Initial program 50.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{b - \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)}}{a}} \]
    4. Taylor expanded in b around inf 94.4%

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(-0.5625, \frac{{c}^{3}}{\frac{{b}^{5}}{a \cdot a}}, \mathsf{fma}\left(-0.16666666666666666, \color{blue}{\frac{{c}^{4} \cdot \left(1.265625 \cdot {a}^{4} + 5.0625 \cdot {a}^{4}\right)}{a \cdot {b}^{7}}}, \mathsf{fma}\left(-0.5, \frac{c}{b}, -0.375 \cdot \frac{a \cdot \left(c \cdot c\right)}{{b}^{3}}\right)\right)\right) \]
    8. Step-by-step derivation
      1. *-commutative94.4%

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

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

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

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

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

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

Alternative 2: 89.5% accurate, 0.2× speedup?

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

\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(b, b, c \cdot \left(-3 \cdot a\right)\right)\\
\mathbf{if}\;b \leq 8:\\
\;\;\;\;\frac{t_0 - b \cdot b}{b + \sqrt{t_0}} \cdot \frac{0.3333333333333333}{a}\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-0.5625, \frac{{c}^{3}}{\frac{{b}^{5}}{a \cdot a}}, \mathsf{fma}\left(-0.375, \frac{c \cdot c}{\frac{{b}^{3}}{a}}, \frac{c \cdot -0.5}{b}\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < 8

    1. Initial program 83.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right) - b \cdot b}{\sqrt{\mathsf{fma}\left(b, b, \color{blue}{\left(\sqrt[3]{a \cdot \left(c \cdot -3\right)} \cdot \sqrt[3]{a \cdot \left(c \cdot -3\right)}\right) \cdot \sqrt[3]{a \cdot \left(c \cdot -3\right)}}\right)} + b} \cdot \frac{0.3333333333333333}{a} \]
      6. add-cube-cbrt84.9%

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

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

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

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

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

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

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

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

    if 8 < b

    1. Initial program 49.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{b - \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)}}{a}} \]
    4. Taylor expanded in b around inf 93.1%

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 89.3% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(b, b, c \cdot \left(-3 \cdot a\right)\right)\\
\mathbf{if}\;b \leq 8:\\
\;\;\;\;\frac{t_0 - b \cdot b}{b + \sqrt{t_0}} \cdot \frac{0.3333333333333333}{a}\\

\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(-0.5, \frac{c \cdot a}{b}, -0.375 \cdot \left(\left(a \cdot a\right) \cdot \frac{c \cdot c}{{b}^{3}}\right) + -0.5625 \cdot \frac{{\left(c \cdot a\right)}^{3}}{{b}^{5}}\right)}{a}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < 8

    1. Initial program 83.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right) - b \cdot b}{\sqrt{\mathsf{fma}\left(b, b, \color{blue}{\left(\sqrt[3]{a \cdot \left(c \cdot -3\right)} \cdot \sqrt[3]{a \cdot \left(c \cdot -3\right)}\right) \cdot \sqrt[3]{a \cdot \left(c \cdot -3\right)}}\right)} + b} \cdot \frac{0.3333333333333333}{a} \]
      6. add-cube-cbrt84.9%

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

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

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

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

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

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

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

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

    if 8 < b

    1. Initial program 49.0%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{-0.3333333333333333 \cdot \left(b - \sqrt{\mathsf{fma}\left(b, b, \left(a \cdot c\right) \cdot -3\right)}\right)}{a}} \]
    4. Taylor expanded in b around inf 92.9%

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(-0.5, \frac{c \cdot a}{b}, \mathsf{fma}\left(\frac{c \cdot c}{\frac{{b}^{3}}{a \cdot a}}, -0.375, \frac{{\left(c \cdot a\right)}^{3}}{{b}^{5}} \cdot -0.5625\right)\right)}}{a} \]
    7. Step-by-step derivation
      1. fma-udef92.9%

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

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

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

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

Alternative 4: 85.6% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \mathsf{fma}\left(b, b, c \cdot \left(-3 \cdot a\right)\right)\\ \mathbf{if}\;b \leq 8.2:\\ \;\;\;\;\frac{t_0 - b \cdot b}{b + \sqrt{t_0}} \cdot \frac{0.3333333333333333}{a}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-0.375, \frac{c \cdot c}{\frac{{b}^{3}}{a}}, \frac{c \cdot -0.5}{b}\right)\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (let* ((t_0 (fma b b (* c (* -3.0 a)))))
   (if (<= b 8.2)
     (* (/ (- t_0 (* b b)) (+ b (sqrt t_0))) (/ 0.3333333333333333 a))
     (fma -0.375 (/ (* c c) (/ (pow b 3.0) a)) (/ (* c -0.5) b)))))
double code(double a, double b, double c) {
	double t_0 = fma(b, b, (c * (-3.0 * a)));
	double tmp;
	if (b <= 8.2) {
		tmp = ((t_0 - (b * b)) / (b + sqrt(t_0))) * (0.3333333333333333 / a);
	} else {
		tmp = fma(-0.375, ((c * c) / (pow(b, 3.0) / a)), ((c * -0.5) / b));
	}
	return tmp;
}
function code(a, b, c)
	t_0 = fma(b, b, Float64(c * Float64(-3.0 * a)))
	tmp = 0.0
	if (b <= 8.2)
		tmp = Float64(Float64(Float64(t_0 - Float64(b * b)) / Float64(b + sqrt(t_0))) * Float64(0.3333333333333333 / a));
	else
		tmp = fma(-0.375, Float64(Float64(c * c) / Float64((b ^ 3.0) / a)), Float64(Float64(c * -0.5) / b));
	end
	return tmp
end
code[a_, b_, c_] := Block[{t$95$0 = N[(b * b + N[(c * N[(-3.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, 8.2], N[(N[(N[(t$95$0 - N[(b * b), $MachinePrecision]), $MachinePrecision] / N[(b + N[Sqrt[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(0.3333333333333333 / a), $MachinePrecision]), $MachinePrecision], N[(-0.375 * N[(N[(c * c), $MachinePrecision] / N[(N[Power[b, 3.0], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] + N[(N[(c * -0.5), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(b, b, c \cdot \left(-3 \cdot a\right)\right)\\
\mathbf{if}\;b \leq 8.2:\\
\;\;\;\;\frac{t_0 - b \cdot b}{b + \sqrt{t_0}} \cdot \frac{0.3333333333333333}{a}\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-0.375, \frac{c \cdot c}{\frac{{b}^{3}}{a}}, \frac{c \cdot -0.5}{b}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < 8.1999999999999993

    1. Initial program 83.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. neg-sub083.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(b, b, \color{blue}{\left(\sqrt[3]{a \cdot \left(c \cdot -3\right)} \cdot \sqrt[3]{a \cdot \left(c \cdot -3\right)}\right) \cdot \sqrt[3]{a \cdot \left(c \cdot -3\right)}}\right) - b \cdot b}{\sqrt{\mathsf{fma}\left(b, b, {\left(\sqrt[3]{a \cdot \left(c \cdot -3\right)}\right)}^{3}\right)} + b} \cdot \frac{0.3333333333333333}{a} \]
      4. add-cube-cbrt84.8%

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

        \[\leadsto \frac{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right) - b \cdot b}{\sqrt{\mathsf{fma}\left(b, b, \color{blue}{\left(\sqrt[3]{a \cdot \left(c \cdot -3\right)} \cdot \sqrt[3]{a \cdot \left(c \cdot -3\right)}\right) \cdot \sqrt[3]{a \cdot \left(c \cdot -3\right)}}\right)} + b} \cdot \frac{0.3333333333333333}{a} \]
      6. add-cube-cbrt84.8%

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

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

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

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

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

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

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

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

    if 8.1999999999999993 < b

    1. Initial program 48.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{b - \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)}}{a}} \]
    4. Taylor expanded in b around inf 88.3%

      \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b} + -0.375 \cdot \frac{{c}^{2} \cdot a}{{b}^{3}}} \]
    5. Step-by-step derivation
      1. +-commutative88.3%

        \[\leadsto \color{blue}{-0.375 \cdot \frac{{c}^{2} \cdot a}{{b}^{3}} + -0.5 \cdot \frac{c}{b}} \]
      2. fma-def88.3%

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

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

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

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

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

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

Alternative 5: 85.4% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq 8.2:\\
\;\;\;\;\left(\sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)} - b\right) \cdot \sqrt{\frac{0.1111111111111111}{a \cdot a}}\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-0.375, \frac{c \cdot c}{\frac{{b}^{3}}{a}}, \frac{c \cdot -0.5}{b}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < 8.1999999999999993

    1. Initial program 83.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. neg-sub083.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.1999999999999993 < b

    1. Initial program 48.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{b - \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)}}{a}} \]
    4. Taylor expanded in b around inf 88.3%

      \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b} + -0.375 \cdot \frac{{c}^{2} \cdot a}{{b}^{3}}} \]
    5. Step-by-step derivation
      1. +-commutative88.3%

        \[\leadsto \color{blue}{-0.375 \cdot \frac{{c}^{2} \cdot a}{{b}^{3}} + -0.5 \cdot \frac{c}{b}} \]
      2. fma-def88.3%

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

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

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

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

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

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

Alternative 6: 85.4% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq 8.2:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{b - \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)}}{a}\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-0.375, \frac{c \cdot c}{\frac{{b}^{3}}{a}}, \frac{c \cdot -0.5}{b}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < 8.1999999999999993

    1. Initial program 83.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.1999999999999993 < b

    1. Initial program 48.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{b - \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)}}{a}} \]
    4. Taylor expanded in b around inf 88.3%

      \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b} + -0.375 \cdot \frac{{c}^{2} \cdot a}{{b}^{3}}} \]
    5. Step-by-step derivation
      1. +-commutative88.3%

        \[\leadsto \color{blue}{-0.375 \cdot \frac{{c}^{2} \cdot a}{{b}^{3}} + -0.5 \cdot \frac{c}{b}} \]
      2. fma-def88.3%

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

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

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

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

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

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

Alternative 7: 85.2% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq 8.2:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{b - \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)}}{a}\\ \mathbf{else}:\\ \;\;\;\;-0.3333333333333333 \cdot \left(\frac{a \cdot \left(c \cdot c\right)}{{b}^{3}} \cdot 1.125 + 1.5 \cdot \frac{c}{b}\right)\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b 8.2)
   (* -0.3333333333333333 (/ (- b (sqrt (fma b b (* a (* c -3.0))))) a))
   (*
    -0.3333333333333333
    (+ (* (/ (* a (* c c)) (pow b 3.0)) 1.125) (* 1.5 (/ c b))))))
double code(double a, double b, double c) {
	double tmp;
	if (b <= 8.2) {
		tmp = -0.3333333333333333 * ((b - sqrt(fma(b, b, (a * (c * -3.0))))) / a);
	} else {
		tmp = -0.3333333333333333 * ((((a * (c * c)) / pow(b, 3.0)) * 1.125) + (1.5 * (c / b)));
	}
	return tmp;
}
function code(a, b, c)
	tmp = 0.0
	if (b <= 8.2)
		tmp = Float64(-0.3333333333333333 * Float64(Float64(b - sqrt(fma(b, b, Float64(a * Float64(c * -3.0))))) / a));
	else
		tmp = Float64(-0.3333333333333333 * Float64(Float64(Float64(Float64(a * Float64(c * c)) / (b ^ 3.0)) * 1.125) + Float64(1.5 * Float64(c / b))));
	end
	return tmp
end
code[a_, b_, c_] := If[LessEqual[b, 8.2], N[(-0.3333333333333333 * N[(N[(b - N[Sqrt[N[(b * b + N[(a * N[(c * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(-0.3333333333333333 * N[(N[(N[(N[(a * N[(c * c), $MachinePrecision]), $MachinePrecision] / N[Power[b, 3.0], $MachinePrecision]), $MachinePrecision] * 1.125), $MachinePrecision] + N[(1.5 * N[(c / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq 8.2:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{b - \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)}}{a}\\

\mathbf{else}:\\
\;\;\;\;-0.3333333333333333 \cdot \left(\frac{a \cdot \left(c \cdot c\right)}{{b}^{3}} \cdot 1.125 + 1.5 \cdot \frac{c}{b}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < 8.1999999999999993

    1. Initial program 83.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.1999999999999993 < b

    1. Initial program 48.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{b - \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)}}{a}} \]
    4. Taylor expanded in b around inf 88.0%

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

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

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

        \[\leadsto -0.3333333333333333 \cdot \mathsf{fma}\left(1.125, \frac{a \cdot \color{blue}{\left(c \cdot c\right)}}{{b}^{3}}, 1.5 \cdot \frac{c}{b}\right) \]
    6. Simplified88.0%

      \[\leadsto -0.3333333333333333 \cdot \color{blue}{\mathsf{fma}\left(1.125, \frac{a \cdot \left(c \cdot c\right)}{{b}^{3}}, 1.5 \cdot \frac{c}{b}\right)} \]
    7. Step-by-step derivation
      1. fma-udef88.0%

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

        \[\leadsto -0.3333333333333333 \cdot \left(1.125 \cdot \frac{\color{blue}{\left(c \cdot c\right) \cdot a}}{{b}^{3}} + 1.5 \cdot \frac{c}{b}\right) \]
    8. Applied egg-rr88.0%

      \[\leadsto -0.3333333333333333 \cdot \color{blue}{\left(1.125 \cdot \frac{\left(c \cdot c\right) \cdot a}{{b}^{3}} + 1.5 \cdot \frac{c}{b}\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification87.1%

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

Alternative 8: 85.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq 8.2:\\ \;\;\;\;\frac{\sqrt{b \cdot b - a \cdot \left(c \cdot 3\right)} - b}{a \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;-0.3333333333333333 \cdot \left(\frac{a \cdot \left(c \cdot c\right)}{{b}^{3}} \cdot 1.125 + 1.5 \cdot \frac{c}{b}\right)\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b 8.2)
   (/ (- (sqrt (- (* b b) (* a (* c 3.0)))) b) (* a 3.0))
   (*
    -0.3333333333333333
    (+ (* (/ (* a (* c c)) (pow b 3.0)) 1.125) (* 1.5 (/ c b))))))
double code(double a, double b, double c) {
	double tmp;
	if (b <= 8.2) {
		tmp = (sqrt(((b * b) - (a * (c * 3.0)))) - b) / (a * 3.0);
	} else {
		tmp = -0.3333333333333333 * ((((a * (c * c)) / pow(b, 3.0)) * 1.125) + (1.5 * (c / b)));
	}
	return tmp;
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: tmp
    if (b <= 8.2d0) then
        tmp = (sqrt(((b * b) - (a * (c * 3.0d0)))) - b) / (a * 3.0d0)
    else
        tmp = (-0.3333333333333333d0) * ((((a * (c * c)) / (b ** 3.0d0)) * 1.125d0) + (1.5d0 * (c / b)))
    end if
    code = tmp
end function
public static double code(double a, double b, double c) {
	double tmp;
	if (b <= 8.2) {
		tmp = (Math.sqrt(((b * b) - (a * (c * 3.0)))) - b) / (a * 3.0);
	} else {
		tmp = -0.3333333333333333 * ((((a * (c * c)) / Math.pow(b, 3.0)) * 1.125) + (1.5 * (c / b)));
	}
	return tmp;
}
def code(a, b, c):
	tmp = 0
	if b <= 8.2:
		tmp = (math.sqrt(((b * b) - (a * (c * 3.0)))) - b) / (a * 3.0)
	else:
		tmp = -0.3333333333333333 * ((((a * (c * c)) / math.pow(b, 3.0)) * 1.125) + (1.5 * (c / b)))
	return tmp
function code(a, b, c)
	tmp = 0.0
	if (b <= 8.2)
		tmp = Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(a * Float64(c * 3.0)))) - b) / Float64(a * 3.0));
	else
		tmp = Float64(-0.3333333333333333 * Float64(Float64(Float64(Float64(a * Float64(c * c)) / (b ^ 3.0)) * 1.125) + Float64(1.5 * Float64(c / b))));
	end
	return tmp
end
function tmp_2 = code(a, b, c)
	tmp = 0.0;
	if (b <= 8.2)
		tmp = (sqrt(((b * b) - (a * (c * 3.0)))) - b) / (a * 3.0);
	else
		tmp = -0.3333333333333333 * ((((a * (c * c)) / (b ^ 3.0)) * 1.125) + (1.5 * (c / b)));
	end
	tmp_2 = tmp;
end
code[a_, b_, c_] := If[LessEqual[b, 8.2], N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(a * N[(c * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 3.0), $MachinePrecision]), $MachinePrecision], N[(-0.3333333333333333 * N[(N[(N[(N[(a * N[(c * c), $MachinePrecision]), $MachinePrecision] / N[Power[b, 3.0], $MachinePrecision]), $MachinePrecision] * 1.125), $MachinePrecision] + N[(1.5 * N[(c / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq 8.2:\\
\;\;\;\;\frac{\sqrt{b \cdot b - a \cdot \left(c \cdot 3\right)} - b}{a \cdot 3}\\

\mathbf{else}:\\
\;\;\;\;-0.3333333333333333 \cdot \left(\frac{a \cdot \left(c \cdot c\right)}{{b}^{3}} \cdot 1.125 + 1.5 \cdot \frac{c}{b}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < 8.1999999999999993

    1. Initial program 83.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. neg-sub083.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.1999999999999993 < b

    1. Initial program 48.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{b - \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)}}{a}} \]
    4. Taylor expanded in b around inf 88.0%

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

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

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

        \[\leadsto -0.3333333333333333 \cdot \mathsf{fma}\left(1.125, \frac{a \cdot \color{blue}{\left(c \cdot c\right)}}{{b}^{3}}, 1.5 \cdot \frac{c}{b}\right) \]
    6. Simplified88.0%

      \[\leadsto -0.3333333333333333 \cdot \color{blue}{\mathsf{fma}\left(1.125, \frac{a \cdot \left(c \cdot c\right)}{{b}^{3}}, 1.5 \cdot \frac{c}{b}\right)} \]
    7. Step-by-step derivation
      1. fma-udef88.0%

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

        \[\leadsto -0.3333333333333333 \cdot \left(1.125 \cdot \frac{\color{blue}{\left(c \cdot c\right) \cdot a}}{{b}^{3}} + 1.5 \cdot \frac{c}{b}\right) \]
    8. Applied egg-rr88.0%

      \[\leadsto -0.3333333333333333 \cdot \color{blue}{\left(1.125 \cdot \frac{\left(c \cdot c\right) \cdot a}{{b}^{3}} + 1.5 \cdot \frac{c}{b}\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification87.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 8.2:\\ \;\;\;\;\frac{\sqrt{b \cdot b - a \cdot \left(c \cdot 3\right)} - b}{a \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;-0.3333333333333333 \cdot \left(\frac{a \cdot \left(c \cdot c\right)}{{b}^{3}} \cdot 1.125 + 1.5 \cdot \frac{c}{b}\right)\\ \end{array} \]

Alternative 9: 85.1% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq 8.2:\\ \;\;\;\;\frac{\sqrt{b \cdot b - 3 \cdot \left(c \cdot a\right)} - b}{a \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;-0.3333333333333333 \cdot \left(c \cdot \left(\frac{1.5}{b} + 1.125 \cdot \left(c \cdot \left(a \cdot {b}^{-3}\right)\right)\right)\right)\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b 8.2)
   (/ (- (sqrt (- (* b b) (* 3.0 (* c a)))) b) (* a 3.0))
   (*
    -0.3333333333333333
    (* c (+ (/ 1.5 b) (* 1.125 (* c (* a (pow b -3.0)))))))))
double code(double a, double b, double c) {
	double tmp;
	if (b <= 8.2) {
		tmp = (sqrt(((b * b) - (3.0 * (c * a)))) - b) / (a * 3.0);
	} else {
		tmp = -0.3333333333333333 * (c * ((1.5 / b) + (1.125 * (c * (a * pow(b, -3.0))))));
	}
	return tmp;
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: tmp
    if (b <= 8.2d0) then
        tmp = (sqrt(((b * b) - (3.0d0 * (c * a)))) - b) / (a * 3.0d0)
    else
        tmp = (-0.3333333333333333d0) * (c * ((1.5d0 / b) + (1.125d0 * (c * (a * (b ** (-3.0d0)))))))
    end if
    code = tmp
end function
public static double code(double a, double b, double c) {
	double tmp;
	if (b <= 8.2) {
		tmp = (Math.sqrt(((b * b) - (3.0 * (c * a)))) - b) / (a * 3.0);
	} else {
		tmp = -0.3333333333333333 * (c * ((1.5 / b) + (1.125 * (c * (a * Math.pow(b, -3.0))))));
	}
	return tmp;
}
def code(a, b, c):
	tmp = 0
	if b <= 8.2:
		tmp = (math.sqrt(((b * b) - (3.0 * (c * a)))) - b) / (a * 3.0)
	else:
		tmp = -0.3333333333333333 * (c * ((1.5 / b) + (1.125 * (c * (a * math.pow(b, -3.0))))))
	return tmp
function code(a, b, c)
	tmp = 0.0
	if (b <= 8.2)
		tmp = Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(3.0 * Float64(c * a)))) - b) / Float64(a * 3.0));
	else
		tmp = Float64(-0.3333333333333333 * Float64(c * Float64(Float64(1.5 / b) + Float64(1.125 * Float64(c * Float64(a * (b ^ -3.0)))))));
	end
	return tmp
end
function tmp_2 = code(a, b, c)
	tmp = 0.0;
	if (b <= 8.2)
		tmp = (sqrt(((b * b) - (3.0 * (c * a)))) - b) / (a * 3.0);
	else
		tmp = -0.3333333333333333 * (c * ((1.5 / b) + (1.125 * (c * (a * (b ^ -3.0))))));
	end
	tmp_2 = tmp;
end
code[a_, b_, c_] := If[LessEqual[b, 8.2], N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(3.0 * N[(c * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 3.0), $MachinePrecision]), $MachinePrecision], N[(-0.3333333333333333 * N[(c * N[(N[(1.5 / b), $MachinePrecision] + N[(1.125 * N[(c * N[(a * N[Power[b, -3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq 8.2:\\
\;\;\;\;\frac{\sqrt{b \cdot b - 3 \cdot \left(c \cdot a\right)} - b}{a \cdot 3}\\

\mathbf{else}:\\
\;\;\;\;-0.3333333333333333 \cdot \left(c \cdot \left(\frac{1.5}{b} + 1.125 \cdot \left(c \cdot \left(a \cdot {b}^{-3}\right)\right)\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < 8.1999999999999993

    1. Initial program 83.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. neg-sub083.7%

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.1999999999999993 < b

    1. Initial program 48.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{b - \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)}}{a}} \]
    4. Taylor expanded in b around inf 88.0%

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

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

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

        \[\leadsto -0.3333333333333333 \cdot \mathsf{fma}\left(1.125, \frac{a \cdot \color{blue}{\left(c \cdot c\right)}}{{b}^{3}}, 1.5 \cdot \frac{c}{b}\right) \]
    6. Simplified88.0%

      \[\leadsto -0.3333333333333333 \cdot \color{blue}{\mathsf{fma}\left(1.125, \frac{a \cdot \left(c \cdot c\right)}{{b}^{3}}, 1.5 \cdot \frac{c}{b}\right)} \]
    7. Step-by-step derivation
      1. add-exp-log86.4%

        \[\leadsto -0.3333333333333333 \cdot \color{blue}{e^{\log \left(\mathsf{fma}\left(1.125, \frac{a \cdot \left(c \cdot c\right)}{{b}^{3}}, 1.5 \cdot \frac{c}{b}\right)\right)}} \]
      2. *-commutative86.4%

        \[\leadsto -0.3333333333333333 \cdot e^{\log \left(\mathsf{fma}\left(1.125, \frac{\color{blue}{\left(c \cdot c\right) \cdot a}}{{b}^{3}}, 1.5 \cdot \frac{c}{b}\right)\right)} \]
    8. Applied egg-rr86.4%

      \[\leadsto -0.3333333333333333 \cdot \color{blue}{e^{\log \left(\mathsf{fma}\left(1.125, \frac{\left(c \cdot c\right) \cdot a}{{b}^{3}}, 1.5 \cdot \frac{c}{b}\right)\right)}} \]
    9. Step-by-step derivation
      1. add-exp-log88.0%

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

        \[\leadsto -0.3333333333333333 \cdot \color{blue}{\left(1.125 \cdot \frac{\left(c \cdot c\right) \cdot a}{{b}^{3}} + 1.5 \cdot \frac{c}{b}\right)} \]
      3. div-inv88.0%

        \[\leadsto -0.3333333333333333 \cdot \left(1.125 \cdot \color{blue}{\left(\left(\left(c \cdot c\right) \cdot a\right) \cdot \frac{1}{{b}^{3}}\right)} + 1.5 \cdot \frac{c}{b}\right) \]
      4. associate-*l*88.0%

        \[\leadsto -0.3333333333333333 \cdot \left(1.125 \cdot \left(\color{blue}{\left(c \cdot \left(c \cdot a\right)\right)} \cdot \frac{1}{{b}^{3}}\right) + 1.5 \cdot \frac{c}{b}\right) \]
      5. pow-flip88.0%

        \[\leadsto -0.3333333333333333 \cdot \left(1.125 \cdot \left(\left(c \cdot \left(c \cdot a\right)\right) \cdot \color{blue}{{b}^{\left(-3\right)}}\right) + 1.5 \cdot \frac{c}{b}\right) \]
      6. metadata-eval88.0%

        \[\leadsto -0.3333333333333333 \cdot \left(1.125 \cdot \left(\left(c \cdot \left(c \cdot a\right)\right) \cdot {b}^{\color{blue}{-3}}\right) + 1.5 \cdot \frac{c}{b}\right) \]
    10. Applied egg-rr88.0%

      \[\leadsto -0.3333333333333333 \cdot \color{blue}{\left(1.125 \cdot \left(\left(c \cdot \left(c \cdot a\right)\right) \cdot {b}^{-3}\right) + 1.5 \cdot \frac{c}{b}\right)} \]
    11. Step-by-step derivation
      1. +-commutative88.0%

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

        \[\leadsto -0.3333333333333333 \cdot \left(\color{blue}{\frac{c}{b} \cdot 1.5} + 1.125 \cdot \left(\left(c \cdot \left(c \cdot a\right)\right) \cdot {b}^{-3}\right)\right) \]
      3. metadata-eval88.0%

        \[\leadsto -0.3333333333333333 \cdot \left(\frac{c}{b} \cdot \color{blue}{\frac{1}{0.6666666666666666}} + 1.125 \cdot \left(\left(c \cdot \left(c \cdot a\right)\right) \cdot {b}^{-3}\right)\right) \]
      4. times-frac88.0%

        \[\leadsto -0.3333333333333333 \cdot \left(\color{blue}{\frac{c \cdot 1}{b \cdot 0.6666666666666666}} + 1.125 \cdot \left(\left(c \cdot \left(c \cdot a\right)\right) \cdot {b}^{-3}\right)\right) \]
      5. associate-*r/88.0%

        \[\leadsto -0.3333333333333333 \cdot \left(\color{blue}{c \cdot \frac{1}{b \cdot 0.6666666666666666}} + 1.125 \cdot \left(\left(c \cdot \left(c \cdot a\right)\right) \cdot {b}^{-3}\right)\right) \]
      6. *-commutative88.0%

        \[\leadsto -0.3333333333333333 \cdot \left(c \cdot \frac{1}{b \cdot 0.6666666666666666} + \color{blue}{\left(\left(c \cdot \left(c \cdot a\right)\right) \cdot {b}^{-3}\right) \cdot 1.125}\right) \]
      7. associate-*l*88.0%

        \[\leadsto -0.3333333333333333 \cdot \left(c \cdot \frac{1}{b \cdot 0.6666666666666666} + \color{blue}{\left(c \cdot \left(\left(c \cdot a\right) \cdot {b}^{-3}\right)\right)} \cdot 1.125\right) \]
      8. associate-*l*88.0%

        \[\leadsto -0.3333333333333333 \cdot \left(c \cdot \frac{1}{b \cdot 0.6666666666666666} + \color{blue}{c \cdot \left(\left(\left(c \cdot a\right) \cdot {b}^{-3}\right) \cdot 1.125\right)}\right) \]
      9. distribute-lft-out88.0%

        \[\leadsto -0.3333333333333333 \cdot \color{blue}{\left(c \cdot \left(\frac{1}{b \cdot 0.6666666666666666} + \left(\left(c \cdot a\right) \cdot {b}^{-3}\right) \cdot 1.125\right)\right)} \]
      10. *-commutative88.0%

        \[\leadsto -0.3333333333333333 \cdot \left(c \cdot \left(\frac{1}{\color{blue}{0.6666666666666666 \cdot b}} + \left(\left(c \cdot a\right) \cdot {b}^{-3}\right) \cdot 1.125\right)\right) \]
      11. associate-/r*88.0%

        \[\leadsto -0.3333333333333333 \cdot \left(c \cdot \left(\color{blue}{\frac{\frac{1}{0.6666666666666666}}{b}} + \left(\left(c \cdot a\right) \cdot {b}^{-3}\right) \cdot 1.125\right)\right) \]
      12. metadata-eval88.0%

        \[\leadsto -0.3333333333333333 \cdot \left(c \cdot \left(\frac{\color{blue}{1.5}}{b} + \left(\left(c \cdot a\right) \cdot {b}^{-3}\right) \cdot 1.125\right)\right) \]
      13. associate-*l*88.0%

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

      \[\leadsto -0.3333333333333333 \cdot \color{blue}{\left(c \cdot \left(\frac{1.5}{b} + \left(c \cdot \left(a \cdot {b}^{-3}\right)\right) \cdot 1.125\right)\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification86.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 8.2:\\ \;\;\;\;\frac{\sqrt{b \cdot b - 3 \cdot \left(c \cdot a\right)} - b}{a \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;-0.3333333333333333 \cdot \left(c \cdot \left(\frac{1.5}{b} + 1.125 \cdot \left(c \cdot \left(a \cdot {b}^{-3}\right)\right)\right)\right)\\ \end{array} \]

Alternative 10: 85.1% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq 8.2:\\ \;\;\;\;\frac{\sqrt{b \cdot b - a \cdot \left(c \cdot 3\right)} - b}{a \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;-0.3333333333333333 \cdot \left(c \cdot \left(\frac{1.5}{b} + 1.125 \cdot \left(c \cdot \left(a \cdot {b}^{-3}\right)\right)\right)\right)\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b 8.2)
   (/ (- (sqrt (- (* b b) (* a (* c 3.0)))) b) (* a 3.0))
   (*
    -0.3333333333333333
    (* c (+ (/ 1.5 b) (* 1.125 (* c (* a (pow b -3.0)))))))))
double code(double a, double b, double c) {
	double tmp;
	if (b <= 8.2) {
		tmp = (sqrt(((b * b) - (a * (c * 3.0)))) - b) / (a * 3.0);
	} else {
		tmp = -0.3333333333333333 * (c * ((1.5 / b) + (1.125 * (c * (a * pow(b, -3.0))))));
	}
	return tmp;
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: tmp
    if (b <= 8.2d0) then
        tmp = (sqrt(((b * b) - (a * (c * 3.0d0)))) - b) / (a * 3.0d0)
    else
        tmp = (-0.3333333333333333d0) * (c * ((1.5d0 / b) + (1.125d0 * (c * (a * (b ** (-3.0d0)))))))
    end if
    code = tmp
end function
public static double code(double a, double b, double c) {
	double tmp;
	if (b <= 8.2) {
		tmp = (Math.sqrt(((b * b) - (a * (c * 3.0)))) - b) / (a * 3.0);
	} else {
		tmp = -0.3333333333333333 * (c * ((1.5 / b) + (1.125 * (c * (a * Math.pow(b, -3.0))))));
	}
	return tmp;
}
def code(a, b, c):
	tmp = 0
	if b <= 8.2:
		tmp = (math.sqrt(((b * b) - (a * (c * 3.0)))) - b) / (a * 3.0)
	else:
		tmp = -0.3333333333333333 * (c * ((1.5 / b) + (1.125 * (c * (a * math.pow(b, -3.0))))))
	return tmp
function code(a, b, c)
	tmp = 0.0
	if (b <= 8.2)
		tmp = Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(a * Float64(c * 3.0)))) - b) / Float64(a * 3.0));
	else
		tmp = Float64(-0.3333333333333333 * Float64(c * Float64(Float64(1.5 / b) + Float64(1.125 * Float64(c * Float64(a * (b ^ -3.0)))))));
	end
	return tmp
end
function tmp_2 = code(a, b, c)
	tmp = 0.0;
	if (b <= 8.2)
		tmp = (sqrt(((b * b) - (a * (c * 3.0)))) - b) / (a * 3.0);
	else
		tmp = -0.3333333333333333 * (c * ((1.5 / b) + (1.125 * (c * (a * (b ^ -3.0))))));
	end
	tmp_2 = tmp;
end
code[a_, b_, c_] := If[LessEqual[b, 8.2], N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(a * N[(c * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 3.0), $MachinePrecision]), $MachinePrecision], N[(-0.3333333333333333 * N[(c * N[(N[(1.5 / b), $MachinePrecision] + N[(1.125 * N[(c * N[(a * N[Power[b, -3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq 8.2:\\
\;\;\;\;\frac{\sqrt{b \cdot b - a \cdot \left(c \cdot 3\right)} - b}{a \cdot 3}\\

\mathbf{else}:\\
\;\;\;\;-0.3333333333333333 \cdot \left(c \cdot \left(\frac{1.5}{b} + 1.125 \cdot \left(c \cdot \left(a \cdot {b}^{-3}\right)\right)\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < 8.1999999999999993

    1. Initial program 83.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. neg-sub083.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.1999999999999993 < b

    1. Initial program 48.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{b - \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)}}{a}} \]
    4. Taylor expanded in b around inf 88.0%

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

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

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

        \[\leadsto -0.3333333333333333 \cdot \mathsf{fma}\left(1.125, \frac{a \cdot \color{blue}{\left(c \cdot c\right)}}{{b}^{3}}, 1.5 \cdot \frac{c}{b}\right) \]
    6. Simplified88.0%

      \[\leadsto -0.3333333333333333 \cdot \color{blue}{\mathsf{fma}\left(1.125, \frac{a \cdot \left(c \cdot c\right)}{{b}^{3}}, 1.5 \cdot \frac{c}{b}\right)} \]
    7. Step-by-step derivation
      1. add-exp-log86.4%

        \[\leadsto -0.3333333333333333 \cdot \color{blue}{e^{\log \left(\mathsf{fma}\left(1.125, \frac{a \cdot \left(c \cdot c\right)}{{b}^{3}}, 1.5 \cdot \frac{c}{b}\right)\right)}} \]
      2. *-commutative86.4%

        \[\leadsto -0.3333333333333333 \cdot e^{\log \left(\mathsf{fma}\left(1.125, \frac{\color{blue}{\left(c \cdot c\right) \cdot a}}{{b}^{3}}, 1.5 \cdot \frac{c}{b}\right)\right)} \]
    8. Applied egg-rr86.4%

      \[\leadsto -0.3333333333333333 \cdot \color{blue}{e^{\log \left(\mathsf{fma}\left(1.125, \frac{\left(c \cdot c\right) \cdot a}{{b}^{3}}, 1.5 \cdot \frac{c}{b}\right)\right)}} \]
    9. Step-by-step derivation
      1. add-exp-log88.0%

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

        \[\leadsto -0.3333333333333333 \cdot \color{blue}{\left(1.125 \cdot \frac{\left(c \cdot c\right) \cdot a}{{b}^{3}} + 1.5 \cdot \frac{c}{b}\right)} \]
      3. div-inv88.0%

        \[\leadsto -0.3333333333333333 \cdot \left(1.125 \cdot \color{blue}{\left(\left(\left(c \cdot c\right) \cdot a\right) \cdot \frac{1}{{b}^{3}}\right)} + 1.5 \cdot \frac{c}{b}\right) \]
      4. associate-*l*88.0%

        \[\leadsto -0.3333333333333333 \cdot \left(1.125 \cdot \left(\color{blue}{\left(c \cdot \left(c \cdot a\right)\right)} \cdot \frac{1}{{b}^{3}}\right) + 1.5 \cdot \frac{c}{b}\right) \]
      5. pow-flip88.0%

        \[\leadsto -0.3333333333333333 \cdot \left(1.125 \cdot \left(\left(c \cdot \left(c \cdot a\right)\right) \cdot \color{blue}{{b}^{\left(-3\right)}}\right) + 1.5 \cdot \frac{c}{b}\right) \]
      6. metadata-eval88.0%

        \[\leadsto -0.3333333333333333 \cdot \left(1.125 \cdot \left(\left(c \cdot \left(c \cdot a\right)\right) \cdot {b}^{\color{blue}{-3}}\right) + 1.5 \cdot \frac{c}{b}\right) \]
    10. Applied egg-rr88.0%

      \[\leadsto -0.3333333333333333 \cdot \color{blue}{\left(1.125 \cdot \left(\left(c \cdot \left(c \cdot a\right)\right) \cdot {b}^{-3}\right) + 1.5 \cdot \frac{c}{b}\right)} \]
    11. Step-by-step derivation
      1. +-commutative88.0%

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

        \[\leadsto -0.3333333333333333 \cdot \left(\color{blue}{\frac{c}{b} \cdot 1.5} + 1.125 \cdot \left(\left(c \cdot \left(c \cdot a\right)\right) \cdot {b}^{-3}\right)\right) \]
      3. metadata-eval88.0%

        \[\leadsto -0.3333333333333333 \cdot \left(\frac{c}{b} \cdot \color{blue}{\frac{1}{0.6666666666666666}} + 1.125 \cdot \left(\left(c \cdot \left(c \cdot a\right)\right) \cdot {b}^{-3}\right)\right) \]
      4. times-frac88.0%

        \[\leadsto -0.3333333333333333 \cdot \left(\color{blue}{\frac{c \cdot 1}{b \cdot 0.6666666666666666}} + 1.125 \cdot \left(\left(c \cdot \left(c \cdot a\right)\right) \cdot {b}^{-3}\right)\right) \]
      5. associate-*r/88.0%

        \[\leadsto -0.3333333333333333 \cdot \left(\color{blue}{c \cdot \frac{1}{b \cdot 0.6666666666666666}} + 1.125 \cdot \left(\left(c \cdot \left(c \cdot a\right)\right) \cdot {b}^{-3}\right)\right) \]
      6. *-commutative88.0%

        \[\leadsto -0.3333333333333333 \cdot \left(c \cdot \frac{1}{b \cdot 0.6666666666666666} + \color{blue}{\left(\left(c \cdot \left(c \cdot a\right)\right) \cdot {b}^{-3}\right) \cdot 1.125}\right) \]
      7. associate-*l*88.0%

        \[\leadsto -0.3333333333333333 \cdot \left(c \cdot \frac{1}{b \cdot 0.6666666666666666} + \color{blue}{\left(c \cdot \left(\left(c \cdot a\right) \cdot {b}^{-3}\right)\right)} \cdot 1.125\right) \]
      8. associate-*l*88.0%

        \[\leadsto -0.3333333333333333 \cdot \left(c \cdot \frac{1}{b \cdot 0.6666666666666666} + \color{blue}{c \cdot \left(\left(\left(c \cdot a\right) \cdot {b}^{-3}\right) \cdot 1.125\right)}\right) \]
      9. distribute-lft-out88.0%

        \[\leadsto -0.3333333333333333 \cdot \color{blue}{\left(c \cdot \left(\frac{1}{b \cdot 0.6666666666666666} + \left(\left(c \cdot a\right) \cdot {b}^{-3}\right) \cdot 1.125\right)\right)} \]
      10. *-commutative88.0%

        \[\leadsto -0.3333333333333333 \cdot \left(c \cdot \left(\frac{1}{\color{blue}{0.6666666666666666 \cdot b}} + \left(\left(c \cdot a\right) \cdot {b}^{-3}\right) \cdot 1.125\right)\right) \]
      11. associate-/r*88.0%

        \[\leadsto -0.3333333333333333 \cdot \left(c \cdot \left(\color{blue}{\frac{\frac{1}{0.6666666666666666}}{b}} + \left(\left(c \cdot a\right) \cdot {b}^{-3}\right) \cdot 1.125\right)\right) \]
      12. metadata-eval88.0%

        \[\leadsto -0.3333333333333333 \cdot \left(c \cdot \left(\frac{\color{blue}{1.5}}{b} + \left(\left(c \cdot a\right) \cdot {b}^{-3}\right) \cdot 1.125\right)\right) \]
      13. associate-*l*88.0%

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

      \[\leadsto -0.3333333333333333 \cdot \color{blue}{\left(c \cdot \left(\frac{1.5}{b} + \left(c \cdot \left(a \cdot {b}^{-3}\right)\right) \cdot 1.125\right)\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification87.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 8.2:\\ \;\;\;\;\frac{\sqrt{b \cdot b - a \cdot \left(c \cdot 3\right)} - b}{a \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;-0.3333333333333333 \cdot \left(c \cdot \left(\frac{1.5}{b} + 1.125 \cdot \left(c \cdot \left(a \cdot {b}^{-3}\right)\right)\right)\right)\\ \end{array} \]

Alternative 11: 81.3% accurate, 1.0× speedup?

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

\\
-0.3333333333333333 \cdot \left(c \cdot \left(\frac{1.5}{b} + 1.125 \cdot \left(c \cdot \left(a \cdot {b}^{-3}\right)\right)\right)\right)
\end{array}
Derivation
  1. Initial program 57.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{b - \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)}}{a}} \]
  4. Taylor expanded in b around inf 80.2%

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

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

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

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

    \[\leadsto -0.3333333333333333 \cdot \color{blue}{\mathsf{fma}\left(1.125, \frac{a \cdot \left(c \cdot c\right)}{{b}^{3}}, 1.5 \cdot \frac{c}{b}\right)} \]
  7. Step-by-step derivation
    1. add-exp-log78.9%

      \[\leadsto -0.3333333333333333 \cdot \color{blue}{e^{\log \left(\mathsf{fma}\left(1.125, \frac{a \cdot \left(c \cdot c\right)}{{b}^{3}}, 1.5 \cdot \frac{c}{b}\right)\right)}} \]
    2. *-commutative78.9%

      \[\leadsto -0.3333333333333333 \cdot e^{\log \left(\mathsf{fma}\left(1.125, \frac{\color{blue}{\left(c \cdot c\right) \cdot a}}{{b}^{3}}, 1.5 \cdot \frac{c}{b}\right)\right)} \]
  8. Applied egg-rr78.9%

    \[\leadsto -0.3333333333333333 \cdot \color{blue}{e^{\log \left(\mathsf{fma}\left(1.125, \frac{\left(c \cdot c\right) \cdot a}{{b}^{3}}, 1.5 \cdot \frac{c}{b}\right)\right)}} \]
  9. Step-by-step derivation
    1. add-exp-log80.2%

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

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

      \[\leadsto -0.3333333333333333 \cdot \left(1.125 \cdot \color{blue}{\left(\left(\left(c \cdot c\right) \cdot a\right) \cdot \frac{1}{{b}^{3}}\right)} + 1.5 \cdot \frac{c}{b}\right) \]
    4. associate-*l*80.2%

      \[\leadsto -0.3333333333333333 \cdot \left(1.125 \cdot \left(\color{blue}{\left(c \cdot \left(c \cdot a\right)\right)} \cdot \frac{1}{{b}^{3}}\right) + 1.5 \cdot \frac{c}{b}\right) \]
    5. pow-flip80.2%

      \[\leadsto -0.3333333333333333 \cdot \left(1.125 \cdot \left(\left(c \cdot \left(c \cdot a\right)\right) \cdot \color{blue}{{b}^{\left(-3\right)}}\right) + 1.5 \cdot \frac{c}{b}\right) \]
    6. metadata-eval80.2%

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

    \[\leadsto -0.3333333333333333 \cdot \color{blue}{\left(1.125 \cdot \left(\left(c \cdot \left(c \cdot a\right)\right) \cdot {b}^{-3}\right) + 1.5 \cdot \frac{c}{b}\right)} \]
  11. Step-by-step derivation
    1. +-commutative80.2%

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

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

      \[\leadsto -0.3333333333333333 \cdot \left(\frac{c}{b} \cdot \color{blue}{\frac{1}{0.6666666666666666}} + 1.125 \cdot \left(\left(c \cdot \left(c \cdot a\right)\right) \cdot {b}^{-3}\right)\right) \]
    4. times-frac80.2%

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

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

      \[\leadsto -0.3333333333333333 \cdot \left(c \cdot \frac{1}{b \cdot 0.6666666666666666} + \color{blue}{\left(\left(c \cdot \left(c \cdot a\right)\right) \cdot {b}^{-3}\right) \cdot 1.125}\right) \]
    7. associate-*l*80.2%

      \[\leadsto -0.3333333333333333 \cdot \left(c \cdot \frac{1}{b \cdot 0.6666666666666666} + \color{blue}{\left(c \cdot \left(\left(c \cdot a\right) \cdot {b}^{-3}\right)\right)} \cdot 1.125\right) \]
    8. associate-*l*80.2%

      \[\leadsto -0.3333333333333333 \cdot \left(c \cdot \frac{1}{b \cdot 0.6666666666666666} + \color{blue}{c \cdot \left(\left(\left(c \cdot a\right) \cdot {b}^{-3}\right) \cdot 1.125\right)}\right) \]
    9. distribute-lft-out80.2%

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

      \[\leadsto -0.3333333333333333 \cdot \left(c \cdot \left(\frac{1}{\color{blue}{0.6666666666666666 \cdot b}} + \left(\left(c \cdot a\right) \cdot {b}^{-3}\right) \cdot 1.125\right)\right) \]
    11. associate-/r*80.1%

      \[\leadsto -0.3333333333333333 \cdot \left(c \cdot \left(\color{blue}{\frac{\frac{1}{0.6666666666666666}}{b}} + \left(\left(c \cdot a\right) \cdot {b}^{-3}\right) \cdot 1.125\right)\right) \]
    12. metadata-eval80.1%

      \[\leadsto -0.3333333333333333 \cdot \left(c \cdot \left(\frac{\color{blue}{1.5}}{b} + \left(\left(c \cdot a\right) \cdot {b}^{-3}\right) \cdot 1.125\right)\right) \]
    13. associate-*l*80.1%

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

    \[\leadsto -0.3333333333333333 \cdot \color{blue}{\left(c \cdot \left(\frac{1.5}{b} + \left(c \cdot \left(a \cdot {b}^{-3}\right)\right) \cdot 1.125\right)\right)} \]
  13. Final simplification80.1%

    \[\leadsto -0.3333333333333333 \cdot \left(c \cdot \left(\frac{1.5}{b} + 1.125 \cdot \left(c \cdot \left(a \cdot {b}^{-3}\right)\right)\right)\right) \]

Alternative 12: 64.3% accurate, 23.2× speedup?

\[\begin{array}{l} \\ \frac{-0.5}{\frac{b}{c}} \end{array} \]
(FPCore (a b c) :precision binary64 (/ -0.5 (/ b c)))
double code(double a, double b, double c) {
	return -0.5 / (b / c);
}
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) / (b / c)
end function
public static double code(double a, double b, double c) {
	return -0.5 / (b / c);
}
def code(a, b, c):
	return -0.5 / (b / c)
function code(a, b, c)
	return Float64(-0.5 / Float64(b / c))
end
function tmp = code(a, b, c)
	tmp = -0.5 / (b / c);
end
code[a_, b_, c_] := N[(-0.5 / N[(b / c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{b - \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)}}{a}} \]
  4. Taylor expanded in b around inf 80.2%

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

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

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

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

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

    \[\leadsto -0.3333333333333333 \cdot \color{blue}{\left(1.5 \cdot \frac{c}{b}\right)} \]
  8. Step-by-step derivation
    1. associate-*r/62.7%

      \[\leadsto -0.3333333333333333 \cdot \color{blue}{\frac{1.5 \cdot c}{b}} \]
    2. associate-/l*62.7%

      \[\leadsto -0.3333333333333333 \cdot \color{blue}{\frac{1.5}{\frac{b}{c}}} \]
    3. associate-/r/62.7%

      \[\leadsto -0.3333333333333333 \cdot \color{blue}{\left(\frac{1.5}{b} \cdot c\right)} \]
  9. Simplified62.7%

    \[\leadsto -0.3333333333333333 \cdot \color{blue}{\left(\frac{1.5}{b} \cdot c\right)} \]
  10. Taylor expanded in b around 0 62.8%

    \[\leadsto -0.3333333333333333 \cdot \color{blue}{\left(1.5 \cdot \frac{c}{b}\right)} \]
  11. Step-by-step derivation
    1. associate-*r/62.7%

      \[\leadsto -0.3333333333333333 \cdot \color{blue}{\frac{1.5 \cdot c}{b}} \]
    2. *-commutative62.7%

      \[\leadsto -0.3333333333333333 \cdot \frac{\color{blue}{c \cdot 1.5}}{b} \]
    3. associate-/l*62.8%

      \[\leadsto -0.3333333333333333 \cdot \color{blue}{\frac{c}{\frac{b}{1.5}}} \]
  12. Simplified62.8%

    \[\leadsto -0.3333333333333333 \cdot \color{blue}{\frac{c}{\frac{b}{1.5}}} \]
  13. Taylor expanded in c around 0 62.8%

    \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b}} \]
  14. Step-by-step derivation
    1. associate-*r/62.8%

      \[\leadsto \color{blue}{\frac{-0.5 \cdot c}{b}} \]
    2. associate-/l*62.7%

      \[\leadsto \color{blue}{\frac{-0.5}{\frac{b}{c}}} \]
  15. Simplified62.7%

    \[\leadsto \color{blue}{\frac{-0.5}{\frac{b}{c}}} \]
  16. Final simplification62.7%

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

Alternative 13: 64.4% accurate, 23.2× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{b - \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)}}{a}} \]
  4. Taylor expanded in b around inf 62.8%

    \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b}} \]
  5. Step-by-step derivation
    1. associate-*r/62.8%

      \[\leadsto \color{blue}{\frac{-0.5 \cdot c}{b}} \]
  6. Simplified62.8%

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

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

Reproduce

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