?

Average Error: 28.5 → 0.8
Time: 35.9s
Precision: binary64
Cost: 74432

?

\[\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)\]
\[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
\[\begin{array}{l} t_0 := \mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)\\ \frac{\frac{\frac{\mathsf{fma}\left(27, {c}^{3} \cdot {a}^{3}, \mathsf{fma}\left(-1, \left(a \cdot a\right) \cdot \left(27 \cdot \left(\left(b \cdot b\right) \cdot \left(c \cdot c\right)\right)\right), a \cdot \left(\left(c \cdot {b}^{4}\right) \cdot 9\right)\right)\right)}{b + \sqrt{t_0}}}{{b}^{4} + t_0 \cdot \mathsf{fma}\left(b, b, t_0\right)}}{a} \cdot -0.3333333333333333 \end{array} \]
(FPCore (a b c)
 :precision binary64
 (/ (+ (- b) (sqrt (- (* b b) (* (* 3.0 a) c)))) (* 3.0 a)))
(FPCore (a b c)
 :precision binary64
 (let* ((t_0 (fma a (* c -3.0) (* b b))))
   (*
    (/
     (/
      (/
       (fma
        27.0
        (* (pow c 3.0) (pow a 3.0))
        (fma
         -1.0
         (* (* a a) (* 27.0 (* (* b b) (* c c))))
         (* a (* (* c (pow b 4.0)) 9.0))))
       (+ b (sqrt t_0)))
      (+ (pow b 4.0) (* t_0 (fma b b t_0))))
     a)
    -0.3333333333333333)))
