?

Average Accuracy: 47.8% → 84.9%
Time: 22.6s
Precision: binary64
Cost: 13964

?

\[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
\[\begin{array}{l} t_0 := c \cdot \left(a \cdot -3\right)\\ \mathbf{if}\;b \leq -7.5 \cdot 10^{+107}:\\ \;\;\;\;\frac{b \cdot -0.6666666666666666}{a} + 0.5 \cdot \frac{c}{b}\\ \mathbf{elif}\;b \leq -2 \cdot 10^{-137}:\\ \;\;\;\;\frac{\sqrt{b \cdot b + t_0} - b}{a \cdot 3}\\ \mathbf{elif}\;b \leq 1.22 \cdot 10^{-61}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{\mathsf{hypot}\left(b, \sqrt{t_0}\right) - b}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} \cdot -0.5\\ \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 (* c (* a -3.0))))
   (if (<= b -7.5e+107)
     (+ (/ (* b -0.6666666666666666) a) (* 0.5 (/ c b)))
     (if (<= b -2e-137)
       (/ (- (sqrt (+ (* b b) t_0)) b) (* a 3.0))
       (if (<= b 1.22e-61)
         (* 0.3333333333333333 (/ (- (hypot b (sqrt t_0)) b) a))
         (* (/ c b) -0.5))))))
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 = c * (a * -3.0);
	double tmp;
	if (b <= -7.5e+107) {
		tmp = ((b * -0.6666666666666666) / a) + (0.5 * (c / b));
	} else if (b <= -2e-137) {
		tmp = (sqrt(((b * b) + t_0)) - b) / (a * 3.0);
	} else if (b <= 1.22e-61) {
		tmp = 0.3333333333333333 * ((hypot(b, sqrt(t_0)) - b) / a);
	} else {
		tmp = (c / b) * -0.5;
	}
	return tmp;
}
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 = c * (a * -3.0);
	double tmp;
	if (b <= -7.5e+107) {
		tmp = ((b * -0.6666666666666666) / a) + (0.5 * (c / b));
	} else if (b <= -2e-137) {
		tmp = (Math.sqrt(((b * b) + t_0)) - b) / (a * 3.0);
	} else if (b <= 1.22e-61) {
		tmp = 0.3333333333333333 * ((Math.hypot(b, Math.sqrt(t_0)) - b) / a);
	} else {
		tmp = (c / b) * -0.5;
	}
	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 = c * (a * -3.0)
	tmp = 0
	if b <= -7.5e+107:
		tmp = ((b * -0.6666666666666666) / a) + (0.5 * (c / b))
	elif b <= -2e-137:
		tmp = (math.sqrt(((b * b) + t_0)) - b) / (a * 3.0)
	elif b <= 1.22e-61:
		tmp = 0.3333333333333333 * ((math.hypot(b, math.sqrt(t_0)) - b) / a)
	else:
		tmp = (c / b) * -0.5
	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(c * Float64(a * -3.0))
	tmp = 0.0
	if (b <= -7.5e+107)
		tmp = Float64(Float64(Float64(b * -0.6666666666666666) / a) + Float64(0.5 * Float64(c / b)));
	elseif (b <= -2e-137)
		tmp = Float64(Float64(sqrt(Float64(Float64(b * b) + t_0)) - b) / Float64(a * 3.0));
	elseif (b <= 1.22e-61)
		tmp = Float64(0.3333333333333333 * Float64(Float64(hypot(b, sqrt(t_0)) - b) / a));
	else
		tmp = Float64(Float64(c / b) * -0.5);
	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 = c * (a * -3.0);
	tmp = 0.0;
	if (b <= -7.5e+107)
		tmp = ((b * -0.6666666666666666) / a) + (0.5 * (c / b));
	elseif (b <= -2e-137)
		tmp = (sqrt(((b * b) + t_0)) - b) / (a * 3.0);
	elseif (b <= 1.22e-61)
		tmp = 0.3333333333333333 * ((hypot(b, sqrt(t_0)) - b) / a);
	else
		tmp = (c / b) * -0.5;
	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[(c * N[(a * -3.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -7.5e+107], N[(N[(N[(b * -0.6666666666666666), $MachinePrecision] / a), $MachinePrecision] + N[(0.5 * N[(c / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -2e-137], N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] + t$95$0), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.22e-61], N[(0.3333333333333333 * N[(N[(N[Sqrt[b ^ 2 + N[Sqrt[t$95$0], $MachinePrecision] ^ 2], $MachinePrecision] - b), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(N[(c / b), $MachinePrecision] * -0.5), $MachinePrecision]]]]]
\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}
\begin{array}{l}
t_0 := c \cdot \left(a \cdot -3\right)\\
\mathbf{if}\;b \leq -7.5 \cdot 10^{+107}:\\
\;\;\;\;\frac{b \cdot -0.6666666666666666}{a} + 0.5 \cdot \frac{c}{b}\\

\mathbf{elif}\;b \leq -2 \cdot 10^{-137}:\\
\;\;\;\;\frac{\sqrt{b \cdot b + t_0} - b}{a \cdot 3}\\

\mathbf{elif}\;b \leq 1.22 \cdot 10^{-61}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\mathsf{hypot}\left(b, \sqrt{t_0}\right) - b}{a}\\

\mathbf{else}:\\
\;\;\;\;\frac{c}{b} \cdot -0.5\\


\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Split input into 4 regimes
  2. if b < -7.4999999999999996e107

    1. Initial program 24.1%

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

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

      [Start]24.1

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

      remove-double-neg [<=]24.1

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

      sub-neg [<=]24.1

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

      div-sub [=>]24.2

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

      neg-mul-1 [=>]24.2

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

      associate-*l/ [<=]24.1

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

      distribute-frac-neg [=>]24.1

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

      fma-neg [=>]24.2

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

      /-rgt-identity [<=]24.2

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

      metadata-eval [<=]24.2

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

      associate-/l* [<=]24.2

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

      *-commutative [<=]24.2

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

      neg-mul-1 [<=]24.2

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

      fma-neg [<=]24.1

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

      neg-mul-1 [=>]24.1

      \[ \frac{-1}{3 \cdot a} \cdot \frac{-b}{-1} - \color{blue}{-1 \cdot \frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}} \]
    3. Taylor expanded in b around -inf 93.7%

      \[\leadsto \color{blue}{-0.6666666666666666 \cdot \frac{b}{a} + 0.5 \cdot \frac{c}{b}} \]
    4. Applied egg-rr93.7%

      \[\leadsto \color{blue}{\frac{-0.6666666666666666 \cdot b}{a}} + 0.5 \cdot \frac{c}{b} \]

    if -7.4999999999999996e107 < b < -1.99999999999999996e-137

    1. Initial program 89.8%

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

    if -1.99999999999999996e-137 < b < 1.22e-61

    1. Initial program 72.5%

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

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

      [Start]72.5

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

      *-lft-identity [<=]72.5

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

      metadata-eval [<=]72.5

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

      times-frac [<=]72.5

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

      *-commutative [<=]72.5

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

      times-frac [=>]72.4

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

      associate-*r/ [=>]72.5

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

      \[\leadsto \color{blue}{0.3333333333333333 \cdot \frac{\mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right) - b}{a}} \]
    4. Applied egg-rr40.6%

      \[\leadsto 0.3333333333333333 \cdot \frac{\mathsf{hypot}\left(b, \color{blue}{e^{\mathsf{log1p}\left(\sqrt{a \cdot \left(c \cdot -3\right)}\right)} - 1}\right) - b}{a} \]
    5. Simplified73.6%

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

      [Start]40.6

      \[ 0.3333333333333333 \cdot \frac{\mathsf{hypot}\left(b, e^{\mathsf{log1p}\left(\sqrt{a \cdot \left(c \cdot -3\right)}\right)} - 1\right) - b}{a} \]

      expm1-def [=>]71.2

      \[ 0.3333333333333333 \cdot \frac{\mathsf{hypot}\left(b, \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{a \cdot \left(c \cdot -3\right)}\right)\right)}\right) - b}{a} \]

      expm1-log1p [=>]73.5

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

      associate-*r* [=>]73.6

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

      *-commutative [=>]73.6

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

      associate-*l* [=>]73.6

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

    if 1.22e-61 < b

    1. Initial program 17.3%

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

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

      [Start]17.3

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

      remove-double-neg [<=]17.3

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

      sub-neg [<=]17.3

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

      div-sub [=>]15.9

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

      neg-mul-1 [=>]15.9

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

      associate-*l/ [<=]14.4

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

      distribute-frac-neg [=>]14.4

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

      fma-neg [=>]10.7

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

      /-rgt-identity [<=]10.7

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

      metadata-eval [<=]10.7

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

      associate-/l* [<=]10.7

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

      *-commutative [<=]10.7

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

      neg-mul-1 [<=]10.7

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

      fma-neg [<=]14.4

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

      neg-mul-1 [=>]14.4

      \[ \frac{-1}{3 \cdot a} \cdot \frac{-b}{-1} - \color{blue}{-1 \cdot \frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}} \]
    3. Taylor expanded in b around inf 86.7%

      \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification84.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -7.5 \cdot 10^{+107}:\\ \;\;\;\;\frac{b \cdot -0.6666666666666666}{a} + 0.5 \cdot \frac{c}{b}\\ \mathbf{elif}\;b \leq -2 \cdot 10^{-137}:\\ \;\;\;\;\frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} - b}{a \cdot 3}\\ \mathbf{elif}\;b \leq 1.22 \cdot 10^{-61}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{\mathsf{hypot}\left(b, \sqrt{c \cdot \left(a \cdot -3\right)}\right) - b}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} \cdot -0.5\\ \end{array} \]

