Cubic critical

Percentage Accurate: 53.6% → 86.6%
Time: 13.6s
Alternatives: 10
Speedup: 11.6×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 10 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: 53.6% accurate, 1.0× speedup?

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

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

Alternative 1: 86.6% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -2 \cdot 10^{+151}:\\ \;\;\;\;\frac{b}{a \cdot -1.5}\\ \mathbf{elif}\;b \leq 2.5 \cdot 10^{-80}:\\ \;\;\;\;\frac{\sqrt{b \cdot b - \left(a \cdot 3\right) \cdot c} - b}{a \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b -2e+151)
   (/ b (* a -1.5))
   (if (<= b 2.5e-80)
     (/ (- (sqrt (- (* b b) (* (* a 3.0) c))) b) (* a 3.0))
     (/ (* c -0.5) b))))
double code(double a, double b, double c) {
	double tmp;
	if (b <= -2e+151) {
		tmp = b / (a * -1.5);
	} else if (b <= 2.5e-80) {
		tmp = (sqrt(((b * b) - ((a * 3.0) * c))) - b) / (a * 3.0);
	} else {
		tmp = (c * -0.5) / b;
	}
	return tmp;
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: tmp
    if (b <= (-2d+151)) then
        tmp = b / (a * (-1.5d0))
    else if (b <= 2.5d-80) then
        tmp = (sqrt(((b * b) - ((a * 3.0d0) * c))) - b) / (a * 3.0d0)
    else
        tmp = (c * (-0.5d0)) / b
    end if
    code = tmp
end function
public static double code(double a, double b, double c) {
	double tmp;
	if (b <= -2e+151) {
		tmp = b / (a * -1.5);
	} else if (b <= 2.5e-80) {
		tmp = (Math.sqrt(((b * b) - ((a * 3.0) * c))) - b) / (a * 3.0);
	} else {
		tmp = (c * -0.5) / b;
	}
	return tmp;
}
def code(a, b, c):
	tmp = 0
	if b <= -2e+151:
		tmp = b / (a * -1.5)
	elif b <= 2.5e-80:
		tmp = (math.sqrt(((b * b) - ((a * 3.0) * c))) - b) / (a * 3.0)
	else:
		tmp = (c * -0.5) / b
	return tmp
function code(a, b, c)
	tmp = 0.0
	if (b <= -2e+151)
		tmp = Float64(b / Float64(a * -1.5));
	elseif (b <= 2.5e-80)
		tmp = Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(Float64(a * 3.0) * c))) - b) / Float64(a * 3.0));
	else
		tmp = Float64(Float64(c * -0.5) / b);
	end
	return tmp
end
function tmp_2 = code(a, b, c)
	tmp = 0.0;
	if (b <= -2e+151)
		tmp = b / (a * -1.5);
	elseif (b <= 2.5e-80)
		tmp = (sqrt(((b * b) - ((a * 3.0) * c))) - b) / (a * 3.0);
	else
		tmp = (c * -0.5) / b;
	end
	tmp_2 = tmp;
