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

Error

Derivation

  1. Initial program 28.2

    \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
  2. Taylor expanded in b around inf 6.1

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

    \[\leadsto \color{blue}{\mathsf{fma}\left(-0.25, \frac{\mathsf{fma}\left(16, {c}^{4} \cdot {a}^{4}, 4 \cdot \left({c}^{4} \cdot {a}^{4}\right)\right)}{a \cdot {b}^{7}}, \frac{-2 \cdot \left({c}^{3} \cdot \left(a \cdot a\right)\right)}{{b}^{5}} - \frac{c}{b}\right) - \frac{c \cdot c}{{b}^{3}} \cdot a} \]
    Proof
    (-.f64 (fma.f64 -1/4 (/.f64 (fma.f64 16 (*.f64 (pow.f64 c 4) (pow.f64 a 4)) (*.f64 4 (*.f64 (pow.f64 c 4) (pow.f64 a 4)))) (*.f64 a (pow.f64 b 7))) (-.f64 (/.f64 (*.f64 -2 (*.f64 (pow.f64 c 3) (*.f64 a a))) (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 (fma.f64 -1/4 (/.f64 (fma.f64 16 (*.f64 (pow.f64 c 4) (pow.f64 a 4)) (*.f64 (Rewrite<= metadata-eval (*.f64 -2 -2)) (*.f64 (pow.f64 c 4) (pow.f64 a 4)))) (*.f64 a (pow.f64 b 7))) (-.f64 (/.f64 (*.f64 -2 (*.f64 (pow.f64 c 3) (*.f64 a a))) (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 (fma.f64 -1/4 (/.f64 (fma.f64 16 (*.f64 (pow.f64 c 4) (pow.f64 a 4)) (*.f64 (*.f64 -2 -2) (*.f64 (pow.f64 c (Rewrite<= metadata-eval (*.f64 2 2))) (pow.f64 a 4)))) (*.f64 a (pow.f64 b 7))) (-.f64 (/.f64 (*.f64 -2 (*.f64 (pow.f64 c 3) (*.f64 a a))) (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 (fma.f64 -1/4 (/.f64 (fma.f64 16 (*.f64 (pow.f64 c 4) (pow.f64 a 4)) (*.f64 (*.f64 -2 -2) (*.f64 (Rewrite<= pow-sqr_binary64 (*.f64 (pow.f64 c 2) (pow.f64 c 2))) (pow.f64 a 4)))) (*.f64 a (pow.f64 b 7))) (-.f64 (/.f64 (*.f64 -2 (*.f64 (pow.f64 c 3) (*.f64 a a))) (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 (fma.f64 -1/4 (/.f64 (fma.f64 16 (*.f64 (pow.f64 c 4) (pow.f64 a 4)) (*.f64 (*.f64 -2 -2) (*.f64 (*.f64 (pow.f64 c 2) (pow.f64 c 2)) (pow.f64 a (Rewrite<= metadata-eval (*.f64 2 2)))))) (*.f64 a (pow.f64 b 7))) (-.f64 (/.f64 (*.f64 -2 (*.f64 (pow.f64 c 3) (*.f64 a a))) (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 (fma.f64 -1/4 (/.f64 (fma.f64 16 (*.f64 (pow.f64 c 4) (pow.f64 a 4)) (*.f64 (*.f64 -2 -2) (*.f64 (*.f64 (pow.f64 c 2) (pow.f64 c 2)) (Rewrite<= pow-sqr_binary64 (*.f64 (pow.f64 a 2) (pow.f64 a 2)))))) (*.f64 a (pow.f64 b 7))) (-.f64 (/.f64 (*.f64 -2 (*.f64 (pow.f64 c 3) (*.f64 a a))) (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 (fma.f64 -1/4 (/.f64 (fma.f64 16 (*.f64 (pow.f64 c 4) (pow.f64 a 4)) (*.f64 (*.f64 -2 -2) (Rewrite=> unswap-sqr_binary64 (*.f64 (*.f64 (pow.f64 c 2) (pow.f64 a 2)) (*.f64 (pow.f64 c 2) (pow.f64 a 2)))))) (*.f64 a (pow.f64 b 7))) (-.f64 (/.f64 (*.f64 -2 (*.f64 (pow.f64 c 3) (*.f64 a a))) (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 (fma.f64 -1/4 (/.f64 (fma.f64 16 (*.f64 (pow.f64 c 4) (pow.f64 a 4)) (Rewrite<= swap-sqr_binary64 (*.f64 (*.f64 -2 (*.f64 (pow.f64 c 2) (pow.f64 a 2))) (*.f64 -2 (*.f64 (pow.f64 c 2) (pow.f64 a 2)))))) (*.f64 a (pow.f64 b 7))) (-.f64 (/.f64 (*.f64 -2 (*.f64 (pow.f64 c 3) (*.f64 a a))) (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 (fma.f64 -1/4 (/.f64 (fma.f64 16 (*.f64 (pow.f64 c 4) (pow.f64 a 4)) (Rewrite<= unpow2_binary64 (pow.f64 (*.f64 -2 (*.f64 (pow.f64 c 2) (pow.f64 a 2))) 2))) (*.f64 a (pow.f64 b 7))) (-.f64 (/.f64 (*.f64 -2 (*.f64 (pow.f64 c 3) (*.f64 a a))) (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 (fma.f64 -1/4 (/.f64 (Rewrite<= fma-def_binary64 (+.f64 (*.f64 16 (*.f64 (pow.f64 c 4) (pow.f64 a 4))) (pow.f64 (*.f64 -2 (*.f64 (pow.f64 c 2) (pow.f64 a 2))) 2))) (*.f64 a (pow.f64 b 7))) (-.f64 (/.f64 (*.f64 -2 (*.f64 (pow.f64 c 3) (*.f64 a a))) (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 (fma.f64 -1/4 (/.f64 (Rewrite<= +-commutative_binary64 (+.f64 (pow.f64 (*.f64 -2 (*.f64 (pow.f64 c 2) (pow.f64 a 2))) 2) (*.f64 16 (*.f64 (pow.f64 c 4) (pow.f64 a 4))))) (*.f64 a (pow.f64 b 7))) (-.f64 (/.f64 (*.f64 -2 (*.f64 (pow.f64 c 3) (*.f64 a a))) (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 (fma.f64 -1/4 (/.f64 (+.f64 (pow.f64 (*.f64 -2 (*.f64 (pow.f64 c 2) (pow.f64 a 2))) 2) (*.f64 16 (*.f64 (pow.f64 c 4) (pow.f64 a 4)))) (*.f64 a (pow.f64 b 7))) (-.f64 (/.f64 (*.f64 -2 (*.f64 (pow.f64 c 3) (Rewrite<= unpow2_binary64 (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 (fma.f64 -1/4 (/.f64 (+.f64 (pow.f64 (*.f64 -2 (*.f64 (pow.f64 c 2) (pow.f64 a 2))) 2) (*.f64 16 (*.f64 (pow.f64 c 4) (pow.f64 a 4)))) (*.f64 a (pow.f64 b 7))) (-.f64 (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, 0 points decrease in error
    (-.f64 (fma.f64 -1/4 (/.f64 (+.f64 (pow.f64 (*.f64 -2 (*.f64 (pow.f64 c 2) (pow.f64 a 2))) 2) (*.f64 16 (*.f64 (pow.f64 c 4) (pow.f64 a 4)))) (*.f64 a (pow.f64 b 7))) (Rewrite<= unsub-neg_binary64 (+.f64 (*.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 (fma.f64 -1/4 (/.f64 (+.f64 (pow.f64 (*.f64 -2 (*.f64 (pow.f64 c 2) (pow.f64 a 2))) 2) (*.f64 16 (*.f64 (pow.f64 c 4) (pow.f64 a 4)))) (*.f64 a (pow.f64 b 7))) (+.f64 (*.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 (fma.f64 -1/4 (/.f64 (+.f64 (pow.f64 (*.f64 -2 (*.f64 (pow.f64 c 2) (pow.f64 a 2))) 2) (*.f64 16 (*.f64 (pow.f64 c 4) (pow.f64 a 4)))) (*.f64 a (pow.f64 b 7))) (Rewrite<= +-commutative_binary64 (+.f64 (*.f64 -1 (/.f64 c 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)): 0 points increase in error, 0 points decrease in error
    (-.f64 (Rewrite<= fma-def_binary64 (+.f64 (*.f64 -1/4 (/.f64 (+.f64 (pow.f64 (*.f64 -2 (*.f64 (pow.f64 c 2) (pow.f64 a 2))) 2) (*.f64 16 (*.f64 (pow.f64 c 4) (pow.f64 a 4)))) (*.f64 a (pow.f64 b 7)))) (+.f64 (*.f64 -1 (/.f64 c 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)): 0 points increase in error, 0 points decrease in error
    (-.f64 (+.f64 (*.f64 -1/4 (/.f64 (+.f64 (pow.f64 (*.f64 -2 (*.f64 (pow.f64 c 2) (pow.f64 a 2))) 2) (*.f64 16 (*.f64 (pow.f64 c 4) (pow.f64 a 4)))) (*.f64 a (pow.f64 b 7)))) (+.f64 (*.f64 -1 (/.f64 c 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)): 0 points increase in error, 0 points decrease in error
    (-.f64 (+.f64 (*.f64 -1/4 (/.f64 (+.f64 (pow.f64 (*.f64 -2 (*.f64 (pow.f64 c 2) (pow.f64 a 2))) 2) (*.f64 16 (*.f64 (pow.f64 c 4) (pow.f64 a 4)))) (*.f64 a (pow.f64 b 7)))) (+.f64 (*.f64 -1 (/.f64 c 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)))): 1 points increase in error, 0 points decrease in error
    (-.f64 (+.f64 (*.f64 -1/4 (/.f64 (+.f64 (pow.f64 (*.f64 -2 (*.f64 (pow.f64 c 2) (pow.f64 a 2))) 2) (*.f64 16 (*.f64 (pow.f64 c 4) (pow.f64 a 4)))) (*.f64 a (pow.f64 b 7)))) (+.f64 (*.f64 -1 (/.f64 c 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, 0 points decrease in error
    (Rewrite<= unsub-neg_binary64 (+.f64 (+.f64 (*.f64 -1/4 (/.f64 (+.f64 (pow.f64 (*.f64 -2 (*.f64 (pow.f64 c 2) (pow.f64 a 2))) 2) (*.f64 16 (*.f64 (pow.f64 c 4) (pow.f64 a 4)))) (*.f64 a (pow.f64 b 7)))) (+.f64 (*.f64 -1 (/.f64 c 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/4 (/.f64 (+.f64 (pow.f64 (*.f64 -2 (*.f64 (pow.f64 c 2) (pow.f64 a 2))) 2) (*.f64 16 (*.f64 (pow.f64 c 4) (pow.f64 a 4)))) (*.f64 a (pow.f64 b 7)))) (+.f64 (*.f64 -1 (/.f64 c 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/4 (/.f64 (+.f64 (pow.f64 (*.f64 -2 (*.f64 (pow.f64 c 2) (pow.f64 a 2))) 2) (*.f64 16 (*.f64 (pow.f64 c 4) (pow.f64 a 4)))) (*.f64 a (pow.f64 b 7)))) (+.f64 (*.f64 -1 (/.f64 c 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
  4. Taylor expanded in c around 0 6.1

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

    \[\leadsto \mathsf{fma}\left(-0.25, \color{blue}{\frac{{\left(c \cdot a\right)}^{4}}{{b}^{7} \cdot \frac{a}{20}}}, \frac{-2 \cdot \left({c}^{3} \cdot \left(a \cdot a\right)\right)}{{b}^{5}} - \frac{c}{b}\right) - \frac{c \cdot c}{{b}^{3}} \cdot a \]
    Proof
    (/.f64 (pow.f64 (*.f64 c a) 4) (*.f64 (pow.f64 b 7) (/.f64 a 20))): 0 points increase in error, 0 points decrease in error
    (Rewrite<= associate-/l/_binary64 (/.f64 (/.f64 (pow.f64 (*.f64 c a) 4) (/.f64 a 20)) (pow.f64 b 7))): 38 points increase in error, 43 points decrease in error
    (/.f64 (/.f64 (pow.f64 (*.f64 c a) (Rewrite<= metadata-eval (*.f64 2 2))) (/.f64 a 20)) (pow.f64 b 7)): 0 points increase in error, 0 points decrease in error
    (/.f64 (/.f64 (Rewrite<= pow-sqr_binary64 (*.f64 (pow.f64 (*.f64 c a) 2) (pow.f64 (*.f64 c a) 2))) (/.f64 a 20)) (pow.f64 b 7)): 68 points increase in error, 58 points decrease in error
    (/.f64 (/.f64 (*.f64 (Rewrite=> unpow2_binary64 (*.f64 (*.f64 c a) (*.f64 c a))) (pow.f64 (*.f64 c a) 2)) (/.f64 a 20)) (pow.f64 b 7)): 0 points increase in error, 0 points decrease in error
    (/.f64 (/.f64 (*.f64 (Rewrite=> swap-sqr_binary64 (*.f64 (*.f64 c c) (*.f64 a a))) (pow.f64 (*.f64 c a) 2)) (/.f64 a 20)) (pow.f64 b 7)): 44 points increase in error, 55 points decrease in error
    (/.f64 (/.f64 (*.f64 (*.f64 (*.f64 c c) (*.f64 a a)) (Rewrite=> unpow2_binary64 (*.f64 (*.f64 c a) (*.f64 c a)))) (/.f64 a 20)) (pow.f64 b 7)): 0 points increase in error, 0 points decrease in error
    (/.f64 (/.f64 (*.f64 (*.f64 (*.f64 c c) (*.f64 a a)) (Rewrite=> swap-sqr_binary64 (*.f64 (*.f64 c c) (*.f64 a a)))) (/.f64 a 20)) (pow.f64 b 7)): 45 points increase in error, 54 points decrease in error
    (/.f64 (/.f64 (Rewrite<= unswap-sqr_binary64 (*.f64 (*.f64 (*.f64 c c) (*.f64 c c)) (*.f64 (*.f64 a a) (*.f64 a a)))) (/.f64 a 20)) (pow.f64 b 7)): 63 points increase in error, 54 points decrease in error
    (/.f64 (/.f64 (*.f64 (Rewrite=> associate-*r*_binary64 (*.f64 (*.f64 (*.f64 c c) c) c)) (*.f64 (*.f64 a a) (*.f64 a a))) (/.f64 a 20)) (pow.f64 b 7)): 34 points increase in error, 36 points decrease in error
    (/.f64 (/.f64 (*.f64 (*.f64 (Rewrite<= unpow3_binary64 (pow.f64 c 3)) c) (*.f64 (*.f64 a a) (*.f64 a a))) (/.f64 a 20)) (pow.f64 b 7)): 23 points increase in error, 23 points decrease in error
    (/.f64 (/.f64 (*.f64 (Rewrite=> pow-plus_binary64 (pow.f64 c (+.f64 3 1))) (*.f64 (*.f64 a a) (*.f64 a a))) (/.f64 a 20)) (pow.f64 b 7)): 29 points increase in error, 23 points decrease in error
    (/.f64 (/.f64 (*.f64 (pow.f64 c (Rewrite=> metadata-eval 4)) (*.f64 (*.f64 a a) (*.f64 a a))) (/.f64 a 20)) (pow.f64 b 7)): 0 points increase in error, 0 points decrease in error
    (/.f64 (/.f64 (*.f64 (pow.f64 c 4) (Rewrite=> associate-*r*_binary64 (*.f64 (*.f64 (*.f64 a a) a) a))) (/.f64 a 20)) (pow.f64 b 7)): 43 points increase in error, 24 points decrease in error
    (/.f64 (/.f64 (*.f64 (pow.f64 c 4) (*.f64 (Rewrite<= unpow3_binary64 (pow.f64 a 3)) a)) (/.f64 a 20)) (pow.f64 b 7)): 12 points increase in error, 28 points decrease in error
    (/.f64 (/.f64 (*.f64 (pow.f64 c 4) (Rewrite=> pow-plus_binary64 (pow.f64 a (+.f64 3 1)))) (/.f64 a 20)) (pow.f64 b 7)): 28 points increase in error, 20 points decrease in error
    (/.f64 (/.f64 (*.f64 (pow.f64 c 4) (pow.f64 a (Rewrite=> metadata-eval 4))) (/.f64 a 20)) (pow.f64 b 7)): 0 points increase in error, 0 points decrease in error
    (/.f64 (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 (*.f64 (pow.f64 c 4) (pow.f64 a 4)) 20) a)) (pow.f64 b 7)): 46 points increase in error, 43 points decrease in error
    (/.f64 (/.f64 (Rewrite=> associate-*l*_binary64 (*.f64 (pow.f64 c 4) (*.f64 (pow.f64 a 4) 20))) a) (pow.f64 b 7)): 38 points increase in error, 33 points decrease in error
    (/.f64 (/.f64 (*.f64 (pow.f64 c 4) (*.f64 (pow.f64 a 4) (Rewrite<= metadata-eval (+.f64 4 16)))) a) (pow.f64 b 7)): 0 points increase in error, 0 points decrease in error
    (/.f64 (/.f64 (*.f64 (pow.f64 c 4) (Rewrite<= distribute-rgt-out_binary64 (+.f64 (*.f64 4 (pow.f64 a 4)) (*.f64 16 (pow.f64 a 4))))) a) (pow.f64 b 7)): 0 points increase in error, 0 points decrease in error
    (Rewrite<= associate-/r*_binary64 (/.f64 (*.f64 (pow.f64 c 4) (+.f64 (*.f64 4 (pow.f64 a 4)) (*.f64 16 (pow.f64 a 4)))) (*.f64 a (pow.f64 b 7)))): 44 points increase in error, 46 points decrease in error
  6. Applied egg-rr6.1

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

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

Alternatives

Alternative 1
Error9.6
Cost21060
\[\begin{array}{l} \mathbf{if}\;\frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -4\right)} - b}{a \cdot 2} \leq -0.00055:\\ \;\;\;\;\left(\sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -4\right)\right)} - b\right) \cdot \frac{0.5}{a}\\ \mathbf{else}:\\ \;\;\;\;\left(-\frac{c}{b}\right) - \frac{c \cdot \left(c \cdot a\right)}{{b}^{3}}\\ \end{array} \]
Alternative 2
Error9.6
Cost21060
\[\begin{array}{l} t_0 := c \cdot \left(a \cdot -4\right)\\ \mathbf{if}\;\frac{\sqrt{b \cdot b + t_0} - b}{a \cdot 2} \leq -0.00055:\\ \;\;\;\;\frac{\sqrt{\mathsf{fma}\left(b, b, t_0\right)} - b}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\left(-\frac{c}{b}\right) - \frac{c \cdot \left(c \cdot a\right)}{{b}^{3}}\\ \end{array} \]
Alternative 3
Error9.7
Cost14788
\[\begin{array}{l} t_0 := \frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -4\right)} - b}{a \cdot 2}\\ \mathbf{if}\;t_0 \leq -0.00055:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\left(-\frac{c}{b}\right) - \frac{c \cdot \left(c \cdot a\right)}{{b}^{3}}\\ \end{array} \]
Alternative 4
Error8.1
Cost14528
\[\left(\frac{-2 \cdot \left({c}^{3} \cdot \left(a \cdot a\right)\right)}{{b}^{5}} - \frac{c}{b}\right) - \frac{\frac{c \cdot \left(c \cdot a\right)}{b \cdot b}}{b} \]
Alternative 5
Error9.8
Cost7492
\[\begin{array}{l} \mathbf{if}\;b \leq 1.05:\\ \;\;\;\;\frac{0.5}{a} \cdot \left(\sqrt{b \cdot b + \left(c \cdot a\right) \cdot -4} - b\right)\\ \mathbf{else}:\\ \;\;\;\;\left(-\frac{c}{b}\right) - \frac{c \cdot \left(c \cdot a\right)}{{b}^{3}}\\ \end{array} \]
Alternative 6
Error12.1
Cost7232
\[\left(-\frac{c}{b}\right) - \frac{c \cdot \left(c \cdot a\right)}{{b}^{3}} \]
Alternative 7
Error12.2
Cost1600
\[\frac{-2 \cdot \left(\frac{c \cdot c}{\frac{b \cdot b}{a} \cdot \frac{b}{a}} + \frac{c \cdot a}{b}\right)}{a \cdot 2} \]
Alternative 8
Error23.0
Cost256
\[-\frac{c}{b} \]

Error

Reproduce

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