?

Average Accuracy: 31.5% → 99.0%
Time: 22.6s
Precision: binary64
Cost: 34880

?

\[\left(\left(1.1102230246251565 \cdot 10^{-16} < a \land a < 9007199254740992\right) \land \left(1.1102230246251565 \cdot 10^{-16} < b \land b < 9007199254740992\right)\right) \land \left(1.1102230246251565 \cdot 10^{-16} < c \land c < 9007199254740992\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{6 \cdot \left(c \cdot \left(a \cdot {b}^{2}\right)\right) + -9 \cdot {\left(c \cdot a\right)}^{2}}{\left(a \cdot \left(b \cdot -3\right) + a \cdot \left(-3 \cdot \sqrt{t_0}\right)\right) \cdot \left(b \cdot b + t_0\right)} \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))))
   (/
    (+ (* 6.0 (* c (* a (pow b 2.0)))) (* -9.0 (pow (* c a) 2.0)))
    (* (+ (* a (* b -3.0)) (* a (* -3.0 (sqrt t_0)))) (+ (* b b) t_0)))))
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 ((6.0 * (c * (a * pow(b, 2.0)))) + (-9.0 * pow((c * a), 2.0))) / (((a * (b * -3.0)) + (a * (-3.0 * sqrt(t_0)))) * ((b * b) + t_0));
}
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(6.0 * Float64(c * Float64(a * (b ^ 2.0)))) + Float64(-9.0 * (Float64(c * a) ^ 2.0))) / Float64(Float64(Float64(a * Float64(b * -3.0)) + Float64(a * Float64(-3.0 * sqrt(t_0)))) * Float64(Float64(b * b) + t_0)))
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[(6.0 * N[(c * N[(a * N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-9.0 * N[Power[N[(c * a), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(a * N[(b * -3.0), $MachinePrecision]), $MachinePrecision] + N[(a * N[(-3.0 * N[Sqrt[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(b * b), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision]), $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{6 \cdot \left(c \cdot \left(a \cdot {b}^{2}\right)\right) + -9 \cdot {\left(c \cdot a\right)}^{2}}{\left(a \cdot \left(b \cdot -3\right) + a \cdot \left(-3 \cdot \sqrt{t_0}\right)\right) \cdot \left(b \cdot b + t_0\right)}
\end{array}

Error?

Derivation?

  1. Initial program 31.5%

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

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

    [Start]31.5

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

    remove-double-neg [<=]31.5

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

    sub-neg [<=]31.5

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

    div-sub [=>]31.1

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

    neg-mul-1 [=>]31.1

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

    associate-*l/ [<=]31.3

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

    distribute-frac-neg [=>]31.3

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

    fma-neg [=>]32.8

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

    /-rgt-identity [<=]32.8

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

    metadata-eval [<=]32.8

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

    associate-/l* [<=]32.8

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

    *-commutative [<=]32.8

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

    neg-mul-1 [<=]32.8

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

    fma-neg [<=]31.3

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

    neg-mul-1 [=>]31.3

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

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

    [Start]31.5

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

    associate-*r/ [=>]31.5

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

    associate-/l* [=>]31.5

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

    flip-- [=>]31.5

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

    associate-/l/ [=>]31.5

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

    add-sqr-sqrt [<=]32.5

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

    flip-- [=>]32.4

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

    associate-/l/ [=>]32.4

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

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

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

    [Start]99.0

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

    distribute-rgt-in [=>]99.0

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

    *-commutative [=>]99.0

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

    associate-*r* [=>]99.0

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

    *-commutative [=>]99.0

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

    associate-*l* [=>]99.0

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

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

    [Start]99.0

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

    expm1-log1p-u [=>]99.0

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

    expm1-udef [=>]92.4

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

    sub-neg [=>]92.4

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

    pow-prod-down [=>]92.4

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

    metadata-eval [=>]92.4

    \[ \frac{6 \cdot \left(c \cdot \left(a \cdot {b}^{2}\right)\right) + -9 \cdot \left(e^{\mathsf{log1p}\left({\left(c \cdot a\right)}^{2}\right)} + \color{blue}{-1}\right)}{\left(\left(b \cdot -3\right) \cdot a + a \cdot \left(-3 \cdot \sqrt{\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)}\right)\right) \cdot \left(b \cdot b + \mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)\right)} \]
  7. Simplified99.0%

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

    [Start]92.4

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

    metadata-eval [<=]92.4

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

    sub-neg [<=]92.4

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

    expm1-def [=>]99.0

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

    expm1-log1p [=>]99.0

    \[ \frac{6 \cdot \left(c \cdot \left(a \cdot {b}^{2}\right)\right) + -9 \cdot \color{blue}{{\left(c \cdot a\right)}^{2}}}{\left(\left(b \cdot -3\right) \cdot a + a \cdot \left(-3 \cdot \sqrt{\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)}\right)\right) \cdot \left(b \cdot b + \mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)\right)} \]
  8. Final simplification99.0%

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

Alternatives

Alternative 1
Accuracy99.0%
Cost34624
\[\begin{array}{l} t_0 := \mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)\\ \frac{6 \cdot \left(c \cdot \left(a \cdot {b}^{2}\right)\right) + -9 \cdot {\left(c \cdot a\right)}^{2}}{\left(b \cdot b + t_0\right) \cdot \left(\left(a \cdot -3\right) \cdot \left(b + \sqrt{t_0}\right)\right)} \end{array} \]
Alternative 2
Accuracy99.0%
Cost28352
\[\begin{array}{l} t_0 := \mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)\\ \frac{\mathsf{fma}\left(-9, \left(c \cdot a\right) \cdot \left(c \cdot a\right), \left(a \cdot \left(b \cdot b\right)\right) \cdot \left(6 \cdot c\right)\right)}{\left(b \cdot b + t_0\right) \cdot \left(\left(a \cdot -3\right) \cdot \left(b + \sqrt{t_0}\right)\right)} \end{array} \]
Alternative 3
Accuracy99.0%
Cost28352
\[\begin{array}{l} t_0 := \mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)\\ \frac{\mathsf{fma}\left(6, c \cdot \left(a \cdot \left(b \cdot b\right)\right), -9 \cdot \left(\left(c \cdot c\right) \cdot \left(a \cdot a\right)\right)\right)}{\left(b \cdot b + t_0\right) \cdot \left(\left(a \cdot -3\right) \cdot \left(b + \sqrt{t_0}\right)\right)} \end{array} \]
Alternative 4
Accuracy90.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(a \cdot -3\right)} - b}{a \cdot 3} \leq -50:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{\frac{b \cdot b - t_0}{a}}{b + \sqrt{t_0}}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{c}{b}, -0.5, \frac{-0.375}{\frac{{b}^{3}}{a \cdot \left(c \cdot c\right)}}\right)\\ \end{array} \]
Alternative 5
Accuracy90.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(a \cdot -3\right)} - b}{a \cdot 3} \leq -50:\\ \;\;\;\;\frac{\frac{b \cdot b - t_0}{b + \sqrt{t_0}}}{a} \cdot -0.3333333333333333\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{c}{b}, -0.5, \frac{-0.375}{\frac{{b}^{3}}{a \cdot \left(c \cdot c\right)}}\right)\\ \end{array} \]
Alternative 6
Accuracy90.7%
Cost21124
\[\begin{array}{l} t_0 := c \cdot \left(a \cdot -3\right)\\ \mathbf{if}\;\frac{\sqrt{b \cdot b + t_0} - b}{a \cdot 3} \leq -50:\\ \;\;\;\;\frac{\sqrt{\mathsf{fma}\left(b, b, t_0\right)} - b}{a \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-0.375, \frac{c \cdot c}{\frac{{b}^{3}}{a}}, \frac{c}{b} \cdot -0.5\right)\\ \end{array} \]
Alternative 7
Accuracy90.7%
Cost21124
\[\begin{array}{l} t_0 := c \cdot \left(a \cdot -3\right)\\ \mathbf{if}\;\frac{\sqrt{b \cdot b + t_0} - b}{a \cdot 3} \leq -50:\\ \;\;\;\;\frac{\sqrt{\mathsf{fma}\left(b, b, t_0\right)} - b}{a \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{c}{b}, -0.5, \frac{-0.375}{\frac{{b}^{3}}{a \cdot \left(c \cdot c\right)}}\right)\\ \end{array} \]
Alternative 8
Accuracy84.3%
Cost21060
\[\begin{array}{l} t_0 := c \cdot \left(a \cdot -3\right)\\ \mathbf{if}\;\frac{\sqrt{b \cdot b + t_0} - b}{a \cdot 3} \leq -5 \cdot 10^{-6}:\\ \;\;\;\;\left(b - \sqrt{\mathsf{fma}\left(b, b, t_0\right)}\right) \cdot \frac{-0.3333333333333333}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \]
Alternative 9
Accuracy84.3%
Cost21060
\[\begin{array}{l} t_0 := c \cdot \left(a \cdot -3\right)\\ \mathbf{if}\;\frac{\sqrt{b \cdot b + t_0} - b}{a \cdot 3} \leq -5 \cdot 10^{-6}:\\ \;\;\;\;\frac{\sqrt{\mathsf{fma}\left(b, b, t_0\right)} - b}{a \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \]
Alternative 10
Accuracy84.2%
Cost14916
\[\begin{array}{l} \mathbf{if}\;\frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} - b}{a \cdot 3} \leq -5 \cdot 10^{-6}:\\ \;\;\;\;-0.3333333333333333 \cdot \left(\frac{1}{a} \cdot \left(b - \sqrt{b \cdot b + a \cdot \left(c \cdot -3\right)}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \]
Alternative 11
Accuracy84.2%
Cost14788
\[\begin{array}{l} \mathbf{if}\;\frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} - b}{a \cdot 3} \leq -5 \cdot 10^{-6}:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{b - \sqrt{b \cdot b + a \cdot \left(c \cdot -3\right)}}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \]
Alternative 12
Accuracy81.1%
Cost320
\[c \cdot \frac{-0.5}{b} \]
Alternative 13
Accuracy81.3%
Cost320
\[\frac{c \cdot -0.5}{b} \]
Alternative 14
Accuracy3.2%
Cost64
\[0 \]

Error

Reproduce?

herbie shell --seed 2023137 
(FPCore (a b c)
  :name "Cubic critical, medium range"
  :precision binary64
  :pre (and (and (and (< 1.1102230246251565e-16 a) (< a 9007199254740992.0)) (and (< 1.1102230246251565e-16 b) (< b 9007199254740992.0))) (and (< 1.1102230246251565e-16 c) (< c 9007199254740992.0)))
  (/ (+ (- b) (sqrt (- (* b b) (* (* 3.0 a) c)))) (* 3.0 a)))