Cubic critical

Percentage Accurate: 52.6% → 85.4%
Time: 9.6s
Alternatives: 9
Speedup: 2.2×

Specification

?
\[\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 9 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: 52.6% 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: 85.4% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -1 \cdot 10^{+153}:\\ \;\;\;\;\frac{b \cdot -2}{3 \cdot a}\\ \mathbf{elif}\;b \leq 8.2 \cdot 10^{-57}:\\ \;\;\;\;\frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b}{3 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;c \cdot \mathsf{fma}\left(c, a \cdot \mathsf{fma}\left(a, c \cdot \frac{-0.5625}{{b}^{5}}, \frac{-0.375}{b \cdot \left(b \cdot b\right)}\right), \frac{-0.5}{b}\right)\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b -1e+153)
   (/ (* b -2.0) (* 3.0 a))
   (if (<= b 8.2e-57)
     (/ (- (sqrt (- (* b b) (* (* 3.0 a) c))) b) (* 3.0 a))
     (*
      c
      (fma
       c
       (* a (fma a (* c (/ -0.5625 (pow b 5.0))) (/ -0.375 (* b (* b b)))))
       (/ -0.5 b))))))
double code(double a, double b, double c) {
	double tmp;
	if (b <= -1e+153) {
		tmp = (b * -2.0) / (3.0 * a);
	} else if (b <= 8.2e-57) {
		tmp = (sqrt(((b * b) - ((3.0 * a) * c))) - b) / (3.0 * a);
	} else {
		tmp = c * fma(c, (a * fma(a, (c * (-0.5625 / pow(b, 5.0))), (-0.375 / (b * (b * b))))), (-0.5 / b));
	}
	return tmp;
}
function code(a, b, c)
	tmp = 0.0
	if (b <= -1e+153)
		tmp = Float64(Float64(b * -2.0) / Float64(3.0 * a));
	elseif (b <= 8.2e-57)
		tmp = Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(Float64(3.0 * a) * c))) - b) / Float64(3.0 * a));
	else
		tmp = Float64(c * fma(c, Float64(a * fma(a, Float64(c * Float64(-0.5625 / (b ^ 5.0))), Float64(-0.375 / Float64(b * Float64(b * b))))), Float64(-0.5 / b)));
	end
	return tmp
