jeff quadratic root 2

Percentage Accurate: 71.6% → 90.2%
Time: 16.8s
Alternatives: 10
Speedup: 1.0×

Specification

?
\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\\ \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - t\_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + t\_0}{2 \cdot a}\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (let* ((t_0 (sqrt (- (* b b) (* (* 4.0 a) c)))))
   (if (>= b 0.0) (/ (* 2.0 c) (- (- b) t_0)) (/ (+ (- b) t_0) (* 2.0 a)))))
double code(double a, double b, double c) {
	double t_0 = sqrt(((b * b) - ((4.0 * a) * c)));
	double tmp;
	if (b >= 0.0) {
		tmp = (2.0 * c) / (-b - t_0);
	} else {
		tmp = (-b + t_0) / (2.0 * a);
	}
	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) :: t_0
    real(8) :: tmp
    t_0 = sqrt(((b * b) - ((4.0d0 * a) * c)))
    if (b >= 0.0d0) then
        tmp = (2.0d0 * c) / (-b - t_0)
    else
        tmp = (-b + t_0) / (2.0d0 * a)
    end if
    code = tmp
end function
public static double code(double a, double b, double c) {
	double t_0 = Math.sqrt(((b * b) - ((4.0 * a) * c)));
	double tmp;
	if (b >= 0.0) {
		tmp = (2.0 * c) / (-b - t_0);
	} else {
		tmp = (-b + t_0) / (2.0 * a);
	}
	return tmp;
}
def code(a, b, c):
	t_0 = math.sqrt(((b * b) - ((4.0 * a) * c)))
	tmp = 0
	if b >= 0.0:
		tmp = (2.0 * c) / (-b - t_0)
	else:
		tmp = (-b + t_0) / (2.0 * a)
	return tmp
function code(a, b, c)
	t_0 = sqrt(Float64(Float64(b * b) - Float64(Float64(4.0 * a) * c)))
	tmp = 0.0
	if (b >= 0.0)
		tmp = Float64(Float64(2.0 * c) / Float64(Float64(-b) - t_0));
	else
		tmp = Float64(Float64(Float64(-b) + t_0) / Float64(2.0 * a));
	end
	return tmp
end
function tmp_2 = code(a, b, c)
	t_0 = sqrt(((b * b) - ((4.0 * a) * c)));
	tmp = 0.0;
	if (b >= 0.0)
		tmp = (2.0 * c) / (-b - t_0);
	else
		tmp = (-b + t_0) / (2.0 * a);
	end
	tmp_2 = tmp;
end
code[a_, b_, c_] := Block[{t$95$0 = N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(N[(4.0 * a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[GreaterEqual[b, 0.0], N[(N[(2.0 * c), $MachinePrecision] / N[((-b) - t$95$0), $MachinePrecision]), $MachinePrecision], N[(N[((-b) + t$95$0), $MachinePrecision] / N[(2.0 * a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\\
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - t\_0}\\

\mathbf{else}:\\
\;\;\;\;\frac{\left(-b\right) + t\_0}{2 \cdot a}\\


\end{array}
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 10 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 71.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\\ \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - t\_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + t\_0}{2 \cdot a}\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (let* ((t_0 (sqrt (- (* b b) (* (* 4.0 a) c)))))
   (if (>= b 0.0) (/ (* 2.0 c) (- (- b) t_0)) (/ (+ (- b) t_0) (* 2.0 a)))))
double code(double a, double b, double c) {
	double t_0 = sqrt(((b * b) - ((4.0 * a) * c)));
	double tmp;
	if (b >= 0.0) {
		tmp = (2.0 * c) / (-b - t_0);
	} else {
		tmp = (-b + t_0) / (2.0 * a);
	}
	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) :: t_0
    real(8) :: tmp
    t_0 = sqrt(((b * b) - ((4.0d0 * a) * c)))
    if (b >= 0.0d0) then
        tmp = (2.0d0 * c) / (-b - t_0)
    else
        tmp = (-b + t_0) / (2.0d0 * a)
    end if
    code = tmp
end function
public static double code(double a, double b, double c) {
	double t_0 = Math.sqrt(((b * b) - ((4.0 * a) * c)));
	double tmp;
	if (b >= 0.0) {
		tmp = (2.0 * c) / (-b - t_0);
	} else {
		tmp = (-b + t_0) / (2.0 * a);
	}
	return tmp;
}
def code(a, b, c):
	t_0 = math.sqrt(((b * b) - ((4.0 * a) * c)))
	tmp = 0
	if b >= 0.0:
		tmp = (2.0 * c) / (-b - t_0)
	else:
		tmp = (-b + t_0) / (2.0 * a)
	return tmp
function code(a, b, c)
	t_0 = sqrt(Float64(Float64(b * b) - Float64(Float64(4.0 * a) * c)))
	tmp = 0.0
	if (b >= 0.0)
		tmp = Float64(Float64(2.0 * c) / Float64(Float64(-b) - t_0));
	else
		tmp = Float64(Float64(Float64(-b) + t_0) / Float64(2.0 * a));
	end
	return tmp
end
function tmp_2 = code(a, b, c)
	t_0 = sqrt(((b * b) - ((4.0 * a) * c)));
	tmp = 0.0;
	if (b >= 0.0)
		tmp = (2.0 * c) / (-b - t_0);
	else
		tmp = (-b + t_0) / (2.0 * a);
	end
	tmp_2 = tmp;
end
code[a_, b_, c_] := Block[{t$95$0 = N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(N[(4.0 * a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[GreaterEqual[b, 0.0], N[(N[(2.0 * c), $MachinePrecision] / N[((-b) - t$95$0), $MachinePrecision]), $MachinePrecision], N[(N[((-b) + t$95$0), $MachinePrecision] / N[(2.0 * a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\\
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - t\_0}\\

\mathbf{else}:\\
\;\;\;\;\frac{\left(-b\right) + t\_0}{2 \cdot a}\\


\end{array}
\end{array}

Alternative 1: 90.2% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt{b \cdot b - c \cdot \left(4 \cdot a\right)}\\ t_1 := \frac{2 \cdot c}{\left(-b\right) - t\_0}\\ t_2 := \frac{t\_0 - b}{2 \cdot a}\\ \mathbf{if}\;b \leq -1 \cdot 10^{+128}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) - b}{2 \cdot a}\\ \end{array}\\ \mathbf{elif}\;b \leq 1.15 \cdot 10^{+64}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{b \cdot -2}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (let* ((t_0 (sqrt (- (* b b) (* c (* 4.0 a)))))
        (t_1 (/ (* 2.0 c) (- (- b) t_0)))
        (t_2 (/ (- t_0 b) (* 2.0 a))))
   (if (<= b -1e+128)
     (if (>= b 0.0) t_1 (/ (- (- b) b) (* 2.0 a)))
     (if (<= b 1.15e+64)
       (if (>= b 0.0) t_1 t_2)
       (if (>= b 0.0) (/ (* 2.0 c) (* b -2.0)) t_2)))))
double code(double a, double b, double c) {
	double t_0 = sqrt(((b * b) - (c * (4.0 * a))));
	double t_1 = (2.0 * c) / (-b - t_0);
	double t_2 = (t_0 - b) / (2.0 * a);
	double tmp_1;
	if (b <= -1e+128) {
		double tmp_2;
		if (b >= 0.0) {
			tmp_2 = t_1;
		} else {
			tmp_2 = (-b - b) / (2.0 * a);
		}
		tmp_1 = tmp_2;
	} else if (b <= 1.15e+64) {
		double tmp_3;
		if (b >= 0.0) {
			tmp_3 = t_1;
		} else {
			tmp_3 = t_2;
		}
		tmp_1 = tmp_3;
	} else if (b >= 0.0) {
		tmp_1 = (2.0 * c) / (b * -2.0);
	} else {
		tmp_1 = t_2;
	}
	return tmp_1;
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    real(8) :: tmp_1
    real(8) :: tmp_2
    real(8) :: tmp_3
    t_0 = sqrt(((b * b) - (c * (4.0d0 * a))))
    t_1 = (2.0d0 * c) / (-b - t_0)
    t_2 = (t_0 - b) / (2.0d0 * a)
    if (b <= (-1d+128)) then
        if (b >= 0.0d0) then
            tmp_2 = t_1
        else
            tmp_2 = (-b - b) / (2.0d0 * a)
        end if
        tmp_1 = tmp_2
    else if (b <= 1.15d+64) then
        if (b >= 0.0d0) then
            tmp_3 = t_1
        else
            tmp_3 = t_2
        end if
        tmp_1 = tmp_3
    else if (b >= 0.0d0) then
        tmp_1 = (2.0d0 * c) / (b * (-2.0d0))
    else
        tmp_1 = t_2
    end if
    code = tmp_1
end function
public static double code(double a, double b, double c) {
	double t_0 = Math.sqrt(((b * b) - (c * (4.0 * a))));
	double t_1 = (2.0 * c) / (-b - t_0);
	double t_2 = (t_0 - b) / (2.0 * a);
	double tmp_1;
	if (b <= -1e+128) {
		double tmp_2;
		if (b >= 0.0) {
			tmp_2 = t_1;
		} else {
			tmp_2 = (-b - b) / (2.0 * a);
		}
		tmp_1 = tmp_2;
	} else if (b <= 1.15e+64) {
		double tmp_3;
		if (b >= 0.0) {
			tmp_3 = t_1;
		} else {
			tmp_3 = t_2;
		}
		tmp_1 = tmp_3;
	} else if (b >= 0.0) {
		tmp_1 = (2.0 * c) / (b * -2.0);
	} else {
		tmp_1 = t_2;
	}
	return tmp_1;
}
def code(a, b, c):
	t_0 = math.sqrt(((b * b) - (c * (4.0 * a))))
	t_1 = (2.0 * c) / (-b - t_0)
	t_2 = (t_0 - b) / (2.0 * a)
	tmp_1 = 0
	if b <= -1e+128:
		tmp_2 = 0
		if b >= 0.0:
			tmp_2 = t_1
		else:
			tmp_2 = (-b - b) / (2.0 * a)
		tmp_1 = tmp_2
	elif b <= 1.15e+64:
		tmp_3 = 0
		if b >= 0.0:
			tmp_3 = t_1
		else:
			tmp_3 = t_2
		tmp_1 = tmp_3
	elif b >= 0.0:
		tmp_1 = (2.0 * c) / (b * -2.0)
	else:
		tmp_1 = t_2
	return tmp_1
function code(a, b, c)
	t_0 = sqrt(Float64(Float64(b * b) - Float64(c * Float64(4.0 * a))))
	t_1 = Float64(Float64(2.0 * c) / Float64(Float64(-b) - t_0))
	t_2 = Float64(Float64(t_0 - b) / Float64(2.0 * a))
	tmp_1 = 0.0
	if (b <= -1e+128)
		tmp_2 = 0.0
		if (b >= 0.0)
			tmp_2 = t_1;
		else
			tmp_2 = Float64(Float64(Float64(-b) - b) / Float64(2.0 * a));
		end
		tmp_1 = tmp_2;
	elseif (b <= 1.15e+64)
		tmp_3 = 0.0
		if (b >= 0.0)
			tmp_3 = t_1;
		else
			tmp_3 = t_2;
		end
		tmp_1 = tmp_3;
	elseif (b >= 0.0)
		tmp_1 = Float64(Float64(2.0 * c) / Float64(b * -2.0));
	else
		tmp_1 = t_2;
	end
	return tmp_1
end
function tmp_5 = code(a, b, c)
	t_0 = sqrt(((b * b) - (c * (4.0 * a))));
	t_1 = (2.0 * c) / (-b - t_0);
	t_2 = (t_0 - b) / (2.0 * a);
	tmp_2 = 0.0;
	if (b <= -1e+128)
		tmp_3 = 0.0;
		if (b >= 0.0)
			tmp_3 = t_1;
		else
			tmp_3 = (-b - b) / (2.0 * a);
		end
		tmp_2 = tmp_3;
	elseif (b <= 1.15e+64)
		tmp_4 = 0.0;
		if (b >= 0.0)
			tmp_4 = t_1;
		else
			tmp_4 = t_2;
		end
		tmp_2 = tmp_4;
	elseif (b >= 0.0)
		tmp_2 = (2.0 * c) / (b * -2.0);
	else
		tmp_2 = t_2;
	end
	tmp_5 = tmp_2;
end
code[a_, b_, c_] := Block[{t$95$0 = N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(c * N[(4.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[(2.0 * c), $MachinePrecision] / N[((-b) - t$95$0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t$95$0 - b), $MachinePrecision] / N[(2.0 * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1e+128], If[GreaterEqual[b, 0.0], t$95$1, N[(N[((-b) - b), $MachinePrecision] / N[(2.0 * a), $MachinePrecision]), $MachinePrecision]], If[LessEqual[b, 1.15e+64], If[GreaterEqual[b, 0.0], t$95$1, t$95$2], If[GreaterEqual[b, 0.0], N[(N[(2.0 * c), $MachinePrecision] / N[(b * -2.0), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \sqrt{b \cdot b - c \cdot \left(4 \cdot a\right)}\\
t_1 := \frac{2 \cdot c}{\left(-b\right) - t\_0}\\
t_2 := \frac{t\_0 - b}{2 \cdot a}\\
\mathbf{if}\;b \leq -1 \cdot 10^{+128}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;\frac{\left(-b\right) - b}{2 \cdot a}\\


\end{array}\\

\mathbf{elif}\;b \leq 1.15 \cdot 10^{+64}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}\\

\mathbf{elif}\;b \geq 0:\\
\;\;\;\;\frac{2 \cdot c}{b \cdot -2}\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


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

    1. Initial program 26.9%

      \[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cbrt-cube25.0%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt[3]{\left(\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} \cdot \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\right) \cdot \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}}{2 \cdot a}\\ \end{array} \]
      2. pow325.0%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt[3]{{\left(\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\right)}^{3}}}{2 \cdot a}\\ \end{array} \]
      3. sqrt-pow225.0%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt[3]{{\left(b \cdot b - \left(4 \cdot a\right) \cdot c\right)}^{\left(\frac{3}{2}\right)}}}{2 \cdot a}\\ \end{array} \]
      4. fma-neg25.3%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt[3]{{\left(\mathsf{fma}\left(b, b, -\left(4 \cdot a\right) \cdot c\right)\right)}^{\left(\frac{3}{2}\right)}}}{2 \cdot a}\\ \end{array} \]
      5. *-commutative25.3%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt[3]{{\left(\mathsf{fma}\left(b, b, -c \cdot \left(4 \cdot a\right)\right)\right)}^{\left(\frac{3}{2}\right)}}}{2 \cdot a}\\ \end{array} \]
      6. distribute-rgt-neg-in25.3%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt[3]{{\left(\mathsf{fma}\left(b, b, c \cdot \left(-4 \cdot a\right)\right)\right)}^{\left(\frac{3}{2}\right)}}}{2 \cdot a}\\ \end{array} \]
      7. distribute-lft-neg-in25.3%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt[3]{{\left(\mathsf{fma}\left(b, b, c \cdot \left(\left(-4\right) \cdot a\right)\right)\right)}^{\left(\frac{3}{2}\right)}}}{2 \cdot a}\\ \end{array} \]
      8. metadata-eval25.3%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt[3]{{\left(\mathsf{fma}\left(b, b, c \cdot \left(-4 \cdot a\right)\right)\right)}^{\left(\frac{3}{2}\right)}}}{2 \cdot a}\\ \end{array} \]
      9. *-commutative25.3%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt[3]{{\left(\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -4\right)\right)\right)}^{\left(\frac{3}{2}\right)}}}{2 \cdot a}\\ \end{array} \]
      10. metadata-eval25.3%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt[3]{{\left(\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -4\right)\right)\right)}^{1.5}}}{2 \cdot a}\\ \end{array} \]
    4. Applied egg-rr25.3%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt[3]{{\left(\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -4\right)\right)\right)}^{1.5}}}{2 \cdot a}\\ \end{array} \]
    5. Taylor expanded in b around -inf 96.5%

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

    if -1.0000000000000001e128 < b < 1.15e64

    1. Initial program 85.2%

      \[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
    2. Add Preprocessing

    if 1.15e64 < b

    1. Initial program 50.8%

      \[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf 89.7%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{-2 \cdot b}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
    4. Step-by-step derivation
      1. *-commutative89.7%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{b \cdot -2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
    5. Simplified89.7%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{b \cdot -2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification88.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1 \cdot 10^{+128}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - c \cdot \left(4 \cdot a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) - b}{2 \cdot a}\\ \end{array}\\ \mathbf{elif}\;b \leq 1.15 \cdot 10^{+64}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - c \cdot \left(4 \cdot a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{b \cdot b - c \cdot \left(4 \cdot a\right)} - b}{2 \cdot a}\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{b \cdot -2}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{b \cdot b - c \cdot \left(4 \cdot a\right)} - b}{2 \cdot a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 90.1% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt{b \cdot b - c \cdot \left(4 \cdot a\right)}\\ t_1 := \frac{t\_0 - b}{2 \cdot a}\\ \mathbf{if}\;b \leq -9 \cdot 10^{+127}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \left(\frac{-4}{a} \cdot \frac{b}{c \cdot -4}\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array}\\ \mathbf{elif}\;b \leq -2 \cdot 10^{-310}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{a}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array}\\ \mathbf{elif}\;b \leq 1.1 \cdot 10^{+64}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - t\_0}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \frac{b \cdot \sqrt[3]{-0.125}}{a}\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{b \cdot -2}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (let* ((t_0 (sqrt (- (* b b) (* c (* 4.0 a))))) (t_1 (/ (- t_0 b) (* 2.0 a))))
   (if (<= b -9e+127)
     (if (>= b 0.0)
       (* c (* (/ -4.0 a) (/ b (* c -4.0))))
       (* 2.0 (* b (/ (cbrt -0.125) a))))
     (if (<= b -2e-310)
       (if (>= b 0.0) (/ b a) t_1)
       (if (<= b 1.1e+64)
         (if (>= b 0.0)
           (/ (* 2.0 c) (- (- b) t_0))
           (* 2.0 (/ (* b (cbrt -0.125)) a)))
         (if (>= b 0.0) (/ (* 2.0 c) (* b -2.0)) t_1))))))
