Cubic critical, medium range

Percentage Accurate: 31.2% → 99.2%
Time: 15.0s
Alternatives: 6
Speedup: 23.2×

Specification

?
\[\left(\left(1.1102230246251565 \cdot 10^{-16} < a \land a < 9007199254740992\right) \land \left(1.1102230246251565 \cdot 10^{-16} < b \land b < 9007199254740992\right)\right) \land \left(1.1102230246251565 \cdot 10^{-16} < c \land c < 9007199254740992\right)\]
\[\begin{array}{l} \\ \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (/ (+ (- b) (sqrt (- (* b b) (* (* 3.0 a) c)))) (* 3.0 a)))
double code(double a, double b, double c) {
	return (-b + sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a);
}
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
public static double code(double a, double b, double c) {
	return (-b + Math.sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a);
}
def code(a, b, c):
	return (-b + math.sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a)
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 tmp = code(a, b, c)
	tmp = (-b + sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a);
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]
\begin{array}{l}

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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.

Accuracy vs Speed?

Herbie found 6 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 31.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (/ (+ (- b) (sqrt (- (* b b) (* (* 3.0 a) c)))) (* 3.0 a)))
double code(double a, double b, double c) {
	return (-b + sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a);
}
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
public static double code(double a, double b, double c) {
	return (-b + Math.sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a);
}
def code(a, b, c):
	return (-b + math.sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a)
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 tmp = code(a, b, c)
	tmp = (-b + sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a);
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]
\begin{array}{l}

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

Alternative 1: 99.2% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \frac{\frac{3 \cdot \left(c \cdot a\right)}{\left(-b\right) - \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(c \cdot a\right)\right)}}}{3 \cdot a} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (/ (/ (* 3.0 (* c a)) (- (- b) (sqrt (fma b b (* -3.0 (* c a)))))) (* 3.0 a)))
double code(double a, double b, double c) {
	return ((3.0 * (c * a)) / (-b - sqrt(fma(b, b, (-3.0 * (c * a)))))) / (3.0 * a);
}
function code(a, b, c)
	return Float64(Float64(Float64(3.0 * Float64(c * a)) / Float64(Float64(-b) - sqrt(fma(b, b, Float64(-3.0 * Float64(c * a)))))) / Float64(3.0 * a))
