Cubic critical

Percentage Accurate: 52.1% → 86.1%
Time: 15.2s
Alternatives: 12
Speedup: 16.4×

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 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: 52.1% 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.1% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -2.95 \cdot 10^{+156}:\\ \;\;\;\;\frac{b}{a \cdot -1.5}\\ \mathbf{elif}\;b \leq 2.4 \cdot 10^{-103}:\\ \;\;\;\;\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 -2.95e+156)
   (/ b (* a -1.5))
   (if (<= b 2.4e-103)
     (/ (- (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 <= -2.95e+156) {
		tmp = b / (a * -1.5);
	} else if (b <= 2.4e-103) {
		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 <= (-2.95d+156)) then
        tmp = b / (a * (-1.5d0))
    else if (b <= 2.4d-103) 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 <= -2.95e+156) {
		tmp = b / (a * -1.5);
	} else if (b <= 2.4e-103) {
		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 <= -2.95e+156:
		tmp = b / (a * -1.5)
	elif b <= 2.4e-103:
		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 <= -2.95e+156)
		tmp = Float64(b / Float64(a * -1.5));
	elseif (b <= 2.4e-103)
		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 <= -2.95e+156)
		tmp = b / (a * -1.5);
	elseif (b <= 2.4e-103)
		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, -2.95e+156], N[(b / N[(a * -1.5), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.4e-103], 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.95 \cdot 10^{+156}:\\
\;\;\;\;\frac{b}{a \cdot -1.5}\\

\mathbf{elif}\;b \leq 2.4 \cdot 10^{-103}:\\
\;\;\;\;\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.9499999999999998e156

    1. Initial program 35.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. add-sqr-sqrt35.8%

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

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

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

        \[\leadsto \frac{\left(-b\right) + {\color{blue}{\left({\left(b \cdot b - \left(3 \cdot a\right) \cdot c\right)}^{\left(\frac{0.5}{2}\right)}\right)}}^{2}}{3 \cdot a} \]
      5. sub-neg35.8%

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

        \[\leadsto \frac{\left(-b\right) + {\left({\color{blue}{\left(\left(-\left(3 \cdot a\right) \cdot c\right) + b \cdot b\right)}}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
      7. *-commutative35.8%

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

        \[\leadsto \frac{\left(-b\right) + {\left({\left(\color{blue}{c \cdot \left(-3 \cdot a\right)} + b \cdot b\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
      9. fma-def36.0%

        \[\leadsto \frac{\left(-b\right) + {\left({\color{blue}{\left(\mathsf{fma}\left(c, -3 \cdot a, b \cdot b\right)\right)}}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
      10. *-commutative36.0%

        \[\leadsto \frac{\left(-b\right) + {\left({\left(\mathsf{fma}\left(c, -\color{blue}{a \cdot 3}, b \cdot b\right)\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
      11. distribute-rgt-neg-in36.0%

        \[\leadsto \frac{\left(-b\right) + {\left({\left(\mathsf{fma}\left(c, \color{blue}{a \cdot \left(-3\right)}, b \cdot b\right)\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
      12. metadata-eval36.0%

        \[\leadsto \frac{\left(-b\right) + {\left({\left(\mathsf{fma}\left(c, a \cdot \color{blue}{-3}, b \cdot b\right)\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
      13. pow236.0%

        \[\leadsto \frac{\left(-b\right) + {\left({\left(\mathsf{fma}\left(c, a \cdot -3, \color{blue}{{b}^{2}}\right)\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
      14. metadata-eval36.0%

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

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

      \[\leadsto \color{blue}{2 \cdot \left(-0.3333333333333333 \cdot \frac{b}{a}\right)} \]
    5. Step-by-step derivation
      1. associate-*r*99.7%

        \[\leadsto \color{blue}{\left(2 \cdot -0.3333333333333333\right) \cdot \frac{b}{a}} \]
      2. metadata-eval99.7%

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

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

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

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

      \[\leadsto \color{blue}{\frac{b}{\frac{a}{-0.6666666666666666}}} \]
    7. Taylor expanded in a around 0 99.9%

      \[\leadsto \frac{b}{\color{blue}{-1.5 \cdot a}} \]
    8. Step-by-step derivation
      1. *-commutative99.9%

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

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

    if -2.9499999999999998e156 < b < 2.4000000000000002e-103

    1. Initial program 84.3%

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

    if 2.4000000000000002e-103 < b

    1. Initial program 15.5%

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

      \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b}} \]
    3. Step-by-step derivation
      1. *-commutative89.7%

        \[\leadsto \color{blue}{\frac{c}{b} \cdot -0.5} \]
      2. associate-*l/89.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2.95 \cdot 10^{+156}:\\ \;\;\;\;\frac{b}{a \cdot -1.5}\\ \mathbf{elif}\;b \leq 2.4 \cdot 10^{-103}:\\ \;\;\;\;\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} \]

Alternative 2: 81.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -4.6 \cdot 10^{-15}:\\ \;\;\;\;\frac{\left(1.5 \cdot \left(c \cdot \frac{a}{b}\right) - b\right) - b}{a \cdot 3}\\ \mathbf{elif}\;b \leq 5.8 \cdot 10^{-103}:\\ \;\;\;\;\frac{\sqrt{a \cdot \left(c \cdot -3\right)} - b}{a} \cdot 0.3333333333333333\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b -4.6e-15)
   (/ (- (- (* 1.5 (* c (/ a b))) b) b) (* a 3.0))
   (if (<= b 5.8e-103)
     (* (/ (- (sqrt (* a (* c -3.0))) b) a) 0.3333333333333333)
     (/ (* c -0.5) b))))
double code(double a, double b, double c) {
	double tmp;
	if (b <= -4.6e-15) {
		tmp = (((1.5 * (c * (a / b))) - b) - b) / (a * 3.0);
	} else if (b <= 5.8e-103) {
		tmp = ((sqrt((a * (c * -3.0))) - b) / a) * 0.3333333333333333;
	} 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 <= (-4.6d-15)) then
        tmp = (((1.5d0 * (c * (a / b))) - b) - b) / (a * 3.0d0)
    else if (b <= 5.8d-103) then
        tmp = ((sqrt((a * (c * (-3.0d0)))) - b) / a) * 0.3333333333333333d0
    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 <= -4.6e-15) {
		tmp = (((1.5 * (c * (a / b))) - b) - b) / (a * 3.0);
	} else if (b <= 5.8e-103) {
		tmp = ((Math.sqrt((a * (c * -3.0))) - b) / a) * 0.3333333333333333;
	} else {
		tmp = (c * -0.5) / b;
	}
	return tmp;
}
def code(a, b, c):
	tmp = 0
	if b <= -4.6e-15:
		tmp = (((1.5 * (c * (a / b))) - b) - b) / (a * 3.0)
	elif b <= 5.8e-103:
		tmp = ((math.sqrt((a * (c * -3.0))) - b) / a) * 0.3333333333333333
	else:
		tmp = (c * -0.5) / b
	return tmp
function code(a, b, c)
	tmp = 0.0
	if (b <= -4.6e-15)
		tmp = Float64(Float64(Float64(Float64(1.5 * Float64(c * Float64(a / b))) - b) - b) / Float64(a * 3.0));
	elseif (b <= 5.8e-103)
		tmp = Float64(Float64(Float64(sqrt(Float64(a * Float64(c * -3.0))) - b) / a) * 0.3333333333333333);
	else
		tmp = Float64(Float64(c * -0.5) / b);
	end
	return tmp
end
function tmp_2 = code(a, b, c)
	tmp = 0.0;
	if (b <= -4.6e-15)
		tmp = (((1.5 * (c * (a / b))) - b) - b) / (a * 3.0);
	elseif (b <= 5.8e-103)
		tmp = ((sqrt((a * (c * -3.0))) - b) / a) * 0.3333333333333333;
	else
		tmp = (c * -0.5) / b;
	end
	tmp_2 = tmp;
end
code[a_, b_, c_] := If[LessEqual[b, -4.6e-15], N[(N[(N[(N[(1.5 * N[(c * N[(a / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision] - b), $MachinePrecision] / N[(a * 3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5.8e-103], N[(N[(N[(N[Sqrt[N[(a * N[(c * -3.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / a), $MachinePrecision] * 0.3333333333333333), $MachinePrecision], N[(N[(c * -0.5), $MachinePrecision] / b), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -4.6 \cdot 10^{-15}:\\
\;\;\;\;\frac{\left(1.5 \cdot \left(c \cdot \frac{a}{b}\right) - b\right) - b}{a \cdot 3}\\

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

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


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

    1. Initial program 64.0%

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

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

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

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

        \[\leadsto \frac{\left(-b\right) + {\color{blue}{\left({\left(b \cdot b - \left(3 \cdot a\right) \cdot c\right)}^{\left(\frac{0.5}{2}\right)}\right)}}^{2}}{3 \cdot a} \]
      5. sub-neg63.9%

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

        \[\leadsto \frac{\left(-b\right) + {\left({\color{blue}{\left(\left(-\left(3 \cdot a\right) \cdot c\right) + b \cdot b\right)}}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
      7. *-commutative63.9%

        \[\leadsto \frac{\left(-b\right) + {\left({\left(\left(-\color{blue}{c \cdot \left(3 \cdot a\right)}\right) + b \cdot b\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
      8. distribute-rgt-neg-in63.9%

        \[\leadsto \frac{\left(-b\right) + {\left({\left(\color{blue}{c \cdot \left(-3 \cdot a\right)} + b \cdot b\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
      9. fma-def64.0%

        \[\leadsto \frac{\left(-b\right) + {\left({\color{blue}{\left(\mathsf{fma}\left(c, -3 \cdot a, b \cdot b\right)\right)}}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
      10. *-commutative64.0%

        \[\leadsto \frac{\left(-b\right) + {\left({\left(\mathsf{fma}\left(c, -\color{blue}{a \cdot 3}, b \cdot b\right)\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
      11. distribute-rgt-neg-in64.0%

        \[\leadsto \frac{\left(-b\right) + {\left({\left(\mathsf{fma}\left(c, \color{blue}{a \cdot \left(-3\right)}, b \cdot b\right)\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
      12. metadata-eval64.0%

        \[\leadsto \frac{\left(-b\right) + {\left({\left(\mathsf{fma}\left(c, a \cdot \color{blue}{-3}, b \cdot b\right)\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
      13. pow264.0%

        \[\leadsto \frac{\left(-b\right) + {\left({\left(\mathsf{fma}\left(c, a \cdot -3, \color{blue}{{b}^{2}}\right)\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
      14. metadata-eval64.0%

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

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

      \[\leadsto \frac{\left(-b\right) + \color{blue}{\left(-1 \cdot b + 1.5 \cdot \frac{a \cdot c}{b}\right)}}{3 \cdot a} \]
    5. Step-by-step derivation
      1. mul-1-neg92.7%

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

        \[\leadsto \frac{\left(-b\right) + \color{blue}{\left(1.5 \cdot \frac{a \cdot c}{b} + \left(-b\right)\right)}}{3 \cdot a} \]
      3. unsub-neg92.7%

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

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

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

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

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

    if -4.59999999999999981e-15 < b < 5.7999999999999997e-103

    1. Initial program 79.0%

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

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

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

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

        \[\leadsto \frac{\left(-b\right) + {\color{blue}{\left({\left(b \cdot b - \left(3 \cdot a\right) \cdot c\right)}^{\left(\frac{0.5}{2}\right)}\right)}}^{2}}{3 \cdot a} \]
      5. sub-neg78.7%

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

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

        \[\leadsto \frac{\left(-b\right) + {\left({\left(\left(-\color{blue}{c \cdot \left(3 \cdot a\right)}\right) + b \cdot b\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
      8. distribute-rgt-neg-in78.7%

        \[\leadsto \frac{\left(-b\right) + {\left({\left(\color{blue}{c \cdot \left(-3 \cdot a\right)} + b \cdot b\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
      9. fma-def78.7%

        \[\leadsto \frac{\left(-b\right) + {\left({\color{blue}{\left(\mathsf{fma}\left(c, -3 \cdot a, b \cdot b\right)\right)}}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
      10. *-commutative78.7%

        \[\leadsto \frac{\left(-b\right) + {\left({\left(\mathsf{fma}\left(c, -\color{blue}{a \cdot 3}, b \cdot b\right)\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
      11. distribute-rgt-neg-in78.7%

        \[\leadsto \frac{\left(-b\right) + {\left({\left(\mathsf{fma}\left(c, \color{blue}{a \cdot \left(-3\right)}, b \cdot b\right)\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
      12. metadata-eval78.7%

        \[\leadsto \frac{\left(-b\right) + {\left({\left(\mathsf{fma}\left(c, a \cdot \color{blue}{-3}, b \cdot b\right)\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
      13. pow278.7%

        \[\leadsto \frac{\left(-b\right) + {\left({\left(\mathsf{fma}\left(c, a \cdot -3, \color{blue}{{b}^{2}}\right)\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
      14. metadata-eval78.7%

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

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

      \[\leadsto \color{blue}{0.3333333333333333 \cdot \frac{{\left(e^{0.25 \cdot \left(\log \left(-3 \cdot a\right) + -1 \cdot \log \left(\frac{1}{c}\right)\right)}\right)}^{2} - b}{a}} \]
    5. Step-by-step derivation
      1. Simplified69.4%

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

      if 5.7999999999999997e-103 < b

      1. Initial program 15.5%

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

        \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b}} \]
      3. Step-by-step derivation
        1. *-commutative89.7%

          \[\leadsto \color{blue}{\frac{c}{b} \cdot -0.5} \]
        2. associate-*l/89.7%

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -4.6 \cdot 10^{-15}:\\ \;\;\;\;\frac{\left(1.5 \cdot \left(c \cdot \frac{a}{b}\right) - b\right) - b}{a \cdot 3}\\ \mathbf{elif}\;b \leq 5.8 \cdot 10^{-103}:\\ \;\;\;\;\frac{\sqrt{a \cdot \left(c \cdot -3\right)} - b}{a} \cdot 0.3333333333333333\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \]

    Alternative 3: 80.9% accurate, 1.0× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -4.6 \cdot 10^{-15}:\\ \;\;\;\;\frac{\left(1.5 \cdot \left(c \cdot \frac{a}{b}\right) - b\right) - b}{a \cdot 3}\\ \mathbf{elif}\;b \leq 3.1 \cdot 10^{-103}:\\ \;\;\;\;\frac{\sqrt{-3 \cdot \left(a \cdot c\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 -4.6e-15)
       (/ (- (- (* 1.5 (* c (/ a b))) b) b) (* a 3.0))
       (if (<= b 3.1e-103)
         (/ (- (sqrt (* -3.0 (* a c))) b) (* a 3.0))
         (/ (* c -0.5) b))))
    double code(double a, double b, double c) {
    	double tmp;
    	if (b <= -4.6e-15) {
    		tmp = (((1.5 * (c * (a / b))) - b) - b) / (a * 3.0);
    	} else if (b <= 3.1e-103) {
    		tmp = (sqrt((-3.0 * (a * 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 <= (-4.6d-15)) then
            tmp = (((1.5d0 * (c * (a / b))) - b) - b) / (a * 3.0d0)
        else if (b <= 3.1d-103) then
            tmp = (sqrt(((-3.0d0) * (a * 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 <= -4.6e-15) {
    		tmp = (((1.5 * (c * (a / b))) - b) - b) / (a * 3.0);
    	} else if (b <= 3.1e-103) {
    		tmp = (Math.sqrt((-3.0 * (a * c))) - b) / (a * 3.0);
    	} else {
    		tmp = (c * -0.5) / b;
    	}
    	return tmp;
    }
    
    def code(a, b, c):
    	tmp = 0
    	if b <= -4.6e-15:
    		tmp = (((1.5 * (c * (a / b))) - b) - b) / (a * 3.0)
    	elif b <= 3.1e-103:
    		tmp = (math.sqrt((-3.0 * (a * c))) - b) / (a * 3.0)
    	else:
    		tmp = (c * -0.5) / b
    	return tmp
    
    function code(a, b, c)
    	tmp = 0.0
    	if (b <= -4.6e-15)
    		tmp = Float64(Float64(Float64(Float64(1.5 * Float64(c * Float64(a / b))) - b) - b) / Float64(a * 3.0));
    	elseif (b <= 3.1e-103)
    		tmp = Float64(Float64(sqrt(Float64(-3.0 * Float64(a * 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 <= -4.6e-15)
    		tmp = (((1.5 * (c * (a / b))) - b) - b) / (a * 3.0);
    	elseif (b <= 3.1e-103)
    		tmp = (sqrt((-3.0 * (a * c))) - b) / (a * 3.0);
    	else
    		tmp = (c * -0.5) / b;
    	end
    	tmp_2 = tmp;
    end
    
    code[a_, b_, c_] := If[LessEqual[b, -4.6e-15], N[(N[(N[(N[(1.5 * N[(c * N[(a / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision] - b), $MachinePrecision] / N[(a * 3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3.1e-103], N[(N[(N[Sqrt[N[(-3.0 * N[(a * 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 -4.6 \cdot 10^{-15}:\\
    \;\;\;\;\frac{\left(1.5 \cdot \left(c \cdot \frac{a}{b}\right) - b\right) - b}{a \cdot 3}\\
    
    \mathbf{elif}\;b \leq 3.1 \cdot 10^{-103}:\\
    \;\;\;\;\frac{\sqrt{-3 \cdot \left(a \cdot c\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 < -4.59999999999999981e-15

      1. Initial program 64.0%

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

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

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

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

          \[\leadsto \frac{\left(-b\right) + {\color{blue}{\left({\left(b \cdot b - \left(3 \cdot a\right) \cdot c\right)}^{\left(\frac{0.5}{2}\right)}\right)}}^{2}}{3 \cdot a} \]
        5. sub-neg63.9%

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

          \[\leadsto \frac{\left(-b\right) + {\left({\color{blue}{\left(\left(-\left(3 \cdot a\right) \cdot c\right) + b \cdot b\right)}}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
        7. *-commutative63.9%

          \[\leadsto \frac{\left(-b\right) + {\left({\left(\left(-\color{blue}{c \cdot \left(3 \cdot a\right)}\right) + b \cdot b\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
        8. distribute-rgt-neg-in63.9%

          \[\leadsto \frac{\left(-b\right) + {\left({\left(\color{blue}{c \cdot \left(-3 \cdot a\right)} + b \cdot b\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
        9. fma-def64.0%

          \[\leadsto \frac{\left(-b\right) + {\left({\color{blue}{\left(\mathsf{fma}\left(c, -3 \cdot a, b \cdot b\right)\right)}}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
        10. *-commutative64.0%

          \[\leadsto \frac{\left(-b\right) + {\left({\left(\mathsf{fma}\left(c, -\color{blue}{a \cdot 3}, b \cdot b\right)\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
        11. distribute-rgt-neg-in64.0%

          \[\leadsto \frac{\left(-b\right) + {\left({\left(\mathsf{fma}\left(c, \color{blue}{a \cdot \left(-3\right)}, b \cdot b\right)\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
        12. metadata-eval64.0%

          \[\leadsto \frac{\left(-b\right) + {\left({\left(\mathsf{fma}\left(c, a \cdot \color{blue}{-3}, b \cdot b\right)\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
        13. pow264.0%

          \[\leadsto \frac{\left(-b\right) + {\left({\left(\mathsf{fma}\left(c, a \cdot -3, \color{blue}{{b}^{2}}\right)\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
        14. metadata-eval64.0%

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

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

        \[\leadsto \frac{\left(-b\right) + \color{blue}{\left(-1 \cdot b + 1.5 \cdot \frac{a \cdot c}{b}\right)}}{3 \cdot a} \]
      5. Step-by-step derivation
        1. mul-1-neg92.7%

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

          \[\leadsto \frac{\left(-b\right) + \color{blue}{\left(1.5 \cdot \frac{a \cdot c}{b} + \left(-b\right)\right)}}{3 \cdot a} \]
        3. unsub-neg92.7%

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

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

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

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

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

      if -4.59999999999999981e-15 < b < 3.1000000000000001e-103

      1. Initial program 79.0%

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

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

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

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

          \[\leadsto \frac{\left(-b\right) + {\color{blue}{\left({\left(b \cdot b - \left(3 \cdot a\right) \cdot c\right)}^{\left(\frac{0.5}{2}\right)}\right)}}^{2}}{3 \cdot a} \]
        5. sub-neg78.7%

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

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

          \[\leadsto \frac{\left(-b\right) + {\left({\left(\left(-\color{blue}{c \cdot \left(3 \cdot a\right)}\right) + b \cdot b\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
        8. distribute-rgt-neg-in78.7%

          \[\leadsto \frac{\left(-b\right) + {\left({\left(\color{blue}{c \cdot \left(-3 \cdot a\right)} + b \cdot b\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
        9. fma-def78.7%

          \[\leadsto \frac{\left(-b\right) + {\left({\color{blue}{\left(\mathsf{fma}\left(c, -3 \cdot a, b \cdot b\right)\right)}}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
        10. *-commutative78.7%

          \[\leadsto \frac{\left(-b\right) + {\left({\left(\mathsf{fma}\left(c, -\color{blue}{a \cdot 3}, b \cdot b\right)\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
        11. distribute-rgt-neg-in78.7%

          \[\leadsto \frac{\left(-b\right) + {\left({\left(\mathsf{fma}\left(c, \color{blue}{a \cdot \left(-3\right)}, b \cdot b\right)\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
        12. metadata-eval78.7%

          \[\leadsto \frac{\left(-b\right) + {\left({\left(\mathsf{fma}\left(c, a \cdot \color{blue}{-3}, b \cdot b\right)\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
        13. pow278.7%

          \[\leadsto \frac{\left(-b\right) + {\left({\left(\mathsf{fma}\left(c, a \cdot -3, \color{blue}{{b}^{2}}\right)\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
        14. metadata-eval78.7%

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

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

        \[\leadsto \frac{\color{blue}{{\left(e^{0.25 \cdot \left(\log \left(-3 \cdot a\right) + -1 \cdot \log \left(\frac{1}{c}\right)\right)}\right)}^{2} - b}}{3 \cdot a} \]
      5. Step-by-step derivation
        1. Simplified69.5%

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

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

        if 3.1000000000000001e-103 < b

        1. Initial program 15.5%

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

          \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b}} \]
        3. Step-by-step derivation
          1. *-commutative89.7%

            \[\leadsto \color{blue}{\frac{c}{b} \cdot -0.5} \]
          2. associate-*l/89.7%

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -4.6 \cdot 10^{-15}:\\ \;\;\;\;\frac{\left(1.5 \cdot \left(c \cdot \frac{a}{b}\right) - b\right) - b}{a \cdot 3}\\ \mathbf{elif}\;b \leq 3.1 \cdot 10^{-103}:\\ \;\;\;\;\frac{\sqrt{-3 \cdot \left(a \cdot c\right)} - b}{a \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \]

      Alternative 4: 81.0% accurate, 1.0× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -4.6 \cdot 10^{-15}:\\ \;\;\;\;\frac{\left(1.5 \cdot \left(c \cdot \frac{a}{b}\right) - b\right) - b}{a \cdot 3}\\ \mathbf{elif}\;b \leq 5.2 \cdot 10^{-103}:\\ \;\;\;\;\frac{\sqrt{a \cdot \left(c \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 -4.6e-15)
         (/ (- (- (* 1.5 (* c (/ a b))) b) b) (* a 3.0))
         (if (<= b 5.2e-103)
           (/ (- (sqrt (* a (* c -3.0))) b) (* a 3.0))
           (/ (* c -0.5) b))))
      double code(double a, double b, double c) {
      	double tmp;
      	if (b <= -4.6e-15) {
      		tmp = (((1.5 * (c * (a / b))) - b) - b) / (a * 3.0);
      	} else if (b <= 5.2e-103) {
      		tmp = (sqrt((a * (c * -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 <= (-4.6d-15)) then
              tmp = (((1.5d0 * (c * (a / b))) - b) - b) / (a * 3.0d0)
          else if (b <= 5.2d-103) then
              tmp = (sqrt((a * (c * (-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 <= -4.6e-15) {
      		tmp = (((1.5 * (c * (a / b))) - b) - b) / (a * 3.0);
      	} else if (b <= 5.2e-103) {
      		tmp = (Math.sqrt((a * (c * -3.0))) - b) / (a * 3.0);
      	} else {
      		tmp = (c * -0.5) / b;
      	}
      	return tmp;
      }
      
      def code(a, b, c):
      	tmp = 0
      	if b <= -4.6e-15:
      		tmp = (((1.5 * (c * (a / b))) - b) - b) / (a * 3.0)
      	elif b <= 5.2e-103:
      		tmp = (math.sqrt((a * (c * -3.0))) - b) / (a * 3.0)
      	else:
      		tmp = (c * -0.5) / b
      	return tmp
      
      function code(a, b, c)
      	tmp = 0.0
      	if (b <= -4.6e-15)
      		tmp = Float64(Float64(Float64(Float64(1.5 * Float64(c * Float64(a / b))) - b) - b) / Float64(a * 3.0));
      	elseif (b <= 5.2e-103)
      		tmp = Float64(Float64(sqrt(Float64(a * Float64(c * -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 <= -4.6e-15)
      		tmp = (((1.5 * (c * (a / b))) - b) - b) / (a * 3.0);
      	elseif (b <= 5.2e-103)
      		tmp = (sqrt((a * (c * -3.0))) - b) / (a * 3.0);
      	else
      		tmp = (c * -0.5) / b;
      	end
      	tmp_2 = tmp;
      end
      
      code[a_, b_, c_] := If[LessEqual[b, -4.6e-15], N[(N[(N[(N[(1.5 * N[(c * N[(a / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision] - b), $MachinePrecision] / N[(a * 3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5.2e-103], N[(N[(N[Sqrt[N[(a * N[(c * -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 -4.6 \cdot 10^{-15}:\\
      \;\;\;\;\frac{\left(1.5 \cdot \left(c \cdot \frac{a}{b}\right) - b\right) - b}{a \cdot 3}\\
      
      \mathbf{elif}\;b \leq 5.2 \cdot 10^{-103}:\\
      \;\;\;\;\frac{\sqrt{a \cdot \left(c \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 < -4.59999999999999981e-15

        1. Initial program 64.0%

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

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

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

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

            \[\leadsto \frac{\left(-b\right) + {\color{blue}{\left({\left(b \cdot b - \left(3 \cdot a\right) \cdot c\right)}^{\left(\frac{0.5}{2}\right)}\right)}}^{2}}{3 \cdot a} \]
          5. sub-neg63.9%

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

            \[\leadsto \frac{\left(-b\right) + {\left({\color{blue}{\left(\left(-\left(3 \cdot a\right) \cdot c\right) + b \cdot b\right)}}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
          7. *-commutative63.9%

            \[\leadsto \frac{\left(-b\right) + {\left({\left(\left(-\color{blue}{c \cdot \left(3 \cdot a\right)}\right) + b \cdot b\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
          8. distribute-rgt-neg-in63.9%

            \[\leadsto \frac{\left(-b\right) + {\left({\left(\color{blue}{c \cdot \left(-3 \cdot a\right)} + b \cdot b\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
          9. fma-def64.0%

            \[\leadsto \frac{\left(-b\right) + {\left({\color{blue}{\left(\mathsf{fma}\left(c, -3 \cdot a, b \cdot b\right)\right)}}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
          10. *-commutative64.0%

            \[\leadsto \frac{\left(-b\right) + {\left({\left(\mathsf{fma}\left(c, -\color{blue}{a \cdot 3}, b \cdot b\right)\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
          11. distribute-rgt-neg-in64.0%

            \[\leadsto \frac{\left(-b\right) + {\left({\left(\mathsf{fma}\left(c, \color{blue}{a \cdot \left(-3\right)}, b \cdot b\right)\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
          12. metadata-eval64.0%

            \[\leadsto \frac{\left(-b\right) + {\left({\left(\mathsf{fma}\left(c, a \cdot \color{blue}{-3}, b \cdot b\right)\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
          13. pow264.0%

            \[\leadsto \frac{\left(-b\right) + {\left({\left(\mathsf{fma}\left(c, a \cdot -3, \color{blue}{{b}^{2}}\right)\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
          14. metadata-eval64.0%

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

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

          \[\leadsto \frac{\left(-b\right) + \color{blue}{\left(-1 \cdot b + 1.5 \cdot \frac{a \cdot c}{b}\right)}}{3 \cdot a} \]
        5. Step-by-step derivation
          1. mul-1-neg92.7%

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

            \[\leadsto \frac{\left(-b\right) + \color{blue}{\left(1.5 \cdot \frac{a \cdot c}{b} + \left(-b\right)\right)}}{3 \cdot a} \]
          3. unsub-neg92.7%

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

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

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

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

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

        if -4.59999999999999981e-15 < b < 5.19999999999999993e-103

        1. Initial program 79.0%

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

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

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

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

            \[\leadsto \frac{\left(-b\right) + {\color{blue}{\left({\left(b \cdot b - \left(3 \cdot a\right) \cdot c\right)}^{\left(\frac{0.5}{2}\right)}\right)}}^{2}}{3 \cdot a} \]
          5. sub-neg78.7%

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

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

            \[\leadsto \frac{\left(-b\right) + {\left({\left(\left(-\color{blue}{c \cdot \left(3 \cdot a\right)}\right) + b \cdot b\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
          8. distribute-rgt-neg-in78.7%

            \[\leadsto \frac{\left(-b\right) + {\left({\left(\color{blue}{c \cdot \left(-3 \cdot a\right)} + b \cdot b\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
          9. fma-def78.7%

            \[\leadsto \frac{\left(-b\right) + {\left({\color{blue}{\left(\mathsf{fma}\left(c, -3 \cdot a, b \cdot b\right)\right)}}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
          10. *-commutative78.7%

            \[\leadsto \frac{\left(-b\right) + {\left({\left(\mathsf{fma}\left(c, -\color{blue}{a \cdot 3}, b \cdot b\right)\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
          11. distribute-rgt-neg-in78.7%

            \[\leadsto \frac{\left(-b\right) + {\left({\left(\mathsf{fma}\left(c, \color{blue}{a \cdot \left(-3\right)}, b \cdot b\right)\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
          12. metadata-eval78.7%

            \[\leadsto \frac{\left(-b\right) + {\left({\left(\mathsf{fma}\left(c, a \cdot \color{blue}{-3}, b \cdot b\right)\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
          13. pow278.7%

            \[\leadsto \frac{\left(-b\right) + {\left({\left(\mathsf{fma}\left(c, a \cdot -3, \color{blue}{{b}^{2}}\right)\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
          14. metadata-eval78.7%

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

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

          \[\leadsto \frac{\color{blue}{{\left(e^{0.25 \cdot \left(\log \left(-3 \cdot a\right) + -1 \cdot \log \left(\frac{1}{c}\right)\right)}\right)}^{2} - b}}{3 \cdot a} \]
        5. Step-by-step derivation
          1. Simplified69.5%

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

          if 5.19999999999999993e-103 < b

          1. Initial program 15.5%

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

            \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b}} \]
          3. Step-by-step derivation
            1. *-commutative89.7%

              \[\leadsto \color{blue}{\frac{c}{b} \cdot -0.5} \]
            2. associate-*l/89.7%

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

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -4.6 \cdot 10^{-15}:\\ \;\;\;\;\frac{\left(1.5 \cdot \left(c \cdot \frac{a}{b}\right) - b\right) - b}{a \cdot 3}\\ \mathbf{elif}\;b \leq 5.2 \cdot 10^{-103}:\\ \;\;\;\;\frac{\sqrt{a \cdot \left(c \cdot -3\right)} - b}{a \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \]

        Alternative 5: 81.0% accurate, 1.0× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -4.6 \cdot 10^{-15}:\\ \;\;\;\;\frac{\left(1.5 \cdot \left(c \cdot \frac{a}{b}\right) - b\right) - b}{a \cdot 3}\\ \mathbf{elif}\;b \leq 6.5 \cdot 10^{-103}:\\ \;\;\;\;\frac{\frac{\sqrt{a \cdot \left(c \cdot -3\right)} - b}{a}}{3}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \end{array} \]
        (FPCore (a b c)
         :precision binary64
         (if (<= b -4.6e-15)
           (/ (- (- (* 1.5 (* c (/ a b))) b) b) (* a 3.0))
           (if (<= b 6.5e-103)
             (/ (/ (- (sqrt (* a (* c -3.0))) b) a) 3.0)
             (/ (* c -0.5) b))))
        double code(double a, double b, double c) {
        	double tmp;
        	if (b <= -4.6e-15) {
        		tmp = (((1.5 * (c * (a / b))) - b) - b) / (a * 3.0);
        	} else if (b <= 6.5e-103) {
        		tmp = ((sqrt((a * (c * -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 <= (-4.6d-15)) then
                tmp = (((1.5d0 * (c * (a / b))) - b) - b) / (a * 3.0d0)
            else if (b <= 6.5d-103) then
                tmp = ((sqrt((a * (c * (-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 <= -4.6e-15) {
        		tmp = (((1.5 * (c * (a / b))) - b) - b) / (a * 3.0);
        	} else if (b <= 6.5e-103) {
        		tmp = ((Math.sqrt((a * (c * -3.0))) - b) / a) / 3.0;
        	} else {
        		tmp = (c * -0.5) / b;
        	}
        	return tmp;
        }
        
        def code(a, b, c):
        	tmp = 0
        	if b <= -4.6e-15:
        		tmp = (((1.5 * (c * (a / b))) - b) - b) / (a * 3.0)
        	elif b <= 6.5e-103:
        		tmp = ((math.sqrt((a * (c * -3.0))) - b) / a) / 3.0
        	else:
        		tmp = (c * -0.5) / b
        	return tmp
        
        function code(a, b, c)
        	tmp = 0.0
        	if (b <= -4.6e-15)
        		tmp = Float64(Float64(Float64(Float64(1.5 * Float64(c * Float64(a / b))) - b) - b) / Float64(a * 3.0));
        	elseif (b <= 6.5e-103)
        		tmp = Float64(Float64(Float64(sqrt(Float64(a * Float64(c * -3.0))) - b) / 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 <= -4.6e-15)
        		tmp = (((1.5 * (c * (a / b))) - b) - b) / (a * 3.0);
        	elseif (b <= 6.5e-103)
        		tmp = ((sqrt((a * (c * -3.0))) - b) / a) / 3.0;
        	else
        		tmp = (c * -0.5) / b;
        	end
        	tmp_2 = tmp;
        end
        
        code[a_, b_, c_] := If[LessEqual[b, -4.6e-15], N[(N[(N[(N[(1.5 * N[(c * N[(a / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision] - b), $MachinePrecision] / N[(a * 3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 6.5e-103], N[(N[(N[(N[Sqrt[N[(a * N[(c * -3.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / a), $MachinePrecision] / 3.0), $MachinePrecision], N[(N[(c * -0.5), $MachinePrecision] / b), $MachinePrecision]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;b \leq -4.6 \cdot 10^{-15}:\\
        \;\;\;\;\frac{\left(1.5 \cdot \left(c \cdot \frac{a}{b}\right) - b\right) - b}{a \cdot 3}\\
        
        \mathbf{elif}\;b \leq 6.5 \cdot 10^{-103}:\\
        \;\;\;\;\frac{\frac{\sqrt{a \cdot \left(c \cdot -3\right)} - b}{a}}{3}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{c \cdot -0.5}{b}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if b < -4.59999999999999981e-15

          1. Initial program 64.0%

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

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

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

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

              \[\leadsto \frac{\left(-b\right) + {\color{blue}{\left({\left(b \cdot b - \left(3 \cdot a\right) \cdot c\right)}^{\left(\frac{0.5}{2}\right)}\right)}}^{2}}{3 \cdot a} \]
            5. sub-neg63.9%

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

              \[\leadsto \frac{\left(-b\right) + {\left({\color{blue}{\left(\left(-\left(3 \cdot a\right) \cdot c\right) + b \cdot b\right)}}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
            7. *-commutative63.9%

              \[\leadsto \frac{\left(-b\right) + {\left({\left(\left(-\color{blue}{c \cdot \left(3 \cdot a\right)}\right) + b \cdot b\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
            8. distribute-rgt-neg-in63.9%

              \[\leadsto \frac{\left(-b\right) + {\left({\left(\color{blue}{c \cdot \left(-3 \cdot a\right)} + b \cdot b\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
            9. fma-def64.0%

              \[\leadsto \frac{\left(-b\right) + {\left({\color{blue}{\left(\mathsf{fma}\left(c, -3 \cdot a, b \cdot b\right)\right)}}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
            10. *-commutative64.0%

              \[\leadsto \frac{\left(-b\right) + {\left({\left(\mathsf{fma}\left(c, -\color{blue}{a \cdot 3}, b \cdot b\right)\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
            11. distribute-rgt-neg-in64.0%

              \[\leadsto \frac{\left(-b\right) + {\left({\left(\mathsf{fma}\left(c, \color{blue}{a \cdot \left(-3\right)}, b \cdot b\right)\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
            12. metadata-eval64.0%

              \[\leadsto \frac{\left(-b\right) + {\left({\left(\mathsf{fma}\left(c, a \cdot \color{blue}{-3}, b \cdot b\right)\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
            13. pow264.0%

              \[\leadsto \frac{\left(-b\right) + {\left({\left(\mathsf{fma}\left(c, a \cdot -3, \color{blue}{{b}^{2}}\right)\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
            14. metadata-eval64.0%

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

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

            \[\leadsto \frac{\left(-b\right) + \color{blue}{\left(-1 \cdot b + 1.5 \cdot \frac{a \cdot c}{b}\right)}}{3 \cdot a} \]
          5. Step-by-step derivation
            1. mul-1-neg92.7%

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

              \[\leadsto \frac{\left(-b\right) + \color{blue}{\left(1.5 \cdot \frac{a \cdot c}{b} + \left(-b\right)\right)}}{3 \cdot a} \]
            3. unsub-neg92.7%

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

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

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

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

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

          if -4.59999999999999981e-15 < b < 6.49999999999999966e-103

          1. Initial program 79.0%

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

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

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

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

              \[\leadsto \frac{\left(-b\right) + {\color{blue}{\left({\left(b \cdot b - \left(3 \cdot a\right) \cdot c\right)}^{\left(\frac{0.5}{2}\right)}\right)}}^{2}}{3 \cdot a} \]
            5. sub-neg78.7%

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

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

              \[\leadsto \frac{\left(-b\right) + {\left({\left(\left(-\color{blue}{c \cdot \left(3 \cdot a\right)}\right) + b \cdot b\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
            8. distribute-rgt-neg-in78.7%

              \[\leadsto \frac{\left(-b\right) + {\left({\left(\color{blue}{c \cdot \left(-3 \cdot a\right)} + b \cdot b\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
            9. fma-def78.7%

              \[\leadsto \frac{\left(-b\right) + {\left({\color{blue}{\left(\mathsf{fma}\left(c, -3 \cdot a, b \cdot b\right)\right)}}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
            10. *-commutative78.7%

              \[\leadsto \frac{\left(-b\right) + {\left({\left(\mathsf{fma}\left(c, -\color{blue}{a \cdot 3}, b \cdot b\right)\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
            11. distribute-rgt-neg-in78.7%

              \[\leadsto \frac{\left(-b\right) + {\left({\left(\mathsf{fma}\left(c, \color{blue}{a \cdot \left(-3\right)}, b \cdot b\right)\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
            12. metadata-eval78.7%

              \[\leadsto \frac{\left(-b\right) + {\left({\left(\mathsf{fma}\left(c, a \cdot \color{blue}{-3}, b \cdot b\right)\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
            13. pow278.7%

              \[\leadsto \frac{\left(-b\right) + {\left({\left(\mathsf{fma}\left(c, a \cdot -3, \color{blue}{{b}^{2}}\right)\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
            14. metadata-eval78.7%

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

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

            \[\leadsto \frac{\color{blue}{{\left(e^{0.25 \cdot \left(\log \left(-3 \cdot a\right) + -1 \cdot \log \left(\frac{1}{c}\right)\right)}\right)}^{2} - b}}{3 \cdot a} \]
          5. Step-by-step derivation
            1. Simplified69.5%

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

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

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

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

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

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

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

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

              \[\leadsto \color{blue}{\frac{{\left(\sqrt[3]{\sqrt{c \cdot \left(a \cdot -3\right)} - b}\right)}^{2}}{a} \cdot \frac{\sqrt[3]{\sqrt{c \cdot \left(a \cdot -3\right)} - b}}{3}} \]
            4. Step-by-step derivation
              1. associate-*l/68.7%

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

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

                \[\leadsto \frac{\frac{\color{blue}{\left(\sqrt[3]{\sqrt{c \cdot \left(a \cdot -3\right)} - b} \cdot \sqrt[3]{\sqrt{c \cdot \left(a \cdot -3\right)} - b}\right)} \cdot \sqrt[3]{\sqrt{c \cdot \left(a \cdot -3\right)} - b}}{3}}{a} \]
              4. rem-3cbrt-lft69.6%

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

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

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

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

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

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

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

            if 6.49999999999999966e-103 < b

            1. Initial program 15.5%

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

              \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b}} \]
            3. Step-by-step derivation
              1. *-commutative89.7%

                \[\leadsto \color{blue}{\frac{c}{b} \cdot -0.5} \]
              2. associate-*l/89.7%

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

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -4.6 \cdot 10^{-15}:\\ \;\;\;\;\frac{\left(1.5 \cdot \left(c \cdot \frac{a}{b}\right) - b\right) - b}{a \cdot 3}\\ \mathbf{elif}\;b \leq 6.5 \cdot 10^{-103}:\\ \;\;\;\;\frac{\frac{\sqrt{a \cdot \left(c \cdot -3\right)} - b}{a}}{3}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \]

          Alternative 6: 80.9% accurate, 1.0× speedup?

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

            1. Initial program 64.0%

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

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

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

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

                \[\leadsto \frac{\left(-b\right) + {\color{blue}{\left({\left(b \cdot b - \left(3 \cdot a\right) \cdot c\right)}^{\left(\frac{0.5}{2}\right)}\right)}}^{2}}{3 \cdot a} \]
              5. sub-neg63.9%

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

                \[\leadsto \frac{\left(-b\right) + {\left({\color{blue}{\left(\left(-\left(3 \cdot a\right) \cdot c\right) + b \cdot b\right)}}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
              7. *-commutative63.9%

                \[\leadsto \frac{\left(-b\right) + {\left({\left(\left(-\color{blue}{c \cdot \left(3 \cdot a\right)}\right) + b \cdot b\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
              8. distribute-rgt-neg-in63.9%

                \[\leadsto \frac{\left(-b\right) + {\left({\left(\color{blue}{c \cdot \left(-3 \cdot a\right)} + b \cdot b\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
              9. fma-def64.0%

                \[\leadsto \frac{\left(-b\right) + {\left({\color{blue}{\left(\mathsf{fma}\left(c, -3 \cdot a, b \cdot b\right)\right)}}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
              10. *-commutative64.0%

                \[\leadsto \frac{\left(-b\right) + {\left({\left(\mathsf{fma}\left(c, -\color{blue}{a \cdot 3}, b \cdot b\right)\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
              11. distribute-rgt-neg-in64.0%

                \[\leadsto \frac{\left(-b\right) + {\left({\left(\mathsf{fma}\left(c, \color{blue}{a \cdot \left(-3\right)}, b \cdot b\right)\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
              12. metadata-eval64.0%

                \[\leadsto \frac{\left(-b\right) + {\left({\left(\mathsf{fma}\left(c, a \cdot \color{blue}{-3}, b \cdot b\right)\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
              13. pow264.0%

                \[\leadsto \frac{\left(-b\right) + {\left({\left(\mathsf{fma}\left(c, a \cdot -3, \color{blue}{{b}^{2}}\right)\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
              14. metadata-eval64.0%

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

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

              \[\leadsto \frac{\left(-b\right) + \color{blue}{\left(-1 \cdot b + 1.5 \cdot \frac{a \cdot c}{b}\right)}}{3 \cdot a} \]
            5. Step-by-step derivation
              1. mul-1-neg92.7%

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

                \[\leadsto \frac{\left(-b\right) + \color{blue}{\left(1.5 \cdot \frac{a \cdot c}{b} + \left(-b\right)\right)}}{3 \cdot a} \]
              3. unsub-neg92.7%

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

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

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

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

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

            if -1.12e-13 < b < 6e-103

            1. Initial program 79.0%

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

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

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

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

                \[\leadsto \frac{\left(-b\right) + {\color{blue}{\left({\left(b \cdot b - \left(3 \cdot a\right) \cdot c\right)}^{\left(\frac{0.5}{2}\right)}\right)}}^{2}}{3 \cdot a} \]
              5. sub-neg78.7%

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

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

                \[\leadsto \frac{\left(-b\right) + {\left({\left(\left(-\color{blue}{c \cdot \left(3 \cdot a\right)}\right) + b \cdot b\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
              8. distribute-rgt-neg-in78.7%

                \[\leadsto \frac{\left(-b\right) + {\left({\left(\color{blue}{c \cdot \left(-3 \cdot a\right)} + b \cdot b\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
              9. fma-def78.7%

                \[\leadsto \frac{\left(-b\right) + {\left({\color{blue}{\left(\mathsf{fma}\left(c, -3 \cdot a, b \cdot b\right)\right)}}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
              10. *-commutative78.7%

                \[\leadsto \frac{\left(-b\right) + {\left({\left(\mathsf{fma}\left(c, -\color{blue}{a \cdot 3}, b \cdot b\right)\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
              11. distribute-rgt-neg-in78.7%

                \[\leadsto \frac{\left(-b\right) + {\left({\left(\mathsf{fma}\left(c, \color{blue}{a \cdot \left(-3\right)}, b \cdot b\right)\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
              12. metadata-eval78.7%

                \[\leadsto \frac{\left(-b\right) + {\left({\left(\mathsf{fma}\left(c, a \cdot \color{blue}{-3}, b \cdot b\right)\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
              13. pow278.7%

                \[\leadsto \frac{\left(-b\right) + {\left({\left(\mathsf{fma}\left(c, a \cdot -3, \color{blue}{{b}^{2}}\right)\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
              14. metadata-eval78.7%

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

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

              \[\leadsto \frac{\color{blue}{{\left(e^{0.25 \cdot \left(\log \left(-3 \cdot a\right) + -1 \cdot \log \left(\frac{1}{c}\right)\right)}\right)}^{2} - b}}{3 \cdot a} \]
            5. Step-by-step derivation
              1. Simplified69.5%

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

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

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

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

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

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

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

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

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

                \[\leadsto \color{blue}{\frac{{\left(\sqrt[3]{\sqrt{c \cdot \left(a \cdot -3\right)} - b}\right)}^{2}}{a} \cdot \frac{\sqrt[3]{\sqrt{c \cdot \left(a \cdot -3\right)} - b}}{3}} \]
              5. Step-by-step derivation
                1. associate-*l/68.7%

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

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

                  \[\leadsto \frac{\frac{\color{blue}{\left(\sqrt[3]{\sqrt{c \cdot \left(a \cdot -3\right)} - b} \cdot \sqrt[3]{\sqrt{c \cdot \left(a \cdot -3\right)} - b}\right)} \cdot \sqrt[3]{\sqrt{c \cdot \left(a \cdot -3\right)} - b}}{3}}{a} \]
                4. rem-3cbrt-lft69.6%

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

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

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

              if 6e-103 < b

              1. Initial program 15.5%

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

                \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b}} \]
              3. Step-by-step derivation
                1. *-commutative89.7%

                  \[\leadsto \color{blue}{\frac{c}{b} \cdot -0.5} \]
                2. associate-*l/89.7%

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

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

              \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.12 \cdot 10^{-13}:\\ \;\;\;\;\frac{\left(1.5 \cdot \left(c \cdot \frac{a}{b}\right) - b\right) - b}{a \cdot 3}\\ \mathbf{elif}\;b \leq 6 \cdot 10^{-103}:\\ \;\;\;\;\frac{\frac{\sqrt{-3 \cdot \left(a \cdot c\right)} - b}{3}}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \]

            Alternative 7: 81.0% accurate, 1.0× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -4.6 \cdot 10^{-15}:\\ \;\;\;\;\frac{\left(1.5 \cdot \left(c \cdot \frac{a}{b}\right) - b\right) - b}{a \cdot 3}\\ \mathbf{elif}\;b \leq 7 \cdot 10^{-103}:\\ \;\;\;\;\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 -4.6e-15)
               (/ (- (- (* 1.5 (* c (/ a b))) b) b) (* a 3.0))
               (if (<= b 7e-103)
                 (/ (- (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 <= -4.6e-15) {
            		tmp = (((1.5 * (c * (a / b))) - b) - b) / (a * 3.0);
            	} else if (b <= 7e-103) {
            		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 <= (-4.6d-15)) then
                    tmp = (((1.5d0 * (c * (a / b))) - b) - b) / (a * 3.0d0)
                else if (b <= 7d-103) 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 <= -4.6e-15) {
            		tmp = (((1.5 * (c * (a / b))) - b) - b) / (a * 3.0);
            	} else if (b <= 7e-103) {
            		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 <= -4.6e-15:
            		tmp = (((1.5 * (c * (a / b))) - b) - b) / (a * 3.0)
            	elif b <= 7e-103:
            		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 <= -4.6e-15)
            		tmp = Float64(Float64(Float64(Float64(1.5 * Float64(c * Float64(a / b))) - b) - b) / Float64(a * 3.0));
            	elseif (b <= 7e-103)
            		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 <= -4.6e-15)
            		tmp = (((1.5 * (c * (a / b))) - b) - b) / (a * 3.0);
            	elseif (b <= 7e-103)
            		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, -4.6e-15], N[(N[(N[(N[(1.5 * N[(c * N[(a / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision] - b), $MachinePrecision] / N[(a * 3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 7e-103], 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 -4.6 \cdot 10^{-15}:\\
            \;\;\;\;\frac{\left(1.5 \cdot \left(c \cdot \frac{a}{b}\right) - b\right) - b}{a \cdot 3}\\
            
            \mathbf{elif}\;b \leq 7 \cdot 10^{-103}:\\
            \;\;\;\;\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 < -4.59999999999999981e-15

              1. Initial program 64.0%

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

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

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

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

                  \[\leadsto \frac{\left(-b\right) + {\color{blue}{\left({\left(b \cdot b - \left(3 \cdot a\right) \cdot c\right)}^{\left(\frac{0.5}{2}\right)}\right)}}^{2}}{3 \cdot a} \]
                5. sub-neg63.9%

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

                  \[\leadsto \frac{\left(-b\right) + {\left({\color{blue}{\left(\left(-\left(3 \cdot a\right) \cdot c\right) + b \cdot b\right)}}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
                7. *-commutative63.9%

                  \[\leadsto \frac{\left(-b\right) + {\left({\left(\left(-\color{blue}{c \cdot \left(3 \cdot a\right)}\right) + b \cdot b\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
                8. distribute-rgt-neg-in63.9%

                  \[\leadsto \frac{\left(-b\right) + {\left({\left(\color{blue}{c \cdot \left(-3 \cdot a\right)} + b \cdot b\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
                9. fma-def64.0%

                  \[\leadsto \frac{\left(-b\right) + {\left({\color{blue}{\left(\mathsf{fma}\left(c, -3 \cdot a, b \cdot b\right)\right)}}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
                10. *-commutative64.0%

                  \[\leadsto \frac{\left(-b\right) + {\left({\left(\mathsf{fma}\left(c, -\color{blue}{a \cdot 3}, b \cdot b\right)\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
                11. distribute-rgt-neg-in64.0%

                  \[\leadsto \frac{\left(-b\right) + {\left({\left(\mathsf{fma}\left(c, \color{blue}{a \cdot \left(-3\right)}, b \cdot b\right)\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
                12. metadata-eval64.0%

                  \[\leadsto \frac{\left(-b\right) + {\left({\left(\mathsf{fma}\left(c, a \cdot \color{blue}{-3}, b \cdot b\right)\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
                13. pow264.0%

                  \[\leadsto \frac{\left(-b\right) + {\left({\left(\mathsf{fma}\left(c, a \cdot -3, \color{blue}{{b}^{2}}\right)\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
                14. metadata-eval64.0%

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

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

                \[\leadsto \frac{\left(-b\right) + \color{blue}{\left(-1 \cdot b + 1.5 \cdot \frac{a \cdot c}{b}\right)}}{3 \cdot a} \]
              5. Step-by-step derivation
                1. mul-1-neg92.7%

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

                  \[\leadsto \frac{\left(-b\right) + \color{blue}{\left(1.5 \cdot \frac{a \cdot c}{b} + \left(-b\right)\right)}}{3 \cdot a} \]
                3. unsub-neg92.7%

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

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

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

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

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

              if -4.59999999999999981e-15 < b < 7.00000000000000032e-103

              1. Initial program 79.0%

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

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

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

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

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

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

              if 7.00000000000000032e-103 < b

              1. Initial program 15.5%

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

                \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b}} \]
              3. Step-by-step derivation
                1. *-commutative89.7%

                  \[\leadsto \color{blue}{\frac{c}{b} \cdot -0.5} \]
                2. associate-*l/89.7%

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

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

              \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -4.6 \cdot 10^{-15}:\\ \;\;\;\;\frac{\left(1.5 \cdot \left(c \cdot \frac{a}{b}\right) - b\right) - b}{a \cdot 3}\\ \mathbf{elif}\;b \leq 7 \cdot 10^{-103}:\\ \;\;\;\;\frac{\sqrt{c \cdot \left(a \cdot -3\right)} - b}{a \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \]

            Alternative 8: 67.2% accurate, 8.9× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -2 \cdot 10^{-310}:\\ \;\;\;\;-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 -2e-310)
               (+ (* -0.6666666666666666 (/ b a)) (* 0.5 (/ c b)))
               (/ (* c -0.5) b)))
            double code(double a, double b, double c) {
            	double tmp;
            	if (b <= -2e-310) {
            		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 <= (-2d-310)) 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 <= -2e-310) {
            		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 <= -2e-310:
            		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 <= -2e-310)
            		tmp = Float64(Float64(-0.6666666666666666 * Float64(b / 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 <= -2e-310)
            		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, -2e-310], 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 -2 \cdot 10^{-310}:\\
            \;\;\;\;-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.999999999999994e-310

              1. Initial program 70.0%

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

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

              if -1.999999999999994e-310 < b

              1. Initial program 27.6%

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

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

                  \[\leadsto \color{blue}{\frac{c}{b} \cdot -0.5} \]
                2. associate-*l/73.4%

                  \[\leadsto \color{blue}{\frac{c \cdot -0.5}{b}} \]
              4. Simplified73.4%

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

              \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2 \cdot 10^{-310}:\\ \;\;\;\;-0.6666666666666666 \cdot \frac{b}{a} + 0.5 \cdot \frac{c}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \]

            Alternative 9: 67.1% accurate, 16.4× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq 1.9 \cdot 10^{-279}:\\ \;\;\;\;\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 1.9e-279) (/ b (* a -1.5)) (/ (* c -0.5) b)))
            double code(double a, double b, double c) {
            	double tmp;
            	if (b <= 1.9e-279) {
            		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 <= 1.9d-279) 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 <= 1.9e-279) {
            		tmp = b / (a * -1.5);
            	} else {
            		tmp = (c * -0.5) / b;
            	}
            	return tmp;
            }
            
            def code(a, b, c):
            	tmp = 0
            	if b <= 1.9e-279:
            		tmp = b / (a * -1.5)
            	else:
            		tmp = (c * -0.5) / b
            	return tmp
            
            function code(a, b, c)
            	tmp = 0.0
            	if (b <= 1.9e-279)
            		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 <= 1.9e-279)
            		tmp = b / (a * -1.5);
            	else
            		tmp = (c * -0.5) / b;
            	end
            	tmp_2 = tmp;
            end
            
            code[a_, b_, c_] := If[LessEqual[b, 1.9e-279], 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 1.9 \cdot 10^{-279}:\\
            \;\;\;\;\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 < 1.90000000000000016e-279

              1. Initial program 69.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. add-sqr-sqrt69.8%

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

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

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

                  \[\leadsto \frac{\left(-b\right) + {\color{blue}{\left({\left(b \cdot b - \left(3 \cdot a\right) \cdot c\right)}^{\left(\frac{0.5}{2}\right)}\right)}}^{2}}{3 \cdot a} \]
                5. sub-neg69.8%

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

                  \[\leadsto \frac{\left(-b\right) + {\left({\color{blue}{\left(\left(-\left(3 \cdot a\right) \cdot c\right) + b \cdot b\right)}}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
                7. *-commutative69.8%

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

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

                  \[\leadsto \frac{\left(-b\right) + {\left({\color{blue}{\left(\mathsf{fma}\left(c, -3 \cdot a, b \cdot b\right)\right)}}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
                10. *-commutative69.8%

                  \[\leadsto \frac{\left(-b\right) + {\left({\left(\mathsf{fma}\left(c, -\color{blue}{a \cdot 3}, b \cdot b\right)\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
                11. distribute-rgt-neg-in69.8%

                  \[\leadsto \frac{\left(-b\right) + {\left({\left(\mathsf{fma}\left(c, \color{blue}{a \cdot \left(-3\right)}, b \cdot b\right)\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
                12. metadata-eval69.8%

                  \[\leadsto \frac{\left(-b\right) + {\left({\left(\mathsf{fma}\left(c, a \cdot \color{blue}{-3}, b \cdot b\right)\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
                13. pow269.8%

                  \[\leadsto \frac{\left(-b\right) + {\left({\left(\mathsf{fma}\left(c, a \cdot -3, \color{blue}{{b}^{2}}\right)\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
                14. metadata-eval69.8%

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

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

                \[\leadsto \color{blue}{2 \cdot \left(-0.3333333333333333 \cdot \frac{b}{a}\right)} \]
              5. Step-by-step derivation
                1. associate-*r*71.1%

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

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

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

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

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

                \[\leadsto \color{blue}{\frac{b}{\frac{a}{-0.6666666666666666}}} \]
              7. Taylor expanded in a around 0 71.1%

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

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

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

              if 1.90000000000000016e-279 < b

              1. Initial program 26.7%

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

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

                  \[\leadsto \color{blue}{\frac{c}{b} \cdot -0.5} \]
                2. associate-*l/75.1%

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

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

              \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 1.9 \cdot 10^{-279}:\\ \;\;\;\;\frac{b}{a \cdot -1.5}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \]

            Alternative 10: 34.5% 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 48.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. frac-2neg48.5%

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

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

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

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

              \[\leadsto \color{blue}{\left(b - \mathsf{hypot}\left(b, \sqrt{c \cdot \left(a \cdot -3\right)}\right)\right) \cdot \frac{\frac{1}{a}}{-3}} \]
            6. Step-by-step derivation
              1. associate-*r/43.9%

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

                \[\leadsto \color{blue}{\frac{1}{\frac{-3}{\left(b - \mathsf{hypot}\left(b, \sqrt{c \cdot \left(a \cdot -3\right)}\right)\right) \cdot \frac{1}{a}}}} \]
              3. un-div-inv43.9%

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

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

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

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

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

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

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

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

            Alternative 11: 34.5% accurate, 23.2× speedup?

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

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

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

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

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

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

            Alternative 12: 34.6% accurate, 23.2× speedup?

            \[\begin{array}{l} \\ \frac{b}{a \cdot -1.5} \end{array} \]
            (FPCore (a b c) :precision binary64 (/ b (* a -1.5)))
            double code(double a, double b, double c) {
            	return b / (a * -1.5);
            }
            
            real(8) function code(a, b, c)
                real(8), intent (in) :: a
                real(8), intent (in) :: b
                real(8), intent (in) :: c
                code = b / (a * (-1.5d0))
            end function
            
            public static double code(double a, double b, double c) {
            	return b / (a * -1.5);
            }
            
            def code(a, b, c):
            	return b / (a * -1.5)
            
            function code(a, b, c)
            	return Float64(b / Float64(a * -1.5))
            end
            
            function tmp = code(a, b, c)
            	tmp = b / (a * -1.5);
            end
            
            code[a_, b_, c_] := N[(b / N[(a * -1.5), $MachinePrecision]), $MachinePrecision]
            
            \begin{array}{l}
            
            \\
            \frac{b}{a \cdot -1.5}
            \end{array}
            
            Derivation
            1. Initial program 48.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. add-sqr-sqrt46.7%

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

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

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

                \[\leadsto \frac{\left(-b\right) + {\color{blue}{\left({\left(b \cdot b - \left(3 \cdot a\right) \cdot c\right)}^{\left(\frac{0.5}{2}\right)}\right)}}^{2}}{3 \cdot a} \]
              5. sub-neg46.7%

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

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

                \[\leadsto \frac{\left(-b\right) + {\left({\left(\left(-\color{blue}{c \cdot \left(3 \cdot a\right)}\right) + b \cdot b\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
              8. distribute-rgt-neg-in46.7%

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

                \[\leadsto \frac{\left(-b\right) + {\left({\color{blue}{\left(\mathsf{fma}\left(c, -3 \cdot a, b \cdot b\right)\right)}}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
              10. *-commutative46.8%

                \[\leadsto \frac{\left(-b\right) + {\left({\left(\mathsf{fma}\left(c, -\color{blue}{a \cdot 3}, b \cdot b\right)\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
              11. distribute-rgt-neg-in46.8%

                \[\leadsto \frac{\left(-b\right) + {\left({\left(\mathsf{fma}\left(c, \color{blue}{a \cdot \left(-3\right)}, b \cdot b\right)\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
              12. metadata-eval46.8%

                \[\leadsto \frac{\left(-b\right) + {\left({\left(\mathsf{fma}\left(c, a \cdot \color{blue}{-3}, b \cdot b\right)\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
              13. pow246.8%

                \[\leadsto \frac{\left(-b\right) + {\left({\left(\mathsf{fma}\left(c, a \cdot -3, \color{blue}{{b}^{2}}\right)\right)}^{\left(\frac{0.5}{2}\right)}\right)}^{2}}{3 \cdot a} \]
              14. metadata-eval46.8%

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

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

              \[\leadsto \color{blue}{2 \cdot \left(-0.3333333333333333 \cdot \frac{b}{a}\right)} \]
            5. Step-by-step derivation
              1. associate-*r*37.1%

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

                \[\leadsto \color{blue}{-0.6666666666666666} \cdot \frac{b}{a} \]
              3. *-commutative37.1%

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

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

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

              \[\leadsto \color{blue}{\frac{b}{\frac{a}{-0.6666666666666666}}} \]
            7. Taylor expanded in a around 0 37.1%

              \[\leadsto \frac{b}{\color{blue}{-1.5 \cdot a}} \]
            8. Step-by-step derivation
              1. *-commutative37.1%

                \[\leadsto \frac{b}{\color{blue}{a \cdot -1.5}} \]
            9. Simplified37.1%

              \[\leadsto \frac{b}{\color{blue}{a \cdot -1.5}} \]
            10. Final simplification37.1%

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

            Reproduce

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