Average Error: 28.3 → 5.8
Time: 16.8s
Precision: binary64
Cost: 40960
\[\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(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.375, a \cdot \left(\frac{c}{b} \cdot \frac{c}{b \cdot b}\right), \frac{-1.0546875 \cdot {\left(a \cdot c\right)}^{4}}{a \cdot {b}^{7}}\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.375
    (* a (* (/ c b) (/ c (* b b))))
    (/ (* -1.0546875 (pow (* a c) 4.0)) (* a (pow b 7.0)))))))
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.375, (a * ((c / b) * (c / (b * b)))), ((-1.0546875 * pow((a * c), 4.0)) / (a * pow(b, 7.0))))));
}
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.375, Float64(a * Float64(Float64(c / b) * Float64(c / Float64(b * b)))), Float64(Float64(-1.0546875 * (Float64(a * c) ^ 4.0)) / Float64(a * (b ^ 7.0))))))
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.375 * N[(a * N[(N[(c / b), $MachinePrecision] * N[(c / N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(-1.0546875 * N[Power[N[(a * c), $MachinePrecision], 4.0], $MachinePrecision]), $MachinePrecision] / N[(a * N[Power[b, 7.0], $MachinePrecision]), $MachinePrecision]), $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.375, a \cdot \left(\frac{c}{b} \cdot \frac{c}{b \cdot b}\right), \frac{-1.0546875 \cdot {\left(a \cdot c\right)}^{4}}{a \cdot {b}^{7}}\right)\right)\right)

Error

Derivation

  1. Initial program 28.3

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

    \[\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)} \]
  3. Simplified5.8

    \[\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.375, a \cdot \frac{c \cdot c}{{b}^{3}}, \frac{\left(\left({c}^{4} \cdot {a}^{4}\right) \cdot 6.328125\right) \cdot -0.16666666666666666}{a \cdot {b}^{7}}\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 -3/8 (*.f64 a (/.f64 (*.f64 c c) (pow.f64 b 3))) (/.f64 (*.f64 (*.f64 (*.f64 (pow.f64 c 4) (pow.f64 a 4)) 405/64) -1/6) (*.f64 a (pow.f64 b 7)))))): 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 -3/8 (*.f64 a (/.f64 (*.f64 c c) (pow.f64 b 3))) (/.f64 (*.f64 (*.f64 (*.f64 (pow.f64 c 4) (pow.f64 a 4)) 405/64) -1/6) (*.f64 a (pow.f64 b 7)))))): 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 -3/8 (*.f64 a (/.f64 (*.f64 c c) (pow.f64 b 3))) (/.f64 (*.f64 (*.f64 (*.f64 (pow.f64 c 4) (pow.f64 a 4)) 405/64) -1/6) (*.f64 a (pow.f64 b 7)))))): 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 -3/8 (*.f64 a (/.f64 (*.f64 c c) (pow.f64 b 3))) (/.f64 (*.f64 (*.f64 (*.f64 (pow.f64 c 4) (pow.f64 a 4)) 405/64) -1/6) (*.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)) (fma.f64 -1/2 (/.f64 c b) (fma.f64 -3/8 (*.f64 a (/.f64 (Rewrite<= unpow2_binary64 (pow.f64 c 2)) (pow.f64 b 3))) (/.f64 (*.f64 (*.f64 (*.f64 (pow.f64 c 4) (pow.f64 a 4)) 405/64) -1/6) (*.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)) (fma.f64 -1/2 (/.f64 c b) (fma.f64 -3/8 (Rewrite<= *-commutative_binary64 (*.f64 (/.f64 (pow.f64 c 2) (pow.f64 b 3)) a)) (/.f64 (*.f64 (*.f64 (*.f64 (pow.f64 c 4) (pow.f64 a 4)) 405/64) -1/6) (*.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)) (fma.f64 -1/2 (/.f64 c b) (fma.f64 -3/8 (Rewrite=> associate-*l/_binary64 (/.f64 (*.f64 (pow.f64 c 2) a) (pow.f64 b 3))) (/.f64 (*.f64 (*.f64 (*.f64 (pow.f64 c 4) (pow.f64 a 4)) 405/64) -1/6) (*.f64 a (pow.f64 b 7)))))): 0 points increase in error, 1 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 -3/8 (/.f64 (*.f64 (pow.f64 c 2) a) (pow.f64 b 3)) (/.f64 (*.f64 (*.f64 (*.f64 (pow.f64 c 4) (pow.f64 a 4)) (Rewrite<= metadata-eval (+.f64 81/64 81/16))) -1/6) (*.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)) (fma.f64 -1/2 (/.f64 c b) (fma.f64 -3/8 (/.f64 (*.f64 (pow.f64 c 2) a) (pow.f64 b 3)) (/.f64 (*.f64 (*.f64 (*.f64 (pow.f64 c 4) (pow.f64 a 4)) (+.f64 (Rewrite<= metadata-eval (*.f64 -9/8 -9/8)) 81/16)) -1/6) (*.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)) (fma.f64 -1/2 (/.f64 c b) (fma.f64 -3/8 (/.f64 (*.f64 (pow.f64 c 2) a) (pow.f64 b 3)) (/.f64 (*.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))))) -1/6) (*.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)) (fma.f64 -1/2 (/.f64 c b) (fma.f64 -3/8 (/.f64 (*.f64 (pow.f64 c 2) a) (pow.f64 b 3)) (/.f64 (*.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)))) -1/6) (*.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)) (fma.f64 -1/2 (/.f64 c b) (fma.f64 -3/8 (/.f64 (*.f64 (pow.f64 c 2) a) (pow.f64 b 3)) (/.f64 (*.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)))) -1/6) (*.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)) (fma.f64 -1/2 (/.f64 c b) (fma.f64 -3/8 (/.f64 (*.f64 (pow.f64 c 2) a) (pow.f64 b 3)) (/.f64 (*.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)))) -1/6) (*.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)) (fma.f64 -1/2 (/.f64 c b) (fma.f64 -3/8 (/.f64 (*.f64 (pow.f64 c 2) a) (pow.f64 b 3)) (/.f64 (*.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)))) -1/6) (*.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)) (fma.f64 -1/2 (/.f64 c b) (fma.f64 -3/8 (/.f64 (*.f64 (pow.f64 c 2) a) (pow.f64 b 3)) (/.f64 (*.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)))) -1/6) (*.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)) (fma.f64 -1/2 (/.f64 c b) (fma.f64 -3/8 (/.f64 (*.f64 (pow.f64 c 2) a) (pow.f64 b 3)) (/.f64 (*.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)))) -1/6) (*.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)) (fma.f64 -1/2 (/.f64 c b) (fma.f64 -3/8 (/.f64 (*.f64 (pow.f64 c 2) a) (pow.f64 b 3)) (/.f64 (*.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)))) -1/6) (*.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)) (fma.f64 -1/2 (/.f64 c b) (fma.f64 -3/8 (/.f64 (*.f64 (pow.f64 c 2) a) (pow.f64 b 3)) (Rewrite<= associate-*l/_binary64 (*.f64 (/.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))) -1/6))))): 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 -3/8 (/.f64 (*.f64 (pow.f64 c 2) a) (pow.f64 b 3)) (Rewrite<= *-commutative_binary64 (*.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)) (fma.f64 -1/2 (/.f64 c b) (Rewrite<= fma-def_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))))))): 14 points increase in error, 9 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
  4. Taylor expanded in c around 0 5.8

    \[\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.375, a \cdot \frac{c \cdot c}{{b}^{3}}, \frac{\color{blue}{-1.0546875 \cdot \left({c}^{4} \cdot {a}^{4}\right)}}{a \cdot {b}^{7}}\right)\right)\right) \]
  5. Simplified5.8

    \[\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.375, a \cdot \frac{c \cdot c}{{b}^{3}}, \frac{\color{blue}{-1.0546875 \cdot {\left(c \cdot a\right)}^{4}}}{a \cdot {b}^{7}}\right)\right)\right) \]
    Proof
    (*.f64 -135/128 (pow.f64 (*.f64 c a) 4)): 0 points increase in error, 0 points decrease in error
    (*.f64 -135/128 (pow.f64 (*.f64 c a) (Rewrite<= metadata-eval (*.f64 2 2)))): 0 points increase in error, 0 points decrease in error
    (*.f64 -135/128 (Rewrite<= pow-sqr_binary64 (*.f64 (pow.f64 (*.f64 c a) 2) (pow.f64 (*.f64 c a) 2)))): 78 points increase in error, 55 points decrease in error
    (*.f64 -135/128 (*.f64 (Rewrite=> unpow2_binary64 (*.f64 (*.f64 c a) (*.f64 c a))) (pow.f64 (*.f64 c a) 2))): 0 points increase in error, 0 points decrease in error
    (*.f64 -135/128 (*.f64 (*.f64 (*.f64 c a) (*.f64 c a)) (Rewrite=> unpow2_binary64 (*.f64 (*.f64 c a) (*.f64 c a))))): 0 points increase in error, 0 points decrease in error
    (*.f64 -135/128 (*.f64 (Rewrite<= unswap-sqr_binary64 (*.f64 (*.f64 c c) (*.f64 a a))) (*.f64 (*.f64 c a) (*.f64 c a)))): 54 points increase in error, 67 points decrease in error
    (*.f64 -135/128 (*.f64 (*.f64 (Rewrite<= unpow2_binary64 (pow.f64 c 2)) (*.f64 a a)) (*.f64 (*.f64 c a) (*.f64 c a)))): 0 points increase in error, 0 points decrease in error
    (*.f64 -135/128 (*.f64 (*.f64 (pow.f64 c 2) (Rewrite<= unpow2_binary64 (pow.f64 a 2))) (*.f64 (*.f64 c a) (*.f64 c a)))): 0 points increase in error, 0 points decrease in error
    (*.f64 -135/128 (*.f64 (*.f64 (pow.f64 c 2) (pow.f64 a 2)) (Rewrite<= unswap-sqr_binary64 (*.f64 (*.f64 c c) (*.f64 a a))))): 58 points increase in error, 66 points decrease in error
    (*.f64 -135/128 (*.f64 (*.f64 (pow.f64 c 2) (pow.f64 a 2)) (*.f64 (Rewrite<= unpow2_binary64 (pow.f64 c 2)) (*.f64 a a)))): 0 points increase in error, 0 points decrease in error
    (*.f64 -135/128 (*.f64 (*.f64 (pow.f64 c 2) (pow.f64 a 2)) (*.f64 (pow.f64 c 2) (Rewrite<= unpow2_binary64 (pow.f64 a 2))))): 0 points increase in error, 0 points decrease in error
    (*.f64 -135/128 (Rewrite<= unswap-sqr_binary64 (*.f64 (*.f64 (pow.f64 c 2) (pow.f64 c 2)) (*.f64 (pow.f64 a 2) (pow.f64 a 2))))): 61 points increase in error, 61 points decrease in error
    (*.f64 -135/128 (*.f64 (*.f64 (pow.f64 c 2) (pow.f64 c 2)) (Rewrite=> pow-sqr_binary64 (pow.f64 a (*.f64 2 2))))): 52 points increase in error, 64 points decrease in error
    (*.f64 -135/128 (*.f64 (*.f64 (pow.f64 c 2) (pow.f64 c 2)) (pow.f64 a (Rewrite=> metadata-eval 4)))): 0 points increase in error, 0 points decrease in error
    (*.f64 -135/128 (*.f64 (Rewrite=> pow-sqr_binary64 (pow.f64 c (*.f64 2 2))) (pow.f64 a 4))): 44 points increase in error, 51 points decrease in error
    (*.f64 -135/128 (*.f64 (pow.f64 c (Rewrite=> metadata-eval 4)) (pow.f64 a 4))): 0 points increase in error, 0 points decrease in error
  6. Applied egg-rr5.8

    \[\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.375, a \cdot \color{blue}{\left(\frac{c}{b \cdot b} \cdot \frac{c}{b}\right)}, \frac{-1.0546875 \cdot {\left(c \cdot a\right)}^{4}}{a \cdot {b}^{7}}\right)\right)\right) \]
  7. Applied egg-rr5.8

    \[\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.375, a \cdot \left(\frac{c}{b \cdot b} \cdot \frac{c}{b}\right), \frac{-1.0546875 \cdot {\left(c \cdot a\right)}^{4}}{a \cdot {b}^{7}}\right)\right)\right) \]
  8. Final simplification5.8

    \[\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.375, a \cdot \left(\frac{c}{b} \cdot \frac{c}{b \cdot b}\right), \frac{-1.0546875 \cdot {\left(a \cdot c\right)}^{4}}{a \cdot {b}^{7}}\right)\right)\right) \]