double code(double a, double b, double c) {
	double t_0 = sqrt(((b * b) - (c * (4.0 * a))));
	double t_1 = (t_0 - b) / (2.0 * a);
	double tmp_1;
	if (b <= -9e+127) {
		double tmp_2;
		if (b >= 0.0) {
			tmp_2 = c * ((-4.0 / a) * (b / (c * -4.0)));
		} else {
			tmp_2 = 2.0 * (b * (cbrt(-0.125) / a));
		}
		tmp_1 = tmp_2;
	} else if (b <= -2e-310) {
		double tmp_3;
		if (b >= 0.0) {
			tmp_3 = b / a;
		} else {
			tmp_3 = t_1;
		}
		tmp_1 = tmp_3;
	} else if (b <= 1.1e+64) {
		double tmp_4;
		if (b >= 0.0) {
			tmp_4 = (2.0 * c) / (-b - t_0);
		} else {
			tmp_4 = 2.0 * ((b * cbrt(-0.125)) / a);
		}
		tmp_1 = tmp_4;
	} else if (b >= 0.0) {
		tmp_1 = (2.0 * c) / (b * -2.0);
	} else {
		tmp_1 = t_1;
	}
	return tmp_1;
}
public static double code(double a, double b, double c) {
	double t_0 = Math.sqrt(((b * b) - (c * (4.0 * a))));
	double t_1 = (t_0 - b) / (2.0 * a);
	double tmp_1;
	if (b <= -9e+127) {
		double tmp_2;
		if (b >= 0.0) {
			tmp_2 = c * ((-4.0 / a) * (b / (c * -4.0)));
		} else {
			tmp_2 = 2.0 * (b * (Math.cbrt(-0.125) / a));
		}
		tmp_1 = tmp_2;
	} else if (b <= -2e-310) {
		double tmp_3;
		if (b >= 0.0) {
			tmp_3 = b / a;
		} else {
			tmp_3 = t_1;
		}
		tmp_1 = tmp_3;
	} else if (b <= 1.1e+64) {
		double tmp_4;
		if (b >= 0.0) {
			tmp_4 = (2.0 * c) / (-b - t_0);
		} else {
			tmp_4 = 2.0 * ((b * Math.cbrt(-0.125)) / a);
		}
		tmp_1 = tmp_4;
	} else if (b >= 0.0) {
		tmp_1 = (2.0 * c) / (b * -2.0);
	} else {
		tmp_1 = t_1;
	}
	return tmp_1;
}
function code(a, b, c)
	t_0 = sqrt(Float64(Float64(b * b) - Float64(c * Float64(4.0 * a))))
	t_1 = Float64(Float64(t_0 - b) / Float64(2.0 * a))
	tmp_1 = 0.0
	if (b <= -9e+127)
		tmp_2 = 0.0
		if (b >= 0.0)
			tmp_2 = Float64(c * Float64(Float64(-4.0 / a) * Float64(b / Float64(c * -4.0))));
		else
			tmp_2 = Float64(2.0 * Float64(b * Float64(cbrt(-0.125) / a)));
		end
		tmp_1 = tmp_2;
	elseif (b <= -2e-310)
		tmp_3 = 0.0
		if (b >= 0.0)
			tmp_3 = Float64(b / a);
		else
			tmp_3 = t_1;
		end
		tmp_1 = tmp_3;
	elseif (b <= 1.1e+64)
		tmp_4 = 0.0
		if (b >= 0.0)
			tmp_4 = Float64(Float64(2.0 * c) / Float64(Float64(-b) - t_0));
		else
			tmp_4 = Float64(2.0 * Float64(Float64(b * cbrt(-0.125)) / a));
		end
		tmp_1 = tmp_4;
	elseif (b >= 0.0)
		tmp_1 = Float64(Float64(2.0 * c) / Float64(b * -2.0));
	else
		tmp_1 = t_1;
	end
	return tmp_1
