Average Error: 28.6 → 28.3
Time: 33.6s
Precision: binary64
Cost: 47232
\[\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 := \frac{a}{\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)}}\\ \left(0 \cdot \frac{\sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}}{a} + \frac{\mathsf{fma}\left(b, t_0, -a\right)}{a \cdot t_0}\right) \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 (/ a (sqrt (fma b b (* c (* a -3.0)))))))
   (*
    (+
     (* 0.0 (/ (sqrt (fma c (* a -3.0) (* b b))) a))
     (/ (fma b t_0 (- a)) (* a t_0)))
    -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 = a / sqrt(fma(b, b, (c * (a * -3.0))));
	return ((0.0 * (sqrt(fma(c, (a * -3.0), (b * b))) / a)) + (fma(b, t_0, -a) / (a * t_0))) * -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 = Float64(a / sqrt(fma(b, b, Float64(c * Float64(a * -3.0)))))
	return Float64(Float64(Float64(0.0 * Float64(sqrt(fma(c, Float64(a * -3.0), Float64(b * b))) / a)) + Float64(fma(b, t_0, Float64(-a)) / Float64(a * t_0))) * -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[Sqrt[N[(b * b + N[(c * N[(a * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, N[(N[(N[(0.0 * N[(N[Sqrt[N[(c * N[(a * -3.0), $MachinePrecision] + N[(b * b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] + N[(N[(b * t$95$0 + (-a)), $MachinePrecision] / N[(a * t$95$0), $MachinePrecision]), $MachinePrecision]), $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 := \frac{a}{\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)}}\\
\left(0 \cdot \frac{\sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}}{a} + \frac{\mathsf{fma}\left(b, t_0, -a\right)}{a \cdot t_0}\right) \cdot -0.3333333333333333
\end{array}

Error

Derivation

  1. Initial program 28.6

    \[\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(b, b, a \cdot \left(c \cdot -3\right)\right)}}{a} \cdot -0.3333333333333333} \]
    Proof
    (*.f64 (/.f64 (-.f64 b (sqrt.f64 (fma.f64 b b (*.f64 a (*.f64 c -3))))) a) -1/3): 0 points increase in error, 0 points decrease in error
    (*.f64 (/.f64 (-.f64 b (sqrt.f64 (fma.f64 b b (*.f64 a (*.f64 c (Rewrite<= metadata-eval (neg.f64 3))))))) a) -1/3): 0 points increase in error, 0 points decrease in error
    (*.f64 (/.f64 (-.f64 b (sqrt.f64 (fma.f64 b b (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 a c) (neg.f64 3)))))) a) -1/3): 1 points increase in error, 1 points decrease in error
    (*.f64 (/.f64 (-.f64 b (sqrt.f64 (fma.f64 b b (Rewrite<= distribute-rgt-neg-in_binary64 (neg.f64 (*.f64 (*.f64 a c) 3)))))) a) -1/3): 0 points increase in error, 0 points decrease in error
    (*.f64 (/.f64 (-.f64 b (sqrt.f64 (fma.f64 b b (neg.f64 (Rewrite<= *-commutative_binary64 (*.f64 3 (*.f64 a c))))))) a) -1/3): 0 points increase in error, 0 points decrease in error
    (*.f64 (/.f64 (-.f64 b (sqrt.f64 (fma.f64 b b (neg.f64 (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 3 a) c)))))) a) -1/3): 0 points increase in error, 1 points decrease in error
    (*.f64 (/.f64 (-.f64 b (sqrt.f64 (Rewrite<= fma-neg_binary64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c))))) a) -1/3): 19 points increase in error, 7 points decrease in error
    (*.f64 (/.f64 (Rewrite<= /-rgt-identity_binary64 (/.f64 (-.f64 b (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) 1)) a) -1/3): 0 points increase in error, 0 points decrease in error
    (*.f64 (/.f64 (/.f64 (-.f64 b (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (Rewrite<= metadata-eval (/.f64 -1 -1))) a) -1/3): 0 points increase in error, 0 points decrease in error
    (*.f64 (/.f64 (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 (-.f64 b (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) -1) -1)) a) -1/3): 0 points increase in error, 0 points decrease in error
    (*.f64 (/.f64 (/.f64 (Rewrite<= *-commutative_binary64 (*.f64 -1 (-.f64 b (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))))) -1) a) -1/3): 0 points increase in error, 0 points decrease in error
    (*.f64 (/.f64 (/.f64 (Rewrite<= neg-mul-1_binary64 (neg.f64 (-.f64 b (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))))) -1) a) -1/3): 0 points increase in error, 0 points decrease in error
    (*.f64 (/.f64 (/.f64 (Rewrite<= sub0-neg_binary64 (-.f64 0 (-.f64 b (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))))) -1) a) -1/3): 0 points increase in error, 0 points decrease in error
    (*.f64 (/.f64 (/.f64 (Rewrite<= associate-+l-_binary64 (+.f64 (-.f64 0 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c))))) -1) a) -1/3): 0 points increase in error, 0 points decrease in error
    (*.f64 (/.f64 (/.f64 (+.f64 (Rewrite<= neg-sub0_binary64 (neg.f64 b)) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) -1) a) -1/3): 0 points increase in error, 0 points decrease in error
    (*.f64 (Rewrite<= associate-/r*_binary64 (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (*.f64 -1 a))) -1/3): 0 points increase in error, 0 points decrease in error
    (*.f64 (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (Rewrite<= neg-mul-1_binary64 (neg.f64 a))) -1/3): 0 points increase in error, 0 points decrease in error
    (*.f64 (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (neg.f64 a)) (Rewrite<= metadata-eval (/.f64 -1 3))): 0 points increase in error, 0 points decrease in error
    (Rewrite<= times-frac_binary64 (/.f64 (*.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) -1) (*.f64 (neg.f64 a) 3))): 46 points increase in error, 47 points decrease in error
    (/.f64 (*.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) -1) (Rewrite<= distribute-lft-neg-in_binary64 (neg.f64 (*.f64 a 3)))): 0 points increase in error, 0 points decrease in error
    (/.f64 (*.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) -1) (neg.f64 (Rewrite<= *-commutative_binary64 (*.f64 3 a)))): 0 points increase in error, 0 points decrease in error
    (/.f64 (*.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) -1) (Rewrite=> neg-mul-1_binary64 (*.f64 -1 (*.f64 3 a)))): 0 points increase in error, 0 points decrease in error
    (/.f64 (*.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) -1) (Rewrite=> *-commutative_binary64 (*.f64 (*.f64 3 a) -1))): 0 points increase in error, 0 points decrease in error
    (Rewrite=> times-frac_binary64 (*.f64 (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (*.f64 3 a)) (/.f64 -1 -1))): 0 points increase in error, 0 points decrease in error
    (*.f64 (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (*.f64 3 a)) (Rewrite=> metadata-eval 1)): 0 points increase in error, 0 points decrease in error
    (*.f64 (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (*.f64 3 a)) (Rewrite<= metadata-eval (neg.f64 -1))): 0 points increase in error, 0 points decrease in error
    (Rewrite<= associate-/r/_binary64 (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (/.f64 (*.f64 3 a) (neg.f64 -1)))): 0 points increase in error, 0 points decrease in error
    (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (/.f64 (*.f64 3 a) (Rewrite=> metadata-eval 1))): 0 points increase in error, 0 points decrease in error
    (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (Rewrite=> /-rgt-identity_binary64 (*.f64 3 a))): 0 points increase in error, 0 points decrease in error
  3. Applied egg-rr29.6

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

    \[\leadsto \color{blue}{\left(0 \cdot \frac{\sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}}{a} + \left(\frac{\sqrt{b}}{\sqrt{a}} \cdot \frac{\sqrt{b}}{\sqrt{a}} - \frac{\sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}}{a}\right)\right)} \cdot -0.3333333333333333 \]
    Proof
    (+.f64 (*.f64 0 (/.f64 (sqrt.f64 (fma.f64 c (*.f64 a -3) (*.f64 b b))) a)) (-.f64 (*.f64 (/.f64 (sqrt.f64 b) (sqrt.f64 a)) (/.f64 (sqrt.f64 b) (sqrt.f64 a))) (/.f64 (sqrt.f64 (fma.f64 c (*.f64 a -3) (*.f64 b b))) a))): 0 points increase in error, 0 points decrease in error
    (+.f64 (*.f64 (Rewrite<= metadata-eval (+.f64 -1 1)) (/.f64 (sqrt.f64 (fma.f64 c (*.f64 a -3) (*.f64 b b))) a)) (-.f64 (*.f64 (/.f64 (sqrt.f64 b) (sqrt.f64 a)) (/.f64 (sqrt.f64 b) (sqrt.f64 a))) (/.f64 (sqrt.f64 (fma.f64 c (*.f64 a -3) (*.f64 b b))) a))): 0 points increase in error, 0 points decrease in error
    (+.f64 (*.f64 (+.f64 -1 1) (/.f64 (sqrt.f64 (fma.f64 c (Rewrite<= *-commutative_binary64 (*.f64 -3 a)) (*.f64 b b))) a)) (-.f64 (*.f64 (/.f64 (sqrt.f64 b) (sqrt.f64 a)) (/.f64 (sqrt.f64 b) (sqrt.f64 a))) (/.f64 (sqrt.f64 (fma.f64 c (*.f64 a -3) (*.f64 b b))) a))): 0 points increase in error, 0 points decrease in error
    (+.f64 (*.f64 (+.f64 -1 1) (/.f64 (Rewrite<= unpow1/2_binary64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/2)) a)) (-.f64 (*.f64 (/.f64 (sqrt.f64 b) (sqrt.f64 a)) (/.f64 (sqrt.f64 b) (sqrt.f64 a))) (/.f64 (sqrt.f64 (fma.f64 c (*.f64 a -3) (*.f64 b b))) a))): 0 points increase in error, 0 points decrease in error
    (+.f64 (*.f64 (+.f64 -1 1) (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) (Rewrite<= metadata-eval (*.f64 2 1/4))) a)) (-.f64 (*.f64 (/.f64 (sqrt.f64 b) (sqrt.f64 a)) (/.f64 (sqrt.f64 b) (sqrt.f64 a))) (/.f64 (sqrt.f64 (fma.f64 c (*.f64 a -3) (*.f64 b b))) a))): 0 points increase in error, 0 points decrease in error
    (+.f64 (*.f64 (+.f64 -1 1) (/.f64 (Rewrite<= pow-sqr_binary64 (*.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4))) a)) (-.f64 (*.f64 (/.f64 (sqrt.f64 b) (sqrt.f64 a)) (/.f64 (sqrt.f64 b) (sqrt.f64 a))) (/.f64 (sqrt.f64 (fma.f64 c (*.f64 a -3) (*.f64 b b))) a))): 0 points increase in error, 0 points decrease in error
    (+.f64 (*.f64 (+.f64 -1 1) (Rewrite<= associate-*l/_binary64 (*.f64 (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) a) (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4)))) (-.f64 (*.f64 (/.f64 (sqrt.f64 b) (sqrt.f64 a)) (/.f64 (sqrt.f64 b) (sqrt.f64 a))) (/.f64 (sqrt.f64 (fma.f64 c (*.f64 a -3) (*.f64 b b))) a))): 0 points increase in error, 0 points decrease in error
    (+.f64 (*.f64 (+.f64 -1 1) (*.f64 (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) a) (Rewrite<= /-rgt-identity_binary64 (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) 1)))) (-.f64 (*.f64 (/.f64 (sqrt.f64 b) (sqrt.f64 a)) (/.f64 (sqrt.f64 b) (sqrt.f64 a))) (/.f64 (sqrt.f64 (fma.f64 c (*.f64 a -3) (*.f64 b b))) a))): 0 points increase in error, 0 points decrease in error
    (+.f64 (Rewrite<= distribute-lft1-in_binary64 (+.f64 (*.f64 -1 (*.f64 (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) a) (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) 1))) (*.f64 (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) a) (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) 1)))) (-.f64 (*.f64 (/.f64 (sqrt.f64 b) (sqrt.f64 a)) (/.f64 (sqrt.f64 b) (sqrt.f64 a))) (/.f64 (sqrt.f64 (fma.f64 c (*.f64 a -3) (*.f64 b b))) a))): 0 points increase in error, 0 points decrease in error
    (+.f64 (+.f64 (Rewrite<= neg-mul-1_binary64 (neg.f64 (*.f64 (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) a) (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) 1)))) (*.f64 (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) a) (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) 1))) (-.f64 (*.f64 (/.f64 (sqrt.f64 b) (sqrt.f64 a)) (/.f64 (sqrt.f64 b) (sqrt.f64 a))) (/.f64 (sqrt.f64 (fma.f64 c (*.f64 a -3) (*.f64 b b))) a))): 0 points increase in error, 0 points decrease in error
    (+.f64 (+.f64 (neg.f64 (*.f64 (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) a) (Rewrite=> /-rgt-identity_binary64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4)))) (*.f64 (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) a) (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) 1))) (-.f64 (*.f64 (/.f64 (sqrt.f64 b) (sqrt.f64 a)) (/.f64 (sqrt.f64 b) (sqrt.f64 a))) (/.f64 (sqrt.f64 (fma.f64 c (*.f64 a -3) (*.f64 b b))) a))): 0 points increase in error, 0 points decrease in error
    (+.f64 (+.f64 (Rewrite=> distribute-lft-neg-in_binary64 (*.f64 (neg.f64 (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) a)) (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4))) (*.f64 (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) a) (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) 1))) (-.f64 (*.f64 (/.f64 (sqrt.f64 b) (sqrt.f64 a)) (/.f64 (sqrt.f64 b) (sqrt.f64 a))) (/.f64 (sqrt.f64 (fma.f64 c (*.f64 a -3) (*.f64 b b))) a))): 0 points increase in error, 0 points decrease in error
    (+.f64 (+.f64 (*.f64 (neg.f64 (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) a)) (Rewrite<= /-rgt-identity_binary64 (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) 1))) (*.f64 (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) a) (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) 1))) (-.f64 (*.f64 (/.f64 (sqrt.f64 b) (sqrt.f64 a)) (/.f64 (sqrt.f64 b) (sqrt.f64 a))) (/.f64 (sqrt.f64 (fma.f64 c (*.f64 a -3) (*.f64 b b))) a))): 0 points increase in error, 0 points decrease in error
    (+.f64 (Rewrite<= fma-udef_binary64 (fma.f64 (neg.f64 (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) a)) (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) 1) (*.f64 (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) a) (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) 1)))) (-.f64 (*.f64 (/.f64 (sqrt.f64 b) (sqrt.f64 a)) (/.f64 (sqrt.f64 b) (sqrt.f64 a))) (/.f64 (sqrt.f64 (fma.f64 c (*.f64 a -3) (*.f64 b b))) a))): 121 points increase in error, 127 points decrease in error
    (+.f64 (fma.f64 (neg.f64 (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) a)) (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) 1) (*.f64 (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) a) (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) 1))) (-.f64 (*.f64 (/.f64 (sqrt.f64 b) (sqrt.f64 a)) (/.f64 (sqrt.f64 b) (sqrt.f64 a))) (/.f64 (sqrt.f64 (fma.f64 c (Rewrite<= *-commutative_binary64 (*.f64 -3 a)) (*.f64 b b))) a))): 0 points increase in error, 0 points decrease in error
    (+.f64 (fma.f64 (neg.f64 (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) a)) (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) 1) (*.f64 (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) a) (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) 1))) (-.f64 (*.f64 (/.f64 (sqrt.f64 b) (sqrt.f64 a)) (/.f64 (sqrt.f64 b) (sqrt.f64 a))) (/.f64 (Rewrite<= unpow1/2_binary64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/2)) a))): 0 points increase in error, 0 points decrease in error
    (+.f64 (fma.f64 (neg.f64 (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) a)) (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) 1) (*.f64 (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) a) (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) 1))) (-.f64 (*.f64 (/.f64 (sqrt.f64 b) (sqrt.f64 a)) (/.f64 (sqrt.f64 b) (sqrt.f64 a))) (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) (Rewrite<= metadata-eval (*.f64 2 1/4))) a))): 0 points increase in error, 0 points decrease in error
    (+.f64 (fma.f64 (neg.f64 (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) a)) (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) 1) (*.f64 (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) a) (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) 1))) (-.f64 (*.f64 (/.f64 (sqrt.f64 b) (sqrt.f64 a)) (/.f64 (sqrt.f64 b) (sqrt.f64 a))) (/.f64 (Rewrite<= pow-sqr_binary64 (*.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4))) a))): 59 points increase in error, 51 points decrease in error
    (+.f64 (fma.f64 (neg.f64 (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) a)) (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) 1) (*.f64 (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) a) (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) 1))) (-.f64 (*.f64 (/.f64 (sqrt.f64 b) (sqrt.f64 a)) (/.f64 (sqrt.f64 b) (sqrt.f64 a))) (Rewrite<= associate-*l/_binary64 (*.f64 (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) a) (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4))))): 45 points increase in error, 42 points decrease in error
    (+.f64 (fma.f64 (neg.f64 (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) a)) (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) 1) (*.f64 (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) a) (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) 1))) (-.f64 (*.f64 (/.f64 (sqrt.f64 b) (sqrt.f64 a)) (/.f64 (sqrt.f64 b) (sqrt.f64 a))) (*.f64 (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) a) (Rewrite<= /-rgt-identity_binary64 (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) 1))))): 0 points increase in error, 0 points decrease in error
    (+.f64 (fma.f64 (neg.f64 (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) a)) (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) 1) (*.f64 (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) a) (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) 1))) (Rewrite=> fma-neg_binary64 (fma.f64 (/.f64 (sqrt.f64 b) (sqrt.f64 a)) (/.f64 (sqrt.f64 b) (sqrt.f64 a)) (neg.f64 (*.f64 (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) a) (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) 1)))))): 116 points increase in error, 138 points decrease in error
    (Rewrite<= +-commutative_binary64 (+.f64 (fma.f64 (/.f64 (sqrt.f64 b) (sqrt.f64 a)) (/.f64 (sqrt.f64 b) (sqrt.f64 a)) (neg.f64 (*.f64 (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) a) (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) 1)))) (fma.f64 (neg.f64 (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) a)) (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) 1) (*.f64 (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) a) (/.f64 (pow.f64 (fma.f64 c (*.f64 -3 a) (*.f64 b b)) 1/4) 1))))): 0 points increase in error, 0 points decrease in error
  5. Applied egg-rr29.6

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

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

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

