Average Error: 43.4 → 3.2
Time: 16.1s
Precision: binary64
Cost: 47040
\[\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(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
\[\left(\mathsf{fma}\left(-0.25, \frac{{a}^{3}}{\frac{{b}^{7}}{{c}^{4} \cdot 20}}, \frac{\left(a \cdot \left(a \cdot -2\right)\right) \cdot {c}^{3}}{{b}^{5}}\right) - \frac{c}{b}\right) - a \cdot \frac{c \cdot c}{{b}^{3}} \]
(FPCore (a b c)
 :precision binary64
 (/ (+ (- b) (sqrt (- (* b b) (* (* 4.0 a) c)))) (* 2.0 a)))
(FPCore (a b c)
 :precision binary64
 (-
  (-
   (fma
    -0.25
    (/ (pow a 3.0) (/ (pow b 7.0) (* (pow c 4.0) 20.0)))
    (/ (* (* a (* a -2.0)) (pow c 3.0)) (pow b 5.0)))
   (/ c b))
  (* a (/ (* c c) (pow b 3.0)))))
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(-0.25, (pow(a, 3.0) / (pow(b, 7.0) / (pow(c, 4.0) * 20.0))), (((a * (a * -2.0)) * pow(c, 3.0)) / pow(b, 5.0))) - (c / b)) - (a * ((c * c) / pow(b, 3.0)));
}
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(-0.25, Float64((a ^ 3.0) / Float64((b ^ 7.0) / Float64((c ^ 4.0) * 20.0))), Float64(Float64(Float64(a * Float64(a * -2.0)) * (c ^ 3.0)) / (b ^ 5.0))) - Float64(c / b)) - Float64(a * Float64(Float64(c * c) / (b ^ 3.0))))
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[(-0.25 * N[(N[Power[a, 3.0], $MachinePrecision] / N[(N[Power[b, 7.0], $MachinePrecision] / N[(N[Power[c, 4.0], $MachinePrecision] * 20.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(a * N[(a * -2.0), $MachinePrecision]), $MachinePrecision] * N[Power[c, 3.0], $MachinePrecision]), $MachinePrecision] / N[Power[b, 5.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(c / b), $MachinePrecision]), $MachinePrecision] - N[(a * N[(N[(c * c), $MachinePrecision] / N[Power[b, 3.0], $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(-0.25, \frac{{a}^{3}}{\frac{{b}^{7}}{{c}^{4} \cdot 20}}, \frac{\left(a \cdot \left(a \cdot -2\right)\right) \cdot {c}^{3}}{{b}^{5}}\right) - \frac{c}{b}\right) - a \cdot \frac{c \cdot c}{{b}^{3}}

Error

Derivation

  1. Initial program 43.4

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

    \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{a \cdot 2}} \]
    Proof
    (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 4 a) c)))) (*.f64 a 2)): 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<= *-commutative_binary64 (*.f64 2 a))): 0 points increase in error, 2 points decrease in error
  3. Taylor expanded in a around 0 3.2

    \[\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. Simplified3.2

    \[\leadsto \color{blue}{\left(\mathsf{fma}\left(-0.25, \frac{{a}^{3}}{b} \cdot \mathsf{fma}\left(16, \frac{{c}^{4}}{{b}^{6}}, 4 \cdot \frac{{c}^{4}}{{b}^{6}}\right), \frac{\left(\left(a \cdot -2\right) \cdot a\right) \cdot {c}^{3}}{{b}^{5}}\right) - \frac{c}{b}\right) - \frac{c \cdot c}{{b}^{3}} \cdot a} \]
    Proof
    (-.f64 (-.f64 (fma.f64 -1/4 (*.f64 (/.f64 (pow.f64 a 3) 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 (*.f64 (*.f64 (*.f64 a -2) a) (pow.f64 c 3)) (pow.f64 b 5))) (/.f64 c b)) (*.f64 (/.f64 (*.f64 c c) (pow.f64 b 3)) a)): 0 points increase in error, 0 points decrease in error
    (-.f64 (-.f64 (fma.f64 -1/4 (*.f64 (/.f64 (pow.f64 a 3) 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 (*.f64 (*.f64 (*.f64 a -2) a) (pow.f64 c 3)) (pow.f64 b 5))) (/.f64 c b)) (*.f64 (/.f64 (*.f64 c c) (pow.f64 b 3)) a)): 0 points increase in error, 0 points decrease in error
    (-.f64 (-.f64 (fma.f64 -1/4 (*.f64 (/.f64 (pow.f64 a 3) 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 (*.f64 (*.f64 (*.f64 a -2) a) (pow.f64 c 3)) (pow.f64 b 5))) (/.f64 c b)) (*.f64 (/.f64 (*.f64 c c) (pow.f64 b 3)) a)): 0 points increase in error, 0 points decrease in error
    (-.f64 (-.f64 (fma.f64 -1/4 (*.f64 (/.f64 (pow.f64 a 3) 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 (*.f64 (*.f64 (*.f64 a -2) a) (pow.f64 c 3)) (pow.f64 b 5))) (/.f64 c b)) (*.f64 (/.f64 (*.f64 c c) (pow.f64 b 3)) a)): 0 points increase in error, 0 points decrease in error
    (-.f64 (-.f64 (fma.f64 -1/4 (*.f64 (/.f64 (pow.f64 a 3) 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 (*.f64 (*.f64 (*.f64 a -2) a) (pow.f64 c 3)) (pow.f64 b 5))) (/.f64 c b)) (*.f64 (/.f64 (*.f64 c c) (pow.f64 b 3)) a)): 0 points increase in error, 0 points decrease in error
    (-.f64 (-.f64 (fma.f64 -1/4 (*.f64 (/.f64 (pow.f64 a 3) 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 (*.f64 (*.f64 (*.f64 a -2) a) (pow.f64 c 3)) (pow.f64 b 5))) (/.f64 c b)) (*.f64 (/.f64 (*.f64 c c) (pow.f64 b 3)) a)): 28 points increase in error, 0 points decrease in error
    (-.f64 (-.f64 (fma.f64 -1/4 (*.f64 (/.f64 (pow.f64 a 3) 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 (*.f64 (*.f64 (*.f64 a -2) a) (pow.f64 c 3)) (pow.f64 b 5))) (/.f64 c b)) (*.f64 (/.f64 (*.f64 c c) (pow.f64 b 3)) a)): 0 points increase in error, 28 points decrease in error
    (-.f64 (-.f64 (fma.f64 -1/4 (*.f64 (/.f64 (pow.f64 a 3) 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 (*.f64 (*.f64 (*.f64 a -2) a) (pow.f64 c 3)) (pow.f64 b 5))) (/.f64 c b)) (*.f64 (/.f64 (*.f64 c c) (pow.f64 b 3)) a)): 28 points increase in error, 0 points decrease in error
    (-.f64 (-.f64 (fma.f64 -1/4 (*.f64 (/.f64 (pow.f64 a 3) 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 (*.f64 (*.f64 (*.f64 a -2) a) (pow.f64 c 3)) (pow.f64 b 5))) (/.f64 c b)) (*.f64 (/.f64 (*.f64 c c) (pow.f64 b 3)) a)): 0 points increase in error, 28 points decrease in error
    (-.f64 (-.f64 (fma.f64 -1/4 (*.f64 (/.f64 (pow.f64 a 3) 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 (*.f64 (*.f64 (*.f64 a -2) a) (pow.f64 c 3)) (pow.f64 b 5))) (/.f64 c b)) (*.f64 (/.f64 (*.f64 c c) (pow.f64 b 3)) a)): 0 points increase in error, 0 points decrease in error
    (-.f64 (-.f64 (fma.f64 -1/4 (Rewrite<= associate-/r/_binary64 (/.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))))) (/.f64 (*.f64 (*.f64 (*.f64 a -2) a) (pow.f64 c 3)) (pow.f64 b 5))) (/.f64 c b)) (*.f64 (/.f64 (*.f64 c c) (pow.f64 b 3)) a)): 0 points increase in error, 0 points decrease in error
    (-.f64 (-.f64 (fma.f64 -1/4 (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)) (/.f64 (*.f64 (*.f64 (*.f64 a -2) a) (pow.f64 c 3)) (pow.f64 b 5))) (/.f64 c b)) (*.f64 (/.f64 (*.f64 c c) (pow.f64 b 3)) a)): 0 points increase in error, 0 points decrease in error
    (-.f64 (-.f64 (fma.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 (*.f64 (*.f64 (Rewrite=> *-commutative_binary64 (*.f64 -2 a)) a) (pow.f64 c 3)) (pow.f64 b 5))) (/.f64 c b)) (*.f64 (/.f64 (*.f64 c c) (pow.f64 b 3)) a)): 0 points increase in error, 0 points decrease in error
    (-.f64 (-.f64 (fma.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 (*.f64 (Rewrite<= associate-*r*_binary64 (*.f64 -2 (*.f64 a a))) (pow.f64 c 3)) (pow.f64 b 5))) (/.f64 c b)) (*.f64 (/.f64 (*.f64 c c) (pow.f64 b 3)) a)): 0 points increase in error, 0 points decrease in error
    (-.f64 (-.f64 (fma.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 (*.f64 (*.f64 -2 (Rewrite<= unpow2_binary64 (pow.f64 a 2))) (pow.f64 c 3)) (pow.f64 b 5))) (/.f64 c b)) (*.f64 (/.f64 (*.f64 c c) (pow.f64 b 3)) a)): 0 points increase in error, 0 points decrease in error
    (-.f64 (-.f64 (fma.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 (Rewrite<= associate-*r*_binary64 (*.f64 -2 (*.f64 (pow.f64 a 2) (pow.f64 c 3)))) (pow.f64 b 5))) (/.f64 c b)) (*.f64 (/.f64 (*.f64 c c) (pow.f64 b 3)) a)): 0 points increase in error, 0 points decrease in error
    (-.f64 (-.f64 (fma.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 (*.f64 -2 (Rewrite<= *-commutative_binary64 (*.f64 (pow.f64 c 3) (pow.f64 a 2)))) (pow.f64 b 5))) (/.f64 c b)) (*.f64 (/.f64 (*.f64 c c) (pow.f64 b 3)) a)): 28 points increase in error, 0 points decrease in error
    (-.f64 (-.f64 (fma.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) (Rewrite<= associate-*r/_binary64 (*.f64 -2 (/.f64 (*.f64 (pow.f64 c 3) (pow.f64 a 2)) (pow.f64 b 5))))) (/.f64 c b)) (*.f64 (/.f64 (*.f64 c c) (pow.f64 b 3)) a)): 0 points increase in error, 28 points decrease in error
    (-.f64 (-.f64 (Rewrite<= fma-def_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 (*.f64 c c) (pow.f64 b 3)) a)): 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 (*.f64 c c) (pow.f64 b 3)) a)): 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 (*.f64 c c) (pow.f64 b 3)) a)): 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 (*.f64 c c) (pow.f64 b 3)) a)): 28 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 (Rewrite<= unpow2_binary64 (pow.f64 c 2)) (pow.f64 b 3)) a)): 28 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<= associate-/r/_binary64 (/.f64 (pow.f64 c 2) (/.f64 (pow.f64 b 3) a)))): 0 points increase in error, 28 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<= associate-/l*_binary64 (/.f64 (*.f64 (pow.f64 c 2) a) (pow.f64 b 3)))): 0 points increase in error, 28 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 b around 0 3.2

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

    \[\leadsto \left(\mathsf{fma}\left(-0.25, \color{blue}{\frac{{a}^{3}}{\frac{{b}^{7}}{{c}^{4} \cdot 20}}}, \frac{\left(\left(a \cdot -2\right) \cdot a\right) \cdot {c}^{3}}{{b}^{5}}\right) - \frac{c}{b}\right) - \frac{c \cdot c}{{b}^{3}} \cdot a \]
    Proof
    (-.f64 (-.f64 (fma.f64 -1/4 (/.f64 (pow.f64 a 3) (/.f64 (pow.f64 b 7) (*.f64 (pow.f64 c 4) 20))) (/.f64 (*.f64 (*.f64 (*.f64 a -2) a) (pow.f64 c 3)) (pow.f64 b 5))) (/.f64 c b)) (*.f64 (/.f64 (*.f64 c c) (pow.f64 b 3)) a)): 0 points increase in error, 0 points decrease in error
    (-.f64 (-.f64 (fma.f64 -1/4 (/.f64 (pow.f64 a 3) (/.f64 (pow.f64 b 7) (*.f64 (pow.f64 c 4) (Rewrite<= metadata-eval (+.f64 4 16))))) (/.f64 (*.f64 (*.f64 (*.f64 a -2) a) (pow.f64 c 3)) (pow.f64 b 5))) (/.f64 c b)) (*.f64 (/.f64 (*.f64 c c) (pow.f64 b 3)) a)): 0 points increase in error, 0 points decrease in error
    (-.f64 (-.f64 (fma.f64 -1/4 (/.f64 (pow.f64 a 3) (/.f64 (pow.f64 b 7) (Rewrite<= distribute-rgt-out_binary64 (+.f64 (*.f64 4 (pow.f64 c 4)) (*.f64 16 (pow.f64 c 4)))))) (/.f64 (*.f64 (*.f64 (*.f64 a -2) a) (pow.f64 c 3)) (pow.f64 b 5))) (/.f64 c b)) (*.f64 (/.f64 (*.f64 c c) (pow.f64 b 3)) a)): 0 points increase in error, 0 points decrease in error
    (-.f64 (-.f64 (fma.f64 -1/4 (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 (pow.f64 a 3) (+.f64 (*.f64 4 (pow.f64 c 4)) (*.f64 16 (pow.f64 c 4)))) (pow.f64 b 7))) (/.f64 (*.f64 (*.f64 (*.f64 a -2) a) (pow.f64 c 3)) (pow.f64 b 5))) (/.f64 c b)) (*.f64 (/.f64 (*.f64 c c) (pow.f64 b 3)) a)): 0 points increase in error, 0 points decrease in error
  7. Final simplification3.2

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