Alternatives

Alternative 1
Accuracy85.0%
Cost13964
\[\begin{array}{l} \mathbf{if}\;b \leq -9.5 \cdot 10^{+114}:\\ \;\;\;\;\frac{b \cdot -0.6666666666666666}{a} + 0.5 \cdot \frac{c}{b}\\ \mathbf{elif}\;b \leq -6.8 \cdot 10^{-155}:\\ \;\;\;\;\frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} - b}{a \cdot 3}\\ \mathbf{elif}\;b \leq 2.5 \cdot 10^{-62}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{\mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right) - b}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} \cdot -0.5\\ \end{array} \]
Alternative 2
Accuracy84.6%
Cost7624
\[\begin{array}{l} \mathbf{if}\;b \leq -1.75 \cdot 10^{+115}:\\ \;\;\;\;\frac{b \cdot -0.6666666666666666}{a} + 0.5 \cdot \frac{c}{b}\\ \mathbf{elif}\;b \leq 8 \cdot 10^{-63}:\\ \;\;\;\;\frac{\sqrt{b \cdot b + a \cdot \left(c \cdot -3\right)} - b}{a \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} \cdot -0.5\\ \end{array} \]
Alternative 3
Accuracy84.7%
Cost7624
\[\begin{array}{l} \mathbf{if}\;b \leq -1.15 \cdot 10^{+110}:\\ \;\;\;\;\frac{b \cdot -0.6666666666666666}{a} + 0.5 \cdot \frac{c}{b}\\ \mathbf{elif}\;b \leq 3.4 \cdot 10^{-62}:\\ \;\;\;\;\frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} - b}{a \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} \cdot -0.5\\ \end{array} \]
Alternative 4
Accuracy79.0%
Cost7368
\[\begin{array}{l} \mathbf{if}\;b \leq -9 \cdot 10^{-66}:\\ \;\;\;\;\frac{b}{a \cdot -1.5}\\ \mathbf{elif}\;b \leq 7.2 \cdot 10^{-59}:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{b - \sqrt{a \cdot \left(c \cdot -3\right)}}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} \cdot -0.5\\ \end{array} \]
Alternative 5
Accuracy79.0%
Cost7368
\[\begin{array}{l} \mathbf{if}\;b \leq -1 \cdot 10^{-65}:\\ \;\;\;\;\frac{b}{a \cdot -1.5}\\ \mathbf{elif}\;b \leq 2.6 \cdot 10^{-63}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{\sqrt{-3 \cdot \left(a \cdot c\right)} - b}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} \cdot -0.5\\ \end{array} \]
Alternative 6
Accuracy64.4%
Cost452
\[\begin{array}{l} \mathbf{if}\;b \leq 5.4 \cdot 10^{-259}:\\ \;\;\;\;b \cdot \frac{-0.6666666666666666}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} \cdot -0.5\\ \end{array} \]
Alternative 7
Accuracy64.4%
Cost452
\[\begin{array}{l} \mathbf{if}\;b \leq 1.15 \cdot 10^{-265}:\\ \;\;\;\;\frac{b}{a \cdot -1.5}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} \cdot -0.5\\ \end{array} \]
Alternative 8
Accuracy37.2%
Cost320
\[\frac{c}{b} \cdot -0.5 \]

Error

Reproduce?

herbie shell --seed 2023125 
(FPCore (a b c)
  :name "Cubic critical"
  :precision binary64
  (/ (+ (- b) (sqrt (- (* b b) (* (* 3.0 a) c)))) (* 3.0 a)))