end
code[a_, b_, c_] := N[(N[(N[(3.0 * N[(c * a), $MachinePrecision]), $MachinePrecision] / N[((-b) - N[Sqrt[N[(b * b + N[(-3.0 * N[(c * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\frac{3 \cdot \left(c \cdot a\right)}{\left(-b\right) - \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(c \cdot a\right)\right)}}}{3 \cdot a}
\end{array}
Derivation
  1. Initial program 31.3%

    \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
  2. Step-by-step derivation
    1. neg-sub031.3%

      \[\leadsto \frac{\color{blue}{\left(0 - b\right)} + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. sqr-neg31.3%

      \[\leadsto \frac{\left(0 - b\right) + \sqrt{\color{blue}{\left(-b\right) \cdot \left(-b\right)} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    3. associate-+l-31.3%

      \[\leadsto \frac{\color{blue}{0 - \left(b - \sqrt{\left(-b\right) \cdot \left(-b\right) - \left(3 \cdot a\right) \cdot c}\right)}}{3 \cdot a} \]
    4. sub0-neg31.3%

      \[\leadsto \frac{\color{blue}{-\left(b - \sqrt{\left(-b\right) \cdot \left(-b\right) - \left(3 \cdot a\right) \cdot c}\right)}}{3 \cdot a} \]
    5. sub-neg31.3%

      \[\leadsto \frac{-\color{blue}{\left(b + \left(-\sqrt{\left(-b\right) \cdot \left(-b\right) - \left(3 \cdot a\right) \cdot c}\right)\right)}}{3 \cdot a} \]
    6. distribute-neg-in31.3%

      \[\leadsto \frac{\color{blue}{\left(-b\right) + \left(-\left(-\sqrt{\left(-b\right) \cdot \left(-b\right) - \left(3 \cdot a\right) \cdot c}\right)\right)}}{3 \cdot a} \]
    7. remove-double-neg31.3%

      \[\leadsto \frac{\left(-b\right) + \color{blue}{\sqrt{\left(-b\right) \cdot \left(-b\right) - \left(3 \cdot a\right) \cdot c}}}{3 \cdot a} \]
    8. sqr-neg31.3%

      \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{b \cdot b} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    9. associate-*l*31.3%

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

    \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)}}{3 \cdot a}} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. add-sqr-sqrt31.3%

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

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

      \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \sqrt{\color{blue}{\left(\left(a \cdot c\right) \cdot 3\right)} \cdot \left(3 \cdot \left(a \cdot c\right)\right)}}}{3 \cdot a} \]
    4. *-commutative31.3%

      \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \sqrt{\left(\left(a \cdot c\right) \cdot 3\right) \cdot \color{blue}{\left(\left(a \cdot c\right) \cdot 3\right)}}}}{3 \cdot a} \]
    5. swap-sqr31.3%

      \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \sqrt{\color{blue}{\left(\left(a \cdot c\right) \cdot \left(a \cdot c\right)\right) \cdot \left(3 \cdot 3\right)}}}}{3 \cdot a} \]
    6. metadata-eval31.3%

      \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \sqrt{\left(\left(a \cdot c\right) \cdot \left(a \cdot c\right)\right) \cdot \color{blue}{9}}}}{3 \cdot a} \]
    7. metadata-eval31.3%

      \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \sqrt{\left(\left(a \cdot c\right) \cdot \left(a \cdot c\right)\right) \cdot \color{blue}{\left(-3 \cdot -3\right)}}}}{3 \cdot a} \]
    8. swap-sqr31.3%

      \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \sqrt{\color{blue}{\left(\left(a \cdot c\right) \cdot -3\right) \cdot \left(\left(a \cdot c\right) \cdot -3\right)}}}}{3 \cdot a} \]
    9. associate-*r*31.3%

      \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \sqrt{\color{blue}{\left(a \cdot \left(c \cdot -3\right)\right)} \cdot \left(\left(a \cdot c\right) \cdot -3\right)}}}{3 \cdot a} \]
    10. associate-*r*31.3%

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

      \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{\sqrt{a \cdot \left(c \cdot -3\right)} \cdot \sqrt{a \cdot \left(c \cdot -3\right)}}}}{3 \cdot a} \]
    12. add-sqr-sqrt2.5%

      \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{a \cdot \left(c \cdot -3\right)}}}{3 \cdot a} \]
    13. associate-*r*2.5%

      \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{\left(a \cdot c\right) \cdot -3}}}{3 \cdot a} \]
    14. metadata-eval2.5%

      \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(a \cdot c\right) \cdot \color{blue}{\left(-3\right)}}}{3 \cdot a} \]
    15. distribute-rgt-neg-in2.5%

      \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{\left(-\left(a \cdot c\right) \cdot 3\right)}}}{3 \cdot a} \]
    16. *-commutative2.5%

      \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(-\color{blue}{3 \cdot \left(a \cdot c\right)}\right)}}{3 \cdot a} \]
    17. neg-sub02.5%

      \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{\left(0 - 3 \cdot \left(a \cdot c\right)\right)}}}{3 \cdot a} \]
    18. add-sqr-sqrt2.5%

      \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(0 - \color{blue}{\sqrt{3 \cdot \left(a \cdot c\right)} \cdot \sqrt{3 \cdot \left(a \cdot c\right)}}\right)}}{3 \cdot a} \]
    19. sqrt-unprod2.5%

      \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(0 - \color{blue}{\sqrt{\left(3 \cdot \left(a \cdot c\right)\right) \cdot \left(3 \cdot \left(a \cdot c\right)\right)}}\right)}}{3 \cdot a} \]
    20. *-commutative2.5%

      \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(0 - \sqrt{\color{blue}{\left(\left(a \cdot c\right) \cdot 3\right)} \cdot \left(3 \cdot \left(a \cdot c\right)\right)}\right)}}{3 \cdot a} \]
    21. *-commutative2.5%

      \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(0 - \sqrt{\left(\left(a \cdot c\right) \cdot 3\right) \cdot \color{blue}{\left(\left(a \cdot c\right) \cdot 3\right)}}\right)}}{3 \cdot a} \]
    22. swap-sqr2.5%

      \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(0 - \sqrt{\color{blue}{\left(\left(a \cdot c\right) \cdot \left(a \cdot c\right)\right) \cdot \left(3 \cdot 3\right)}}\right)}}{3 \cdot a} \]
    23. metadata-eval2.5%

      \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(0 - \sqrt{\left(\left(a \cdot c\right) \cdot \left(a \cdot c\right)\right) \cdot \color{blue}{9}}\right)}}{3 \cdot a} \]
    24. metadata-eval2.5%

      \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(0 - \sqrt{\left(\left(a \cdot c\right) \cdot \left(a \cdot c\right)\right) \cdot \color{blue}{\left(-3 \cdot -3\right)}}\right)}}{3 \cdot a} \]
    25. swap-sqr2.5%

      \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(0 - \sqrt{\color{blue}{\left(\left(a \cdot c\right) \cdot -3\right) \cdot \left(\left(a \cdot c\right) \cdot -3\right)}}\right)}}{3 \cdot a} \]
  6. Applied egg-rr31.3%

    \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{\left(0 - a \cdot \left(c \cdot -3\right)\right)}}}{3 \cdot a} \]
  7. Step-by-step derivation
    1. neg-sub031.3%

      \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{\left(-a \cdot \left(c \cdot -3\right)\right)}}}{3 \cdot a} \]
    2. distribute-rgt-neg-in31.3%

      \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{a \cdot \left(-c \cdot -3\right)}}}{3 \cdot a} \]
    3. distribute-rgt-neg-in31.3%

      \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - a \cdot \color{blue}{\left(c \cdot \left(--3\right)\right)}}}{3 \cdot a} \]
    4. metadata-eval31.3%

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

    \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{a \cdot \left(c \cdot 3\right)}}}{3 \cdot a} \]
  9. Applied egg-rr32.2%

    \[\leadsto \frac{\color{blue}{\frac{{\left(-b\right)}^{2} - \mathsf{fma}\left(b, b, -3 \cdot \left(a \cdot c\right)\right)}{\left(-b\right) - \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(a \cdot c\right)\right)}}}}{3 \cdot a} \]
  10. Taylor expanded in b around 0 99.2%

    \[\leadsto \frac{\frac{\color{blue}{3 \cdot \left(a \cdot c\right)}}{\left(-b\right) - \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(a \cdot c\right)\right)}}}{3 \cdot a} \]
  11. Step-by-step derivation
    1. *-commutative99.2%

      \[\leadsto \frac{\frac{3 \cdot \color{blue}{\left(c \cdot a\right)}}{\left(-b\right) - \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(a \cdot c\right)\right)}}}{3 \cdot a} \]
  12. Simplified99.2%

    \[\leadsto \frac{\frac{\color{blue}{3 \cdot \left(c \cdot a\right)}}{\left(-b\right) - \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(a \cdot c\right)\right)}}}{3 \cdot a} \]
  13. Final simplification99.2%

    \[\leadsto \frac{\frac{3 \cdot \left(c \cdot a\right)}{\left(-b\right) - \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(c \cdot a\right)\right)}}}{3 \cdot a} \]
  14. Add Preprocessing

