Average Error: 29.0 → 5.1
Time: 22.6s
Precision: binary64
Cost: 60100
\[\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} \]
\[\begin{array}{l} \mathbf{if}\;b \leq 0.0305:\\ \;\;\;\;\left(\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)} - b\right) \cdot \left(\frac{1}{a} \cdot 0.3333333333333333\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-0.16666666666666666, \frac{\frac{{c}^{4}}{{b}^{6}} \cdot 6.328125}{\frac{b}{{a}^{3}}}, \mathsf{fma}\left(-0.5, \frac{c}{b}, \mathsf{fma}\left(-0.375, \frac{a}{\frac{{b}^{3}}{c \cdot c}}, \frac{{c}^{3} \cdot -0.5625}{\frac{{b}^{5}}{a \cdot a}}\right)\right)\right)\\ \end{array} \]
(FPCore (a b c)
 :precision binary64
 (/ (+ (- b) (sqrt (- (* b b) (* (* 3.0 a) c)))) (* 3.0 a)))
(FPCore (a b c)
 :precision binary64
 (if (<= b 0.0305)
   (* (- (sqrt (fma b b (* c (* a -3.0)))) b) (* (/ 1.0 a) 0.3333333333333333))
   (fma
    -0.16666666666666666
    (/ (* (/ (pow c 4.0) (pow b 6.0)) 6.328125) (/ b (pow a 3.0)))
    (fma
     -0.5
     (/ c b)
     (fma
      -0.375
      (/ a (/ (pow b 3.0) (* c c)))
      (/ (* (pow c 3.0) -0.5625) (/ (pow b 5.0) (* a a))))))))
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) {
	double tmp;
	if (b <= 0.0305) {
		tmp = (sqrt(fma(b, b, (c * (a * -3.0)))) - b) * ((1.0 / a) * 0.3333333333333333);
	} else {
		tmp = fma(-0.16666666666666666, (((pow(c, 4.0) / pow(b, 6.0)) * 6.328125) / (b / pow(a, 3.0))), fma(-0.5, (c / b), fma(-0.375, (a / (pow(b, 3.0) / (c * c))), ((pow(c, 3.0) * -0.5625) / (pow(b, 5.0) / (a * a))))));
	}
	return tmp;
}
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)
	tmp = 0.0
	if (b <= 0.0305)
		tmp = Float64(Float64(sqrt(fma(b, b, Float64(c * Float64(a * -3.0)))) - b) * Float64(Float64(1.0 / a) * 0.3333333333333333));
	else
		tmp = fma(-0.16666666666666666, Float64(Float64(Float64((c ^ 4.0) / (b ^ 6.0)) * 6.328125) / Float64(b / (a ^ 3.0))), fma(-0.5, Float64(c / b), fma(-0.375, Float64(a / Float64((b ^ 3.0) / Float64(c * c))), Float64(Float64((c ^ 3.0) * -0.5625) / Float64((b ^ 5.0) / Float64(a * a))))));
	end
	return tmp
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_] := If[LessEqual[b, 0.0305], N[(N[(N[Sqrt[N[(b * b + N[(c * N[(a * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] * N[(N[(1.0 / a), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision], N[(-0.16666666666666666 * N[(N[(N[(N[Power[c, 4.0], $MachinePrecision] / N[Power[b, 6.0], $MachinePrecision]), $MachinePrecision] * 6.328125), $MachinePrecision] / N[(b / N[Power[a, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-0.5 * N[(c / b), $MachinePrecision] + N[(-0.375 * N[(a / N[(N[Power[b, 3.0], $MachinePrecision] / N[(c * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[Power[c, 3.0], $MachinePrecision] * -0.5625), $MachinePrecision] / N[(N[Power[b, 5.0], $MachinePrecision] / N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}
\begin{array}{l}
\mathbf{if}\;b \leq 0.0305:\\
\;\;\;\;\left(\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)} - b\right) \cdot \left(\frac{1}{a} \cdot 0.3333333333333333\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-0.16666666666666666, \frac{\frac{{c}^{4}}{{b}^{6}} \cdot 6.328125}{\frac{b}{{a}^{3}}}, \mathsf{fma}\left(-0.5, \frac{c}{b}, \mathsf{fma}\left(-0.375, \frac{a}{\frac{{b}^{3}}{c \cdot c}}, \frac{{c}^{3} \cdot -0.5625}{\frac{{b}^{5}}{a \cdot a}}\right)\right)\right)\\


\end{array}

Error

Derivation

  1. Split input into 2 regimes
  2. if b < 0.030499999999999999

    1. Initial program 8.8

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

      \[\leadsto \color{blue}{\left(\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)} - b\right) \cdot \frac{0.3333333333333333}{a}} \]
      Proof
      (*.f64 (-.f64 (sqrt.f64 (fma.f64 b b (*.f64 c (*.f64 a -3)))) b) (/.f64 1/3 a)): 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 3)))))) b) (/.f64 1/3 a)): 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 3)))))) b) (/.f64 1/3 a)): 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 3 a)))))) b) (/.f64 1/3 a)): 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 3 a)))))) b) (/.f64 1/3 a)): 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 3 a) c))))) b) (/.f64 1/3 a)): 0 points increase in error, 0 points decrease in error
      (*.f64 (-.f64 (sqrt.f64 (Rewrite<= fma-neg_binary64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) b) (/.f64 1/3 a)): 19 points increase in error, 8 points decrease in error
      (*.f64 (Rewrite<= unsub-neg_binary64 (+.f64 (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c))) (neg.f64 b))) (/.f64 1/3 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 3 a) c))))) (/.f64 1/3 a)): 0 points increase in error, 0 points decrease in error
      (*.f64 (Rewrite<= /-rgt-identity_binary64 (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) 1)) (/.f64 1/3 a)): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (Rewrite<= metadata-eval (*.f64 -1 -1))) (/.f64 1/3 a)): 0 points increase in error, 0 points decrease in error
      (*.f64 (Rewrite<= associate-/l/_binary64 (/.f64 (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) -1) -1)) (/.f64 1/3 a)): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 (/.f64 (+.f64 (Rewrite=> neg-sub0_binary64 (-.f64 0 b)) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) -1) -1) (/.f64 1/3 a)): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 (/.f64 (Rewrite=> associate-+l-_binary64 (-.f64 0 (-.f64 b (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))))) -1) -1) (/.f64 1/3 a)): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 (/.f64 (Rewrite=> sub0-neg_binary64 (neg.f64 (-.f64 b (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))))) -1) -1) (/.f64 1/3 a)): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 (/.f64 (Rewrite=> neg-mul-1_binary64 (*.f64 -1 (-.f64 b (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))))) -1) -1) (/.f64 1/3 a)): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 (/.f64 (Rewrite=> *-commutative_binary64 (*.f64 (-.f64 b (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) -1)) -1) -1) (/.f64 1/3 a)): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 (Rewrite=> associate-/l*_binary64 (/.f64 (-.f64 b (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (/.f64 -1 -1))) -1) (/.f64 1/3 a)): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 (/.f64 (-.f64 b (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (Rewrite=> metadata-eval 1)) -1) (/.f64 1/3 a)): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 (Rewrite=> /-rgt-identity_binary64 (-.f64 b (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c))))) -1) (/.f64 1/3 a)): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 (-.f64 b (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) -1) (/.f64 (Rewrite<= metadata-eval (/.f64 1 3)) a)): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 (-.f64 b (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) -1) (/.f64 (/.f64 (Rewrite<= metadata-eval (neg.f64 -1)) 3) a)): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 (-.f64 b (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) -1) (Rewrite<= associate-/r*_binary64 (/.f64 (neg.f64 -1) (*.f64 3 a)))): 41 points increase in error, 42 points decrease in error
      (Rewrite<= times-frac_binary64 (/.f64 (*.f64 (-.f64 b (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (neg.f64 -1)) (*.f64 -1 (*.f64 3 a)))): 22 points increase in error, 27 points decrease in error
      (/.f64 (*.f64 (-.f64 b (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (neg.f64 -1)) (Rewrite=> *-commutative_binary64 (*.f64 (*.f64 3 a) -1))): 0 points increase in error, 0 points decrease in error
      (Rewrite=> times-frac_binary64 (*.f64 (/.f64 (-.f64 b (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (*.f64 3 a)) (/.f64 (neg.f64 -1) -1))): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 (-.f64 b (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (*.f64 3 a)) (/.f64 (Rewrite=> metadata-eval 1) -1)): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 (-.f64 b (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (*.f64 3 a)) (Rewrite=> metadata-eval -1)): 0 points increase in error, 0 points decrease in error
      (Rewrite=> associate-*l/_binary64 (/.f64 (*.f64 (-.f64 b (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) -1) (*.f64 3 a))): 0 points increase in error, 0 points decrease in error
      (/.f64 (Rewrite<= *-commutative_binary64 (*.f64 -1 (-.f64 b (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))))) (*.f64 3 a)): 0 points increase in error, 0 points decrease in error
      (/.f64 (Rewrite<= neg-mul-1_binary64 (neg.f64 (-.f64 b (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))))) (*.f64 3 a)): 0 points increase in error, 0 points decrease in error
      (/.f64 (Rewrite<= sub0-neg_binary64 (-.f64 0 (-.f64 b (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))))) (*.f64 3 a)): 0 points increase in error, 0 points decrease in error
      (/.f64 (Rewrite<= associate-+l-_binary64 (+.f64 (-.f64 0 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c))))) (*.f64 3 a)): 0 points increase in error, 0 points decrease in error
      (/.f64 (+.f64 (Rewrite<= neg-sub0_binary64 (neg.f64 b)) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (*.f64 3 a)): 0 points increase in error, 0 points decrease in error
    3. Applied egg-rr8.7

      \[\leadsto \left(\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)} - b\right) \cdot \color{blue}{\left(\frac{1}{a} \cdot 0.3333333333333333\right)} \]

    if 0.030499999999999999 < b

    1. Initial program 30.8

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

      \[\leadsto \color{blue}{\left(\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)} - b\right) \cdot \frac{0.3333333333333333}{a}} \]
      Proof
      (*.f64 (-.f64 (sqrt.f64 (fma.f64 b b (*.f64 c (*.f64 a -3)))) b) (/.f64 1/3 a)): 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 3)))))) b) (/.f64 1/3 a)): 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 3)))))) b) (/.f64 1/3 a)): 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 3 a)))))) b) (/.f64 1/3 a)): 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 3 a)))))) b) (/.f64 1/3 a)): 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 3 a) c))))) b) (/.f64 1/3 a)): 0 points increase in error, 0 points decrease in error
      (*.f64 (-.f64 (sqrt.f64 (Rewrite<= fma-neg_binary64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) b) (/.f64 1/3 a)): 19 points increase in error, 8 points decrease in error
      (*.f64 (Rewrite<= unsub-neg_binary64 (+.f64 (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c))) (neg.f64 b))) (/.f64 1/3 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 3 a) c))))) (/.f64 1/3 a)): 0 points increase in error, 0 points decrease in error
      (*.f64 (Rewrite<= /-rgt-identity_binary64 (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) 1)) (/.f64 1/3 a)): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (Rewrite<= metadata-eval (*.f64 -1 -1))) (/.f64 1/3 a)): 0 points increase in error, 0 points decrease in error
      (*.f64 (Rewrite<= associate-/l/_binary64 (/.f64 (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) -1) -1)) (/.f64 1/3 a)): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 (/.f64 (+.f64 (Rewrite=> neg-sub0_binary64 (-.f64 0 b)) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) -1) -1) (/.f64 1/3 a)): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 (/.f64 (Rewrite=> associate-+l-_binary64 (-.f64 0 (-.f64 b (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))))) -1) -1) (/.f64 1/3 a)): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 (/.f64 (Rewrite=> sub0-neg_binary64 (neg.f64 (-.f64 b (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))))) -1) -1) (/.f64 1/3 a)): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 (/.f64 (Rewrite=> neg-mul-1_binary64 (*.f64 -1 (-.f64 b (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))))) -1) -1) (/.f64 1/3 a)): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 (/.f64 (Rewrite=> *-commutative_binary64 (*.f64 (-.f64 b (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) -1)) -1) -1) (/.f64 1/3 a)): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 (Rewrite=> associate-/l*_binary64 (/.f64 (-.f64 b (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (/.f64 -1 -1))) -1) (/.f64 1/3 a)): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 (/.f64 (-.f64 b (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (Rewrite=> metadata-eval 1)) -1) (/.f64 1/3 a)): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 (Rewrite=> /-rgt-identity_binary64 (-.f64 b (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c))))) -1) (/.f64 1/3 a)): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 (-.f64 b (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) -1) (/.f64 (Rewrite<= metadata-eval (/.f64 1 3)) a)): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 (-.f64 b (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) -1) (/.f64 (/.f64 (Rewrite<= metadata-eval (neg.f64 -1)) 3) a)): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 (-.f64 b (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) -1) (Rewrite<= associate-/r*_binary64 (/.f64 (neg.f64 -1) (*.f64 3 a)))): 41 points increase in error, 42 points decrease in error
      (Rewrite<= times-frac_binary64 (/.f64 (*.f64 (-.f64 b (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (neg.f64 -1)) (*.f64 -1 (*.f64 3 a)))): 22 points increase in error, 27 points decrease in error
      (/.f64 (*.f64 (-.f64 b (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (neg.f64 -1)) (Rewrite=> *-commutative_binary64 (*.f64 (*.f64 3 a) -1))): 0 points increase in error, 0 points decrease in error
      (Rewrite=> times-frac_binary64 (*.f64 (/.f64 (-.f64 b (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (*.f64 3 a)) (/.f64 (neg.f64 -1) -1))): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 (-.f64 b (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (*.f64 3 a)) (/.f64 (Rewrite=> metadata-eval 1) -1)): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 (-.f64 b (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (*.f64 3 a)) (Rewrite=> metadata-eval -1)): 0 points increase in error, 0 points decrease in error
      (Rewrite=> associate-*l/_binary64 (/.f64 (*.f64 (-.f64 b (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) -1) (*.f64 3 a))): 0 points increase in error, 0 points decrease in error
      (/.f64 (Rewrite<= *-commutative_binary64 (*.f64 -1 (-.f64 b (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))))) (*.f64 3 a)): 0 points increase in error, 0 points decrease in error
      (/.f64 (Rewrite<= neg-mul-1_binary64 (neg.f64 (-.f64 b (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))))) (*.f64 3 a)): 0 points increase in error, 0 points decrease in error
      (/.f64 (Rewrite<= sub0-neg_binary64 (-.f64 0 (-.f64 b (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))))) (*.f64 3 a)): 0 points increase in error, 0 points decrease in error
      (/.f64 (Rewrite<= associate-+l-_binary64 (+.f64 (-.f64 0 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c))))) (*.f64 3 a)): 0 points increase in error, 0 points decrease in error
      (/.f64 (+.f64 (Rewrite<= neg-sub0_binary64 (neg.f64 b)) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (*.f64 3 a)): 0 points increase in error, 0 points decrease in error
    3. Applied egg-rr30.8

      \[\leadsto \left(\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)} - b\right) \cdot \color{blue}{\sqrt{\frac{0.1111111111111111}{a \cdot a}}} \]
    4. Applied egg-rr30.8

      \[\leadsto \left(\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)} - b\right) \cdot \sqrt{\color{blue}{\frac{0.1111111111111111}{a} \cdot \frac{1}{a}}} \]
    5. Taylor expanded in a around 0 4.8

      \[\leadsto \color{blue}{-0.16666666666666666 \cdot \frac{{a}^{3} \cdot \left(5.0625 \cdot \frac{{c}^{4}}{{b}^{6}} + {\left(-1.125 \cdot \frac{{c}^{2}}{{b}^{3}}\right)}^{2}\right)}{b} + \left(-0.5625 \cdot \frac{{c}^{3} \cdot {a}^{2}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + -0.375 \cdot \frac{{c}^{2} \cdot a}{{b}^{3}}\right)\right)} \]
    6. Simplified4.8

      \[\leadsto \color{blue}{\mathsf{fma}\left(-0.16666666666666666, \frac{\frac{{c}^{4}}{{b}^{6}} \cdot 6.328125}{\frac{b}{{a}^{3}}}, \mathsf{fma}\left(-0.5, \frac{c}{b}, \mathsf{fma}\left(-0.375, \frac{a}{\frac{{b}^{3}}{c \cdot c}}, \frac{{c}^{3} \cdot -0.5625}{\frac{{b}^{5}}{a \cdot a}}\right)\right)\right)} \]
      Proof
      (fma.f64 -1/6 (/.f64 (*.f64 (/.f64 (pow.f64 c 4) (pow.f64 b 6)) 405/64) (/.f64 b (pow.f64 a 3))) (fma.f64 -1/2 (/.f64 c b) (fma.f64 -3/8 (/.f64 a (/.f64 (pow.f64 b 3) (*.f64 c c))) (/.f64 (*.f64 (pow.f64 c 3) -9/16) (/.f64 (pow.f64 b 5) (*.f64 a a)))))): 0 points increase in error, 0 points decrease in error
      (fma.f64 -1/6 (/.f64 (*.f64 (/.f64 (pow.f64 c 4) (pow.f64 b 6)) (Rewrite<= metadata-eval (+.f64 81/16 81/64))) (/.f64 b (pow.f64 a 3))) (fma.f64 -1/2 (/.f64 c b) (fma.f64 -3/8 (/.f64 a (/.f64 (pow.f64 b 3) (*.f64 c c))) (/.f64 (*.f64 (pow.f64 c 3) -9/16) (/.f64 (pow.f64 b 5) (*.f64 a a)))))): 0 points increase in error, 0 points decrease in error
      (fma.f64 -1/6 (/.f64 (*.f64 (/.f64 (pow.f64 c 4) (pow.f64 b 6)) (+.f64 81/16 (Rewrite<= metadata-eval (*.f64 -9/8 -9/8)))) (/.f64 b (pow.f64 a 3))) (fma.f64 -1/2 (/.f64 c b) (fma.f64 -3/8 (/.f64 a (/.f64 (pow.f64 b 3) (*.f64 c c))) (/.f64 (*.f64 (pow.f64 c 3) -9/16) (/.f64 (pow.f64 b 5) (*.f64 a a)))))): 0 points increase in error, 0 points decrease in error
      (fma.f64 -1/6 (/.f64 (Rewrite<= distribute-rgt-out_binary64 (+.f64 (*.f64 81/16 (/.f64 (pow.f64 c 4) (pow.f64 b 6))) (*.f64 (*.f64 -9/8 -9/8) (/.f64 (pow.f64 c 4) (pow.f64 b 6))))) (/.f64 b (pow.f64 a 3))) (fma.f64 -1/2 (/.f64 c b) (fma.f64 -3/8 (/.f64 a (/.f64 (pow.f64 b 3) (*.f64 c c))) (/.f64 (*.f64 (pow.f64 c 3) -9/16) (/.f64 (pow.f64 b 5) (*.f64 a a)))))): 0 points increase in error, 0 points decrease in error
      (fma.f64 -1/6 (/.f64 (+.f64 (*.f64 81/16 (/.f64 (pow.f64 c 4) (pow.f64 b 6))) (*.f64 (*.f64 -9/8 -9/8) (/.f64 (pow.f64 c (Rewrite<= metadata-eval (*.f64 2 2))) (pow.f64 b 6)))) (/.f64 b (pow.f64 a 3))) (fma.f64 -1/2 (/.f64 c b) (fma.f64 -3/8 (/.f64 a (/.f64 (pow.f64 b 3) (*.f64 c c))) (/.f64 (*.f64 (pow.f64 c 3) -9/16) (/.f64 (pow.f64 b 5) (*.f64 a a)))))): 0 points increase in error, 0 points decrease in error
      (fma.f64 -1/6 (/.f64 (+.f64 (*.f64 81/16 (/.f64 (pow.f64 c 4) (pow.f64 b 6))) (*.f64 (*.f64 -9/8 -9/8) (/.f64 (Rewrite<= pow-sqr_binary64 (*.f64 (pow.f64 c 2) (pow.f64 c 2))) (pow.f64 b 6)))) (/.f64 b (pow.f64 a 3))) (fma.f64 -1/2 (/.f64 c b) (fma.f64 -3/8 (/.f64 a (/.f64 (pow.f64 b 3) (*.f64 c c))) (/.f64 (*.f64 (pow.f64 c 3) -9/16) (/.f64 (pow.f64 b 5) (*.f64 a a)))))): 0 points increase in error, 0 points decrease in error
      (fma.f64 -1/6 (/.f64 (+.f64 (*.f64 81/16 (/.f64 (pow.f64 c 4) (pow.f64 b 6))) (*.f64 (*.f64 -9/8 -9/8) (/.f64 (*.f64 (pow.f64 c 2) (pow.f64 c 2)) (pow.f64 b (Rewrite<= metadata-eval (*.f64 2 3)))))) (/.f64 b (pow.f64 a 3))) (fma.f64 -1/2 (/.f64 c b) (fma.f64 -3/8 (/.f64 a (/.f64 (pow.f64 b 3) (*.f64 c c))) (/.f64 (*.f64 (pow.f64 c 3) -9/16) (/.f64 (pow.f64 b 5) (*.f64 a a)))))): 0 points increase in error, 0 points decrease in error
      (fma.f64 -1/6 (/.f64 (+.f64 (*.f64 81/16 (/.f64 (pow.f64 c 4) (pow.f64 b 6))) (*.f64 (*.f64 -9/8 -9/8) (/.f64 (*.f64 (pow.f64 c 2) (pow.f64 c 2)) (Rewrite<= pow-sqr_binary64 (*.f64 (pow.f64 b 3) (pow.f64 b 3)))))) (/.f64 b (pow.f64 a 3))) (fma.f64 -1/2 (/.f64 c b) (fma.f64 -3/8 (/.f64 a (/.f64 (pow.f64 b 3) (*.f64 c c))) (/.f64 (*.f64 (pow.f64 c 3) -9/16) (/.f64 (pow.f64 b 5) (*.f64 a a)))))): 0 points increase in error, 0 points decrease in error
      (fma.f64 -1/6 (/.f64 (+.f64 (*.f64 81/16 (/.f64 (pow.f64 c 4) (pow.f64 b 6))) (*.f64 (*.f64 -9/8 -9/8) (Rewrite=> times-frac_binary64 (*.f64 (/.f64 (pow.f64 c 2) (pow.f64 b 3)) (/.f64 (pow.f64 c 2) (pow.f64 b 3)))))) (/.f64 b (pow.f64 a 3))) (fma.f64 -1/2 (/.f64 c b) (fma.f64 -3/8 (/.f64 a (/.f64 (pow.f64 b 3) (*.f64 c c))) (/.f64 (*.f64 (pow.f64 c 3) -9/16) (/.f64 (pow.f64 b 5) (*.f64 a a)))))): 0 points increase in error, 0 points decrease in error
      (fma.f64 -1/6 (/.f64 (+.f64 (*.f64 81/16 (/.f64 (pow.f64 c 4) (pow.f64 b 6))) (Rewrite<= swap-sqr_binary64 (*.f64 (*.f64 -9/8 (/.f64 (pow.f64 c 2) (pow.f64 b 3))) (*.f64 -9/8 (/.f64 (pow.f64 c 2) (pow.f64 b 3)))))) (/.f64 b (pow.f64 a 3))) (fma.f64 -1/2 (/.f64 c b) (fma.f64 -3/8 (/.f64 a (/.f64 (pow.f64 b 3) (*.f64 c c))) (/.f64 (*.f64 (pow.f64 c 3) -9/16) (/.f64 (pow.f64 b 5) (*.f64 a a)))))): 0 points increase in error, 0 points decrease in error
      (fma.f64 -1/6 (/.f64 (+.f64 (*.f64 81/16 (/.f64 (pow.f64 c 4) (pow.f64 b 6))) (Rewrite<= unpow2_binary64 (pow.f64 (*.f64 -9/8 (/.f64 (pow.f64 c 2) (pow.f64 b 3))) 2))) (/.f64 b (pow.f64 a 3))) (fma.f64 -1/2 (/.f64 c b) (fma.f64 -3/8 (/.f64 a (/.f64 (pow.f64 b 3) (*.f64 c c))) (/.f64 (*.f64 (pow.f64 c 3) -9/16) (/.f64 (pow.f64 b 5) (*.f64 a a)))))): 0 points increase in error, 0 points decrease in error
      (fma.f64 -1/6 (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 (+.f64 (*.f64 81/16 (/.f64 (pow.f64 c 4) (pow.f64 b 6))) (pow.f64 (*.f64 -9/8 (/.f64 (pow.f64 c 2) (pow.f64 b 3))) 2)) (pow.f64 a 3)) b)) (fma.f64 -1/2 (/.f64 c b) (fma.f64 -3/8 (/.f64 a (/.f64 (pow.f64 b 3) (*.f64 c c))) (/.f64 (*.f64 (pow.f64 c 3) -9/16) (/.f64 (pow.f64 b 5) (*.f64 a a)))))): 0 points increase in error, 0 points decrease in error
      (fma.f64 -1/6 (/.f64 (Rewrite<= *-commutative_binary64 (*.f64 (pow.f64 a 3) (+.f64 (*.f64 81/16 (/.f64 (pow.f64 c 4) (pow.f64 b 6))) (pow.f64 (*.f64 -9/8 (/.f64 (pow.f64 c 2) (pow.f64 b 3))) 2)))) b) (fma.f64 -1/2 (/.f64 c b) (fma.f64 -3/8 (/.f64 a (/.f64 (pow.f64 b 3) (*.f64 c c))) (/.f64 (*.f64 (pow.f64 c 3) -9/16) (/.f64 (pow.f64 b 5) (*.f64 a a)))))): 0 points increase in error, 0 points decrease in error
      (fma.f64 -1/6 (/.f64 (*.f64 (pow.f64 a 3) (+.f64 (*.f64 81/16 (/.f64 (pow.f64 c 4) (pow.f64 b 6))) (pow.f64 (*.f64 -9/8 (/.f64 (pow.f64 c 2) (pow.f64 b 3))) 2))) b) (fma.f64 -1/2 (/.f64 c b) (fma.f64 -3/8 (/.f64 a (/.f64 (pow.f64 b 3) (Rewrite<= unpow2_binary64 (pow.f64 c 2)))) (/.f64 (*.f64 (pow.f64 c 3) -9/16) (/.f64 (pow.f64 b 5) (*.f64 a a)))))): 0 points increase in error, 0 points decrease in error
      (fma.f64 -1/6 (/.f64 (*.f64 (pow.f64 a 3) (+.f64 (*.f64 81/16 (/.f64 (pow.f64 c 4) (pow.f64 b 6))) (pow.f64 (*.f64 -9/8 (/.f64 (pow.f64 c 2) (pow.f64 b 3))) 2))) b) (fma.f64 -1/2 (/.f64 c b) (fma.f64 -3/8 (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 a (pow.f64 c 2)) (pow.f64 b 3))) (/.f64 (*.f64 (pow.f64 c 3) -9/16) (/.f64 (pow.f64 b 5) (*.f64 a a)))))): 0 points increase in error, 0 points decrease in error
      (fma.f64 -1/6 (/.f64 (*.f64 (pow.f64 a 3) (+.f64 (*.f64 81/16 (/.f64 (pow.f64 c 4) (pow.f64 b 6))) (pow.f64 (*.f64 -9/8 (/.f64 (pow.f64 c 2) (pow.f64 b 3))) 2))) b) (fma.f64 -1/2 (/.f64 c b) (fma.f64 -3/8 (/.f64 (Rewrite<= *-commutative_binary64 (*.f64 (pow.f64 c 2) a)) (pow.f64 b 3)) (/.f64 (*.f64 (pow.f64 c 3) -9/16) (/.f64 (pow.f64 b 5) (*.f64 a a)))))): 0 points increase in error, 0 points decrease in error
      (fma.f64 -1/6 (/.f64 (*.f64 (pow.f64 a 3) (+.f64 (*.f64 81/16 (/.f64 (pow.f64 c 4) (pow.f64 b 6))) (pow.f64 (*.f64 -9/8 (/.f64 (pow.f64 c 2) (pow.f64 b 3))) 2))) b) (fma.f64 -1/2 (/.f64 c b) (fma.f64 -3/8 (/.f64 (*.f64 (pow.f64 c 2) a) (pow.f64 b 3)) (/.f64 (*.f64 (pow.f64 c 3) -9/16) (/.f64 (pow.f64 b 5) (Rewrite<= unpow2_binary64 (pow.f64 a 2))))))): 0 points increase in error, 0 points decrease in error
      (fma.f64 -1/6 (/.f64 (*.f64 (pow.f64 a 3) (+.f64 (*.f64 81/16 (/.f64 (pow.f64 c 4) (pow.f64 b 6))) (pow.f64 (*.f64 -9/8 (/.f64 (pow.f64 c 2) (pow.f64 b 3))) 2))) b) (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 (pow.f64 c 3) (/.f64 (pow.f64 b 5) (pow.f64 a 2))) -9/16))))): 0 points increase in error, 0 points decrease in error
      (fma.f64 -1/6 (/.f64 (*.f64 (pow.f64 a 3) (+.f64 (*.f64 81/16 (/.f64 (pow.f64 c 4) (pow.f64 b 6))) (pow.f64 (*.f64 -9/8 (/.f64 (pow.f64 c 2) (pow.f64 b 3))) 2))) b) (fma.f64 -1/2 (/.f64 c b) (fma.f64 -3/8 (/.f64 (*.f64 (pow.f64 c 2) a) (pow.f64 b 3)) (*.f64 (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 (pow.f64 c 3) (pow.f64 a 2)) (pow.f64 b 5))) -9/16)))): 0 points increase in error, 0 points decrease in error
      (fma.f64 -1/6 (/.f64 (*.f64 (pow.f64 a 3) (+.f64 (*.f64 81/16 (/.f64 (pow.f64 c 4) (pow.f64 b 6))) (pow.f64 (*.f64 -9/8 (/.f64 (pow.f64 c 2) (pow.f64 b 3))) 2))) b) (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 -9/16 (/.f64 (*.f64 (pow.f64 c 3) (pow.f64 a 2)) (pow.f64 b 5))))))): 0 points increase in error, 0 points decrease in error
      (fma.f64 -1/6 (/.f64 (*.f64 (pow.f64 a 3) (+.f64 (*.f64 81/16 (/.f64 (pow.f64 c 4) (pow.f64 b 6))) (pow.f64 (*.f64 -9/8 (/.f64 (pow.f64 c 2) (pow.f64 b 3))) 2))) b) (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 -9/16 (/.f64 (*.f64 (pow.f64 c 3) (pow.f64 a 2)) (pow.f64 b 5))))))): 0 points increase in error, 0 points decrease in error
      (fma.f64 -1/6 (/.f64 (*.f64 (pow.f64 a 3) (+.f64 (*.f64 81/16 (/.f64 (pow.f64 c 4) (pow.f64 b 6))) (pow.f64 (*.f64 -9/8 (/.f64 (pow.f64 c 2) (pow.f64 b 3))) 2))) b) (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 -9/16 (/.f64 (*.f64 (pow.f64 c 3) (pow.f64 a 2)) (pow.f64 b 5))))))): 0 points increase in error, 0 points decrease in error
      (fma.f64 -1/6 (/.f64 (*.f64 (pow.f64 a 3) (+.f64 (*.f64 81/16 (/.f64 (pow.f64 c 4) (pow.f64 b 6))) (pow.f64 (*.f64 -9/8 (/.f64 (pow.f64 c 2) (pow.f64 b 3))) 2))) b) (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 -9/16 (/.f64 (*.f64 (pow.f64 c 3) (pow.f64 a 2)) (pow.f64 b 5)))))): 19 points increase in error, 12 points decrease in error
      (fma.f64 -1/6 (/.f64 (*.f64 (pow.f64 a 3) (+.f64 (*.f64 81/16 (/.f64 (pow.f64 c 4) (pow.f64 b 6))) (pow.f64 (*.f64 -9/8 (/.f64 (pow.f64 c 2) (pow.f64 b 3))) 2))) b) (Rewrite<= +-commutative_binary64 (+.f64 (*.f64 -9/16 (/.f64 (*.f64 (pow.f64 c 3) (pow.f64 a 2)) (pow.f64 b 5))) (+.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 -1/6 (/.f64 (*.f64 (pow.f64 a 3) (+.f64 (*.f64 81/16 (/.f64 (pow.f64 c 4) (pow.f64 b 6))) (pow.f64 (*.f64 -9/8 (/.f64 (pow.f64 c 2) (pow.f64 b 3))) 2))) b)) (+.f64 (*.f64 -9/16 (/.f64 (*.f64 (pow.f64 c 3) (pow.f64 a 2)) (pow.f64 b 5))) (+.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
  3. Recombined 2 regimes into one program.
  4. Final simplification5.1

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 0.0305:\\ \;\;\;\;\left(\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)} - b\right) \cdot \left(\frac{1}{a} \cdot 0.3333333333333333\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-0.16666666666666666, \frac{\frac{{c}^{4}}{{b}^{6}} \cdot 6.328125}{\frac{b}{{a}^{3}}}, \mathsf{fma}\left(-0.5, \frac{c}{b}, \mathsf{fma}\left(-0.375, \frac{a}{\frac{{b}^{3}}{c \cdot c}}, \frac{{c}^{3} \cdot -0.5625}{\frac{{b}^{5}}{a \cdot a}}\right)\right)\right)\\ \end{array} \]

Alternatives

Alternative 1
Error9.9
Cost48780
\[\begin{array}{l} t_0 := c \cdot \left(a \cdot -3\right)\\ t_1 := \sqrt{\mathsf{fma}\left(b, b, t_0\right)} - b\\ t_2 := \frac{\sqrt{b \cdot b + t_0} - b}{a \cdot 3}\\ t_3 := \mathsf{fma}\left(-0.375, a \cdot \frac{c \cdot c}{{b}^{3}}, -0.5 \cdot \frac{c}{b}\right)\\ \mathbf{if}\;t_2 \leq -2.5:\\ \;\;\;\;t_1 \cdot \left(\frac{1}{a} \cdot 0.3333333333333333\right)\\ \mathbf{elif}\;t_2 \leq -0.03:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t_2 \leq -0.002:\\ \;\;\;\;t_1 \cdot \sqrt[3]{{\left(\frac{0.3333333333333333}{a}\right)}^{3}}\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 2
Error5.1
Cost47428
\[\begin{array}{l} \mathbf{if}\;b \leq 0.0305:\\ \;\;\;\;\left(\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)} - b\right) \cdot \left(\frac{1}{a} \cdot 0.3333333333333333\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-0.5, \frac{c}{b}, \mathsf{fma}\left(\frac{-0.16666666666666666}{a}, \frac{6.328125 \cdot {\left(c \cdot a\right)}^{4}}{{b}^{7}}, \mathsf{fma}\left(-0.5625, c \cdot \left(\left(c \cdot c\right) \cdot \frac{a}{\frac{{b}^{5}}{a}}\right), \frac{-0.375 \cdot \left(c \cdot c\right)}{\frac{{b}^{3}}{a}}\right)\right)\right)\\ \end{array} \]
Alternative 3
Error9.9
Cost35980
\[\begin{array}{l} t_0 := c \cdot \left(a \cdot -3\right)\\ t_1 := \sqrt{\mathsf{fma}\left(b, b, t_0\right)} - b\\ t_2 := \frac{\sqrt{b \cdot b + t_0} - b}{a \cdot 3}\\ t_3 := \mathsf{fma}\left(-0.375, a \cdot \frac{c \cdot c}{{b}^{3}}, -0.5 \cdot \frac{c}{b}\right)\\ \mathbf{if}\;t_2 \leq -2.5:\\ \;\;\;\;t_1 \cdot \frac{0.3333333333333333}{a}\\ \mathbf{elif}\;t_2 \leq -0.03:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t_2 \leq -0.002:\\ \;\;\;\;\frac{t_1}{a \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 4
Error9.9
Cost35980
\[\begin{array}{l} t_0 := c \cdot \left(a \cdot -3\right)\\ t_1 := \sqrt{\mathsf{fma}\left(b, b, t_0\right)} - b\\ t_2 := \frac{\sqrt{b \cdot b + t_0} - b}{a \cdot 3}\\ t_3 := \mathsf{fma}\left(-0.375, a \cdot \frac{c \cdot c}{{b}^{3}}, -0.5 \cdot \frac{c}{b}\right)\\ \mathbf{if}\;t_2 \leq -2.5:\\ \;\;\;\;t_1 \cdot \left(\frac{1}{a} \cdot 0.3333333333333333\right)\\ \mathbf{elif}\;t_2 \leq -0.03:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t_2 \leq -0.002:\\ \;\;\;\;\frac{t_1}{a \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 5
Error6.6
Cost33668
\[\begin{array}{l} \mathbf{if}\;b \leq 0.095:\\ \;\;\;\;\left(\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)} - b\right) \cdot \left(\frac{1}{a} \cdot 0.3333333333333333\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-0.5, \frac{c}{b}, \mathsf{fma}\left(-0.5625, \frac{a \cdot a}{\frac{{b}^{5}}{{c}^{3}}}, \frac{-0.375 \cdot \left(c \cdot c\right)}{\frac{{b}^{3}}{a}}\right)\right)\\ \end{array} \]
Alternative 6
Error6.7
Cost27460
\[\begin{array}{l} \mathbf{if}\;b \leq 0.095:\\ \;\;\;\;\left(\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -3\right)\right)} - b\right) \cdot \left(\frac{1}{a} \cdot 0.3333333333333333\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-0.5625, \left(c \cdot c\right) \cdot \left(c \cdot \frac{a \cdot a}{{b}^{5}}\right), \mathsf{fma}\left(-0.5, \frac{c}{b}, -0.375 \cdot \frac{c \cdot c}{\frac{{b}^{3}}{a}}\right)\right)\\ \end{array} \]
Alternative 7
Error14.7
Cost21060
\[\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.822 \cdot 10^{-6}:\\ \;\;\;\;\left(\sqrt{\mathsf{fma}\left(b, b, t_0\right)} - b\right) \cdot \frac{0.3333333333333333}{a}\\ \mathbf{else}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b}\\ \end{array} \]
Alternative 8
Error14.8
Cost14788
\[\begin{array}{l} t_0 := \sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} - b\\ \mathbf{if}\;\frac{t_0}{a \cdot 3} \leq -5.822 \cdot 10^{-6}:\\ \;\;\;\;\frac{0.3333333333333333}{a} \cdot t_0\\ \mathbf{else}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b}\\ \end{array} \]
Alternative 9
Error22.5
Cost320
\[-0.5 \cdot \frac{c}{b} \]
Alternative 10
Error62.0
Cost64
\[0 \]

Error

Reproduce

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