Average Error: 52.4 → 1.5
Time: 11.5s
Precision: binary64
Cost: 53824
\[\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} \]
\[\begin{array}{l} t_0 := {\left(c \cdot a\right)}^{4}\\ \mathsf{fma}\left(-0.25, \frac{\mathsf{fma}\left(16, t_0, 4 \cdot t_0\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}{\frac{{b}^{3}}{a}} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (/ (+ (- b) (sqrt (- (* b b) (* (* 4.0 a) c)))) (* 2.0 a)))
(FPCore (a b c)
 :precision binary64
 (let* ((t_0 (pow (* c a) 4.0)))
   (-
    (fma
     -0.25
     (/ (fma 16.0 t_0 (* 4.0 t_0)) (* a (pow b 7.0)))
     (- (/ (* -2.0 (* (pow c 3.0) (* a a))) (pow b 5.0)) (/ c b)))
    (/ (* c c) (/ (pow b 3.0) a)))))
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) {
	double t_0 = pow((c * a), 4.0);
	return fma(-0.25, (fma(16.0, t_0, (4.0 * t_0)) / (a * pow(b, 7.0))), (((-2.0 * (pow(c, 3.0) * (a * a))) / pow(b, 5.0)) - (c / b))) - ((c * c) / (pow(b, 3.0) / a));
}
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)
	t_0 = Float64(c * a) ^ 4.0
	return Float64(fma(-0.25, Float64(fma(16.0, t_0, Float64(4.0 * t_0)) / Float64(a * (b ^ 7.0))), Float64(Float64(Float64(-2.0 * Float64((c ^ 3.0) * Float64(a * a))) / (b ^ 5.0)) - Float64(c / b))) - Float64(Float64(c * c) / Float64((b ^ 3.0) / a)))
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_] := Block[{t$95$0 = N[Power[N[(c * a), $MachinePrecision], 4.0], $MachinePrecision]}, N[(N[(-0.25 * N[(N[(16.0 * t$95$0 + N[(4.0 * t$95$0), $MachinePrecision]), $MachinePrecision] / N[(a * N[Power[b, 7.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[(N[(c * c), $MachinePrecision] / N[(N[Power[b, 3.0], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}
\begin{array}{l}
t_0 := {\left(c \cdot a\right)}^{4}\\
\mathsf{fma}\left(-0.25, \frac{\mathsf{fma}\left(16, t_0, 4 \cdot t_0\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}{\frac{{b}^{3}}{a}}
\end{array}

Error

Derivation

  1. Initial program 52.4

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

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

    \[\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)} \]
  4. Simplified1.5

    \[\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}{\frac{{b}^{3}}{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 c c) (/.f64 (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 c c) (/.f64 (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 c c) (/.f64 (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 c c) (/.f64 (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 c c) (/.f64 (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 c c) (/.f64 (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 c c) (/.f64 (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 c c) (/.f64 (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 c c) (/.f64 (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 c c) (/.f64 (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 c c) (/.f64 (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 c c) (/.f64 (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 c c) (/.f64 (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 c c) (/.f64 (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 c c) (/.f64 (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 c c) (/.f64 (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 c c) (/.f64 (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 (Rewrite<= unpow2_binary64 (pow.f64 c 2)) (/.f64 (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-/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
  5. Applied egg-rr1.7

    \[\leadsto \mathsf{fma}\left(-0.25, \frac{\mathsf{fma}\left(16, \color{blue}{e^{\mathsf{log1p}\left({\left(c \cdot a\right)}^{4}\right)} - 1}, 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}{\frac{{b}^{3}}{a}} \]
  6. Simplified1.5

    \[\leadsto \mathsf{fma}\left(-0.25, \frac{\mathsf{fma}\left(16, \color{blue}{{\left(c \cdot a\right)}^{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}{\frac{{b}^{3}}{a}} \]
    Proof
    (pow.f64 (*.f64 c a) 4): 0 points increase in error, 0 points decrease in error
    (Rewrite<= expm1-log1p_binary64 (expm1.f64 (log1p.f64 (pow.f64 (*.f64 c a) 4)))): 41 points increase in error, 35 points decrease in error
    (Rewrite<= expm1-def_binary64 (-.f64 (exp.f64 (log1p.f64 (pow.f64 (*.f64 c a) 4))) 1)): 8 points increase in error, 178 points decrease in error
  7. Applied egg-rr1.7

    \[\leadsto \mathsf{fma}\left(-0.25, \frac{\mathsf{fma}\left(16, {\left(c \cdot a\right)}^{4}, 4 \cdot \color{blue}{\left(e^{\mathsf{log1p}\left({\left(c \cdot a\right)}^{4}\right)} - 1\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}{\frac{{b}^{3}}{a}} \]
  8. Simplified1.5

    \[\leadsto \mathsf{fma}\left(-0.25, \frac{\mathsf{fma}\left(16, {\left(c \cdot a\right)}^{4}, 4 \cdot \color{blue}{{\left(c \cdot a\right)}^{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}{\frac{{b}^{3}}{a}} \]
    Proof
    (pow.f64 (*.f64 c a) 4): 0 points increase in error, 0 points decrease in error
    (Rewrite<= expm1-log1p_binary64 (expm1.f64 (log1p.f64 (pow.f64 (*.f64 c a) 4)))): 41 points increase in error, 35 points decrease in error
    (Rewrite<= expm1-def_binary64 (-.f64 (exp.f64 (log1p.f64 (pow.f64 (*.f64 c a) 4))) 1)): 8 points increase in error, 178 points decrease in error
  9. Final simplification1.5

    \[\leadsto \mathsf{fma}\left(-0.25, \frac{\mathsf{fma}\left(16, {\left(c \cdot a\right)}^{4}, 4 \cdot {\left(c \cdot a\right)}^{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}{\frac{{b}^{3}}{a}} \]

Alternatives

Alternative 1
Error2.0
Cost14528
\[\frac{-2 \cdot \left({c}^{3} \cdot \left(a \cdot a\right)\right)}{{b}^{5}} - \left(\frac{c}{b} + \frac{c \cdot c}{\left(b \cdot b\right) \cdot \frac{b}{a}}\right) \]
Alternative 2
Error3.1
Cost7232
\[\frac{-c}{b} - \frac{c \cdot c}{\frac{{b}^{3}}{a}} \]
Alternative 3
Error3.5
Cost1600
\[\left(-2 \cdot \left(\frac{c \cdot c}{\frac{b}{a} \cdot \frac{b \cdot b}{a}} + \frac{c}{\frac{b}{a}}\right)\right) \cdot \frac{0.5}{a} \]
Alternative 4
Error3.4
Cost1600
\[\frac{-2 \cdot \left(\frac{c \cdot c}{\frac{b}{a} \cdot \frac{b \cdot b}{a}} + \frac{c \cdot a}{b}\right)}{a \cdot 2} \]
Alternative 5
Error6.3
Cost256
\[\frac{-c}{b} \]
Alternative 6
Error61.9
Cost64
\[0 \]

Error

Reproduce

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