double code(double a, double b, double c) {
	return (-b + sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a);
}
double code(double a, double b, double c) {
	double t_0 = fma(a, (c * -3.0), (b * b));
	return (((fma(27.0, (pow(c, 3.0) * pow(a, 3.0)), fma(-1.0, ((a * a) * (27.0 * ((b * b) * (c * c)))), (a * ((c * pow(b, 4.0)) * 9.0)))) / (b + sqrt(t_0))) / (pow(b, 4.0) + (t_0 * fma(b, b, t_0)))) / a) * -0.3333333333333333;
}
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 code(a, b, c)
	t_0 = fma(a, Float64(c * -3.0), Float64(b * b))
	return Float64(Float64(Float64(Float64(fma(27.0, Float64((c ^ 3.0) * (a ^ 3.0)), fma(-1.0, Float64(Float64(a * a) * Float64(27.0 * Float64(Float64(b * b) * Float64(c * c)))), Float64(a * Float64(Float64(c * (b ^ 4.0)) * 9.0)))) / Float64(b + sqrt(t_0))) / Float64((b ^ 4.0) + Float64(t_0 * fma(b, b, t_0)))) / a) * -0.3333333333333333)
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]
code[a_, b_, c_] := Block[{t$95$0 = N[(a * N[(c * -3.0), $MachinePrecision] + N[(b * b), $MachinePrecision]), $MachinePrecision]}, N[(N[(N[(N[(N[(27.0 * N[(N[Power[c, 3.0], $MachinePrecision] * N[Power[a, 3.0], $MachinePrecision]), $MachinePrecision] + N[(-1.0 * N[(N[(a * a), $MachinePrecision] * N[(27.0 * N[(N[(b * b), $MachinePrecision] * N[(c * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[(c * N[Power[b, 4.0], $MachinePrecision]), $MachinePrecision] * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(b + N[Sqrt[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Power[b, 4.0], $MachinePrecision] + N[(t$95$0 * N[(b * b + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision] * -0.3333333333333333), $MachinePrecision]]
\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}
\begin{array}{l}
t_0 := \mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)\\
\frac{\frac{\frac{\mathsf{fma}\left(27, {c}^{3} \cdot {a}^{3}, \mathsf{fma}\left(-1, \left(a \cdot a\right) \cdot \left(27 \cdot \left(\left(b \cdot b\right) \cdot \left(c \cdot c\right)\right)\right), a \cdot \left(\left(c \cdot {b}^{4}\right) \cdot 9\right)\right)\right)}{b + \sqrt{t_0}}}{{b}^{4} + t_0 \cdot \mathsf{fma}\left(b, b, t_0\right)}}{a} \cdot -0.3333333333333333
\end{array}

Error?

Derivation?

  1. Initial program 28.5

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

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

    [Start]28.5

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

    *-lft-identity [<=]28.5

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

    metadata-eval [<=]28.5

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

    times-frac [<=]28.5

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

    neg-mul-1 [<=]28.5

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

    distribute-rgt-neg-in [=>]28.5

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

    times-frac [=>]28.5

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

    *-commutative [=>]28.5

    \[ \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{-a} \cdot \frac{-1}{3}} \]
  3. Applied egg-rr27.6

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

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

    [Start]27.6

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

    associate-/r* [=>]27.6

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

    cube-prod [=>]27.7

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

    metadata-eval [<=]27.7

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

    metadata-eval [<=]27.7

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

    sqr-pow [<=]27.6

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

    unpow2 [=>]27.6

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

    *-commutative [=>]27.6

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

    distribute-lft-out [=>]27.6

    \[ \frac{\frac{\frac{{b}^{6} - {\left(\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)\right)}^{3}}{b + \sqrt{\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)}}}{{b}^{4} + \color{blue}{\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right) \cdot \left(\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right) + b \cdot b\right)}}}{a} \cdot -0.3333333333333333 \]
  5. Taylor expanded in a around -inf 0.9

    \[\leadsto \frac{\frac{\frac{\color{blue}{27 \cdot \left({c}^{3} \cdot {a}^{3}\right) + \left(-1 \cdot \left({a}^{2} \cdot \left(9 \cdot \left({c}^{2} \cdot {b}^{2}\right) + 18 \cdot \left({c}^{2} \cdot {b}^{2}\right)\right)\right) + \left(3 \cdot \left(c \cdot {b}^{4}\right) + 6 \cdot \left(c \cdot {b}^{4}\right)\right) \cdot a\right)}}{b + \sqrt{\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)}}}{{b}^{4} + \mathsf{fma}\left(a, c \cdot -3, b \cdot b\right) \cdot \mathsf{fma}\left(b, b, \mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)\right)}}{a} \cdot -0.3333333333333333 \]
  6. Simplified0.8

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

    [Start]0.9

    \[ \frac{\frac{\frac{27 \cdot \left({c}^{3} \cdot {a}^{3}\right) + \left(-1 \cdot \left({a}^{2} \cdot \left(9 \cdot \left({c}^{2} \cdot {b}^{2}\right) + 18 \cdot \left({c}^{2} \cdot {b}^{2}\right)\right)\right) + \left(3 \cdot \left(c \cdot {b}^{4}\right) + 6 \cdot \left(c \cdot {b}^{4}\right)\right) \cdot a\right)}{b + \sqrt{\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)}}}{{b}^{4} + \mathsf{fma}\left(a, c \cdot -3, b \cdot b\right) \cdot \mathsf{fma}\left(b, b, \mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)\right)}}{a} \cdot -0.3333333333333333 \]

    fma-def [=>]0.9

    \[ \frac{\frac{\frac{\color{blue}{\mathsf{fma}\left(27, {c}^{3} \cdot {a}^{3}, -1 \cdot \left({a}^{2} \cdot \left(9 \cdot \left({c}^{2} \cdot {b}^{2}\right) + 18 \cdot \left({c}^{2} \cdot {b}^{2}\right)\right)\right) + \left(3 \cdot \left(c \cdot {b}^{4}\right) + 6 \cdot \left(c \cdot {b}^{4}\right)\right) \cdot a\right)}}{b + \sqrt{\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)}}}{{b}^{4} + \mathsf{fma}\left(a, c \cdot -3, b \cdot b\right) \cdot \mathsf{fma}\left(b, b, \mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)\right)}}{a} \cdot -0.3333333333333333 \]

    fma-def [=>]0.9

    \[ \frac{\frac{\frac{\mathsf{fma}\left(27, {c}^{3} \cdot {a}^{3}, \color{blue}{\mathsf{fma}\left(-1, {a}^{2} \cdot \left(9 \cdot \left({c}^{2} \cdot {b}^{2}\right) + 18 \cdot \left({c}^{2} \cdot {b}^{2}\right)\right), \left(3 \cdot \left(c \cdot {b}^{4}\right) + 6 \cdot \left(c \cdot {b}^{4}\right)\right) \cdot a\right)}\right)}{b + \sqrt{\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)}}}{{b}^{4} + \mathsf{fma}\left(a, c \cdot -3, b \cdot b\right) \cdot \mathsf{fma}\left(b, b, \mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)\right)}}{a} \cdot -0.3333333333333333 \]

    unpow2 [=>]0.9

    \[ \frac{\frac{\frac{\mathsf{fma}\left(27, {c}^{3} \cdot {a}^{3}, \mathsf{fma}\left(-1, \color{blue}{\left(a \cdot a\right)} \cdot \left(9 \cdot \left({c}^{2} \cdot {b}^{2}\right) + 18 \cdot \left({c}^{2} \cdot {b}^{2}\right)\right), \left(3 \cdot \left(c \cdot {b}^{4}\right) + 6 \cdot \left(c \cdot {b}^{4}\right)\right) \cdot a\right)\right)}{b + \sqrt{\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)}}}{{b}^{4} + \mathsf{fma}\left(a, c \cdot -3, b \cdot b\right) \cdot \mathsf{fma}\left(b, b, \mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)\right)}}{a} \cdot -0.3333333333333333 \]

    distribute-rgt-out [=>]0.9

    \[ \frac{\frac{\frac{\mathsf{fma}\left(27, {c}^{3} \cdot {a}^{3}, \mathsf{fma}\left(-1, \left(a \cdot a\right) \cdot \color{blue}{\left(\left({c}^{2} \cdot {b}^{2}\right) \cdot \left(9 + 18\right)\right)}, \left(3 \cdot \left(c \cdot {b}^{4}\right) + 6 \cdot \left(c \cdot {b}^{4}\right)\right) \cdot a\right)\right)}{b + \sqrt{\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)}}}{{b}^{4} + \mathsf{fma}\left(a, c \cdot -3, b \cdot b\right) \cdot \mathsf{fma}\left(b, b, \mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)\right)}}{a} \cdot -0.3333333333333333 \]

    *-commutative [=>]0.9

    \[ \frac{\frac{\frac{\mathsf{fma}\left(27, {c}^{3} \cdot {a}^{3}, \mathsf{fma}\left(-1, \left(a \cdot a\right) \cdot \left(\color{blue}{\left({b}^{2} \cdot {c}^{2}\right)} \cdot \left(9 + 18\right)\right), \left(3 \cdot \left(c \cdot {b}^{4}\right) + 6 \cdot \left(c \cdot {b}^{4}\right)\right) \cdot a\right)\right)}{b + \sqrt{\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)}}}{{b}^{4} + \mathsf{fma}\left(a, c \cdot -3, b \cdot b\right) \cdot \mathsf{fma}\left(b, b, \mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)\right)}}{a} \cdot -0.3333333333333333 \]

    unpow2 [=>]0.9

    \[ \frac{\frac{\frac{\mathsf{fma}\left(27, {c}^{3} \cdot {a}^{3}, \mathsf{fma}\left(-1, \left(a \cdot a\right) \cdot \left(\left(\color{blue}{\left(b \cdot b\right)} \cdot {c}^{2}\right) \cdot \left(9 + 18\right)\right), \left(3 \cdot \left(c \cdot {b}^{4}\right) + 6 \cdot \left(c \cdot {b}^{4}\right)\right) \cdot a\right)\right)}{b + \sqrt{\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)}}}{{b}^{4} + \mathsf{fma}\left(a, c \cdot -3, b \cdot b\right) \cdot \mathsf{fma}\left(b, b, \mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)\right)}}{a} \cdot -0.3333333333333333 \]

    unpow2 [=>]0.9

    \[ \frac{\frac{\frac{\mathsf{fma}\left(27, {c}^{3} \cdot {a}^{3}, \mathsf{fma}\left(-1, \left(a \cdot a\right) \cdot \left(\left(\left(b \cdot b\right) \cdot \color{blue}{\left(c \cdot c\right)}\right) \cdot \left(9 + 18\right)\right), \left(3 \cdot \left(c \cdot {b}^{4}\right) + 6 \cdot \left(c \cdot {b}^{4}\right)\right) \cdot a\right)\right)}{b + \sqrt{\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)}}}{{b}^{4} + \mathsf{fma}\left(a, c \cdot -3, b \cdot b\right) \cdot \mathsf{fma}\left(b, b, \mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)\right)}}{a} \cdot -0.3333333333333333 \]

    metadata-eval [=>]0.9

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

    *-commutative [=>]0.9

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

    distribute-rgt-out [=>]0.8

    \[ \frac{\frac{\frac{\mathsf{fma}\left(27, {c}^{3} \cdot {a}^{3}, \mathsf{fma}\left(-1, \left(a \cdot a\right) \cdot \left(\left(\left(b \cdot b\right) \cdot \left(c \cdot c\right)\right) \cdot 27\right), a \cdot \color{blue}{\left(\left(c \cdot {b}^{4}\right) \cdot \left(3 + 6\right)\right)}\right)\right)}{b + \sqrt{\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)}}}{{b}^{4} + \mathsf{fma}\left(a, c \cdot -3, b \cdot b\right) \cdot \mathsf{fma}\left(b, b, \mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)\right)}}{a} \cdot -0.3333333333333333 \]
  7. Final simplification0.8

    \[\leadsto \frac{\frac{\frac{\mathsf{fma}\left(27, {c}^{3} \cdot {a}^{3}, \mathsf{fma}\left(-1, \left(a \cdot a\right) \cdot \left(27 \cdot \left(\left(b \cdot b\right) \cdot \left(c \cdot c\right)\right)\right), a \cdot \left(\left(c \cdot {b}^{4}\right) \cdot 9\right)\right)\right)}{b + \sqrt{\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)}}}{{b}^{4} + \mathsf{fma}\left(a, c \cdot -3, b \cdot b\right) \cdot \mathsf{fma}\left(b, b, \mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)\right)}}{a} \cdot -0.3333333333333333 \]