Alternative 2: 90.7% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \frac{\mathsf{fma}\left(-0.5, c, -0.375 \cdot \left(a \cdot {\left(\frac{c}{b}\right)}^{2}\right)\right)}{b} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (/ (fma -0.5 c (* -0.375 (* a (pow (/ c b) 2.0)))) b))
double code(double a, double b, double c) {
	return fma(-0.5, c, (-0.375 * (a * pow((c / b), 2.0)))) / b;
}
function code(a, b, c)
	return Float64(fma(-0.5, c, Float64(-0.375 * Float64(a * (Float64(c / b) ^ 2.0)))) / b)
end
code[a_, b_, c_] := N[(N[(-0.5 * c + N[(-0.375 * N[(a * N[Power[N[(c / b), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]
\begin{array}{l}

\\
\frac{\mathsf{fma}\left(-0.5, c, -0.375 \cdot \left(a \cdot {\left(\frac{c}{b}\right)}^{2}\right)\right)}{b}
\end{array}
Derivation
  1. Initial program 31.3%

    \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
  2. Step-by-step derivation
    1. /-rgt-identity31.3%

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

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

    \[\leadsto \color{blue}{\frac{\sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)} - b}{3 \cdot a}} \]
  4. Add Preprocessing
  5. Taylor expanded in a around 0 93.2%

    \[\leadsto \frac{\color{blue}{a \cdot \left(-1.5 \cdot \frac{c}{b} + a \cdot \left(-1.6875 \cdot \frac{a \cdot {c}^{3}}{{b}^{5}} + -1.125 \cdot \frac{{c}^{2}}{{b}^{3}}\right)\right)}}{3 \cdot a} \]
  6. Taylor expanded in a around 0 90.1%

    \[\leadsto \frac{a \cdot \left(-1.5 \cdot \frac{c}{b} + a \cdot \color{blue}{\left(-1.125 \cdot \frac{{c}^{2}}{{b}^{3}}\right)}\right)}{3 \cdot a} \]
  7. Taylor expanded in b around inf 90.5%

    \[\leadsto \color{blue}{\frac{-0.5 \cdot c + -0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{2}}}{b}} \]
  8. Step-by-step derivation
    1. fma-define90.5%

      \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(-0.5, c, -0.375 \cdot \frac{a \cdot {c}^{2}}{{b}^{2}}\right)}}{b} \]
    2. associate-/l*90.5%

      \[\leadsto \frac{\mathsf{fma}\left(-0.5, c, -0.375 \cdot \color{blue}{\left(a \cdot \frac{{c}^{2}}{{b}^{2}}\right)}\right)}{b} \]
    3. unpow290.5%

      \[\leadsto \frac{\mathsf{fma}\left(-0.5, c, -0.375 \cdot \left(a \cdot \frac{\color{blue}{c \cdot c}}{{b}^{2}}\right)\right)}{b} \]
    4. unpow290.5%

      \[\leadsto \frac{\mathsf{fma}\left(-0.5, c, -0.375 \cdot \left(a \cdot \frac{c \cdot c}{\color{blue}{b \cdot b}}\right)\right)}{b} \]
    5. times-frac90.5%

      \[\leadsto \frac{\mathsf{fma}\left(-0.5, c, -0.375 \cdot \left(a \cdot \color{blue}{\left(\frac{c}{b} \cdot \frac{c}{b}\right)}\right)\right)}{b} \]
    6. unpow190.5%

      \[\leadsto \frac{\mathsf{fma}\left(-0.5, c, -0.375 \cdot \left(a \cdot \left(\color{blue}{{\left(\frac{c}{b}\right)}^{1}} \cdot \frac{c}{b}\right)\right)\right)}{b} \]
    7. pow-plus90.5%

      \[\leadsto \frac{\mathsf{fma}\left(-0.5, c, -0.375 \cdot \left(a \cdot \color{blue}{{\left(\frac{c}{b}\right)}^{\left(1 + 1\right)}}\right)\right)}{b} \]
    8. metadata-eval90.5%

      \[\leadsto \frac{\mathsf{fma}\left(-0.5, c, -0.375 \cdot \left(a \cdot {\left(\frac{c}{b}\right)}^{\color{blue}{2}}\right)\right)}{b} \]
  9. Simplified90.5%

    \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(-0.5, c, -0.375 \cdot \left(a \cdot {\left(\frac{c}{b}\right)}^{2}\right)\right)}{b}} \]
  10. Add Preprocessing

Alternative 3: 90.5% accurate, 1.0× speedup?

\[\begin{array}{l} \\ c \cdot \left(-0.375 \cdot \left(a \cdot \frac{c}{{b}^{3}}\right) - \frac{0.5}{b}\right) \end{array} \]
(FPCore (a b c)
 :precision binary64
 (* c (- (* -0.375 (* a (/ c (pow b 3.0)))) (/ 0.5 b))))
double code(double a, double b, double c) {
	return c * ((-0.375 * (a * (c / pow(b, 3.0)))) - (0.5 / b));
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    code = c * (((-0.375d0) * (a * (c / (b ** 3.0d0)))) - (0.5d0 / b))
end function
public static double code(double a, double b, double c) {
	return c * ((-0.375 * (a * (c / Math.pow(b, 3.0)))) - (0.5 / b));
}
def code(a, b, c):
	return c * ((-0.375 * (a * (c / math.pow(b, 3.0)))) - (0.5 / b))
function code(a, b, c)
	return Float64(c * Float64(Float64(-0.375 * Float64(a * Float64(c / (b ^ 3.0)))) - Float64(0.5 / b)))
end
function tmp = code(a, b, c)
	tmp = c * ((-0.375 * (a * (c / (b ^ 3.0)))) - (0.5 / b));
end
code[a_, b_, c_] := N[(c * N[(N[(-0.375 * N[(a * N[(c / N[Power[b, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(0.5 / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
c \cdot \left(-0.375 \cdot \left(a \cdot \frac{c}{{b}^{3}}\right) - \frac{0.5}{b}\right)
\end{array}
Derivation
  1. Initial program 31.3%

    \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
  2. Step-by-step derivation
    1. /-rgt-identity31.3%

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

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

    \[\leadsto \color{blue}{\frac{\sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)} - b}{3 \cdot a}} \]
  4. Add Preprocessing
  5. Taylor expanded in c around 0 90.3%

    \[\leadsto \color{blue}{c \cdot \left(-0.375 \cdot \frac{a \cdot c}{{b}^{3}} - 0.5 \cdot \frac{1}{b}\right)} \]
  6. Step-by-step derivation
    1. associate-/l*90.3%

      \[\leadsto c \cdot \left(-0.375 \cdot \color{blue}{\left(a \cdot \frac{c}{{b}^{3}}\right)} - 0.5 \cdot \frac{1}{b}\right) \]
    2. associate-*r/90.3%

      \[\leadsto c \cdot \left(-0.375 \cdot \left(a \cdot \frac{c}{{b}^{3}}\right) - \color{blue}{\frac{0.5 \cdot 1}{b}}\right) \]
    3. metadata-eval90.3%

      \[\leadsto c \cdot \left(-0.375 \cdot \left(a \cdot \frac{c}{{b}^{3}}\right) - \frac{\color{blue}{0.5}}{b}\right) \]
  7. Simplified90.3%

    \[\leadsto \color{blue}{c \cdot \left(-0.375 \cdot \left(a \cdot \frac{c}{{b}^{3}}\right) - \frac{0.5}{b}\right)} \]
  8. Add Preprocessing

Alternative 4: 81.5% accurate, 23.2× speedup?

\[\begin{array}{l} \\ \frac{c \cdot -0.5}{b} \end{array} \]
(FPCore (a b c) :precision binary64 (/ (* c -0.5) b))
double code(double a, double b, double c) {
	return (c * -0.5) / b;
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    code = (c * (-0.5d0)) / b
end function
public static double code(double a, double b, double c) {
	return (c * -0.5) / b;
}
def code(a, b, c):
	return (c * -0.5) / b
function code(a, b, c)
	return Float64(Float64(c * -0.5) / b)
end
function tmp = code(a, b, c)
	tmp = (c * -0.5) / b;
end
code[a_, b_, c_] := N[(N[(c * -0.5), $MachinePrecision] / b), $MachinePrecision]
\begin{array}{l}

\\
\frac{c \cdot -0.5}{b}
\end{array}
Derivation
  1. Initial program 31.3%

    \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
  2. Step-by-step derivation
    1. /-rgt-identity31.3%

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

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

    \[\leadsto \color{blue}{\frac{\sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)} - b}{3 \cdot a}} \]
  4. Add Preprocessing
  5. Taylor expanded in b around inf 81.1%

    \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b}} \]
  6. Step-by-step derivation
    1. associate-*r/81.1%

      \[\leadsto \color{blue}{\frac{-0.5 \cdot c}{b}} \]
    2. *-commutative81.1%

      \[\leadsto \frac{\color{blue}{c \cdot -0.5}}{b} \]
  7. Simplified81.1%

    \[\leadsto \color{blue}{\frac{c \cdot -0.5}{b}} \]
  8. Add Preprocessing

Alternative 5: 81.3% accurate, 23.2× speedup?

\[\begin{array}{l} \\ c \cdot \frac{-0.5}{b} \end{array} \]
(FPCore (a b c) :precision binary64 (* c (/ -0.5 b)))
double code(double a, double b, double c) {
	return c * (-0.5 / b);
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    code = c * ((-0.5d0) / b)
end function
public static double code(double a, double b, double c) {
	return c * (-0.5 / b);
}
def code(a, b, c):
	return c * (-0.5 / b)
function code(a, b, c)
	return Float64(c * Float64(-0.5 / b))
end
function tmp = code(a, b, c)
	tmp = c * (-0.5 / b);
end
code[a_, b_, c_] := N[(c * N[(-0.5 / b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
c \cdot \frac{-0.5}{b}
\end{array}
Derivation
  1. Initial program 31.3%

    \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
  2. Step-by-step derivation
    1. /-rgt-identity31.3%

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

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

    \[\leadsto \color{blue}{\frac{\sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)} - b}{3 \cdot a}} \]
  4. Add Preprocessing
  5. Taylor expanded in b around inf 81.1%

    \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b}} \]
  6. Step-by-step derivation
    1. associate-*r/81.1%

      \[\leadsto \color{blue}{\frac{-0.5 \cdot c}{b}} \]
    2. *-commutative81.1%

      \[\leadsto \frac{\color{blue}{c \cdot -0.5}}{b} \]
  7. Simplified81.1%

    \[\leadsto \color{blue}{\frac{c \cdot -0.5}{b}} \]
  8. Taylor expanded in c around 0 81.1%

    \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b}} \]
  9. Step-by-step derivation
    1. associate-*r/81.1%

      \[\leadsto \color{blue}{\frac{-0.5 \cdot c}{b}} \]
    2. *-commutative81.1%

      \[\leadsto \frac{\color{blue}{c \cdot -0.5}}{b} \]
    3. associate-*r/80.9%

      \[\leadsto \color{blue}{c \cdot \frac{-0.5}{b}} \]
  10. Simplified80.9%

    \[\leadsto \color{blue}{c \cdot \frac{-0.5}{b}} \]
  11. Add Preprocessing

Alternative 6: 3.2% accurate, 38.7× speedup?

\[\begin{array}{l} \\ \frac{0}{a} \end{array} \]
(FPCore (a b c) :precision binary64 (/ 0.0 a))
double code(double a, double b, double c) {
	return 0.0 / a;
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    code = 0.0d0 / a
end function
public static double code(double a, double b, double c) {
	return 0.0 / a;
}
def code(a, b, c):
	return 0.0 / a
function code(a, b, c)
	return Float64(0.0 / a)
end
function tmp = code(a, b, c)
	tmp = 0.0 / a;
end
code[a_, b_, c_] := N[(0.0 / a), $MachinePrecision]
\begin{array}{l}

\\
\frac{0}{a}
\end{array}
Derivation
  1. Initial program 31.3%

    \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
  2. Step-by-step derivation
    1. neg-sub031.3%

      \[\leadsto \frac{\color{blue}{\left(0 - b\right)} + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. sqr-neg31.3%

      \[\leadsto \frac{\left(0 - b\right) + \sqrt{\color{blue}{\left(-b\right) \cdot \left(-b\right)} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    3. associate-+l-31.3%

      \[\leadsto \frac{\color{blue}{0 - \left(b - \sqrt{\left(-b\right) \cdot \left(-b\right) - \left(3 \cdot a\right) \cdot c}\right)}}{3 \cdot a} \]
    4. sub0-neg31.3%

      \[\leadsto \frac{\color{blue}{-\left(b - \sqrt{\left(-b\right) \cdot \left(-b\right) - \left(3 \cdot a\right) \cdot c}\right)}}{3 \cdot a} \]
    5. sub-neg31.3%

      \[\leadsto \frac{-\color{blue}{\left(b + \left(-\sqrt{\left(-b\right) \cdot \left(-b\right) - \left(3 \cdot a\right) \cdot c}\right)\right)}}{3 \cdot a} \]
    6. distribute-neg-in31.3%

      \[\leadsto \frac{\color{blue}{\left(-b\right) + \left(-\left(-\sqrt{\left(-b\right) \cdot \left(-b\right) - \left(3 \cdot a\right) \cdot c}\right)\right)}}{3 \cdot a} \]
    7. remove-double-neg31.3%

      \[\leadsto \frac{\left(-b\right) + \color{blue}{\sqrt{\left(-b\right) \cdot \left(-b\right) - \left(3 \cdot a\right) \cdot c}}}{3 \cdot a} \]
    8. sqr-neg31.3%

      \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{b \cdot b} - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    9. associate-*l*31.3%

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

    \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)}}{3 \cdot a}} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. add-sqr-sqrt31.3%

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

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

      \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \sqrt{\color{blue}{\left(\left(a \cdot c\right) \cdot 3\right)} \cdot \left(3 \cdot \left(a \cdot c\right)\right)}}}{3 \cdot a} \]
    4. *-commutative31.3%

      \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \sqrt{\left(\left(a \cdot c\right) \cdot 3\right) \cdot \color{blue}{\left(\left(a \cdot c\right) \cdot 3\right)}}}}{3 \cdot a} \]
    5. swap-sqr31.3%

      \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \sqrt{\color{blue}{\left(\left(a \cdot c\right) \cdot \left(a \cdot c\right)\right) \cdot \left(3 \cdot 3\right)}}}}{3 \cdot a} \]
    6. metadata-eval31.3%

      \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \sqrt{\left(\left(a \cdot c\right) \cdot \left(a \cdot c\right)\right) \cdot \color{blue}{9}}}}{3 \cdot a} \]
    7. metadata-eval31.3%

      \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \sqrt{\left(\left(a \cdot c\right) \cdot \left(a \cdot c\right)\right) \cdot \color{blue}{\left(-3 \cdot -3\right)}}}}{3 \cdot a} \]
    8. swap-sqr31.3%

      \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \sqrt{\color{blue}{\left(\left(a \cdot c\right) \cdot -3\right) \cdot \left(\left(a \cdot c\right) \cdot -3\right)}}}}{3 \cdot a} \]
    9. associate-*r*31.3%

      \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \sqrt{\color{blue}{\left(a \cdot \left(c \cdot -3\right)\right)} \cdot \left(\left(a \cdot c\right) \cdot -3\right)}}}{3 \cdot a} \]
    10. associate-*r*31.3%

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

      \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{\sqrt{a \cdot \left(c \cdot -3\right)} \cdot \sqrt{a \cdot \left(c \cdot -3\right)}}}}{3 \cdot a} \]
    12. add-sqr-sqrt2.5%

      \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{a \cdot \left(c \cdot -3\right)}}}{3 \cdot a} \]
    13. associate-*r*2.5%

      \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{\left(a \cdot c\right) \cdot -3}}}{3 \cdot a} \]
    14. metadata-eval2.5%

      \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(a \cdot c\right) \cdot \color{blue}{\left(-3\right)}}}{3 \cdot a} \]
    15. distribute-rgt-neg-in2.5%

      \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{\left(-\left(a \cdot c\right) \cdot 3\right)}}}{3 \cdot a} \]
    16. *-commutative2.5%

      \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(-\color{blue}{3 \cdot \left(a \cdot c\right)}\right)}}{3 \cdot a} \]
    17. neg-sub02.5%

      \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{\left(0 - 3 \cdot \left(a \cdot c\right)\right)}}}{3 \cdot a} \]
    18. add-sqr-sqrt2.5%

      \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(0 - \color{blue}{\sqrt{3 \cdot \left(a \cdot c\right)} \cdot \sqrt{3 \cdot \left(a \cdot c\right)}}\right)}}{3 \cdot a} \]
    19. sqrt-unprod2.5%

      \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(0 - \color{blue}{\sqrt{\left(3 \cdot \left(a \cdot c\right)\right) \cdot \left(3 \cdot \left(a \cdot c\right)\right)}}\right)}}{3 \cdot a} \]
    20. *-commutative2.5%

      \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(0 - \sqrt{\color{blue}{\left(\left(a \cdot c\right) \cdot 3\right)} \cdot \left(3 \cdot \left(a \cdot c\right)\right)}\right)}}{3 \cdot a} \]
    21. *-commutative2.5%

      \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(0 - \sqrt{\left(\left(a \cdot c\right) \cdot 3\right) \cdot \color{blue}{\left(\left(a \cdot c\right) \cdot 3\right)}}\right)}}{3 \cdot a} \]
    22. swap-sqr2.5%

      \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(0 - \sqrt{\color{blue}{\left(\left(a \cdot c\right) \cdot \left(a \cdot c\right)\right) \cdot \left(3 \cdot 3\right)}}\right)}}{3 \cdot a} \]
    23. metadata-eval2.5%

      \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(0 - \sqrt{\left(\left(a \cdot c\right) \cdot \left(a \cdot c\right)\right) \cdot \color{blue}{9}}\right)}}{3 \cdot a} \]
    24. metadata-eval2.5%

      \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(0 - \sqrt{\left(\left(a \cdot c\right) \cdot \left(a \cdot c\right)\right) \cdot \color{blue}{\left(-3 \cdot -3\right)}}\right)}}{3 \cdot a} \]
    25. swap-sqr2.5%

      \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(0 - \sqrt{\color{blue}{\left(\left(a \cdot c\right) \cdot -3\right) \cdot \left(\left(a \cdot c\right) \cdot -3\right)}}\right)}}{3 \cdot a} \]
  6. Applied egg-rr31.3%

    \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{\left(0 - a \cdot \left(c \cdot -3\right)\right)}}}{3 \cdot a} \]
  7. Step-by-step derivation
    1. neg-sub031.3%

      \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{\left(-a \cdot \left(c \cdot -3\right)\right)}}}{3 \cdot a} \]
    2. distribute-rgt-neg-in31.3%

      \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{a \cdot \left(-c \cdot -3\right)}}}{3 \cdot a} \]
    3. distribute-rgt-neg-in31.3%

      \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - a \cdot \color{blue}{\left(c \cdot \left(--3\right)\right)}}}{3 \cdot a} \]
    4. metadata-eval31.3%

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

    \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{a \cdot \left(c \cdot 3\right)}}}{3 \cdot a} \]
  9. Step-by-step derivation
    1. associate-*r*31.3%

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

      \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{{b}^{2}} - \left(a \cdot c\right) \cdot 3}}{3 \cdot a} \]
    3. metadata-eval31.3%

      \[\leadsto \frac{\left(-b\right) + \sqrt{{b}^{\color{blue}{\left(\frac{4}{2}\right)}} - \left(a \cdot c\right) \cdot 3}}{3 \cdot a} \]
    4. sqrt-pow131.3%

      \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{\sqrt{{b}^{4}}} - \left(a \cdot c\right) \cdot 3}}{3 \cdot a} \]
    5. *-commutative31.3%

      \[\leadsto \frac{\left(-b\right) + \sqrt{\sqrt{{b}^{4}} - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    6. log1p-expm1-u23.7%

      \[\leadsto \color{blue}{\mathsf{log1p}\left(\mathsf{expm1}\left(\frac{\left(-b\right) + \sqrt{\sqrt{{b}^{4}} - 3 \cdot \left(a \cdot c\right)}}{3 \cdot a}\right)\right)} \]
  10. Applied egg-rr23.8%

    \[\leadsto \color{blue}{\mathsf{log1p}\left(\mathsf{expm1}\left(\frac{\mathsf{fma}\left(-1, b, \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(a \cdot c\right)\right)}\right)}{a \cdot 3}\right)\right)} \]
  11. Taylor expanded in a around 0 3.2%

    \[\leadsto \color{blue}{0.3333333333333333 \cdot \frac{b + -1 \cdot b}{a}} \]
  12. Step-by-step derivation
    1. associate-*r/3.2%

      \[\leadsto \color{blue}{\frac{0.3333333333333333 \cdot \left(b + -1 \cdot b\right)}{a}} \]
    2. distribute-rgt1-in3.2%

      \[\leadsto \frac{0.3333333333333333 \cdot \color{blue}{\left(\left(-1 + 1\right) \cdot b\right)}}{a} \]
    3. metadata-eval3.2%

      \[\leadsto \frac{0.3333333333333333 \cdot \left(\color{blue}{0} \cdot b\right)}{a} \]
    4. mul0-lft3.2%

      \[\leadsto \frac{0.3333333333333333 \cdot \color{blue}{0}}{a} \]
    5. metadata-eval3.2%

      \[\leadsto \frac{\color{blue}{0}}{a} \]
  13. Simplified3.2%

    \[\leadsto \color{blue}{\frac{0}{a}} \]
  14. Add Preprocessing

Reproduce

?
herbie shell --seed 2024137 
(FPCore (a b c)
  :name "Cubic critical, medium range"
  :precision binary64
  :pre (and (and (and (< 1.1102230246251565e-16 a) (< a 9007199254740992.0)) (and (< 1.1102230246251565e-16 b) (< b 9007199254740992.0))) (and (< 1.1102230246251565e-16 c) (< c 9007199254740992.0)))
  (/ (+ (- b) (sqrt (- (* b b) (* (* 3.0 a) c)))) (* 3.0 a)))