Cubic critical, wide range

Percentage Accurate: 17.5% → 99.4%
Time: 14.6s
Alternatives: 6
Speedup: 2.9×

Specification

?
\[\left(\left(4.930380657631324 \cdot 10^{-32} < a \land a < 2.028240960365167 \cdot 10^{+31}\right) \land \left(4.930380657631324 \cdot 10^{-32} < b \land b < 2.028240960365167 \cdot 10^{+31}\right)\right) \land \left(4.930380657631324 \cdot 10^{-32} < c \land c < 2.028240960365167 \cdot 10^{+31}\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: 17.5% 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.4% accurate, 0.8× speedup?

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

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

    \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
  2. Add Preprocessing
  3. Applied rewrites18.4%

    \[\leadsto \frac{\color{blue}{\frac{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}{b + \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}} - \frac{b \cdot b}{b + \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}}}{3 \cdot a} \]
  4. Step-by-step derivation
    1. lift-/.f64N/A

      \[\leadsto \color{blue}{\frac{\frac{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}{b + \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}} - \frac{b \cdot b}{b + \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}}{3 \cdot a}} \]
    2. lift--.f64N/A

      \[\leadsto \frac{\color{blue}{\frac{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}{b + \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}} - \frac{b \cdot b}{b + \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}}}{3 \cdot a} \]
    3. lift-/.f64N/A

      \[\leadsto \frac{\color{blue}{\frac{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}{b + \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} - \frac{b \cdot b}{b + \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}}{3 \cdot a} \]
    4. lift-/.f64N/A

      \[\leadsto \frac{\frac{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}{b + \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}} - \color{blue}{\frac{b \cdot b}{b + \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}}}{3 \cdot a} \]
    5. sub-divN/A

      \[\leadsto \frac{\color{blue}{\frac{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right) - b \cdot b}{b + \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}}}{3 \cdot a} \]
    6. associate-/l/N/A

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right) - b \cdot b}{\left(3 \cdot a\right) \cdot \left(b + \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}\right)}} \]
    7. lower-/.f64N/A

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right) - b \cdot b}{\left(3 \cdot a\right) \cdot \left(b + \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}\right)}} \]
  5. Applied rewrites18.7%

    \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(b, b, -3 \cdot \left(a \cdot c\right)\right) - b \cdot b}{\left(a \cdot 3\right) \cdot \left(b + \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(a \cdot c\right)\right)}\right)}} \]
  6. Step-by-step derivation
    1. lift--.f64N/A

      \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(b, b, -3 \cdot \left(a \cdot c\right)\right) - b \cdot b}}{\left(a \cdot 3\right) \cdot \left(b + \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(a \cdot c\right)\right)}\right)} \]
    2. lift-fma.f64N/A

      \[\leadsto \frac{\color{blue}{\left(b \cdot b + -3 \cdot \left(a \cdot c\right)\right)} - b \cdot b}{\left(a \cdot 3\right) \cdot \left(b + \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(a \cdot c\right)\right)}\right)} \]
    3. lift-*.f64N/A

      \[\leadsto \frac{\left(\color{blue}{b \cdot b} + -3 \cdot \left(a \cdot c\right)\right) - b \cdot b}{\left(a \cdot 3\right) \cdot \left(b + \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(a \cdot c\right)\right)}\right)} \]
    4. +-commutativeN/A

      \[\leadsto \frac{\color{blue}{\left(-3 \cdot \left(a \cdot c\right) + b \cdot b\right)} - b \cdot b}{\left(a \cdot 3\right) \cdot \left(b + \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(a \cdot c\right)\right)}\right)} \]
    5. associate--l+N/A

      \[\leadsto \frac{\color{blue}{-3 \cdot \left(a \cdot c\right) + \left(b \cdot b - b \cdot b\right)}}{\left(a \cdot 3\right) \cdot \left(b + \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(a \cdot c\right)\right)}\right)} \]
    6. lift-*.f64N/A

      \[\leadsto \frac{\color{blue}{-3 \cdot \left(a \cdot c\right)} + \left(b \cdot b - b \cdot b\right)}{\left(a \cdot 3\right) \cdot \left(b + \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(a \cdot c\right)\right)}\right)} \]
    7. lift-*.f64N/A

      \[\leadsto \frac{-3 \cdot \color{blue}{\left(a \cdot c\right)} + \left(b \cdot b - b \cdot b\right)}{\left(a \cdot 3\right) \cdot \left(b + \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(a \cdot c\right)\right)}\right)} \]
    8. associate-*r*N/A

      \[\leadsto \frac{\color{blue}{\left(-3 \cdot a\right) \cdot c} + \left(b \cdot b - b \cdot b\right)}{\left(a \cdot 3\right) \cdot \left(b + \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(a \cdot c\right)\right)}\right)} \]
    9. metadata-evalN/A

      \[\leadsto \frac{\left(\color{blue}{\left(\mathsf{neg}\left(3\right)\right)} \cdot a\right) \cdot c + \left(b \cdot b - b \cdot b\right)}{\left(a \cdot 3\right) \cdot \left(b + \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(a \cdot c\right)\right)}\right)} \]
    10. distribute-lft-neg-inN/A

      \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(3 \cdot a\right)\right)} \cdot c + \left(b \cdot b - b \cdot b\right)}{\left(a \cdot 3\right) \cdot \left(b + \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(a \cdot c\right)\right)}\right)} \]
    11. lower-fma.f64N/A

      \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(3 \cdot a\right), c, b \cdot b - b \cdot b\right)}}{\left(a \cdot 3\right) \cdot \left(b + \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(a \cdot c\right)\right)}\right)} \]
    12. *-commutativeN/A

      \[\leadsto \frac{\mathsf{fma}\left(\mathsf{neg}\left(\color{blue}{a \cdot 3}\right), c, b \cdot b - b \cdot b\right)}{\left(a \cdot 3\right) \cdot \left(b + \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(a \cdot c\right)\right)}\right)} \]
    13. distribute-rgt-neg-inN/A

      \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{a \cdot \left(\mathsf{neg}\left(3\right)\right)}, c, b \cdot b - b \cdot b\right)}{\left(a \cdot 3\right) \cdot \left(b + \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(a \cdot c\right)\right)}\right)} \]
    14. metadata-evalN/A

      \[\leadsto \frac{\mathsf{fma}\left(a \cdot \color{blue}{-3}, c, b \cdot b - b \cdot b\right)}{\left(a \cdot 3\right) \cdot \left(b + \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(a \cdot c\right)\right)}\right)} \]
    15. lower-*.f64N/A

      \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{a \cdot -3}, c, b \cdot b - b \cdot b\right)}{\left(a \cdot 3\right) \cdot \left(b + \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(a \cdot c\right)\right)}\right)} \]
    16. lower--.f6499.4

      \[\leadsto \frac{\mathsf{fma}\left(a \cdot -3, c, \color{blue}{b \cdot b - b \cdot b}\right)}{\left(a \cdot 3\right) \cdot \left(b + \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(a \cdot c\right)\right)}\right)} \]
  7. Applied rewrites99.4%

    \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(a \cdot -3, c, b \cdot b - b \cdot b\right)}}{\left(a \cdot 3\right) \cdot \left(b + \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(a \cdot c\right)\right)}\right)} \]
  8. Step-by-step derivation
    1. lift-fma.f64N/A

      \[\leadsto \frac{\color{blue}{\left(a \cdot -3\right) \cdot c + \left(b \cdot b - b \cdot b\right)}}{\left(a \cdot 3\right) \cdot \left(b + \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(a \cdot c\right)\right)}\right)} \]
    2. lift--.f64N/A

      \[\leadsto \frac{\left(a \cdot -3\right) \cdot c + \color{blue}{\left(b \cdot b - b \cdot b\right)}}{\left(a \cdot 3\right) \cdot \left(b + \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(a \cdot c\right)\right)}\right)} \]
    3. +-inversesN/A

      \[\leadsto \frac{\left(a \cdot -3\right) \cdot c + \color{blue}{0}}{\left(a \cdot 3\right) \cdot \left(b + \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(a \cdot c\right)\right)}\right)} \]
    4. +-rgt-identityN/A

      \[\leadsto \frac{\color{blue}{\left(a \cdot -3\right) \cdot c}}{\left(a \cdot 3\right) \cdot \left(b + \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(a \cdot c\right)\right)}\right)} \]
    5. lower-*.f6499.4

      \[\leadsto \frac{\color{blue}{\left(a \cdot -3\right) \cdot c}}{\left(a \cdot 3\right) \cdot \left(b + \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(a \cdot c\right)\right)}\right)} \]
  9. Applied rewrites99.4%

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