Alternatives

Alternative 1
Error5.7
Cost80772
\[\begin{array}{l} t_0 := \mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)\\ \mathbf{if}\;\frac{\sqrt{b \cdot b - c \cdot \left(3 \cdot a\right)} - b}{3 \cdot a} \leq -0.008:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{\frac{\sqrt[3]{b \cdot b - t_0}}{\frac{\sqrt[3]{b + \sqrt{t_0}}}{{\left(\frac{\sqrt[3]{\mathsf{fma}\left(3 \cdot a, c, \left(b \cdot b\right) \cdot 0\right)}}{\sqrt[3]{b + \sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}}}\right)}^{2}}}}{a}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-0.5625, \frac{{c}^{3}}{\frac{{b}^{5}}{a \cdot a}}, \mathsf{fma}\left(-0.16666666666666666, \frac{{\left(\left(\left(a \cdot a\right) \cdot \left(c \cdot c\right)\right) \cdot -1.125\right)}^{2} + 5.0625 \cdot {\left(c \cdot a\right)}^{4}}{a \cdot {b}^{7}}, \mathsf{fma}\left(-0.5, \frac{c}{b}, \frac{-0.375 \cdot \left(a \cdot \left(c \cdot c\right)\right)}{{b}^{3}}\right)\right)\right)\\ \end{array} \]
Alternative 2
Error0.8
Cost74368
\[\begin{array}{l} t_0 := \mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)\\ -0.3333333333333333 \cdot \frac{\frac{\frac{\mathsf{fma}\left(27, {c}^{3} \cdot {a}^{3}, -\mathsf{fma}\left(c \cdot c, 27 \cdot \left(\left(a \cdot a\right) \cdot \left(b \cdot b\right)\right), c \cdot \left(\left(a \cdot {b}^{4}\right) \cdot -9\right)\right)\right)}{b + \sqrt{t_0}}}{{b}^{4} + t_0 \cdot \mathsf{fma}\left(b, b, t_0\right)}}{a} \end{array} \]
Alternative 3
Error5.2
Cost60996
\[\begin{array}{l} t_0 := \mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)\\ \mathbf{if}\;b \leq 0.985:\\ \;\;\;\;\frac{{\left(b \cdot b\right)}^{3} - {t_0}^{3}}{\left(\left(b + \sqrt{t_0}\right) \cdot \left(a \cdot -3\right)\right) \cdot \left({b}^{4} + \left({t_0}^{2} + \left(b \cdot b\right) \cdot t_0\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{-0.3333333333333333}{\mathsf{fma}\left(0.6666666666666666, \frac{b}{c \cdot a}, \frac{-0.5}{b}\right) - \left(\frac{\mathsf{fma}\left(-0.5625, a \cdot \left(c \cdot \left(c \cdot a\right)\right), \left(c \cdot c\right) \cdot \mathsf{fma}\left(0.2222222222222222, \frac{{a}^{4} \cdot 6.328125}{a \cdot a}, \left(a \cdot a\right) \cdot -0.28125\right)\right)}{{b}^{5}} + a \cdot \frac{c}{{b}^{3} \cdot 2.6666666666666665}\right)}}{a}\\ \end{array} \]
Alternative 4
Error5.3
Cost53572
\[\begin{array}{l} t_0 := \mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)\\ t_1 := \sqrt{t_0}\\ \mathbf{if}\;b \leq 0.985:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{\frac{\sqrt{b - t_1} \cdot \sqrt{b \cdot b - t_0}}{a}}{\sqrt{b + t_1}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{-0.3333333333333333}{\mathsf{fma}\left(0.6666666666666666, \frac{b}{c \cdot a}, \frac{-0.5}{b}\right) - \left(\frac{\mathsf{fma}\left(-0.5625, a \cdot \left(c \cdot \left(c \cdot a\right)\right), \left(c \cdot c\right) \cdot \mathsf{fma}\left(0.2222222222222222, \frac{{a}^{4} \cdot 6.328125}{a \cdot a}, \left(a \cdot a\right) \cdot -0.28125\right)\right)}{{b}^{5}} + a \cdot \frac{c}{{b}^{3} \cdot 2.6666666666666665}\right)}}{a}\\ \end{array} \]
Alternative 5
Error5.2
Cost41860
\[\begin{array}{l} t_0 := \mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)\\ \mathbf{if}\;b \leq 0.985:\\ \;\;\;\;\frac{\frac{b \cdot b - t_0}{\left(-b\right) - \sqrt{t_0}}}{3 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{-0.3333333333333333}{\mathsf{fma}\left(0.6666666666666666, \frac{b}{c \cdot a}, \frac{-0.5}{b}\right) - \left(\frac{\mathsf{fma}\left(-0.5625, a \cdot \left(c \cdot \left(c \cdot a\right)\right), \left(c \cdot c\right) \cdot \mathsf{fma}\left(0.2222222222222222, \frac{{a}^{4} \cdot 6.328125}{a \cdot a}, \left(a \cdot a\right) \cdot -0.28125\right)\right)}{{b}^{5}} + a \cdot \frac{c}{{b}^{3} \cdot 2.6666666666666665}\right)}}{a}\\ \end{array} \]
Alternative 6
Error5.1
Cost28804
\[\begin{array}{l} t_0 := \mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)\\ \mathbf{if}\;b \leq 0.023:\\ \;\;\;\;\frac{\frac{b \cdot b - t_0}{\left(-b\right) - \sqrt{t_0}}}{3 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{\frac{1}{\mathsf{fma}\left(0.6666666666666666, \frac{b}{c \cdot a}, \frac{-0.5}{b}\right) - \left(\frac{a}{\frac{{b}^{5}}{a}} \cdot \left(0.2222222222222222 \cdot \left(\frac{{c}^{4}}{c} \cdot \frac{6.328125}{c}\right) + \left(c \cdot c\right) \cdot -0.84375\right) + \frac{c \cdot a}{\frac{{b}^{3}}{0.375}}\right)}}{a}\\ \end{array} \]
Alternative 7
Error6.9
Cost28292
\[\begin{array}{l} t_0 := \mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)\\ \mathbf{if}\;\frac{\sqrt{b \cdot b - c \cdot \left(3 \cdot a\right)} - b}{3 \cdot a} \leq -0.008:\\ \;\;\;\;\frac{\frac{b \cdot b - t_0}{\left(-b\right) - \sqrt{t_0}}}{3 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{-0.3333333333333333}{\mathsf{fma}\left(0.6666666666666666, \frac{b}{c}, \mathsf{fma}\left(-0.5, \frac{a}{b}, \left(a \cdot a\right) \cdot \frac{c \cdot -0.375}{{b}^{3}}\right)\right)}\\ \end{array} \]
Alternative 8
Error6.9
Cost28228
\[\begin{array}{l} t_0 := \mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)\\ \mathbf{if}\;\frac{\sqrt{b \cdot b - c \cdot \left(3 \cdot a\right)} - b}{3 \cdot a} \leq -0.008:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{\frac{b \cdot b - t_0}{a}}{b + \sqrt{t_0}}\\ \mathbf{else}:\\ \;\;\;\;\frac{-0.3333333333333333}{\mathsf{fma}\left(0.6666666666666666, \frac{b}{c}, \mathsf{fma}\left(-0.5, \frac{a}{b}, \left(a \cdot a\right) \cdot \frac{c \cdot -0.375}{{b}^{3}}\right)\right)}\\ \end{array} \]
Alternative 9
Error6.9
Cost28228
\[\begin{array}{l} t_0 := \mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)\\ \mathbf{if}\;\frac{\sqrt{b \cdot b - c \cdot \left(3 \cdot a\right)} - b}{3 \cdot a} \leq -0.008:\\ \;\;\;\;\frac{b \cdot b - t_0}{a} \cdot \frac{-0.3333333333333333}{b + \sqrt{t_0}}\\ \mathbf{else}:\\ \;\;\;\;\frac{-0.3333333333333333}{\mathsf{fma}\left(0.6666666666666666, \frac{b}{c}, \mathsf{fma}\left(-0.5, \frac{a}{b}, \left(a \cdot a\right) \cdot \frac{c \cdot -0.375}{{b}^{3}}\right)\right)}\\ \end{array} \]
Alternative 10
Error6.9
Cost28228
\[\begin{array}{l} t_0 := \mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)\\ \mathbf{if}\;\frac{\sqrt{b \cdot b - c \cdot \left(3 \cdot a\right)} - b}{3 \cdot a} \leq -0.008:\\ \;\;\;\;\frac{b \cdot b - t_0}{b + \sqrt{t_0}} \cdot \frac{-0.3333333333333333}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{-0.3333333333333333}{\mathsf{fma}\left(0.6666666666666666, \frac{b}{c}, \mathsf{fma}\left(-0.5, \frac{a}{b}, \left(a \cdot a\right) \cdot \frac{c \cdot -0.375}{{b}^{3}}\right)\right)}\\ \end{array} \]
Alternative 11
Error7.1
Cost27908
\[\begin{array}{l} \mathbf{if}\;\frac{\sqrt{b \cdot b - c \cdot \left(3 \cdot a\right)} - b}{3 \cdot a} \leq -0.008:\\ \;\;\;\;\frac{\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)} - b}{3 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{-0.3333333333333333}{\mathsf{fma}\left(0.6666666666666666, \frac{b}{c}, \mathsf{fma}\left(-0.5, \frac{a}{b}, \left(a \cdot a\right) \cdot \frac{c \cdot -0.375}{{b}^{3}}\right)\right)}\\ \end{array} \]
Alternative 12
Error7.2
Cost21764
\[\begin{array}{l} \mathbf{if}\;\frac{\sqrt{b \cdot b - c \cdot \left(3 \cdot a\right)} - b}{3 \cdot a} \leq -0.008:\\ \;\;\;\;\frac{\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)} - b}{3 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{\frac{1}{\mathsf{fma}\left(0.6666666666666666, \frac{b}{c \cdot a}, \frac{-0.5}{b}\right) + c \cdot \frac{a \cdot -0.375}{{b}^{3}}}}{a}\\ \end{array} \]
Alternative 13
Error7.2
Cost21060
\[\begin{array}{l} \mathbf{if}\;\frac{\sqrt{b \cdot b - c \cdot \left(3 \cdot a\right)} - b}{3 \cdot a} \leq -0.008:\\ \;\;\;\;\frac{-0.3333333333333333}{a} \cdot \left(b - \sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{-0.3333333333333333}{a \cdot \left(\left(\frac{\left(c \cdot a\right) \cdot 0.375 + \left(c \cdot a\right) \cdot -0.75}{{b}^{3}} + 0.6666666666666666 \cdot \frac{b}{c \cdot a}\right) + -0.5 \cdot \frac{1}{b}\right)}\\ \end{array} \]
Alternative 14
Error7.2
Cost21060
\[\begin{array}{l} \mathbf{if}\;\frac{\sqrt{b \cdot b - c \cdot \left(3 \cdot a\right)} - b}{3 \cdot a} \leq -0.008:\\ \;\;\;\;\frac{\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)} - b}{3 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{-0.3333333333333333}{a \cdot \left(\left(\frac{\left(c \cdot a\right) \cdot 0.375 + \left(c \cdot a\right) \cdot -0.75}{{b}^{3}} + 0.6666666666666666 \cdot \frac{b}{c \cdot a}\right) + -0.5 \cdot \frac{1}{b}\right)}\\ \end{array} \]
Alternative 15
Error7.2
Cost15876
\[\begin{array}{l} \mathbf{if}\;\frac{\sqrt{b \cdot b - c \cdot \left(3 \cdot a\right)} - b}{3 \cdot a} \leq -0.008:\\ \;\;\;\;\frac{\sqrt{b \cdot b + -3 \cdot \left(c \cdot a\right)} - b}{3 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{-0.3333333333333333}{a \cdot \left(\left(\frac{\left(c \cdot a\right) \cdot 0.375 + \left(c \cdot a\right) \cdot -0.75}{{b}^{3}} + 0.6666666666666666 \cdot \frac{b}{c \cdot a}\right) + -0.5 \cdot \frac{1}{b}\right)}\\ \end{array} \]
Alternative 16
Error9.2
Cost14788
\[\begin{array}{l} \mathbf{if}\;\frac{\sqrt{b \cdot b - c \cdot \left(3 \cdot a\right)} - b}{3 \cdot a} \leq -0.008:\\ \;\;\;\;\frac{\sqrt{b \cdot b + -3 \cdot \left(c \cdot a\right)} - b}{3 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{-0.3333333333333333}{\mathsf{fma}\left(0.6666666666666666, \frac{b}{c}, -0.5 \cdot \frac{a}{b}\right)}\\ \end{array} \]
Alternative 17
Error9.3
Cost7492
\[\begin{array}{l} \mathbf{if}\;b \leq 2.4:\\ \;\;\;\;\frac{-0.3333333333333333}{a} \cdot \left(b - \sqrt{b \cdot b + a \cdot \left(c \cdot -3\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{-0.3333333333333333}{\mathsf{fma}\left(0.6666666666666666, \frac{b}{c}, -0.5 \cdot \frac{a}{b}\right)}\\ \end{array} \]
Alternative 18
Error11.5
Cost7104
\[\frac{-0.3333333333333333}{\mathsf{fma}\left(0.6666666666666666, \frac{b}{c}, -0.5 \cdot \frac{a}{b}\right)} \]
Alternative 19
Error11.5
Cost832
\[\frac{-0.3333333333333333}{-0.5 \cdot \frac{a}{b} + 0.6666666666666666 \cdot \frac{b}{c}} \]
Alternative 20
Error22.8
Cost320
\[-0.5 \cdot \frac{c}{b} \]

Error

Reproduce?

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