Average Error: 52.3 → 1.5
Time: 16.5s
Precision: binary64
Cost: 34368
\[\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(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
\[\left(\mathsf{fma}\left(-2, \frac{{c}^{3}}{{b}^{5}} \cdot \left(a \cdot a\right), -5 \cdot \frac{c \cdot {\left(c \cdot a\right)}^{3}}{{b}^{7}}\right) - \frac{c}{b}\right) - \frac{a}{b} \cdot \frac{c \cdot c}{b \cdot b} \]
(FPCore (a b c)
 :precision binary64
 (/ (+ (- b) (sqrt (- (* b b) (* (* 4.0 a) c)))) (* 2.0 a)))
(FPCore (a b c)
 :precision binary64
 (-
  (-
   (fma
    -2.0
    (* (/ (pow c 3.0) (pow b 5.0)) (* a a))
    (* -5.0 (/ (* c (pow (* c a) 3.0)) (pow b 7.0))))
   (/ c b))
  (* (/ a b) (/ (* c c) (* b b)))))
double code(double a, double b, double c) {
	return (-b + sqrt(((b * b) - ((4.0 * a) * c)))) / (2.0 * a);
}
double code(double a, double b, double c) {
	return (fma(-2.0, ((pow(c, 3.0) / pow(b, 5.0)) * (a * a)), (-5.0 * ((c * pow((c * a), 3.0)) / pow(b, 7.0)))) - (c / b)) - ((a / b) * ((c * c) / (b * b)));
}
function code(a, b, c)
	return Float64(Float64(Float64(-b) + sqrt(Float64(Float64(b * b) - Float64(Float64(4.0 * a) * c)))) / Float64(2.0 * a))
end
function code(a, b, c)
	return Float64(Float64(fma(-2.0, Float64(Float64((c ^ 3.0) / (b ^ 5.0)) * Float64(a * a)), Float64(-5.0 * Float64(Float64(c * (Float64(c * a) ^ 3.0)) / (b ^ 7.0)))) - Float64(c / b)) - Float64(Float64(a / b) * Float64(Float64(c * c) / Float64(b * b))))
end
code[a_, b_, c_] := N[(N[((-b) + N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(N[(4.0 * a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(2.0 * a), $MachinePrecision]), $MachinePrecision]
code[a_, b_, c_] := N[(N[(N[(-2.0 * N[(N[(N[Power[c, 3.0], $MachinePrecision] / N[Power[b, 5.0], $MachinePrecision]), $MachinePrecision] * N[(a * a), $MachinePrecision]), $MachinePrecision] + N[(-5.0 * N[(N[(c * N[Power[N[(c * a), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision] / N[Power[b, 7.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(c / b), $MachinePrecision]), $MachinePrecision] - N[(N[(a / b), $MachinePrecision] * N[(N[(c * c), $MachinePrecision] / N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}
\left(\mathsf{fma}\left(-2, \frac{{c}^{3}}{{b}^{5}} \cdot \left(a \cdot a\right), -5 \cdot \frac{c \cdot {\left(c \cdot a\right)}^{3}}{{b}^{7}}\right) - \frac{c}{b}\right) - \frac{a}{b} \cdot \frac{c \cdot c}{b \cdot b}

Error

Derivation

  1. Initial program 52.3

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

    \[\leadsto \color{blue}{\left(\sqrt{\mathsf{fma}\left(a, c \cdot -4, b \cdot b\right)} - b\right) \cdot \frac{0.5}{a}} \]
    Proof
    (*.f64 (-.f64 (sqrt.f64 (fma.f64 a (*.f64 c -4) (*.f64 b b))) b) (/.f64 1/2 a)): 0 points increase in error, 0 points decrease in error
    (*.f64 (-.f64 (sqrt.f64 (fma.f64 a (*.f64 c (Rewrite<= metadata-eval (neg.f64 4))) (*.f64 b b))) b) (/.f64 1/2 a)): 0 points increase in error, 0 points decrease in error
    (*.f64 (-.f64 (sqrt.f64 (fma.f64 a (Rewrite<= distribute-rgt-neg-in_binary64 (neg.f64 (*.f64 c 4))) (*.f64 b b))) b) (/.f64 1/2 a)): 0 points increase in error, 0 points decrease in error
    (*.f64 (-.f64 (sqrt.f64 (fma.f64 a (neg.f64 (Rewrite=> *-commutative_binary64 (*.f64 4 c))) (*.f64 b b))) b) (/.f64 1/2 a)): 0 points increase in error, 0 points decrease in error
    (*.f64 (-.f64 (sqrt.f64 (fma.f64 a (Rewrite=> distribute-lft-neg-in_binary64 (*.f64 (neg.f64 4) c)) (*.f64 b b))) b) (/.f64 1/2 a)): 0 points increase in error, 0 points decrease in error
    (*.f64 (-.f64 (sqrt.f64 (Rewrite<= fma-def_binary64 (+.f64 (*.f64 a (*.f64 (neg.f64 4) c)) (*.f64 b b)))) b) (/.f64 1/2 a)): 0 points increase in error, 0 points decrease in error
    (*.f64 (-.f64 (sqrt.f64 (+.f64 (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 a (neg.f64 4)) c)) (*.f64 b b))) b) (/.f64 1/2 a)): 0 points increase in error, 0 points decrease in error
    (*.f64 (-.f64 (sqrt.f64 (+.f64 (*.f64 (Rewrite<= distribute-rgt-neg-in_binary64 (neg.f64 (*.f64 a 4))) c) (*.f64 b b))) b) (/.f64 1/2 a)): 0 points increase in error, 0 points decrease in error
    (*.f64 (-.f64 (sqrt.f64 (+.f64 (*.f64 (neg.f64 (Rewrite<= *-commutative_binary64 (*.f64 4 a))) c) (*.f64 b b))) b) (/.f64 1/2 a)): 0 points increase in error, 0 points decrease in error
    (*.f64 (-.f64 (sqrt.f64 (Rewrite<= +-commutative_binary64 (+.f64 (*.f64 b b) (*.f64 (neg.f64 (*.f64 4 a)) c)))) b) (/.f64 1/2 a)): 0 points increase in error, 0 points decrease in error
    (*.f64 (-.f64 (sqrt.f64 (Rewrite<= cancel-sign-sub-inv_binary64 (-.f64 (*.f64 b b) (*.f64 (*.f64 4 a) c)))) b) (/.f64 1/2 a)): 0 points increase in error, 0 points decrease in error
    (*.f64 (Rewrite<= unsub-neg_binary64 (+.f64 (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 4 a) c))) (neg.f64 b))) (/.f64 1/2 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 4 a) c))))) (/.f64 1/2 a)): 0 points increase in error, 0 points decrease in error
    (*.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 4 a) c)))) (/.f64 (Rewrite<= metadata-eval (/.f64 1 2)) a)): 0 points increase in error, 0 points decrease in error
    (*.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 4 a) c)))) (/.f64 (/.f64 (Rewrite<= metadata-eval (neg.f64 -1)) 2) a)): 0 points increase in error, 0 points decrease in error
    (*.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 4 a) c)))) (Rewrite<= associate-/r*_binary64 (/.f64 (neg.f64 -1) (*.f64 2 a)))): 0 points increase in error, 0 points decrease in error
    (Rewrite=> associate-*r/_binary64 (/.f64 (*.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 4 a) c)))) (neg.f64 -1)) (*.f64 2 a))): 5 points increase in error, 10 points decrease in error
    (Rewrite=> associate-/l*_binary64 (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 4 a) c)))) (/.f64 (*.f64 2 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 4 a) c)))) (/.f64 (*.f64 2 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 4 a) c)))) (Rewrite=> /-rgt-identity_binary64 (*.f64 2 a))): 0 points increase in error, 0 points decrease in error
  3. Taylor expanded in a around 0 1.5

    \[\leadsto \color{blue}{-1 \cdot \frac{{c}^{2} \cdot a}{{b}^{3}} + \left(-1 \cdot \frac{c}{b} + \left(-0.25 \cdot \frac{{a}^{3} \cdot \left(16 \cdot \frac{{c}^{4}}{{b}^{6}} + {\left(-2 \cdot \frac{{c}^{2}}{{b}^{3}}\right)}^{2}\right)}{b} + -2 \cdot \frac{{c}^{3} \cdot {a}^{2}}{{b}^{5}}\right)\right)} \]
  4. Simplified1.5

    \[\leadsto \color{blue}{\left(\mathsf{fma}\left(-2, \frac{{c}^{3}}{{b}^{5}} \cdot \left(a \cdot a\right), \frac{{a}^{3} \cdot -0.25}{\frac{b}{\mathsf{fma}\left(16, \frac{{c}^{4}}{{b}^{6}}, 4 \cdot \frac{{c}^{4}}{{b}^{6}}\right)}}\right) - \frac{c}{b}\right) - \frac{a \cdot \left(c \cdot c\right)}{{b}^{3}}} \]
    Proof
    (-.f64 (-.f64 (fma.f64 -2 (*.f64 (/.f64 (pow.f64 c 3) (pow.f64 b 5)) (*.f64 a a)) (/.f64 (*.f64 (pow.f64 a 3) -1/4) (/.f64 b (fma.f64 16 (/.f64 (pow.f64 c 4) (pow.f64 b 6)) (*.f64 4 (/.f64 (pow.f64 c 4) (pow.f64 b 6))))))) (/.f64 c b)) (/.f64 (*.f64 a (*.f64 c c)) (pow.f64 b 3))): 0 points increase in error, 0 points decrease in error
    (-.f64 (-.f64 (fma.f64 -2 (*.f64 (/.f64 (pow.f64 c 3) (pow.f64 b 5)) (Rewrite<= unpow2_binary64 (pow.f64 a 2))) (/.f64 (*.f64 (pow.f64 a 3) -1/4) (/.f64 b (fma.f64 16 (/.f64 (pow.f64 c 4) (pow.f64 b 6)) (*.f64 4 (/.f64 (pow.f64 c 4) (pow.f64 b 6))))))) (/.f64 c b)) (/.f64 (*.f64 a (*.f64 c c)) (pow.f64 b 3))): 0 points increase in error, 0 points decrease in error
    (-.f64 (-.f64 (fma.f64 -2 (Rewrite<= associate-/r/_binary64 (/.f64 (pow.f64 c 3) (/.f64 (pow.f64 b 5) (pow.f64 a 2)))) (/.f64 (*.f64 (pow.f64 a 3) -1/4) (/.f64 b (fma.f64 16 (/.f64 (pow.f64 c 4) (pow.f64 b 6)) (*.f64 4 (/.f64 (pow.f64 c 4) (pow.f64 b 6))))))) (/.f64 c b)) (/.f64 (*.f64 a (*.f64 c c)) (pow.f64 b 3))): 0 points increase in error, 0 points decrease in error
    (-.f64 (-.f64 (fma.f64 -2 (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 (pow.f64 c 3) (pow.f64 a 2)) (pow.f64 b 5))) (/.f64 (*.f64 (pow.f64 a 3) -1/4) (/.f64 b (fma.f64 16 (/.f64 (pow.f64 c 4) (pow.f64 b 6)) (*.f64 4 (/.f64 (pow.f64 c 4) (pow.f64 b 6))))))) (/.f64 c b)) (/.f64 (*.f64 a (*.f64 c c)) (pow.f64 b 3))): 0 points increase in error, 0 points decrease in error
    (-.f64 (-.f64 (fma.f64 -2 (/.f64 (*.f64 (pow.f64 c 3) (pow.f64 a 2)) (pow.f64 b 5)) (/.f64 (*.f64 (pow.f64 a 3) -1/4) (/.f64 b (fma.f64 16 (/.f64 (pow.f64 c 4) (pow.f64 b 6)) (*.f64 (Rewrite<= metadata-eval (*.f64 -2 -2)) (/.f64 (pow.f64 c 4) (pow.f64 b 6))))))) (/.f64 c b)) (/.f64 (*.f64 a (*.f64 c c)) (pow.f64 b 3))): 0 points increase in error, 0 points decrease in error
    (-.f64 (-.f64 (fma.f64 -2 (/.f64 (*.f64 (pow.f64 c 3) (pow.f64 a 2)) (pow.f64 b 5)) (/.f64 (*.f64 (pow.f64 a 3) -1/4) (/.f64 b (fma.f64 16 (/.f64 (pow.f64 c 4) (pow.f64 b 6)) (*.f64 (*.f64 -2 -2) (/.f64 (pow.f64 c (Rewrite<= metadata-eval (*.f64 2 2))) (pow.f64 b 6))))))) (/.f64 c b)) (/.f64 (*.f64 a (*.f64 c c)) (pow.f64 b 3))): 0 points increase in error, 0 points decrease in error
    (-.f64 (-.f64 (fma.f64 -2 (/.f64 (*.f64 (pow.f64 c 3) (pow.f64 a 2)) (pow.f64 b 5)) (/.f64 (*.f64 (pow.f64 a 3) -1/4) (/.f64 b (fma.f64 16 (/.f64 (pow.f64 c 4) (pow.f64 b 6)) (*.f64 (*.f64 -2 -2) (/.f64 (Rewrite<= pow-sqr_binary64 (*.f64 (pow.f64 c 2) (pow.f64 c 2))) (pow.f64 b 6))))))) (/.f64 c b)) (/.f64 (*.f64 a (*.f64 c c)) (pow.f64 b 3))): 0 points increase in error, 0 points decrease in error
    (-.f64 (-.f64 (fma.f64 -2 (/.f64 (*.f64 (pow.f64 c 3) (pow.f64 a 2)) (pow.f64 b 5)) (/.f64 (*.f64 (pow.f64 a 3) -1/4) (/.f64 b (fma.f64 16 (/.f64 (pow.f64 c 4) (pow.f64 b 6)) (*.f64 (*.f64 -2 -2) (/.f64 (*.f64 (pow.f64 c 2) (pow.f64 c 2)) (pow.f64 b (Rewrite<= metadata-eval (*.f64 2 3))))))))) (/.f64 c b)) (/.f64 (*.f64 a (*.f64 c c)) (pow.f64 b 3))): 0 points increase in error, 0 points decrease in error
    (-.f64 (-.f64 (fma.f64 -2 (/.f64 (*.f64 (pow.f64 c 3) (pow.f64 a 2)) (pow.f64 b 5)) (/.f64 (*.f64 (pow.f64 a 3) -1/4) (/.f64 b (fma.f64 16 (/.f64 (pow.f64 c 4) (pow.f64 b 6)) (*.f64 (*.f64 -2 -2) (/.f64 (*.f64 (pow.f64 c 2) (pow.f64 c 2)) (Rewrite<= pow-sqr_binary64 (*.f64 (pow.f64 b 3) (pow.f64 b 3))))))))) (/.f64 c b)) (/.f64 (*.f64 a (*.f64 c c)) (pow.f64 b 3))): 0 points increase in error, 0 points decrease in error
    (-.f64 (-.f64 (fma.f64 -2 (/.f64 (*.f64 (pow.f64 c 3) (pow.f64 a 2)) (pow.f64 b 5)) (/.f64 (*.f64 (pow.f64 a 3) -1/4) (/.f64 b (fma.f64 16 (/.f64 (pow.f64 c 4) (pow.f64 b 6)) (*.f64 (*.f64 -2 -2) (Rewrite=> times-frac_binary64 (*.f64 (/.f64 (pow.f64 c 2) (pow.f64 b 3)) (/.f64 (pow.f64 c 2) (pow.f64 b 3))))))))) (/.f64 c b)) (/.f64 (*.f64 a (*.f64 c c)) (pow.f64 b 3))): 0 points increase in error, 0 points decrease in error
    (-.f64 (-.f64 (fma.f64 -2 (/.f64 (*.f64 (pow.f64 c 3) (pow.f64 a 2)) (pow.f64 b 5)) (/.f64 (*.f64 (pow.f64 a 3) -1/4) (/.f64 b (fma.f64 16 (/.f64 (pow.f64 c 4) (pow.f64 b 6)) (Rewrite<= swap-sqr_binary64 (*.f64 (*.f64 -2 (/.f64 (pow.f64 c 2) (pow.f64 b 3))) (*.f64 -2 (/.f64 (pow.f64 c 2) (pow.f64 b 3))))))))) (/.f64 c b)) (/.f64 (*.f64 a (*.f64 c c)) (pow.f64 b 3))): 0 points increase in error, 0 points decrease in error
    (-.f64 (-.f64 (fma.f64 -2 (/.f64 (*.f64 (pow.f64 c 3) (pow.f64 a 2)) (pow.f64 b 5)) (/.f64 (*.f64 (pow.f64 a 3) -1/4) (/.f64 b (fma.f64 16 (/.f64 (pow.f64 c 4) (pow.f64 b 6)) (Rewrite<= unpow2_binary64 (pow.f64 (*.f64 -2 (/.f64 (pow.f64 c 2) (pow.f64 b 3))) 2)))))) (/.f64 c b)) (/.f64 (*.f64 a (*.f64 c c)) (pow.f64 b 3))): 0 points increase in error, 0 points decrease in error
    (-.f64 (-.f64 (fma.f64 -2 (/.f64 (*.f64 (pow.f64 c 3) (pow.f64 a 2)) (pow.f64 b 5)) (/.f64 (*.f64 (pow.f64 a 3) -1/4) (/.f64 b (Rewrite<= fma-def_binary64 (+.f64 (*.f64 16 (/.f64 (pow.f64 c 4) (pow.f64 b 6))) (pow.f64 (*.f64 -2 (/.f64 (pow.f64 c 2) (pow.f64 b 3))) 2)))))) (/.f64 c b)) (/.f64 (*.f64 a (*.f64 c c)) (pow.f64 b 3))): 0 points increase in error, 0 points decrease in error
    (-.f64 (-.f64 (fma.f64 -2 (/.f64 (*.f64 (pow.f64 c 3) (pow.f64 a 2)) (pow.f64 b 5)) (Rewrite<= associate-*l/_binary64 (*.f64 (/.f64 (pow.f64 a 3) (/.f64 b (+.f64 (*.f64 16 (/.f64 (pow.f64 c 4) (pow.f64 b 6))) (pow.f64 (*.f64 -2 (/.f64 (pow.f64 c 2) (pow.f64 b 3))) 2)))) -1/4))) (/.f64 c b)) (/.f64 (*.f64 a (*.f64 c c)) (pow.f64 b 3))): 0 points increase in error, 0 points decrease in error
    (-.f64 (-.f64 (fma.f64 -2 (/.f64 (*.f64 (pow.f64 c 3) (pow.f64 a 2)) (pow.f64 b 5)) (*.f64 (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 (pow.f64 a 3) (+.f64 (*.f64 16 (/.f64 (pow.f64 c 4) (pow.f64 b 6))) (pow.f64 (*.f64 -2 (/.f64 (pow.f64 c 2) (pow.f64 b 3))) 2))) b)) -1/4)) (/.f64 c b)) (/.f64 (*.f64 a (*.f64 c c)) (pow.f64 b 3))): 0 points increase in error, 0 points decrease in error
    (-.f64 (-.f64 (fma.f64 -2 (/.f64 (*.f64 (pow.f64 c 3) (pow.f64 a 2)) (pow.f64 b 5)) (Rewrite<= *-commutative_binary64 (*.f64 -1/4 (/.f64 (*.f64 (pow.f64 a 3) (+.f64 (*.f64 16 (/.f64 (pow.f64 c 4) (pow.f64 b 6))) (pow.f64 (*.f64 -2 (/.f64 (pow.f64 c 2) (pow.f64 b 3))) 2))) b)))) (/.f64 c b)) (/.f64 (*.f64 a (*.f64 c c)) (pow.f64 b 3))): 0 points increase in error, 0 points decrease in error
    (-.f64 (-.f64 (Rewrite<= fma-def_binary64 (+.f64 (*.f64 -2 (/.f64 (*.f64 (pow.f64 c 3) (pow.f64 a 2)) (pow.f64 b 5))) (*.f64 -1/4 (/.f64 (*.f64 (pow.f64 a 3) (+.f64 (*.f64 16 (/.f64 (pow.f64 c 4) (pow.f64 b 6))) (pow.f64 (*.f64 -2 (/.f64 (pow.f64 c 2) (pow.f64 b 3))) 2))) b)))) (/.f64 c b)) (/.f64 (*.f64 a (*.f64 c c)) (pow.f64 b 3))): 0 points increase in error, 0 points decrease in error
    (-.f64 (-.f64 (Rewrite<= +-commutative_binary64 (+.f64 (*.f64 -1/4 (/.f64 (*.f64 (pow.f64 a 3) (+.f64 (*.f64 16 (/.f64 (pow.f64 c 4) (pow.f64 b 6))) (pow.f64 (*.f64 -2 (/.f64 (pow.f64 c 2) (pow.f64 b 3))) 2))) b)) (*.f64 -2 (/.f64 (*.f64 (pow.f64 c 3) (pow.f64 a 2)) (pow.f64 b 5))))) (/.f64 c b)) (/.f64 (*.f64 a (*.f64 c c)) (pow.f64 b 3))): 0 points increase in error, 0 points decrease in error
    (-.f64 (Rewrite<= unsub-neg_binary64 (+.f64 (+.f64 (*.f64 -1/4 (/.f64 (*.f64 (pow.f64 a 3) (+.f64 (*.f64 16 (/.f64 (pow.f64 c 4) (pow.f64 b 6))) (pow.f64 (*.f64 -2 (/.f64 (pow.f64 c 2) (pow.f64 b 3))) 2))) b)) (*.f64 -2 (/.f64 (*.f64 (pow.f64 c 3) (pow.f64 a 2)) (pow.f64 b 5)))) (neg.f64 (/.f64 c b)))) (/.f64 (*.f64 a (*.f64 c c)) (pow.f64 b 3))): 0 points increase in error, 0 points decrease in error
    (-.f64 (+.f64 (+.f64 (*.f64 -1/4 (/.f64 (*.f64 (pow.f64 a 3) (+.f64 (*.f64 16 (/.f64 (pow.f64 c 4) (pow.f64 b 6))) (pow.f64 (*.f64 -2 (/.f64 (pow.f64 c 2) (pow.f64 b 3))) 2))) b)) (*.f64 -2 (/.f64 (*.f64 (pow.f64 c 3) (pow.f64 a 2)) (pow.f64 b 5)))) (Rewrite<= mul-1-neg_binary64 (*.f64 -1 (/.f64 c b)))) (/.f64 (*.f64 a (*.f64 c c)) (pow.f64 b 3))): 0 points increase in error, 0 points decrease in error
    (-.f64 (Rewrite<= +-commutative_binary64 (+.f64 (*.f64 -1 (/.f64 c b)) (+.f64 (*.f64 -1/4 (/.f64 (*.f64 (pow.f64 a 3) (+.f64 (*.f64 16 (/.f64 (pow.f64 c 4) (pow.f64 b 6))) (pow.f64 (*.f64 -2 (/.f64 (pow.f64 c 2) (pow.f64 b 3))) 2))) b)) (*.f64 -2 (/.f64 (*.f64 (pow.f64 c 3) (pow.f64 a 2)) (pow.f64 b 5)))))) (/.f64 (*.f64 a (*.f64 c c)) (pow.f64 b 3))): 0 points increase in error, 0 points decrease in error
    (-.f64 (+.f64 (*.f64 -1 (/.f64 c b)) (+.f64 (*.f64 -1/4 (/.f64 (*.f64 (pow.f64 a 3) (+.f64 (*.f64 16 (/.f64 (pow.f64 c 4) (pow.f64 b 6))) (pow.f64 (*.f64 -2 (/.f64 (pow.f64 c 2) (pow.f64 b 3))) 2))) b)) (*.f64 -2 (/.f64 (*.f64 (pow.f64 c 3) (pow.f64 a 2)) (pow.f64 b 5))))) (/.f64 (*.f64 a (Rewrite<= unpow2_binary64 (pow.f64 c 2))) (pow.f64 b 3))): 0 points increase in error, 0 points decrease in error
    (-.f64 (+.f64 (*.f64 -1 (/.f64 c b)) (+.f64 (*.f64 -1/4 (/.f64 (*.f64 (pow.f64 a 3) (+.f64 (*.f64 16 (/.f64 (pow.f64 c 4) (pow.f64 b 6))) (pow.f64 (*.f64 -2 (/.f64 (pow.f64 c 2) (pow.f64 b 3))) 2))) b)) (*.f64 -2 (/.f64 (*.f64 (pow.f64 c 3) (pow.f64 a 2)) (pow.f64 b 5))))) (/.f64 (Rewrite<= *-commutative_binary64 (*.f64 (pow.f64 c 2) a)) (pow.f64 b 3))): 0 points increase in error, 0 points decrease in error
    (Rewrite<= unsub-neg_binary64 (+.f64 (+.f64 (*.f64 -1 (/.f64 c b)) (+.f64 (*.f64 -1/4 (/.f64 (*.f64 (pow.f64 a 3) (+.f64 (*.f64 16 (/.f64 (pow.f64 c 4) (pow.f64 b 6))) (pow.f64 (*.f64 -2 (/.f64 (pow.f64 c 2) (pow.f64 b 3))) 2))) b)) (*.f64 -2 (/.f64 (*.f64 (pow.f64 c 3) (pow.f64 a 2)) (pow.f64 b 5))))) (neg.f64 (/.f64 (*.f64 (pow.f64 c 2) a) (pow.f64 b 3))))): 0 points increase in error, 0 points decrease in error
    (+.f64 (+.f64 (*.f64 -1 (/.f64 c b)) (+.f64 (*.f64 -1/4 (/.f64 (*.f64 (pow.f64 a 3) (+.f64 (*.f64 16 (/.f64 (pow.f64 c 4) (pow.f64 b 6))) (pow.f64 (*.f64 -2 (/.f64 (pow.f64 c 2) (pow.f64 b 3))) 2))) b)) (*.f64 -2 (/.f64 (*.f64 (pow.f64 c 3) (pow.f64 a 2)) (pow.f64 b 5))))) (Rewrite<= mul-1-neg_binary64 (*.f64 -1 (/.f64 (*.f64 (pow.f64 c 2) a) (pow.f64 b 3))))): 0 points increase in error, 0 points decrease in error
    (Rewrite<= +-commutative_binary64 (+.f64 (*.f64 -1 (/.f64 (*.f64 (pow.f64 c 2) a) (pow.f64 b 3))) (+.f64 (*.f64 -1 (/.f64 c b)) (+.f64 (*.f64 -1/4 (/.f64 (*.f64 (pow.f64 a 3) (+.f64 (*.f64 16 (/.f64 (pow.f64 c 4) (pow.f64 b 6))) (pow.f64 (*.f64 -2 (/.f64 (pow.f64 c 2) (pow.f64 b 3))) 2))) b)) (*.f64 -2 (/.f64 (*.f64 (pow.f64 c 3) (pow.f64 a 2)) (pow.f64 b 5))))))): 0 points increase in error, 0 points decrease in error
  5. Taylor expanded in c around 0 1.5

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

    \[\leadsto \left(\mathsf{fma}\left(-2, \frac{{c}^{3}}{{b}^{5}} \cdot \left(a \cdot a\right), -5 \cdot \frac{\color{blue}{0 + {c}^{4} \cdot {a}^{3}}}{{b}^{7}}\right) - \frac{c}{b}\right) - \frac{a \cdot \left(c \cdot c\right)}{{b}^{3}} \]
  7. Simplified1.5

    \[\leadsto \left(\mathsf{fma}\left(-2, \frac{{c}^{3}}{{b}^{5}} \cdot \left(a \cdot a\right), -5 \cdot \frac{\color{blue}{c \cdot {\left(c \cdot a\right)}^{3}}}{{b}^{7}}\right) - \frac{c}{b}\right) - \frac{a \cdot \left(c \cdot c\right)}{{b}^{3}} \]
    Proof
    (*.f64 c (pow.f64 (*.f64 c a) 3)): 0 points increase in error, 0 points decrease in error
    (*.f64 (Rewrite<= rem-cube-cbrt_binary64 (pow.f64 (cbrt.f64 c) 3)) (pow.f64 (*.f64 c a) 3)): 85 points increase in error, 123 points decrease in error
    (Rewrite<= cube-prod_binary64 (pow.f64 (*.f64 (cbrt.f64 c) (*.f64 c a)) 3)): 80 points increase in error, 95 points decrease in error
    (pow.f64 (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 (cbrt.f64 c) c) a)) 3): 49 points increase in error, 34 points decrease in error
    (Rewrite=> cube-prod_binary64 (*.f64 (pow.f64 (*.f64 (cbrt.f64 c) c) 3) (pow.f64 a 3))): 81 points increase in error, 76 points decrease in error
    (*.f64 (Rewrite=> cube-prod_binary64 (*.f64 (pow.f64 (cbrt.f64 c) 3) (pow.f64 c 3))) (pow.f64 a 3)): 73 points increase in error, 79 points decrease in error
    (*.f64 (*.f64 (Rewrite=> rem-cube-cbrt_binary64 c) (pow.f64 c 3)) (pow.f64 a 3)): 120 points increase in error, 80 points decrease in error
    (*.f64 (*.f64 c (Rewrite<= cube-unmult_binary64 (*.f64 c (*.f64 c c)))) (pow.f64 a 3)): 23 points increase in error, 37 points decrease in error
    (*.f64 (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 c c) (*.f64 c c))) (pow.f64 a 3)): 37 points increase in error, 45 points decrease in error
    (*.f64 (Rewrite=> associate-*r*_binary64 (*.f64 (*.f64 (*.f64 c c) c) c)) (pow.f64 a 3)): 45 points increase in error, 37 points decrease in error
    (*.f64 (*.f64 (Rewrite<= unpow3_binary64 (pow.f64 c 3)) c) (pow.f64 a 3)): 37 points increase in error, 23 points decrease in error
    (*.f64 (Rewrite=> pow-plus_binary64 (pow.f64 c (+.f64 3 1))) (pow.f64 a 3)): 23 points increase in error, 38 points decrease in error
    (*.f64 (pow.f64 c (Rewrite=> metadata-eval 4)) (pow.f64 a 3)): 0 points increase in error, 0 points decrease in error
    (Rewrite<= +-lft-identity_binary64 (+.f64 0 (*.f64 (pow.f64 c 4) (pow.f64 a 3)))): 0 points increase in error, 0 points decrease in error
  8. Applied egg-rr1.5

    \[\leadsto \left(\mathsf{fma}\left(-2, \frac{{c}^{3}}{{b}^{5}} \cdot \left(a \cdot a\right), -5 \cdot \frac{c \cdot {\left(c \cdot a\right)}^{3}}{{b}^{7}}\right) - \frac{c}{b}\right) - \color{blue}{\frac{a}{b} \cdot \frac{c \cdot c}{b \cdot b}} \]
  9. Final simplification1.5

    \[\leadsto \left(\mathsf{fma}\left(-2, \frac{{c}^{3}}{{b}^{5}} \cdot \left(a \cdot a\right), -5 \cdot \frac{c \cdot {\left(c \cdot a\right)}^{3}}{{b}^{7}}\right) - \frac{c}{b}\right) - \frac{a}{b} \cdot \frac{c \cdot c}{b \cdot b} \]

Alternatives

Alternative 1
Error2.0
Cost20736
\[\left(\frac{-2}{\frac{{b}^{5}}{{c}^{3} \cdot \left(a \cdot a\right)}} - \frac{c}{b}\right) - a \cdot \frac{c}{\frac{{b}^{3}}{c}} \]
Alternative 2
Error3.1
Cost1024
\[\frac{-c}{b} - a \cdot \frac{c \cdot c}{b \cdot \left(b \cdot b\right)} \]
Alternative 3
Error6.4
Cost256
\[\frac{-c}{b} \]
Alternative 4
Error63.0
Cost192
\[\frac{b}{a} \]

Error

Reproduce

herbie shell --seed 2022296 
(FPCore (a b c)
  :name "Quadratic roots, 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) (* (* 4.0 a) c)))) (* 2.0 a)))