Alternatives

Alternative 1
Error3.2
Cost34624
\[\left(\mathsf{fma}\left(-0.25, \frac{{a}^{3}}{\frac{{b}^{7}}{{c}^{4} \cdot 20}}, c \cdot \frac{-2 \cdot \left(a \cdot a\right)}{\frac{{b}^{5}}{c \cdot c}}\right) - \frac{c}{b}\right) - a \cdot \left(\frac{c}{b} \cdot \frac{c}{b \cdot b}\right) \]
Alternative 2
Error4.2
Cost20736
\[\left(\frac{\left(a \cdot \left(a \cdot -2\right)\right) \cdot {c}^{3}}{{b}^{5}} - \frac{c}{b}\right) - a \cdot \frac{c \cdot c}{{b}^{3}} \]
Alternative 3
Error6.2
Cost7492
\[\begin{array}{l} \mathbf{if}\;b \leq 0.00025:\\ \;\;\;\;\left(\sqrt{b \cdot b + a \cdot \left(c \cdot -4\right)} - b\right) \cdot \frac{0.5}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{-c}{b} - \frac{\frac{a \cdot \left(c \cdot c\right)}{b \cdot b}}{b}\\ \end{array} \]
Alternative 4
Error6.3
Cost1024
\[\frac{-c}{b} - \frac{\frac{a \cdot \left(c \cdot c\right)}{b \cdot b}}{b} \]
Alternative 5
Error12.4
Cost256
\[\frac{-c}{b} \]

Error

Reproduce

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