?

Average Error: 28.4 → 5.0
Time: 15.0s
Precision: binary64
Cost: 72580

?

\[\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} t_0 := \sqrt{b \cdot b + \left(a \cdot c\right) \cdot -3} - b\\ t_1 := \sqrt{b \cdot b + a \cdot \left(c \cdot -3\right)}\\ t_2 := b - t_1\\ t_3 := t_2 \cdot \frac{1}{t_2}\\ t_4 := t_1 - b\\ \mathbf{if}\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \leq -25:\\ \;\;\;\;\frac{t_0 \cdot \left(\left(t_4 \cdot \left(t_3 \cdot \left(t_4 \cdot \frac{t_3}{t_4}\right)\right)\right) \cdot \frac{1}{t_0}\right)}{3 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b} + \left(-1.0546875 \cdot \frac{{c}^{4} \cdot {a}^{3}}{{b}^{7}} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + -0.5625 \cdot \frac{{c}^{3} \cdot {a}^{2}}{{b}^{5}}\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
 (let* ((t_0 (- (sqrt (+ (* b b) (* (* a c) -3.0))) b))
        (t_1 (sqrt (+ (* b b) (* a (* c -3.0)))))
        (t_2 (- b t_1))
        (t_3 (* t_2 (/ 1.0 t_2)))
        (t_4 (- t_1 b)))
   (if (<= (/ (+ (- b) (sqrt (- (* b b) (* (* 3.0 a) c)))) (* 3.0 a)) -25.0)
     (/ (* t_0 (* (* t_4 (* t_3 (* t_4 (/ t_3 t_4)))) (/ 1.0 t_0))) (* 3.0 a))
     (+
      (* -0.5 (/ c b))
      (+
       (* -1.0546875 (/ (* (pow c 4.0) (pow a 3.0)) (pow b 7.0)))
       (+
        (* -0.375 (/ (* a (pow c 2.0)) (pow b 3.0)))
        (* -0.5625 (/ (* (pow c 3.0) (pow a 2.0)) (pow b 5.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) {
	double t_0 = sqrt(((b * b) + ((a * c) * -3.0))) - b;
	double t_1 = sqrt(((b * b) + (a * (c * -3.0))));
	double t_2 = b - t_1;
	double t_3 = t_2 * (1.0 / t_2);
	double t_4 = t_1 - b;
	double tmp;
	if (((-b + sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a)) <= -25.0) {
		tmp = (t_0 * ((t_4 * (t_3 * (t_4 * (t_3 / t_4)))) * (1.0 / t_0))) / (3.0 * a);
	} else {
		tmp = (-0.5 * (c / b)) + ((-1.0546875 * ((pow(c, 4.0) * pow(a, 3.0)) / pow(b, 7.0))) + ((-0.375 * ((a * pow(c, 2.0)) / pow(b, 3.0))) + (-0.5625 * ((pow(c, 3.0) * pow(a, 2.0)) / pow(b, 5.0)))));
	}
	return tmp;
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    code = (-b + sqrt(((b * b) - ((3.0d0 * a) * c)))) / (3.0d0 * a)
end function
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: t_4
    real(8) :: tmp
    t_0 = sqrt(((b * b) + ((a * c) * (-3.0d0)))) - b
    t_1 = sqrt(((b * b) + (a * (c * (-3.0d0)))))
    t_2 = b - t_1
    t_3 = t_2 * (1.0d0 / t_2)
    t_4 = t_1 - b
    if (((-b + sqrt(((b * b) - ((3.0d0 * a) * c)))) / (3.0d0 * a)) <= (-25.0d0)) then
        tmp = (t_0 * ((t_4 * (t_3 * (t_4 * (t_3 / t_4)))) * (1.0d0 / t_0))) / (3.0d0 * a)
    else
        tmp = ((-0.5d0) * (c / b)) + (((-1.0546875d0) * (((c ** 4.0d0) * (a ** 3.0d0)) / (b ** 7.0d0))) + (((-0.375d0) * ((a * (c ** 2.0d0)) / (b ** 3.0d0))) + ((-0.5625d0) * (((c ** 3.0d0) * (a ** 2.0d0)) / (b ** 5.0d0)))))
    end if
    code = tmp
end function
public static double code(double a, double b, double c) {
	return (-b + Math.sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a);
}
public static double code(double a, double b, double c) {
	double t_0 = Math.sqrt(((b * b) + ((a * c) * -3.0))) - b;
	double t_1 = Math.sqrt(((b * b) + (a * (c * -3.0))));
	double t_2 = b - t_1;
	double t_3 = t_2 * (1.0 / t_2);
	double t_4 = t_1 - b;
	double tmp;
	if (((-b + Math.sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a)) <= -25.0) {
		tmp = (t_0 * ((t_4 * (t_3 * (t_4 * (t_3 / t_4)))) * (1.0 / t_0))) / (3.0 * a);
	} else {
		tmp = (-0.5 * (c / b)) + ((-1.0546875 * ((Math.pow(c, 4.0) * Math.pow(a, 3.0)) / Math.pow(b, 7.0))) + ((-0.375 * ((a * Math.pow(c, 2.0)) / Math.pow(b, 3.0))) + (-0.5625 * ((Math.pow(c, 3.0) * Math.pow(a, 2.0)) / Math.pow(b, 5.0)))));
	}
	return tmp;
}
def code(a, b, c):
	return (-b + math.sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a)
def code(a, b, c):
	t_0 = math.sqrt(((b * b) + ((a * c) * -3.0))) - b
	t_1 = math.sqrt(((b * b) + (a * (c * -3.0))))
	t_2 = b - t_1
	t_3 = t_2 * (1.0 / t_2)
	t_4 = t_1 - b
	tmp = 0
	if ((-b + math.sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a)) <= -25.0:
		tmp = (t_0 * ((t_4 * (t_3 * (t_4 * (t_3 / t_4)))) * (1.0 / t_0))) / (3.0 * a)
	else:
		tmp = (-0.5 * (c / b)) + ((-1.0546875 * ((math.pow(c, 4.0) * math.pow(a, 3.0)) / math.pow(b, 7.0))) + ((-0.375 * ((a * math.pow(c, 2.0)) / math.pow(b, 3.0))) + (-0.5625 * ((math.pow(c, 3.0) * math.pow(a, 2.0)) / math.pow(b, 5.0)))))
	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)
	t_0 = Float64(sqrt(Float64(Float64(b * b) + Float64(Float64(a * c) * -3.0))) - b)
	t_1 = sqrt(Float64(Float64(b * b) + Float64(a * Float64(c * -3.0))))
	t_2 = Float64(b - t_1)
	t_3 = Float64(t_2 * Float64(1.0 / t_2))
	t_4 = Float64(t_1 - b)
	tmp = 0.0
	if (Float64(Float64(Float64(-b) + sqrt(Float64(Float64(b * b) - Float64(Float64(3.0 * a) * c)))) / Float64(3.0 * a)) <= -25.0)
		tmp = Float64(Float64(t_0 * Float64(Float64(t_4 * Float64(t_3 * Float64(t_4 * Float64(t_3 / t_4)))) * Float64(1.0 / t_0))) / Float64(3.0 * a));
	else
		tmp = Float64(Float64(-0.5 * Float64(c / b)) + Float64(Float64(-1.0546875 * Float64(Float64((c ^ 4.0) * (a ^ 3.0)) / (b ^ 7.0))) + Float64(Float64(-0.375 * Float64(Float64(a * (c ^ 2.0)) / (b ^ 3.0))) + Float64(-0.5625 * Float64(Float64((c ^ 3.0) * (a ^ 2.0)) / (b ^ 5.0))))));
	end
	return tmp
end
function tmp = code(a, b, c)
	tmp = (-b + sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a);
end
function tmp_2 = code(a, b, c)
	t_0 = sqrt(((b * b) + ((a * c) * -3.0))) - b;
	t_1 = sqrt(((b * b) + (a * (c * -3.0))));
	t_2 = b - t_1;
	t_3 = t_2 * (1.0 / t_2);
	t_4 = t_1 - b;
	tmp = 0.0;
	if (((-b + sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a)) <= -25.0)
		tmp = (t_0 * ((t_4 * (t_3 * (t_4 * (t_3 / t_4)))) * (1.0 / t_0))) / (3.0 * a);
	else
		tmp = (-0.5 * (c / b)) + ((-1.0546875 * (((c ^ 4.0) * (a ^ 3.0)) / (b ^ 7.0))) + ((-0.375 * ((a * (c ^ 2.0)) / (b ^ 3.0))) + (-0.5625 * (((c ^ 3.0) * (a ^ 2.0)) / (b ^ 5.0)))));
	end
	tmp_2 = 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_] := Block[{t$95$0 = N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] + N[(N[(a * c), $MachinePrecision] * -3.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(N[(b * b), $MachinePrecision] + N[(a * N[(c * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(b - t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * N[(1.0 / t$95$2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$1 - b), $MachinePrecision]}, If[LessEqual[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], -25.0], N[(N[(t$95$0 * N[(N[(t$95$4 * N[(t$95$3 * N[(t$95$4 * N[(t$95$3 / t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision], N[(N[(-0.5 * N[(c / b), $MachinePrecision]), $MachinePrecision] + N[(N[(-1.0546875 * N[(N[(N[Power[c, 4.0], $MachinePrecision] * N[Power[a, 3.0], $MachinePrecision]), $MachinePrecision] / N[Power[b, 7.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(-0.375 * N[(N[(a * N[Power[c, 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[b, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-0.5625 * N[(N[(N[Power[c, 3.0], $MachinePrecision] * N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[b, 5.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}
\begin{array}{l}
t_0 := \sqrt{b \cdot b + \left(a \cdot c\right) \cdot -3} - b\\
t_1 := \sqrt{b \cdot b + a \cdot \left(c \cdot -3\right)}\\
t_2 := b - t_1\\
t_3 := t_2 \cdot \frac{1}{t_2}\\
t_4 := t_1 - b\\
\mathbf{if}\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \leq -25:\\
\;\;\;\;\frac{t_0 \cdot \left(\left(t_4 \cdot \left(t_3 \cdot \left(t_4 \cdot \frac{t_3}{t_4}\right)\right)\right) \cdot \frac{1}{t_0}\right)}{3 \cdot a}\\

\mathbf{else}:\\
\;\;\;\;-0.5 \cdot \frac{c}{b} + \left(-1.0546875 \cdot \frac{{c}^{4} \cdot {a}^{3}}{{b}^{7}} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + -0.5625 \cdot \frac{{c}^{3} \cdot {a}^{2}}{{b}^{5}}\right)\right)\\


\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Split input into 2 regimes
  2. if (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (*.f64 3 a)) < -25

    1. Initial program 8.3

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

      \[\leadsto \color{blue}{\frac{\sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)} - b}{3 \cdot a}} \]
      Proof

      [Start]8.3

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

      rational_best_oopsla_all_46_json_45_simplify-35 [=>]8.3

      \[ \frac{\color{blue}{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} + \left(-b\right)}}{3 \cdot a} \]

      rational_best_oopsla_all_46_json_45_simplify-97 [=>]8.3

      \[ \frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} + \color{blue}{\left(0 - b\right)}}{3 \cdot a} \]

      rational_best_oopsla_all_46_json_45_simplify-108 [=>]8.3

      \[ \frac{\color{blue}{\left(0 + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right) - b}}{3 \cdot a} \]

      rational_best_oopsla_all_46_json_45_simplify-35 [=>]8.3

      \[ \frac{\color{blue}{\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} + 0\right)} - b}{3 \cdot a} \]

      rational_best_oopsla_all_46_json_45_simplify-85 [=>]8.3

      \[ \frac{\color{blue}{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}} - b}{3 \cdot a} \]

      rational_best_oopsla_all_46_json_45_simplify-74 [=>]8.3

      \[ \frac{\sqrt{b \cdot b - \color{blue}{c \cdot \left(3 \cdot a\right)}} - b}{3 \cdot a} \]

      rational_best_oopsla_all_46_json_45_simplify-7 [=>]8.3

      \[ \frac{\sqrt{b \cdot b - \color{blue}{3 \cdot \left(c \cdot a\right)}} - b}{3 \cdot a} \]

      rational_best_oopsla_all_46_json_45_simplify-74 [=>]8.3

      \[ \frac{\sqrt{b \cdot b - 3 \cdot \color{blue}{\left(a \cdot c\right)}} - b}{3 \cdot a} \]
    3. Applied egg-rr8.3

      \[\leadsto \frac{\color{blue}{\left(\sqrt{b \cdot b + \left(a \cdot c\right) \cdot -3} - b\right) \cdot \left(\left(\sqrt{b \cdot b + \left(a \cdot c\right) \cdot -3} - b\right) \cdot \frac{1}{\sqrt{b \cdot b + \left(a \cdot c\right) \cdot -3} - b}\right)}}{3 \cdot a} \]
    4. Applied egg-rr8.3

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

    if -25 < (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 3 a) c)))) (*.f64 3 a))

    1. Initial program 30.1

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

      \[\leadsto \color{blue}{\frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b}{3 \cdot a}} \]
      Proof

      [Start]30.1

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

      rational_best_oopsla_all_46_json_45_simplify-35 [=>]30.1

      \[ \frac{\color{blue}{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} + \left(-b\right)}}{3 \cdot a} \]

      rational_best_oopsla_all_46_json_45_simplify-97 [=>]30.1

      \[ \frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} + \color{blue}{\left(0 - b\right)}}{3 \cdot a} \]

      rational_best_oopsla_all_46_json_45_simplify-108 [=>]30.1

      \[ \frac{\color{blue}{\left(0 + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right) - b}}{3 \cdot a} \]

      rational_best_oopsla_all_46_json_45_simplify-35 [=>]30.1

      \[ \frac{\color{blue}{\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} + 0\right)} - b}{3 \cdot a} \]

      rational_best_oopsla_all_46_json_45_simplify-85 [=>]30.1

      \[ \frac{\color{blue}{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}} - b}{3 \cdot a} \]
    3. Taylor expanded in b around inf 4.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)} \]
    4. Simplified4.7

      \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b} + \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.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + -0.5625 \cdot \frac{{c}^{3} \cdot {a}^{2}}{{b}^{5}}\right)\right)} \]
      Proof

      [Start]4.8

      \[ -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) \]

      rational_best_oopsla_all_46_json_45_simplify-82 [=>]4.8

      \[ \color{blue}{-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.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)} \]

      rational_best_oopsla_all_46_json_45_simplify-82 [=>]4.7

      \[ -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}} + \color{blue}{\left(-0.5 \cdot \frac{c}{b} + \left(-0.5625 \cdot \frac{{c}^{3} \cdot {a}^{2}}{{b}^{5}} + -0.375 \cdot \frac{{c}^{2} \cdot a}{{b}^{3}}\right)\right)} \]

      rational_best_oopsla_all_46_json_45_simplify-82 [=>]4.7

      \[ \color{blue}{-0.5 \cdot \frac{c}{b} + \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.5625 \cdot \frac{{c}^{3} \cdot {a}^{2}}{{b}^{5}} + -0.375 \cdot \frac{{c}^{2} \cdot a}{{b}^{3}}\right)\right)} \]
    5. Taylor expanded in a around 0 4.7

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

      \[\leadsto -0.5 \cdot \frac{c}{b} + \left(\color{blue}{-0.16666666666666666 \cdot \frac{\left({c}^{4} \cdot 6.328125\right) \cdot {a}^{3}}{{b}^{7}}} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + -0.5625 \cdot \frac{{c}^{3} \cdot {a}^{2}}{{b}^{5}}\right)\right) \]
      Proof

      [Start]4.7

      \[ -0.5 \cdot \frac{c}{b} + \left(-0.16666666666666666 \cdot \frac{\left(5.0625 \cdot {c}^{4} + 1.265625 \cdot {c}^{4}\right) \cdot {a}^{3}}{{b}^{7}} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + -0.5625 \cdot \frac{{c}^{3} \cdot {a}^{2}}{{b}^{5}}\right)\right) \]

      rational_best_oopsla_all_46_json_45_simplify-74 [=>]4.7

      \[ -0.5 \cdot \frac{c}{b} + \left(-0.16666666666666666 \cdot \frac{\left(5.0625 \cdot {c}^{4} + \color{blue}{{c}^{4} \cdot 1.265625}\right) \cdot {a}^{3}}{{b}^{7}} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + -0.5625 \cdot \frac{{c}^{3} \cdot {a}^{2}}{{b}^{5}}\right)\right) \]

      rational_best_oopsla_all_46_json_45_simplify-23 [=>]4.7

      \[ -0.5 \cdot \frac{c}{b} + \left(-0.16666666666666666 \cdot \frac{\color{blue}{\left({c}^{4} \cdot \left(5.0625 + 1.265625\right)\right)} \cdot {a}^{3}}{{b}^{7}} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + -0.5625 \cdot \frac{{c}^{3} \cdot {a}^{2}}{{b}^{5}}\right)\right) \]

      metadata-eval [=>]4.7

      \[ -0.5 \cdot \frac{c}{b} + \left(-0.16666666666666666 \cdot \frac{\left({c}^{4} \cdot \color{blue}{6.328125}\right) \cdot {a}^{3}}{{b}^{7}} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + -0.5625 \cdot \frac{{c}^{3} \cdot {a}^{2}}{{b}^{5}}\right)\right) \]
    7. Taylor expanded in c around 0 4.7

      \[\leadsto -0.5 \cdot \frac{c}{b} + \left(\color{blue}{-1.0546875 \cdot \frac{{c}^{4} \cdot {a}^{3}}{{b}^{7}}} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + -0.5625 \cdot \frac{{c}^{3} \cdot {a}^{2}}{{b}^{5}}\right)\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification5.0

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \leq -25:\\ \;\;\;\;\frac{\left(\sqrt{b \cdot b + \left(a \cdot c\right) \cdot -3} - b\right) \cdot \left(\left(\left(\sqrt{b \cdot b + a \cdot \left(c \cdot -3\right)} - b\right) \cdot \left(\left(\left(b - \sqrt{b \cdot b + a \cdot \left(c \cdot -3\right)}\right) \cdot \frac{1}{b - \sqrt{b \cdot b + a \cdot \left(c \cdot -3\right)}}\right) \cdot \left(\left(\sqrt{b \cdot b + a \cdot \left(c \cdot -3\right)} - b\right) \cdot \frac{\left(b - \sqrt{b \cdot b + a \cdot \left(c \cdot -3\right)}\right) \cdot \frac{1}{b - \sqrt{b \cdot b + a \cdot \left(c \cdot -3\right)}}}{\sqrt{b \cdot b + a \cdot \left(c \cdot -3\right)} - b}\right)\right)\right) \cdot \frac{1}{\sqrt{b \cdot b + \left(a \cdot c\right) \cdot -3} - b}\right)}{3 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b} + \left(-1.0546875 \cdot \frac{{c}^{4} \cdot {a}^{3}}{{b}^{7}} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + -0.5625 \cdot \frac{{c}^{3} \cdot {a}^{2}}{{b}^{5}}\right)\right)\\ \end{array} \]

Alternatives

Alternative 1
Error5.0
Cost61060
\[\begin{array}{l} t_0 := \sqrt{b \cdot b + \left(a \cdot c\right) \cdot -3} - b\\ \mathbf{if}\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \leq -25:\\ \;\;\;\;\frac{t_0 \cdot \left(t_0 \cdot \frac{1}{t_0}\right)}{3 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;-0.5625 \cdot \frac{{c}^{3} \cdot {a}^{2}}{{b}^{5}} + \left(-0.5 \cdot \frac{c}{b} + \left(-1.0546875 \cdot \frac{{c}^{4} \cdot {a}^{3}}{{b}^{7}} + -0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}}\right)\right)\\ \end{array} \]
Alternative 2
Error5.0
Cost61060
\[\begin{array}{l} t_0 := \sqrt{b \cdot b + \left(a \cdot c\right) \cdot -3} - b\\ \mathbf{if}\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \leq -25:\\ \;\;\;\;\frac{t_0 \cdot \left(t_0 \cdot \frac{1}{t_0}\right)}{3 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b} + \left(-1.0546875 \cdot \frac{{c}^{4} \cdot {a}^{3}}{{b}^{7}} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + -0.5625 \cdot \frac{{c}^{3} \cdot {a}^{2}}{{b}^{5}}\right)\right)\\ \end{array} \]
Alternative 3
Error7.3
Cost33796
\[\begin{array}{l} t_0 := \frac{\sqrt{b \cdot b + \left(a \cdot c\right) \cdot -3} - b}{3 \cdot a}\\ \mathbf{if}\;b \leq 2.9:\\ \;\;\;\;t_0 \cdot \left(t_0 \cdot \frac{1}{t_0}\right)\\ \mathbf{else}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b} + \left(-0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}} + -0.5625 \cdot \frac{{c}^{3} \cdot {a}^{2}}{{b}^{5}}\right)\\ \end{array} \]
Alternative 4
Error10.0
Cost22468
\[\begin{array}{l} t_0 := \frac{\sqrt{b \cdot b + \left(a \cdot c\right) \cdot -3} - b}{3 \cdot a}\\ \mathbf{if}\;b \leq 8.8:\\ \;\;\;\;t_0 \cdot \left(t_0 \cdot \frac{1}{t_0}\right)\\ \mathbf{else}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b} + -0.375 \cdot \frac{{c}^{2} \cdot a}{{b}^{3}}\\ \end{array} \]
Alternative 5
Error10.0
Cost21956
\[\begin{array}{l} t_0 := \sqrt{b \cdot b + \left(a \cdot c\right) \cdot -3} - b\\ \mathbf{if}\;b \leq 9:\\ \;\;\;\;\frac{t_0 \cdot \left(t_0 \cdot \frac{1}{t_0}\right)}{3 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b} + -0.375 \cdot \frac{{c}^{2} \cdot a}{{b}^{3}}\\ \end{array} \]
Alternative 6
Error15.2
Cost14852
\[\begin{array}{l} t_0 := \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\\ \mathbf{if}\;\frac{\left(-b\right) + t_0}{3 \cdot a} \leq -2.25 \cdot 10^{-6}:\\ \;\;\;\;\frac{t_0 - b}{3 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b}\\ \end{array} \]
Alternative 7
Error10.0
Cost13892
\[\begin{array}{l} \mathbf{if}\;b \leq 10:\\ \;\;\;\;\frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b}{3 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b} + -0.375 \cdot \frac{{c}^{2} \cdot a}{{b}^{3}}\\ \end{array} \]
Alternative 8
Error16.8
Cost7492
\[\begin{array}{l} \mathbf{if}\;b \leq 3700:\\ \;\;\;\;\frac{\sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)} - b}{3 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b}\\ \end{array} \]
Alternative 9
Error22.9
Cost320
\[-0.5 \cdot \frac{c}{b} \]

Error

Reproduce?

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