end
code[a_, b_, c_] := If[LessEqual[b, -2e+151], N[(b / N[(a * -1.5), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.5e-80], N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(N[(a * 3.0), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 3.0), $MachinePrecision]), $MachinePrecision], N[(N[(c * -0.5), $MachinePrecision] / b), $MachinePrecision]]]
\begin{array}{l}

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

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

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


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

    1. Initial program 54.9%

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

      \[\leadsto \frac{\left(-b\right) + \color{blue}{e^{\log \left(\mathsf{hypot}\left(b, \sqrt{c \cdot \left(a \cdot -3\right)}\right)\right)}}}{3 \cdot a} \]
    4. Taylor expanded in b around -inf 99.8%

      \[\leadsto \color{blue}{-0.6666666666666666 \cdot \frac{b}{a}} \]
    5. Step-by-step derivation
      1. associate-*r/99.7%

        \[\leadsto \color{blue}{\frac{-0.6666666666666666 \cdot b}{a}} \]
      2. *-commutative99.7%

        \[\leadsto \frac{\color{blue}{b \cdot -0.6666666666666666}}{a} \]
      3. associate-/l*99.6%

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

      \[\leadsto \color{blue}{b \cdot \frac{-0.6666666666666666}{a}} \]
    7. Step-by-step derivation
      1. clear-num99.6%

        \[\leadsto b \cdot \color{blue}{\frac{1}{\frac{a}{-0.6666666666666666}}} \]
      2. div-inv99.7%

        \[\leadsto b \cdot \frac{1}{\color{blue}{a \cdot \frac{1}{-0.6666666666666666}}} \]
      3. metadata-eval99.7%

        \[\leadsto b \cdot \frac{1}{a \cdot \color{blue}{-1.5}} \]
      4. un-div-inv99.9%

        \[\leadsto \color{blue}{\frac{b}{a \cdot -1.5}} \]
    8. Applied egg-rr99.9%

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

    if -2.00000000000000003e151 < b < 2.5e-80

    1. Initial program 85.4%

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

    if 2.5e-80 < b

    1. Initial program 11.9%

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

      \[\leadsto \frac{\color{blue}{-1.5 \cdot \frac{a \cdot c}{b}}}{3 \cdot a} \]
    4. Step-by-step derivation
      1. associate-*r/72.2%

        \[\leadsto \frac{\color{blue}{\frac{-1.5 \cdot \left(a \cdot c\right)}{b}}}{3 \cdot a} \]
      2. associate-*r*72.3%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2 \cdot 10^{+151}:\\ \;\;\;\;\frac{b}{a \cdot -1.5}\\ \mathbf{elif}\;b \leq 2.5 \cdot 10^{-80}:\\ \;\;\;\;\frac{\sqrt{b \cdot b - \left(a \cdot 3\right) \cdot c} - b}{a \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 81.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -1.75 \cdot 10^{-51}:\\ \;\;\;\;0.6666666666666666 \cdot \frac{b}{-a} - -0.5 \cdot \frac{c}{b}\\ \mathbf{elif}\;b \leq 2.05 \cdot 10^{-79}:\\ \;\;\;\;\left(b - \sqrt{a \cdot \left(c \cdot -3\right)}\right) \cdot \frac{-0.3333333333333333}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b -1.75e-51)
   (- (* 0.6666666666666666 (/ b (- a))) (* -0.5 (/ c b)))
   (if (<= b 2.05e-79)
     (* (- b (sqrt (* a (* c -3.0)))) (/ -0.3333333333333333 a))
     (/ (* c -0.5) b))))