Alternative 2: 99.2% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_0 := -3 \cdot \left(a \cdot c\right)\\
\frac{t\_0}{\left(a \cdot 3\right) \cdot \left(b + \sqrt{\mathsf{fma}\left(b, b, t\_0\right)}\right)}
\end{array}
\end{array}
Derivation
  1. Initial program 17.5%

    \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
  2. Add Preprocessing
  3. Applied rewrites17.7%

    \[\leadsto \frac{\color{blue}{\frac{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}{b + \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}} - \frac{b \cdot b}{b + \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}}}{3 \cdot a} \]
  4. Step-by-step derivation
    1. lift-/.f64N/A

      \[\leadsto \color{blue}{\frac{\frac{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}{b + \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}} - \frac{b \cdot b}{b + \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}}{3 \cdot a}} \]
    2. lift--.f64N/A

      \[\leadsto \frac{\color{blue}{\frac{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}{b + \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}} - \frac{b \cdot b}{b + \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}}}{3 \cdot a} \]
    3. lift-/.f64N/A

      \[\leadsto \frac{\color{blue}{\frac{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}{b + \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}} - \frac{b \cdot b}{b + \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}}{3 \cdot a} \]
    4. lift-/.f64N/A

      \[\leadsto \frac{\frac{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}{b + \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}} - \color{blue}{\frac{b \cdot b}{b + \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}}}{3 \cdot a} \]
    5. sub-divN/A

      \[\leadsto \frac{\color{blue}{\frac{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right) - b \cdot b}{b + \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}}}}{3 \cdot a} \]
    6. associate-/l/N/A

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right) - b \cdot b}{\left(3 \cdot a\right) \cdot \left(b + \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}\right)}} \]
    7. lower-/.f64N/A

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right) - b \cdot b}{\left(3 \cdot a\right) \cdot \left(b + \sqrt{\mathsf{fma}\left(a, -3 \cdot c, b \cdot b\right)}\right)}} \]
  5. Applied rewrites17.9%

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

    \[\leadsto \frac{\color{blue}{-3 \cdot \left(a \cdot c\right)}}{\left(a \cdot 3\right) \cdot \left(b + \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(a \cdot c\right)\right)}\right)} \]
  7. Step-by-step derivation
    1. rem-square-sqrtN/A

      \[\leadsto \frac{\color{blue}{\left(\sqrt{-3} \cdot \sqrt{-3}\right)} \cdot \left(a \cdot c\right)}{\left(a \cdot 3\right) \cdot \left(b + \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(a \cdot c\right)\right)}\right)} \]
    2. unpow2N/A

      \[\leadsto \frac{\color{blue}{{\left(\sqrt{-3}\right)}^{2}} \cdot \left(a \cdot c\right)}{\left(a \cdot 3\right) \cdot \left(b + \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(a \cdot c\right)\right)}\right)} \]
    3. lower-*.f64N/A

      \[\leadsto \frac{\color{blue}{{\left(\sqrt{-3}\right)}^{2} \cdot \left(a \cdot c\right)}}{\left(a \cdot 3\right) \cdot \left(b + \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(a \cdot c\right)\right)}\right)} \]
    4. unpow2N/A

      \[\leadsto \frac{\color{blue}{\left(\sqrt{-3} \cdot \sqrt{-3}\right)} \cdot \left(a \cdot c\right)}{\left(a \cdot 3\right) \cdot \left(b + \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(a \cdot c\right)\right)}\right)} \]
    5. rem-square-sqrtN/A

      \[\leadsto \frac{\color{blue}{-3} \cdot \left(a \cdot c\right)}{\left(a \cdot 3\right) \cdot \left(b + \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(a \cdot c\right)\right)}\right)} \]
    6. lower-*.f6499.2

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

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

Reproduce

?
herbie shell --seed 2024219 
(FPCore (a b c)
  :name "Cubic critical, wide range"
  :precision binary64
  :pre (and (and (and (< 4.930380657631324e-32 a) (< a 2.028240960365167e+31)) (and (< 4.930380657631324e-32 b) (< b 2.028240960365167e+31))) (and (< 4.930380657631324e-32 c) (< c 2.028240960365167e+31)))
  (/ (+ (- b) (sqrt (- (* b b) (* (* 3.0 a) c)))) (* 3.0 a)))