Average Error: 52.5 → 1.5
Time: 11.4s
Precision: binary64
Cost: 41088
\[\left(\left(4.930380657631324 \cdot 10^{-32} < a \land a < 2.028240960365167 \cdot 10^{+31}\right) \land \left(4.930380657631324 \cdot 10^{-32} < b \land b < 2.028240960365167 \cdot 10^{+31}\right)\right) \land \left(4.930380657631324 \cdot 10^{-32} < c \land c < 2.028240960365167 \cdot 10^{+31}\right)\]
\[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
\[\mathsf{fma}\left(-0.5625, \left(a \cdot a\right) \cdot \left(\left(c \cdot c\right) \cdot \left(c \cdot {b}^{-5}\right)\right), \mathsf{fma}\left(-0.5, \frac{c}{b}, \mathsf{fma}\left(-0.16666666666666666, \frac{{\left(a \cdot c\right)}^{4} \cdot 6.328125}{a \cdot {b}^{7}}, \frac{\frac{-0.375 \cdot \left(c \cdot \left(a \cdot c\right)\right)}{b \cdot b}}{b}\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.5625
  (* (* a a) (* (* c c) (* c (pow b -5.0))))
  (fma
   -0.5
   (/ c b)
   (fma
    -0.16666666666666666
    (/ (* (pow (* a c) 4.0) 6.328125) (* a (pow b 7.0)))
    (/ (/ (* -0.375 (* c (* a c))) (* b b)) b)))))
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.5625, ((a * a) * ((c * c) * (c * pow(b, -5.0)))), fma(-0.5, (c / b), fma(-0.16666666666666666, ((pow((a * c), 4.0) * 6.328125) / (a * pow(b, 7.0))), (((-0.375 * (c * (a * c))) / (b * b)) / b))));
}
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.5625, Float64(Float64(a * a) * Float64(Float64(c * c) * Float64(c * (b ^ -5.0)))), fma(-0.5, Float64(c / b), fma(-0.16666666666666666, Float64(Float64((Float64(a * c) ^ 4.0) * 6.328125) / Float64(a * (b ^ 7.0))), Float64(Float64(Float64(-0.375 * Float64(c * Float64(a * c))) / Float64(b * b)) / b))))
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.5625 * N[(N[(a * a), $MachinePrecision] * N[(N[(c * c), $MachinePrecision] * N[(c * N[Power[b, -5.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-0.5 * N[(c / b), $MachinePrecision] + N[(-0.16666666666666666 * N[(N[(N[Power[N[(a * c), $MachinePrecision], 4.0], $MachinePrecision] * 6.328125), $MachinePrecision] / N[(a * N[Power[b, 7.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(-0.375 * N[(c * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(b * b), $MachinePrecision]), $MachinePrecision] / b), $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.5625, \left(a \cdot a\right) \cdot \left(\left(c \cdot c\right) \cdot \left(c \cdot {b}^{-5}\right)\right), \mathsf{fma}\left(-0.5, \frac{c}{b}, \mathsf{fma}\left(-0.16666666666666666, \frac{{\left(a \cdot c\right)}^{4} \cdot 6.328125}{a \cdot {b}^{7}}, \frac{\frac{-0.375 \cdot \left(c \cdot \left(a \cdot c\right)\right)}{b \cdot b}}{b}\right)\right)\right)

Error

Derivation

  1. Initial program 52.5

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

    \[\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)): 5 points increase in error, 2 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)))): 9 points increase in error, 12 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)))): 9 points increase in error, 8 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 b around inf 1.5

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

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

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

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

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

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

Alternatives

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

Error

Reproduce

herbie shell --seed 2022309 
(FPCore (a b c)
  :name "Cubic critical, wide range"
  :precision binary64
  :pre (and (and (and (< 4.930380657631324e-32 a) (< a 2.028240960365167e+31)) (and (< 4.930380657631324e-32 b) (< b 2.028240960365167e+31))) (and (< 4.930380657631324e-32 c) (< c 2.028240960365167e+31)))
  (/ (+ (- b) (sqrt (- (* b b) (* (* 3.0 a) c)))) (* 3.0 a)))