Alternatives

Alternative 1
Error28.5
Cost33792
\[-0.3333333333333333 \cdot \left(0 \cdot \frac{\sqrt{\mathsf{fma}\left(c, a \cdot -3, b \cdot b\right)}}{a} + \mathsf{fma}\left(b, \frac{1}{a}, \frac{-\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)}}{a}\right)\right) \]
Alternative 2
Error28.5
Cost13760
\[\left(\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)} - b\right) \cdot \left(\frac{1}{a} \cdot 0.3333333333333333\right) \]
Alternative 3
Error28.5
Cost13632
\[\left(\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)} - b\right) \cdot \frac{0.3333333333333333}{a} \]
Alternative 4
Error28.5
Cost13632
\[-0.3333333333333333 \cdot \frac{b - \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)}}{a} \]
Alternative 5
Error28.6
Cost7488
\[\left(\frac{1}{a} \cdot 0.3333333333333333\right) \cdot \left(\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} - b\right) \]
Alternative 6
Error28.6
Cost7360
\[\frac{0.3333333333333333}{a} \cdot \left(\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} - b\right) \]
Alternative 7
Error28.6
Cost7360
\[\frac{\sqrt{b \cdot b - a \cdot \left(c \cdot 3\right)} - b}{a \cdot 3} \]

Error

Reproduce

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