Cubic critical, narrow range

Percentage Accurate: 55.3% → 98.7%
Time: 14.5s
Alternatives: 12
Speedup: 23.2×

Specification

?
\[\left(\left(1.0536712127723509 \cdot 10^{-8} < a \land a < 94906265.62425156\right) \land \left(1.0536712127723509 \cdot 10^{-8} < b \land b < 94906265.62425156\right)\right) \land \left(1.0536712127723509 \cdot 10^{-8} < c \land c < 94906265.62425156\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 12 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: 55.3% 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: 98.7% accurate, 0.3× speedup?

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

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

    \[\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-sub057.8%

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

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

      \[\leadsto \frac{\color{blue}{-\left(b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}}{3 \cdot a} \]
    4. neg-mul-157.8%

      \[\leadsto \frac{\color{blue}{-1 \cdot \left(b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}}{3 \cdot a} \]
    5. associate-*r/57.8%

      \[\leadsto \color{blue}{-1 \cdot \frac{b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}} \]
    6. *-commutative57.8%

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

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

      \[\leadsto \frac{b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \cdot \frac{\color{blue}{--1}}{-1} \]
    9. times-frac57.8%

      \[\leadsto \color{blue}{\frac{\left(b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right) \cdot \left(--1\right)}{\left(3 \cdot a\right) \cdot -1}} \]
    10. *-commutative57.8%

      \[\leadsto \frac{\left(b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right) \cdot \left(--1\right)}{\color{blue}{-1 \cdot \left(3 \cdot a\right)}} \]
    11. times-frac57.8%

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

    \[\leadsto \color{blue}{\left(\sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)} - b\right) \cdot \frac{0.3333333333333333}{a}} \]
  4. Step-by-step derivation
    1. add-cbrt-cube57.8%

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

      \[\leadsto \left(\sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)} - b\right) \cdot \sqrt[3]{\color{blue}{{\left(\frac{0.3333333333333333}{a}\right)}^{3}}} \]
  5. Applied egg-rr57.8%

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

      \[\leadsto \color{blue}{\frac{\sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)} \cdot \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)} - b \cdot b}{\sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)} + b}} \cdot \sqrt[3]{{\left(\frac{0.3333333333333333}{a}\right)}^{3}} \]
    2. add-sqr-sqrt59.0%

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

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

    \[\leadsto \frac{\color{blue}{-3 \cdot \left(c \cdot a\right)}}{\sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)} + b} \cdot \sqrt[3]{{\left(\frac{0.3333333333333333}{a}\right)}^{3}} \]
  9. Final simplification98.8%

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

Alternative 2: 89.8% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \mathsf{fma}\left(b, b, a \cdot \left(-3 \cdot c\right)\right)\\ \mathbf{if}\;b \leq 0.44:\\ \;\;\;\;\frac{0.3333333333333333}{a} \cdot \frac{t_0 - b \cdot b}{b + \sqrt{t_0}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\mathsf{fma}\left(-2, \frac{b}{c}, \mathsf{fma}\left(-3, \frac{\left(c \cdot \left(a \cdot a\right)\right) \cdot -0.375}{{b}^{3}}, 1.5 \cdot \frac{a}{b}\right)\right)}\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (let* ((t_0 (fma b b (* a (* -3.0 c)))))
   (if (<= b 0.44)
     (* (/ 0.3333333333333333 a) (/ (- t_0 (* b b)) (+ b (sqrt t_0))))
     (/
      1.0
      (fma
       -2.0
       (/ b c)
       (fma -3.0 (/ (* (* c (* a a)) -0.375) (pow b 3.0)) (* 1.5 (/ a b))))))))
double code(double a, double b, double c) {
	double t_0 = fma(b, b, (a * (-3.0 * c)));
	double tmp;
	if (b <= 0.44) {
		tmp = (0.3333333333333333 / a) * ((t_0 - (b * b)) / (b + sqrt(t_0)));
	} else {
		tmp = 1.0 / fma(-2.0, (b / c), fma(-3.0, (((c * (a * a)) * -0.375) / pow(b, 3.0)), (1.5 * (a / b))));
	}
	return tmp;
}
function code(a, b, c)
	t_0 = fma(b, b, Float64(a * Float64(-3.0 * c)))
	tmp = 0.0
	if (b <= 0.44)
		tmp = Float64(Float64(0.3333333333333333 / a) * Float64(Float64(t_0 - Float64(b * b)) / Float64(b + sqrt(t_0))));
	else
		tmp = Float64(1.0 / fma(-2.0, Float64(b / c), fma(-3.0, Float64(Float64(Float64(c * Float64(a * a)) * -0.375) / (b ^ 3.0)), Float64(1.5 * Float64(a / b)))));
	end
	return tmp