double code(double a, double b, double c) {
	double tmp;
	if (b <= -1.75e-51) {
		tmp = (0.6666666666666666 * (b / -a)) - (-0.5 * (c / b));
	} else if (b <= 2.05e-79) {
		tmp = (b - sqrt((a * (c * -3.0)))) * (-0.3333333333333333 / a);
	} else {
		tmp = (c * -0.5) / b;
	}
	return tmp;
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: tmp
    if (b <= (-1.75d-51)) then
        tmp = (0.6666666666666666d0 * (b / -a)) - ((-0.5d0) * (c / b))
    else if (b <= 2.05d-79) then
        tmp = (b - sqrt((a * (c * (-3.0d0))))) * ((-0.3333333333333333d0) / a)
    else
        tmp = (c * (-0.5d0)) / b
    end if
    code = tmp
end function
public static double code(double a, double b, double c) {
	double tmp;
	if (b <= -1.75e-51) {
		tmp = (0.6666666666666666 * (b / -a)) - (-0.5 * (c / b));
	} else if (b <= 2.05e-79) {
		tmp = (b - Math.sqrt((a * (c * -3.0)))) * (-0.3333333333333333 / a);
	} else {
		tmp = (c * -0.5) / b;
	}
	return tmp;
}
def code(a, b, c):
	tmp = 0
	if b <= -1.75e-51:
		tmp = (0.6666666666666666 * (b / -a)) - (-0.5 * (c / b))
	elif b <= 2.05e-79:
		tmp = (b - math.sqrt((a * (c * -3.0)))) * (-0.3333333333333333 / a)
	else:
		tmp = (c * -0.5) / b
	return tmp
function code(a, b, c)
	tmp = 0.0
	if (b <= -1.75e-51)
		tmp = Float64(Float64(0.6666666666666666 * Float64(b / Float64(-a))) - Float64(-0.5 * Float64(c / b)));
	elseif (b <= 2.05e-79)
		tmp = Float64(Float64(b - sqrt(Float64(a * Float64(c * -3.0)))) * Float64(-0.3333333333333333 / a));
	else
		tmp = Float64(Float64(c * -0.5) / b);
	end
	return tmp
end
function tmp_2 = code(a, b, c)
	tmp = 0.0;
	if (b <= -1.75e-51)
		tmp = (0.6666666666666666 * (b / -a)) - (-0.5 * (c / b));
	elseif (b <= 2.05e-79)
		tmp = (b - sqrt((a * (c * -3.0)))) * (-0.3333333333333333 / a);
	else
		tmp = (c * -0.5) / b;
	end
	tmp_2 = tmp;
end
code[a_, b_, c_] := If[LessEqual[b, -1.75e-51], N[(N[(0.6666666666666666 * N[(b / (-a)), $MachinePrecision]), $MachinePrecision] - N[(-0.5 * N[(c / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.05e-79], N[(N[(b - N[Sqrt[N[(a * N[(c * -3.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(-0.3333333333333333 / a), $MachinePrecision]), $MachinePrecision], N[(N[(c * -0.5), $MachinePrecision] / b), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.75 \cdot 10^{-51}:\\
\;\;\;\;0.6666666666666666 \cdot \frac{b}{-a} - -0.5 \cdot \frac{c}{b}\\

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

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


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

    1. Initial program 76.5%

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

      \[\leadsto \color{blue}{-1 \cdot \left(b \cdot \left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right)\right)} \]
    4. Taylor expanded in c around 0 93.5%

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

    if -1.7499999999999999e-51 < b < 2.04999999999999997e-79

    1. Initial program 78.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\color{blue}{\sqrt{b} \cdot \sqrt{b}} - \sqrt{a \cdot -3} \cdot \sqrt{c}\right) \cdot \frac{1}{-3 \cdot a} \]
      14. add-sqr-sqrt47.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.04999999999999997e-79 < b

    1. Initial program 11.9%

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

      \[\leadsto \frac{\color{blue}{-1.5 \cdot \frac{a \cdot c}{b}}}{3 \cdot a} \]
    4. Step-by-step derivation
      1. associate-*r/72.2%

        \[\leadsto \frac{\color{blue}{\frac{-1.5 \cdot \left(a \cdot c\right)}{b}}}{3 \cdot a} \]
      2. associate-*r*72.3%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.75 \cdot 10^{-51}:\\ \;\;\;\;0.6666666666666666 \cdot \frac{b}{-a} - -0.5 \cdot \frac{c}{b}\\ \mathbf{elif}\;b \leq 2.05 \cdot 10^{-79}:\\ \;\;\;\;\left(b - \sqrt{a \cdot \left(c \cdot -3\right)}\right) \cdot \frac{-0.3333333333333333}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 81.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -8.5 \cdot 10^{-39}:\\ \;\;\;\;0.6666666666666666 \cdot \frac{b}{-a} - -0.5 \cdot \frac{c}{b}\\ \mathbf{elif}\;b \leq 1.5 \cdot 10^{-77}:\\ \;\;\;\;\frac{\sqrt{c \cdot \left(a \cdot -3\right)} - b}{a \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b -8.5e-39)
   (- (* 0.6666666666666666 (/ b (- a))) (* -0.5 (/ c b)))
   (if (<= b 1.5e-77)
     (/ (- (sqrt (* c (* a -3.0))) b) (* a 3.0))
     (/ (* c -0.5) b))))
double code(double a, double b, double c) {
	double tmp;
	if (b <= -8.5e-39) {
		tmp = (0.6666666666666666 * (b / -a)) - (-0.5 * (c / b));
	} else if (b <= 1.5e-77) {
		tmp = (sqrt((c * (a * -3.0))) - b) / (a * 3.0);
	} else {
		tmp = (c * -0.5) / b;
	}
	return tmp;
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: tmp
    if (b <= (-8.5d-39)) then
        tmp = (0.6666666666666666d0 * (b / -a)) - ((-0.5d0) * (c / b))
    else if (b <= 1.5d-77) then
        tmp = (sqrt((c * (a * (-3.0d0)))) - b) / (a * 3.0d0)
    else
        tmp = (c * (-0.5d0)) / b
    end if
    code = tmp
end function
public static double code(double a, double b, double c) {
	double tmp;
	if (b <= -8.5e-39) {
		tmp = (0.6666666666666666 * (b / -a)) - (-0.5 * (c / b));
	} else if (b <= 1.5e-77) {
		tmp = (Math.sqrt((c * (a * -3.0))) - b) / (a * 3.0);
	} else {
		tmp = (c * -0.5) / b;
	}
	return tmp;
}
def code(a, b, c):
	tmp = 0
	if b <= -8.5e-39:
		tmp = (0.6666666666666666 * (b / -a)) - (-0.5 * (c / b))
	elif b <= 1.5e-77:
		tmp = (math.sqrt((c * (a * -3.0))) - b) / (a * 3.0)
	else:
		tmp = (c * -0.5) / b
	return tmp
function code(a, b, c)
	tmp = 0.0
	if (b <= -8.5e-39)
		tmp = Float64(Float64(0.6666666666666666 * Float64(b / Float64(-a))) - Float64(-0.5 * Float64(c / b)));
	elseif (b <= 1.5e-77)
		tmp = Float64(Float64(sqrt(Float64(c * Float64(a * -3.0))) - b) / Float64(a * 3.0));
	else
		tmp = Float64(Float64(c * -0.5) / b);
	end
	return tmp
end
function tmp_2 = code(a, b, c)
	tmp = 0.0;
	if (b <= -8.5e-39)
		tmp = (0.6666666666666666 * (b / -a)) - (-0.5 * (c / b));
	elseif (b <= 1.5e-77)
		tmp = (sqrt((c * (a * -3.0))) - b) / (a * 3.0);
	else
		tmp = (c * -0.5) / b;
	end
	tmp_2 = tmp;
end
code[a_, b_, c_] := If[LessEqual[b, -8.5e-39], N[(N[(0.6666666666666666 * N[(b / (-a)), $MachinePrecision]), $MachinePrecision] - N[(-0.5 * N[(c / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.5e-77], N[(N[(N[Sqrt[N[(c * N[(a * -3.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 3.0), $MachinePrecision]), $MachinePrecision], N[(N[(c * -0.5), $MachinePrecision] / b), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -8.5 \cdot 10^{-39}:\\
\;\;\;\;0.6666666666666666 \cdot \frac{b}{-a} - -0.5 \cdot \frac{c}{b}\\

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

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


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

    1. Initial program 76.5%

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

      \[\leadsto \color{blue}{-1 \cdot \left(b \cdot \left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right)\right)} \]
    4. Taylor expanded in c around 0 93.5%

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

    if -8.5000000000000005e-39 < b < 1.50000000000000008e-77

    1. Initial program 78.8%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\sqrt{a \cdot -3} \cdot \sqrt{c} - b}}{3 \cdot a} \]
      3. *-commutative47.6%

        \[\leadsto \frac{\color{blue}{\sqrt{c} \cdot \sqrt{a \cdot -3}} - b}{3 \cdot a} \]
      4. sqrt-unprod75.4%

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

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

    if 1.50000000000000008e-77 < b

    1. Initial program 11.9%

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

      \[\leadsto \frac{\color{blue}{-1.5 \cdot \frac{a \cdot c}{b}}}{3 \cdot a} \]
    4. Step-by-step derivation
      1. associate-*r/72.2%

        \[\leadsto \frac{\color{blue}{\frac{-1.5 \cdot \left(a \cdot c\right)}{b}}}{3 \cdot a} \]
      2. associate-*r*72.3%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -8.5 \cdot 10^{-39}:\\ \;\;\;\;0.6666666666666666 \cdot \frac{b}{-a} - -0.5 \cdot \frac{c}{b}\\ \mathbf{elif}\;b \leq 1.5 \cdot 10^{-77}:\\ \;\;\;\;\frac{\sqrt{c \cdot \left(a \cdot -3\right)} - b}{a \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 67.6% accurate, 6.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -1 \cdot 10^{-309}:\\
\;\;\;\;0.6666666666666666 \cdot \frac{b}{-a} - -0.5 \cdot \frac{c}{b}\\

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


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

    1. Initial program 78.6%

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

      \[\leadsto \color{blue}{-1 \cdot \left(b \cdot \left(-0.5 \cdot \frac{c}{{b}^{2}} + 0.6666666666666666 \cdot \frac{1}{a}\right)\right)} \]
    4. Taylor expanded in c around 0 72.7%

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

    if -1.000000000000002e-309 < b

    1. Initial program 27.0%

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

      \[\leadsto \frac{\color{blue}{-1.5 \cdot \frac{a \cdot c}{b}}}{3 \cdot a} \]
    4. Step-by-step derivation
      1. associate-*r/55.5%

        \[\leadsto \frac{\color{blue}{\frac{-1.5 \cdot \left(a \cdot c\right)}{b}}}{3 \cdot a} \]
      2. associate-*r*55.6%

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

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

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

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

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

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

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

Alternative 5: 67.3% accurate, 11.6× speedup?

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

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

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


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

    1. Initial program 78.0%

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

      \[\leadsto \frac{\left(-b\right) + \color{blue}{e^{\log \left(\mathsf{hypot}\left(b, \sqrt{c \cdot \left(a \cdot -3\right)}\right)\right)}}}{3 \cdot a} \]
    4. Taylor expanded in b around -inf 71.9%

      \[\leadsto \color{blue}{-0.6666666666666666 \cdot \frac{b}{a}} \]
    5. Step-by-step derivation
      1. associate-*r/71.9%

        \[\leadsto \color{blue}{\frac{-0.6666666666666666 \cdot b}{a}} \]
      2. *-commutative71.9%

        \[\leadsto \frac{\color{blue}{b \cdot -0.6666666666666666}}{a} \]
      3. associate-/l*71.8%

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

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

    if 3.40000000000000017e-292 < b

    1. Initial program 27.2%

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

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

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

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

      \[\leadsto \color{blue}{c \cdot \left(-0.375 \cdot \frac{a \cdot c}{{b}^{3}} - \frac{0.5}{b}\right)} \]
    6. Taylor expanded in a around 0 68.4%

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

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

Alternative 6: 67.3% accurate, 11.6× speedup?

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

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

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


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

    1. Initial program 78.0%

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

      \[\leadsto \color{blue}{-0.6666666666666666 \cdot \frac{b}{a}} \]
    4. Step-by-step derivation
      1. *-commutative71.9%

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

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

    if 3.0999999999999999e-292 < b

    1. Initial program 27.2%

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

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

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

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

      \[\leadsto \color{blue}{c \cdot \left(-0.375 \cdot \frac{a \cdot c}{{b}^{3}} - \frac{0.5}{b}\right)} \]
    6. Taylor expanded in a around 0 68.4%

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

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

Alternative 7: 67.4% accurate, 11.6× speedup?

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

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

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


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

    1. Initial program 78.0%

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

      \[\leadsto \color{blue}{-0.6666666666666666 \cdot \frac{b}{a}} \]
    4. Step-by-step derivation
      1. *-commutative71.9%

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

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

    if 3.0999999999999999e-292 < b

    1. Initial program 27.2%

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

      \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b}} \]
    4. Step-by-step derivation
      1. *-commutative68.6%

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

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

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

Alternative 8: 67.4% accurate, 11.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq 3.4 \cdot 10^{-292}:\\
\;\;\;\;\frac{b}{a \cdot -1.5}\\

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


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

    1. Initial program 78.0%

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

      \[\leadsto \frac{\left(-b\right) + \color{blue}{e^{\log \left(\mathsf{hypot}\left(b, \sqrt{c \cdot \left(a \cdot -3\right)}\right)\right)}}}{3 \cdot a} \]
    4. Taylor expanded in b around -inf 71.9%

      \[\leadsto \color{blue}{-0.6666666666666666 \cdot \frac{b}{a}} \]
    5. Step-by-step derivation
      1. associate-*r/71.9%

        \[\leadsto \color{blue}{\frac{-0.6666666666666666 \cdot b}{a}} \]
      2. *-commutative71.9%

        \[\leadsto \frac{\color{blue}{b \cdot -0.6666666666666666}}{a} \]
      3. associate-/l*71.8%

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

      \[\leadsto \color{blue}{b \cdot \frac{-0.6666666666666666}{a}} \]
    7. Step-by-step derivation
      1. clear-num71.7%

        \[\leadsto b \cdot \color{blue}{\frac{1}{\frac{a}{-0.6666666666666666}}} \]
      2. div-inv71.8%

        \[\leadsto b \cdot \frac{1}{\color{blue}{a \cdot \frac{1}{-0.6666666666666666}}} \]
      3. metadata-eval71.8%

        \[\leadsto b \cdot \frac{1}{a \cdot \color{blue}{-1.5}} \]
      4. un-div-inv72.0%

        \[\leadsto \color{blue}{\frac{b}{a \cdot -1.5}} \]
    8. Applied egg-rr72.0%

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

    if 3.40000000000000017e-292 < b

    1. Initial program 27.2%

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

      \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b}} \]
    4. Step-by-step derivation
      1. *-commutative68.6%

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

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

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

Alternative 9: 67.4% accurate, 11.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq 3.1 \cdot 10^{-292}:\\
\;\;\;\;\frac{b}{a \cdot -1.5}\\

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


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

    1. Initial program 78.0%

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

      \[\leadsto \frac{\left(-b\right) + \color{blue}{e^{\log \left(\mathsf{hypot}\left(b, \sqrt{c \cdot \left(a \cdot -3\right)}\right)\right)}}}{3 \cdot a} \]
    4. Taylor expanded in b around -inf 71.9%

      \[\leadsto \color{blue}{-0.6666666666666666 \cdot \frac{b}{a}} \]
    5. Step-by-step derivation
      1. associate-*r/71.9%

        \[\leadsto \color{blue}{\frac{-0.6666666666666666 \cdot b}{a}} \]
      2. *-commutative71.9%

        \[\leadsto \frac{\color{blue}{b \cdot -0.6666666666666666}}{a} \]
      3. associate-/l*71.8%

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

      \[\leadsto \color{blue}{b \cdot \frac{-0.6666666666666666}{a}} \]
    7. Step-by-step derivation
      1. clear-num71.7%

        \[\leadsto b \cdot \color{blue}{\frac{1}{\frac{a}{-0.6666666666666666}}} \]
      2. div-inv71.8%

        \[\leadsto b \cdot \frac{1}{\color{blue}{a \cdot \frac{1}{-0.6666666666666666}}} \]
      3. metadata-eval71.8%

        \[\leadsto b \cdot \frac{1}{a \cdot \color{blue}{-1.5}} \]
      4. un-div-inv72.0%

        \[\leadsto \color{blue}{\frac{b}{a \cdot -1.5}} \]
    8. Applied egg-rr72.0%

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

    if 3.0999999999999999e-292 < b

    1. Initial program 27.2%

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

      \[\leadsto \frac{\color{blue}{-1.5 \cdot \frac{a \cdot c}{b}}}{3 \cdot a} \]
    4. Step-by-step derivation
      1. associate-*r/55.9%

        \[\leadsto \frac{\color{blue}{\frac{-1.5 \cdot \left(a \cdot c\right)}{b}}}{3 \cdot a} \]
      2. associate-*r*56.0%

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

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

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

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

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

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

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

Alternative 10: 35.0% accurate, 23.2× speedup?

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

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

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

    \[\leadsto \frac{\left(-b\right) + \color{blue}{e^{\log \left(\mathsf{hypot}\left(b, \sqrt{c \cdot \left(a \cdot -3\right)}\right)\right)}}}{3 \cdot a} \]
  4. Taylor expanded in b around -inf 35.9%

    \[\leadsto \color{blue}{-0.6666666666666666 \cdot \frac{b}{a}} \]
  5. Step-by-step derivation
    1. associate-*r/35.9%

      \[\leadsto \color{blue}{\frac{-0.6666666666666666 \cdot b}{a}} \]
    2. *-commutative35.9%

      \[\leadsto \frac{\color{blue}{b \cdot -0.6666666666666666}}{a} \]
    3. associate-/l*35.9%

      \[\leadsto \color{blue}{b \cdot \frac{-0.6666666666666666}{a}} \]
  6. Simplified35.9%

    \[\leadsto \color{blue}{b \cdot \frac{-0.6666666666666666}{a}} \]
  7. Final simplification35.9%

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

Reproduce

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