end
code[a_, b_, c_] := If[LessEqual[b, -1e+153], N[(N[(b * -2.0), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 8.2e-57], N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(N[(3.0 * a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision], N[(c * N[(c * N[(a * N[(a * N[(c * N[(-0.5625 / N[Power[b, 5.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-0.375 / N[(b * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-0.5 / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -1 \cdot 10^{+153}:\\
\;\;\;\;\frac{b \cdot -2}{3 \cdot a}\\

\mathbf{elif}\;b \leq 8.2 \cdot 10^{-57}:\\
\;\;\;\;\frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b}{3 \cdot a}\\

\mathbf{else}:\\
\;\;\;\;c \cdot \mathsf{fma}\left(c, a \cdot \mathsf{fma}\left(a, c \cdot \frac{-0.5625}{{b}^{5}}, \frac{-0.375}{b \cdot \left(b \cdot b\right)}\right), \frac{-0.5}{b}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -1e153

    1. Initial program 31.7%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Add Preprocessing
    3. Taylor expanded in b around -inf

      \[\leadsto \frac{\color{blue}{-2 \cdot b}}{3 \cdot a} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \frac{\color{blue}{b \cdot -2}}{3 \cdot a} \]
      2. lower-*.f6492.6

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

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

    if -1e153 < b < 8.2000000000000003e-57

    1. Initial program 84.7%

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

    if 8.2000000000000003e-57 < b

    1. Initial program 13.6%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0

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

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

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

        \[\leadsto \frac{\left(\mathsf{neg}\left(b\right)\right) + \sqrt{b \cdot b - \color{blue}{a \cdot \left(c \cdot 3\right)}}}{3 \cdot a} \]
      4. lower-*.f6413.7

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

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

      \[\leadsto \color{blue}{c \cdot \left(c \cdot \left(\frac{-9}{16} \cdot \frac{{a}^{2} \cdot c}{{b}^{5}} + \frac{-3}{8} \cdot \frac{a}{{b}^{3}}\right) - \frac{1}{2} \cdot \frac{1}{b}\right)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \color{blue}{c \cdot \left(c \cdot \left(\frac{-9}{16} \cdot \frac{{a}^{2} \cdot c}{{b}^{5}} + \frac{-3}{8} \cdot \frac{a}{{b}^{3}}\right) - \frac{1}{2} \cdot \frac{1}{b}\right)} \]
      2. sub-negN/A

        \[\leadsto c \cdot \color{blue}{\left(c \cdot \left(\frac{-9}{16} \cdot \frac{{a}^{2} \cdot c}{{b}^{5}} + \frac{-3}{8} \cdot \frac{a}{{b}^{3}}\right) + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{b}\right)\right)\right)} \]
      3. +-commutativeN/A

        \[\leadsto c \cdot \left(c \cdot \color{blue}{\left(\frac{-3}{8} \cdot \frac{a}{{b}^{3}} + \frac{-9}{16} \cdot \frac{{a}^{2} \cdot c}{{b}^{5}}\right)} + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{b}\right)\right)\right) \]
      4. associate-*r/N/A

        \[\leadsto c \cdot \left(c \cdot \left(\frac{-3}{8} \cdot \frac{a}{{b}^{3}} + \color{blue}{\frac{\frac{-9}{16} \cdot \left({a}^{2} \cdot c\right)}{{b}^{5}}}\right) + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{b}\right)\right)\right) \]
      5. associate-*r*N/A

        \[\leadsto c \cdot \left(c \cdot \left(\frac{-3}{8} \cdot \frac{a}{{b}^{3}} + \frac{\color{blue}{\left(\frac{-9}{16} \cdot {a}^{2}\right) \cdot c}}{{b}^{5}}\right) + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{b}\right)\right)\right) \]
      6. associate-*l/N/A

        \[\leadsto c \cdot \left(c \cdot \left(\frac{-3}{8} \cdot \frac{a}{{b}^{3}} + \color{blue}{\frac{\frac{-9}{16} \cdot {a}^{2}}{{b}^{5}} \cdot c}\right) + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{b}\right)\right)\right) \]
      7. associate-*r/N/A

        \[\leadsto c \cdot \left(c \cdot \left(\frac{-3}{8} \cdot \frac{a}{{b}^{3}} + \color{blue}{\left(\frac{-9}{16} \cdot \frac{{a}^{2}}{{b}^{5}}\right)} \cdot c\right) + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{b}\right)\right)\right) \]
      8. lower-fma.f64N/A

        \[\leadsto c \cdot \color{blue}{\mathsf{fma}\left(c, \frac{-3}{8} \cdot \frac{a}{{b}^{3}} + \left(\frac{-9}{16} \cdot \frac{{a}^{2}}{{b}^{5}}\right) \cdot c, \mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{b}\right)\right)} \]
    8. Simplified78.4%

      \[\leadsto \color{blue}{c \cdot \mathsf{fma}\left(c, \mathsf{fma}\left(-0.375, \frac{a}{b \cdot \left(b \cdot b\right)}, \frac{-0.5625 \cdot \left(a \cdot \left(a \cdot c\right)\right)}{{b}^{5}}\right), \frac{-0.5}{b}\right)} \]
    9. Taylor expanded in a around 0

      \[\leadsto c \cdot \mathsf{fma}\left(c, \color{blue}{a \cdot \left(\frac{-9}{16} \cdot \frac{a \cdot c}{{b}^{5}} - \frac{3}{8} \cdot \frac{1}{{b}^{3}}\right)}, \frac{\frac{-1}{2}}{b}\right) \]
    10. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto c \cdot \mathsf{fma}\left(c, \color{blue}{a \cdot \left(\frac{-9}{16} \cdot \frac{a \cdot c}{{b}^{5}} - \frac{3}{8} \cdot \frac{1}{{b}^{3}}\right)}, \frac{\frac{-1}{2}}{b}\right) \]
      2. sub-negN/A

        \[\leadsto c \cdot \mathsf{fma}\left(c, a \cdot \color{blue}{\left(\frac{-9}{16} \cdot \frac{a \cdot c}{{b}^{5}} + \left(\mathsf{neg}\left(\frac{3}{8} \cdot \frac{1}{{b}^{3}}\right)\right)\right)}, \frac{\frac{-1}{2}}{b}\right) \]
      3. *-commutativeN/A

        \[\leadsto c \cdot \mathsf{fma}\left(c, a \cdot \left(\color{blue}{\frac{a \cdot c}{{b}^{5}} \cdot \frac{-9}{16}} + \left(\mathsf{neg}\left(\frac{3}{8} \cdot \frac{1}{{b}^{3}}\right)\right)\right), \frac{\frac{-1}{2}}{b}\right) \]
      4. associate-/l*N/A

        \[\leadsto c \cdot \mathsf{fma}\left(c, a \cdot \left(\color{blue}{\left(a \cdot \frac{c}{{b}^{5}}\right)} \cdot \frac{-9}{16} + \left(\mathsf{neg}\left(\frac{3}{8} \cdot \frac{1}{{b}^{3}}\right)\right)\right), \frac{\frac{-1}{2}}{b}\right) \]
      5. associate-*l*N/A

        \[\leadsto c \cdot \mathsf{fma}\left(c, a \cdot \left(\color{blue}{a \cdot \left(\frac{c}{{b}^{5}} \cdot \frac{-9}{16}\right)} + \left(\mathsf{neg}\left(\frac{3}{8} \cdot \frac{1}{{b}^{3}}\right)\right)\right), \frac{\frac{-1}{2}}{b}\right) \]
      6. *-commutativeN/A

        \[\leadsto c \cdot \mathsf{fma}\left(c, a \cdot \left(a \cdot \color{blue}{\left(\frac{-9}{16} \cdot \frac{c}{{b}^{5}}\right)} + \left(\mathsf{neg}\left(\frac{3}{8} \cdot \frac{1}{{b}^{3}}\right)\right)\right), \frac{\frac{-1}{2}}{b}\right) \]
      7. lower-fma.f64N/A

        \[\leadsto c \cdot \mathsf{fma}\left(c, a \cdot \color{blue}{\mathsf{fma}\left(a, \frac{-9}{16} \cdot \frac{c}{{b}^{5}}, \mathsf{neg}\left(\frac{3}{8} \cdot \frac{1}{{b}^{3}}\right)\right)}, \frac{\frac{-1}{2}}{b}\right) \]
      8. *-commutativeN/A

        \[\leadsto c \cdot \mathsf{fma}\left(c, a \cdot \mathsf{fma}\left(a, \color{blue}{\frac{c}{{b}^{5}} \cdot \frac{-9}{16}}, \mathsf{neg}\left(\frac{3}{8} \cdot \frac{1}{{b}^{3}}\right)\right), \frac{\frac{-1}{2}}{b}\right) \]
      9. associate-*l/N/A

        \[\leadsto c \cdot \mathsf{fma}\left(c, a \cdot \mathsf{fma}\left(a, \color{blue}{\frac{c \cdot \frac{-9}{16}}{{b}^{5}}}, \mathsf{neg}\left(\frac{3}{8} \cdot \frac{1}{{b}^{3}}\right)\right), \frac{\frac{-1}{2}}{b}\right) \]
      10. associate-/l*N/A

        \[\leadsto c \cdot \mathsf{fma}\left(c, a \cdot \mathsf{fma}\left(a, \color{blue}{c \cdot \frac{\frac{-9}{16}}{{b}^{5}}}, \mathsf{neg}\left(\frac{3}{8} \cdot \frac{1}{{b}^{3}}\right)\right), \frac{\frac{-1}{2}}{b}\right) \]
      11. lower-*.f64N/A

        \[\leadsto c \cdot \mathsf{fma}\left(c, a \cdot \mathsf{fma}\left(a, \color{blue}{c \cdot \frac{\frac{-9}{16}}{{b}^{5}}}, \mathsf{neg}\left(\frac{3}{8} \cdot \frac{1}{{b}^{3}}\right)\right), \frac{\frac{-1}{2}}{b}\right) \]
      12. lower-/.f64N/A

        \[\leadsto c \cdot \mathsf{fma}\left(c, a \cdot \mathsf{fma}\left(a, c \cdot \color{blue}{\frac{\frac{-9}{16}}{{b}^{5}}}, \mathsf{neg}\left(\frac{3}{8} \cdot \frac{1}{{b}^{3}}\right)\right), \frac{\frac{-1}{2}}{b}\right) \]
      13. lower-pow.f64N/A

        \[\leadsto c \cdot \mathsf{fma}\left(c, a \cdot \mathsf{fma}\left(a, c \cdot \frac{\frac{-9}{16}}{\color{blue}{{b}^{5}}}, \mathsf{neg}\left(\frac{3}{8} \cdot \frac{1}{{b}^{3}}\right)\right), \frac{\frac{-1}{2}}{b}\right) \]
      14. associate-*r/N/A

        \[\leadsto c \cdot \mathsf{fma}\left(c, a \cdot \mathsf{fma}\left(a, c \cdot \frac{\frac{-9}{16}}{{b}^{5}}, \mathsf{neg}\left(\color{blue}{\frac{\frac{3}{8} \cdot 1}{{b}^{3}}}\right)\right), \frac{\frac{-1}{2}}{b}\right) \]
      15. metadata-evalN/A

        \[\leadsto c \cdot \mathsf{fma}\left(c, a \cdot \mathsf{fma}\left(a, c \cdot \frac{\frac{-9}{16}}{{b}^{5}}, \mathsf{neg}\left(\frac{\color{blue}{\frac{3}{8}}}{{b}^{3}}\right)\right), \frac{\frac{-1}{2}}{b}\right) \]
      16. distribute-neg-fracN/A

        \[\leadsto c \cdot \mathsf{fma}\left(c, a \cdot \mathsf{fma}\left(a, c \cdot \frac{\frac{-9}{16}}{{b}^{5}}, \color{blue}{\frac{\mathsf{neg}\left(\frac{3}{8}\right)}{{b}^{3}}}\right), \frac{\frac{-1}{2}}{b}\right) \]
      17. metadata-evalN/A

        \[\leadsto c \cdot \mathsf{fma}\left(c, a \cdot \mathsf{fma}\left(a, c \cdot \frac{\frac{-9}{16}}{{b}^{5}}, \frac{\color{blue}{\frac{-3}{8}}}{{b}^{3}}\right), \frac{\frac{-1}{2}}{b}\right) \]
      18. lower-/.f64N/A

        \[\leadsto c \cdot \mathsf{fma}\left(c, a \cdot \mathsf{fma}\left(a, c \cdot \frac{\frac{-9}{16}}{{b}^{5}}, \color{blue}{\frac{\frac{-3}{8}}{{b}^{3}}}\right), \frac{\frac{-1}{2}}{b}\right) \]
      19. cube-multN/A

        \[\leadsto c \cdot \mathsf{fma}\left(c, a \cdot \mathsf{fma}\left(a, c \cdot \frac{\frac{-9}{16}}{{b}^{5}}, \frac{\frac{-3}{8}}{\color{blue}{b \cdot \left(b \cdot b\right)}}\right), \frac{\frac{-1}{2}}{b}\right) \]
      20. unpow2N/A

        \[\leadsto c \cdot \mathsf{fma}\left(c, a \cdot \mathsf{fma}\left(a, c \cdot \frac{\frac{-9}{16}}{{b}^{5}}, \frac{\frac{-3}{8}}{b \cdot \color{blue}{{b}^{2}}}\right), \frac{\frac{-1}{2}}{b}\right) \]
      21. lower-*.f64N/A

        \[\leadsto c \cdot \mathsf{fma}\left(c, a \cdot \mathsf{fma}\left(a, c \cdot \frac{\frac{-9}{16}}{{b}^{5}}, \frac{\frac{-3}{8}}{\color{blue}{b \cdot {b}^{2}}}\right), \frac{\frac{-1}{2}}{b}\right) \]
      22. unpow2N/A

        \[\leadsto c \cdot \mathsf{fma}\left(c, a \cdot \mathsf{fma}\left(a, c \cdot \frac{\frac{-9}{16}}{{b}^{5}}, \frac{\frac{-3}{8}}{b \cdot \color{blue}{\left(b \cdot b\right)}}\right), \frac{\frac{-1}{2}}{b}\right) \]
      23. lower-*.f6485.6

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

      \[\leadsto c \cdot \mathsf{fma}\left(c, \color{blue}{a \cdot \mathsf{fma}\left(a, c \cdot \frac{-0.5625}{{b}^{5}}, \frac{-0.375}{b \cdot \left(b \cdot b\right)}\right)}, \frac{-0.5}{b}\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification85.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1 \cdot 10^{+153}:\\ \;\;\;\;\frac{b \cdot -2}{3 \cdot a}\\ \mathbf{elif}\;b \leq 8.2 \cdot 10^{-57}:\\ \;\;\;\;\frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b}{3 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;c \cdot \mathsf{fma}\left(c, a \cdot \mathsf{fma}\left(a, c \cdot \frac{-0.5625}{{b}^{5}}, \frac{-0.375}{b \cdot \left(b \cdot b\right)}\right), \frac{-0.5}{b}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 85.5% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -1 \cdot 10^{+153}:\\ \;\;\;\;\frac{b \cdot -2}{3 \cdot a}\\ \mathbf{elif}\;b \leq 2.25 \cdot 10^{-42}:\\ \;\;\;\;\frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b}{3 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} \cdot \mathsf{fma}\left(-0.375, a \cdot \frac{c}{b \cdot b}, -0.5\right)\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b -1e+153)
   (/ (* b -2.0) (* 3.0 a))
   (if (<= b 2.25e-42)
     (/ (- (sqrt (- (* b b) (* (* 3.0 a) c))) b) (* 3.0 a))
     (* (/ c b) (fma -0.375 (* a (/ c (* b b))) -0.5)))))
double code(double a, double b, double c) {
	double tmp;
	if (b <= -1e+153) {
		tmp = (b * -2.0) / (3.0 * a);
	} else if (b <= 2.25e-42) {
		tmp = (sqrt(((b * b) - ((3.0 * a) * c))) - b) / (3.0 * a);
	} else {
		tmp = (c / b) * fma(-0.375, (a * (c / (b * b))), -0.5);
	}
	return tmp;
}
function code(a, b, c)
	tmp = 0.0
	if (b <= -1e+153)
		tmp = Float64(Float64(b * -2.0) / Float64(3.0 * a));
	elseif (b <= 2.25e-42)
		tmp = Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(Float64(3.0 * a) * c))) - b) / Float64(3.0 * a));
	else
		tmp = Float64(Float64(c / b) * fma(-0.375, Float64(a * Float64(c / Float64(b * b))), -0.5));
	end
	return tmp
end
code[a_, b_, c_] := If[LessEqual[b, -1e+153], N[(N[(b * -2.0), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.25e-42], N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(N[(3.0 * a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision], N[(N[(c / b), $MachinePrecision] * N[(-0.375 * N[(a * N[(c / N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -0.5), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -1 \cdot 10^{+153}:\\
\;\;\;\;\frac{b \cdot -2}{3 \cdot a}\\

\mathbf{elif}\;b \leq 2.25 \cdot 10^{-42}:\\
\;\;\;\;\frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b}{3 \cdot a}\\

\mathbf{else}:\\
\;\;\;\;\frac{c}{b} \cdot \mathsf{fma}\left(-0.375, a \cdot \frac{c}{b \cdot b}, -0.5\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -1e153

    1. Initial program 31.7%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Add Preprocessing
    3. Taylor expanded in b around -inf

      \[\leadsto \frac{\color{blue}{-2 \cdot b}}{3 \cdot a} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \frac{\color{blue}{b \cdot -2}}{3 \cdot a} \]
      2. lower-*.f6492.6

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

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

    if -1e153 < b < 2.25e-42

    1. Initial program 84.2%

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

    if 2.25e-42 < b

    1. Initial program 12.9%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0

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

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

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

        \[\leadsto \frac{\left(\mathsf{neg}\left(b\right)\right) + \sqrt{b \cdot b - \color{blue}{a \cdot \left(c \cdot 3\right)}}}{3 \cdot a} \]
      4. lower-*.f6412.9

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

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

      \[\leadsto \color{blue}{c \cdot \left(c \cdot \left(\frac{-9}{16} \cdot \frac{{a}^{2} \cdot c}{{b}^{5}} + \frac{-3}{8} \cdot \frac{a}{{b}^{3}}\right) - \frac{1}{2} \cdot \frac{1}{b}\right)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \color{blue}{c \cdot \left(c \cdot \left(\frac{-9}{16} \cdot \frac{{a}^{2} \cdot c}{{b}^{5}} + \frac{-3}{8} \cdot \frac{a}{{b}^{3}}\right) - \frac{1}{2} \cdot \frac{1}{b}\right)} \]
      2. sub-negN/A

        \[\leadsto c \cdot \color{blue}{\left(c \cdot \left(\frac{-9}{16} \cdot \frac{{a}^{2} \cdot c}{{b}^{5}} + \frac{-3}{8} \cdot \frac{a}{{b}^{3}}\right) + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{b}\right)\right)\right)} \]
      3. +-commutativeN/A

        \[\leadsto c \cdot \left(c \cdot \color{blue}{\left(\frac{-3}{8} \cdot \frac{a}{{b}^{3}} + \frac{-9}{16} \cdot \frac{{a}^{2} \cdot c}{{b}^{5}}\right)} + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{b}\right)\right)\right) \]
      4. associate-*r/N/A

        \[\leadsto c \cdot \left(c \cdot \left(\frac{-3}{8} \cdot \frac{a}{{b}^{3}} + \color{blue}{\frac{\frac{-9}{16} \cdot \left({a}^{2} \cdot c\right)}{{b}^{5}}}\right) + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{b}\right)\right)\right) \]
      5. associate-*r*N/A

        \[\leadsto c \cdot \left(c \cdot \left(\frac{-3}{8} \cdot \frac{a}{{b}^{3}} + \frac{\color{blue}{\left(\frac{-9}{16} \cdot {a}^{2}\right) \cdot c}}{{b}^{5}}\right) + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{b}\right)\right)\right) \]
      6. associate-*l/N/A

        \[\leadsto c \cdot \left(c \cdot \left(\frac{-3}{8} \cdot \frac{a}{{b}^{3}} + \color{blue}{\frac{\frac{-9}{16} \cdot {a}^{2}}{{b}^{5}} \cdot c}\right) + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{b}\right)\right)\right) \]
      7. associate-*r/N/A

        \[\leadsto c \cdot \left(c \cdot \left(\frac{-3}{8} \cdot \frac{a}{{b}^{3}} + \color{blue}{\left(\frac{-9}{16} \cdot \frac{{a}^{2}}{{b}^{5}}\right)} \cdot c\right) + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{b}\right)\right)\right) \]
      8. lower-fma.f64N/A

        \[\leadsto c \cdot \color{blue}{\mathsf{fma}\left(c, \frac{-3}{8} \cdot \frac{a}{{b}^{3}} + \left(\frac{-9}{16} \cdot \frac{{a}^{2}}{{b}^{5}}\right) \cdot c, \mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{b}\right)\right)} \]
    8. Simplified78.9%

      \[\leadsto \color{blue}{c \cdot \mathsf{fma}\left(c, \mathsf{fma}\left(-0.375, \frac{a}{b \cdot \left(b \cdot b\right)}, \frac{-0.5625 \cdot \left(a \cdot \left(a \cdot c\right)\right)}{{b}^{5}}\right), \frac{-0.5}{b}\right)} \]
    9. Taylor expanded in c around 0

      \[\leadsto \color{blue}{c \cdot \left(\frac{-3}{8} \cdot \frac{a \cdot c}{{b}^{3}} - \frac{1}{2} \cdot \frac{1}{b}\right)} \]
    10. Step-by-step derivation
      1. sub-negN/A

        \[\leadsto c \cdot \color{blue}{\left(\frac{-3}{8} \cdot \frac{a \cdot c}{{b}^{3}} + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{b}\right)\right)\right)} \]
      2. distribute-rgt-inN/A

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

        \[\leadsto \color{blue}{\frac{\frac{-3}{8} \cdot \left(a \cdot c\right)}{{b}^{3}}} \cdot c + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{b}\right)\right) \cdot c \]
      4. associate-*l/N/A

        \[\leadsto \color{blue}{\frac{\left(\frac{-3}{8} \cdot \left(a \cdot c\right)\right) \cdot c}{{b}^{3}}} + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{b}\right)\right) \cdot c \]
      5. unpow3N/A

        \[\leadsto \frac{\left(\frac{-3}{8} \cdot \left(a \cdot c\right)\right) \cdot c}{\color{blue}{\left(b \cdot b\right) \cdot b}} + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{b}\right)\right) \cdot c \]
      6. unpow2N/A

        \[\leadsto \frac{\left(\frac{-3}{8} \cdot \left(a \cdot c\right)\right) \cdot c}{\color{blue}{{b}^{2}} \cdot b} + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{b}\right)\right) \cdot c \]
      7. times-fracN/A

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

        \[\leadsto \frac{\frac{-3}{8} \cdot \left(a \cdot c\right)}{{b}^{2}} \cdot \frac{c}{b} + \left(\mathsf{neg}\left(\color{blue}{\frac{\frac{1}{2} \cdot 1}{b}}\right)\right) \cdot c \]
      9. metadata-evalN/A

        \[\leadsto \frac{\frac{-3}{8} \cdot \left(a \cdot c\right)}{{b}^{2}} \cdot \frac{c}{b} + \left(\mathsf{neg}\left(\frac{\color{blue}{\frac{1}{2}}}{b}\right)\right) \cdot c \]
      10. distribute-neg-fracN/A

        \[\leadsto \frac{\frac{-3}{8} \cdot \left(a \cdot c\right)}{{b}^{2}} \cdot \frac{c}{b} + \color{blue}{\frac{\mathsf{neg}\left(\frac{1}{2}\right)}{b}} \cdot c \]
      11. metadata-evalN/A

        \[\leadsto \frac{\frac{-3}{8} \cdot \left(a \cdot c\right)}{{b}^{2}} \cdot \frac{c}{b} + \frac{\color{blue}{\frac{-1}{2}}}{b} \cdot c \]
      12. associate-*l/N/A

        \[\leadsto \frac{\frac{-3}{8} \cdot \left(a \cdot c\right)}{{b}^{2}} \cdot \frac{c}{b} + \color{blue}{\frac{\frac{-1}{2} \cdot c}{b}} \]
      13. associate-*r/N/A

        \[\leadsto \frac{\frac{-3}{8} \cdot \left(a \cdot c\right)}{{b}^{2}} \cdot \frac{c}{b} + \color{blue}{\frac{-1}{2} \cdot \frac{c}{b}} \]
      14. distribute-rgt-outN/A

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

        \[\leadsto \color{blue}{\frac{c}{b} \cdot \left(\frac{\frac{-3}{8} \cdot \left(a \cdot c\right)}{{b}^{2}} + \frac{-1}{2}\right)} \]
      16. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{c}{b}} \cdot \left(\frac{\frac{-3}{8} \cdot \left(a \cdot c\right)}{{b}^{2}} + \frac{-1}{2}\right) \]
      17. associate-/l*N/A

        \[\leadsto \frac{c}{b} \cdot \left(\color{blue}{\frac{-3}{8} \cdot \frac{a \cdot c}{{b}^{2}}} + \frac{-1}{2}\right) \]
    11. Simplified85.9%

      \[\leadsto \color{blue}{\frac{c}{b} \cdot \mathsf{fma}\left(-0.375, a \cdot \frac{c}{b \cdot b}, -0.5\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification85.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1 \cdot 10^{+153}:\\ \;\;\;\;\frac{b \cdot -2}{3 \cdot a}\\ \mathbf{elif}\;b \leq 2.25 \cdot 10^{-42}:\\ \;\;\;\;\frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b}{3 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} \cdot \mathsf{fma}\left(-0.375, a \cdot \frac{c}{b \cdot b}, -0.5\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 85.4% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -1 \cdot 10^{+153}:\\ \;\;\;\;\frac{b \cdot -2}{3 \cdot a}\\ \mathbf{elif}\;b \leq 2.25 \cdot 10^{-42}:\\ \;\;\;\;\frac{\sqrt{b \cdot b - a \cdot \left(3 \cdot c\right)} - b}{3 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} \cdot \mathsf{fma}\left(-0.375, a \cdot \frac{c}{b \cdot b}, -0.5\right)\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b -1e+153)
   (/ (* b -2.0) (* 3.0 a))
   (if (<= b 2.25e-42)
     (/ (- (sqrt (- (* b b) (* a (* 3.0 c)))) b) (* 3.0 a))
     (* (/ c b) (fma -0.375 (* a (/ c (* b b))) -0.5)))))