Alternatives

Alternative 1
Error6.7
Cost34756
\[\begin{array}{l} t_0 := c \cdot \left(a \cdot -3\right)\\ t_1 := \mathsf{fma}\left(b, b, t_0\right)\\ \mathbf{if}\;\frac{\sqrt{b \cdot b + t_0} - b}{a \cdot 3} \leq -5:\\ \;\;\;\;\frac{\frac{t_1 - b \cdot b}{b + \sqrt{t_1}}}{a \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-0.5625, \left(a \cdot a\right) \cdot \frac{{c}^{3}}{{b}^{5}}, \mathsf{fma}\left(-0.5, \frac{c}{b}, \frac{\left(c \cdot c\right) \cdot -0.375}{b \cdot b} \cdot \frac{a}{b}\right)\right)\\ \end{array} \]
Alternative 2
Error6.7
Cost28228
\[\begin{array}{l} t_0 := c \cdot \left(a \cdot -3\right)\\ t_1 := \mathsf{fma}\left(b, b, t_0\right)\\ \mathbf{if}\;\frac{\sqrt{b \cdot b + t_0} - b}{a \cdot 3} \leq -5:\\ \;\;\;\;\frac{\frac{t_1 - b \cdot b}{b + \sqrt{t_1}}}{a \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(c, \frac{-0.5}{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)\\ \end{array} \]
Alternative 3
Error6.8
Cost28100
\[\begin{array}{l} t_0 := c \cdot \left(a \cdot -3\right)\\ \mathbf{if}\;\frac{\sqrt{b \cdot b + t_0} - b}{a \cdot 3} \leq -5:\\ \;\;\;\;\frac{\sqrt{\mathsf{fma}\left(b, b, t_0\right)} - b}{a \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(c, \frac{-0.5}{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)\\ \end{array} \]
Alternative 4
Error10.8
Cost20492
\[\begin{array}{l} t_0 := \mathsf{fma}\left(-0.375, a \cdot \frac{c}{\frac{{b}^{3}}{c}}, -0.5 \cdot \frac{c}{b}\right)\\ t_1 := \frac{b - \sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)}}{-3}\\ \mathbf{if}\;b \leq 0.021245:\\ \;\;\;\;t_1 \cdot \frac{1}{a}\\ \mathbf{elif}\;b \leq 9.2:\\ \;\;\;\;t_0\\ \mathbf{elif}\;b \leq 140:\\ \;\;\;\;{\left(\frac{a}{t_1}\right)}^{-1}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 5
Error10.8
Cost14156
\[\begin{array}{l} t_0 := \mathsf{fma}\left(-0.375, a \cdot \frac{c}{\frac{{b}^{3}}{c}}, -0.5 \cdot \frac{c}{b}\right)\\ t_1 := \frac{b - \sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)}}{-3} \cdot \frac{1}{a}\\ \mathbf{if}\;b \leq 0.021245:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 9.2:\\ \;\;\;\;t_0\\ \mathbf{elif}\;b \leq 140:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 6
Error10.8
Cost14092
\[\begin{array}{l} t_0 := \mathsf{fma}\left(-0.375, a \cdot \frac{c}{\frac{{b}^{3}}{c}}, -0.5 \cdot \frac{c}{b}\right)\\ t_1 := \frac{\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)} - b}{a \cdot 3}\\ \mathbf{if}\;b \leq 0.021245:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 9.2:\\ \;\;\;\;t_0\\ \mathbf{elif}\;b \leq 140:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 7
Error10.8
Cost14092
\[\begin{array}{l} t_0 := \mathsf{fma}\left(-0.375, a \cdot \frac{c}{\frac{{b}^{3}}{c}}, -0.5 \cdot \frac{c}{b}\right)\\ t_1 := \sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)} - b\\ \mathbf{if}\;b \leq 0.021245:\\ \;\;\;\;t_1 \cdot \left(\frac{1}{a} \cdot 0.3333333333333333\right)\\ \mathbf{elif}\;b \leq 9.2:\\ \;\;\;\;t_0\\ \mathbf{elif}\;b \leq 140:\\ \;\;\;\;\frac{t_1}{a \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 8
Error10.9
Cost14028
\[\begin{array}{l} t_0 := \left(\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)} - b\right) \cdot \frac{0.3333333333333333}{a}\\ \mathbf{if}\;b \leq 0.021245:\\ \;\;\;\;t_0\\ \mathbf{elif}\;b \leq 9.2:\\ \;\;\;\;c \cdot \left(\frac{-0.5}{b} + \frac{a \cdot -0.375}{\frac{{b}^{3}}{c}}\right)\\ \mathbf{elif}\;b \leq 140:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} \cdot \mathsf{fma}\left(-0.375 \cdot \frac{a}{b}, \frac{c}{b}, -0.5\right)\\ \end{array} \]
Alternative 9
Error10.9
Cost14028
\[\begin{array}{l} t_0 := \frac{\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)} - b}{a \cdot 3}\\ \mathbf{if}\;b \leq 0.021245:\\ \;\;\;\;t_0\\ \mathbf{elif}\;b \leq 9.2:\\ \;\;\;\;c \cdot \left(\frac{-0.5}{b} + \frac{a \cdot -0.375}{\frac{{b}^{3}}{c}}\right)\\ \mathbf{elif}\;b \leq 140:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} \cdot \mathsf{fma}\left(-0.375 \cdot \frac{a}{b}, \frac{c}{b}, -0.5\right)\\ \end{array} \]
Alternative 10
Error10.9
Cost7756
\[\begin{array}{l} t_0 := \frac{\sqrt{b \cdot b - a \cdot \left(c \cdot 3\right)} - b}{a \cdot 3}\\ \mathbf{if}\;b \leq 0.021245:\\ \;\;\;\;t_0\\ \mathbf{elif}\;b \leq 9.2:\\ \;\;\;\;c \cdot \left(\frac{-0.5}{b} + \frac{a \cdot -0.375}{\frac{{b}^{3}}{c}}\right)\\ \mathbf{elif}\;b \leq 140:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} \cdot \mathsf{fma}\left(-0.375 \cdot \frac{a}{b}, \frac{c}{b}, -0.5\right)\\ \end{array} \]
Alternative 11
Error12.0
Cost7232
\[\frac{c}{b} \cdot \mathsf{fma}\left(-0.375 \cdot \frac{a}{b}, \frac{c}{b}, -0.5\right) \]
Alternative 12
Error23.0
Cost320
\[-0.5 \cdot \frac{c}{b} \]

Error

Reproduce

herbie shell --seed 2022306 
(FPCore (a b c)
  :name "Cubic critical, 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) (* (* 3.0 a) c)))) (* 3.0 a)))