Average Error: 44.0 → 2.8
Time: 13.4s
Precision: binary64
Cost: 53504
\[\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} \]
\[\mathsf{fma}\left(-0.16666666666666666, \left(c \cdot {\left(c \cdot a\right)}^{3}\right) \cdot \frac{6.328125}{{b}^{7}}, \mathsf{fma}\left(-0.5, \frac{c}{b}, \mathsf{fma}\left(-0.375, a \cdot \frac{c}{\frac{{b}^{3}}{c}}, \frac{-0.5625}{{b}^{5}} \cdot \left({c}^{3} \cdot \left(a \cdot a\right)\right)\right)\right)\right) \]
(FPCore (a b c)
 :precision binary64
 (/ (+ (- b) (sqrt (- (* b b) (* (* 3.0 a) c)))) (* 3.0 a)))
(FPCore (a b c)
 :precision binary64
 (fma
  -0.16666666666666666
  (* (* c (pow (* c a) 3.0)) (/ 6.328125 (pow b 7.0)))
  (fma
   -0.5
   (/ c b)
   (fma
    -0.375
    (* a (/ c (/ (pow b 3.0) c)))
    (* (/ -0.5625 (pow b 5.0)) (* (pow c 3.0) (* a a)))))))
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) {
	return fma(-0.16666666666666666, ((c * pow((c * a), 3.0)) * (6.328125 / pow(b, 7.0))), fma(-0.5, (c / b), fma(-0.375, (a * (c / (pow(b, 3.0) / c))), ((-0.5625 / pow(b, 5.0)) * (pow(c, 3.0) * (a * 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 code(a, b, c)
	return fma(-0.16666666666666666, Float64(Float64(c * (Float64(c * a) ^ 3.0)) * Float64(6.328125 / (b ^ 7.0))), fma(-0.5, Float64(c / b), fma(-0.375, Float64(a * Float64(c / Float64((b ^ 3.0) / c))), Float64(Float64(-0.5625 / (b ^ 5.0)) * Float64((c ^ 3.0) * Float64(a * 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]
code[a_, b_, c_] := N[(-0.16666666666666666 * N[(N[(c * N[Power[N[(c * a), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision] * N[(6.328125 / N[Power[b, 7.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-0.5 * N[(c / b), $MachinePrecision] + N[(-0.375 * N[(a * N[(c / N[(N[Power[b, 3.0], $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(-0.5625 / N[Power[b, 5.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[c, 3.0], $MachinePrecision] * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}
\mathsf{fma}\left(-0.16666666666666666, \left(c \cdot {\left(c \cdot a\right)}^{3}\right) \cdot \frac{6.328125}{{b}^{7}}, \mathsf{fma}\left(-0.5, \frac{c}{b}, \mathsf{fma}\left(-0.375, a \cdot \frac{c}{\frac{{b}^{3}}{c}}, \frac{-0.5625}{{b}^{5}} \cdot \left({c}^{3} \cdot \left(a \cdot a\right)\right)\right)\right)\right)

Error

Derivation

  1. Initial program 44.0

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

    \[\leadsto \color{blue}{\left(\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)} - b\right) \cdot \frac{0.3333333333333333}{a}} \]
    Proof
    (*.f64 (-.f64 (sqrt.f64 (fma.f64 b b (*.f64 c (*.f64 a -3)))) b) (/.f64 1/3 a)): 0 points increase in error, 0 points decrease in error
    (*.f64 (-.f64 (sqrt.f64 (fma.f64 b b (*.f64 c (*.f64 a (Rewrite<= metadata-eval (neg.f64 3)))))) b) (/.f64 1/3 a)): 0 points increase in error, 0 points decrease in error
    (*.f64 (-.f64 (sqrt.f64 (fma.f64 b b (*.f64 c (Rewrite<= distribute-rgt-neg-in_binary64 (neg.f64 (*.f64 a 3)))))) b) (/.f64 1/3 a)): 0 points increase in error, 0 points decrease in error
    (*.f64 (-.f64 (sqrt.f64 (fma.f64 b b (*.f64 c (neg.f64 (Rewrite<= *-commutative_binary64 (*.f64 3 a)))))) b) (/.f64 1/3 a)): 0 points increase in error, 0 points decrease in error
    (*.f64 (-.f64 (sqrt.f64 (fma.f64 b b (Rewrite<= distribute-rgt-neg-in_binary64 (neg.f64 (*.f64 c (*.f64 3 a)))))) b) (/.f64 1/3 a)): 0 points increase in error, 0 points decrease in error
    (*.f64 (-.f64 (sqrt.f64 (fma.f64 b b (neg.f64 (Rewrite<= *-commutative_binary64 (*.f64 (*.f64 3 a) c))))) b) (/.f64 1/3 a)): 0 points increase in error, 0 points decrease in error
    (*.f64 (-.f64 (sqrt.f64 (Rewrite<= fma-neg_binary64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) b) (/.f64 1/3 a)): 14 points increase in error, 5 points decrease in error
    (*.f64 (Rewrite<= unsub-neg_binary64 (+.f64 (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c))) (neg.f64 b))) (/.f64 1/3 a)): 0 points increase in error, 0 points decrease in error
    (*.f64 (Rewrite<= +-commutative_binary64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c))))) (/.f64 1/3 a)): 0 points increase in error, 0 points decrease in error
    (*.f64 (Rewrite<= /-rgt-identity_binary64 (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) 1)) (/.f64 1/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)))) (Rewrite<= metadata-eval (*.f64 -1 -1))) (/.f64 1/3 a)): 0 points increase in error, 0 points decrease in error
    (*.f64 (Rewrite<= associate-/l/_binary64 (/.f64 (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) -1) -1)) (/.f64 1/3 a)): 0 points increase in error, 0 points decrease in error
    (*.f64 (/.f64 (/.f64 (+.f64 (Rewrite=> neg-sub0_binary64 (-.f64 0 b)) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) -1) -1) (/.f64 1/3 a)): 0 points increase in error, 0 points decrease in error
    (*.f64 (/.f64 (/.f64 (Rewrite=> associate-+l-_binary64 (-.f64 0 (-.f64 b (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))))) -1) -1) (/.f64 1/3 a)): 0 points increase in error, 0 points decrease in error
    (*.f64 (/.f64 (/.f64 (Rewrite=> sub0-neg_binary64 (neg.f64 (-.f64 b (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))))) -1) -1) (/.f64 1/3 a)): 0 points increase in error, 0 points decrease in error
    (*.f64 (/.f64 (/.f64 (Rewrite=> neg-mul-1_binary64 (*.f64 -1 (-.f64 b (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))))) -1) -1) (/.f64 1/3 a)): 0 points increase in error, 0 points decrease in error
    (*.f64 (/.f64 (/.f64 (Rewrite=> *-commutative_binary64 (*.f64 (-.f64 b (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) -1)) -1) -1) (/.f64 1/3 a)): 0 points increase in error, 0 points decrease in error
    (*.f64 (/.f64 (Rewrite=> associate-/l*_binary64 (/.f64 (-.f64 b (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (/.f64 -1 -1))) -1) (/.f64 1/3 a)): 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 1)) -1) (/.f64 1/3 a)): 0 points increase in error, 0 points decrease in error
    (*.f64 (/.f64 (Rewrite=> /-rgt-identity_binary64 (-.f64 b (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c))))) -1) (/.f64 1/3 a)): 0 points increase in error, 0 points decrease in error
    (*.f64 (/.f64 (-.f64 b (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) -1) (/.f64 (Rewrite<= metadata-eval (/.f64 1 3)) a)): 0 points increase in error, 0 points decrease in error
    (*.f64 (/.f64 (-.f64 b (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) -1) (/.f64 (/.f64 (Rewrite<= metadata-eval (neg.f64 -1)) 3) a)): 0 points increase in error, 0 points decrease in error
    (*.f64 (/.f64 (-.f64 b (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) -1) (Rewrite<= associate-/r*_binary64 (/.f64 (neg.f64 -1) (*.f64 3 a)))): 24 points increase in error, 20 points decrease in error
    (Rewrite<= times-frac_binary64 (/.f64 (*.f64 (-.f64 b (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (neg.f64 -1)) (*.f64 -1 (*.f64 3 a)))): 17 points increase in error, 11 points decrease in error
    (/.f64 (*.f64 (-.f64 b (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (neg.f64 -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 b (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (*.f64 3 a)) (/.f64 (neg.f64 -1) -1))): 0 points increase in error, 0 points decrease in error
    (*.f64 (/.f64 (-.f64 b (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (*.f64 3 a)) (/.f64 (Rewrite=> metadata-eval 1) -1)): 0 points increase in error, 0 points decrease in error
    (*.f64 (/.f64 (-.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
    (Rewrite=> associate-*l/_binary64 (/.f64 (*.f64 (-.f64 b (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) -1) (*.f64 3 a))): 0 points increase in error, 0 points decrease in error
    (/.f64 (Rewrite<= *-commutative_binary64 (*.f64 -1 (-.f64 b (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))))) (*.f64 3 a)): 0 points increase in error, 0 points decrease in error
    (/.f64 (Rewrite<= neg-mul-1_binary64 (neg.f64 (-.f64 b (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))))) (*.f64 3 a)): 0 points increase in error, 0 points decrease in error
    (/.f64 (Rewrite<= sub0-neg_binary64 (-.f64 0 (-.f64 b (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))))) (*.f64 3 a)): 0 points increase in error, 0 points decrease in error
    (/.f64 (Rewrite<= associate-+l-_binary64 (+.f64 (-.f64 0 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c))))) (*.f64 3 a)): 0 points increase in error, 0 points decrease in error
    (/.f64 (+.f64 (Rewrite<= neg-sub0_binary64 (neg.f64 b)) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (*.f64 3 a)): 0 points increase in error, 0 points decrease in error
  3. Taylor expanded in a around 0 2.8

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

    \[\leadsto \color{blue}{\mathsf{fma}\left(-0.16666666666666666, \left(\frac{{c}^{4}}{{b}^{6}} \cdot 6.328125\right) \cdot \frac{{a}^{3}}{b}, \mathsf{fma}\left(-0.5, \frac{c}{b}, \mathsf{fma}\left(-0.375, a \cdot \frac{c}{\frac{{b}^{3}}{c}}, \frac{-0.5625}{{b}^{5}} \cdot \left({c}^{3} \cdot \left(a \cdot a\right)\right)\right)\right)\right)} \]
    Proof
    (fma.f64 -1/6 (*.f64 (*.f64 (/.f64 (pow.f64 c 4) (pow.f64 b 6)) 405/64) (/.f64 (pow.f64 a 3) b)) (fma.f64 -1/2 (/.f64 c b) (fma.f64 -3/8 (*.f64 a (/.f64 c (/.f64 (pow.f64 b 3) c))) (*.f64 (/.f64 -9/16 (pow.f64 b 5)) (*.f64 (pow.f64 c 3) (*.f64 a a)))))): 0 points increase in error, 0 points decrease in error
    (fma.f64 -1/6 (*.f64 (*.f64 (/.f64 (pow.f64 c 4) (pow.f64 b 6)) (Rewrite<= metadata-eval (+.f64 81/16 81/64))) (/.f64 (pow.f64 a 3) b)) (fma.f64 -1/2 (/.f64 c b) (fma.f64 -3/8 (*.f64 a (/.f64 c (/.f64 (pow.f64 b 3) c))) (*.f64 (/.f64 -9/16 (pow.f64 b 5)) (*.f64 (pow.f64 c 3) (*.f64 a a)))))): 0 points increase in error, 0 points decrease in error
    (fma.f64 -1/6 (*.f64 (*.f64 (/.f64 (pow.f64 c 4) (pow.f64 b 6)) (+.f64 81/16 (Rewrite<= metadata-eval (*.f64 -9/8 -9/8)))) (/.f64 (pow.f64 a 3) b)) (fma.f64 -1/2 (/.f64 c b) (fma.f64 -3/8 (*.f64 a (/.f64 c (/.f64 (pow.f64 b 3) c))) (*.f64 (/.f64 -9/16 (pow.f64 b 5)) (*.f64 (pow.f64 c 3) (*.f64 a a)))))): 0 points increase in error, 0 points decrease in error
    (fma.f64 -1/6 (*.f64 (Rewrite<= distribute-rgt-out_binary64 (+.f64 (*.f64 81/16 (/.f64 (pow.f64 c 4) (pow.f64 b 6))) (*.f64 (*.f64 -9/8 -9/8) (/.f64 (pow.f64 c 4) (pow.f64 b 6))))) (/.f64 (pow.f64 a 3) b)) (fma.f64 -1/2 (/.f64 c b) (fma.f64 -3/8 (*.f64 a (/.f64 c (/.f64 (pow.f64 b 3) c))) (*.f64 (/.f64 -9/16 (pow.f64 b 5)) (*.f64 (pow.f64 c 3) (*.f64 a a)))))): 0 points increase in error, 0 points decrease in error
    (fma.f64 -1/6 (*.f64 (+.f64 (*.f64 81/16 (/.f64 (pow.f64 c 4) (pow.f64 b 6))) (*.f64 (*.f64 -9/8 -9/8) (/.f64 (pow.f64 c (Rewrite<= metadata-eval (*.f64 2 2))) (pow.f64 b 6)))) (/.f64 (pow.f64 a 3) b)) (fma.f64 -1/2 (/.f64 c b) (fma.f64 -3/8 (*.f64 a (/.f64 c (/.f64 (pow.f64 b 3) c))) (*.f64 (/.f64 -9/16 (pow.f64 b 5)) (*.f64 (pow.f64 c 3) (*.f64 a a)))))): 0 points increase in error, 0 points decrease in error
    (fma.f64 -1/6 (*.f64 (+.f64 (*.f64 81/16 (/.f64 (pow.f64 c 4) (pow.f64 b 6))) (*.f64 (*.f64 -9/8 -9/8) (/.f64 (Rewrite<= pow-sqr_binary64 (*.f64 (pow.f64 c 2) (pow.f64 c 2))) (pow.f64 b 6)))) (/.f64 (pow.f64 a 3) b)) (fma.f64 -1/2 (/.f64 c b) (fma.f64 -3/8 (*.f64 a (/.f64 c (/.f64 (pow.f64 b 3) c))) (*.f64 (/.f64 -9/16 (pow.f64 b 5)) (*.f64 (pow.f64 c 3) (*.f64 a a)))))): 0 points increase in error, 0 points decrease in error
    (fma.f64 -1/6 (*.f64 (+.f64 (*.f64 81/16 (/.f64 (pow.f64 c 4) (pow.f64 b 6))) (*.f64 (*.f64 -9/8 -9/8) (/.f64 (*.f64 (pow.f64 c 2) (pow.f64 c 2)) (pow.f64 b (Rewrite<= metadata-eval (*.f64 2 3)))))) (/.f64 (pow.f64 a 3) b)) (fma.f64 -1/2 (/.f64 c b) (fma.f64 -3/8 (*.f64 a (/.f64 c (/.f64 (pow.f64 b 3) c))) (*.f64 (/.f64 -9/16 (pow.f64 b 5)) (*.f64 (pow.f64 c 3) (*.f64 a a)))))): 0 points increase in error, 0 points decrease in error
    (fma.f64 -1/6 (*.f64 (+.f64 (*.f64 81/16 (/.f64 (pow.f64 c 4) (pow.f64 b 6))) (*.f64 (*.f64 -9/8 -9/8) (/.f64 (*.f64 (pow.f64 c 2) (pow.f64 c 2)) (Rewrite<= pow-sqr_binary64 (*.f64 (pow.f64 b 3) (pow.f64 b 3)))))) (/.f64 (pow.f64 a 3) b)) (fma.f64 -1/2 (/.f64 c b) (fma.f64 -3/8 (*.f64 a (/.f64 c (/.f64 (pow.f64 b 3) c))) (*.f64 (/.f64 -9/16 (pow.f64 b 5)) (*.f64 (pow.f64 c 3) (*.f64 a a)))))): 0 points increase in error, 0 points decrease in error
    (fma.f64 -1/6 (*.f64 (+.f64 (*.f64 81/16 (/.f64 (pow.f64 c 4) (pow.f64 b 6))) (*.f64 (*.f64 -9/8 -9/8) (Rewrite=> times-frac_binary64 (*.f64 (/.f64 (pow.f64 c 2) (pow.f64 b 3)) (/.f64 (pow.f64 c 2) (pow.f64 b 3)))))) (/.f64 (pow.f64 a 3) b)) (fma.f64 -1/2 (/.f64 c b) (fma.f64 -3/8 (*.f64 a (/.f64 c (/.f64 (pow.f64 b 3) c))) (*.f64 (/.f64 -9/16 (pow.f64 b 5)) (*.f64 (pow.f64 c 3) (*.f64 a a)))))): 0 points increase in error, 0 points decrease in error
    (fma.f64 -1/6 (*.f64 (+.f64 (*.f64 81/16 (/.f64 (pow.f64 c 4) (pow.f64 b 6))) (Rewrite<= swap-sqr_binary64 (*.f64 (*.f64 -9/8 (/.f64 (pow.f64 c 2) (pow.f64 b 3))) (*.f64 -9/8 (/.f64 (pow.f64 c 2) (pow.f64 b 3)))))) (/.f64 (pow.f64 a 3) b)) (fma.f64 -1/2 (/.f64 c b) (fma.f64 -3/8 (*.f64 a (/.f64 c (/.f64 (pow.f64 b 3) c))) (*.f64 (/.f64 -9/16 (pow.f64 b 5)) (*.f64 (pow.f64 c 3) (*.f64 a a)))))): 0 points increase in error, 0 points decrease in error
    (fma.f64 -1/6 (*.f64 (+.f64 (*.f64 81/16 (/.f64 (pow.f64 c 4) (pow.f64 b 6))) (Rewrite<= unpow2_binary64 (pow.f64 (*.f64 -9/8 (/.f64 (pow.f64 c 2) (pow.f64 b 3))) 2))) (/.f64 (pow.f64 a 3) b)) (fma.f64 -1/2 (/.f64 c b) (fma.f64 -3/8 (*.f64 a (/.f64 c (/.f64 (pow.f64 b 3) c))) (*.f64 (/.f64 -9/16 (pow.f64 b 5)) (*.f64 (pow.f64 c 3) (*.f64 a a)))))): 0 points increase in error, 0 points decrease in error
    (fma.f64 -1/6 (Rewrite<= *-commutative_binary64 (*.f64 (/.f64 (pow.f64 a 3) b) (+.f64 (*.f64 81/16 (/.f64 (pow.f64 c 4) (pow.f64 b 6))) (pow.f64 (*.f64 -9/8 (/.f64 (pow.f64 c 2) (pow.f64 b 3))) 2)))) (fma.f64 -1/2 (/.f64 c b) (fma.f64 -3/8 (*.f64 a (/.f64 c (/.f64 (pow.f64 b 3) c))) (*.f64 (/.f64 -9/16 (pow.f64 b 5)) (*.f64 (pow.f64 c 3) (*.f64 a a)))))): 0 points increase in error, 0 points decrease in error
    (fma.f64 -1/6 (Rewrite=> associate-*l/_binary64 (/.f64 (*.f64 (pow.f64 a 3) (+.f64 (*.f64 81/16 (/.f64 (pow.f64 c 4) (pow.f64 b 6))) (pow.f64 (*.f64 -9/8 (/.f64 (pow.f64 c 2) (pow.f64 b 3))) 2))) b)) (fma.f64 -1/2 (/.f64 c b) (fma.f64 -3/8 (*.f64 a (/.f64 c (/.f64 (pow.f64 b 3) c))) (*.f64 (/.f64 -9/16 (pow.f64 b 5)) (*.f64 (pow.f64 c 3) (*.f64 a a)))))): 0 points increase in error, 0 points decrease in error
    (fma.f64 -1/6 (/.f64 (*.f64 (pow.f64 a 3) (+.f64 (*.f64 81/16 (/.f64 (pow.f64 c 4) (pow.f64 b 6))) (pow.f64 (*.f64 -9/8 (/.f64 (pow.f64 c 2) (pow.f64 b 3))) 2))) b) (fma.f64 -1/2 (/.f64 c b) (fma.f64 -3/8 (*.f64 a (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 c c) (pow.f64 b 3)))) (*.f64 (/.f64 -9/16 (pow.f64 b 5)) (*.f64 (pow.f64 c 3) (*.f64 a a)))))): 0 points increase in error, 0 points decrease in error
    (fma.f64 -1/6 (/.f64 (*.f64 (pow.f64 a 3) (+.f64 (*.f64 81/16 (/.f64 (pow.f64 c 4) (pow.f64 b 6))) (pow.f64 (*.f64 -9/8 (/.f64 (pow.f64 c 2) (pow.f64 b 3))) 2))) b) (fma.f64 -1/2 (/.f64 c b) (fma.f64 -3/8 (*.f64 a (/.f64 (Rewrite<= unpow2_binary64 (pow.f64 c 2)) (pow.f64 b 3))) (*.f64 (/.f64 -9/16 (pow.f64 b 5)) (*.f64 (pow.f64 c 3) (*.f64 a a)))))): 0 points increase in error, 0 points decrease in error
    (fma.f64 -1/6 (/.f64 (*.f64 (pow.f64 a 3) (+.f64 (*.f64 81/16 (/.f64 (pow.f64 c 4) (pow.f64 b 6))) (pow.f64 (*.f64 -9/8 (/.f64 (pow.f64 c 2) (pow.f64 b 3))) 2))) b) (fma.f64 -1/2 (/.f64 c b) (fma.f64 -3/8 (Rewrite<= *-commutative_binary64 (*.f64 (/.f64 (pow.f64 c 2) (pow.f64 b 3)) a)) (*.f64 (/.f64 -9/16 (pow.f64 b 5)) (*.f64 (pow.f64 c 3) (*.f64 a a)))))): 0 points increase in error, 0 points decrease in error
    (fma.f64 -1/6 (/.f64 (*.f64 (pow.f64 a 3) (+.f64 (*.f64 81/16 (/.f64 (pow.f64 c 4) (pow.f64 b 6))) (pow.f64 (*.f64 -9/8 (/.f64 (pow.f64 c 2) (pow.f64 b 3))) 2))) b) (fma.f64 -1/2 (/.f64 c b) (fma.f64 -3/8 (Rewrite=> associate-*l/_binary64 (/.f64 (*.f64 (pow.f64 c 2) a) (pow.f64 b 3))) (*.f64 (/.f64 -9/16 (pow.f64 b 5)) (*.f64 (pow.f64 c 3) (*.f64 a a)))))): 0 points increase in error, 0 points decrease in error
    (fma.f64 -1/6 (/.f64 (*.f64 (pow.f64 a 3) (+.f64 (*.f64 81/16 (/.f64 (pow.f64 c 4) (pow.f64 b 6))) (pow.f64 (*.f64 -9/8 (/.f64 (pow.f64 c 2) (pow.f64 b 3))) 2))) b) (fma.f64 -1/2 (/.f64 c b) (fma.f64 -3/8 (/.f64 (*.f64 (pow.f64 c 2) a) (pow.f64 b 3)) (*.f64 (/.f64 -9/16 (pow.f64 b 5)) (*.f64 (pow.f64 c 3) (Rewrite<= unpow2_binary64 (pow.f64 a 2))))))): 0 points increase in error, 0 points decrease in error
    (fma.f64 -1/6 (/.f64 (*.f64 (pow.f64 a 3) (+.f64 (*.f64 81/16 (/.f64 (pow.f64 c 4) (pow.f64 b 6))) (pow.f64 (*.f64 -9/8 (/.f64 (pow.f64 c 2) (pow.f64 b 3))) 2))) b) (fma.f64 -1/2 (/.f64 c b) (fma.f64 -3/8 (/.f64 (*.f64 (pow.f64 c 2) a) (pow.f64 b 3)) (Rewrite<= associate-/r/_binary64 (/.f64 -9/16 (/.f64 (pow.f64 b 5) (*.f64 (pow.f64 c 3) (pow.f64 a 2)))))))): 0 points increase in error, 0 points decrease in error
    (fma.f64 -1/6 (/.f64 (*.f64 (pow.f64 a 3) (+.f64 (*.f64 81/16 (/.f64 (pow.f64 c 4) (pow.f64 b 6))) (pow.f64 (*.f64 -9/8 (/.f64 (pow.f64 c 2) (pow.f64 b 3))) 2))) b) (fma.f64 -1/2 (/.f64 c b) (fma.f64 -3/8 (/.f64 (*.f64 (pow.f64 c 2) a) (pow.f64 b 3)) (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 -9/16 (*.f64 (pow.f64 c 3) (pow.f64 a 2))) (pow.f64 b 5)))))): 0 points increase in error, 0 points decrease in error
    (fma.f64 -1/6 (/.f64 (*.f64 (pow.f64 a 3) (+.f64 (*.f64 81/16 (/.f64 (pow.f64 c 4) (pow.f64 b 6))) (pow.f64 (*.f64 -9/8 (/.f64 (pow.f64 c 2) (pow.f64 b 3))) 2))) b) (fma.f64 -1/2 (/.f64 c b) (fma.f64 -3/8 (/.f64 (*.f64 (pow.f64 c 2) a) (pow.f64 b 3)) (Rewrite<= associate-*r/_binary64 (*.f64 -9/16 (/.f64 (*.f64 (pow.f64 c 3) (pow.f64 a 2)) (pow.f64 b 5))))))): 0 points increase in error, 0 points decrease in error
    (fma.f64 -1/6 (/.f64 (*.f64 (pow.f64 a 3) (+.f64 (*.f64 81/16 (/.f64 (pow.f64 c 4) (pow.f64 b 6))) (pow.f64 (*.f64 -9/8 (/.f64 (pow.f64 c 2) (pow.f64 b 3))) 2))) b) (fma.f64 -1/2 (/.f64 c b) (Rewrite<= fma-def_binary64 (+.f64 (*.f64 -3/8 (/.f64 (*.f64 (pow.f64 c 2) a) (pow.f64 b 3))) (*.f64 -9/16 (/.f64 (*.f64 (pow.f64 c 3) (pow.f64 a 2)) (pow.f64 b 5))))))): 0 points increase in error, 0 points decrease in error
    (fma.f64 -1/6 (/.f64 (*.f64 (pow.f64 a 3) (+.f64 (*.f64 81/16 (/.f64 (pow.f64 c 4) (pow.f64 b 6))) (pow.f64 (*.f64 -9/8 (/.f64 (pow.f64 c 2) (pow.f64 b 3))) 2))) b) (Rewrite<= fma-def_binary64 (+.f64 (*.f64 -1/2 (/.f64 c b)) (+.f64 (*.f64 -3/8 (/.f64 (*.f64 (pow.f64 c 2) a) (pow.f64 b 3))) (*.f64 -9/16 (/.f64 (*.f64 (pow.f64 c 3) (pow.f64 a 2)) (pow.f64 b 5))))))): 0 points increase in error, 0 points decrease in error
    (fma.f64 -1/6 (/.f64 (*.f64 (pow.f64 a 3) (+.f64 (*.f64 81/16 (/.f64 (pow.f64 c 4) (pow.f64 b 6))) (pow.f64 (*.f64 -9/8 (/.f64 (pow.f64 c 2) (pow.f64 b 3))) 2))) b) (Rewrite<= associate-+l+_binary64 (+.f64 (+.f64 (*.f64 -1/2 (/.f64 c b)) (*.f64 -3/8 (/.f64 (*.f64 (pow.f64 c 2) a) (pow.f64 b 3)))) (*.f64 -9/16 (/.f64 (*.f64 (pow.f64 c 3) (pow.f64 a 2)) (pow.f64 b 5)))))): 7 points increase in error, 4 points decrease in error
    (fma.f64 -1/6 (/.f64 (*.f64 (pow.f64 a 3) (+.f64 (*.f64 81/16 (/.f64 (pow.f64 c 4) (pow.f64 b 6))) (pow.f64 (*.f64 -9/8 (/.f64 (pow.f64 c 2) (pow.f64 b 3))) 2))) b) (Rewrite<= +-commutative_binary64 (+.f64 (*.f64 -9/16 (/.f64 (*.f64 (pow.f64 c 3) (pow.f64 a 2)) (pow.f64 b 5))) (+.f64 (*.f64 -1/2 (/.f64 c b)) (*.f64 -3/8 (/.f64 (*.f64 (pow.f64 c 2) a) (pow.f64 b 3))))))): 0 points increase in error, 0 points decrease in error
    (Rewrite<= fma-def_binary64 (+.f64 (*.f64 -1/6 (/.f64 (*.f64 (pow.f64 a 3) (+.f64 (*.f64 81/16 (/.f64 (pow.f64 c 4) (pow.f64 b 6))) (pow.f64 (*.f64 -9/8 (/.f64 (pow.f64 c 2) (pow.f64 b 3))) 2))) b)) (+.f64 (*.f64 -9/16 (/.f64 (*.f64 (pow.f64 c 3) (pow.f64 a 2)) (pow.f64 b 5))) (+.f64 (*.f64 -1/2 (/.f64 c b)) (*.f64 -3/8 (/.f64 (*.f64 (pow.f64 c 2) a) (pow.f64 b 3))))))): 0 points increase in error, 0 points decrease in error
  5. Applied egg-rr2.8

    \[\leadsto \mathsf{fma}\left(-0.16666666666666666, \left(\color{blue}{\left(\left(c \cdot c\right) \cdot \left(\left(c \cdot c\right) \cdot {b}^{-6}\right)\right)} \cdot 6.328125\right) \cdot \frac{{a}^{3}}{b}, \mathsf{fma}\left(-0.5, \frac{c}{b}, \mathsf{fma}\left(-0.375, a \cdot \frac{c}{\frac{{b}^{3}}{c}}, \frac{-0.5625}{{b}^{5}} \cdot \left({c}^{3} \cdot \left(a \cdot a\right)\right)\right)\right)\right) \]
  6. Taylor expanded in c around 0 2.8

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

    \[\leadsto \mathsf{fma}\left(-0.16666666666666666, \color{blue}{\left(c \cdot {\left(c \cdot a\right)}^{3}\right) \cdot \frac{6.328125}{{b}^{7}}}, \mathsf{fma}\left(-0.5, \frac{c}{b}, \mathsf{fma}\left(-0.375, a \cdot \frac{c}{\frac{{b}^{3}}{c}}, \frac{-0.5625}{{b}^{5}} \cdot \left({c}^{3} \cdot \left(a \cdot a\right)\right)\right)\right)\right) \]
    Proof
    (*.f64 (*.f64 c (pow.f64 (*.f64 c a) 3)) (/.f64 405/64 (pow.f64 b 7))): 0 points increase in error, 0 points decrease in error
    (*.f64 (*.f64 c (Rewrite=> cube-prod_binary64 (*.f64 (pow.f64 c 3) (pow.f64 a 3)))) (/.f64 405/64 (pow.f64 b 7))): 71 points increase in error, 82 points decrease in error
    (*.f64 (*.f64 c (*.f64 (Rewrite<= cube-unmult_binary64 (*.f64 c (*.f64 c c))) (pow.f64 a 3))) (/.f64 405/64 (pow.f64 b 7))): 17 points increase in error, 23 points decrease in error
    (*.f64 (*.f64 c (*.f64 (*.f64 c (Rewrite<= unpow2_binary64 (pow.f64 c 2))) (pow.f64 a 3))) (/.f64 405/64 (pow.f64 b 7))): 1 points increase in error, 0 points decrease in error
    (*.f64 (*.f64 c (Rewrite=> associate-*l*_binary64 (*.f64 c (*.f64 (pow.f64 c 2) (pow.f64 a 3))))) (/.f64 405/64 (pow.f64 b 7))): 37 points increase in error, 35 points decrease in error
    (*.f64 (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 c c) (*.f64 (pow.f64 c 2) (pow.f64 a 3)))) (/.f64 405/64 (pow.f64 b 7))): 52 points increase in error, 32 points decrease in error
    (*.f64 (*.f64 (Rewrite<= unpow2_binary64 (pow.f64 c 2)) (*.f64 (pow.f64 c 2) (pow.f64 a 3))) (/.f64 405/64 (pow.f64 b 7))): 0 points increase in error, 0 points decrease in error
    (*.f64 (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 (pow.f64 c 2) (pow.f64 c 2)) (pow.f64 a 3))) (/.f64 405/64 (pow.f64 b 7))): 35 points increase in error, 45 points decrease in error
    (*.f64 (*.f64 (Rewrite=> pow-sqr_binary64 (pow.f64 c (*.f64 2 2))) (pow.f64 a 3)) (/.f64 405/64 (pow.f64 b 7))): 44 points increase in error, 57 points decrease in error
    (*.f64 (*.f64 (pow.f64 c (Rewrite=> metadata-eval 4)) (pow.f64 a 3)) (/.f64 405/64 (pow.f64 b 7))): 0 points increase in error, 0 points decrease in error
    (Rewrite<= *-commutative_binary64 (*.f64 (/.f64 405/64 (pow.f64 b 7)) (*.f64 (pow.f64 c 4) (pow.f64 a 3)))): 0 points increase in error, 0 points decrease in error
    (Rewrite=> associate-*l/_binary64 (/.f64 (*.f64 405/64 (*.f64 (pow.f64 c 4) (pow.f64 a 3))) (pow.f64 b 7))): 44 points increase in error, 38 points decrease in error
    (Rewrite<= associate-*r/_binary64 (*.f64 405/64 (/.f64 (*.f64 (pow.f64 c 4) (pow.f64 a 3)) (pow.f64 b 7)))): 36 points increase in error, 38 points decrease in error
  8. Final simplification2.8

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

Alternatives

Alternative 1
Error3.8
Cost20672
\[\mathsf{fma}\left(-0.5, \frac{c}{b}, \left(a \cdot \left(c \cdot c\right)\right) \cdot \left(\frac{-0.375}{{b}^{3}} + \frac{c \cdot -0.5625}{\frac{{b}^{5}}{a}}\right)\right) \]
Alternative 2
Error5.8
Cost13696
\[\mathsf{fma}\left(-0.5, \frac{c}{b}, \frac{a \cdot \left(-0.375 \cdot \left(c \cdot c\right)\right)}{{b}^{3}}\right) \]
Alternative 3
Error5.8
Cost7232
\[\frac{c}{b} \cdot \mathsf{fma}\left(\frac{-0.375}{b}, \frac{c \cdot a}{b}, -0.5\right) \]
Alternative 4
Error12.1
Cost320
\[\frac{-0.5}{\frac{b}{c}} \]
Alternative 5
Error11.9
Cost320
\[-0.5 \cdot \frac{c}{b} \]

Error

Reproduce

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