end
code[a_, b_, c_] := Block[{t$95$0 = N[(b * b + N[(a * N[(-3.0 * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, 0.44], N[(N[(0.3333333333333333 / a), $MachinePrecision] * N[(N[(t$95$0 - N[(b * b), $MachinePrecision]), $MachinePrecision] / N[(b + N[Sqrt[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(-2.0 * N[(b / c), $MachinePrecision] + N[(-3.0 * N[(N[(N[(c * N[(a * a), $MachinePrecision]), $MachinePrecision] * -0.375), $MachinePrecision] / N[Power[b, 3.0], $MachinePrecision]), $MachinePrecision] + N[(1.5 * N[(a / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(b, b, a \cdot \left(-3 \cdot c\right)\right)\\
\mathbf{if}\;b \leq 0.44:\\
\;\;\;\;\frac{0.3333333333333333}{a} \cdot \frac{t_0 - b \cdot b}{b + \sqrt{t_0}}\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{\mathsf{fma}\left(-2, \frac{b}{c}, \mathsf{fma}\left(-3, \frac{\left(c \cdot \left(a \cdot a\right)\right) \cdot -0.375}{{b}^{3}}, 1.5 \cdot \frac{a}{b}\right)\right)}\\


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

    1. Initial program 88.2%

      \[\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-sub088.2%

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

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

        \[\leadsto \frac{\color{blue}{-\left(b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}}{3 \cdot a} \]
      4. neg-mul-188.2%

        \[\leadsto \frac{\color{blue}{-1 \cdot \left(b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}}{3 \cdot a} \]
      5. associate-*r/88.2%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)} - b\right) \cdot \frac{0.3333333333333333}{a}} \]
    4. Step-by-step derivation
      1. add-cbrt-cube88.2%

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

        \[\leadsto \left(\sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)} - b\right) \cdot \sqrt[3]{\color{blue}{{\left(\frac{0.3333333333333333}{a}\right)}^{3}}} \]
    5. Applied egg-rr88.2%

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

        \[\leadsto \color{blue}{\frac{\sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)} \cdot \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)} - b \cdot b}{\sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)} + b}} \cdot \sqrt[3]{{\left(\frac{0.3333333333333333}{a}\right)}^{3}} \]
      2. add-sqr-sqrt89.0%

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

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

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

    if 0.440000000000000002 < b

    1. Initial program 52.5%

      \[\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-sub052.5%

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

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

        \[\leadsto \frac{\color{blue}{-\left(b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}}{3 \cdot a} \]
      4. neg-mul-152.5%

        \[\leadsto \frac{\color{blue}{-1 \cdot \left(b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}}{3 \cdot a} \]
      5. associate-*r/52.5%

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

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

        \[\leadsto \frac{\color{blue}{--1}}{-1} \cdot \frac{b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      8. times-frac52.5%

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

        \[\leadsto \frac{\left(--1\right) \cdot \left(b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}{\color{blue}{\left(3 \cdot a\right) \cdot -1}} \]
      10. times-frac52.5%

        \[\leadsto \color{blue}{\frac{--1}{3 \cdot a} \cdot \frac{b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{-1}} \]
      11. associate-*l/52.5%

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

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

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

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

      \[\leadsto \color{blue}{{\left(\sqrt[3]{\frac{\mathsf{fma}\left(-1, b, \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(c \cdot a\right)\right)}\right)}{a \cdot 3}}\right)}^{3}} \]
    6. Step-by-step derivation
      1. rem-cube-cbrt52.6%

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

        \[\leadsto \color{blue}{\frac{1}{\frac{a \cdot 3}{\mathsf{fma}\left(-1, b, \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(c \cdot a\right)\right)}\right)}}} \]
      3. associate-*r*52.6%

        \[\leadsto \frac{1}{\frac{a \cdot 3}{\mathsf{fma}\left(-1, b, \sqrt{\mathsf{fma}\left(b, b, \color{blue}{\left(-3 \cdot c\right) \cdot a}\right)}\right)}} \]
      4. *-commutative52.6%

        \[\leadsto \frac{1}{\frac{a \cdot 3}{\mathsf{fma}\left(-1, b, \sqrt{\mathsf{fma}\left(b, b, \color{blue}{\left(c \cdot -3\right)} \cdot a\right)}\right)}} \]
      5. *-commutative52.6%

        \[\leadsto \frac{1}{\frac{a \cdot 3}{\mathsf{fma}\left(-1, b, \sqrt{\mathsf{fma}\left(b, b, \color{blue}{a \cdot \left(c \cdot -3\right)}\right)}\right)}} \]
    7. Applied egg-rr52.6%

      \[\leadsto \color{blue}{\frac{1}{\frac{a \cdot 3}{\mathsf{fma}\left(-1, b, \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)}\right)}}} \]
    8. Taylor expanded in b around inf 91.3%

      \[\leadsto \frac{1}{\color{blue}{-2 \cdot \frac{b}{c} + \left(-3 \cdot \frac{-0.75 \cdot \left(c \cdot {a}^{2}\right) + 0.375 \cdot \left(c \cdot {a}^{2}\right)}{{b}^{3}} + 1.5 \cdot \frac{a}{b}\right)}} \]
    9. Step-by-step derivation
      1. fma-def91.3%

        \[\leadsto \frac{1}{\color{blue}{\mathsf{fma}\left(-2, \frac{b}{c}, -3 \cdot \frac{-0.75 \cdot \left(c \cdot {a}^{2}\right) + 0.375 \cdot \left(c \cdot {a}^{2}\right)}{{b}^{3}} + 1.5 \cdot \frac{a}{b}\right)}} \]
      2. fma-def91.3%

        \[\leadsto \frac{1}{\mathsf{fma}\left(-2, \frac{b}{c}, \color{blue}{\mathsf{fma}\left(-3, \frac{-0.75 \cdot \left(c \cdot {a}^{2}\right) + 0.375 \cdot \left(c \cdot {a}^{2}\right)}{{b}^{3}}, 1.5 \cdot \frac{a}{b}\right)}\right)} \]
      3. distribute-rgt-out91.3%

        \[\leadsto \frac{1}{\mathsf{fma}\left(-2, \frac{b}{c}, \mathsf{fma}\left(-3, \frac{\color{blue}{\left(c \cdot {a}^{2}\right) \cdot \left(-0.75 + 0.375\right)}}{{b}^{3}}, 1.5 \cdot \frac{a}{b}\right)\right)} \]
      4. unpow291.3%

        \[\leadsto \frac{1}{\mathsf{fma}\left(-2, \frac{b}{c}, \mathsf{fma}\left(-3, \frac{\left(c \cdot \color{blue}{\left(a \cdot a\right)}\right) \cdot \left(-0.75 + 0.375\right)}{{b}^{3}}, 1.5 \cdot \frac{a}{b}\right)\right)} \]
      5. metadata-eval91.3%

        \[\leadsto \frac{1}{\mathsf{fma}\left(-2, \frac{b}{c}, \mathsf{fma}\left(-3, \frac{\left(c \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{-0.375}}{{b}^{3}}, 1.5 \cdot \frac{a}{b}\right)\right)} \]
    10. Simplified91.3%

      \[\leadsto \frac{1}{\color{blue}{\mathsf{fma}\left(-2, \frac{b}{c}, \mathsf{fma}\left(-3, \frac{\left(c \cdot \left(a \cdot a\right)\right) \cdot -0.375}{{b}^{3}}, 1.5 \cdot \frac{a}{b}\right)\right)}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification91.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 0.44:\\ \;\;\;\;\frac{0.3333333333333333}{a} \cdot \frac{\mathsf{fma}\left(b, b, a \cdot \left(-3 \cdot c\right)\right) - b \cdot b}{b + \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(-3 \cdot c\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\mathsf{fma}\left(-2, \frac{b}{c}, \mathsf{fma}\left(-3, \frac{\left(c \cdot \left(a \cdot a\right)\right) \cdot -0.375}{{b}^{3}}, 1.5 \cdot \frac{a}{b}\right)\right)}\\ \end{array} \]

Alternative 3: 89.8% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \mathsf{fma}\left(b, b, a \cdot \left(-3 \cdot c\right)\right)\\ \mathbf{if}\;b \leq 0.43:\\ \;\;\;\;\frac{\frac{0.3333333333333333}{a} \cdot \left(t_0 - b \cdot b\right)}{b + \sqrt{t_0}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\mathsf{fma}\left(-2, \frac{b}{c}, \mathsf{fma}\left(-3, \frac{\left(c \cdot \left(a \cdot a\right)\right) \cdot -0.375}{{b}^{3}}, 1.5 \cdot \frac{a}{b}\right)\right)}\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (let* ((t_0 (fma b b (* a (* -3.0 c)))))
   (if (<= b 0.43)
     (/ (* (/ 0.3333333333333333 a) (- t_0 (* b b))) (+ b (sqrt t_0)))
     (/
      1.0
      (fma
       -2.0
       (/ b c)
       (fma -3.0 (/ (* (* c (* a a)) -0.375) (pow b 3.0)) (* 1.5 (/ a b))))))))
double code(double a, double b, double c) {
	double t_0 = fma(b, b, (a * (-3.0 * c)));
	double tmp;
	if (b <= 0.43) {
		tmp = ((0.3333333333333333 / a) * (t_0 - (b * b))) / (b + sqrt(t_0));
	} else {
		tmp = 1.0 / fma(-2.0, (b / c), fma(-3.0, (((c * (a * a)) * -0.375) / pow(b, 3.0)), (1.5 * (a / b))));
	}
	return tmp;
}
function code(a, b, c)
	t_0 = fma(b, b, Float64(a * Float64(-3.0 * c)))
	tmp = 0.0
	if (b <= 0.43)
		tmp = Float64(Float64(Float64(0.3333333333333333 / a) * Float64(t_0 - Float64(b * b))) / Float64(b + sqrt(t_0)));
	else
		tmp = Float64(1.0 / fma(-2.0, Float64(b / c), fma(-3.0, Float64(Float64(Float64(c * Float64(a * a)) * -0.375) / (b ^ 3.0)), Float64(1.5 * Float64(a / b)))));
	end
	return tmp
end
code[a_, b_, c_] := Block[{t$95$0 = N[(b * b + N[(a * N[(-3.0 * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, 0.43], N[(N[(N[(0.3333333333333333 / a), $MachinePrecision] * N[(t$95$0 - N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(b + N[Sqrt[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(-2.0 * N[(b / c), $MachinePrecision] + N[(-3.0 * N[(N[(N[(c * N[(a * a), $MachinePrecision]), $MachinePrecision] * -0.375), $MachinePrecision] / N[Power[b, 3.0], $MachinePrecision]), $MachinePrecision] + N[(1.5 * N[(a / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(b, b, a \cdot \left(-3 \cdot c\right)\right)\\
\mathbf{if}\;b \leq 0.43:\\
\;\;\;\;\frac{\frac{0.3333333333333333}{a} \cdot \left(t_0 - b \cdot b\right)}{b + \sqrt{t_0}}\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{\mathsf{fma}\left(-2, \frac{b}{c}, \mathsf{fma}\left(-3, \frac{\left(c \cdot \left(a \cdot a\right)\right) \cdot -0.375}{{b}^{3}}, 1.5 \cdot \frac{a}{b}\right)\right)}\\


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

    1. Initial program 88.2%

      \[\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-sub088.2%

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

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

        \[\leadsto \frac{\color{blue}{-\left(b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}}{3 \cdot a} \]
      4. neg-mul-188.2%

        \[\leadsto \frac{\color{blue}{-1 \cdot \left(b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}}{3 \cdot a} \]
      5. associate-*r/88.2%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)} - b\right) \cdot \frac{0.3333333333333333}{a}} \]
    4. Step-by-step derivation
      1. add-cube-cbrt88.0%

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

        \[\leadsto \left(\sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)} - b\right) \cdot \color{blue}{{\left(\sqrt[3]{\frac{0.3333333333333333}{a}}\right)}^{3}} \]
    5. Applied egg-rr88.0%

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

        \[\leadsto \color{blue}{\frac{\sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)} \cdot \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)} - b \cdot b}{\sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)} + b}} \cdot {\left(\sqrt[3]{\frac{0.3333333333333333}{a}}\right)}^{3} \]
      2. add-sqr-sqrt89.0%

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)} - b \cdot b}{\sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)} + b} \cdot {\left(\sqrt[3]{\frac{0.3333333333333333}{a}}\right)}^{3} \]
      3. rem-cube-cbrt89.1%

        \[\leadsto \frac{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right) - b \cdot b}{\sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)} + b} \cdot \color{blue}{\frac{0.3333333333333333}{a}} \]
      4. associate-*l/89.2%

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

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

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

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

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

    if 0.429999999999999993 < b

    1. Initial program 52.5%

      \[\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-sub052.5%

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

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

        \[\leadsto \frac{\color{blue}{-\left(b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}}{3 \cdot a} \]
      4. neg-mul-152.5%

        \[\leadsto \frac{\color{blue}{-1 \cdot \left(b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}}{3 \cdot a} \]
      5. associate-*r/52.5%

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

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

        \[\leadsto \frac{\color{blue}{--1}}{-1} \cdot \frac{b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      8. times-frac52.5%

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

        \[\leadsto \frac{\left(--1\right) \cdot \left(b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}{\color{blue}{\left(3 \cdot a\right) \cdot -1}} \]
      10. times-frac52.5%

        \[\leadsto \color{blue}{\frac{--1}{3 \cdot a} \cdot \frac{b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{-1}} \]
      11. associate-*l/52.5%

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

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

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

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

      \[\leadsto \color{blue}{{\left(\sqrt[3]{\frac{\mathsf{fma}\left(-1, b, \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(c \cdot a\right)\right)}\right)}{a \cdot 3}}\right)}^{3}} \]
    6. Step-by-step derivation
      1. rem-cube-cbrt52.6%

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

        \[\leadsto \color{blue}{\frac{1}{\frac{a \cdot 3}{\mathsf{fma}\left(-1, b, \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(c \cdot a\right)\right)}\right)}}} \]
      3. associate-*r*52.6%

        \[\leadsto \frac{1}{\frac{a \cdot 3}{\mathsf{fma}\left(-1, b, \sqrt{\mathsf{fma}\left(b, b, \color{blue}{\left(-3 \cdot c\right) \cdot a}\right)}\right)}} \]
      4. *-commutative52.6%

        \[\leadsto \frac{1}{\frac{a \cdot 3}{\mathsf{fma}\left(-1, b, \sqrt{\mathsf{fma}\left(b, b, \color{blue}{\left(c \cdot -3\right)} \cdot a\right)}\right)}} \]
      5. *-commutative52.6%

        \[\leadsto \frac{1}{\frac{a \cdot 3}{\mathsf{fma}\left(-1, b, \sqrt{\mathsf{fma}\left(b, b, \color{blue}{a \cdot \left(c \cdot -3\right)}\right)}\right)}} \]
    7. Applied egg-rr52.6%

      \[\leadsto \color{blue}{\frac{1}{\frac{a \cdot 3}{\mathsf{fma}\left(-1, b, \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)}\right)}}} \]
    8. Taylor expanded in b around inf 91.3%

      \[\leadsto \frac{1}{\color{blue}{-2 \cdot \frac{b}{c} + \left(-3 \cdot \frac{-0.75 \cdot \left(c \cdot {a}^{2}\right) + 0.375 \cdot \left(c \cdot {a}^{2}\right)}{{b}^{3}} + 1.5 \cdot \frac{a}{b}\right)}} \]
    9. Step-by-step derivation
      1. fma-def91.3%

        \[\leadsto \frac{1}{\color{blue}{\mathsf{fma}\left(-2, \frac{b}{c}, -3 \cdot \frac{-0.75 \cdot \left(c \cdot {a}^{2}\right) + 0.375 \cdot \left(c \cdot {a}^{2}\right)}{{b}^{3}} + 1.5 \cdot \frac{a}{b}\right)}} \]
      2. fma-def91.3%

        \[\leadsto \frac{1}{\mathsf{fma}\left(-2, \frac{b}{c}, \color{blue}{\mathsf{fma}\left(-3, \frac{-0.75 \cdot \left(c \cdot {a}^{2}\right) + 0.375 \cdot \left(c \cdot {a}^{2}\right)}{{b}^{3}}, 1.5 \cdot \frac{a}{b}\right)}\right)} \]
      3. distribute-rgt-out91.3%

        \[\leadsto \frac{1}{\mathsf{fma}\left(-2, \frac{b}{c}, \mathsf{fma}\left(-3, \frac{\color{blue}{\left(c \cdot {a}^{2}\right) \cdot \left(-0.75 + 0.375\right)}}{{b}^{3}}, 1.5 \cdot \frac{a}{b}\right)\right)} \]
      4. unpow291.3%

        \[\leadsto \frac{1}{\mathsf{fma}\left(-2, \frac{b}{c}, \mathsf{fma}\left(-3, \frac{\left(c \cdot \color{blue}{\left(a \cdot a\right)}\right) \cdot \left(-0.75 + 0.375\right)}{{b}^{3}}, 1.5 \cdot \frac{a}{b}\right)\right)} \]
      5. metadata-eval91.3%

        \[\leadsto \frac{1}{\mathsf{fma}\left(-2, \frac{b}{c}, \mathsf{fma}\left(-3, \frac{\left(c \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{-0.375}}{{b}^{3}}, 1.5 \cdot \frac{a}{b}\right)\right)} \]
    10. Simplified91.3%

      \[\leadsto \frac{1}{\color{blue}{\mathsf{fma}\left(-2, \frac{b}{c}, \mathsf{fma}\left(-3, \frac{\left(c \cdot \left(a \cdot a\right)\right) \cdot -0.375}{{b}^{3}}, 1.5 \cdot \frac{a}{b}\right)\right)}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification91.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 0.43:\\ \;\;\;\;\frac{\frac{0.3333333333333333}{a} \cdot \left(\mathsf{fma}\left(b, b, a \cdot \left(-3 \cdot c\right)\right) - b \cdot b\right)}{b + \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(-3 \cdot c\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\mathsf{fma}\left(-2, \frac{b}{c}, \mathsf{fma}\left(-3, \frac{\left(c \cdot \left(a \cdot a\right)\right) \cdot -0.375}{{b}^{3}}, 1.5 \cdot \frac{a}{b}\right)\right)}\\ \end{array} \]

Alternative 4: 89.6% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq 0.19:\\
\;\;\;\;\frac{\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(-3 \cdot a\right)\right)} - b}{a \cdot 3}\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{\mathsf{fma}\left(-2, \frac{b}{c}, \mathsf{fma}\left(-3, \frac{\left(c \cdot \left(a \cdot a\right)\right) \cdot -0.375}{{b}^{3}}, 1.5 \cdot \frac{a}{b}\right)\right)}\\


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

    1. Initial program 88.8%

      \[\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-sub088.8%

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

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

        \[\leadsto \frac{\color{blue}{-\left(b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}}{3 \cdot a} \]
      4. neg-mul-188.8%

        \[\leadsto \frac{\color{blue}{-1 \cdot \left(b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}}{3 \cdot a} \]
      5. associate-*r/88.8%

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

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

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

        \[\leadsto \color{blue}{\frac{\left(--1\right) \cdot \left(b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}{-1 \cdot \left(3 \cdot a\right)}} \]
      9. *-commutative88.8%

        \[\leadsto \frac{\left(--1\right) \cdot \left(b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}{\color{blue}{\left(3 \cdot a\right) \cdot -1}} \]
      10. times-frac88.8%

        \[\leadsto \color{blue}{\frac{--1}{3 \cdot a} \cdot \frac{b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{-1}} \]
      11. associate-*l/88.8%

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

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

    if 0.19 < b

    1. Initial program 52.9%

      \[\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-sub052.9%

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

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

        \[\leadsto \frac{\color{blue}{-\left(b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}}{3 \cdot a} \]
      4. neg-mul-152.9%

        \[\leadsto \frac{\color{blue}{-1 \cdot \left(b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}}{3 \cdot a} \]
      5. associate-*r/52.9%

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

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

        \[\leadsto \frac{\color{blue}{--1}}{-1} \cdot \frac{b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      8. times-frac52.9%

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

        \[\leadsto \frac{\left(--1\right) \cdot \left(b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}{\color{blue}{\left(3 \cdot a\right) \cdot -1}} \]
      10. times-frac52.9%

        \[\leadsto \color{blue}{\frac{--1}{3 \cdot a} \cdot \frac{b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{-1}} \]
      11. associate-*l/52.9%

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

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)}}{3 \cdot a}} \]
    4. Step-by-step derivation
      1. add-cube-cbrt52.9%

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

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

      \[\leadsto \color{blue}{{\left(\sqrt[3]{\frac{\mathsf{fma}\left(-1, b, \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(c \cdot a\right)\right)}\right)}{a \cdot 3}}\right)}^{3}} \]
    6. Step-by-step derivation
      1. rem-cube-cbrt52.9%

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

        \[\leadsto \color{blue}{\frac{1}{\frac{a \cdot 3}{\mathsf{fma}\left(-1, b, \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(c \cdot a\right)\right)}\right)}}} \]
      3. associate-*r*52.9%

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

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

        \[\leadsto \frac{1}{\frac{a \cdot 3}{\mathsf{fma}\left(-1, b, \sqrt{\mathsf{fma}\left(b, b, \color{blue}{a \cdot \left(c \cdot -3\right)}\right)}\right)}} \]
    7. Applied egg-rr52.9%

      \[\leadsto \color{blue}{\frac{1}{\frac{a \cdot 3}{\mathsf{fma}\left(-1, b, \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)}\right)}}} \]
    8. Taylor expanded in b around inf 91.2%

      \[\leadsto \frac{1}{\color{blue}{-2 \cdot \frac{b}{c} + \left(-3 \cdot \frac{-0.75 \cdot \left(c \cdot {a}^{2}\right) + 0.375 \cdot \left(c \cdot {a}^{2}\right)}{{b}^{3}} + 1.5 \cdot \frac{a}{b}\right)}} \]
    9. Step-by-step derivation
      1. fma-def91.2%

        \[\leadsto \frac{1}{\color{blue}{\mathsf{fma}\left(-2, \frac{b}{c}, -3 \cdot \frac{-0.75 \cdot \left(c \cdot {a}^{2}\right) + 0.375 \cdot \left(c \cdot {a}^{2}\right)}{{b}^{3}} + 1.5 \cdot \frac{a}{b}\right)}} \]
      2. fma-def91.2%

        \[\leadsto \frac{1}{\mathsf{fma}\left(-2, \frac{b}{c}, \color{blue}{\mathsf{fma}\left(-3, \frac{-0.75 \cdot \left(c \cdot {a}^{2}\right) + 0.375 \cdot \left(c \cdot {a}^{2}\right)}{{b}^{3}}, 1.5 \cdot \frac{a}{b}\right)}\right)} \]
      3. distribute-rgt-out91.2%

        \[\leadsto \frac{1}{\mathsf{fma}\left(-2, \frac{b}{c}, \mathsf{fma}\left(-3, \frac{\color{blue}{\left(c \cdot {a}^{2}\right) \cdot \left(-0.75 + 0.375\right)}}{{b}^{3}}, 1.5 \cdot \frac{a}{b}\right)\right)} \]
      4. unpow291.2%

        \[\leadsto \frac{1}{\mathsf{fma}\left(-2, \frac{b}{c}, \mathsf{fma}\left(-3, \frac{\left(c \cdot \color{blue}{\left(a \cdot a\right)}\right) \cdot \left(-0.75 + 0.375\right)}{{b}^{3}}, 1.5 \cdot \frac{a}{b}\right)\right)} \]
      5. metadata-eval91.2%

        \[\leadsto \frac{1}{\mathsf{fma}\left(-2, \frac{b}{c}, \mathsf{fma}\left(-3, \frac{\left(c \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{-0.375}}{{b}^{3}}, 1.5 \cdot \frac{a}{b}\right)\right)} \]
    10. Simplified91.2%

      \[\leadsto \frac{1}{\color{blue}{\mathsf{fma}\left(-2, \frac{b}{c}, \mathsf{fma}\left(-3, \frac{\left(c \cdot \left(a \cdot a\right)\right) \cdot -0.375}{{b}^{3}}, 1.5 \cdot \frac{a}{b}\right)\right)}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification90.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 0.19:\\ \;\;\;\;\frac{\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(-3 \cdot a\right)\right)} - b}{a \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\mathsf{fma}\left(-2, \frac{b}{c}, \mathsf{fma}\left(-3, \frac{\left(c \cdot \left(a \cdot a\right)\right) \cdot -0.375}{{b}^{3}}, 1.5 \cdot \frac{a}{b}\right)\right)}\\ \end{array} \]

Alternative 5: 85.2% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq 65:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{b - \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(-3 \cdot c\right)\right)}}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{1.5 \cdot \frac{a}{b} + -2 \cdot \frac{b}{c}}\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b 65.0)
   (* -0.3333333333333333 (/ (- b (sqrt (fma b b (* a (* -3.0 c))))) a))
   (/ 1.0 (+ (* 1.5 (/ a b)) (* -2.0 (/ b c))))))
double code(double a, double b, double c) {
	double tmp;
	if (b <= 65.0) {
		tmp = -0.3333333333333333 * ((b - sqrt(fma(b, b, (a * (-3.0 * c))))) / a);
	} else {
		tmp = 1.0 / ((1.5 * (a / b)) + (-2.0 * (b / c)));
	}
	return tmp;
}
function code(a, b, c)
	tmp = 0.0
	if (b <= 65.0)
		tmp = Float64(-0.3333333333333333 * Float64(Float64(b - sqrt(fma(b, b, Float64(a * Float64(-3.0 * c))))) / a));
	else
		tmp = Float64(1.0 / Float64(Float64(1.5 * Float64(a / b)) + Float64(-2.0 * Float64(b / c))));
	end
	return tmp
end
code[a_, b_, c_] := If[LessEqual[b, 65.0], N[(-0.3333333333333333 * N[(N[(b - N[Sqrt[N[(b * b + N[(a * N[(-3.0 * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[(1.5 * N[(a / b), $MachinePrecision]), $MachinePrecision] + N[(-2.0 * N[(b / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq 65:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{b - \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(-3 \cdot c\right)\right)}}{a}\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{1.5 \cdot \frac{a}{b} + -2 \cdot \frac{b}{c}}\\


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

    1. Initial program 81.9%

      \[\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-identity81.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-0.3333333333333333} \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{-a} \]
      15. neg-mul-181.9%

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

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

    if 65 < b

    1. Initial program 47.2%

      \[\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-sub047.2%

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

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

        \[\leadsto \frac{\color{blue}{-\left(b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}}{3 \cdot a} \]
      4. neg-mul-147.2%

        \[\leadsto \frac{\color{blue}{-1 \cdot \left(b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}}{3 \cdot a} \]
      5. associate-*r/47.2%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{--1}{3 \cdot a} \cdot \frac{b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{-1}} \]
      11. associate-*l/47.2%

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

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)}}{3 \cdot a}} \]
    4. Step-by-step derivation
      1. add-cube-cbrt47.2%

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

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

      \[\leadsto \color{blue}{{\left(\sqrt[3]{\frac{\mathsf{fma}\left(-1, b, \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(c \cdot a\right)\right)}\right)}{a \cdot 3}}\right)}^{3}} \]
    6. Step-by-step derivation
      1. rem-cube-cbrt47.3%

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

        \[\leadsto \color{blue}{\frac{1}{\frac{a \cdot 3}{\mathsf{fma}\left(-1, b, \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(c \cdot a\right)\right)}\right)}}} \]
      3. associate-*r*47.2%

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

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

        \[\leadsto \frac{1}{\frac{a \cdot 3}{\mathsf{fma}\left(-1, b, \sqrt{\mathsf{fma}\left(b, b, \color{blue}{a \cdot \left(c \cdot -3\right)}\right)}\right)}} \]
    7. Applied egg-rr47.2%

      \[\leadsto \color{blue}{\frac{1}{\frac{a \cdot 3}{\mathsf{fma}\left(-1, b, \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)}\right)}}} \]
    8. Taylor expanded in b around inf 88.9%

      \[\leadsto \frac{1}{\color{blue}{-2 \cdot \frac{b}{c} + 1.5 \cdot \frac{a}{b}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification86.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 65:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{b - \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(-3 \cdot c\right)\right)}}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{1.5 \cdot \frac{a}{b} + -2 \cdot \frac{b}{c}}\\ \end{array} \]

Alternative 6: 85.2% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq 65:\\ \;\;\;\;\frac{0.3333333333333333}{a} \cdot \left(\sqrt{\mathsf{fma}\left(b, b, a \cdot \left(-3 \cdot c\right)\right)} - b\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{1.5 \cdot \frac{a}{b} + -2 \cdot \frac{b}{c}}\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b 65.0)
   (* (/ 0.3333333333333333 a) (- (sqrt (fma b b (* a (* -3.0 c)))) b))
   (/ 1.0 (+ (* 1.5 (/ a b)) (* -2.0 (/ b c))))))
double code(double a, double b, double c) {
	double tmp;
	if (b <= 65.0) {
		tmp = (0.3333333333333333 / a) * (sqrt(fma(b, b, (a * (-3.0 * c)))) - b);
	} else {
		tmp = 1.0 / ((1.5 * (a / b)) + (-2.0 * (b / c)));
	}
	return tmp;
}
function code(a, b, c)
	tmp = 0.0
	if (b <= 65.0)
		tmp = Float64(Float64(0.3333333333333333 / a) * Float64(sqrt(fma(b, b, Float64(a * Float64(-3.0 * c)))) - b));
	else
		tmp = Float64(1.0 / Float64(Float64(1.5 * Float64(a / b)) + Float64(-2.0 * Float64(b / c))));
	end
	return tmp
end
code[a_, b_, c_] := If[LessEqual[b, 65.0], N[(N[(0.3333333333333333 / a), $MachinePrecision] * N[(N[Sqrt[N[(b * b + N[(a * N[(-3.0 * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[(1.5 * N[(a / b), $MachinePrecision]), $MachinePrecision] + N[(-2.0 * N[(b / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq 65:\\
\;\;\;\;\frac{0.3333333333333333}{a} \cdot \left(\sqrt{\mathsf{fma}\left(b, b, a \cdot \left(-3 \cdot c\right)\right)} - b\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{1.5 \cdot \frac{a}{b} + -2 \cdot \frac{b}{c}}\\


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

    1. Initial program 81.9%

      \[\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-sub081.9%

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

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

        \[\leadsto \frac{\color{blue}{-\left(b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}}{3 \cdot a} \]
      4. neg-mul-181.9%

        \[\leadsto \frac{\color{blue}{-1 \cdot \left(b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}}{3 \cdot a} \]
      5. associate-*r/81.9%

        \[\leadsto \color{blue}{-1 \cdot \frac{b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}} \]
      6. *-commutative81.9%

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

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

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

        \[\leadsto \color{blue}{\frac{\left(b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right) \cdot \left(--1\right)}{\left(3 \cdot a\right) \cdot -1}} \]
      10. *-commutative81.9%

        \[\leadsto \frac{\left(b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right) \cdot \left(--1\right)}{\color{blue}{-1 \cdot \left(3 \cdot a\right)}} \]
      11. times-frac81.9%

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

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

    if 65 < b

    1. Initial program 47.2%

      \[\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-sub047.2%

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

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

        \[\leadsto \frac{\color{blue}{-\left(b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}}{3 \cdot a} \]
      4. neg-mul-147.2%

        \[\leadsto \frac{\color{blue}{-1 \cdot \left(b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}}{3 \cdot a} \]
      5. associate-*r/47.2%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{--1}{3 \cdot a} \cdot \frac{b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{-1}} \]
      11. associate-*l/47.2%

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

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)}}{3 \cdot a}} \]
    4. Step-by-step derivation
      1. add-cube-cbrt47.2%

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

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

      \[\leadsto \color{blue}{{\left(\sqrt[3]{\frac{\mathsf{fma}\left(-1, b, \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(c \cdot a\right)\right)}\right)}{a \cdot 3}}\right)}^{3}} \]
    6. Step-by-step derivation
      1. rem-cube-cbrt47.3%

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

        \[\leadsto \color{blue}{\frac{1}{\frac{a \cdot 3}{\mathsf{fma}\left(-1, b, \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(c \cdot a\right)\right)}\right)}}} \]
      3. associate-*r*47.2%

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

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

        \[\leadsto \frac{1}{\frac{a \cdot 3}{\mathsf{fma}\left(-1, b, \sqrt{\mathsf{fma}\left(b, b, \color{blue}{a \cdot \left(c \cdot -3\right)}\right)}\right)}} \]
    7. Applied egg-rr47.2%

      \[\leadsto \color{blue}{\frac{1}{\frac{a \cdot 3}{\mathsf{fma}\left(-1, b, \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)}\right)}}} \]
    8. Taylor expanded in b around inf 88.9%

      \[\leadsto \frac{1}{\color{blue}{-2 \cdot \frac{b}{c} + 1.5 \cdot \frac{a}{b}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification86.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 65:\\ \;\;\;\;\frac{0.3333333333333333}{a} \cdot \left(\sqrt{\mathsf{fma}\left(b, b, a \cdot \left(-3 \cdot c\right)\right)} - b\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{1.5 \cdot \frac{a}{b} + -2 \cdot \frac{b}{c}}\\ \end{array} \]

Alternative 7: 85.2% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq 65:\\ \;\;\;\;\frac{-0.3333333333333333 \cdot \left(b - \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(c \cdot a\right)\right)}\right)}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{1.5 \cdot \frac{a}{b} + -2 \cdot \frac{b}{c}}\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b 65.0)
   (/ (* -0.3333333333333333 (- b (sqrt (fma b b (* -3.0 (* c a)))))) a)
   (/ 1.0 (+ (* 1.5 (/ a b)) (* -2.0 (/ b c))))))
double code(double a, double b, double c) {
	double tmp;
	if (b <= 65.0) {
		tmp = (-0.3333333333333333 * (b - sqrt(fma(b, b, (-3.0 * (c * a)))))) / a;
	} else {
		tmp = 1.0 / ((1.5 * (a / b)) + (-2.0 * (b / c)));
	}
	return tmp;
}
function code(a, b, c)
	tmp = 0.0
	if (b <= 65.0)
		tmp = Float64(Float64(-0.3333333333333333 * Float64(b - sqrt(fma(b, b, Float64(-3.0 * Float64(c * a)))))) / a);
	else
		tmp = Float64(1.0 / Float64(Float64(1.5 * Float64(a / b)) + Float64(-2.0 * Float64(b / c))));
	end
	return tmp
end
code[a_, b_, c_] := If[LessEqual[b, 65.0], N[(N[(-0.3333333333333333 * N[(b - N[Sqrt[N[(b * b + N[(-3.0 * N[(c * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], N[(1.0 / N[(N[(1.5 * N[(a / b), $MachinePrecision]), $MachinePrecision] + N[(-2.0 * N[(b / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq 65:\\
\;\;\;\;\frac{-0.3333333333333333 \cdot \left(b - \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(c \cdot a\right)\right)}\right)}{a}\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{1.5 \cdot \frac{a}{b} + -2 \cdot \frac{b}{c}}\\


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

    1. Initial program 81.9%

      \[\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-identity81.9%

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

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

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

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

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

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

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

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

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

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

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

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

    if 65 < b

    1. Initial program 47.2%

      \[\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-sub047.2%

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

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

        \[\leadsto \frac{\color{blue}{-\left(b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}}{3 \cdot a} \]
      4. neg-mul-147.2%

        \[\leadsto \frac{\color{blue}{-1 \cdot \left(b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}}{3 \cdot a} \]
      5. associate-*r/47.2%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{--1}{3 \cdot a} \cdot \frac{b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{-1}} \]
      11. associate-*l/47.2%

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

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)}}{3 \cdot a}} \]
    4. Step-by-step derivation
      1. add-cube-cbrt47.2%

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

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

      \[\leadsto \color{blue}{{\left(\sqrt[3]{\frac{\mathsf{fma}\left(-1, b, \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(c \cdot a\right)\right)}\right)}{a \cdot 3}}\right)}^{3}} \]
    6. Step-by-step derivation
      1. rem-cube-cbrt47.3%

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

        \[\leadsto \color{blue}{\frac{1}{\frac{a \cdot 3}{\mathsf{fma}\left(-1, b, \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(c \cdot a\right)\right)}\right)}}} \]
      3. associate-*r*47.2%

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

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

        \[\leadsto \frac{1}{\frac{a \cdot 3}{\mathsf{fma}\left(-1, b, \sqrt{\mathsf{fma}\left(b, b, \color{blue}{a \cdot \left(c \cdot -3\right)}\right)}\right)}} \]
    7. Applied egg-rr47.2%

      \[\leadsto \color{blue}{\frac{1}{\frac{a \cdot 3}{\mathsf{fma}\left(-1, b, \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)}\right)}}} \]
    8. Taylor expanded in b around inf 88.9%

      \[\leadsto \frac{1}{\color{blue}{-2 \cdot \frac{b}{c} + 1.5 \cdot \frac{a}{b}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification86.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 65:\\ \;\;\;\;\frac{-0.3333333333333333 \cdot \left(b - \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(c \cdot a\right)\right)}\right)}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{1.5 \cdot \frac{a}{b} + -2 \cdot \frac{b}{c}}\\ \end{array} \]

Alternative 8: 85.2% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq 65:\\
\;\;\;\;\frac{\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(-3 \cdot a\right)\right)} - b}{a \cdot 3}\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{1.5 \cdot \frac{a}{b} + -2 \cdot \frac{b}{c}}\\


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

    1. Initial program 81.9%

      \[\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-sub081.9%

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

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

        \[\leadsto \frac{\color{blue}{-\left(b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}}{3 \cdot a} \]
      4. neg-mul-181.9%

        \[\leadsto \frac{\color{blue}{-1 \cdot \left(b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}}{3 \cdot a} \]
      5. associate-*r/81.9%

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

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

        \[\leadsto \frac{\color{blue}{--1}}{-1} \cdot \frac{b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      8. times-frac81.9%

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

        \[\leadsto \frac{\left(--1\right) \cdot \left(b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}{\color{blue}{\left(3 \cdot a\right) \cdot -1}} \]
      10. times-frac81.9%

        \[\leadsto \color{blue}{\frac{--1}{3 \cdot a} \cdot \frac{b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{-1}} \]
      11. associate-*l/81.9%

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

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

    if 65 < b

    1. Initial program 47.2%

      \[\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-sub047.2%

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

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

        \[\leadsto \frac{\color{blue}{-\left(b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}}{3 \cdot a} \]
      4. neg-mul-147.2%

        \[\leadsto \frac{\color{blue}{-1 \cdot \left(b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}}{3 \cdot a} \]
      5. associate-*r/47.2%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{--1}{3 \cdot a} \cdot \frac{b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{-1}} \]
      11. associate-*l/47.2%

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

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)}}{3 \cdot a}} \]
    4. Step-by-step derivation
      1. add-cube-cbrt47.2%

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

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

      \[\leadsto \color{blue}{{\left(\sqrt[3]{\frac{\mathsf{fma}\left(-1, b, \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(c \cdot a\right)\right)}\right)}{a \cdot 3}}\right)}^{3}} \]
    6. Step-by-step derivation
      1. rem-cube-cbrt47.3%

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

        \[\leadsto \color{blue}{\frac{1}{\frac{a \cdot 3}{\mathsf{fma}\left(-1, b, \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(c \cdot a\right)\right)}\right)}}} \]
      3. associate-*r*47.2%

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

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

        \[\leadsto \frac{1}{\frac{a \cdot 3}{\mathsf{fma}\left(-1, b, \sqrt{\mathsf{fma}\left(b, b, \color{blue}{a \cdot \left(c \cdot -3\right)}\right)}\right)}} \]
    7. Applied egg-rr47.2%

      \[\leadsto \color{blue}{\frac{1}{\frac{a \cdot 3}{\mathsf{fma}\left(-1, b, \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)}\right)}}} \]
    8. Taylor expanded in b around inf 88.9%

      \[\leadsto \frac{1}{\color{blue}{-2 \cdot \frac{b}{c} + 1.5 \cdot \frac{a}{b}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification86.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 65:\\ \;\;\;\;\frac{\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(-3 \cdot a\right)\right)} - b}{a \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{1.5 \cdot \frac{a}{b} + -2 \cdot \frac{b}{c}}\\ \end{array} \]

Alternative 9: 85.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq 65:\\ \;\;\;\;\frac{\sqrt{b \cdot b - 3 \cdot \left(c \cdot a\right)} - b}{a \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{1.5 \cdot \frac{a}{b} + -2 \cdot \frac{b}{c}}\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b 65.0)
   (/ (- (sqrt (- (* b b) (* 3.0 (* c a)))) b) (* a 3.0))
   (/ 1.0 (+ (* 1.5 (/ a b)) (* -2.0 (/ b c))))))
double code(double a, double b, double c) {
	double tmp;
	if (b <= 65.0) {
		tmp = (sqrt(((b * b) - (3.0 * (c * a)))) - b) / (a * 3.0);
	} else {
		tmp = 1.0 / ((1.5 * (a / b)) + (-2.0 * (b / c)));
	}
	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 <= 65.0d0) then
        tmp = (sqrt(((b * b) - (3.0d0 * (c * a)))) - b) / (a * 3.0d0)
    else
        tmp = 1.0d0 / ((1.5d0 * (a / b)) + ((-2.0d0) * (b / c)))
    end if
    code = tmp
end function
public static double code(double a, double b, double c) {
	double tmp;
	if (b <= 65.0) {
		tmp = (Math.sqrt(((b * b) - (3.0 * (c * a)))) - b) / (a * 3.0);
	} else {
		tmp = 1.0 / ((1.5 * (a / b)) + (-2.0 * (b / c)));
	}
	return tmp;
}
def code(a, b, c):
	tmp = 0
	if b <= 65.0:
		tmp = (math.sqrt(((b * b) - (3.0 * (c * a)))) - b) / (a * 3.0)
	else:
		tmp = 1.0 / ((1.5 * (a / b)) + (-2.0 * (b / c)))
	return tmp
function code(a, b, c)
	tmp = 0.0
	if (b <= 65.0)
		tmp = Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(3.0 * Float64(c * a)))) - b) / Float64(a * 3.0));
	else
		tmp = Float64(1.0 / Float64(Float64(1.5 * Float64(a / b)) + Float64(-2.0 * Float64(b / c))));
	end
	return tmp
end
function tmp_2 = code(a, b, c)
	tmp = 0.0;
	if (b <= 65.0)
		tmp = (sqrt(((b * b) - (3.0 * (c * a)))) - b) / (a * 3.0);
	else
		tmp = 1.0 / ((1.5 * (a / b)) + (-2.0 * (b / c)));
	end
	tmp_2 = tmp;
end
code[a_, b_, c_] := If[LessEqual[b, 65.0], N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(3.0 * N[(c * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 3.0), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[(1.5 * N[(a / b), $MachinePrecision]), $MachinePrecision] + N[(-2.0 * N[(b / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq 65:\\
\;\;\;\;\frac{\sqrt{b \cdot b - 3 \cdot \left(c \cdot a\right)} - b}{a \cdot 3}\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{1.5 \cdot \frac{a}{b} + -2 \cdot \frac{b}{c}}\\


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

    1. Initial program 81.9%

      \[\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-sub081.9%

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

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

        \[\leadsto \frac{\color{blue}{-\left(b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}}{3 \cdot a} \]
      4. neg-mul-181.9%

        \[\leadsto \frac{\color{blue}{-1 \cdot \left(b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}}{3 \cdot a} \]
      5. associate-*r/81.9%

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

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

        \[\leadsto \frac{\color{blue}{--1}}{-1} \cdot \frac{b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      8. times-frac81.9%

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

        \[\leadsto \frac{\left(--1\right) \cdot \left(b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}{\color{blue}{\left(3 \cdot a\right) \cdot -1}} \]
      10. times-frac81.9%

        \[\leadsto \color{blue}{\frac{--1}{3 \cdot a} \cdot \frac{b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{-1}} \]
      11. associate-*l/81.9%

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

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

    if 65 < b

    1. Initial program 47.2%

      \[\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-sub047.2%

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

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

        \[\leadsto \frac{\color{blue}{-\left(b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}}{3 \cdot a} \]
      4. neg-mul-147.2%

        \[\leadsto \frac{\color{blue}{-1 \cdot \left(b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}}{3 \cdot a} \]
      5. associate-*r/47.2%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{--1}{3 \cdot a} \cdot \frac{b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{-1}} \]
      11. associate-*l/47.2%

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

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)}}{3 \cdot a}} \]
    4. Step-by-step derivation
      1. add-cube-cbrt47.2%

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

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

      \[\leadsto \color{blue}{{\left(\sqrt[3]{\frac{\mathsf{fma}\left(-1, b, \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(c \cdot a\right)\right)}\right)}{a \cdot 3}}\right)}^{3}} \]
    6. Step-by-step derivation
      1. rem-cube-cbrt47.3%

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

        \[\leadsto \color{blue}{\frac{1}{\frac{a \cdot 3}{\mathsf{fma}\left(-1, b, \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(c \cdot a\right)\right)}\right)}}} \]
      3. associate-*r*47.2%

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

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

        \[\leadsto \frac{1}{\frac{a \cdot 3}{\mathsf{fma}\left(-1, b, \sqrt{\mathsf{fma}\left(b, b, \color{blue}{a \cdot \left(c \cdot -3\right)}\right)}\right)}} \]
    7. Applied egg-rr47.2%

      \[\leadsto \color{blue}{\frac{1}{\frac{a \cdot 3}{\mathsf{fma}\left(-1, b, \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)}\right)}}} \]
    8. Taylor expanded in b around inf 88.9%

      \[\leadsto \frac{1}{\color{blue}{-2 \cdot \frac{b}{c} + 1.5 \cdot \frac{a}{b}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification86.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 65:\\ \;\;\;\;\frac{\sqrt{b \cdot b - 3 \cdot \left(c \cdot a\right)} - b}{a \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{1.5 \cdot \frac{a}{b} + -2 \cdot \frac{b}{c}}\\ \end{array} \]

Alternative 10: 82.0% accurate, 8.9× speedup?

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

\\
\frac{1}{1.5 \cdot \frac{a}{b} + -2 \cdot \frac{b}{c}}
\end{array}
Derivation
  1. Initial program 57.8%

    \[\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-sub057.8%

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

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

      \[\leadsto \frac{\color{blue}{-\left(b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}}{3 \cdot a} \]
    4. neg-mul-157.8%

      \[\leadsto \frac{\color{blue}{-1 \cdot \left(b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}}{3 \cdot a} \]
    5. associate-*r/57.8%

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

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

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

      \[\leadsto \color{blue}{\frac{\left(--1\right) \cdot \left(b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}{-1 \cdot \left(3 \cdot a\right)}} \]
    9. *-commutative57.8%

      \[\leadsto \frac{\left(--1\right) \cdot \left(b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}{\color{blue}{\left(3 \cdot a\right) \cdot -1}} \]
    10. times-frac57.8%

      \[\leadsto \color{blue}{\frac{--1}{3 \cdot a} \cdot \frac{b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{-1}} \]
    11. associate-*l/57.8%

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

    \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)}}{3 \cdot a}} \]
  4. Step-by-step derivation
    1. add-cube-cbrt57.8%

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

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

    \[\leadsto \color{blue}{{\left(\sqrt[3]{\frac{\mathsf{fma}\left(-1, b, \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(c \cdot a\right)\right)}\right)}{a \cdot 3}}\right)}^{3}} \]
  6. Step-by-step derivation
    1. rem-cube-cbrt57.9%

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

      \[\leadsto \color{blue}{\frac{1}{\frac{a \cdot 3}{\mathsf{fma}\left(-1, b, \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(c \cdot a\right)\right)}\right)}}} \]
    3. associate-*r*57.8%

      \[\leadsto \frac{1}{\frac{a \cdot 3}{\mathsf{fma}\left(-1, b, \sqrt{\mathsf{fma}\left(b, b, \color{blue}{\left(-3 \cdot c\right) \cdot a}\right)}\right)}} \]
    4. *-commutative57.8%

      \[\leadsto \frac{1}{\frac{a \cdot 3}{\mathsf{fma}\left(-1, b, \sqrt{\mathsf{fma}\left(b, b, \color{blue}{\left(c \cdot -3\right)} \cdot a\right)}\right)}} \]
    5. *-commutative57.8%

      \[\leadsto \frac{1}{\frac{a \cdot 3}{\mathsf{fma}\left(-1, b, \sqrt{\mathsf{fma}\left(b, b, \color{blue}{a \cdot \left(c \cdot -3\right)}\right)}\right)}} \]
  7. Applied egg-rr57.8%

    \[\leadsto \color{blue}{\frac{1}{\frac{a \cdot 3}{\mathsf{fma}\left(-1, b, \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)}\right)}}} \]
  8. Taylor expanded in b around inf 80.4%

    \[\leadsto \frac{1}{\color{blue}{-2 \cdot \frac{b}{c} + 1.5 \cdot \frac{a}{b}}} \]
  9. Final simplification80.4%

    \[\leadsto \frac{1}{1.5 \cdot \frac{a}{b} + -2 \cdot \frac{b}{c}} \]

Alternative 11: 64.5% accurate, 23.2× speedup?

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

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

    \[\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-sub057.8%

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

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

      \[\leadsto \frac{\color{blue}{-\left(b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}}{3 \cdot a} \]
    4. neg-mul-157.8%

      \[\leadsto \frac{\color{blue}{-1 \cdot \left(b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}}{3 \cdot a} \]
    5. associate-*r/57.8%

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

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

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

      \[\leadsto \color{blue}{\frac{\left(--1\right) \cdot \left(b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}{-1 \cdot \left(3 \cdot a\right)}} \]
    9. *-commutative57.8%

      \[\leadsto \frac{\left(--1\right) \cdot \left(b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}{\color{blue}{\left(3 \cdot a\right) \cdot -1}} \]
    10. times-frac57.8%

      \[\leadsto \color{blue}{\frac{--1}{3 \cdot a} \cdot \frac{b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{-1}} \]
    11. associate-*l/57.8%

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

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

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

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

Alternative 12: 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 57.8%

    \[\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-sub057.8%

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

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

      \[\leadsto \frac{\color{blue}{-\left(b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}}{3 \cdot a} \]
    4. neg-mul-157.8%

      \[\leadsto \frac{\color{blue}{-1 \cdot \left(b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}}{3 \cdot a} \]
    5. associate-*r/57.8%

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

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

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

      \[\leadsto \color{blue}{\frac{\left(--1\right) \cdot \left(b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}{-1 \cdot \left(3 \cdot a\right)}} \]
    9. *-commutative57.8%

      \[\leadsto \frac{\left(--1\right) \cdot \left(b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}{\color{blue}{\left(3 \cdot a\right) \cdot -1}} \]
    10. times-frac57.8%

      \[\leadsto \color{blue}{\frac{--1}{3 \cdot a} \cdot \frac{b - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{-1}} \]
    11. associate-*l/57.8%

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

    \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)}}{3 \cdot a}} \]
  4. Step-by-step derivation
    1. add-cube-cbrt57.8%

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

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

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

    \[\leadsto \color{blue}{0.3333333333333333 \cdot \left(\frac{b + -1 \cdot b}{a} \cdot {1}^{0.3333333333333333}\right)} \]
  7. Step-by-step derivation
    1. pow-base-13.2%

      \[\leadsto 0.3333333333333333 \cdot \left(\frac{b + -1 \cdot b}{a} \cdot \color{blue}{1}\right) \]
    2. *-rgt-identity3.2%

      \[\leadsto 0.3333333333333333 \cdot \color{blue}{\frac{b + -1 \cdot b}{a}} \]
    3. associate-*r/3.2%

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

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

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

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

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

    \[\leadsto \color{blue}{\frac{0}{a}} \]
  9. Final simplification3.2%

    \[\leadsto \frac{0}{a} \]

Reproduce

?
herbie shell --seed 2023189 
(FPCore (a b c)
  :name "Cubic critical, narrow range"
  :precision binary64
  :pre (and (and (and (< 1.0536712127723509e-8 a) (< a 94906265.62425156)) (and (< 1.0536712127723509e-8 b) (< b 94906265.62425156))) (and (< 1.0536712127723509e-8 c) (< c 94906265.62425156)))
  (/ (+ (- b) (sqrt (- (* b b) (* (* 3.0 a) c)))) (* 3.0 a)))