Cubic critical

?

Percentage Accurate: 52.7% → 83.1%
Time: 26.5s
Precision: binary64
Cost: 13896

?

\[\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 -540000000:\\ \;\;\;\;\frac{\frac{b \cdot 2}{a}}{-3}\\ \mathbf{elif}\;b \leq 4 \cdot 10^{-163}:\\ \;\;\;\;\frac{-0.3333333333333333 \cdot \left(b - \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(a \cdot c\right)\right)}\right)}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \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 -540000000.0)
   (/ (/ (* b 2.0) a) -3.0)
   (if (<= b 4e-163)
     (/ (* -0.3333333333333333 (- b (sqrt (fma b b (* -3.0 (* a c)))))) a)
     (/ (* c -0.5) b))))
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 <= -540000000.0) {
		tmp = ((b * 2.0) / a) / -3.0;
	} else if (b <= 4e-163) {
		tmp = (-0.3333333333333333 * (b - sqrt(fma(b, b, (-3.0 * (a * c)))))) / a;
	} else {
		tmp = (c * -0.5) / b;
	}
	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 <= -540000000.0)
		tmp = Float64(Float64(Float64(b * 2.0) / a) / -3.0);
	elseif (b <= 4e-163)
		tmp = Float64(Float64(-0.3333333333333333 * Float64(b - sqrt(fma(b, b, Float64(-3.0 * Float64(a * c)))))) / a);
	else
		tmp = Float64(Float64(c * -0.5) / b);
	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, -540000000.0], N[(N[(N[(b * 2.0), $MachinePrecision] / a), $MachinePrecision] / -3.0), $MachinePrecision], If[LessEqual[b, 4e-163], N[(N[(-0.3333333333333333 * N[(b - N[Sqrt[N[(b * b + N[(-3.0 * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], N[(N[(c * -0.5), $MachinePrecision] / b), $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 -540000000:\\
\;\;\;\;\frac{\frac{b \cdot 2}{a}}{-3}\\

\mathbf{elif}\;b \leq 4 \cdot 10^{-163}:\\
\;\;\;\;\frac{-0.3333333333333333 \cdot \left(b - \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(a \cdot c\right)\right)}\right)}{a}\\

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


\end{array}

Local Percentage Accuracy?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Derivation?

  1. Split input into 3 regimes
  2. if b < -5.4e8

    1. Initial program 68.1%

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

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

      [Start]68.1

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

      /-rgt-identity [<=]68.1

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

      metadata-eval [<=]68.1

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

      associate-/r/ [=>]68.1

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

      metadata-eval [=>]68.1

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

      metadata-eval [<=]68.1

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

      times-frac [<=]68.1

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

      *-commutative [<=]68.1

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

      times-frac [=>]68.1

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

      *-commutative [<=]68.1

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

      associate-/r* [=>]68.1

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

      associate-*l/ [=>]68.2

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

      \[\leadsto \color{blue}{{\left(-3 \cdot \frac{a}{b - \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -3\right)}\right)}\right)}^{-1}} \]
      Step-by-step derivation

      [Start]68.2

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

      clear-num [=>]68.1

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

      inv-pow [=>]68.1

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

      *-un-lft-identity [=>]68.1

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

      times-frac [=>]68.1

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

      metadata-eval [=>]68.1

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

      fma-udef [=>]68.1

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

      add-sqr-sqrt [=>]37.1

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

      hypot-def [=>]49.4

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

      associate-*l* [=>]49.4

      \[ {\left(-3 \cdot \frac{a}{b - \mathsf{hypot}\left(b, \sqrt{\color{blue}{a \cdot \left(c \cdot -3\right)}}\right)}\right)}^{-1} \]
    4. Applied egg-rr49.5%

      \[\leadsto \color{blue}{\frac{\frac{b - \mathsf{hypot}\left(\sqrt{a \cdot \left(c \cdot -3\right)}, b\right)}{a}}{-3}} \]
      Step-by-step derivation

      [Start]49.4

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

      unpow-1 [=>]49.4

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

      *-commutative [=>]49.4

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

      associate-/r* [=>]49.4

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

      clear-num [<=]49.5

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

      hypot-udef [=>]37.2

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

      add-sqr-sqrt [<=]68.2

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

      +-commutative [=>]68.2

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

      add-sqr-sqrt [=>]37.2

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

      hypot-def [=>]49.5

      \[ \frac{\frac{b - \color{blue}{\mathsf{hypot}\left(\sqrt{a \cdot \left(c \cdot -3\right)}, b\right)}}{a}}{-3} \]
    5. Taylor expanded in b around -inf 94.4%

      \[\leadsto \frac{\frac{\color{blue}{2 \cdot b}}{a}}{-3} \]
    6. Simplified94.4%

      \[\leadsto \frac{\frac{\color{blue}{b \cdot 2}}{a}}{-3} \]
      Step-by-step derivation

      [Start]94.4

      \[ \frac{\frac{2 \cdot b}{a}}{-3} \]

      *-commutative [=>]94.4

      \[ \frac{\frac{\color{blue}{b \cdot 2}}{a}}{-3} \]

    if -5.4e8 < b < 3.99999999999999969e-163

    1. Initial program 76.6%

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

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

      [Start]76.6

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

      /-rgt-identity [<=]76.6

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

      metadata-eval [<=]76.6

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

      associate-/r/ [=>]76.6

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

      metadata-eval [=>]76.6

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

      metadata-eval [<=]76.6

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

      times-frac [<=]76.6

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

      *-commutative [<=]76.6

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

      times-frac [=>]76.5

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

      *-commutative [<=]76.5

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

      associate-/r* [=>]76.4

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

      associate-*l/ [=>]76.5

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

    if 3.99999999999999969e-163 < b

    1. Initial program 16.6%

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

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

      [Start]16.6

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

      /-rgt-identity [<=]16.6

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

      metadata-eval [<=]16.6

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

      associate-/r/ [=>]16.6

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

      metadata-eval [=>]16.6

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

      metadata-eval [<=]16.6

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

      times-frac [<=]16.6

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

      *-commutative [<=]16.6

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

      times-frac [=>]16.6

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

      *-commutative [<=]16.6

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

      associate-/r* [=>]16.6

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

      associate-*l/ [=>]16.6

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

      \[\leadsto \frac{-0.3333333333333333 \cdot \left(b - \color{blue}{\left(-1.5 \cdot \frac{c \cdot a}{b} + b\right)}\right)}{a} \]
    4. Taylor expanded in b around 0 85.5%

      \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b}} \]
    5. Simplified85.5%

      \[\leadsto \color{blue}{\frac{c \cdot -0.5}{b}} \]
      Step-by-step derivation

      [Start]85.5

      \[ -0.5 \cdot \frac{c}{b} \]

      *-commutative [=>]85.5

      \[ \color{blue}{\frac{c}{b} \cdot -0.5} \]

      associate-*l/ [=>]85.5

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -540000000:\\ \;\;\;\;\frac{\frac{b \cdot 2}{a}}{-3}\\ \mathbf{elif}\;b \leq 4 \cdot 10^{-163}:\\ \;\;\;\;\frac{-0.3333333333333333 \cdot \left(b - \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(a \cdot c\right)\right)}\right)}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \]

Alternatives

Alternative 1
Accuracy83.1%
Cost13896
\[\begin{array}{l} \mathbf{if}\;b \leq -540000000:\\ \;\;\;\;\frac{\frac{b \cdot 2}{a}}{-3}\\ \mathbf{elif}\;b \leq 4 \cdot 10^{-163}:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{b - \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(-3 \cdot c\right)\right)}}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \]
Alternative 2
Accuracy83.1%
Cost7624
\[\begin{array}{l} \mathbf{if}\;b \leq -540000000:\\ \;\;\;\;\frac{\frac{b \cdot 2}{a}}{-3}\\ \mathbf{elif}\;b \leq 4 \cdot 10^{-163}:\\ \;\;\;\;\frac{-0.3333333333333333 \cdot \left(b - \sqrt{a \cdot \left(-3 \cdot c\right) + b \cdot b}\right)}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \]
Alternative 3
Accuracy83.1%
Cost7624
\[\begin{array}{l} \mathbf{if}\;b \leq -540000000:\\ \;\;\;\;\frac{\frac{b \cdot 2}{a}}{-3}\\ \mathbf{elif}\;b \leq 4 \cdot 10^{-163}:\\ \;\;\;\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 3\right)} - b}{a \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \]
Alternative 4
Accuracy79.3%
Cost7368
\[\begin{array}{l} \mathbf{if}\;b \leq -3.4 \cdot 10^{-54}:\\ \;\;\;\;\frac{\frac{b \cdot 2}{a}}{-3}\\ \mathbf{elif}\;b \leq 4 \cdot 10^{-163}:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{b - \sqrt{-3 \cdot \left(a \cdot c\right)}}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \]
Alternative 5
Accuracy67.2%
Cost580
\[\begin{array}{l} \mathbf{if}\;b \leq 8.5 \cdot 10^{-259}:\\ \;\;\;\;\frac{\frac{b \cdot 2}{a}}{-3}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \]
Alternative 6
Accuracy67.2%
Cost452
\[\begin{array}{l} \mathbf{if}\;b \leq 8.5 \cdot 10^{-259}:\\ \;\;\;\;b \cdot \frac{-0.6666666666666666}{a}\\ \mathbf{else}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b}\\ \end{array} \]
Alternative 7
Accuracy67.2%
Cost452
\[\begin{array}{l} \mathbf{if}\;b \leq 8.5 \cdot 10^{-259}:\\ \;\;\;\;\frac{b}{a} \cdot -0.6666666666666666\\ \mathbf{else}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b}\\ \end{array} \]
Alternative 8
Accuracy67.2%
Cost452
\[\begin{array}{l} \mathbf{if}\;b \leq 8.5 \cdot 10^{-259}:\\ \;\;\;\;\frac{b}{a} \cdot -0.6666666666666666\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \]
Alternative 9
Accuracy67.3%
Cost452
\[\begin{array}{l} \mathbf{if}\;b \leq 8.5 \cdot 10^{-259}:\\ \;\;\;\;\frac{\frac{b}{-1.5}}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \]
Alternative 10
Accuracy34.9%
Cost320
\[-0.5 \cdot \frac{c}{b} \]

Error

Reproduce?

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