double code(double a, double b, double c) {
	double tmp;
	if (b <= -1e+153) {
		tmp = (b * -2.0) / (3.0 * a);
	} else if (b <= 2.25e-42) {
		tmp = (sqrt(((b * b) - (a * (3.0 * c)))) - b) / (3.0 * a);
	} else {
		tmp = (c / b) * fma(-0.375, (a * (c / (b * b))), -0.5);
	}
	return tmp;
}
function code(a, b, c)
	tmp = 0.0
	if (b <= -1e+153)
		tmp = Float64(Float64(b * -2.0) / Float64(3.0 * a));
	elseif (b <= 2.25e-42)
		tmp = Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(a * Float64(3.0 * c)))) - b) / Float64(3.0 * a));
	else
		tmp = Float64(Float64(c / b) * fma(-0.375, Float64(a * Float64(c / Float64(b * b))), -0.5));
	end
	return tmp
end
code[a_, b_, c_] := If[LessEqual[b, -1e+153], N[(N[(b * -2.0), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.25e-42], N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(a * N[(3.0 * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision], N[(N[(c / b), $MachinePrecision] * N[(-0.375 * N[(a * N[(c / N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -0.5), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -1 \cdot 10^{+153}:\\
\;\;\;\;\frac{b \cdot -2}{3 \cdot a}\\

\mathbf{elif}\;b \leq 2.25 \cdot 10^{-42}:\\
\;\;\;\;\frac{\sqrt{b \cdot b - a \cdot \left(3 \cdot c\right)} - b}{3 \cdot a}\\

\mathbf{else}:\\
\;\;\;\;\frac{c}{b} \cdot \mathsf{fma}\left(-0.375, a \cdot \frac{c}{b \cdot b}, -0.5\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -1e153

    1. Initial program 31.7%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Add Preprocessing
    3. Taylor expanded in b around -inf

      \[\leadsto \frac{\color{blue}{-2 \cdot b}}{3 \cdot a} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \frac{\color{blue}{b \cdot -2}}{3 \cdot a} \]
      2. lower-*.f6492.6

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

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

    if -1e153 < b < 2.25e-42

    1. Initial program 84.2%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0

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

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

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

        \[\leadsto \frac{\left(\mathsf{neg}\left(b\right)\right) + \sqrt{b \cdot b - \color{blue}{a \cdot \left(c \cdot 3\right)}}}{3 \cdot a} \]
      4. lower-*.f6484.2

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

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

    if 2.25e-42 < b

    1. Initial program 12.9%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0

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

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

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

        \[\leadsto \frac{\left(\mathsf{neg}\left(b\right)\right) + \sqrt{b \cdot b - \color{blue}{a \cdot \left(c \cdot 3\right)}}}{3 \cdot a} \]
      4. lower-*.f6412.9

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

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

      \[\leadsto \color{blue}{c \cdot \left(c \cdot \left(\frac{-9}{16} \cdot \frac{{a}^{2} \cdot c}{{b}^{5}} + \frac{-3}{8} \cdot \frac{a}{{b}^{3}}\right) - \frac{1}{2} \cdot \frac{1}{b}\right)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \color{blue}{c \cdot \left(c \cdot \left(\frac{-9}{16} \cdot \frac{{a}^{2} \cdot c}{{b}^{5}} + \frac{-3}{8} \cdot \frac{a}{{b}^{3}}\right) - \frac{1}{2} \cdot \frac{1}{b}\right)} \]
      2. sub-negN/A

        \[\leadsto c \cdot \color{blue}{\left(c \cdot \left(\frac{-9}{16} \cdot \frac{{a}^{2} \cdot c}{{b}^{5}} + \frac{-3}{8} \cdot \frac{a}{{b}^{3}}\right) + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{b}\right)\right)\right)} \]
      3. +-commutativeN/A

        \[\leadsto c \cdot \left(c \cdot \color{blue}{\left(\frac{-3}{8} \cdot \frac{a}{{b}^{3}} + \frac{-9}{16} \cdot \frac{{a}^{2} \cdot c}{{b}^{5}}\right)} + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{b}\right)\right)\right) \]
      4. associate-*r/N/A

        \[\leadsto c \cdot \left(c \cdot \left(\frac{-3}{8} \cdot \frac{a}{{b}^{3}} + \color{blue}{\frac{\frac{-9}{16} \cdot \left({a}^{2} \cdot c\right)}{{b}^{5}}}\right) + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{b}\right)\right)\right) \]
      5. associate-*r*N/A

        \[\leadsto c \cdot \left(c \cdot \left(\frac{-3}{8} \cdot \frac{a}{{b}^{3}} + \frac{\color{blue}{\left(\frac{-9}{16} \cdot {a}^{2}\right) \cdot c}}{{b}^{5}}\right) + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{b}\right)\right)\right) \]
      6. associate-*l/N/A

        \[\leadsto c \cdot \left(c \cdot \left(\frac{-3}{8} \cdot \frac{a}{{b}^{3}} + \color{blue}{\frac{\frac{-9}{16} \cdot {a}^{2}}{{b}^{5}} \cdot c}\right) + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{b}\right)\right)\right) \]
      7. associate-*r/N/A

        \[\leadsto c \cdot \left(c \cdot \left(\frac{-3}{8} \cdot \frac{a}{{b}^{3}} + \color{blue}{\left(\frac{-9}{16} \cdot \frac{{a}^{2}}{{b}^{5}}\right)} \cdot c\right) + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{b}\right)\right)\right) \]
      8. lower-fma.f64N/A

        \[\leadsto c \cdot \color{blue}{\mathsf{fma}\left(c, \frac{-3}{8} \cdot \frac{a}{{b}^{3}} + \left(\frac{-9}{16} \cdot \frac{{a}^{2}}{{b}^{5}}\right) \cdot c, \mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{b}\right)\right)} \]
    8. Simplified78.9%

      \[\leadsto \color{blue}{c \cdot \mathsf{fma}\left(c, \mathsf{fma}\left(-0.375, \frac{a}{b \cdot \left(b \cdot b\right)}, \frac{-0.5625 \cdot \left(a \cdot \left(a \cdot c\right)\right)}{{b}^{5}}\right), \frac{-0.5}{b}\right)} \]
    9. Taylor expanded in c around 0

      \[\leadsto \color{blue}{c \cdot \left(\frac{-3}{8} \cdot \frac{a \cdot c}{{b}^{3}} - \frac{1}{2} \cdot \frac{1}{b}\right)} \]
    10. Step-by-step derivation
      1. sub-negN/A

        \[\leadsto c \cdot \color{blue}{\left(\frac{-3}{8} \cdot \frac{a \cdot c}{{b}^{3}} + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{b}\right)\right)\right)} \]
      2. distribute-rgt-inN/A

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

        \[\leadsto \color{blue}{\frac{\frac{-3}{8} \cdot \left(a \cdot c\right)}{{b}^{3}}} \cdot c + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{b}\right)\right) \cdot c \]
      4. associate-*l/N/A

        \[\leadsto \color{blue}{\frac{\left(\frac{-3}{8} \cdot \left(a \cdot c\right)\right) \cdot c}{{b}^{3}}} + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{b}\right)\right) \cdot c \]
      5. unpow3N/A

        \[\leadsto \frac{\left(\frac{-3}{8} \cdot \left(a \cdot c\right)\right) \cdot c}{\color{blue}{\left(b \cdot b\right) \cdot b}} + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{b}\right)\right) \cdot c \]
      6. unpow2N/A

        \[\leadsto \frac{\left(\frac{-3}{8} \cdot \left(a \cdot c\right)\right) \cdot c}{\color{blue}{{b}^{2}} \cdot b} + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{b}\right)\right) \cdot c \]
      7. times-fracN/A

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

        \[\leadsto \frac{\frac{-3}{8} \cdot \left(a \cdot c\right)}{{b}^{2}} \cdot \frac{c}{b} + \left(\mathsf{neg}\left(\color{blue}{\frac{\frac{1}{2} \cdot 1}{b}}\right)\right) \cdot c \]
      9. metadata-evalN/A

        \[\leadsto \frac{\frac{-3}{8} \cdot \left(a \cdot c\right)}{{b}^{2}} \cdot \frac{c}{b} + \left(\mathsf{neg}\left(\frac{\color{blue}{\frac{1}{2}}}{b}\right)\right) \cdot c \]
      10. distribute-neg-fracN/A

        \[\leadsto \frac{\frac{-3}{8} \cdot \left(a \cdot c\right)}{{b}^{2}} \cdot \frac{c}{b} + \color{blue}{\frac{\mathsf{neg}\left(\frac{1}{2}\right)}{b}} \cdot c \]
      11. metadata-evalN/A

        \[\leadsto \frac{\frac{-3}{8} \cdot \left(a \cdot c\right)}{{b}^{2}} \cdot \frac{c}{b} + \frac{\color{blue}{\frac{-1}{2}}}{b} \cdot c \]
      12. associate-*l/N/A

        \[\leadsto \frac{\frac{-3}{8} \cdot \left(a \cdot c\right)}{{b}^{2}} \cdot \frac{c}{b} + \color{blue}{\frac{\frac{-1}{2} \cdot c}{b}} \]
      13. associate-*r/N/A

        \[\leadsto \frac{\frac{-3}{8} \cdot \left(a \cdot c\right)}{{b}^{2}} \cdot \frac{c}{b} + \color{blue}{\frac{-1}{2} \cdot \frac{c}{b}} \]
      14. distribute-rgt-outN/A

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

        \[\leadsto \color{blue}{\frac{c}{b} \cdot \left(\frac{\frac{-3}{8} \cdot \left(a \cdot c\right)}{{b}^{2}} + \frac{-1}{2}\right)} \]
      16. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{c}{b}} \cdot \left(\frac{\frac{-3}{8} \cdot \left(a \cdot c\right)}{{b}^{2}} + \frac{-1}{2}\right) \]
      17. associate-/l*N/A

        \[\leadsto \frac{c}{b} \cdot \left(\color{blue}{\frac{-3}{8} \cdot \frac{a \cdot c}{{b}^{2}}} + \frac{-1}{2}\right) \]
    11. Simplified85.9%

      \[\leadsto \color{blue}{\frac{c}{b} \cdot \mathsf{fma}\left(-0.375, a \cdot \frac{c}{b \cdot b}, -0.5\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification85.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1 \cdot 10^{+153}:\\ \;\;\;\;\frac{b \cdot -2}{3 \cdot a}\\ \mathbf{elif}\;b \leq 2.25 \cdot 10^{-42}:\\ \;\;\;\;\frac{\sqrt{b \cdot b - a \cdot \left(3 \cdot c\right)} - b}{3 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} \cdot \mathsf{fma}\left(-0.375, a \cdot \frac{c}{b \cdot b}, -0.5\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 67.3% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq 5.1 \cdot 10^{-272}:\\ \;\;\;\;\frac{b \cdot -2}{3 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b 5.1e-272) (/ (* b -2.0) (* 3.0 a)) (/ (* c -0.5) b)))
double code(double a, double b, double c) {
	double tmp;
	if (b <= 5.1e-272) {
		tmp = (b * -2.0) / (3.0 * a);
	} else {
		tmp = (c * -0.5) / b;
	}
	return tmp;
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: tmp
    if (b <= 5.1d-272) then
        tmp = (b * (-2.0d0)) / (3.0d0 * a)
    else
        tmp = (c * (-0.5d0)) / b
    end if
    code = tmp
end function
public static double code(double a, double b, double c) {
	double tmp;
	if (b <= 5.1e-272) {
		tmp = (b * -2.0) / (3.0 * a);
	} else {
		tmp = (c * -0.5) / b;
	}
	return tmp;
}
def code(a, b, c):
	tmp = 0
	if b <= 5.1e-272:
		tmp = (b * -2.0) / (3.0 * a)
	else:
		tmp = (c * -0.5) / b
	return tmp
function code(a, b, c)
	tmp = 0.0
	if (b <= 5.1e-272)
		tmp = Float64(Float64(b * -2.0) / Float64(3.0 * a));
	else
		tmp = Float64(Float64(c * -0.5) / b);
	end
	return tmp
end
function tmp_2 = code(a, b, c)
	tmp = 0.0;
	if (b <= 5.1e-272)
		tmp = (b * -2.0) / (3.0 * a);
	else
		tmp = (c * -0.5) / b;
	end
	tmp_2 = tmp;
end
code[a_, b_, c_] := If[LessEqual[b, 5.1e-272], N[(N[(b * -2.0), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision], N[(N[(c * -0.5), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq 5.1 \cdot 10^{-272}:\\
\;\;\;\;\frac{b \cdot -2}{3 \cdot a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < 5.0999999999999998e-272

    1. Initial program 78.3%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Add Preprocessing
    3. Taylor expanded in b around -inf

      \[\leadsto \frac{\color{blue}{-2 \cdot b}}{3 \cdot a} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \frac{\color{blue}{b \cdot -2}}{3 \cdot a} \]
      2. lower-*.f6455.6

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

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

    if 5.0999999999999998e-272 < b

    1. Initial program 24.6%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0

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

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

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

        \[\leadsto \frac{\left(\mathsf{neg}\left(b\right)\right) + \sqrt{b \cdot b - \color{blue}{a \cdot \left(c \cdot 3\right)}}}{3 \cdot a} \]
      4. lower-*.f6424.6

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

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

      \[\leadsto \color{blue}{\frac{-1}{2} \cdot \frac{c}{b}} \]
    7. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \color{blue}{\frac{\frac{-1}{2} \cdot c}{b}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{-1}{2} \cdot c}{b}} \]
      3. *-commutativeN/A

        \[\leadsto \frac{\color{blue}{c \cdot \frac{-1}{2}}}{b} \]
      4. lower-*.f6472.0

        \[\leadsto \frac{\color{blue}{c \cdot -0.5}}{b} \]
    8. Simplified72.0%

      \[\leadsto \color{blue}{\frac{c \cdot -0.5}{b}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 5: 67.3% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq 5.1 \cdot 10^{-272}:\\ \;\;\;\;b \cdot \frac{0.6666666666666666}{-a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b 5.1e-272) (* b (/ 0.6666666666666666 (- a))) (/ (* c -0.5) b)))
double code(double a, double b, double c) {
	double tmp;
	if (b <= 5.1e-272) {
		tmp = b * (0.6666666666666666 / -a);
	} else {
		tmp = (c * -0.5) / b;
	}
	return tmp;
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: tmp
    if (b <= 5.1d-272) then
        tmp = b * (0.6666666666666666d0 / -a)
    else
        tmp = (c * (-0.5d0)) / b
    end if
    code = tmp
end function
public static double code(double a, double b, double c) {
	double tmp;
	if (b <= 5.1e-272) {
		tmp = b * (0.6666666666666666 / -a);
	} else {
		tmp = (c * -0.5) / b;
	}
	return tmp;
}
def code(a, b, c):
	tmp = 0
	if b <= 5.1e-272:
		tmp = b * (0.6666666666666666 / -a)
	else:
		tmp = (c * -0.5) / b
	return tmp
function code(a, b, c)
	tmp = 0.0
	if (b <= 5.1e-272)
		tmp = Float64(b * Float64(0.6666666666666666 / Float64(-a)));
	else
		tmp = Float64(Float64(c * -0.5) / b);
	end
	return tmp
end
function tmp_2 = code(a, b, c)
	tmp = 0.0;
	if (b <= 5.1e-272)
		tmp = b * (0.6666666666666666 / -a);
	else
		tmp = (c * -0.5) / b;
	end
	tmp_2 = tmp;
end
code[a_, b_, c_] := If[LessEqual[b, 5.1e-272], N[(b * N[(0.6666666666666666 / (-a)), $MachinePrecision]), $MachinePrecision], N[(N[(c * -0.5), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq 5.1 \cdot 10^{-272}:\\
\;\;\;\;b \cdot \frac{0.6666666666666666}{-a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < 5.0999999999999998e-272

    1. Initial program 78.3%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Add Preprocessing
    3. Taylor expanded in b around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(b \cdot \left(\frac{-1}{2} \cdot \frac{c}{{b}^{2}} + \frac{2}{3} \cdot \frac{1}{a}\right)\right)} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \color{blue}{\mathsf{neg}\left(b \cdot \left(\frac{-1}{2} \cdot \frac{c}{{b}^{2}} + \frac{2}{3} \cdot \frac{1}{a}\right)\right)} \]
      2. *-commutativeN/A

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

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

        \[\leadsto \color{blue}{\left(\frac{-1}{2} \cdot \frac{c}{{b}^{2}} + \frac{2}{3} \cdot \frac{1}{a}\right) \cdot \left(\mathsf{neg}\left(b\right)\right)} \]
      5. associate-*r/N/A

        \[\leadsto \left(\color{blue}{\frac{\frac{-1}{2} \cdot c}{{b}^{2}}} + \frac{2}{3} \cdot \frac{1}{a}\right) \cdot \left(\mathsf{neg}\left(b\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \left(\frac{\color{blue}{c \cdot \frac{-1}{2}}}{{b}^{2}} + \frac{2}{3} \cdot \frac{1}{a}\right) \cdot \left(\mathsf{neg}\left(b\right)\right) \]
      7. associate-/l*N/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(c, \frac{\frac{-1}{2}}{b \cdot b}, \color{blue}{\frac{\frac{2}{3}}{a}}\right) \cdot \left(\mathsf{neg}\left(b\right)\right) \]
      15. lower-neg.f6453.4

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

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

      \[\leadsto \color{blue}{\frac{\frac{2}{3}}{a}} \cdot \left(\mathsf{neg}\left(b\right)\right) \]
    7. Step-by-step derivation
      1. lower-/.f6455.5

        \[\leadsto \color{blue}{\frac{0.6666666666666666}{a}} \cdot \left(-b\right) \]
    8. Simplified55.5%

      \[\leadsto \color{blue}{\frac{0.6666666666666666}{a}} \cdot \left(-b\right) \]

    if 5.0999999999999998e-272 < b

    1. Initial program 24.6%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0

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

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

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

        \[\leadsto \frac{\left(\mathsf{neg}\left(b\right)\right) + \sqrt{b \cdot b - \color{blue}{a \cdot \left(c \cdot 3\right)}}}{3 \cdot a} \]
      4. lower-*.f6424.6

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

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

      \[\leadsto \color{blue}{\frac{-1}{2} \cdot \frac{c}{b}} \]
    7. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \color{blue}{\frac{\frac{-1}{2} \cdot c}{b}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{-1}{2} \cdot c}{b}} \]
      3. *-commutativeN/A

        \[\leadsto \frac{\color{blue}{c \cdot \frac{-1}{2}}}{b} \]
      4. lower-*.f6472.0

        \[\leadsto \frac{\color{blue}{c \cdot -0.5}}{b} \]
    8. Simplified72.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 5.1 \cdot 10^{-272}:\\ \;\;\;\;b \cdot \frac{0.6666666666666666}{-a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 67.3% accurate, 2.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq 5.1 \cdot 10^{-272}:\\ \;\;\;\;\frac{b \cdot -0.6666666666666666}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b 5.1e-272) (/ (* b -0.6666666666666666) a) (/ (* c -0.5) b)))
double code(double a, double b, double c) {
	double tmp;
	if (b <= 5.1e-272) {
		tmp = (b * -0.6666666666666666) / a;
	} else {
		tmp = (c * -0.5) / b;
	}
	return tmp;
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: tmp
    if (b <= 5.1d-272) then
        tmp = (b * (-0.6666666666666666d0)) / a
    else
        tmp = (c * (-0.5d0)) / b
    end if
    code = tmp
end function
public static double code(double a, double b, double c) {
	double tmp;
	if (b <= 5.1e-272) {
		tmp = (b * -0.6666666666666666) / a;
	} else {
		tmp = (c * -0.5) / b;
	}
	return tmp;
}
def code(a, b, c):
	tmp = 0
	if b <= 5.1e-272:
		tmp = (b * -0.6666666666666666) / a
	else:
		tmp = (c * -0.5) / b
	return tmp
function code(a, b, c)
	tmp = 0.0
	if (b <= 5.1e-272)
		tmp = Float64(Float64(b * -0.6666666666666666) / a);
	else
		tmp = Float64(Float64(c * -0.5) / b);
	end
	return tmp
end
function tmp_2 = code(a, b, c)
	tmp = 0.0;
	if (b <= 5.1e-272)
		tmp = (b * -0.6666666666666666) / a;
	else
		tmp = (c * -0.5) / b;
	end
	tmp_2 = tmp;
end
code[a_, b_, c_] := If[LessEqual[b, 5.1e-272], N[(N[(b * -0.6666666666666666), $MachinePrecision] / a), $MachinePrecision], N[(N[(c * -0.5), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq 5.1 \cdot 10^{-272}:\\
\;\;\;\;\frac{b \cdot -0.6666666666666666}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < 5.0999999999999998e-272

    1. Initial program 78.3%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{-2}{3} \cdot \frac{b}{a}} \]
    7. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \color{blue}{\frac{\frac{-2}{3} \cdot b}{a}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{-2}{3} \cdot b}{a}} \]
      3. *-commutativeN/A

        \[\leadsto \frac{\color{blue}{b \cdot \frac{-2}{3}}}{a} \]
      4. lower-*.f6455.5

        \[\leadsto \frac{\color{blue}{b \cdot -0.6666666666666666}}{a} \]
    8. Simplified55.5%

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

    if 5.0999999999999998e-272 < b

    1. Initial program 24.6%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0

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

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

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

        \[\leadsto \frac{\left(\mathsf{neg}\left(b\right)\right) + \sqrt{b \cdot b - \color{blue}{a \cdot \left(c \cdot 3\right)}}}{3 \cdot a} \]
      4. lower-*.f6424.6

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

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

      \[\leadsto \color{blue}{\frac{-1}{2} \cdot \frac{c}{b}} \]
    7. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \color{blue}{\frac{\frac{-1}{2} \cdot c}{b}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{-1}{2} \cdot c}{b}} \]
      3. *-commutativeN/A

        \[\leadsto \frac{\color{blue}{c \cdot \frac{-1}{2}}}{b} \]
      4. lower-*.f6472.0

        \[\leadsto \frac{\color{blue}{c \cdot -0.5}}{b} \]
    8. Simplified72.0%

      \[\leadsto \color{blue}{\frac{c \cdot -0.5}{b}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 7: 67.3% accurate, 2.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq 5.1 \cdot 10^{-272}:\\ \;\;\;\;\frac{b \cdot -0.6666666666666666}{a}\\ \mathbf{else}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b}\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b 5.1e-272) (/ (* b -0.6666666666666666) a) (* -0.5 (/ c b))))
double code(double a, double b, double c) {
	double tmp;
	if (b <= 5.1e-272) {
		tmp = (b * -0.6666666666666666) / a;
	} else {
		tmp = -0.5 * (c / b);
	}
	return tmp;
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: tmp
    if (b <= 5.1d-272) then
        tmp = (b * (-0.6666666666666666d0)) / a
    else
        tmp = (-0.5d0) * (c / b)
    end if
    code = tmp
end function
public static double code(double a, double b, double c) {
	double tmp;
	if (b <= 5.1e-272) {
		tmp = (b * -0.6666666666666666) / a;
	} else {
		tmp = -0.5 * (c / b);
	}
	return tmp;
}
def code(a, b, c):
	tmp = 0
	if b <= 5.1e-272:
		tmp = (b * -0.6666666666666666) / a
	else:
		tmp = -0.5 * (c / b)
	return tmp
function code(a, b, c)
	tmp = 0.0
	if (b <= 5.1e-272)
		tmp = Float64(Float64(b * -0.6666666666666666) / a);
	else
		tmp = Float64(-0.5 * Float64(c / b));
	end
	return tmp
end
function tmp_2 = code(a, b, c)
	tmp = 0.0;
	if (b <= 5.1e-272)
		tmp = (b * -0.6666666666666666) / a;
	else
		tmp = -0.5 * (c / b);
	end
	tmp_2 = tmp;
end
code[a_, b_, c_] := If[LessEqual[b, 5.1e-272], N[(N[(b * -0.6666666666666666), $MachinePrecision] / a), $MachinePrecision], N[(-0.5 * N[(c / b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq 5.1 \cdot 10^{-272}:\\
\;\;\;\;\frac{b \cdot -0.6666666666666666}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < 5.0999999999999998e-272

    1. Initial program 78.3%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{-2}{3} \cdot \frac{b}{a}} \]
    7. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \color{blue}{\frac{\frac{-2}{3} \cdot b}{a}} \]
      2. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{-2}{3} \cdot b}{a}} \]
      3. *-commutativeN/A

        \[\leadsto \frac{\color{blue}{b \cdot \frac{-2}{3}}}{a} \]
      4. lower-*.f6455.5

        \[\leadsto \frac{\color{blue}{b \cdot -0.6666666666666666}}{a} \]
    8. Simplified55.5%

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

    if 5.0999999999999998e-272 < b

    1. Initial program 24.6%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf

      \[\leadsto \color{blue}{\frac{-1}{2} \cdot \frac{c}{b}} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \color{blue}{\frac{c}{b} \cdot \frac{-1}{2}} \]
      2. lower-*.f64N/A

        \[\leadsto \color{blue}{\frac{c}{b} \cdot \frac{-1}{2}} \]
      3. lower-/.f6472.0

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 5.1 \cdot 10^{-272}:\\ \;\;\;\;\frac{b \cdot -0.6666666666666666}{a}\\ \mathbf{else}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 67.3% accurate, 2.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq 5.1 \cdot 10^{-272}:\\ \;\;\;\;-0.6666666666666666 \cdot \frac{b}{a}\\ \mathbf{else}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b}\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b 5.1e-272) (* -0.6666666666666666 (/ b a)) (* -0.5 (/ c b))))
double code(double a, double b, double c) {
	double tmp;
	if (b <= 5.1e-272) {
		tmp = -0.6666666666666666 * (b / a);
	} else {
		tmp = -0.5 * (c / b);
	}
	return tmp;
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: tmp
    if (b <= 5.1d-272) then
        tmp = (-0.6666666666666666d0) * (b / a)
    else
        tmp = (-0.5d0) * (c / b)
    end if
    code = tmp
end function
public static double code(double a, double b, double c) {
	double tmp;
	if (b <= 5.1e-272) {
		tmp = -0.6666666666666666 * (b / a);
	} else {
		tmp = -0.5 * (c / b);
	}
	return tmp;
}
def code(a, b, c):
	tmp = 0
	if b <= 5.1e-272:
		tmp = -0.6666666666666666 * (b / a)
	else:
		tmp = -0.5 * (c / b)
	return tmp
function code(a, b, c)
	tmp = 0.0
	if (b <= 5.1e-272)
		tmp = Float64(-0.6666666666666666 * Float64(b / a));
	else
		tmp = Float64(-0.5 * Float64(c / b));
	end
	return tmp
end
function tmp_2 = code(a, b, c)
	tmp = 0.0;
	if (b <= 5.1e-272)
		tmp = -0.6666666666666666 * (b / a);
	else
		tmp = -0.5 * (c / b);
	end
	tmp_2 = tmp;
end
code[a_, b_, c_] := If[LessEqual[b, 5.1e-272], N[(-0.6666666666666666 * N[(b / a), $MachinePrecision]), $MachinePrecision], N[(-0.5 * N[(c / b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq 5.1 \cdot 10^{-272}:\\
\;\;\;\;-0.6666666666666666 \cdot \frac{b}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < 5.0999999999999998e-272

    1. Initial program 78.3%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Add Preprocessing
    3. Taylor expanded in b around -inf

      \[\leadsto \color{blue}{\frac{-2}{3} \cdot \frac{b}{a}} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \color{blue}{\frac{b}{a} \cdot \frac{-2}{3}} \]
      2. lower-*.f64N/A

        \[\leadsto \color{blue}{\frac{b}{a} \cdot \frac{-2}{3}} \]
      3. lower-/.f6455.4

        \[\leadsto \color{blue}{\frac{b}{a}} \cdot -0.6666666666666666 \]
    5. Simplified55.4%

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

    if 5.0999999999999998e-272 < b

    1. Initial program 24.6%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf

      \[\leadsto \color{blue}{\frac{-1}{2} \cdot \frac{c}{b}} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \color{blue}{\frac{c}{b} \cdot \frac{-1}{2}} \]
      2. lower-*.f64N/A

        \[\leadsto \color{blue}{\frac{c}{b} \cdot \frac{-1}{2}} \]
      3. lower-/.f6472.0

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 5.1 \cdot 10^{-272}:\\ \;\;\;\;-0.6666666666666666 \cdot \frac{b}{a}\\ \mathbf{else}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 36.0% accurate, 2.9× speedup?

\[\begin{array}{l} \\ -0.6666666666666666 \cdot \frac{b}{a} \end{array} \]
(FPCore (a b c) :precision binary64 (* -0.6666666666666666 (/ b a)))
double code(double a, double b, double c) {
	return -0.6666666666666666 * (b / 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.6666666666666666d0) * (b / a)
end function
public static double code(double a, double b, double c) {
	return -0.6666666666666666 * (b / a);
}
def code(a, b, c):
	return -0.6666666666666666 * (b / a)
function code(a, b, c)
	return Float64(-0.6666666666666666 * Float64(b / a))
end
function tmp = code(a, b, c)
	tmp = -0.6666666666666666 * (b / a);
end
code[a_, b_, c_] := N[(-0.6666666666666666 * N[(b / a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
-0.6666666666666666 \cdot \frac{b}{a}
\end{array}
Derivation
  1. Initial program 51.5%

    \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
  2. Add Preprocessing
  3. Taylor expanded in b around -inf

    \[\leadsto \color{blue}{\frac{-2}{3} \cdot \frac{b}{a}} \]
  4. Step-by-step derivation
    1. *-commutativeN/A

      \[\leadsto \color{blue}{\frac{b}{a} \cdot \frac{-2}{3}} \]
    2. lower-*.f64N/A

      \[\leadsto \color{blue}{\frac{b}{a} \cdot \frac{-2}{3}} \]
    3. lower-/.f6429.1

      \[\leadsto \color{blue}{\frac{b}{a}} \cdot -0.6666666666666666 \]
  5. Simplified29.1%

    \[\leadsto \color{blue}{\frac{b}{a} \cdot -0.6666666666666666} \]
  6. Final simplification29.1%

    \[\leadsto -0.6666666666666666 \cdot \frac{b}{a} \]
  7. Add Preprocessing

Reproduce

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