end
code[a_, b_, c_] := Block[{t$95$0 = N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(c * N[(4.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[(t$95$0 - b), $MachinePrecision] / N[(2.0 * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -9e+127], If[GreaterEqual[b, 0.0], N[(c * N[(N[(-4.0 / a), $MachinePrecision] * N[(b / N[(c * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(b * N[(N[Power[-0.125, 1/3], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], If[LessEqual[b, -2e-310], If[GreaterEqual[b, 0.0], N[(b / a), $MachinePrecision], t$95$1], If[LessEqual[b, 1.1e+64], If[GreaterEqual[b, 0.0], N[(N[(2.0 * c), $MachinePrecision] / N[((-b) - t$95$0), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(b * N[Power[-0.125, 1/3], $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]], If[GreaterEqual[b, 0.0], N[(N[(2.0 * c), $MachinePrecision] / N[(b * -2.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \sqrt{b \cdot b - c \cdot \left(4 \cdot a\right)}\\
t_1 := \frac{t\_0 - b}{2 \cdot a}\\
\mathbf{if}\;b \leq -9 \cdot 10^{+127}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;c \cdot \left(\frac{-4}{a} \cdot \frac{b}{c \cdot -4}\right)\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\


\end{array}\\

\mathbf{elif}\;b \leq -2 \cdot 10^{-310}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\frac{b}{a}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}\\

\mathbf{elif}\;b \leq 1.1 \cdot 10^{+64}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - t\_0}\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{b \cdot \sqrt[3]{-0.125}}{a}\\


\end{array}\\

\mathbf{elif}\;b \geq 0:\\
\;\;\;\;\frac{2 \cdot c}{b \cdot -2}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -9.00000000000000068e127

    1. Initial program 26.9%

      \[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cbrt-cube26.9%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt[3]{\left(\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\right) \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}}\\ \end{array} \]
      2. pow1/37.9%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;{\left(\left(\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\right) \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\right)}^{0.3333333333333333}\\ \end{array} \]
    4. Applied egg-rr8.0%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;{\left({\left(\frac{b + \sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -4\right)\right)}}{-2 \cdot a}\right)}^{3}\right)}^{0.3333333333333333}\\ \end{array} \]
    5. Taylor expanded in b around inf 95.2%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \frac{b \cdot \sqrt[3]{-0.125}}{a}\\ \end{array} \]
    6. Step-by-step derivation
      1. associate-/l*95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)}\\ \end{array} \]
    7. Simplified95.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    8. Step-by-step derivation
      1. associate-/l*95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{2 \cdot \frac{c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      2. add-sqr-sqrt95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;2 \cdot \frac{c}{\color{blue}{\sqrt{-b} \cdot \sqrt{-b}} - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      3. sqrt-unprod95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;2 \cdot \frac{c}{\color{blue}{\sqrt{\left(-b\right) \cdot \left(-b\right)}} - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      4. sqr-neg95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;2 \cdot \frac{c}{\sqrt{\color{blue}{b \cdot b}} - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      5. sqrt-prod95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;2 \cdot \frac{c}{\color{blue}{\sqrt{b} \cdot \sqrt{b}} - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      6. add-sqr-sqrt95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;2 \cdot \frac{c}{\color{blue}{b} - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      7. pow295.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;2 \cdot \frac{c}{b - \sqrt{\color{blue}{{b}^{2}} - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      8. *-commutative95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;2 \cdot \frac{c}{b - \sqrt{{b}^{2} - \color{blue}{c \cdot \left(4 \cdot a\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      9. *-commutative95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;2 \cdot \frac{c}{b - \sqrt{{b}^{2} - c \cdot \color{blue}{\left(a \cdot 4\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    9. Applied egg-rr95.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{2 \cdot \frac{c}{b - \sqrt{{b}^{2} - c \cdot \left(a \cdot 4\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    10. Step-by-step derivation
      1. associate-*r/95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{2 \cdot c}{b - \sqrt{{b}^{2} - c \cdot \left(a \cdot 4\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      2. *-commutative95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\color{blue}{c \cdot 2}}{b - \sqrt{{b}^{2} - c \cdot \left(a \cdot 4\right)}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      3. associate-*r/95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{c \cdot \frac{2}{b - \sqrt{{b}^{2} - c \cdot \left(a \cdot 4\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      4. associate-*r*95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{{b}^{2} - \color{blue}{\left(c \cdot a\right) \cdot 4}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      5. *-commutative95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{{b}^{2} - \color{blue}{\left(a \cdot c\right)} \cdot 4}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      6. *-commutative95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{{b}^{2} - \color{blue}{4 \cdot \left(a \cdot c\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      7. *-commutative95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{{b}^{2} - \color{blue}{\left(a \cdot c\right) \cdot 4}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      8. *-commutative95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{{b}^{2} - \color{blue}{\left(c \cdot a\right)} \cdot 4}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      9. associate-*r*95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{{b}^{2} - \color{blue}{c \cdot \left(a \cdot 4\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      10. sub-neg95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{\color{blue}{{b}^{2} + \left(-c \cdot \left(a \cdot 4\right)\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      11. unpow295.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{\color{blue}{b \cdot b} + \left(-c \cdot \left(a \cdot 4\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      12. rem-square-sqrt95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{b \cdot b + \color{blue}{\sqrt{-c \cdot \left(a \cdot 4\right)} \cdot \sqrt{-c \cdot \left(a \cdot 4\right)}}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      13. distribute-rgt-neg-in95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{b \cdot b + \sqrt{\color{blue}{c \cdot \left(-a \cdot 4\right)}} \cdot \sqrt{-c \cdot \left(a \cdot 4\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      14. distribute-rgt-neg-in95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{b \cdot b + \sqrt{c \cdot \color{blue}{\left(a \cdot \left(-4\right)\right)}} \cdot \sqrt{-c \cdot \left(a \cdot 4\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      15. metadata-eval95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{b \cdot b + \sqrt{c \cdot \left(a \cdot \color{blue}{-4}\right)} \cdot \sqrt{-c \cdot \left(a \cdot 4\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      16. distribute-rgt-neg-in95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{b \cdot b + \sqrt{c \cdot \left(a \cdot -4\right)} \cdot \sqrt{\color{blue}{c \cdot \left(-a \cdot 4\right)}}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    11. Simplified95.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{c \cdot \frac{2}{b - \mathsf{hypot}\left(b, \sqrt{c \cdot \left(a \cdot -4\right)}\right)}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    12. Taylor expanded in b around inf 95.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \color{blue}{\left(-4 \cdot \frac{b}{a \cdot \left(c \cdot {\left(\sqrt{-4}\right)}^{2}\right)}\right)}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    13. Step-by-step derivation
      1. associate-*r/95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \color{blue}{\frac{-4 \cdot b}{a \cdot \left(c \cdot {\left(\sqrt{-4}\right)}^{2}\right)}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      2. rem-square-sqrt95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{\color{blue}{\left(\sqrt{-4} \cdot \sqrt{-4}\right)} \cdot b}{a \cdot \left(c \cdot {\left(\sqrt{-4}\right)}^{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      3. unpow295.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{\color{blue}{{\left(\sqrt{-4}\right)}^{2}} \cdot b}{a \cdot \left(c \cdot {\left(\sqrt{-4}\right)}^{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      4. times-frac95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \color{blue}{\left(\frac{{\left(\sqrt{-4}\right)}^{2}}{a} \cdot \frac{b}{c \cdot {\left(\sqrt{-4}\right)}^{2}}\right)}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      5. unpow295.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \left(\frac{\color{blue}{\sqrt{-4} \cdot \sqrt{-4}}}{a} \cdot \frac{b}{c \cdot {\left(\sqrt{-4}\right)}^{2}}\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      6. rem-square-sqrt95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \left(\frac{\color{blue}{-4}}{a} \cdot \frac{b}{c \cdot {\left(\sqrt{-4}\right)}^{2}}\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      7. unpow295.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \left(\frac{-4}{a} \cdot \frac{b}{c \cdot \color{blue}{\left(\sqrt{-4} \cdot \sqrt{-4}\right)}}\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      8. rem-square-sqrt95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \left(\frac{-4}{a} \cdot \frac{b}{c \cdot \color{blue}{-4}}\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    14. Simplified95.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \color{blue}{\left(\frac{-4}{a} \cdot \frac{b}{c \cdot -4}\right)}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]

    if -9.00000000000000068e127 < b < -1.999999999999994e-310

    1. Initial program 84.0%

      \[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0 84.0%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{2 \cdot \frac{a \cdot c}{b} - 2 \cdot b}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
    4. Step-by-step derivation
      1. distribute-lft-out--84.0%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{2 \cdot \left(\frac{a \cdot c}{b} - b\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
      2. associate-/l*84.0%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{2 \cdot \left(\color{blue}{a \cdot \frac{c}{b}} - b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
      3. fma-neg84.0%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{2 \cdot \color{blue}{\mathsf{fma}\left(a, \frac{c}{b}, -b\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
    5. Simplified84.0%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{2 \cdot \mathsf{fma}\left(a, \frac{c}{b}, -b\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
    6. Taylor expanded in c around inf 84.0%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]

    if -1.999999999999994e-310 < b < 1.10000000000000001e64

    1. Initial program 87.3%

      \[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cbrt-cube87.3%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt[3]{\left(\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\right) \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}}\\ \end{array} \]
      2. pow1/387.3%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;{\left(\left(\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\right) \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\right)}^{0.3333333333333333}\\ \end{array} \]
    4. Applied egg-rr87.3%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;{\left({\left(\frac{b + \sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -4\right)\right)}}{-2 \cdot a}\right)}^{3}\right)}^{0.3333333333333333}\\ \end{array} \]
    5. Taylor expanded in b around inf 87.3%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \frac{b \cdot \sqrt[3]{-0.125}}{a}\\ \end{array} \]

    if 1.10000000000000001e64 < b

    1. Initial program 50.8%

      \[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf 89.7%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{-2 \cdot b}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
    4. Step-by-step derivation
      1. *-commutative89.7%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{b \cdot -2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
    5. Simplified89.7%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{b \cdot -2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification88.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -9 \cdot 10^{+127}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \left(\frac{-4}{a} \cdot \frac{b}{c \cdot -4}\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array}\\ \mathbf{elif}\;b \leq -2 \cdot 10^{-310}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{b \cdot b - c \cdot \left(4 \cdot a\right)} - b}{2 \cdot a}\\ \end{array}\\ \mathbf{elif}\;b \leq 1.1 \cdot 10^{+64}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - c \cdot \left(4 \cdot a\right)}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \frac{b \cdot \sqrt[3]{-0.125}}{a}\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{b \cdot -2}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{b \cdot b - c \cdot \left(4 \cdot a\right)} - b}{2 \cdot a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 90.0% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := 2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ t_1 := \sqrt{b \cdot b - c \cdot \left(4 \cdot a\right)}\\ t_2 := \frac{t\_1 - b}{2 \cdot a}\\ \mathbf{if}\;b \leq -1.1 \cdot 10^{+126}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \left(\frac{-4}{a} \cdot \frac{b}{c \cdot -4}\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array}\\ \mathbf{elif}\;b \leq -2 \cdot 10^{-310}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{a}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array}\\ \mathbf{elif}\;b \leq 1.15 \cdot 10^{+64}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - t\_1}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{b \cdot -2}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (let* ((t_0 (* 2.0 (* b (/ (cbrt -0.125) a))))
        (t_1 (sqrt (- (* b b) (* c (* 4.0 a)))))
        (t_2 (/ (- t_1 b) (* 2.0 a))))
   (if (<= b -1.1e+126)
     (if (>= b 0.0) (* c (* (/ -4.0 a) (/ b (* c -4.0)))) t_0)
     (if (<= b -2e-310)
       (if (>= b 0.0) (/ b a) t_2)
       (if (<= b 1.15e+64)
         (if (>= b 0.0) (/ (* 2.0 c) (- (- b) t_1)) t_0)
         (if (>= b 0.0) (/ (* 2.0 c) (* b -2.0)) t_2))))))
double code(double a, double b, double c) {
	double t_0 = 2.0 * (b * (cbrt(-0.125) / a));
	double t_1 = sqrt(((b * b) - (c * (4.0 * a))));
	double t_2 = (t_1 - b) / (2.0 * a);
	double tmp_1;
	if (b <= -1.1e+126) {
		double tmp_2;
		if (b >= 0.0) {
			tmp_2 = c * ((-4.0 / a) * (b / (c * -4.0)));
		} else {
			tmp_2 = t_0;
		}
		tmp_1 = tmp_2;
	} else if (b <= -2e-310) {
		double tmp_3;
		if (b >= 0.0) {
			tmp_3 = b / a;
		} else {
			tmp_3 = t_2;
		}
		tmp_1 = tmp_3;
	} else if (b <= 1.15e+64) {
		double tmp_4;
		if (b >= 0.0) {
			tmp_4 = (2.0 * c) / (-b - t_1);
		} else {
			tmp_4 = t_0;
		}
		tmp_1 = tmp_4;
	} else if (b >= 0.0) {
		tmp_1 = (2.0 * c) / (b * -2.0);
	} else {
		tmp_1 = t_2;
	}
	return tmp_1;
}
public static double code(double a, double b, double c) {
	double t_0 = 2.0 * (b * (Math.cbrt(-0.125) / a));
	double t_1 = Math.sqrt(((b * b) - (c * (4.0 * a))));
	double t_2 = (t_1 - b) / (2.0 * a);
	double tmp_1;
	if (b <= -1.1e+126) {
		double tmp_2;
		if (b >= 0.0) {
			tmp_2 = c * ((-4.0 / a) * (b / (c * -4.0)));
		} else {
			tmp_2 = t_0;
		}
		tmp_1 = tmp_2;
	} else if (b <= -2e-310) {
		double tmp_3;
		if (b >= 0.0) {
			tmp_3 = b / a;
		} else {
			tmp_3 = t_2;
		}
		tmp_1 = tmp_3;
	} else if (b <= 1.15e+64) {
		double tmp_4;
		if (b >= 0.0) {
			tmp_4 = (2.0 * c) / (-b - t_1);
		} else {
			tmp_4 = t_0;
		}
		tmp_1 = tmp_4;
	} else if (b >= 0.0) {
		tmp_1 = (2.0 * c) / (b * -2.0);
	} else {
		tmp_1 = t_2;
	}
	return tmp_1;
}
function code(a, b, c)
	t_0 = Float64(2.0 * Float64(b * Float64(cbrt(-0.125) / a)))
	t_1 = sqrt(Float64(Float64(b * b) - Float64(c * Float64(4.0 * a))))
	t_2 = Float64(Float64(t_1 - b) / Float64(2.0 * a))
	tmp_1 = 0.0
	if (b <= -1.1e+126)
		tmp_2 = 0.0
		if (b >= 0.0)
			tmp_2 = Float64(c * Float64(Float64(-4.0 / a) * Float64(b / Float64(c * -4.0))));
		else
			tmp_2 = t_0;
		end
		tmp_1 = tmp_2;
	elseif (b <= -2e-310)
		tmp_3 = 0.0
		if (b >= 0.0)
			tmp_3 = Float64(b / a);
		else
			tmp_3 = t_2;
		end
		tmp_1 = tmp_3;
	elseif (b <= 1.15e+64)
		tmp_4 = 0.0
		if (b >= 0.0)
			tmp_4 = Float64(Float64(2.0 * c) / Float64(Float64(-b) - t_1));
		else
			tmp_4 = t_0;
		end
		tmp_1 = tmp_4;
	elseif (b >= 0.0)
		tmp_1 = Float64(Float64(2.0 * c) / Float64(b * -2.0));
	else
		tmp_1 = t_2;
	end
	return tmp_1
end
code[a_, b_, c_] := Block[{t$95$0 = N[(2.0 * N[(b * N[(N[Power[-0.125, 1/3], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(c * N[(4.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[(t$95$1 - b), $MachinePrecision] / N[(2.0 * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.1e+126], If[GreaterEqual[b, 0.0], N[(c * N[(N[(-4.0 / a), $MachinePrecision] * N[(b / N[(c * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0], If[LessEqual[b, -2e-310], If[GreaterEqual[b, 0.0], N[(b / a), $MachinePrecision], t$95$2], If[LessEqual[b, 1.15e+64], If[GreaterEqual[b, 0.0], N[(N[(2.0 * c), $MachinePrecision] / N[((-b) - t$95$1), $MachinePrecision]), $MachinePrecision], t$95$0], If[GreaterEqual[b, 0.0], N[(N[(2.0 * c), $MachinePrecision] / N[(b * -2.0), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := 2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\
t_1 := \sqrt{b \cdot b - c \cdot \left(4 \cdot a\right)}\\
t_2 := \frac{t\_1 - b}{2 \cdot a}\\
\mathbf{if}\;b \leq -1.1 \cdot 10^{+126}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;c \cdot \left(\frac{-4}{a} \cdot \frac{b}{c \cdot -4}\right)\\

\mathbf{else}:\\
\;\;\;\;t\_0\\


\end{array}\\

\mathbf{elif}\;b \leq -2 \cdot 10^{-310}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\frac{b}{a}\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}\\

\mathbf{elif}\;b \leq 1.15 \cdot 10^{+64}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - t\_1}\\

\mathbf{else}:\\
\;\;\;\;t\_0\\


\end{array}\\

\mathbf{elif}\;b \geq 0:\\
\;\;\;\;\frac{2 \cdot c}{b \cdot -2}\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -1.09999999999999999e126

    1. Initial program 26.9%

      \[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cbrt-cube26.9%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt[3]{\left(\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\right) \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}}\\ \end{array} \]
      2. pow1/37.9%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;{\left(\left(\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\right) \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\right)}^{0.3333333333333333}\\ \end{array} \]
    4. Applied egg-rr8.0%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;{\left({\left(\frac{b + \sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -4\right)\right)}}{-2 \cdot a}\right)}^{3}\right)}^{0.3333333333333333}\\ \end{array} \]
    5. Taylor expanded in b around inf 95.2%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \frac{b \cdot \sqrt[3]{-0.125}}{a}\\ \end{array} \]
    6. Step-by-step derivation
      1. associate-/l*95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)}\\ \end{array} \]
    7. Simplified95.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    8. Step-by-step derivation
      1. associate-/l*95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{2 \cdot \frac{c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      2. add-sqr-sqrt95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;2 \cdot \frac{c}{\color{blue}{\sqrt{-b} \cdot \sqrt{-b}} - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      3. sqrt-unprod95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;2 \cdot \frac{c}{\color{blue}{\sqrt{\left(-b\right) \cdot \left(-b\right)}} - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      4. sqr-neg95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;2 \cdot \frac{c}{\sqrt{\color{blue}{b \cdot b}} - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      5. sqrt-prod95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;2 \cdot \frac{c}{\color{blue}{\sqrt{b} \cdot \sqrt{b}} - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      6. add-sqr-sqrt95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;2 \cdot \frac{c}{\color{blue}{b} - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      7. pow295.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;2 \cdot \frac{c}{b - \sqrt{\color{blue}{{b}^{2}} - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      8. *-commutative95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;2 \cdot \frac{c}{b - \sqrt{{b}^{2} - \color{blue}{c \cdot \left(4 \cdot a\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      9. *-commutative95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;2 \cdot \frac{c}{b - \sqrt{{b}^{2} - c \cdot \color{blue}{\left(a \cdot 4\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    9. Applied egg-rr95.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{2 \cdot \frac{c}{b - \sqrt{{b}^{2} - c \cdot \left(a \cdot 4\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    10. Step-by-step derivation
      1. associate-*r/95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{2 \cdot c}{b - \sqrt{{b}^{2} - c \cdot \left(a \cdot 4\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      2. *-commutative95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\color{blue}{c \cdot 2}}{b - \sqrt{{b}^{2} - c \cdot \left(a \cdot 4\right)}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      3. associate-*r/95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{c \cdot \frac{2}{b - \sqrt{{b}^{2} - c \cdot \left(a \cdot 4\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      4. associate-*r*95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{{b}^{2} - \color{blue}{\left(c \cdot a\right) \cdot 4}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      5. *-commutative95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{{b}^{2} - \color{blue}{\left(a \cdot c\right)} \cdot 4}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      6. *-commutative95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{{b}^{2} - \color{blue}{4 \cdot \left(a \cdot c\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      7. *-commutative95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{{b}^{2} - \color{blue}{\left(a \cdot c\right) \cdot 4}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      8. *-commutative95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{{b}^{2} - \color{blue}{\left(c \cdot a\right)} \cdot 4}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      9. associate-*r*95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{{b}^{2} - \color{blue}{c \cdot \left(a \cdot 4\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      10. sub-neg95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{\color{blue}{{b}^{2} + \left(-c \cdot \left(a \cdot 4\right)\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      11. unpow295.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{\color{blue}{b \cdot b} + \left(-c \cdot \left(a \cdot 4\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      12. rem-square-sqrt95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{b \cdot b + \color{blue}{\sqrt{-c \cdot \left(a \cdot 4\right)} \cdot \sqrt{-c \cdot \left(a \cdot 4\right)}}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      13. distribute-rgt-neg-in95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{b \cdot b + \sqrt{\color{blue}{c \cdot \left(-a \cdot 4\right)}} \cdot \sqrt{-c \cdot \left(a \cdot 4\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      14. distribute-rgt-neg-in95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{b \cdot b + \sqrt{c \cdot \color{blue}{\left(a \cdot \left(-4\right)\right)}} \cdot \sqrt{-c \cdot \left(a \cdot 4\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      15. metadata-eval95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{b \cdot b + \sqrt{c \cdot \left(a \cdot \color{blue}{-4}\right)} \cdot \sqrt{-c \cdot \left(a \cdot 4\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      16. distribute-rgt-neg-in95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{b \cdot b + \sqrt{c \cdot \left(a \cdot -4\right)} \cdot \sqrt{\color{blue}{c \cdot \left(-a \cdot 4\right)}}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    11. Simplified95.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{c \cdot \frac{2}{b - \mathsf{hypot}\left(b, \sqrt{c \cdot \left(a \cdot -4\right)}\right)}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    12. Taylor expanded in b around inf 95.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \color{blue}{\left(-4 \cdot \frac{b}{a \cdot \left(c \cdot {\left(\sqrt{-4}\right)}^{2}\right)}\right)}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    13. Step-by-step derivation
      1. associate-*r/95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \color{blue}{\frac{-4 \cdot b}{a \cdot \left(c \cdot {\left(\sqrt{-4}\right)}^{2}\right)}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      2. rem-square-sqrt95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{\color{blue}{\left(\sqrt{-4} \cdot \sqrt{-4}\right)} \cdot b}{a \cdot \left(c \cdot {\left(\sqrt{-4}\right)}^{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      3. unpow295.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{\color{blue}{{\left(\sqrt{-4}\right)}^{2}} \cdot b}{a \cdot \left(c \cdot {\left(\sqrt{-4}\right)}^{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      4. times-frac95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \color{blue}{\left(\frac{{\left(\sqrt{-4}\right)}^{2}}{a} \cdot \frac{b}{c \cdot {\left(\sqrt{-4}\right)}^{2}}\right)}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      5. unpow295.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \left(\frac{\color{blue}{\sqrt{-4} \cdot \sqrt{-4}}}{a} \cdot \frac{b}{c \cdot {\left(\sqrt{-4}\right)}^{2}}\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      6. rem-square-sqrt95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \left(\frac{\color{blue}{-4}}{a} \cdot \frac{b}{c \cdot {\left(\sqrt{-4}\right)}^{2}}\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      7. unpow295.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \left(\frac{-4}{a} \cdot \frac{b}{c \cdot \color{blue}{\left(\sqrt{-4} \cdot \sqrt{-4}\right)}}\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      8. rem-square-sqrt95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \left(\frac{-4}{a} \cdot \frac{b}{c \cdot \color{blue}{-4}}\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    14. Simplified95.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \color{blue}{\left(\frac{-4}{a} \cdot \frac{b}{c \cdot -4}\right)}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]

    if -1.09999999999999999e126 < b < -1.999999999999994e-310

    1. Initial program 84.0%

      \[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0 84.0%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{2 \cdot \frac{a \cdot c}{b} - 2 \cdot b}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
    4. Step-by-step derivation
      1. distribute-lft-out--84.0%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{2 \cdot \left(\frac{a \cdot c}{b} - b\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
      2. associate-/l*84.0%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{2 \cdot \left(\color{blue}{a \cdot \frac{c}{b}} - b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
      3. fma-neg84.0%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{2 \cdot \color{blue}{\mathsf{fma}\left(a, \frac{c}{b}, -b\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
    5. Simplified84.0%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{2 \cdot \mathsf{fma}\left(a, \frac{c}{b}, -b\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
    6. Taylor expanded in c around inf 84.0%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]

    if -1.999999999999994e-310 < b < 1.15e64

    1. Initial program 87.3%

      \[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cbrt-cube87.3%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt[3]{\left(\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\right) \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}}\\ \end{array} \]
      2. pow1/387.3%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;{\left(\left(\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\right) \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\right)}^{0.3333333333333333}\\ \end{array} \]
    4. Applied egg-rr87.3%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;{\left({\left(\frac{b + \sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -4\right)\right)}}{-2 \cdot a}\right)}^{3}\right)}^{0.3333333333333333}\\ \end{array} \]
    5. Taylor expanded in b around inf 87.3%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \frac{b \cdot \sqrt[3]{-0.125}}{a}\\ \end{array} \]
    6. Step-by-step derivation
      1. associate-/l*87.3%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)}\\ \end{array} \]
    7. Simplified87.3%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]

    if 1.15e64 < b

    1. Initial program 50.8%

      \[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf 89.7%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{-2 \cdot b}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
    4. Step-by-step derivation
      1. *-commutative89.7%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{b \cdot -2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
    5. Simplified89.7%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{b \cdot -2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification88.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.1 \cdot 10^{+126}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \left(\frac{-4}{a} \cdot \frac{b}{c \cdot -4}\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array}\\ \mathbf{elif}\;b \leq -2 \cdot 10^{-310}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{b \cdot b - c \cdot \left(4 \cdot a\right)} - b}{2 \cdot a}\\ \end{array}\\ \mathbf{elif}\;b \leq 1.15 \cdot 10^{+64}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - c \cdot \left(4 \cdot a\right)}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{b \cdot -2}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{b \cdot b - c \cdot \left(4 \cdot a\right)} - b}{2 \cdot a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 86.1% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := 2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \mathbf{if}\;b \leq -8.6 \cdot 10^{+127}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \left(\frac{-4}{a} \cdot \frac{b}{c \cdot -4}\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array}\\ \mathbf{elif}\;b \leq -2 \cdot 10^{-310}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{b \cdot b - c \cdot \left(4 \cdot a\right)} - b}{2 \cdot a}\\ \end{array}\\ \mathbf{elif}\;b \leq 4.6 \cdot 10^{-110}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{c \cdot \left(a \cdot -4\right)}}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{2 \cdot \left(a \cdot \frac{c}{b} - b\right)}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (let* ((t_0 (* 2.0 (* b (/ (cbrt -0.125) a)))))
   (if (<= b -8.6e+127)
     (if (>= b 0.0) (* c (* (/ -4.0 a) (/ b (* c -4.0)))) t_0)
     (if (<= b -2e-310)
       (if (>= b 0.0)
         (/ b a)
         (/ (- (sqrt (- (* b b) (* c (* 4.0 a)))) b) (* 2.0 a)))
       (if (<= b 4.6e-110)
         (if (>= b 0.0) (/ (* 2.0 c) (- (- b) (sqrt (* c (* a -4.0))))) t_0)
         (if (>= b 0.0) (/ (* 2.0 c) (* 2.0 (- (* a (/ c b)) b))) t_0))))))
double code(double a, double b, double c) {
	double t_0 = 2.0 * (b * (cbrt(-0.125) / a));
	double tmp_1;
	if (b <= -8.6e+127) {
		double tmp_2;
		if (b >= 0.0) {
			tmp_2 = c * ((-4.0 / a) * (b / (c * -4.0)));
		} else {
			tmp_2 = t_0;
		}
		tmp_1 = tmp_2;
	} else if (b <= -2e-310) {
		double tmp_3;
		if (b >= 0.0) {
			tmp_3 = b / a;
		} else {
			tmp_3 = (sqrt(((b * b) - (c * (4.0 * a)))) - b) / (2.0 * a);
		}
		tmp_1 = tmp_3;
	} else if (b <= 4.6e-110) {
		double tmp_4;
		if (b >= 0.0) {
			tmp_4 = (2.0 * c) / (-b - sqrt((c * (a * -4.0))));
		} else {
			tmp_4 = t_0;
		}
		tmp_1 = tmp_4;
	} else if (b >= 0.0) {
		tmp_1 = (2.0 * c) / (2.0 * ((a * (c / b)) - b));
	} else {
		tmp_1 = t_0;
	}
	return tmp_1;
}
public static double code(double a, double b, double c) {
	double t_0 = 2.0 * (b * (Math.cbrt(-0.125) / a));
	double tmp_1;
	if (b <= -8.6e+127) {
		double tmp_2;
		if (b >= 0.0) {
			tmp_2 = c * ((-4.0 / a) * (b / (c * -4.0)));
		} else {
			tmp_2 = t_0;
		}
		tmp_1 = tmp_2;
	} else if (b <= -2e-310) {
		double tmp_3;
		if (b >= 0.0) {
			tmp_3 = b / a;
		} else {
			tmp_3 = (Math.sqrt(((b * b) - (c * (4.0 * a)))) - b) / (2.0 * a);
		}
		tmp_1 = tmp_3;
	} else if (b <= 4.6e-110) {
		double tmp_4;
		if (b >= 0.0) {
			tmp_4 = (2.0 * c) / (-b - Math.sqrt((c * (a * -4.0))));
		} else {
			tmp_4 = t_0;
		}
		tmp_1 = tmp_4;
	} else if (b >= 0.0) {
		tmp_1 = (2.0 * c) / (2.0 * ((a * (c / b)) - b));
	} else {
		tmp_1 = t_0;
	}
	return tmp_1;
}
function code(a, b, c)
	t_0 = Float64(2.0 * Float64(b * Float64(cbrt(-0.125) / a)))
	tmp_1 = 0.0
	if (b <= -8.6e+127)
		tmp_2 = 0.0
		if (b >= 0.0)
			tmp_2 = Float64(c * Float64(Float64(-4.0 / a) * Float64(b / Float64(c * -4.0))));
		else
			tmp_2 = t_0;
		end
		tmp_1 = tmp_2;
	elseif (b <= -2e-310)
		tmp_3 = 0.0
		if (b >= 0.0)
			tmp_3 = Float64(b / a);
		else
			tmp_3 = Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(c * Float64(4.0 * a)))) - b) / Float64(2.0 * a));
		end
		tmp_1 = tmp_3;
	elseif (b <= 4.6e-110)
		tmp_4 = 0.0
		if (b >= 0.0)
			tmp_4 = Float64(Float64(2.0 * c) / Float64(Float64(-b) - sqrt(Float64(c * Float64(a * -4.0)))));
		else
			tmp_4 = t_0;
		end
		tmp_1 = tmp_4;
	elseif (b >= 0.0)
		tmp_1 = Float64(Float64(2.0 * c) / Float64(2.0 * Float64(Float64(a * Float64(c / b)) - b)));
	else
		tmp_1 = t_0;
	end
	return tmp_1
end
code[a_, b_, c_] := Block[{t$95$0 = N[(2.0 * N[(b * N[(N[Power[-0.125, 1/3], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -8.6e+127], If[GreaterEqual[b, 0.0], N[(c * N[(N[(-4.0 / a), $MachinePrecision] * N[(b / N[(c * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0], If[LessEqual[b, -2e-310], If[GreaterEqual[b, 0.0], N[(b / a), $MachinePrecision], N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(c * N[(4.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(2.0 * a), $MachinePrecision]), $MachinePrecision]], If[LessEqual[b, 4.6e-110], If[GreaterEqual[b, 0.0], N[(N[(2.0 * c), $MachinePrecision] / N[((-b) - N[Sqrt[N[(c * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0], If[GreaterEqual[b, 0.0], N[(N[(2.0 * c), $MachinePrecision] / N[(2.0 * N[(N[(a * N[(c / b), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := 2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\
\mathbf{if}\;b \leq -8.6 \cdot 10^{+127}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;c \cdot \left(\frac{-4}{a} \cdot \frac{b}{c \cdot -4}\right)\\

\mathbf{else}:\\
\;\;\;\;t\_0\\


\end{array}\\

\mathbf{elif}\;b \leq -2 \cdot 10^{-310}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\frac{b}{a}\\

\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{b \cdot b - c \cdot \left(4 \cdot a\right)} - b}{2 \cdot a}\\


\end{array}\\

\mathbf{elif}\;b \leq 4.6 \cdot 10^{-110}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{c \cdot \left(a \cdot -4\right)}}\\

\mathbf{else}:\\
\;\;\;\;t\_0\\


\end{array}\\

\mathbf{elif}\;b \geq 0:\\
\;\;\;\;\frac{2 \cdot c}{2 \cdot \left(a \cdot \frac{c}{b} - b\right)}\\

\mathbf{else}:\\
\;\;\;\;t\_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -8.59999999999999968e127

    1. Initial program 26.9%

      \[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cbrt-cube26.9%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt[3]{\left(\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\right) \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}}\\ \end{array} \]
      2. pow1/37.9%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;{\left(\left(\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\right) \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\right)}^{0.3333333333333333}\\ \end{array} \]
    4. Applied egg-rr8.0%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;{\left({\left(\frac{b + \sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -4\right)\right)}}{-2 \cdot a}\right)}^{3}\right)}^{0.3333333333333333}\\ \end{array} \]
    5. Taylor expanded in b around inf 95.2%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \frac{b \cdot \sqrt[3]{-0.125}}{a}\\ \end{array} \]
    6. Step-by-step derivation
      1. associate-/l*95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)}\\ \end{array} \]
    7. Simplified95.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    8. Step-by-step derivation
      1. associate-/l*95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{2 \cdot \frac{c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      2. add-sqr-sqrt95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;2 \cdot \frac{c}{\color{blue}{\sqrt{-b} \cdot \sqrt{-b}} - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      3. sqrt-unprod95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;2 \cdot \frac{c}{\color{blue}{\sqrt{\left(-b\right) \cdot \left(-b\right)}} - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      4. sqr-neg95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;2 \cdot \frac{c}{\sqrt{\color{blue}{b \cdot b}} - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      5. sqrt-prod95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;2 \cdot \frac{c}{\color{blue}{\sqrt{b} \cdot \sqrt{b}} - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      6. add-sqr-sqrt95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;2 \cdot \frac{c}{\color{blue}{b} - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      7. pow295.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;2 \cdot \frac{c}{b - \sqrt{\color{blue}{{b}^{2}} - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      8. *-commutative95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;2 \cdot \frac{c}{b - \sqrt{{b}^{2} - \color{blue}{c \cdot \left(4 \cdot a\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      9. *-commutative95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;2 \cdot \frac{c}{b - \sqrt{{b}^{2} - c \cdot \color{blue}{\left(a \cdot 4\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    9. Applied egg-rr95.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{2 \cdot \frac{c}{b - \sqrt{{b}^{2} - c \cdot \left(a \cdot 4\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    10. Step-by-step derivation
      1. associate-*r/95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{2 \cdot c}{b - \sqrt{{b}^{2} - c \cdot \left(a \cdot 4\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      2. *-commutative95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\color{blue}{c \cdot 2}}{b - \sqrt{{b}^{2} - c \cdot \left(a \cdot 4\right)}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      3. associate-*r/95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{c \cdot \frac{2}{b - \sqrt{{b}^{2} - c \cdot \left(a \cdot 4\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      4. associate-*r*95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{{b}^{2} - \color{blue}{\left(c \cdot a\right) \cdot 4}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      5. *-commutative95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{{b}^{2} - \color{blue}{\left(a \cdot c\right)} \cdot 4}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      6. *-commutative95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{{b}^{2} - \color{blue}{4 \cdot \left(a \cdot c\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      7. *-commutative95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{{b}^{2} - \color{blue}{\left(a \cdot c\right) \cdot 4}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      8. *-commutative95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{{b}^{2} - \color{blue}{\left(c \cdot a\right)} \cdot 4}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      9. associate-*r*95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{{b}^{2} - \color{blue}{c \cdot \left(a \cdot 4\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      10. sub-neg95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{\color{blue}{{b}^{2} + \left(-c \cdot \left(a \cdot 4\right)\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      11. unpow295.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{\color{blue}{b \cdot b} + \left(-c \cdot \left(a \cdot 4\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      12. rem-square-sqrt95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{b \cdot b + \color{blue}{\sqrt{-c \cdot \left(a \cdot 4\right)} \cdot \sqrt{-c \cdot \left(a \cdot 4\right)}}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      13. distribute-rgt-neg-in95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{b \cdot b + \sqrt{\color{blue}{c \cdot \left(-a \cdot 4\right)}} \cdot \sqrt{-c \cdot \left(a \cdot 4\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      14. distribute-rgt-neg-in95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{b \cdot b + \sqrt{c \cdot \color{blue}{\left(a \cdot \left(-4\right)\right)}} \cdot \sqrt{-c \cdot \left(a \cdot 4\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      15. metadata-eval95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{b \cdot b + \sqrt{c \cdot \left(a \cdot \color{blue}{-4}\right)} \cdot \sqrt{-c \cdot \left(a \cdot 4\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      16. distribute-rgt-neg-in95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{b \cdot b + \sqrt{c \cdot \left(a \cdot -4\right)} \cdot \sqrt{\color{blue}{c \cdot \left(-a \cdot 4\right)}}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    11. Simplified95.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{c \cdot \frac{2}{b - \mathsf{hypot}\left(b, \sqrt{c \cdot \left(a \cdot -4\right)}\right)}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    12. Taylor expanded in b around inf 95.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \color{blue}{\left(-4 \cdot \frac{b}{a \cdot \left(c \cdot {\left(\sqrt{-4}\right)}^{2}\right)}\right)}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    13. Step-by-step derivation
      1. associate-*r/95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \color{blue}{\frac{-4 \cdot b}{a \cdot \left(c \cdot {\left(\sqrt{-4}\right)}^{2}\right)}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      2. rem-square-sqrt95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{\color{blue}{\left(\sqrt{-4} \cdot \sqrt{-4}\right)} \cdot b}{a \cdot \left(c \cdot {\left(\sqrt{-4}\right)}^{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      3. unpow295.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{\color{blue}{{\left(\sqrt{-4}\right)}^{2}} \cdot b}{a \cdot \left(c \cdot {\left(\sqrt{-4}\right)}^{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      4. times-frac95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \color{blue}{\left(\frac{{\left(\sqrt{-4}\right)}^{2}}{a} \cdot \frac{b}{c \cdot {\left(\sqrt{-4}\right)}^{2}}\right)}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      5. unpow295.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \left(\frac{\color{blue}{\sqrt{-4} \cdot \sqrt{-4}}}{a} \cdot \frac{b}{c \cdot {\left(\sqrt{-4}\right)}^{2}}\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      6. rem-square-sqrt95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \left(\frac{\color{blue}{-4}}{a} \cdot \frac{b}{c \cdot {\left(\sqrt{-4}\right)}^{2}}\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      7. unpow295.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \left(\frac{-4}{a} \cdot \frac{b}{c \cdot \color{blue}{\left(\sqrt{-4} \cdot \sqrt{-4}\right)}}\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      8. rem-square-sqrt95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \left(\frac{-4}{a} \cdot \frac{b}{c \cdot \color{blue}{-4}}\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    14. Simplified95.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \color{blue}{\left(\frac{-4}{a} \cdot \frac{b}{c \cdot -4}\right)}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]

    if -8.59999999999999968e127 < b < -1.999999999999994e-310

    1. Initial program 84.0%

      \[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0 84.0%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{2 \cdot \frac{a \cdot c}{b} - 2 \cdot b}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
    4. Step-by-step derivation
      1. distribute-lft-out--84.0%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{2 \cdot \left(\frac{a \cdot c}{b} - b\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
      2. associate-/l*84.0%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{2 \cdot \left(\color{blue}{a \cdot \frac{c}{b}} - b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
      3. fma-neg84.0%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{2 \cdot \color{blue}{\mathsf{fma}\left(a, \frac{c}{b}, -b\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
    5. Simplified84.0%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{2 \cdot \mathsf{fma}\left(a, \frac{c}{b}, -b\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
    6. Taylor expanded in c around inf 84.0%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]

    if -1.999999999999994e-310 < b < 4.6000000000000003e-110

    1. Initial program 79.4%

      \[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cbrt-cube79.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt[3]{\left(\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\right) \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}}\\ \end{array} \]
      2. pow1/379.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;{\left(\left(\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\right) \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\right)}^{0.3333333333333333}\\ \end{array} \]
    4. Applied egg-rr79.4%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;{\left({\left(\frac{b + \sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -4\right)\right)}}{-2 \cdot a}\right)}^{3}\right)}^{0.3333333333333333}\\ \end{array} \]
    5. Taylor expanded in b around inf 79.4%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \frac{b \cdot \sqrt[3]{-0.125}}{a}\\ \end{array} \]
    6. Step-by-step derivation
      1. associate-/l*79.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)}\\ \end{array} \]
    7. Simplified79.4%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    8. Taylor expanded in b around 0 75.8%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{\color{blue}{-4 \cdot \left(a \cdot c\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    9. Step-by-step derivation
      1. *-commutative75.8%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{\color{blue}{\left(a \cdot c\right) \cdot -4}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      2. *-commutative75.8%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{\color{blue}{\left(c \cdot a\right)} \cdot -4}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      3. associate-*r*75.8%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{\color{blue}{c \cdot \left(a \cdot -4\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    10. Simplified75.8%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{\color{blue}{c \cdot \left(a \cdot -4\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]

    if 4.6000000000000003e-110 < b

    1. Initial program 64.0%

      \[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cbrt-cube64.0%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt[3]{\left(\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\right) \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}}\\ \end{array} \]
      2. pow1/364.0%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;{\left(\left(\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\right) \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\right)}^{0.3333333333333333}\\ \end{array} \]
    4. Applied egg-rr64.0%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;{\left({\left(\frac{b + \sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -4\right)\right)}}{-2 \cdot a}\right)}^{3}\right)}^{0.3333333333333333}\\ \end{array} \]
    5. Taylor expanded in b around inf 64.0%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \frac{b \cdot \sqrt[3]{-0.125}}{a}\\ \end{array} \]
    6. Step-by-step derivation
      1. associate-/l*64.0%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)}\\ \end{array} \]
    7. Simplified64.0%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    8. Taylor expanded in a around 0 73.4%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{2 \cdot \frac{a \cdot c}{b} - 2 \cdot b}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    9. Step-by-step derivation
      1. distribute-lft-out--73.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{2 \cdot \left(\frac{a \cdot c}{b} - b\right)}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      2. associate-/l*80.7%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{2 \cdot \left(\color{blue}{a \cdot \frac{c}{b}} - b\right)}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    10. Simplified80.7%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{2 \cdot \left(a \cdot \frac{c}{b} - b\right)}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification84.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -8.6 \cdot 10^{+127}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \left(\frac{-4}{a} \cdot \frac{b}{c \cdot -4}\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array}\\ \mathbf{elif}\;b \leq -2 \cdot 10^{-310}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{b \cdot b - c \cdot \left(4 \cdot a\right)} - b}{2 \cdot a}\\ \end{array}\\ \mathbf{elif}\;b \leq 4.6 \cdot 10^{-110}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{c \cdot \left(a \cdot -4\right)}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{2 \cdot \left(a \cdot \frac{c}{b} - b\right)}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 81.1% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := 2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ t_1 := \sqrt{c \cdot \left(a \cdot -4\right)}\\ \mathbf{if}\;b \leq -3 \cdot 10^{-27}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \left(\frac{-4}{a} \cdot \frac{b}{c \cdot -4}\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array}\\ \mathbf{elif}\;b \leq -2 \cdot 10^{-310}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{t\_1 - b}{2 \cdot a}\\ \end{array}\\ \mathbf{elif}\;b \leq 4.5 \cdot 10^{-110}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - t\_1}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{2 \cdot \left(a \cdot \frac{c}{b} - b\right)}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (let* ((t_0 (* 2.0 (* b (/ (cbrt -0.125) a)))) (t_1 (sqrt (* c (* a -4.0)))))
   (if (<= b -3e-27)
     (if (>= b 0.0) (* c (* (/ -4.0 a) (/ b (* c -4.0)))) t_0)
     (if (<= b -2e-310)
       (if (>= b 0.0) (/ b a) (/ (- t_1 b) (* 2.0 a)))
       (if (<= b 4.5e-110)
         (if (>= b 0.0) (/ (* 2.0 c) (- (- b) t_1)) t_0)
         (if (>= b 0.0) (/ (* 2.0 c) (* 2.0 (- (* a (/ c b)) b))) t_0))))))
double code(double a, double b, double c) {
	double t_0 = 2.0 * (b * (cbrt(-0.125) / a));
	double t_1 = sqrt((c * (a * -4.0)));
	double tmp_1;
	if (b <= -3e-27) {
		double tmp_2;
		if (b >= 0.0) {
			tmp_2 = c * ((-4.0 / a) * (b / (c * -4.0)));
		} else {
			tmp_2 = t_0;
		}
		tmp_1 = tmp_2;
	} else if (b <= -2e-310) {
		double tmp_3;
		if (b >= 0.0) {
			tmp_3 = b / a;
		} else {
			tmp_3 = (t_1 - b) / (2.0 * a);
		}
		tmp_1 = tmp_3;
	} else if (b <= 4.5e-110) {
		double tmp_4;
		if (b >= 0.0) {
			tmp_4 = (2.0 * c) / (-b - t_1);
		} else {
			tmp_4 = t_0;
		}
		tmp_1 = tmp_4;
	} else if (b >= 0.0) {
		tmp_1 = (2.0 * c) / (2.0 * ((a * (c / b)) - b));
	} else {
		tmp_1 = t_0;
	}
	return tmp_1;
}
public static double code(double a, double b, double c) {
	double t_0 = 2.0 * (b * (Math.cbrt(-0.125) / a));
	double t_1 = Math.sqrt((c * (a * -4.0)));
	double tmp_1;
	if (b <= -3e-27) {
		double tmp_2;
		if (b >= 0.0) {
			tmp_2 = c * ((-4.0 / a) * (b / (c * -4.0)));
		} else {
			tmp_2 = t_0;
		}
		tmp_1 = tmp_2;
	} else if (b <= -2e-310) {
		double tmp_3;
		if (b >= 0.0) {
			tmp_3 = b / a;
		} else {
			tmp_3 = (t_1 - b) / (2.0 * a);
		}
		tmp_1 = tmp_3;
	} else if (b <= 4.5e-110) {
		double tmp_4;
		if (b >= 0.0) {
			tmp_4 = (2.0 * c) / (-b - t_1);
		} else {
			tmp_4 = t_0;
		}
		tmp_1 = tmp_4;
	} else if (b >= 0.0) {
		tmp_1 = (2.0 * c) / (2.0 * ((a * (c / b)) - b));
	} else {
		tmp_1 = t_0;
	}
	return tmp_1;
}
function code(a, b, c)
	t_0 = Float64(2.0 * Float64(b * Float64(cbrt(-0.125) / a)))
	t_1 = sqrt(Float64(c * Float64(a * -4.0)))
	tmp_1 = 0.0
	if (b <= -3e-27)
		tmp_2 = 0.0
		if (b >= 0.0)
			tmp_2 = Float64(c * Float64(Float64(-4.0 / a) * Float64(b / Float64(c * -4.0))));
		else
			tmp_2 = t_0;
		end
		tmp_1 = tmp_2;
	elseif (b <= -2e-310)
		tmp_3 = 0.0
		if (b >= 0.0)
			tmp_3 = Float64(b / a);
		else
			tmp_3 = Float64(Float64(t_1 - b) / Float64(2.0 * a));
		end
		tmp_1 = tmp_3;
	elseif (b <= 4.5e-110)
		tmp_4 = 0.0
		if (b >= 0.0)
			tmp_4 = Float64(Float64(2.0 * c) / Float64(Float64(-b) - t_1));
		else
			tmp_4 = t_0;
		end
		tmp_1 = tmp_4;
	elseif (b >= 0.0)
		tmp_1 = Float64(Float64(2.0 * c) / Float64(2.0 * Float64(Float64(a * Float64(c / b)) - b)));
	else
		tmp_1 = t_0;
	end
	return tmp_1
end
code[a_, b_, c_] := Block[{t$95$0 = N[(2.0 * N[(b * N[(N[Power[-0.125, 1/3], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(c * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[b, -3e-27], If[GreaterEqual[b, 0.0], N[(c * N[(N[(-4.0 / a), $MachinePrecision] * N[(b / N[(c * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0], If[LessEqual[b, -2e-310], If[GreaterEqual[b, 0.0], N[(b / a), $MachinePrecision], N[(N[(t$95$1 - b), $MachinePrecision] / N[(2.0 * a), $MachinePrecision]), $MachinePrecision]], If[LessEqual[b, 4.5e-110], If[GreaterEqual[b, 0.0], N[(N[(2.0 * c), $MachinePrecision] / N[((-b) - t$95$1), $MachinePrecision]), $MachinePrecision], t$95$0], If[GreaterEqual[b, 0.0], N[(N[(2.0 * c), $MachinePrecision] / N[(2.0 * N[(N[(a * N[(c / b), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := 2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\
t_1 := \sqrt{c \cdot \left(a \cdot -4\right)}\\
\mathbf{if}\;b \leq -3 \cdot 10^{-27}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;c \cdot \left(\frac{-4}{a} \cdot \frac{b}{c \cdot -4}\right)\\

\mathbf{else}:\\
\;\;\;\;t\_0\\


\end{array}\\

\mathbf{elif}\;b \leq -2 \cdot 10^{-310}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\frac{b}{a}\\

\mathbf{else}:\\
\;\;\;\;\frac{t\_1 - b}{2 \cdot a}\\


\end{array}\\

\mathbf{elif}\;b \leq 4.5 \cdot 10^{-110}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - t\_1}\\

\mathbf{else}:\\
\;\;\;\;t\_0\\


\end{array}\\

\mathbf{elif}\;b \geq 0:\\
\;\;\;\;\frac{2 \cdot c}{2 \cdot \left(a \cdot \frac{c}{b} - b\right)}\\

\mathbf{else}:\\
\;\;\;\;t\_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -3.0000000000000001e-27

    1. Initial program 55.9%

      \[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cbrt-cube33.1%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt[3]{\left(\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\right) \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}}\\ \end{array} \]
      2. pow1/314.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;{\left(\left(\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\right) \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\right)}^{0.3333333333333333}\\ \end{array} \]
    4. Applied egg-rr5.4%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;{\left({\left(\frac{b + \sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -4\right)\right)}}{-2 \cdot a}\right)}^{3}\right)}^{0.3333333333333333}\\ \end{array} \]
    5. Taylor expanded in b around inf 87.1%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \frac{b \cdot \sqrt[3]{-0.125}}{a}\\ \end{array} \]
    6. Step-by-step derivation
      1. associate-/l*87.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)}\\ \end{array} \]
    7. Simplified87.4%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    8. Step-by-step derivation
      1. associate-/l*87.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{2 \cdot \frac{c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      2. add-sqr-sqrt87.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;2 \cdot \frac{c}{\color{blue}{\sqrt{-b} \cdot \sqrt{-b}} - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      3. sqrt-unprod87.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;2 \cdot \frac{c}{\color{blue}{\sqrt{\left(-b\right) \cdot \left(-b\right)}} - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      4. sqr-neg87.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;2 \cdot \frac{c}{\sqrt{\color{blue}{b \cdot b}} - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      5. sqrt-prod87.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;2 \cdot \frac{c}{\color{blue}{\sqrt{b} \cdot \sqrt{b}} - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      6. add-sqr-sqrt87.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;2 \cdot \frac{c}{\color{blue}{b} - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      7. pow287.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;2 \cdot \frac{c}{b - \sqrt{\color{blue}{{b}^{2}} - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      8. *-commutative87.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;2 \cdot \frac{c}{b - \sqrt{{b}^{2} - \color{blue}{c \cdot \left(4 \cdot a\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      9. *-commutative87.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;2 \cdot \frac{c}{b - \sqrt{{b}^{2} - c \cdot \color{blue}{\left(a \cdot 4\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    9. Applied egg-rr87.4%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{2 \cdot \frac{c}{b - \sqrt{{b}^{2} - c \cdot \left(a \cdot 4\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    10. Step-by-step derivation
      1. associate-*r/87.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{2 \cdot c}{b - \sqrt{{b}^{2} - c \cdot \left(a \cdot 4\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      2. *-commutative87.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\color{blue}{c \cdot 2}}{b - \sqrt{{b}^{2} - c \cdot \left(a \cdot 4\right)}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      3. associate-*r/87.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{c \cdot \frac{2}{b - \sqrt{{b}^{2} - c \cdot \left(a \cdot 4\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      4. associate-*r*87.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{{b}^{2} - \color{blue}{\left(c \cdot a\right) \cdot 4}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      5. *-commutative87.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{{b}^{2} - \color{blue}{\left(a \cdot c\right)} \cdot 4}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      6. *-commutative87.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{{b}^{2} - \color{blue}{4 \cdot \left(a \cdot c\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      7. *-commutative87.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{{b}^{2} - \color{blue}{\left(a \cdot c\right) \cdot 4}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      8. *-commutative87.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{{b}^{2} - \color{blue}{\left(c \cdot a\right)} \cdot 4}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      9. associate-*r*87.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{{b}^{2} - \color{blue}{c \cdot \left(a \cdot 4\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      10. sub-neg87.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{\color{blue}{{b}^{2} + \left(-c \cdot \left(a \cdot 4\right)\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      11. unpow287.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{\color{blue}{b \cdot b} + \left(-c \cdot \left(a \cdot 4\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      12. rem-square-sqrt87.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{b \cdot b + \color{blue}{\sqrt{-c \cdot \left(a \cdot 4\right)} \cdot \sqrt{-c \cdot \left(a \cdot 4\right)}}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      13. distribute-rgt-neg-in87.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{b \cdot b + \sqrt{\color{blue}{c \cdot \left(-a \cdot 4\right)}} \cdot \sqrt{-c \cdot \left(a \cdot 4\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      14. distribute-rgt-neg-in87.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{b \cdot b + \sqrt{c \cdot \color{blue}{\left(a \cdot \left(-4\right)\right)}} \cdot \sqrt{-c \cdot \left(a \cdot 4\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      15. metadata-eval87.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{b \cdot b + \sqrt{c \cdot \left(a \cdot \color{blue}{-4}\right)} \cdot \sqrt{-c \cdot \left(a \cdot 4\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      16. distribute-rgt-neg-in87.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{b \cdot b + \sqrt{c \cdot \left(a \cdot -4\right)} \cdot \sqrt{\color{blue}{c \cdot \left(-a \cdot 4\right)}}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    11. Simplified87.4%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{c \cdot \frac{2}{b - \mathsf{hypot}\left(b, \sqrt{c \cdot \left(a \cdot -4\right)}\right)}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    12. Taylor expanded in b around inf 87.4%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \color{blue}{\left(-4 \cdot \frac{b}{a \cdot \left(c \cdot {\left(\sqrt{-4}\right)}^{2}\right)}\right)}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    13. Step-by-step derivation
      1. associate-*r/87.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \color{blue}{\frac{-4 \cdot b}{a \cdot \left(c \cdot {\left(\sqrt{-4}\right)}^{2}\right)}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      2. rem-square-sqrt87.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{\color{blue}{\left(\sqrt{-4} \cdot \sqrt{-4}\right)} \cdot b}{a \cdot \left(c \cdot {\left(\sqrt{-4}\right)}^{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      3. unpow287.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{\color{blue}{{\left(\sqrt{-4}\right)}^{2}} \cdot b}{a \cdot \left(c \cdot {\left(\sqrt{-4}\right)}^{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      4. times-frac87.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \color{blue}{\left(\frac{{\left(\sqrt{-4}\right)}^{2}}{a} \cdot \frac{b}{c \cdot {\left(\sqrt{-4}\right)}^{2}}\right)}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      5. unpow287.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \left(\frac{\color{blue}{\sqrt{-4} \cdot \sqrt{-4}}}{a} \cdot \frac{b}{c \cdot {\left(\sqrt{-4}\right)}^{2}}\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      6. rem-square-sqrt87.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \left(\frac{\color{blue}{-4}}{a} \cdot \frac{b}{c \cdot {\left(\sqrt{-4}\right)}^{2}}\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      7. unpow287.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \left(\frac{-4}{a} \cdot \frac{b}{c \cdot \color{blue}{\left(\sqrt{-4} \cdot \sqrt{-4}\right)}}\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      8. rem-square-sqrt87.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \left(\frac{-4}{a} \cdot \frac{b}{c \cdot \color{blue}{-4}}\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    14. Simplified87.4%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \color{blue}{\left(\frac{-4}{a} \cdot \frac{b}{c \cdot -4}\right)}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]

    if -3.0000000000000001e-27 < b < -1.999999999999994e-310

    1. Initial program 77.4%

      \[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0 77.4%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{2 \cdot \frac{a \cdot c}{b} - 2 \cdot b}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
    4. Step-by-step derivation
      1. distribute-lft-out--77.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{2 \cdot \left(\frac{a \cdot c}{b} - b\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
      2. associate-/l*77.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{2 \cdot \left(\color{blue}{a \cdot \frac{c}{b}} - b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
      3. fma-neg77.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{2 \cdot \color{blue}{\mathsf{fma}\left(a, \frac{c}{b}, -b\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
    5. Simplified77.4%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{2 \cdot \mathsf{fma}\left(a, \frac{c}{b}, -b\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
    6. Taylor expanded in c around inf 77.4%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
    7. Taylor expanded in b around 0 67.8%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{-4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\\ \end{array} \]
    8. Step-by-step derivation
      1. *-commutative17.2%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{\color{blue}{\left(a \cdot c\right) \cdot -4}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      2. *-commutative17.2%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{\color{blue}{\left(c \cdot a\right)} \cdot -4}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      3. associate-*r*17.2%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{\color{blue}{c \cdot \left(a \cdot -4\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    9. Simplified68.2%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{c \cdot \left(a \cdot -4\right)}}{2 \cdot a}\\ \end{array} \]

    if -1.999999999999994e-310 < b < 4.5000000000000001e-110

    1. Initial program 79.4%

      \[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cbrt-cube79.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt[3]{\left(\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\right) \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}}\\ \end{array} \]
      2. pow1/379.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;{\left(\left(\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\right) \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\right)}^{0.3333333333333333}\\ \end{array} \]
    4. Applied egg-rr79.4%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;{\left({\left(\frac{b + \sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -4\right)\right)}}{-2 \cdot a}\right)}^{3}\right)}^{0.3333333333333333}\\ \end{array} \]
    5. Taylor expanded in b around inf 79.4%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \frac{b \cdot \sqrt[3]{-0.125}}{a}\\ \end{array} \]
    6. Step-by-step derivation
      1. associate-/l*79.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)}\\ \end{array} \]
    7. Simplified79.4%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    8. Taylor expanded in b around 0 75.8%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{\color{blue}{-4 \cdot \left(a \cdot c\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    9. Step-by-step derivation
      1. *-commutative75.8%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{\color{blue}{\left(a \cdot c\right) \cdot -4}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      2. *-commutative75.8%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{\color{blue}{\left(c \cdot a\right)} \cdot -4}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      3. associate-*r*75.8%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{\color{blue}{c \cdot \left(a \cdot -4\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    10. Simplified75.8%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{\color{blue}{c \cdot \left(a \cdot -4\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]

    if 4.5000000000000001e-110 < b

    1. Initial program 64.0%

      \[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cbrt-cube64.0%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt[3]{\left(\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\right) \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}}\\ \end{array} \]
      2. pow1/364.0%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;{\left(\left(\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\right) \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\right)}^{0.3333333333333333}\\ \end{array} \]
    4. Applied egg-rr64.0%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;{\left({\left(\frac{b + \sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -4\right)\right)}}{-2 \cdot a}\right)}^{3}\right)}^{0.3333333333333333}\\ \end{array} \]
    5. Taylor expanded in b around inf 64.0%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \frac{b \cdot \sqrt[3]{-0.125}}{a}\\ \end{array} \]
    6. Step-by-step derivation
      1. associate-/l*64.0%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)}\\ \end{array} \]
    7. Simplified64.0%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    8. Taylor expanded in a around 0 73.4%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{2 \cdot \frac{a \cdot c}{b} - 2 \cdot b}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    9. Step-by-step derivation
      1. distribute-lft-out--73.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{2 \cdot \left(\frac{a \cdot c}{b} - b\right)}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      2. associate-/l*80.7%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{2 \cdot \left(\color{blue}{a \cdot \frac{c}{b}} - b\right)}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    10. Simplified80.7%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{2 \cdot \left(a \cdot \frac{c}{b} - b\right)}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification80.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -3 \cdot 10^{-27}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \left(\frac{-4}{a} \cdot \frac{b}{c \cdot -4}\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array}\\ \mathbf{elif}\;b \leq -2 \cdot 10^{-310}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{c \cdot \left(a \cdot -4\right)} - b}{2 \cdot a}\\ \end{array}\\ \mathbf{elif}\;b \leq 4.5 \cdot 10^{-110}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{c \cdot \left(a \cdot -4\right)}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{2 \cdot \left(a \cdot \frac{c}{b} - b\right)}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 90.1% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt{b \cdot b - c \cdot \left(4 \cdot a\right)}\\ t_1 := \frac{t\_0 - b}{2 \cdot a}\\ \mathbf{if}\;b \leq -1.05 \cdot 10^{+128}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \left(\frac{-4}{a} \cdot \frac{b}{c \cdot -4}\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array}\\ \mathbf{elif}\;b \leq 1.15 \cdot 10^{+64}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - t\_0}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{b \cdot -2}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (let* ((t_0 (sqrt (- (* b b) (* c (* 4.0 a))))) (t_1 (/ (- t_0 b) (* 2.0 a))))
   (if (<= b -1.05e+128)
     (if (>= b 0.0)
       (* c (* (/ -4.0 a) (/ b (* c -4.0))))
       (* 2.0 (* b (/ (cbrt -0.125) a))))
     (if (<= b 1.15e+64)
       (if (>= b 0.0) (/ (* 2.0 c) (- (- b) t_0)) t_1)
       (if (>= b 0.0) (/ (* 2.0 c) (* b -2.0)) t_1)))))
double code(double a, double b, double c) {
	double t_0 = sqrt(((b * b) - (c * (4.0 * a))));
	double t_1 = (t_0 - b) / (2.0 * a);
	double tmp_1;
	if (b <= -1.05e+128) {
		double tmp_2;
		if (b >= 0.0) {
			tmp_2 = c * ((-4.0 / a) * (b / (c * -4.0)));
		} else {
			tmp_2 = 2.0 * (b * (cbrt(-0.125) / a));
		}
		tmp_1 = tmp_2;
	} else if (b <= 1.15e+64) {
		double tmp_3;
		if (b >= 0.0) {
			tmp_3 = (2.0 * c) / (-b - t_0);
		} else {
			tmp_3 = t_1;
		}
		tmp_1 = tmp_3;
	} else if (b >= 0.0) {
		tmp_1 = (2.0 * c) / (b * -2.0);
	} else {
		tmp_1 = t_1;
	}
	return tmp_1;
}
public static double code(double a, double b, double c) {
	double t_0 = Math.sqrt(((b * b) - (c * (4.0 * a))));
	double t_1 = (t_0 - b) / (2.0 * a);
	double tmp_1;
	if (b <= -1.05e+128) {
		double tmp_2;
		if (b >= 0.0) {
			tmp_2 = c * ((-4.0 / a) * (b / (c * -4.0)));
		} else {
			tmp_2 = 2.0 * (b * (Math.cbrt(-0.125) / a));
		}
		tmp_1 = tmp_2;
	} else if (b <= 1.15e+64) {
		double tmp_3;
		if (b >= 0.0) {
			tmp_3 = (2.0 * c) / (-b - t_0);
		} else {
			tmp_3 = t_1;
		}
		tmp_1 = tmp_3;
	} else if (b >= 0.0) {
		tmp_1 = (2.0 * c) / (b * -2.0);
	} else {
		tmp_1 = t_1;
	}
	return tmp_1;
}
function code(a, b, c)
	t_0 = sqrt(Float64(Float64(b * b) - Float64(c * Float64(4.0 * a))))
	t_1 = Float64(Float64(t_0 - b) / Float64(2.0 * a))
	tmp_1 = 0.0
	if (b <= -1.05e+128)
		tmp_2 = 0.0
		if (b >= 0.0)
			tmp_2 = Float64(c * Float64(Float64(-4.0 / a) * Float64(b / Float64(c * -4.0))));
		else
			tmp_2 = Float64(2.0 * Float64(b * Float64(cbrt(-0.125) / a)));
		end
		tmp_1 = tmp_2;
	elseif (b <= 1.15e+64)
		tmp_3 = 0.0
		if (b >= 0.0)
			tmp_3 = Float64(Float64(2.0 * c) / Float64(Float64(-b) - t_0));
		else
			tmp_3 = t_1;
		end
		tmp_1 = tmp_3;
	elseif (b >= 0.0)
		tmp_1 = Float64(Float64(2.0 * c) / Float64(b * -2.0));
	else
		tmp_1 = t_1;
	end
	return tmp_1
end
code[a_, b_, c_] := Block[{t$95$0 = N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(c * N[(4.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[(t$95$0 - b), $MachinePrecision] / N[(2.0 * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.05e+128], If[GreaterEqual[b, 0.0], N[(c * N[(N[(-4.0 / a), $MachinePrecision] * N[(b / N[(c * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(b * N[(N[Power[-0.125, 1/3], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], If[LessEqual[b, 1.15e+64], If[GreaterEqual[b, 0.0], N[(N[(2.0 * c), $MachinePrecision] / N[((-b) - t$95$0), $MachinePrecision]), $MachinePrecision], t$95$1], If[GreaterEqual[b, 0.0], N[(N[(2.0 * c), $MachinePrecision] / N[(b * -2.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \sqrt{b \cdot b - c \cdot \left(4 \cdot a\right)}\\
t_1 := \frac{t\_0 - b}{2 \cdot a}\\
\mathbf{if}\;b \leq -1.05 \cdot 10^{+128}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;c \cdot \left(\frac{-4}{a} \cdot \frac{b}{c \cdot -4}\right)\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\


\end{array}\\

\mathbf{elif}\;b \leq 1.15 \cdot 10^{+64}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - t\_0}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}\\

\mathbf{elif}\;b \geq 0:\\
\;\;\;\;\frac{2 \cdot c}{b \cdot -2}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


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

    1. Initial program 26.9%

      \[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cbrt-cube26.9%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt[3]{\left(\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\right) \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}}\\ \end{array} \]
      2. pow1/37.9%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;{\left(\left(\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\right) \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\right)}^{0.3333333333333333}\\ \end{array} \]
    4. Applied egg-rr8.0%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;{\left({\left(\frac{b + \sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -4\right)\right)}}{-2 \cdot a}\right)}^{3}\right)}^{0.3333333333333333}\\ \end{array} \]
    5. Taylor expanded in b around inf 95.2%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \frac{b \cdot \sqrt[3]{-0.125}}{a}\\ \end{array} \]
    6. Step-by-step derivation
      1. associate-/l*95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)}\\ \end{array} \]
    7. Simplified95.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    8. Step-by-step derivation
      1. associate-/l*95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{2 \cdot \frac{c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      2. add-sqr-sqrt95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;2 \cdot \frac{c}{\color{blue}{\sqrt{-b} \cdot \sqrt{-b}} - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      3. sqrt-unprod95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;2 \cdot \frac{c}{\color{blue}{\sqrt{\left(-b\right) \cdot \left(-b\right)}} - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      4. sqr-neg95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;2 \cdot \frac{c}{\sqrt{\color{blue}{b \cdot b}} - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      5. sqrt-prod95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;2 \cdot \frac{c}{\color{blue}{\sqrt{b} \cdot \sqrt{b}} - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      6. add-sqr-sqrt95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;2 \cdot \frac{c}{\color{blue}{b} - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      7. pow295.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;2 \cdot \frac{c}{b - \sqrt{\color{blue}{{b}^{2}} - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      8. *-commutative95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;2 \cdot \frac{c}{b - \sqrt{{b}^{2} - \color{blue}{c \cdot \left(4 \cdot a\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      9. *-commutative95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;2 \cdot \frac{c}{b - \sqrt{{b}^{2} - c \cdot \color{blue}{\left(a \cdot 4\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    9. Applied egg-rr95.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{2 \cdot \frac{c}{b - \sqrt{{b}^{2} - c \cdot \left(a \cdot 4\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    10. Step-by-step derivation
      1. associate-*r/95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{2 \cdot c}{b - \sqrt{{b}^{2} - c \cdot \left(a \cdot 4\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      2. *-commutative95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\color{blue}{c \cdot 2}}{b - \sqrt{{b}^{2} - c \cdot \left(a \cdot 4\right)}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      3. associate-*r/95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{c \cdot \frac{2}{b - \sqrt{{b}^{2} - c \cdot \left(a \cdot 4\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      4. associate-*r*95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{{b}^{2} - \color{blue}{\left(c \cdot a\right) \cdot 4}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      5. *-commutative95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{{b}^{2} - \color{blue}{\left(a \cdot c\right)} \cdot 4}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      6. *-commutative95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{{b}^{2} - \color{blue}{4 \cdot \left(a \cdot c\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      7. *-commutative95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{{b}^{2} - \color{blue}{\left(a \cdot c\right) \cdot 4}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      8. *-commutative95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{{b}^{2} - \color{blue}{\left(c \cdot a\right)} \cdot 4}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      9. associate-*r*95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{{b}^{2} - \color{blue}{c \cdot \left(a \cdot 4\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      10. sub-neg95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{\color{blue}{{b}^{2} + \left(-c \cdot \left(a \cdot 4\right)\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      11. unpow295.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{\color{blue}{b \cdot b} + \left(-c \cdot \left(a \cdot 4\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      12. rem-square-sqrt95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{b \cdot b + \color{blue}{\sqrt{-c \cdot \left(a \cdot 4\right)} \cdot \sqrt{-c \cdot \left(a \cdot 4\right)}}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      13. distribute-rgt-neg-in95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{b \cdot b + \sqrt{\color{blue}{c \cdot \left(-a \cdot 4\right)}} \cdot \sqrt{-c \cdot \left(a \cdot 4\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      14. distribute-rgt-neg-in95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{b \cdot b + \sqrt{c \cdot \color{blue}{\left(a \cdot \left(-4\right)\right)}} \cdot \sqrt{-c \cdot \left(a \cdot 4\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      15. metadata-eval95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{b \cdot b + \sqrt{c \cdot \left(a \cdot \color{blue}{-4}\right)} \cdot \sqrt{-c \cdot \left(a \cdot 4\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      16. distribute-rgt-neg-in95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{b \cdot b + \sqrt{c \cdot \left(a \cdot -4\right)} \cdot \sqrt{\color{blue}{c \cdot \left(-a \cdot 4\right)}}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    11. Simplified95.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{c \cdot \frac{2}{b - \mathsf{hypot}\left(b, \sqrt{c \cdot \left(a \cdot -4\right)}\right)}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    12. Taylor expanded in b around inf 95.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \color{blue}{\left(-4 \cdot \frac{b}{a \cdot \left(c \cdot {\left(\sqrt{-4}\right)}^{2}\right)}\right)}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    13. Step-by-step derivation
      1. associate-*r/95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \color{blue}{\frac{-4 \cdot b}{a \cdot \left(c \cdot {\left(\sqrt{-4}\right)}^{2}\right)}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      2. rem-square-sqrt95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{\color{blue}{\left(\sqrt{-4} \cdot \sqrt{-4}\right)} \cdot b}{a \cdot \left(c \cdot {\left(\sqrt{-4}\right)}^{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      3. unpow295.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{\color{blue}{{\left(\sqrt{-4}\right)}^{2}} \cdot b}{a \cdot \left(c \cdot {\left(\sqrt{-4}\right)}^{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      4. times-frac95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \color{blue}{\left(\frac{{\left(\sqrt{-4}\right)}^{2}}{a} \cdot \frac{b}{c \cdot {\left(\sqrt{-4}\right)}^{2}}\right)}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      5. unpow295.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \left(\frac{\color{blue}{\sqrt{-4} \cdot \sqrt{-4}}}{a} \cdot \frac{b}{c \cdot {\left(\sqrt{-4}\right)}^{2}}\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      6. rem-square-sqrt95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \left(\frac{\color{blue}{-4}}{a} \cdot \frac{b}{c \cdot {\left(\sqrt{-4}\right)}^{2}}\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      7. unpow295.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \left(\frac{-4}{a} \cdot \frac{b}{c \cdot \color{blue}{\left(\sqrt{-4} \cdot \sqrt{-4}\right)}}\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      8. rem-square-sqrt95.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \left(\frac{-4}{a} \cdot \frac{b}{c \cdot \color{blue}{-4}}\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    14. Simplified95.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \color{blue}{\left(\frac{-4}{a} \cdot \frac{b}{c \cdot -4}\right)}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]

    if -1.05e128 < b < 1.15e64

    1. Initial program 85.2%

      \[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
    2. Add Preprocessing

    if 1.15e64 < b

    1. Initial program 50.8%

      \[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf 89.7%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{-2 \cdot b}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
    4. Step-by-step derivation
      1. *-commutative89.7%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{b \cdot -2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
    5. Simplified89.7%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{b \cdot -2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification88.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.05 \cdot 10^{+128}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \left(\frac{-4}{a} \cdot \frac{b}{c \cdot -4}\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array}\\ \mathbf{elif}\;b \leq 1.15 \cdot 10^{+64}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - c \cdot \left(4 \cdot a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{b \cdot b - c \cdot \left(4 \cdot a\right)} - b}{2 \cdot a}\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{b \cdot -2}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{b \cdot b - c \cdot \left(4 \cdot a\right)} - b}{2 \cdot a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 74.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -1.25 \cdot 10^{-26}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \left(\frac{-4}{a} \cdot \frac{b}{c \cdot -4}\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array}\\ \mathbf{elif}\;b \leq 5 \cdot 10^{-260}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{c \cdot \left(a \cdot -4\right)} - b}{2 \cdot a}\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{2 \cdot \left(a \cdot \frac{c}{b} - b\right)}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \frac{b \cdot \sqrt[3]{-0.125}}{a}\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b -1.25e-26)
   (if (>= b 0.0)
     (* c (* (/ -4.0 a) (/ b (* c -4.0))))
     (* 2.0 (* b (/ (cbrt -0.125) a))))
   (if (<= b 5e-260)
     (if (>= b 0.0) (/ b a) (/ (- (sqrt (* c (* a -4.0))) b) (* 2.0 a)))
     (if (>= b 0.0)
       (/ (* 2.0 c) (* 2.0 (- (* a (/ c b)) b)))
       (* 2.0 (/ (* b (cbrt -0.125)) a))))))
double code(double a, double b, double c) {
	double tmp_1;
	if (b <= -1.25e-26) {
		double tmp_2;
		if (b >= 0.0) {
			tmp_2 = c * ((-4.0 / a) * (b / (c * -4.0)));
		} else {
			tmp_2 = 2.0 * (b * (cbrt(-0.125) / a));
		}
		tmp_1 = tmp_2;
	} else if (b <= 5e-260) {
		double tmp_3;
		if (b >= 0.0) {
			tmp_3 = b / a;
		} else {
			tmp_3 = (sqrt((c * (a * -4.0))) - b) / (2.0 * a);
		}
		tmp_1 = tmp_3;
	} else if (b >= 0.0) {
		tmp_1 = (2.0 * c) / (2.0 * ((a * (c / b)) - b));
	} else {
		tmp_1 = 2.0 * ((b * cbrt(-0.125)) / a);
	}
	return tmp_1;
}
public static double code(double a, double b, double c) {
	double tmp_1;
	if (b <= -1.25e-26) {
		double tmp_2;
		if (b >= 0.0) {
			tmp_2 = c * ((-4.0 / a) * (b / (c * -4.0)));
		} else {
			tmp_2 = 2.0 * (b * (Math.cbrt(-0.125) / a));
		}
		tmp_1 = tmp_2;
	} else if (b <= 5e-260) {
		double tmp_3;
		if (b >= 0.0) {
			tmp_3 = b / a;
		} else {
			tmp_3 = (Math.sqrt((c * (a * -4.0))) - b) / (2.0 * a);
		}
		tmp_1 = tmp_3;
	} else if (b >= 0.0) {
		tmp_1 = (2.0 * c) / (2.0 * ((a * (c / b)) - b));
	} else {
		tmp_1 = 2.0 * ((b * Math.cbrt(-0.125)) / a);
	}
	return tmp_1;
}
function code(a, b, c)
	tmp_1 = 0.0
	if (b <= -1.25e-26)
		tmp_2 = 0.0
		if (b >= 0.0)
			tmp_2 = Float64(c * Float64(Float64(-4.0 / a) * Float64(b / Float64(c * -4.0))));
		else
			tmp_2 = Float64(2.0 * Float64(b * Float64(cbrt(-0.125) / a)));
		end
		tmp_1 = tmp_2;
	elseif (b <= 5e-260)
		tmp_3 = 0.0
		if (b >= 0.0)
			tmp_3 = Float64(b / a);
		else
			tmp_3 = Float64(Float64(sqrt(Float64(c * Float64(a * -4.0))) - b) / Float64(2.0 * a));
		end
		tmp_1 = tmp_3;
	elseif (b >= 0.0)
		tmp_1 = Float64(Float64(2.0 * c) / Float64(2.0 * Float64(Float64(a * Float64(c / b)) - b)));
	else
		tmp_1 = Float64(2.0 * Float64(Float64(b * cbrt(-0.125)) / a));
	end
	return tmp_1
end
code[a_, b_, c_] := If[LessEqual[b, -1.25e-26], If[GreaterEqual[b, 0.0], N[(c * N[(N[(-4.0 / a), $MachinePrecision] * N[(b / N[(c * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(b * N[(N[Power[-0.125, 1/3], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], If[LessEqual[b, 5e-260], If[GreaterEqual[b, 0.0], N[(b / a), $MachinePrecision], N[(N[(N[Sqrt[N[(c * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(2.0 * a), $MachinePrecision]), $MachinePrecision]], If[GreaterEqual[b, 0.0], N[(N[(2.0 * c), $MachinePrecision] / N[(2.0 * N[(N[(a * N[(c / b), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(b * N[Power[-0.125, 1/3], $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.25 \cdot 10^{-26}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;c \cdot \left(\frac{-4}{a} \cdot \frac{b}{c \cdot -4}\right)\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\


\end{array}\\

\mathbf{elif}\;b \leq 5 \cdot 10^{-260}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\frac{b}{a}\\

\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{c \cdot \left(a \cdot -4\right)} - b}{2 \cdot a}\\


\end{array}\\

\mathbf{elif}\;b \geq 0:\\
\;\;\;\;\frac{2 \cdot c}{2 \cdot \left(a \cdot \frac{c}{b} - b\right)}\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{b \cdot \sqrt[3]{-0.125}}{a}\\


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

    1. Initial program 55.9%

      \[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cbrt-cube33.1%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt[3]{\left(\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\right) \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}}\\ \end{array} \]
      2. pow1/314.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;{\left(\left(\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\right) \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\right)}^{0.3333333333333333}\\ \end{array} \]
    4. Applied egg-rr5.4%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;{\left({\left(\frac{b + \sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -4\right)\right)}}{-2 \cdot a}\right)}^{3}\right)}^{0.3333333333333333}\\ \end{array} \]
    5. Taylor expanded in b around inf 87.1%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \frac{b \cdot \sqrt[3]{-0.125}}{a}\\ \end{array} \]
    6. Step-by-step derivation
      1. associate-/l*87.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)}\\ \end{array} \]
    7. Simplified87.4%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    8. Step-by-step derivation
      1. associate-/l*87.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{2 \cdot \frac{c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      2. add-sqr-sqrt87.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;2 \cdot \frac{c}{\color{blue}{\sqrt{-b} \cdot \sqrt{-b}} - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      3. sqrt-unprod87.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;2 \cdot \frac{c}{\color{blue}{\sqrt{\left(-b\right) \cdot \left(-b\right)}} - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      4. sqr-neg87.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;2 \cdot \frac{c}{\sqrt{\color{blue}{b \cdot b}} - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      5. sqrt-prod87.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;2 \cdot \frac{c}{\color{blue}{\sqrt{b} \cdot \sqrt{b}} - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      6. add-sqr-sqrt87.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;2 \cdot \frac{c}{\color{blue}{b} - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      7. pow287.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;2 \cdot \frac{c}{b - \sqrt{\color{blue}{{b}^{2}} - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      8. *-commutative87.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;2 \cdot \frac{c}{b - \sqrt{{b}^{2} - \color{blue}{c \cdot \left(4 \cdot a\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      9. *-commutative87.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;2 \cdot \frac{c}{b - \sqrt{{b}^{2} - c \cdot \color{blue}{\left(a \cdot 4\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    9. Applied egg-rr87.4%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{2 \cdot \frac{c}{b - \sqrt{{b}^{2} - c \cdot \left(a \cdot 4\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    10. Step-by-step derivation
      1. associate-*r/87.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{2 \cdot c}{b - \sqrt{{b}^{2} - c \cdot \left(a \cdot 4\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      2. *-commutative87.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\color{blue}{c \cdot 2}}{b - \sqrt{{b}^{2} - c \cdot \left(a \cdot 4\right)}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      3. associate-*r/87.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{c \cdot \frac{2}{b - \sqrt{{b}^{2} - c \cdot \left(a \cdot 4\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      4. associate-*r*87.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{{b}^{2} - \color{blue}{\left(c \cdot a\right) \cdot 4}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      5. *-commutative87.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{{b}^{2} - \color{blue}{\left(a \cdot c\right)} \cdot 4}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      6. *-commutative87.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{{b}^{2} - \color{blue}{4 \cdot \left(a \cdot c\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      7. *-commutative87.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{{b}^{2} - \color{blue}{\left(a \cdot c\right) \cdot 4}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      8. *-commutative87.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{{b}^{2} - \color{blue}{\left(c \cdot a\right)} \cdot 4}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      9. associate-*r*87.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{{b}^{2} - \color{blue}{c \cdot \left(a \cdot 4\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      10. sub-neg87.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{\color{blue}{{b}^{2} + \left(-c \cdot \left(a \cdot 4\right)\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      11. unpow287.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{\color{blue}{b \cdot b} + \left(-c \cdot \left(a \cdot 4\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      12. rem-square-sqrt87.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{b \cdot b + \color{blue}{\sqrt{-c \cdot \left(a \cdot 4\right)} \cdot \sqrt{-c \cdot \left(a \cdot 4\right)}}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      13. distribute-rgt-neg-in87.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{b \cdot b + \sqrt{\color{blue}{c \cdot \left(-a \cdot 4\right)}} \cdot \sqrt{-c \cdot \left(a \cdot 4\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      14. distribute-rgt-neg-in87.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{b \cdot b + \sqrt{c \cdot \color{blue}{\left(a \cdot \left(-4\right)\right)}} \cdot \sqrt{-c \cdot \left(a \cdot 4\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      15. metadata-eval87.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{b \cdot b + \sqrt{c \cdot \left(a \cdot \color{blue}{-4}\right)} \cdot \sqrt{-c \cdot \left(a \cdot 4\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      16. distribute-rgt-neg-in87.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{b \cdot b + \sqrt{c \cdot \left(a \cdot -4\right)} \cdot \sqrt{\color{blue}{c \cdot \left(-a \cdot 4\right)}}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    11. Simplified87.4%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{c \cdot \frac{2}{b - \mathsf{hypot}\left(b, \sqrt{c \cdot \left(a \cdot -4\right)}\right)}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    12. Taylor expanded in b around inf 87.4%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \color{blue}{\left(-4 \cdot \frac{b}{a \cdot \left(c \cdot {\left(\sqrt{-4}\right)}^{2}\right)}\right)}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    13. Step-by-step derivation
      1. associate-*r/87.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \color{blue}{\frac{-4 \cdot b}{a \cdot \left(c \cdot {\left(\sqrt{-4}\right)}^{2}\right)}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      2. rem-square-sqrt87.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{\color{blue}{\left(\sqrt{-4} \cdot \sqrt{-4}\right)} \cdot b}{a \cdot \left(c \cdot {\left(\sqrt{-4}\right)}^{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      3. unpow287.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{\color{blue}{{\left(\sqrt{-4}\right)}^{2}} \cdot b}{a \cdot \left(c \cdot {\left(\sqrt{-4}\right)}^{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      4. times-frac87.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \color{blue}{\left(\frac{{\left(\sqrt{-4}\right)}^{2}}{a} \cdot \frac{b}{c \cdot {\left(\sqrt{-4}\right)}^{2}}\right)}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      5. unpow287.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \left(\frac{\color{blue}{\sqrt{-4} \cdot \sqrt{-4}}}{a} \cdot \frac{b}{c \cdot {\left(\sqrt{-4}\right)}^{2}}\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      6. rem-square-sqrt87.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \left(\frac{\color{blue}{-4}}{a} \cdot \frac{b}{c \cdot {\left(\sqrt{-4}\right)}^{2}}\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      7. unpow287.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \left(\frac{-4}{a} \cdot \frac{b}{c \cdot \color{blue}{\left(\sqrt{-4} \cdot \sqrt{-4}\right)}}\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      8. rem-square-sqrt87.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \left(\frac{-4}{a} \cdot \frac{b}{c \cdot \color{blue}{-4}}\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    14. Simplified87.4%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \color{blue}{\left(\frac{-4}{a} \cdot \frac{b}{c \cdot -4}\right)}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]

    if -1.25000000000000005e-26 < b < 5.0000000000000003e-260

    1. Initial program 78.2%

      \[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0 69.1%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{2 \cdot \frac{a \cdot c}{b} - 2 \cdot b}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
    4. Step-by-step derivation
      1. distribute-lft-out--69.1%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{2 \cdot \left(\frac{a \cdot c}{b} - b\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
      2. associate-/l*69.0%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{2 \cdot \left(\color{blue}{a \cdot \frac{c}{b}} - b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
      3. fma-neg69.0%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{2 \cdot \color{blue}{\mathsf{fma}\left(a, \frac{c}{b}, -b\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
    5. Simplified69.0%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{2 \cdot \mathsf{fma}\left(a, \frac{c}{b}, -b\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
    6. Taylor expanded in c around inf 69.1%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
    7. Taylor expanded in b around 0 60.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{-4 \cdot \left(a \cdot c\right)}}{2 \cdot a}\\ \end{array} \]
    8. Step-by-step derivation
      1. *-commutative24.9%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{\color{blue}{\left(a \cdot c\right) \cdot -4}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      2. *-commutative24.9%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{\color{blue}{\left(c \cdot a\right)} \cdot -4}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      3. associate-*r*24.9%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{\color{blue}{c \cdot \left(a \cdot -4\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    9. Simplified60.9%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{c \cdot \left(a \cdot -4\right)}}{2 \cdot a}\\ \end{array} \]

    if 5.0000000000000003e-260 < b

    1. Initial program 66.0%

      \[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cbrt-cube66.0%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt[3]{\left(\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\right) \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}}\\ \end{array} \]
      2. pow1/366.0%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;{\left(\left(\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\right) \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\right)}^{0.3333333333333333}\\ \end{array} \]
    4. Applied egg-rr66.0%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;{\left({\left(\frac{b + \sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -4\right)\right)}}{-2 \cdot a}\right)}^{3}\right)}^{0.3333333333333333}\\ \end{array} \]
    5. Taylor expanded in b around inf 66.0%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \frac{b \cdot \sqrt[3]{-0.125}}{a}\\ \end{array} \]
    6. Step-by-step derivation
      1. associate-/l*66.0%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)}\\ \end{array} \]
    7. Simplified66.0%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    8. Taylor expanded in a around 0 65.7%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{2 \cdot \frac{a \cdot c}{b} - 2 \cdot b}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    9. Step-by-step derivation
      1. distribute-lft-out--65.7%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{2 \cdot \left(\frac{a \cdot c}{b} - b\right)}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
      2. associate-/l*72.3%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{2 \cdot \left(\color{blue}{a \cdot \frac{c}{b}} - b\right)}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    10. Simplified72.3%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{2 \cdot \left(a \cdot \frac{c}{b} - b\right)}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    11. Taylor expanded in b around 0 72.3%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{2 \cdot \left(a \cdot \frac{c}{b} - b\right)}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{2 \cdot \frac{b \cdot \sqrt[3]{-0.125}}{a}}\\ \end{array} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification75.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.25 \cdot 10^{-26}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \left(\frac{-4}{a} \cdot \frac{b}{c \cdot -4}\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array}\\ \mathbf{elif}\;b \leq 5 \cdot 10^{-260}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{c \cdot \left(a \cdot -4\right)} - b}{2 \cdot a}\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{2 \cdot \left(a \cdot \frac{c}{b} - b\right)}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \frac{b \cdot \sqrt[3]{-0.125}}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 68.5% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{2 \cdot \left(a \cdot \frac{c}{b} - b\right)}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (>= b 0.0)
   (/ (* 2.0 c) (* 2.0 (- (* a (/ c b)) b)))
   (* 2.0 (* b (/ (cbrt -0.125) a)))))
double code(double a, double b, double c) {
	double tmp;
	if (b >= 0.0) {
		tmp = (2.0 * c) / (2.0 * ((a * (c / b)) - b));
	} else {
		tmp = 2.0 * (b * (cbrt(-0.125) / a));
	}
	return tmp;
}
public static double code(double a, double b, double c) {
	double tmp;
	if (b >= 0.0) {
		tmp = (2.0 * c) / (2.0 * ((a * (c / b)) - b));
	} else {
		tmp = 2.0 * (b * (Math.cbrt(-0.125) / a));
	}
	return tmp;
}
function code(a, b, c)
	tmp = 0.0
	if (b >= 0.0)
		tmp = Float64(Float64(2.0 * c) / Float64(2.0 * Float64(Float64(a * Float64(c / b)) - b)));
	else
		tmp = Float64(2.0 * Float64(b * Float64(cbrt(-0.125) / a)));
	end
	return tmp
end
code[a_, b_, c_] := If[GreaterEqual[b, 0.0], N[(N[(2.0 * c), $MachinePrecision] / N[(2.0 * N[(N[(a * N[(c / b), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(b * N[(N[Power[-0.125, 1/3], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\frac{2 \cdot c}{2 \cdot \left(a \cdot \frac{c}{b} - b\right)}\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\


\end{array}
\end{array}
Derivation
  1. Initial program 64.7%

    \[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. add-cbrt-cube48.7%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt[3]{\left(\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\right) \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}}\\ \end{array} \]
    2. pow1/338.1%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;{\left(\left(\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\right) \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\right)}^{0.3333333333333333}\\ \end{array} \]
  4. Applied egg-rr32.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;{\left({\left(\frac{b + \sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -4\right)\right)}}{-2 \cdot a}\right)}^{3}\right)}^{0.3333333333333333}\\ \end{array} \]
  5. Taylor expanded in b around inf 65.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \frac{b \cdot \sqrt[3]{-0.125}}{a}\\ \end{array} \]
  6. Step-by-step derivation
    1. associate-/l*65.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)}\\ \end{array} \]
  7. Simplified65.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
  8. Taylor expanded in a around 0 63.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{2 \cdot \frac{a \cdot c}{b} - 2 \cdot b}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
  9. Step-by-step derivation
    1. distribute-lft-out--63.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{2 \cdot \left(\frac{a \cdot c}{b} - b\right)}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    2. associate-/l*66.4%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{2 \cdot \left(\color{blue}{a \cdot \frac{c}{b}} - b\right)}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
  10. Simplified66.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{2 \cdot \left(a \cdot \frac{c}{b} - b\right)}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
  11. Add Preprocessing

Alternative 9: 68.4% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2}{b} \cdot \frac{c}{-2}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (>= b 0.0) (* (/ 2.0 b) (/ c -2.0)) (* 2.0 (* b (/ (cbrt -0.125) a)))))
double code(double a, double b, double c) {
	double tmp;
	if (b >= 0.0) {
		tmp = (2.0 / b) * (c / -2.0);
	} else {
		tmp = 2.0 * (b * (cbrt(-0.125) / a));
	}
	return tmp;
}
public static double code(double a, double b, double c) {
	double tmp;
	if (b >= 0.0) {
		tmp = (2.0 / b) * (c / -2.0);
	} else {
		tmp = 2.0 * (b * (Math.cbrt(-0.125) / a));
	}
	return tmp;
}
function code(a, b, c)
	tmp = 0.0
	if (b >= 0.0)
		tmp = Float64(Float64(2.0 / b) * Float64(c / -2.0));
	else
		tmp = Float64(2.0 * Float64(b * Float64(cbrt(-0.125) / a)));
	end
	return tmp
end
code[a_, b_, c_] := If[GreaterEqual[b, 0.0], N[(N[(2.0 / b), $MachinePrecision] * N[(c / -2.0), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(b * N[(N[Power[-0.125, 1/3], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\frac{2}{b} \cdot \frac{c}{-2}\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\


\end{array}
\end{array}
Derivation
  1. Initial program 64.7%

    \[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. add-cbrt-cube48.7%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt[3]{\left(\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\right) \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}}\\ \end{array} \]
    2. pow1/338.1%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;{\left(\left(\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\right) \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\right)}^{0.3333333333333333}\\ \end{array} \]
  4. Applied egg-rr32.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;{\left({\left(\frac{b + \sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -4\right)\right)}}{-2 \cdot a}\right)}^{3}\right)}^{0.3333333333333333}\\ \end{array} \]
  5. Taylor expanded in b around inf 65.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \frac{b \cdot \sqrt[3]{-0.125}}{a}\\ \end{array} \]
  6. Step-by-step derivation
    1. associate-/l*65.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)}\\ \end{array} \]
  7. Simplified65.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
  8. Taylor expanded in b around inf 65.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{-2 \cdot b}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
  9. Step-by-step derivation
    1. *-commutative65.1%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{b \cdot -2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
  10. Simplified65.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{b \cdot -2}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
  11. Step-by-step derivation
    1. times-frac65.8%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{2}{b} \cdot \frac{c}{-2}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
  12. Applied egg-rr65.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{2}{b} \cdot \frac{c}{-2}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
  13. Add Preprocessing

Alternative 10: 35.8% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \left(\frac{-4}{a} \cdot \frac{b}{c \cdot -4}\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (>= b 0.0)
   (* c (* (/ -4.0 a) (/ b (* c -4.0))))
   (* 2.0 (* b (/ (cbrt -0.125) a)))))
double code(double a, double b, double c) {
	double tmp;
	if (b >= 0.0) {
		tmp = c * ((-4.0 / a) * (b / (c * -4.0)));
	} else {
		tmp = 2.0 * (b * (cbrt(-0.125) / a));
	}
	return tmp;
}
public static double code(double a, double b, double c) {
	double tmp;
	if (b >= 0.0) {
		tmp = c * ((-4.0 / a) * (b / (c * -4.0)));
	} else {
		tmp = 2.0 * (b * (Math.cbrt(-0.125) / a));
	}
	return tmp;
}
function code(a, b, c)
	tmp = 0.0
	if (b >= 0.0)
		tmp = Float64(c * Float64(Float64(-4.0 / a) * Float64(b / Float64(c * -4.0))));
	else
		tmp = Float64(2.0 * Float64(b * Float64(cbrt(-0.125) / a)));
	end
	return tmp
end
code[a_, b_, c_] := If[GreaterEqual[b, 0.0], N[(c * N[(N[(-4.0 / a), $MachinePrecision] * N[(b / N[(c * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(b * N[(N[Power[-0.125, 1/3], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;c \cdot \left(\frac{-4}{a} \cdot \frac{b}{c \cdot -4}\right)\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\


\end{array}
\end{array}
Derivation
  1. Initial program 64.7%

    \[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. add-cbrt-cube48.7%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt[3]{\left(\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\right) \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}}\\ \end{array} \]
    2. pow1/338.1%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;{\left(\left(\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\right) \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\right)}^{0.3333333333333333}\\ \end{array} \]
  4. Applied egg-rr32.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;{\left({\left(\frac{b + \sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -4\right)\right)}}{-2 \cdot a}\right)}^{3}\right)}^{0.3333333333333333}\\ \end{array} \]
  5. Taylor expanded in b around inf 65.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \frac{b \cdot \sqrt[3]{-0.125}}{a}\\ \end{array} \]
  6. Step-by-step derivation
    1. associate-/l*65.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)}\\ \end{array} \]
  7. Simplified65.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
  8. Step-by-step derivation
    1. associate-/l*65.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{2 \cdot \frac{c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    2. add-sqr-sqrt35.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;2 \cdot \frac{c}{\color{blue}{\sqrt{-b} \cdot \sqrt{-b}} - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    3. sqrt-unprod45.8%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;2 \cdot \frac{c}{\color{blue}{\sqrt{\left(-b\right) \cdot \left(-b\right)}} - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    4. sqr-neg45.8%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;2 \cdot \frac{c}{\sqrt{\color{blue}{b \cdot b}} - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    5. sqrt-prod52.1%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;2 \cdot \frac{c}{\color{blue}{\sqrt{b} \cdot \sqrt{b}} - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    6. add-sqr-sqrt51.4%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;2 \cdot \frac{c}{\color{blue}{b} - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    7. pow251.4%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;2 \cdot \frac{c}{b - \sqrt{\color{blue}{{b}^{2}} - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    8. *-commutative51.4%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;2 \cdot \frac{c}{b - \sqrt{{b}^{2} - \color{blue}{c \cdot \left(4 \cdot a\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    9. *-commutative51.4%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;2 \cdot \frac{c}{b - \sqrt{{b}^{2} - c \cdot \color{blue}{\left(a \cdot 4\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
  9. Applied egg-rr51.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{2 \cdot \frac{c}{b - \sqrt{{b}^{2} - c \cdot \left(a \cdot 4\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
  10. Step-by-step derivation
    1. associate-*r/51.4%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{2 \cdot c}{b - \sqrt{{b}^{2} - c \cdot \left(a \cdot 4\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    2. *-commutative51.4%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\color{blue}{c \cdot 2}}{b - \sqrt{{b}^{2} - c \cdot \left(a \cdot 4\right)}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    3. associate-*r/51.4%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{c \cdot \frac{2}{b - \sqrt{{b}^{2} - c \cdot \left(a \cdot 4\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    4. associate-*r*51.4%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{{b}^{2} - \color{blue}{\left(c \cdot a\right) \cdot 4}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    5. *-commutative51.4%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{{b}^{2} - \color{blue}{\left(a \cdot c\right)} \cdot 4}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    6. *-commutative51.4%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{{b}^{2} - \color{blue}{4 \cdot \left(a \cdot c\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    7. *-commutative51.4%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{{b}^{2} - \color{blue}{\left(a \cdot c\right) \cdot 4}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    8. *-commutative51.4%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{{b}^{2} - \color{blue}{\left(c \cdot a\right)} \cdot 4}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    9. associate-*r*51.4%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{{b}^{2} - \color{blue}{c \cdot \left(a \cdot 4\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    10. sub-neg51.4%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{\color{blue}{{b}^{2} + \left(-c \cdot \left(a \cdot 4\right)\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    11. unpow251.4%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{\color{blue}{b \cdot b} + \left(-c \cdot \left(a \cdot 4\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    12. rem-square-sqrt49.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{b \cdot b + \color{blue}{\sqrt{-c \cdot \left(a \cdot 4\right)} \cdot \sqrt{-c \cdot \left(a \cdot 4\right)}}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    13. distribute-rgt-neg-in49.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{b \cdot b + \sqrt{\color{blue}{c \cdot \left(-a \cdot 4\right)}} \cdot \sqrt{-c \cdot \left(a \cdot 4\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    14. distribute-rgt-neg-in49.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{b \cdot b + \sqrt{c \cdot \color{blue}{\left(a \cdot \left(-4\right)\right)}} \cdot \sqrt{-c \cdot \left(a \cdot 4\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    15. metadata-eval49.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{b \cdot b + \sqrt{c \cdot \left(a \cdot \color{blue}{-4}\right)} \cdot \sqrt{-c \cdot \left(a \cdot 4\right)}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    16. distribute-rgt-neg-in49.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{b - \sqrt{b \cdot b + \sqrt{c \cdot \left(a \cdot -4\right)} \cdot \sqrt{\color{blue}{c \cdot \left(-a \cdot 4\right)}}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
  11. Simplified45.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{c \cdot \frac{2}{b - \mathsf{hypot}\left(b, \sqrt{c \cdot \left(a \cdot -4\right)}\right)}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
  12. Taylor expanded in b around inf 35.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \color{blue}{\left(-4 \cdot \frac{b}{a \cdot \left(c \cdot {\left(\sqrt{-4}\right)}^{2}\right)}\right)}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
  13. Step-by-step derivation
    1. associate-*r/35.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \color{blue}{\frac{-4 \cdot b}{a \cdot \left(c \cdot {\left(\sqrt{-4}\right)}^{2}\right)}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    2. rem-square-sqrt35.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{\color{blue}{\left(\sqrt{-4} \cdot \sqrt{-4}\right)} \cdot b}{a \cdot \left(c \cdot {\left(\sqrt{-4}\right)}^{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    3. unpow235.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{\color{blue}{{\left(\sqrt{-4}\right)}^{2}} \cdot b}{a \cdot \left(c \cdot {\left(\sqrt{-4}\right)}^{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    4. times-frac35.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \color{blue}{\left(\frac{{\left(\sqrt{-4}\right)}^{2}}{a} \cdot \frac{b}{c \cdot {\left(\sqrt{-4}\right)}^{2}}\right)}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    5. unpow235.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \left(\frac{\color{blue}{\sqrt{-4} \cdot \sqrt{-4}}}{a} \cdot \frac{b}{c \cdot {\left(\sqrt{-4}\right)}^{2}}\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    6. rem-square-sqrt35.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \left(\frac{\color{blue}{-4}}{a} \cdot \frac{b}{c \cdot {\left(\sqrt{-4}\right)}^{2}}\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    7. unpow235.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \left(\frac{-4}{a} \cdot \frac{b}{c \cdot \color{blue}{\left(\sqrt{-4} \cdot \sqrt{-4}\right)}}\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
    8. rem-square-sqrt37.0%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \left(\frac{-4}{a} \cdot \frac{b}{c \cdot \color{blue}{-4}}\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
  14. Simplified37.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \color{blue}{\left(\frac{-4}{a} \cdot \frac{b}{c \cdot -4}\right)}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(b \cdot \frac{\sqrt[3]{-0.125}}{a}\right)\\ \end{array} \]
  15. Add Preprocessing

Reproduce

?
herbie shell --seed 2024148 
(FPCore (a b c)
  :name "jeff quadratic root 2"
  :precision binary64
  (if (>= b 0.0) (/ (* 2.0 c) (- (- b) (sqrt (- (* b b) (* (* 4.0 a) c))))) (/ (+ (- b) (sqrt (- (* b b) (* (* 4.0 a) c)))) (* 2.0 a))))