Cubic critical, narrow range

Percentage Accurate: 55.2% → 91.2%
Time: 21.4s
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.2% accurate, 1.0× speedup?

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

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

Alternative 1: 91.2% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \mathsf{fma}\left(-0.5, \frac{c}{b}, \mathsf{fma}\left(-0.5625, \frac{{c}^{3}}{\frac{{b}^{5}}{a \cdot a}}, \mathsf{fma}\left(-0.375, \frac{a}{\frac{\frac{{b}^{3}}{c}}{c}}, \frac{{\left(c \cdot a\right)}^{4}}{a \cdot {b}^{7}} \cdot -1.0546875\right)\right)\right) \end{array} \]
(FPCore (a b c)
 :precision binary64
 (fma
  -0.5
  (/ c b)
  (fma
   -0.5625
   (/ (pow c 3.0) (/ (pow b 5.0) (* a a)))
   (fma
    -0.375
    (/ a (/ (/ (pow b 3.0) c) c))
    (* (/ (pow (* c a) 4.0) (* a (pow b 7.0))) -1.0546875)))))
double code(double a, double b, double c) {
	return fma(-0.5, (c / b), fma(-0.5625, (pow(c, 3.0) / (pow(b, 5.0) / (a * a))), fma(-0.375, (a / ((pow(b, 3.0) / c) / c)), ((pow((c * a), 4.0) / (a * pow(b, 7.0))) * -1.0546875))));
}
function code(a, b, c)
	return fma(-0.5, Float64(c / b), fma(-0.5625, Float64((c ^ 3.0) / Float64((b ^ 5.0) / Float64(a * a))), fma(-0.375, Float64(a / Float64(Float64((b ^ 3.0) / c) / c)), Float64(Float64((Float64(c * a) ^ 4.0) / Float64(a * (b ^ 7.0))) * -1.0546875))))
end
code[a_, b_, c_] := N[(-0.5 * N[(c / b), $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[(a / N[(N[(N[Power[b, 3.0], $MachinePrecision] / c), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision] + N[(N[(N[Power[N[(c * a), $MachinePrecision], 4.0], $MachinePrecision] / N[(a * N[Power[b, 7.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -1.0546875), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\mathsf{fma}\left(-0.5, \frac{c}{b}, \mathsf{fma}\left(-0.5625, \frac{{c}^{3}}{\frac{{b}^{5}}{a \cdot a}}, \mathsf{fma}\left(-0.375, \frac{a}{\frac{\frac{{b}^{3}}{c}}{c}}, \frac{{\left(c \cdot a\right)}^{4}}{a \cdot {b}^{7}} \cdot -1.0546875\right)\right)\right)
\end{array}
Derivation
  1. Initial program 56.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\left(-b\right) + \sqrt{\frac{{b}^{6} - {\left(a \cdot c\right)}^{3} \cdot \color{blue}{27}}{\left(b \cdot b\right) \cdot \left(b \cdot b\right) + \left(\left(\left(3 \cdot a\right) \cdot c\right) \cdot \left(\left(3 \cdot a\right) \cdot c\right) + \left(b \cdot b\right) \cdot \left(\left(3 \cdot a\right) \cdot c\right)\right)}}}{3 \cdot a} \]
    10. pow255.7%

      \[\leadsto \frac{\left(-b\right) + \sqrt{\frac{{b}^{6} - {\left(a \cdot c\right)}^{3} \cdot 27}{\color{blue}{{b}^{2}} \cdot \left(b \cdot b\right) + \left(\left(\left(3 \cdot a\right) \cdot c\right) \cdot \left(\left(3 \cdot a\right) \cdot c\right) + \left(b \cdot b\right) \cdot \left(\left(3 \cdot a\right) \cdot c\right)\right)}}}{3 \cdot a} \]
    11. pow255.7%

      \[\leadsto \frac{\left(-b\right) + \sqrt{\frac{{b}^{6} - {\left(a \cdot c\right)}^{3} \cdot 27}{{b}^{2} \cdot \color{blue}{{b}^{2}} + \left(\left(\left(3 \cdot a\right) \cdot c\right) \cdot \left(\left(3 \cdot a\right) \cdot c\right) + \left(b \cdot b\right) \cdot \left(\left(3 \cdot a\right) \cdot c\right)\right)}}}{3 \cdot a} \]
    12. pow-prod-up55.9%

      \[\leadsto \frac{\left(-b\right) + \sqrt{\frac{{b}^{6} - {\left(a \cdot c\right)}^{3} \cdot 27}{\color{blue}{{b}^{\left(2 + 2\right)}} + \left(\left(\left(3 \cdot a\right) \cdot c\right) \cdot \left(\left(3 \cdot a\right) \cdot c\right) + \left(b \cdot b\right) \cdot \left(\left(3 \cdot a\right) \cdot c\right)\right)}}}{3 \cdot a} \]
    13. metadata-eval55.9%

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

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

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

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

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

    \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b} + \left(-0.16666666666666666 \cdot \frac{-9 \cdot \left({a}^{2} \cdot \left({c}^{2} \cdot \left(-9 \cdot \left({a}^{2} \cdot {c}^{2}\right) + 9 \cdot \left({a}^{2} \cdot {c}^{2}\right)\right)\right)\right) + \left(1.5 \cdot \left(a \cdot \left(c \cdot \left(-3 \cdot \left(a \cdot \left(c \cdot \left(-9 \cdot \left({a}^{2} \cdot {c}^{2}\right) + 9 \cdot \left({a}^{2} \cdot {c}^{2}\right)\right)\right)\right) + 1.5 \cdot \left(a \cdot \left(c \cdot \left(-9 \cdot \left({a}^{2} \cdot {c}^{2}\right) + \left(9 \cdot \left({a}^{2} \cdot {c}^{2}\right) + {\left(-1.5 \cdot \left(a \cdot c\right)\right)}^{2}\right)\right)\right)\right)\right)\right)\right) + \left(9 \cdot \left({a}^{2} \cdot \left({c}^{2} \cdot \left(-9 \cdot \left({a}^{2} \cdot {c}^{2}\right) + 9 \cdot \left({a}^{2} \cdot {c}^{2}\right)\right)\right)\right) + {\left(-0.5 \cdot \left(-9 \cdot \left({a}^{2} \cdot {c}^{2}\right) + \left(9 \cdot \left({a}^{2} \cdot {c}^{2}\right) + {\left(-1.5 \cdot \left(a \cdot c\right)\right)}^{2}\right)\right)\right)}^{2}\right)\right)}{a \cdot {b}^{7}} + \left(-0.16666666666666666 \cdot \frac{-9 \cdot \left({a}^{2} \cdot {c}^{2}\right) + \left(9 \cdot \left({a}^{2} \cdot {c}^{2}\right) + {\left(-1.5 \cdot \left(a \cdot c\right)\right)}^{2}\right)}{a \cdot {b}^{3}} + -0.16666666666666666 \cdot \frac{-3 \cdot \left(a \cdot \left(c \cdot \left(-9 \cdot \left({a}^{2} \cdot {c}^{2}\right) + 9 \cdot \left({a}^{2} \cdot {c}^{2}\right)\right)\right)\right) + 1.5 \cdot \left(a \cdot \left(c \cdot \left(-9 \cdot \left({a}^{2} \cdot {c}^{2}\right) + \left(9 \cdot \left({a}^{2} \cdot {c}^{2}\right) + {\left(-1.5 \cdot \left(a \cdot c\right)\right)}^{2}\right)\right)\right)\right)}{a \cdot {b}^{5}}\right)\right)} \]
  7. Simplified91.6%

    \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5, \frac{c}{b}, -0.16666666666666666 \cdot \left(\left(\frac{{\left(a \cdot c\right)}^{2} \cdot 2.25 + 0}{a \cdot {b}^{3}} + \frac{\mathsf{fma}\left(1.5, a \cdot \left(c \cdot \left({\left(a \cdot c\right)}^{2} \cdot 2.25 + 0\right)\right), a \cdot \left(c \cdot 0\right)\right)}{a \cdot {b}^{5}}\right) + \frac{\left({\left(0 + -0.5 \cdot \left({\left(a \cdot c\right)}^{2} \cdot 2.25\right)\right)}^{2} + 0\right) + \mathsf{fma}\left(1.5, a \cdot \left(c \cdot \mathsf{fma}\left(1.5, a \cdot \left(c \cdot \left({\left(a \cdot c\right)}^{2} \cdot 2.25 + 0\right)\right), a \cdot \left(c \cdot 0\right)\right)\right), 0\right)}{a \cdot {b}^{7}}\right)\right)} \]
  8. Taylor expanded in b around -inf 91.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(-0.5, \frac{c}{b}, \mathsf{fma}\left(-0.5625, \frac{{c}^{3}}{\frac{{b}^{5}}{a \cdot a}}, \mathsf{fma}\left(-0.375, \frac{a}{\frac{\frac{{b}^{3}}{c}}{c}}, \frac{-0.16666666666666666 \cdot {\left(a \cdot c\right)}^{4}}{{b}^{7} \cdot \left(a \cdot \color{blue}{0.1580246913580247}\right)}\right)\right)\right) \]
  12. Applied egg-rr91.6%

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

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

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

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

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

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

    \[\leadsto \mathsf{fma}\left(-0.5, \frac{c}{b}, \mathsf{fma}\left(-0.5625, \frac{{c}^{3}}{\frac{{b}^{5}}{a \cdot a}}, \mathsf{fma}\left(-0.375, \frac{a}{\frac{\frac{{b}^{3}}{c}}{c}}, \color{blue}{\frac{{\left(a \cdot c\right)}^{4}}{a \cdot {b}^{7}} \cdot -1.0546875}\right)\right)\right) \]
  15. Final simplification91.6%

    \[\leadsto \mathsf{fma}\left(-0.5, \frac{c}{b}, \mathsf{fma}\left(-0.5625, \frac{{c}^{3}}{\frac{{b}^{5}}{a \cdot a}}, \mathsf{fma}\left(-0.375, \frac{a}{\frac{\frac{{b}^{3}}{c}}{c}}, \frac{{\left(c \cdot a\right)}^{4}}{a \cdot {b}^{7}} \cdot -1.0546875\right)\right)\right) \]

Alternative 2: 91.1% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \mathsf{fma}\left(-0.5625, \frac{a \cdot a}{\frac{{b}^{5}}{{c}^{3}}}, \mathsf{fma}\left(-0.5, \frac{c}{b}, -0.375 \cdot \frac{a \cdot \left(c \cdot c\right)}{{b}^{3}}\right)\right) + -0.5 \cdot \frac{\frac{{\left(c \cdot a\right)}^{4} \cdot 6.328125}{a}}{3 \cdot {b}^{7}} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (+
  (fma
   -0.5625
   (/ (* a a) (/ (pow b 5.0) (pow c 3.0)))
   (fma -0.5 (/ c b) (* -0.375 (/ (* a (* c c)) (pow b 3.0)))))
  (* -0.5 (/ (/ (* (pow (* c a) 4.0) 6.328125) a) (* 3.0 (pow b 7.0))))))
double code(double a, double b, double c) {
	return fma(-0.5625, ((a * a) / (pow(b, 5.0) / pow(c, 3.0))), fma(-0.5, (c / b), (-0.375 * ((a * (c * c)) / pow(b, 3.0))))) + (-0.5 * (((pow((c * a), 4.0) * 6.328125) / a) / (3.0 * pow(b, 7.0))));
}
function code(a, b, c)
	return Float64(fma(-0.5625, Float64(Float64(a * a) / Float64((b ^ 5.0) / (c ^ 3.0))), fma(-0.5, Float64(c / b), Float64(-0.375 * Float64(Float64(a * Float64(c * c)) / (b ^ 3.0))))) + Float64(-0.5 * Float64(Float64(Float64((Float64(c * a) ^ 4.0) * 6.328125) / a) / Float64(3.0 * (b ^ 7.0)))))
end
code[a_, b_, c_] := N[(N[(-0.5625 * N[(N[(a * a), $MachinePrecision] / N[(N[Power[b, 5.0], $MachinePrecision] / N[Power[c, 3.0], $MachinePrecision]), $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] + N[(-0.5 * N[(N[(N[(N[Power[N[(c * a), $MachinePrecision], 4.0], $MachinePrecision] * 6.328125), $MachinePrecision] / a), $MachinePrecision] / N[(3.0 * N[Power[b, 7.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\mathsf{fma}\left(-0.5625, \frac{a \cdot a}{\frac{{b}^{5}}{{c}^{3}}}, \mathsf{fma}\left(-0.5, \frac{c}{b}, -0.375 \cdot \frac{a \cdot \left(c \cdot c\right)}{{b}^{3}}\right)\right) + -0.5 \cdot \frac{\frac{{\left(c \cdot a\right)}^{4} \cdot 6.328125}{a}}{3 \cdot {b}^{7}}
\end{array}
Derivation
  1. Initial program 56.1%

    \[\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-sub056.1%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{-1.6875 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5} \cdot {\left(\sqrt{3}\right)}^{2}} + \left(-1.5 \cdot \frac{c}{b \cdot {\left(\sqrt{3}\right)}^{2}} + \left(-1.125 \cdot \frac{a \cdot {c}^{2}}{{b}^{3} \cdot {\left(\sqrt{3}\right)}^{2}} + -0.5 \cdot \frac{5.0625 \cdot \left({a}^{4} \cdot {c}^{4}\right) + {\left(-1.125 \cdot \left({a}^{2} \cdot {c}^{2}\right)\right)}^{2}}{a \cdot \left({b}^{7} \cdot {\left(\sqrt{3}\right)}^{2}\right)}\right)\right)} \]
  7. Simplified91.5%

    \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5625, \frac{a \cdot a}{\frac{{b}^{5}}{{c}^{3}}}, \mathsf{fma}\left(-0.5, \frac{c}{b}, -0.375 \cdot \frac{a \cdot \left(c \cdot c\right)}{{b}^{3}}\right)\right) + -0.5 \cdot \frac{\frac{{\left(a \cdot c\right)}^{4} \cdot 6.328125}{a}}{3 \cdot {b}^{7}}} \]
  8. Final simplification91.5%

    \[\leadsto \mathsf{fma}\left(-0.5625, \frac{a \cdot a}{\frac{{b}^{5}}{{c}^{3}}}, \mathsf{fma}\left(-0.5, \frac{c}{b}, -0.375 \cdot \frac{a \cdot \left(c \cdot c\right)}{{b}^{3}}\right)\right) + -0.5 \cdot \frac{\frac{{\left(c \cdot a\right)}^{4} \cdot 6.328125}{a}}{3 \cdot {b}^{7}} \]

Alternative 3: 88.1% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := {\left(\frac{c}{b} \cdot -1.5\right)}^{2}\\ \mathsf{fma}\left(-0.16666666666666666, \frac{a}{\frac{b}{t_0}} + \frac{a \cdot a}{\frac{b}{\mathsf{fma}\left(1.5, \frac{c}{b} \cdot \frac{t_0}{b}, \frac{-3}{b} \cdot \frac{c \cdot 0}{b}\right)}}, -0.5 \cdot \frac{c}{b}\right) \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (let* ((t_0 (pow (* (/ c b) -1.5) 2.0)))
   (fma
    -0.16666666666666666
    (+
     (/ a (/ b t_0))
     (/
      (* a a)
      (/ b (fma 1.5 (* (/ c b) (/ t_0 b)) (* (/ -3.0 b) (/ (* c 0.0) b))))))
    (* -0.5 (/ c b)))))
double code(double a, double b, double c) {
	double t_0 = pow(((c / b) * -1.5), 2.0);
	return fma(-0.16666666666666666, ((a / (b / t_0)) + ((a * a) / (b / fma(1.5, ((c / b) * (t_0 / b)), ((-3.0 / b) * ((c * 0.0) / b)))))), (-0.5 * (c / b)));
}
function code(a, b, c)
	t_0 = Float64(Float64(c / b) * -1.5) ^ 2.0
	return fma(-0.16666666666666666, Float64(Float64(a / Float64(b / t_0)) + Float64(Float64(a * a) / Float64(b / fma(1.5, Float64(Float64(c / b) * Float64(t_0 / b)), Float64(Float64(-3.0 / b) * Float64(Float64(c * 0.0) / b)))))), Float64(-0.5 * Float64(c / b)))
end
code[a_, b_, c_] := Block[{t$95$0 = N[Power[N[(N[(c / b), $MachinePrecision] * -1.5), $MachinePrecision], 2.0], $MachinePrecision]}, N[(-0.16666666666666666 * N[(N[(a / N[(b / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(N[(a * a), $MachinePrecision] / N[(b / N[(1.5 * N[(N[(c / b), $MachinePrecision] * N[(t$95$0 / b), $MachinePrecision]), $MachinePrecision] + N[(N[(-3.0 / b), $MachinePrecision] * N[(N[(c * 0.0), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-0.5 * N[(c / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := {\left(\frac{c}{b} \cdot -1.5\right)}^{2}\\
\mathsf{fma}\left(-0.16666666666666666, \frac{a}{\frac{b}{t_0}} + \frac{a \cdot a}{\frac{b}{\mathsf{fma}\left(1.5, \frac{c}{b} \cdot \frac{t_0}{b}, \frac{-3}{b} \cdot \frac{c \cdot 0}{b}\right)}}, -0.5 \cdot \frac{c}{b}\right)
\end{array}
\end{array}
Derivation
  1. Initial program 56.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\left(-b\right) + \sqrt{\frac{{b}^{6} - {\left(a \cdot c\right)}^{3} \cdot \color{blue}{27}}{\left(b \cdot b\right) \cdot \left(b \cdot b\right) + \left(\left(\left(3 \cdot a\right) \cdot c\right) \cdot \left(\left(3 \cdot a\right) \cdot c\right) + \left(b \cdot b\right) \cdot \left(\left(3 \cdot a\right) \cdot c\right)\right)}}}{3 \cdot a} \]
    10. pow255.7%

      \[\leadsto \frac{\left(-b\right) + \sqrt{\frac{{b}^{6} - {\left(a \cdot c\right)}^{3} \cdot 27}{\color{blue}{{b}^{2}} \cdot \left(b \cdot b\right) + \left(\left(\left(3 \cdot a\right) \cdot c\right) \cdot \left(\left(3 \cdot a\right) \cdot c\right) + \left(b \cdot b\right) \cdot \left(\left(3 \cdot a\right) \cdot c\right)\right)}}}{3 \cdot a} \]
    11. pow255.7%

      \[\leadsto \frac{\left(-b\right) + \sqrt{\frac{{b}^{6} - {\left(a \cdot c\right)}^{3} \cdot 27}{{b}^{2} \cdot \color{blue}{{b}^{2}} + \left(\left(\left(3 \cdot a\right) \cdot c\right) \cdot \left(\left(3 \cdot a\right) \cdot c\right) + \left(b \cdot b\right) \cdot \left(\left(3 \cdot a\right) \cdot c\right)\right)}}}{3 \cdot a} \]
    12. pow-prod-up55.9%

      \[\leadsto \frac{\left(-b\right) + \sqrt{\frac{{b}^{6} - {\left(a \cdot c\right)}^{3} \cdot 27}{\color{blue}{{b}^{\left(2 + 2\right)}} + \left(\left(\left(3 \cdot a\right) \cdot c\right) \cdot \left(\left(3 \cdot a\right) \cdot c\right) + \left(b \cdot b\right) \cdot \left(\left(3 \cdot a\right) \cdot c\right)\right)}}}{3 \cdot a} \]
    13. metadata-eval55.9%

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

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

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

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

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

    \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b} + \left(-0.16666666666666666 \cdot \frac{a \cdot \left(-9 \cdot \frac{{c}^{2}}{{b}^{2}} + \left(9 \cdot \frac{{c}^{2}}{{b}^{2}} + {\left(-1.5 \cdot \frac{c}{b}\right)}^{2}\right)\right)}{b} + -0.16666666666666666 \cdot \frac{{a}^{2} \cdot \left(-3 \cdot \frac{c \cdot \left(-9 \cdot \frac{{c}^{2}}{{b}^{2}} + 9 \cdot \frac{{c}^{2}}{{b}^{2}}\right)}{{b}^{2}} + 1.5 \cdot \frac{c \cdot \left(-9 \cdot \frac{{c}^{2}}{{b}^{2}} + \left(9 \cdot \frac{{c}^{2}}{{b}^{2}} + {\left(-1.5 \cdot \frac{c}{b}\right)}^{2}\right)\right)}{{b}^{2}}\right)}{b}\right)} \]
  7. Simplified88.9%

    \[\leadsto \color{blue}{\mathsf{fma}\left(-0.16666666666666666, \frac{a}{\frac{b}{{\left(\frac{c}{b} \cdot -1.5\right)}^{2} + 0}} + \frac{a \cdot a}{\frac{b}{\mathsf{fma}\left(1.5, \frac{c}{b} \cdot \frac{{\left(\frac{c}{b} \cdot -1.5\right)}^{2} + 0}{b}, \frac{-3}{b} \cdot \frac{c \cdot 0}{b}\right)}}, -0.5 \cdot \frac{c}{b}\right)} \]
  8. Final simplification88.9%

    \[\leadsto \mathsf{fma}\left(-0.16666666666666666, \frac{a}{\frac{b}{{\left(\frac{c}{b} \cdot -1.5\right)}^{2}}} + \frac{a \cdot a}{\frac{b}{\mathsf{fma}\left(1.5, \frac{c}{b} \cdot \frac{{\left(\frac{c}{b} \cdot -1.5\right)}^{2}}{b}, \frac{-3}{b} \cdot \frac{c \cdot 0}{b}\right)}}, -0.5 \cdot \frac{c}{b}\right) \]

Alternative 4: 87.7% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \frac{\mathsf{fma}\left(-0.5, \frac{c \cdot c}{\frac{b}{{\left(\frac{a \cdot -1.5}{b}\right)}^{2}}} + \left(a \cdot \frac{1.5}{\frac{b \cdot b}{{\left(-1.5 \cdot \frac{a}{b}\right)}^{2}}}\right) \cdot \frac{{c}^{3}}{b}, -1.5 \cdot \frac{a}{\frac{b}{c}}\right)}{3 \cdot a} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (/
  (fma
   -0.5
   (+
    (/ (* c c) (/ b (pow (/ (* a -1.5) b) 2.0)))
    (* (* a (/ 1.5 (/ (* b b) (pow (* -1.5 (/ a b)) 2.0)))) (/ (pow c 3.0) b)))
   (* -1.5 (/ a (/ b c))))
  (* 3.0 a)))
double code(double a, double b, double c) {
	return fma(-0.5, (((c * c) / (b / pow(((a * -1.5) / b), 2.0))) + ((a * (1.5 / ((b * b) / pow((-1.5 * (a / b)), 2.0)))) * (pow(c, 3.0) / b))), (-1.5 * (a / (b / c)))) / (3.0 * a);
}
function code(a, b, c)
	return Float64(fma(-0.5, Float64(Float64(Float64(c * c) / Float64(b / (Float64(Float64(a * -1.5) / b) ^ 2.0))) + Float64(Float64(a * Float64(1.5 / Float64(Float64(b * b) / (Float64(-1.5 * Float64(a / b)) ^ 2.0)))) * Float64((c ^ 3.0) / b))), Float64(-1.5 * Float64(a / Float64(b / c)))) / Float64(3.0 * a))
end
code[a_, b_, c_] := N[(N[(-0.5 * N[(N[(N[(c * c), $MachinePrecision] / N[(b / N[Power[N[(N[(a * -1.5), $MachinePrecision] / b), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a * N[(1.5 / N[(N[(b * b), $MachinePrecision] / N[Power[N[(-1.5 * N[(a / b), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[c, 3.0], $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.5 * N[(a / N[(b / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\mathsf{fma}\left(-0.5, \frac{c \cdot c}{\frac{b}{{\left(\frac{a \cdot -1.5}{b}\right)}^{2}}} + \left(a \cdot \frac{1.5}{\frac{b \cdot b}{{\left(-1.5 \cdot \frac{a}{b}\right)}^{2}}}\right) \cdot \frac{{c}^{3}}{b}, -1.5 \cdot \frac{a}{\frac{b}{c}}\right)}{3 \cdot a}
\end{array}
Derivation
  1. Initial program 56.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\left(-b\right) + \sqrt{\frac{{b}^{6} - {\left(a \cdot c\right)}^{3} \cdot \color{blue}{27}}{\left(b \cdot b\right) \cdot \left(b \cdot b\right) + \left(\left(\left(3 \cdot a\right) \cdot c\right) \cdot \left(\left(3 \cdot a\right) \cdot c\right) + \left(b \cdot b\right) \cdot \left(\left(3 \cdot a\right) \cdot c\right)\right)}}}{3 \cdot a} \]
    10. pow255.7%

      \[\leadsto \frac{\left(-b\right) + \sqrt{\frac{{b}^{6} - {\left(a \cdot c\right)}^{3} \cdot 27}{\color{blue}{{b}^{2}} \cdot \left(b \cdot b\right) + \left(\left(\left(3 \cdot a\right) \cdot c\right) \cdot \left(\left(3 \cdot a\right) \cdot c\right) + \left(b \cdot b\right) \cdot \left(\left(3 \cdot a\right) \cdot c\right)\right)}}}{3 \cdot a} \]
    11. pow255.7%

      \[\leadsto \frac{\left(-b\right) + \sqrt{\frac{{b}^{6} - {\left(a \cdot c\right)}^{3} \cdot 27}{{b}^{2} \cdot \color{blue}{{b}^{2}} + \left(\left(\left(3 \cdot a\right) \cdot c\right) \cdot \left(\left(3 \cdot a\right) \cdot c\right) + \left(b \cdot b\right) \cdot \left(\left(3 \cdot a\right) \cdot c\right)\right)}}}{3 \cdot a} \]
    12. pow-prod-up55.9%

      \[\leadsto \frac{\left(-b\right) + \sqrt{\frac{{b}^{6} - {\left(a \cdot c\right)}^{3} \cdot 27}{\color{blue}{{b}^{\left(2 + 2\right)}} + \left(\left(\left(3 \cdot a\right) \cdot c\right) \cdot \left(\left(3 \cdot a\right) \cdot c\right) + \left(b \cdot b\right) \cdot \left(\left(3 \cdot a\right) \cdot c\right)\right)}}}{3 \cdot a} \]
    13. metadata-eval55.9%

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

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

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

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

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

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

    \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(-0.5, \frac{c \cdot c}{\frac{b}{{\left(\frac{-1.5 \cdot a}{b}\right)}^{2} + 0}} + \frac{{c}^{3}}{\frac{b}{\mathsf{fma}\left(-3, \frac{a}{b} \cdot \frac{0}{b}, \frac{1.5 \cdot a}{\frac{b \cdot b}{{\left(\frac{-1.5 \cdot a}{b}\right)}^{2} + 0}}\right)}}, -1.5 \cdot \frac{a}{\frac{b}{c}}\right)}}{3 \cdot a} \]
  8. Step-by-step derivation
    1. div-inv88.5%

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

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

      \[\leadsto \frac{\mathsf{fma}\left(-0.5, \frac{c \cdot c}{\frac{b}{{\left(\frac{-1.5 \cdot a}{b}\right)}^{2} + 0}} + {c}^{3} \cdot \frac{1}{\frac{b}{\mathsf{fma}\left(-3, \color{blue}{\frac{a \cdot 0}{b}}, \frac{1.5 \cdot a}{\frac{b \cdot b}{{\left(\frac{-1.5 \cdot a}{b}\right)}^{2} + 0}}\right)}}, -1.5 \cdot \frac{a}{\frac{b}{c}}\right)}{3 \cdot a} \]
    4. associate-/r/88.5%

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

      \[\leadsto \frac{\mathsf{fma}\left(-0.5, \frac{c \cdot c}{\frac{b}{{\left(\frac{-1.5 \cdot a}{b}\right)}^{2} + 0}} + {c}^{3} \cdot \frac{1}{\frac{b}{\mathsf{fma}\left(-3, \frac{a \cdot 0}{b}, \frac{\color{blue}{a \cdot 1.5}}{b \cdot b} \cdot \left({\left(\frac{-1.5 \cdot a}{b}\right)}^{2} + 0\right)\right)}}, -1.5 \cdot \frac{a}{\frac{b}{c}}\right)}{3 \cdot a} \]
    6. +-rgt-identity88.5%

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

      \[\leadsto \frac{\mathsf{fma}\left(-0.5, \frac{c \cdot c}{\frac{b}{{\left(\frac{-1.5 \cdot a}{b}\right)}^{2} + 0}} + {c}^{3} \cdot \frac{1}{\frac{b}{\mathsf{fma}\left(-3, \frac{a \cdot 0}{b}, \frac{a \cdot 1.5}{b \cdot b} \cdot {\left(\frac{\color{blue}{a \cdot -1.5}}{b}\right)}^{2}\right)}}, -1.5 \cdot \frac{a}{\frac{b}{c}}\right)}{3 \cdot a} \]
  9. Applied egg-rr88.5%

    \[\leadsto \frac{\mathsf{fma}\left(-0.5, \frac{c \cdot c}{\frac{b}{{\left(\frac{-1.5 \cdot a}{b}\right)}^{2} + 0}} + \color{blue}{{c}^{3} \cdot \frac{1}{\frac{b}{\mathsf{fma}\left(-3, \frac{a \cdot 0}{b}, \frac{a \cdot 1.5}{b \cdot b} \cdot {\left(\frac{a \cdot -1.5}{b}\right)}^{2}\right)}}}, -1.5 \cdot \frac{a}{\frac{b}{c}}\right)}{3 \cdot a} \]
  10. Step-by-step derivation
    1. associate-*r/88.5%

      \[\leadsto \frac{\mathsf{fma}\left(-0.5, \frac{c \cdot c}{\frac{b}{{\left(\frac{-1.5 \cdot a}{b}\right)}^{2} + 0}} + \color{blue}{\frac{{c}^{3} \cdot 1}{\frac{b}{\mathsf{fma}\left(-3, \frac{a \cdot 0}{b}, \frac{a \cdot 1.5}{b \cdot b} \cdot {\left(\frac{a \cdot -1.5}{b}\right)}^{2}\right)}}}, -1.5 \cdot \frac{a}{\frac{b}{c}}\right)}{3 \cdot a} \]
    2. *-rgt-identity88.5%

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

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

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

    \[\leadsto \frac{\mathsf{fma}\left(-0.5, \frac{c \cdot c}{\frac{b}{{\left(\frac{-1.5 \cdot a}{b}\right)}^{2} + 0}} + \color{blue}{\left(0 + a \cdot \frac{1.5}{\frac{b \cdot b}{{\left(\frac{a}{b} \cdot -1.5\right)}^{2}}}\right) \cdot \frac{{c}^{3}}{b}}, -1.5 \cdot \frac{a}{\frac{b}{c}}\right)}{3 \cdot a} \]
  12. Final simplification88.5%

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

Alternative 5: 85.5% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 79.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. neg-sub079.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.20000000000000018 < b

    1. Initial program 50.5%

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

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

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

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

      \[\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 b around inf 86.7%

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

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

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

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

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

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

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

Alternative 6: 76.1% accurate, 0.4× speedup?

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

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

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


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

    1. Initial program 71.6%

      \[\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-sub071.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)} - b}{\color{blue}{a \cdot 3}} \]
      8. *-lft-identity71.7%

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

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

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

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

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

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

    1. Initial program 34.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. sqr-neg34.2%

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

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

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

      \[\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 b around inf 81.6%

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

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

Alternative 7: 76.1% accurate, 0.4× speedup?

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

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

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


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

    1. Initial program 71.6%

      \[\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-sub071.6%

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

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

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

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

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

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

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

    1. Initial program 34.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. sqr-neg34.2%

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

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

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

      \[\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 b around inf 81.6%

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

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

Alternative 8: 76.1% accurate, 0.4× speedup?

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

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

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


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

    1. Initial program 71.6%

      \[\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-sub071.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 34.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. sqr-neg34.2%

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

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

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

      \[\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 b around inf 81.6%

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

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

Alternative 9: 76.0% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 71.6%

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

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

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

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

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

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

    1. Initial program 34.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. sqr-neg34.2%

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

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

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

      \[\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 b around inf 81.6%

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

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

Alternative 10: 85.3% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 79.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. neg-sub079.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \log \left(e^{\frac{\sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)} - b}{\color{blue}{\sqrt{3 \cdot a} \cdot \sqrt{3 \cdot a}}}}\right) \]
      3. add-sqr-sqrt74.3%

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

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

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

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

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

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

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

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

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

    if 5.5 < b

    1. Initial program 50.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 85.4% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 79.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. neg-sub079.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \log \left(e^{\frac{\sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)} - b}{\color{blue}{\sqrt{3 \cdot a} \cdot \sqrt{3 \cdot a}}}}\right) \]
      3. add-sqr-sqrt74.3%

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

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

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

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

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

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

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

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

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

    if 5.5 < b

    1. Initial program 50.5%

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

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

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

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

      \[\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 b around inf 86.7%

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

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

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

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

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

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

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

Alternative 12: 74.5% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 73.3%

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

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

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

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

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

    if 850.79999999999995 < b

    1. Initial program 44.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. sqr-neg44.7%

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

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

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified44.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 b around inf 73.5%

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

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

Alternative 13: 64.6% accurate, 23.2× speedup?

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

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

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

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

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

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

    \[\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 b around inf 64.1%

    \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b}} \]
  5. Final simplification64.1%

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

Reproduce

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