jeff quadratic root 2

Percentage Accurate: 72.0% → 89.1%
Time: 22.8s
Alternatives: 7
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 7 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: 72.0% 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: 89.1% accurate, 1.0× 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}\\ \mathbf{if}\;b \leq -6.8 \cdot 10^{+31}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} - \frac{b}{a}\\ \end{array}\\ \mathbf{elif}\;b \leq 2.7 \cdot 10^{+48}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \left(\frac{t_0}{a} - \frac{b}{a}\right)\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;\frac{-c}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{-b}{a}\\ \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))))
   (if (<= b -6.8e+31)
     (if (>= b 0.0) t_1 (- (/ c b) (/ b a)))
     (if (<= b 2.7e+48)
       (if (>= b 0.0) t_1 (* 0.5 (- (/ t_0 a) (/ b a))))
       (if (>= b 0.0) (/ (- c) b) (/ (- b) a))))))
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 tmp_1;
	if (b <= -6.8e+31) {
		double tmp_2;
		if (b >= 0.0) {
			tmp_2 = t_1;
		} else {
			tmp_2 = (c / b) - (b / a);
		}
		tmp_1 = tmp_2;
	} else if (b <= 2.7e+48) {
		double tmp_3;
		if (b >= 0.0) {
			tmp_3 = t_1;
		} else {
			tmp_3 = 0.5 * ((t_0 / a) - (b / a));
		}
		tmp_1 = tmp_3;
	} else if (b >= 0.0) {
		tmp_1 = -c / b;
	} else {
		tmp_1 = -b / a;
	}
	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) :: 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)
    if (b <= (-6.8d+31)) then
        if (b >= 0.0d0) then
            tmp_2 = t_1
        else
            tmp_2 = (c / b) - (b / a)
        end if
        tmp_1 = tmp_2
    else if (b <= 2.7d+48) then
        if (b >= 0.0d0) then
            tmp_3 = t_1
        else
            tmp_3 = 0.5d0 * ((t_0 / a) - (b / a))
        end if
        tmp_1 = tmp_3
    else if (b >= 0.0d0) then
        tmp_1 = -c / b
    else
        tmp_1 = -b / a
    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 tmp_1;
	if (b <= -6.8e+31) {
		double tmp_2;
		if (b >= 0.0) {
			tmp_2 = t_1;
		} else {
			tmp_2 = (c / b) - (b / a);
		}
		tmp_1 = tmp_2;
	} else if (b <= 2.7e+48) {
		double tmp_3;
		if (b >= 0.0) {
			tmp_3 = t_1;
		} else {
			tmp_3 = 0.5 * ((t_0 / a) - (b / a));
		}
		tmp_1 = tmp_3;
	} else if (b >= 0.0) {
		tmp_1 = -c / b;
	} else {
		tmp_1 = -b / a;
	}
	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)
	tmp_1 = 0
	if b <= -6.8e+31:
		tmp_2 = 0
		if b >= 0.0:
			tmp_2 = t_1
		else:
			tmp_2 = (c / b) - (b / a)
		tmp_1 = tmp_2
	elif b <= 2.7e+48:
		tmp_3 = 0
		if b >= 0.0:
			tmp_3 = t_1
		else:
			tmp_3 = 0.5 * ((t_0 / a) - (b / a))
		tmp_1 = tmp_3
	elif b >= 0.0:
		tmp_1 = -c / b
	else:
		tmp_1 = -b / a
	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))
	tmp_1 = 0.0
	if (b <= -6.8e+31)
		tmp_2 = 0.0
		if (b >= 0.0)
			tmp_2 = t_1;
		else
			tmp_2 = Float64(Float64(c / b) - Float64(b / a));
		end
		tmp_1 = tmp_2;
	elseif (b <= 2.7e+48)
		tmp_3 = 0.0
		if (b >= 0.0)
			tmp_3 = t_1;
		else
			tmp_3 = Float64(0.5 * Float64(Float64(t_0 / a) - Float64(b / a)));
		end
		tmp_1 = tmp_3;
	elseif (b >= 0.0)
		tmp_1 = Float64(Float64(-c) / b);
	else
		tmp_1 = Float64(Float64(-b) / a);
	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);
	tmp_2 = 0.0;
	if (b <= -6.8e+31)
		tmp_3 = 0.0;
		if (b >= 0.0)
			tmp_3 = t_1;
		else
			tmp_3 = (c / b) - (b / a);
		end
		tmp_2 = tmp_3;
	elseif (b <= 2.7e+48)
		tmp_4 = 0.0;
		if (b >= 0.0)
			tmp_4 = t_1;
		else
			tmp_4 = 0.5 * ((t_0 / a) - (b / a));
		end
		tmp_2 = tmp_4;
	elseif (b >= 0.0)
		tmp_2 = -c / b;
	else
		tmp_2 = -b / a;
	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]}, If[LessEqual[b, -6.8e+31], If[GreaterEqual[b, 0.0], t$95$1, N[(N[(c / b), $MachinePrecision] - N[(b / a), $MachinePrecision]), $MachinePrecision]], If[LessEqual[b, 2.7e+48], If[GreaterEqual[b, 0.0], t$95$1, N[(0.5 * N[(N[(t$95$0 / a), $MachinePrecision] - N[(b / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], If[GreaterEqual[b, 0.0], N[((-c) / b), $MachinePrecision], N[((-b) / a), $MachinePrecision]]]]]]
\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}\\
\mathbf{if}\;b \leq -6.8 \cdot 10^{+31}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;\frac{c}{b} - \frac{b}{a}\\


\end{array}\\

\mathbf{elif}\;b \leq 2.7 \cdot 10^{+48}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;t_1\\

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


\end{array}\\

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

\mathbf{else}:\\
\;\;\;\;\frac{-b}{a}\\


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

    1. Initial program 63.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. Taylor expanded in b around -inf 66.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}:\\ \;\;\;\;-1 \cdot \frac{b}{a} + \left(\frac{c}{b} + \frac{a \cdot {c}^{2}}{{b}^{3}}\right)\\ \end{array} \]
    3. Step-by-step derivation
      1. +-commutative66.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}:\\ \;\;\;\;\left(\frac{c}{b} + \frac{a \cdot {c}^{2}}{{b}^{3}}\right) + -1 \cdot \frac{b}{a}\\ \end{array} \]
      2. +-commutative66.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}:\\ \;\;\;\;\left(\frac{a \cdot {c}^{2}}{{b}^{3}} + \frac{c}{b}\right) + -1 \cdot \frac{b}{a}\\ \end{array} \]
      3. associate-+l+66.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}:\\ \;\;\;\;\frac{a \cdot {c}^{2}}{{b}^{3}} + \left(\frac{c}{b} + -1 \cdot \frac{b}{a}\right)\\ \end{array} \]
      4. associate-/l*71.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}:\\ \;\;\;\;\frac{a}{\frac{{b}^{3}}{{c}^{2}}} + \left(\frac{c}{b} + -1 \cdot \frac{b}{a}\right)\\ \end{array} \]
      5. unpow271.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}:\\ \;\;\;\;\frac{a}{\frac{{b}^{3}}{c \cdot c}} + \left(\frac{c}{b} + -1 \cdot \frac{b}{a}\right)\\ \end{array} \]
      6. mul-1-neg71.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}:\\ \;\;\;\;\frac{a}{\frac{{b}^{3}}{c \cdot c}} + \color{blue}{\left(\frac{c}{b} + \left(-\frac{b}{a}\right)\right)}\\ \end{array} \]
      7. unsub-neg71.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}:\\ \;\;\;\;\color{blue}{\frac{a}{\frac{{b}^{3}}{c \cdot c}} + \left(\frac{c}{b} - \frac{b}{a}\right)}\\ \end{array} \]
    4. Simplified71.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}:\\ \;\;\;\;\frac{a}{\frac{{b}^{3}}{c \cdot c}} + \left(\frac{c}{b} - \frac{b}{a}\right)\\ \end{array} \]
    5. Taylor expanded in a around 0 93.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}:\\ \;\;\;\;-1 \cdot \frac{b}{a} + \frac{c}{b}\\ \end{array} \]
    6. Step-by-step derivation
      1. +-commutative93.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{c}{b} + -1 \cdot \frac{b}{a}\\ \end{array} \]
      2. mul-1-neg93.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}{\frac{c}{b} + \left(-\frac{b}{a}\right)}\\ \end{array} \]
      3. sub-neg93.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{c}{b} - \frac{b}{a}\\ \end{array} \]
    7. Simplified93.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{c}{b} - \frac{b}{a}\\ \end{array} \]

    if -6.7999999999999996e31 < b < 2.70000000000000004e48

    1. Initial program 87.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. Step-by-step derivation
      1. add-cbrt-cube77.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}:\\ \;\;\;\;\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. pow377.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}:\\ \;\;\;\;\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. pow1/277.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}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt[3]{{\left({\left(b \cdot b - \left(4 \cdot a\right) \cdot c\right)}^{0.5}\right)}^{3}}}{2 \cdot a}\\ \end{array} \]
      4. pow-pow77.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}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt[3]{{\left(b \cdot b - \left(4 \cdot a\right) \cdot c\right)}^{\left(0.5 \cdot 3\right)}}}{2 \cdot a}\\ \end{array} \]
      5. *-commutative77.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}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt[3]{{\left(b \cdot b - c \cdot \left(4 \cdot a\right)\right)}^{\left(0.5 \cdot 3\right)}}}{2 \cdot a}\\ \end{array} \]
      6. *-commutative77.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}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt[3]{{\left(b \cdot b - c \cdot \left(a \cdot 4\right)\right)}^{\left(0.5 \cdot 3\right)}}}{2 \cdot a}\\ \end{array} \]
      7. metadata-eval77.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}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt[3]{{\left(b \cdot b - c \cdot \left(a \cdot 4\right)\right)}^{1.5}}}{2 \cdot a}\\ \end{array} \]
    3. Applied egg-rr77.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}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt[3]{{\left(b \cdot b - c \cdot \left(a \cdot 4\right)\right)}^{1.5}}}{2 \cdot a}\\ \end{array} \]
    4. Step-by-step derivation
      1. *-un-lft-identity77.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}:\\ \;\;\;\;\frac{1 \cdot \left(\left(-b\right) + \sqrt[3]{{\left(b \cdot b - c \cdot \left(a \cdot 4\right)\right)}^{1.5}}\right)}{2 \cdot a}\\ \end{array} \]
      2. +-commutative77.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}:\\ \;\;\;\;\frac{1 \cdot \left(\sqrt[3]{{\left(b \cdot b - c \cdot \left(a \cdot 4\right)\right)}^{1.5}} + \left(-b\right)\right)}{2 \cdot a}\\ \end{array} \]
    5. Applied egg-rr77.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}:\\ \;\;\;\;\frac{1 \cdot \left(\sqrt[3]{{\left(b \cdot b - c \cdot \left(a \cdot 4\right)\right)}^{1.5}} + \left(-b\right)\right)}{2 \cdot a}\\ \end{array} \]
    6. Step-by-step derivation
      1. *-lft-identity77.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}:\\ \;\;\;\;\frac{\sqrt[3]{{\left(b \cdot b - c \cdot \left(a \cdot 4\right)\right)}^{1.5}} + \left(-b\right)}{2 \cdot a}\\ \end{array} \]
      2. unsub-neg77.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}:\\ \;\;\;\;\frac{\sqrt[3]{{\left(b \cdot b - c \cdot \left(a \cdot 4\right)\right)}^{1.5}} - b}{2 \cdot a}\\ \end{array} \]
    7. Simplified77.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}:\\ \;\;\;\;\frac{\sqrt[3]{{\left(b \cdot b - c \cdot \left(a \cdot 4\right)\right)}^{1.5}} - b}{2 \cdot a}\\ \end{array} \]
    8. Step-by-step derivation
      1. div-sub77.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}:\\ \;\;\;\;\frac{\sqrt[3]{{\left(b \cdot b - c \cdot \left(a \cdot 4\right)\right)}^{1.5}}}{2 \cdot a} - \frac{b}{2 \cdot a}\\ \end{array} \]
      2. sub-neg77.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}:\\ \;\;\;\;\frac{\sqrt[3]{{\left(b \cdot b - c \cdot \left(a \cdot 4\right)\right)}^{1.5}}}{2 \cdot a} + \left(-\frac{b}{2 \cdot a}\right)\\ \end{array} \]
      3. pow1/374.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}:\\ \;\;\;\;\frac{{\left({\left(b \cdot b - c \cdot \left(a \cdot 4\right)\right)}^{1.5}\right)}^{0.3333333333333333}}{2 \cdot a} + \left(-\frac{b}{2 \cdot a}\right)\\ \end{array} \]
      4. pow-pow87.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}:\\ \;\;\;\;\frac{{\left(b \cdot b - c \cdot \left(a \cdot 4\right)\right)}^{\left(1.5 \cdot 0.3333333333333333\right)}}{2 \cdot a} + \left(-\frac{b}{2 \cdot a}\right)\\ \end{array} \]
      5. metadata-eval87.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}:\\ \;\;\;\;\frac{{\left(b \cdot b - c \cdot \left(a \cdot 4\right)\right)}^{0.5}}{2 \cdot a} + \left(-\frac{b}{2 \cdot a}\right)\\ \end{array} \]
      6. pow1/287.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}:\\ \;\;\;\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{2 \cdot a} + \left(-\frac{b}{2 \cdot a}\right)\\ \end{array} \]
      7. *-un-lft-identity87.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}:\\ \;\;\;\;\frac{1 \cdot \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{2 \cdot a} + \left(-\frac{b}{2 \cdot a}\right)\\ \end{array} \]
      8. times-frac87.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}:\\ \;\;\;\;\frac{1}{2} \cdot \frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{a} + \left(-\frac{b}{2 \cdot a}\right)\\ \end{array} \]
      9. metadata-eval87.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}:\\ \;\;\;\;0.5 \cdot \frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{a} + \left(-\frac{b}{2 \cdot a}\right)\\ \end{array} \]
      10. add-sqr-sqrt39.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}{0.5} \cdot \frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{a} + \left(-\frac{\sqrt{b} \cdot \sqrt{b}}{2 \cdot a}\right)\\ \end{array} \]
      11. sqrt-prod72.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}{0.5} \cdot \frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{a} + \left(-\frac{\sqrt{b \cdot b}}{2 \cdot a}\right)\\ \end{array} \]
      12. *-un-lft-identity72.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}:\\ \;\;\;\;0.5 \cdot \frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{a} + \left(-\frac{\sqrt{1 \cdot \left(b \cdot b\right)}}{2 \cdot a}\right)\\ \end{array} \]
      13. metadata-eval72.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}:\\ \;\;\;\;0.5 \cdot \frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{a} + \left(-\frac{\sqrt{{-1}^{2} \cdot \left(b \cdot b\right)}}{2 \cdot a}\right)\\ \end{array} \]
      14. pow272.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}:\\ \;\;\;\;0.5 \cdot \frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{a} + \left(-\frac{\sqrt{{-1}^{2} \cdot {b}^{2}}}{2 \cdot a}\right)\\ \end{array} \]
      15. unpow-prod-down72.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}:\\ \;\;\;\;0.5 \cdot \frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{a} + \left(-\frac{\sqrt{{\left(-1 \cdot b\right)}^{2}}}{2 \cdot a}\right)\\ \end{array} \]
      16. neg-mul-172.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}:\\ \;\;\;\;0.5 \cdot \frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{a} + \left(-\frac{\sqrt{{\left(-b\right)}^{2}}}{2 \cdot a}\right)\\ \end{array} \]
      17. unpow272.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}:\\ \;\;\;\;0.5 \cdot \frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{a} + \left(-\frac{\sqrt{\left(-b\right) \cdot \left(-b\right)}}{2 \cdot a}\right)\\ \end{array} \]
      18. sqrt-prod72.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}{0.5} \cdot \frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{a} + \left(-\frac{\sqrt{-b} \cdot \sqrt{-b}}{2 \cdot a}\right)\\ \end{array} \]
      19. add-sqr-sqrt72.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}{0.5} \cdot \frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{a} + \left(-\frac{-b}{2 \cdot a}\right)\\ \end{array} \]
    9. Applied egg-rr87.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}:\\ \;\;\;\;0.5 \cdot \frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{a} + \left(-0.5 \cdot \frac{b}{a}\right)\\ \end{array} \]
    10. Step-by-step derivation
      1. sub-neg87.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}:\\ \;\;\;\;0.5 \cdot \frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{a} - 0.5 \cdot \frac{b}{a}\\ \end{array} \]
      2. distribute-lft-out--87.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}:\\ \;\;\;\;0.5 \cdot \left(\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{a} - \frac{b}{a}\right)\\ \end{array} \]
    11. Simplified87.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}:\\ \;\;\;\;0.5 \cdot \left(\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{a} - \frac{b}{a}\right)\\ \end{array} \]

    if 2.70000000000000004e48 < b

    1. Initial program 64.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. Taylor expanded in b around -inf 64.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}:\\ \;\;\;\;-1 \cdot \frac{b}{a} + \left(\frac{c}{b} + \frac{a \cdot {c}^{2}}{{b}^{3}}\right)\\ \end{array} \]
    3. Step-by-step derivation
      1. +-commutative64.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(\frac{c}{b} + \frac{a \cdot {c}^{2}}{{b}^{3}}\right) + -1 \cdot \frac{b}{a}\\ \end{array} \]
      2. +-commutative64.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(\frac{a \cdot {c}^{2}}{{b}^{3}} + \frac{c}{b}\right) + -1 \cdot \frac{b}{a}\\ \end{array} \]
      3. associate-+l+64.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{a \cdot {c}^{2}}{{b}^{3}} + \left(\frac{c}{b} + -1 \cdot \frac{b}{a}\right)\\ \end{array} \]
      4. associate-/l*64.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{a}{\frac{{b}^{3}}{{c}^{2}}} + \left(\frac{c}{b} + -1 \cdot \frac{b}{a}\right)\\ \end{array} \]
      5. unpow264.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{a}{\frac{{b}^{3}}{c \cdot c}} + \left(\frac{c}{b} + -1 \cdot \frac{b}{a}\right)\\ \end{array} \]
      6. mul-1-neg64.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{a}{\frac{{b}^{3}}{c \cdot c}} + \color{blue}{\left(\frac{c}{b} + \left(-\frac{b}{a}\right)\right)}\\ \end{array} \]
      7. unsub-neg64.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}{\frac{a}{\frac{{b}^{3}}{c \cdot c}} + \left(\frac{c}{b} - \frac{b}{a}\right)}\\ \end{array} \]
    4. Simplified64.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{a}{\frac{{b}^{3}}{c \cdot c}} + \left(\frac{c}{b} - \frac{b}{a}\right)\\ \end{array} \]
    5. Taylor expanded in a around 0 64.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}:\\ \;\;\;\;-1 \cdot \frac{b}{a}\\ \end{array} \]
    6. Step-by-step derivation
      1. associate-*r/64.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{-1 \cdot b}{a}\\ \end{array} \]
      2. neg-mul-164.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{-b}{a}\\ \end{array} \]
    7. Simplified64.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{-b}{a}\\ \end{array} \]
    8. Taylor expanded in c around 0 97.1%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{-1 \cdot \frac{c}{b}}\\ \mathbf{else}:\\ \;\;\;\;\frac{-b}{a}\\ \end{array} \]
    9. Step-by-step derivation
      1. associate-*r/97.1%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{-1 \cdot c}{b}}\\ \mathbf{else}:\\ \;\;\;\;\frac{-b}{a}\\ \end{array} \]
      2. mul-1-neg97.1%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\color{blue}{-c}}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{-b}{a}\\ \end{array} \]
    10. Simplified97.1%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{-c}{b}}\\ \mathbf{else}:\\ \;\;\;\;\frac{-b}{a}\\ \end{array} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification91.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -6.8 \cdot 10^{+31}:\\ \;\;\;\;\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{c}{b} - \frac{b}{a}\\ \end{array}\\ \mathbf{elif}\;b \leq 2.7 \cdot 10^{+48}:\\ \;\;\;\;\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}:\\ \;\;\;\;0.5 \cdot \left(\frac{\sqrt{b \cdot b - c \cdot \left(4 \cdot a\right)}}{a} - \frac{b}{a}\right)\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;\frac{-c}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{-b}{a}\\ \end{array} \]

Alternative 2: 85.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt{b \cdot b - c \cdot \left(4 \cdot a\right)}\\ t_1 := \frac{-b}{a}\\ t_2 := \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{-c}{b}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array}\\ \mathbf{if}\;b \leq -1 \cdot 10^{+110}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq -2.25 \cdot 10^{-306}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{b \cdot \left(-2\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{t_0 - b}{2 \cdot a}\\ \end{array}\\ \mathbf{elif}\;b \leq 3.2 \cdot 10^{-34}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{b - t_0}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array}\\ \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 (/ (- b) a))
        (t_2 (if (>= b 0.0) (/ (- c) b) t_1)))
   (if (<= b -1e+110)
     t_2
     (if (<= b -2.25e-306)
       (if (>= b 0.0) (/ (* 2.0 c) (* b (- 2.0))) (/ (- t_0 b) (* 2.0 a)))
       (if (<= b 3.2e-34) (if (>= b 0.0) (/ (* 2.0 c) (- b t_0)) t_1) t_2)))))
double code(double a, double b, double c) {
	double t_0 = sqrt(((b * b) - (c * (4.0 * a))));
	double t_1 = -b / a;
	double tmp;
	if (b >= 0.0) {
		tmp = -c / b;
	} else {
		tmp = t_1;
	}
	double t_2 = tmp;
	double tmp_1;
	if (b <= -1e+110) {
		tmp_1 = t_2;
	} else if (b <= -2.25e-306) {
		double tmp_2;
		if (b >= 0.0) {
			tmp_2 = (2.0 * c) / (b * -2.0);
		} else {
			tmp_2 = (t_0 - b) / (2.0 * a);
		}
		tmp_1 = tmp_2;
	} else if (b <= 3.2e-34) {
		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 {
		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 = -b / a
    if (b >= 0.0d0) then
        tmp = -c / b
    else
        tmp = t_1
    end if
    t_2 = tmp
    if (b <= (-1d+110)) then
        tmp_1 = t_2
    else if (b <= (-2.25d-306)) then
        if (b >= 0.0d0) then
            tmp_2 = (2.0d0 * c) / (b * -2.0d0)
        else
            tmp_2 = (t_0 - b) / (2.0d0 * a)
        end if
        tmp_1 = tmp_2
    else if (b <= 3.2d-34) then
        if (b >= 0.0d0) then
            tmp_3 = (2.0d0 * c) / (b - t_0)
        else
            tmp_3 = t_1
        end if
        tmp_1 = tmp_3
    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 = -b / a;
	double tmp;
	if (b >= 0.0) {
		tmp = -c / b;
	} else {
		tmp = t_1;
	}
	double t_2 = tmp;
	double tmp_1;
	if (b <= -1e+110) {
		tmp_1 = t_2;
	} else if (b <= -2.25e-306) {
		double tmp_2;
		if (b >= 0.0) {
			tmp_2 = (2.0 * c) / (b * -2.0);
		} else {
			tmp_2 = (t_0 - b) / (2.0 * a);
		}
		tmp_1 = tmp_2;
	} else if (b <= 3.2e-34) {
		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 {
		tmp_1 = t_2;
	}
	return tmp_1;
}
def code(a, b, c):
	t_0 = math.sqrt(((b * b) - (c * (4.0 * a))))
	t_1 = -b / a
	tmp = 0
	if b >= 0.0:
		tmp = -c / b
	else:
		tmp = t_1
	t_2 = tmp
	tmp_1 = 0
	if b <= -1e+110:
		tmp_1 = t_2
	elif b <= -2.25e-306:
		tmp_2 = 0
		if b >= 0.0:
			tmp_2 = (2.0 * c) / (b * -2.0)
		else:
			tmp_2 = (t_0 - b) / (2.0 * a)
		tmp_1 = tmp_2
	elif b <= 3.2e-34:
		tmp_3 = 0
		if b >= 0.0:
			tmp_3 = (2.0 * c) / (b - t_0)
		else:
			tmp_3 = t_1
		tmp_1 = tmp_3
	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(-b) / a)
	tmp = 0.0
	if (b >= 0.0)
		tmp = Float64(Float64(-c) / b);
	else
		tmp = t_1;
	end
	t_2 = tmp
	tmp_1 = 0.0
	if (b <= -1e+110)
		tmp_1 = t_2;
	elseif (b <= -2.25e-306)
		tmp_2 = 0.0
		if (b >= 0.0)
			tmp_2 = Float64(Float64(2.0 * c) / Float64(b * Float64(-2.0)));
		else
			tmp_2 = Float64(Float64(t_0 - b) / Float64(2.0 * a));
		end
		tmp_1 = tmp_2;
	elseif (b <= 3.2e-34)
		tmp_3 = 0.0
		if (b >= 0.0)
			tmp_3 = Float64(Float64(2.0 * c) / Float64(b - t_0));
		else
			tmp_3 = t_1;
		end
		tmp_1 = tmp_3;
	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 = -b / a;
	tmp = 0.0;
	if (b >= 0.0)
		tmp = -c / b;
	else
		tmp = t_1;
	end
	t_2 = tmp;
	tmp_2 = 0.0;
	if (b <= -1e+110)
		tmp_2 = t_2;
	elseif (b <= -2.25e-306)
		tmp_3 = 0.0;
		if (b >= 0.0)
			tmp_3 = (2.0 * c) / (b * -2.0);
		else
			tmp_3 = (t_0 - b) / (2.0 * a);
		end
		tmp_2 = tmp_3;
	elseif (b <= 3.2e-34)
		tmp_4 = 0.0;
		if (b >= 0.0)
			tmp_4 = (2.0 * c) / (b - t_0);
		else
			tmp_4 = t_1;
		end
		tmp_2 = tmp_4;
	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[((-b) / a), $MachinePrecision]}, Block[{t$95$2 = If[GreaterEqual[b, 0.0], N[((-c) / b), $MachinePrecision], t$95$1]}, If[LessEqual[b, -1e+110], t$95$2, If[LessEqual[b, -2.25e-306], If[GreaterEqual[b, 0.0], N[(N[(2.0 * c), $MachinePrecision] / N[(b * (-2.0)), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$0 - b), $MachinePrecision] / N[(2.0 * a), $MachinePrecision]), $MachinePrecision]], If[LessEqual[b, 3.2e-34], If[GreaterEqual[b, 0.0], N[(N[(2.0 * c), $MachinePrecision] / N[(b - t$95$0), $MachinePrecision]), $MachinePrecision], t$95$1], 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{-b}{a}\\
t_2 := \begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\frac{-c}{b}\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}\\
\mathbf{if}\;b \leq -1 \cdot 10^{+110}:\\
\;\;\;\;t_2\\

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

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


\end{array}\\

\mathbf{elif}\;b \leq 3.2 \cdot 10^{-34}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\frac{2 \cdot c}{b - t_0}\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -1e110 or 3.20000000000000003e-34 < b

    1. Initial program 64.1%

      \[\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. Taylor expanded in b around -inf 66.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}:\\ \;\;\;\;-1 \cdot \frac{b}{a} + \left(\frac{c}{b} + \frac{a \cdot {c}^{2}}{{b}^{3}}\right)\\ \end{array} \]
    3. Step-by-step derivation
      1. +-commutative66.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(\frac{c}{b} + \frac{a \cdot {c}^{2}}{{b}^{3}}\right) + -1 \cdot \frac{b}{a}\\ \end{array} \]
      2. +-commutative66.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(\frac{a \cdot {c}^{2}}{{b}^{3}} + \frac{c}{b}\right) + -1 \cdot \frac{b}{a}\\ \end{array} \]
      3. associate-+l+66.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}:\\ \;\;\;\;\frac{a \cdot {c}^{2}}{{b}^{3}} + \left(\frac{c}{b} + -1 \cdot \frac{b}{a}\right)\\ \end{array} \]
      4. associate-/l*69.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}:\\ \;\;\;\;\frac{a}{\frac{{b}^{3}}{{c}^{2}}} + \left(\frac{c}{b} + -1 \cdot \frac{b}{a}\right)\\ \end{array} \]
      5. unpow269.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}:\\ \;\;\;\;\frac{a}{\frac{{b}^{3}}{c \cdot c}} + \left(\frac{c}{b} + -1 \cdot \frac{b}{a}\right)\\ \end{array} \]
      6. mul-1-neg69.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}:\\ \;\;\;\;\frac{a}{\frac{{b}^{3}}{c \cdot c}} + \color{blue}{\left(\frac{c}{b} + \left(-\frac{b}{a}\right)\right)}\\ \end{array} \]
      7. unsub-neg69.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}:\\ \;\;\;\;\color{blue}{\frac{a}{\frac{{b}^{3}}{c \cdot c}} + \left(\frac{c}{b} - \frac{b}{a}\right)}\\ \end{array} \]
    4. Simplified69.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}:\\ \;\;\;\;\frac{a}{\frac{{b}^{3}}{c \cdot c}} + \left(\frac{c}{b} - \frac{b}{a}\right)\\ \end{array} \]
    5. Taylor expanded in a around 0 79.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}:\\ \;\;\;\;-1 \cdot \frac{b}{a}\\ \end{array} \]
    6. Step-by-step derivation
      1. associate-*r/79.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{-1 \cdot b}{a}\\ \end{array} \]
      2. neg-mul-179.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{-b}{a}\\ \end{array} \]
    7. Simplified79.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{-b}{a}\\ \end{array} \]
    8. Taylor expanded in c around 0 93.1%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{-1 \cdot \frac{c}{b}}\\ \mathbf{else}:\\ \;\;\;\;\frac{-b}{a}\\ \end{array} \]
    9. Step-by-step derivation
      1. associate-*r/93.1%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{-1 \cdot c}{b}}\\ \mathbf{else}:\\ \;\;\;\;\frac{-b}{a}\\ \end{array} \]
      2. mul-1-neg93.1%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\color{blue}{-c}}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{-b}{a}\\ \end{array} \]
    10. Simplified93.1%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{-c}{b}}\\ \mathbf{else}:\\ \;\;\;\;\frac{-b}{a}\\ \end{array} \]

    if -1e110 < b < -2.25000000000000002e-306

    1. Initial program 91.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. Step-by-step derivation
      1. add-sqr-sqrt91.9%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \color{blue}{\sqrt{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}} \cdot \sqrt{\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. pow291.9%

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

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

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

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

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

    if -2.25000000000000002e-306 < b < 3.20000000000000003e-34

    1. Initial program 80.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. Taylor expanded in b around -inf 80.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}:\\ \;\;\;\;-1 \cdot \frac{b}{a} + \left(\frac{c}{b} + \frac{a \cdot {c}^{2}}{{b}^{3}}\right)\\ \end{array} \]
    3. Step-by-step derivation
      1. +-commutative80.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(\frac{c}{b} + \frac{a \cdot {c}^{2}}{{b}^{3}}\right) + -1 \cdot \frac{b}{a}\\ \end{array} \]
      2. +-commutative80.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(\frac{a \cdot {c}^{2}}{{b}^{3}} + \frac{c}{b}\right) + -1 \cdot \frac{b}{a}\\ \end{array} \]
      3. associate-+l+80.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}:\\ \;\;\;\;\frac{a \cdot {c}^{2}}{{b}^{3}} + \left(\frac{c}{b} + -1 \cdot \frac{b}{a}\right)\\ \end{array} \]
      4. associate-/l*80.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}:\\ \;\;\;\;\frac{a}{\frac{{b}^{3}}{{c}^{2}}} + \left(\frac{c}{b} + -1 \cdot \frac{b}{a}\right)\\ \end{array} \]
      5. unpow280.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}:\\ \;\;\;\;\frac{a}{\frac{{b}^{3}}{c \cdot c}} + \left(\frac{c}{b} + -1 \cdot \frac{b}{a}\right)\\ \end{array} \]
      6. mul-1-neg80.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}:\\ \;\;\;\;\frac{a}{\frac{{b}^{3}}{c \cdot c}} + \color{blue}{\left(\frac{c}{b} + \left(-\frac{b}{a}\right)\right)}\\ \end{array} \]
      7. unsub-neg80.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}:\\ \;\;\;\;\color{blue}{\frac{a}{\frac{{b}^{3}}{c \cdot c}} + \left(\frac{c}{b} - \frac{b}{a}\right)}\\ \end{array} \]
    4. Simplified80.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}:\\ \;\;\;\;\frac{a}{\frac{{b}^{3}}{c \cdot c}} + \left(\frac{c}{b} - \frac{b}{a}\right)\\ \end{array} \]
    5. Taylor expanded in a around 0 80.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}:\\ \;\;\;\;-1 \cdot \frac{b}{a}\\ \end{array} \]
    6. Step-by-step derivation
      1. associate-*r/80.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}:\\ \;\;\;\;\frac{-1 \cdot b}{a}\\ \end{array} \]
      2. neg-mul-180.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}:\\ \;\;\;\;\frac{-b}{a}\\ \end{array} \]
    7. Simplified80.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}:\\ \;\;\;\;\frac{-b}{a}\\ \end{array} \]
    8. Step-by-step derivation
      1. expm1-log1p-u64.3%

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;e^{\mathsf{log1p}\left(\frac{c \cdot 2}{\color{blue}{\sqrt{\left(-b\right) \cdot \left(-b\right)}} - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\right)} - 1\\ \mathbf{else}:\\ \;\;\;\;\frac{-b}{a}\\ \end{array} \]
      6. sqr-neg21.1%

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;e^{\mathsf{log1p}\left(\frac{c \cdot 2}{\color{blue}{\sqrt{b} \cdot \sqrt{b}} - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\right)} - 1\\ \mathbf{else}:\\ \;\;\;\;\frac{-b}{a}\\ \end{array} \]
      8. add-sqr-sqrt21.2%

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{e^{\mathsf{log1p}\left(\frac{c \cdot 2}{b - \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}\right)} - 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{-b}{a}\\ \end{array} \]
    10. Step-by-step derivation
      1. expm1-def47.6%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1 \cdot 10^{+110}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{-c}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{-b}{a}\\ \end{array}\\ \mathbf{elif}\;b \leq -2.25 \cdot 10^{-306}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{b \cdot \left(-2\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{b \cdot b - c \cdot \left(4 \cdot a\right)} - b}{2 \cdot a}\\ \end{array}\\ \mathbf{elif}\;b \leq 3.2 \cdot 10^{-34}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{b - \sqrt{b \cdot b - c \cdot \left(4 \cdot a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{-b}{a}\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;\frac{-c}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{-b}{a}\\ \end{array} \]

Alternative 3: 89.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt{b \cdot b - c \cdot \left(4 \cdot a\right)}\\ \mathbf{if}\;b \leq -5 \cdot 10^{+110} \lor \neg \left(b \leq 2.7 \cdot 10^{+48}\right):\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{-c}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{-b}{a}\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - t_0}\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \frac{t_0 - b}{a}\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (let* ((t_0 (sqrt (- (* b b) (* c (* 4.0 a))))))
   (if (or (<= b -5e+110) (not (<= b 2.7e+48)))
     (if (>= b 0.0) (/ (- c) b) (/ (- b) a))
     (if (>= b 0.0) (/ (* 2.0 c) (- (- b) t_0)) (* 0.5 (/ (- t_0 b) a))))))
double code(double a, double b, double c) {
	double t_0 = sqrt(((b * b) - (c * (4.0 * a))));
	double tmp_1;
	if ((b <= -5e+110) || !(b <= 2.7e+48)) {
		double tmp_2;
		if (b >= 0.0) {
			tmp_2 = -c / b;
		} else {
			tmp_2 = -b / a;
		}
		tmp_1 = tmp_2;
	} else if (b >= 0.0) {
		tmp_1 = (2.0 * c) / (-b - t_0);
	} else {
		tmp_1 = 0.5 * ((t_0 - b) / a);
	}
	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) :: tmp
    real(8) :: tmp_1
    real(8) :: tmp_2
    t_0 = sqrt(((b * b) - (c * (4.0d0 * a))))
    if ((b <= (-5d+110)) .or. (.not. (b <= 2.7d+48))) then
        if (b >= 0.0d0) then
            tmp_2 = -c / b
        else
            tmp_2 = -b / a
        end if
        tmp_1 = tmp_2
    else if (b >= 0.0d0) then
        tmp_1 = (2.0d0 * c) / (-b - t_0)
    else
        tmp_1 = 0.5d0 * ((t_0 - b) / a)
    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 tmp_1;
	if ((b <= -5e+110) || !(b <= 2.7e+48)) {
		double tmp_2;
		if (b >= 0.0) {
			tmp_2 = -c / b;
		} else {
			tmp_2 = -b / a;
		}
		tmp_1 = tmp_2;
	} else if (b >= 0.0) {
		tmp_1 = (2.0 * c) / (-b - t_0);
	} else {
		tmp_1 = 0.5 * ((t_0 - b) / a);
	}
	return tmp_1;
}
def code(a, b, c):
	t_0 = math.sqrt(((b * b) - (c * (4.0 * a))))
	tmp_1 = 0
	if (b <= -5e+110) or not (b <= 2.7e+48):
		tmp_2 = 0
		if b >= 0.0:
			tmp_2 = -c / b
		else:
			tmp_2 = -b / a
		tmp_1 = tmp_2
	elif b >= 0.0:
		tmp_1 = (2.0 * c) / (-b - t_0)
	else:
		tmp_1 = 0.5 * ((t_0 - b) / a)
	return tmp_1
function code(a, b, c)
	t_0 = sqrt(Float64(Float64(b * b) - Float64(c * Float64(4.0 * a))))
	tmp_1 = 0.0
	if ((b <= -5e+110) || !(b <= 2.7e+48))
		tmp_2 = 0.0
		if (b >= 0.0)
			tmp_2 = Float64(Float64(-c) / b);
		else
			tmp_2 = Float64(Float64(-b) / a);
		end
		tmp_1 = tmp_2;
	elseif (b >= 0.0)
		tmp_1 = Float64(Float64(2.0 * c) / Float64(Float64(-b) - t_0));
	else
		tmp_1 = Float64(0.5 * Float64(Float64(t_0 - b) / a));
	end
	return tmp_1
end
function tmp_4 = code(a, b, c)
	t_0 = sqrt(((b * b) - (c * (4.0 * a))));
	tmp_2 = 0.0;
	if ((b <= -5e+110) || ~((b <= 2.7e+48)))
		tmp_3 = 0.0;
		if (b >= 0.0)
			tmp_3 = -c / b;
		else
			tmp_3 = -b / a;
		end
		tmp_2 = tmp_3;
	elseif (b >= 0.0)
		tmp_2 = (2.0 * c) / (-b - t_0);
	else
		tmp_2 = 0.5 * ((t_0 - b) / a);
	end
	tmp_4 = 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]}, If[Or[LessEqual[b, -5e+110], N[Not[LessEqual[b, 2.7e+48]], $MachinePrecision]], If[GreaterEqual[b, 0.0], N[((-c) / b), $MachinePrecision], N[((-b) / a), $MachinePrecision]], If[GreaterEqual[b, 0.0], N[(N[(2.0 * c), $MachinePrecision] / N[((-b) - t$95$0), $MachinePrecision]), $MachinePrecision], N[(0.5 * N[(N[(t$95$0 - b), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \sqrt{b \cdot b - c \cdot \left(4 \cdot a\right)}\\
\mathbf{if}\;b \leq -5 \cdot 10^{+110} \lor \neg \left(b \leq 2.7 \cdot 10^{+48}\right):\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\frac{-c}{b}\\

\mathbf{else}:\\
\;\;\;\;\frac{-b}{a}\\


\end{array}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -4.99999999999999978e110 or 2.70000000000000004e48 < b

    1. Initial program 61.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. 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}:\\ \;\;\;\;-1 \cdot \frac{b}{a} + \left(\frac{c}{b} + \frac{a \cdot {c}^{2}}{{b}^{3}}\right)\\ \end{array} \]
    3. Step-by-step derivation
      1. +-commutative64.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(\frac{c}{b} + \frac{a \cdot {c}^{2}}{{b}^{3}}\right) + -1 \cdot \frac{b}{a}\\ \end{array} \]
      2. +-commutative64.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(\frac{a \cdot {c}^{2}}{{b}^{3}} + \frac{c}{b}\right) + -1 \cdot \frac{b}{a}\\ \end{array} \]
      3. 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}:\\ \;\;\;\;\frac{a \cdot {c}^{2}}{{b}^{3}} + \left(\frac{c}{b} + -1 \cdot \frac{b}{a}\right)\\ \end{array} \]
      4. associate-/l*67.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}:\\ \;\;\;\;\frac{a}{\frac{{b}^{3}}{{c}^{2}}} + \left(\frac{c}{b} + -1 \cdot \frac{b}{a}\right)\\ \end{array} \]
      5. unpow267.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}:\\ \;\;\;\;\frac{a}{\frac{{b}^{3}}{c \cdot c}} + \left(\frac{c}{b} + -1 \cdot \frac{b}{a}\right)\\ \end{array} \]
      6. mul-1-neg67.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}:\\ \;\;\;\;\frac{a}{\frac{{b}^{3}}{c \cdot c}} + \color{blue}{\left(\frac{c}{b} + \left(-\frac{b}{a}\right)\right)}\\ \end{array} \]
      7. unsub-neg67.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}{\frac{a}{\frac{{b}^{3}}{c \cdot c}} + \left(\frac{c}{b} - \frac{b}{a}\right)}\\ \end{array} \]
    4. Simplified67.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}:\\ \;\;\;\;\frac{a}{\frac{{b}^{3}}{c \cdot c}} + \left(\frac{c}{b} - \frac{b}{a}\right)\\ \end{array} \]
    5. Taylor expanded in a around 0 79.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}:\\ \;\;\;\;-1 \cdot \frac{b}{a}\\ \end{array} \]
    6. Step-by-step derivation
      1. associate-*r/79.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}:\\ \;\;\;\;\frac{-1 \cdot b}{a}\\ \end{array} \]
      2. neg-mul-179.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}:\\ \;\;\;\;\frac{-b}{a}\\ \end{array} \]
    7. Simplified79.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}:\\ \;\;\;\;\frac{-b}{a}\\ \end{array} \]
    8. Taylor expanded in c around 0 96.9%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{-1 \cdot \frac{c}{b}}\\ \mathbf{else}:\\ \;\;\;\;\frac{-b}{a}\\ \end{array} \]
    9. Step-by-step derivation
      1. associate-*r/96.9%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{-1 \cdot c}{b}}\\ \mathbf{else}:\\ \;\;\;\;\frac{-b}{a}\\ \end{array} \]
      2. mul-1-neg96.9%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\color{blue}{-c}}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{-b}{a}\\ \end{array} \]
    10. Simplified96.9%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{-c}{b}}\\ \mathbf{else}:\\ \;\;\;\;\frac{-b}{a}\\ \end{array} \]

    if -4.99999999999999978e110 < b < 2.70000000000000004e48

    1. Initial program 87.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. Step-by-step derivation
      1. add-cbrt-cube77.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. pow377.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. pow1/277.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({\left(b \cdot b - \left(4 \cdot a\right) \cdot c\right)}^{0.5}\right)}^{3}}}{2 \cdot a}\\ \end{array} \]
      4. pow-pow77.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(0.5 \cdot 3\right)}}}{2 \cdot a}\\ \end{array} \]
      5. *-commutative77.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 - c \cdot \left(4 \cdot a\right)\right)}^{\left(0.5 \cdot 3\right)}}}{2 \cdot a}\\ \end{array} \]
      6. *-commutative77.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 - c \cdot \left(a \cdot 4\right)\right)}^{\left(0.5 \cdot 3\right)}}}{2 \cdot a}\\ \end{array} \]
      7. metadata-eval77.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 - c \cdot \left(a \cdot 4\right)\right)}^{1.5}}}{2 \cdot a}\\ \end{array} \]
    3. Applied egg-rr77.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 - c \cdot \left(a \cdot 4\right)\right)}^{1.5}}}{2 \cdot a}\\ \end{array} \]
    4. Step-by-step derivation
      1. *-un-lft-identity77.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{1 \cdot \left(\left(-b\right) + \sqrt[3]{{\left(b \cdot b - c \cdot \left(a \cdot 4\right)\right)}^{1.5}}\right)}{2 \cdot a}\\ \end{array} \]
      2. +-commutative77.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{1 \cdot \left(\sqrt[3]{{\left(b \cdot b - c \cdot \left(a \cdot 4\right)\right)}^{1.5}} + \left(-b\right)\right)}{2 \cdot a}\\ \end{array} \]
    5. Applied egg-rr77.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{1 \cdot \left(\sqrt[3]{{\left(b \cdot b - c \cdot \left(a \cdot 4\right)\right)}^{1.5}} + \left(-b\right)\right)}{2 \cdot a}\\ \end{array} \]
    6. Step-by-step derivation
      1. *-lft-identity77.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{\sqrt[3]{{\left(b \cdot b - c \cdot \left(a \cdot 4\right)\right)}^{1.5}} + \left(-b\right)}{2 \cdot a}\\ \end{array} \]
      2. unsub-neg77.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{\sqrt[3]{{\left(b \cdot b - c \cdot \left(a \cdot 4\right)\right)}^{1.5}} - b}{2 \cdot a}\\ \end{array} \]
    7. Simplified77.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{\sqrt[3]{{\left(b \cdot b - c \cdot \left(a \cdot 4\right)\right)}^{1.5}} - b}{2 \cdot a}\\ \end{array} \]
    8. Step-by-step derivation
      1. div-sub77.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{\sqrt[3]{{\left(b \cdot b - c \cdot \left(a \cdot 4\right)\right)}^{1.5}}}{2 \cdot a} - \frac{b}{2 \cdot a}\\ \end{array} \]
      2. sub-neg77.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{\sqrt[3]{{\left(b \cdot b - c \cdot \left(a \cdot 4\right)\right)}^{1.5}}}{2 \cdot a} + \left(-\frac{b}{2 \cdot a}\right)\\ \end{array} \]
      3. pow1/374.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({\left(b \cdot b - c \cdot \left(a \cdot 4\right)\right)}^{1.5}\right)}^{0.3333333333333333}}{2 \cdot a} + \left(-\frac{b}{2 \cdot a}\right)\\ \end{array} \]
      4. pow-pow87.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 \cdot b - c \cdot \left(a \cdot 4\right)\right)}^{\left(1.5 \cdot 0.3333333333333333\right)}}{2 \cdot a} + \left(-\frac{b}{2 \cdot a}\right)\\ \end{array} \]
      5. metadata-eval87.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 \cdot b - c \cdot \left(a \cdot 4\right)\right)}^{0.5}}{2 \cdot a} + \left(-\frac{b}{2 \cdot a}\right)\\ \end{array} \]
      6. pow1/287.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{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{2 \cdot a} + \left(-\frac{b}{2 \cdot a}\right)\\ \end{array} \]
      7. *-un-lft-identity87.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{1 \cdot \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{2 \cdot a} + \left(-\frac{b}{2 \cdot a}\right)\\ \end{array} \]
      8. times-frac87.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{1}{2} \cdot \frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{a} + \left(-\frac{b}{2 \cdot a}\right)\\ \end{array} \]
      9. metadata-eval87.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}:\\ \;\;\;\;0.5 \cdot \frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{a} + \left(-\frac{b}{2 \cdot a}\right)\\ \end{array} \]
      10. add-sqr-sqrt35.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}{0.5} \cdot \frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{a} + \left(-\frac{\sqrt{b} \cdot \sqrt{b}}{2 \cdot a}\right)\\ \end{array} \]
      11. sqrt-prod64.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}:\\ \;\;\;\;\color{blue}{0.5} \cdot \frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{a} + \left(-\frac{\sqrt{b \cdot b}}{2 \cdot a}\right)\\ \end{array} \]
      12. *-un-lft-identity64.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}:\\ \;\;\;\;0.5 \cdot \frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{a} + \left(-\frac{\sqrt{1 \cdot \left(b \cdot b\right)}}{2 \cdot a}\right)\\ \end{array} \]
      13. metadata-eval64.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}:\\ \;\;\;\;0.5 \cdot \frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{a} + \left(-\frac{\sqrt{{-1}^{2} \cdot \left(b \cdot b\right)}}{2 \cdot a}\right)\\ \end{array} \]
      14. pow264.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}:\\ \;\;\;\;0.5 \cdot \frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{a} + \left(-\frac{\sqrt{{-1}^{2} \cdot {b}^{2}}}{2 \cdot a}\right)\\ \end{array} \]
      15. unpow-prod-down64.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}:\\ \;\;\;\;0.5 \cdot \frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{a} + \left(-\frac{\sqrt{{\left(-1 \cdot b\right)}^{2}}}{2 \cdot a}\right)\\ \end{array} \]
      16. neg-mul-164.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}:\\ \;\;\;\;0.5 \cdot \frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{a} + \left(-\frac{\sqrt{{\left(-b\right)}^{2}}}{2 \cdot a}\right)\\ \end{array} \]
      17. unpow264.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}:\\ \;\;\;\;0.5 \cdot \frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{a} + \left(-\frac{\sqrt{\left(-b\right) \cdot \left(-b\right)}}{2 \cdot a}\right)\\ \end{array} \]
      18. sqrt-prod64.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}{0.5} \cdot \frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{a} + \left(-\frac{\sqrt{-b} \cdot \sqrt{-b}}{2 \cdot a}\right)\\ \end{array} \]
      19. add-sqr-sqrt64.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}:\\ \;\;\;\;\color{blue}{0.5} \cdot \frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{a} + \left(-\frac{-b}{2 \cdot a}\right)\\ \end{array} \]
    9. Applied egg-rr87.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}:\\ \;\;\;\;0.5 \cdot \frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{a} + \left(-0.5 \cdot \frac{b}{a}\right)\\ \end{array} \]
    10. Step-by-step derivation
      1. sub-neg87.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}:\\ \;\;\;\;0.5 \cdot \frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{a} - 0.5 \cdot \frac{b}{a}\\ \end{array} \]
      2. distribute-lft-out--87.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}:\\ \;\;\;\;0.5 \cdot \left(\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{a} - \frac{b}{a}\right)\\ \end{array} \]
    11. Simplified87.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}:\\ \;\;\;\;0.5 \cdot \left(\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{a} - \frac{b}{a}\right)\\ \end{array} \]
    12. Step-by-step derivation
      1. sub-neg87.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}{0.5 \cdot \left(\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{a} + \left(-\frac{b}{a}\right)\right)}\\ \end{array} \]
    13. Applied egg-rr87.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}{0.5 \cdot \left(\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{a} + \left(-\frac{b}{a}\right)\right)}\\ \end{array} \]
    14. Step-by-step derivation
      1. unsub-neg87.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}{0.5 \cdot \left(\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{a} - \frac{b}{a}\right)}\\ \end{array} \]
      2. div-sub87.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}{0.5 \cdot \frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b}{a}}\\ \end{array} \]
    15. Simplified87.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}{0.5 \cdot \frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b}{a}}\\ \end{array} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification91.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -5 \cdot 10^{+110} \lor \neg \left(b \leq 2.7 \cdot 10^{+48}\right):\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{-c}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{-b}{a}\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - c \cdot \left(4 \cdot a\right)}}\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \frac{\sqrt{b \cdot b - c \cdot \left(4 \cdot a\right)} - b}{a}\\ \end{array} \]

Alternative 4: 89.1% accurate, 1.0× 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}\\ \mathbf{if}\;b \leq -6.8 \cdot 10^{+31}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} - \frac{b}{a}\\ \end{array}\\ \mathbf{elif}\;b \leq 2.7 \cdot 10^{+48}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \frac{t_0 - b}{a}\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;\frac{-c}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{-b}{a}\\ \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))))
   (if (<= b -6.8e+31)
     (if (>= b 0.0) t_1 (- (/ c b) (/ b a)))
     (if (<= b 2.7e+48)
       (if (>= b 0.0) t_1 (* 0.5 (/ (- t_0 b) a)))
       (if (>= b 0.0) (/ (- c) b) (/ (- b) a))))))
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 tmp_1;
	if (b <= -6.8e+31) {
		double tmp_2;
		if (b >= 0.0) {
			tmp_2 = t_1;
		} else {
			tmp_2 = (c / b) - (b / a);
		}
		tmp_1 = tmp_2;
	} else if (b <= 2.7e+48) {
		double tmp_3;
		if (b >= 0.0) {
			tmp_3 = t_1;
		} else {
			tmp_3 = 0.5 * ((t_0 - b) / a);
		}
		tmp_1 = tmp_3;
	} else if (b >= 0.0) {
		tmp_1 = -c / b;
	} else {
		tmp_1 = -b / a;
	}
	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) :: 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)
    if (b <= (-6.8d+31)) then
        if (b >= 0.0d0) then
            tmp_2 = t_1
        else
            tmp_2 = (c / b) - (b / a)
        end if
        tmp_1 = tmp_2
    else if (b <= 2.7d+48) then
        if (b >= 0.0d0) then
            tmp_3 = t_1
        else
            tmp_3 = 0.5d0 * ((t_0 - b) / a)
        end if
        tmp_1 = tmp_3
    else if (b >= 0.0d0) then
        tmp_1 = -c / b
    else
        tmp_1 = -b / a
    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 tmp_1;
	if (b <= -6.8e+31) {
		double tmp_2;
		if (b >= 0.0) {
			tmp_2 = t_1;
		} else {
			tmp_2 = (c / b) - (b / a);
		}
		tmp_1 = tmp_2;
	} else if (b <= 2.7e+48) {
		double tmp_3;
		if (b >= 0.0) {
			tmp_3 = t_1;
		} else {
			tmp_3 = 0.5 * ((t_0 - b) / a);
		}
		tmp_1 = tmp_3;
	} else if (b >= 0.0) {
		tmp_1 = -c / b;
	} else {
		tmp_1 = -b / a;
	}
	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)
	tmp_1 = 0
	if b <= -6.8e+31:
		tmp_2 = 0
		if b >= 0.0:
			tmp_2 = t_1
		else:
			tmp_2 = (c / b) - (b / a)
		tmp_1 = tmp_2
	elif b <= 2.7e+48:
		tmp_3 = 0
		if b >= 0.0:
			tmp_3 = t_1
		else:
			tmp_3 = 0.5 * ((t_0 - b) / a)
		tmp_1 = tmp_3
	elif b >= 0.0:
		tmp_1 = -c / b
	else:
		tmp_1 = -b / a
	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))
	tmp_1 = 0.0
	if (b <= -6.8e+31)
		tmp_2 = 0.0
		if (b >= 0.0)
			tmp_2 = t_1;
		else
			tmp_2 = Float64(Float64(c / b) - Float64(b / a));
		end
		tmp_1 = tmp_2;
	elseif (b <= 2.7e+48)
		tmp_3 = 0.0
		if (b >= 0.0)
			tmp_3 = t_1;
		else
			tmp_3 = Float64(0.5 * Float64(Float64(t_0 - b) / a));
		end
		tmp_1 = tmp_3;
	elseif (b >= 0.0)
		tmp_1 = Float64(Float64(-c) / b);
	else
		tmp_1 = Float64(Float64(-b) / a);
	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);
	tmp_2 = 0.0;
	if (b <= -6.8e+31)
		tmp_3 = 0.0;
		if (b >= 0.0)
			tmp_3 = t_1;
		else
			tmp_3 = (c / b) - (b / a);
		end
		tmp_2 = tmp_3;
	elseif (b <= 2.7e+48)
		tmp_4 = 0.0;
		if (b >= 0.0)
			tmp_4 = t_1;
		else
			tmp_4 = 0.5 * ((t_0 - b) / a);
		end
		tmp_2 = tmp_4;
	elseif (b >= 0.0)
		tmp_2 = -c / b;
	else
		tmp_2 = -b / a;
	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]}, If[LessEqual[b, -6.8e+31], If[GreaterEqual[b, 0.0], t$95$1, N[(N[(c / b), $MachinePrecision] - N[(b / a), $MachinePrecision]), $MachinePrecision]], If[LessEqual[b, 2.7e+48], If[GreaterEqual[b, 0.0], t$95$1, N[(0.5 * N[(N[(t$95$0 - b), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]], If[GreaterEqual[b, 0.0], N[((-c) / b), $MachinePrecision], N[((-b) / a), $MachinePrecision]]]]]]
\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}\\
\mathbf{if}\;b \leq -6.8 \cdot 10^{+31}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;\frac{c}{b} - \frac{b}{a}\\


\end{array}\\

\mathbf{elif}\;b \leq 2.7 \cdot 10^{+48}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;t_1\\

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


\end{array}\\

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

\mathbf{else}:\\
\;\;\;\;\frac{-b}{a}\\


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

    1. Initial program 63.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. Taylor expanded in b around -inf 66.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}:\\ \;\;\;\;-1 \cdot \frac{b}{a} + \left(\frac{c}{b} + \frac{a \cdot {c}^{2}}{{b}^{3}}\right)\\ \end{array} \]
    3. Step-by-step derivation
      1. +-commutative66.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}:\\ \;\;\;\;\left(\frac{c}{b} + \frac{a \cdot {c}^{2}}{{b}^{3}}\right) + -1 \cdot \frac{b}{a}\\ \end{array} \]
      2. +-commutative66.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}:\\ \;\;\;\;\left(\frac{a \cdot {c}^{2}}{{b}^{3}} + \frac{c}{b}\right) + -1 \cdot \frac{b}{a}\\ \end{array} \]
      3. associate-+l+66.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}:\\ \;\;\;\;\frac{a \cdot {c}^{2}}{{b}^{3}} + \left(\frac{c}{b} + -1 \cdot \frac{b}{a}\right)\\ \end{array} \]
      4. associate-/l*71.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}:\\ \;\;\;\;\frac{a}{\frac{{b}^{3}}{{c}^{2}}} + \left(\frac{c}{b} + -1 \cdot \frac{b}{a}\right)\\ \end{array} \]
      5. unpow271.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}:\\ \;\;\;\;\frac{a}{\frac{{b}^{3}}{c \cdot c}} + \left(\frac{c}{b} + -1 \cdot \frac{b}{a}\right)\\ \end{array} \]
      6. mul-1-neg71.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}:\\ \;\;\;\;\frac{a}{\frac{{b}^{3}}{c \cdot c}} + \color{blue}{\left(\frac{c}{b} + \left(-\frac{b}{a}\right)\right)}\\ \end{array} \]
      7. unsub-neg71.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}:\\ \;\;\;\;\color{blue}{\frac{a}{\frac{{b}^{3}}{c \cdot c}} + \left(\frac{c}{b} - \frac{b}{a}\right)}\\ \end{array} \]
    4. Simplified71.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}:\\ \;\;\;\;\frac{a}{\frac{{b}^{3}}{c \cdot c}} + \left(\frac{c}{b} - \frac{b}{a}\right)\\ \end{array} \]
    5. Taylor expanded in a around 0 93.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}:\\ \;\;\;\;-1 \cdot \frac{b}{a} + \frac{c}{b}\\ \end{array} \]
    6. Step-by-step derivation
      1. +-commutative93.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{c}{b} + -1 \cdot \frac{b}{a}\\ \end{array} \]
      2. mul-1-neg93.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}{\frac{c}{b} + \left(-\frac{b}{a}\right)}\\ \end{array} \]
      3. sub-neg93.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{c}{b} - \frac{b}{a}\\ \end{array} \]
    7. Simplified93.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{c}{b} - \frac{b}{a}\\ \end{array} \]

    if -6.7999999999999996e31 < b < 2.70000000000000004e48

    1. Initial program 87.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. Step-by-step derivation
      1. add-cbrt-cube77.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}:\\ \;\;\;\;\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. pow377.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}:\\ \;\;\;\;\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. pow1/277.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}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt[3]{{\left({\left(b \cdot b - \left(4 \cdot a\right) \cdot c\right)}^{0.5}\right)}^{3}}}{2 \cdot a}\\ \end{array} \]
      4. pow-pow77.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}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt[3]{{\left(b \cdot b - \left(4 \cdot a\right) \cdot c\right)}^{\left(0.5 \cdot 3\right)}}}{2 \cdot a}\\ \end{array} \]
      5. *-commutative77.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}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt[3]{{\left(b \cdot b - c \cdot \left(4 \cdot a\right)\right)}^{\left(0.5 \cdot 3\right)}}}{2 \cdot a}\\ \end{array} \]
      6. *-commutative77.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}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt[3]{{\left(b \cdot b - c \cdot \left(a \cdot 4\right)\right)}^{\left(0.5 \cdot 3\right)}}}{2 \cdot a}\\ \end{array} \]
      7. metadata-eval77.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}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt[3]{{\left(b \cdot b - c \cdot \left(a \cdot 4\right)\right)}^{1.5}}}{2 \cdot a}\\ \end{array} \]
    3. Applied egg-rr77.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}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt[3]{{\left(b \cdot b - c \cdot \left(a \cdot 4\right)\right)}^{1.5}}}{2 \cdot a}\\ \end{array} \]
    4. Step-by-step derivation
      1. *-un-lft-identity77.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}:\\ \;\;\;\;\frac{1 \cdot \left(\left(-b\right) + \sqrt[3]{{\left(b \cdot b - c \cdot \left(a \cdot 4\right)\right)}^{1.5}}\right)}{2 \cdot a}\\ \end{array} \]
      2. +-commutative77.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}:\\ \;\;\;\;\frac{1 \cdot \left(\sqrt[3]{{\left(b \cdot b - c \cdot \left(a \cdot 4\right)\right)}^{1.5}} + \left(-b\right)\right)}{2 \cdot a}\\ \end{array} \]
    5. Applied egg-rr77.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}:\\ \;\;\;\;\frac{1 \cdot \left(\sqrt[3]{{\left(b \cdot b - c \cdot \left(a \cdot 4\right)\right)}^{1.5}} + \left(-b\right)\right)}{2 \cdot a}\\ \end{array} \]
    6. Step-by-step derivation
      1. *-lft-identity77.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}:\\ \;\;\;\;\frac{\sqrt[3]{{\left(b \cdot b - c \cdot \left(a \cdot 4\right)\right)}^{1.5}} + \left(-b\right)}{2 \cdot a}\\ \end{array} \]
      2. unsub-neg77.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}:\\ \;\;\;\;\frac{\sqrt[3]{{\left(b \cdot b - c \cdot \left(a \cdot 4\right)\right)}^{1.5}} - b}{2 \cdot a}\\ \end{array} \]
    7. Simplified77.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}:\\ \;\;\;\;\frac{\sqrt[3]{{\left(b \cdot b - c \cdot \left(a \cdot 4\right)\right)}^{1.5}} - b}{2 \cdot a}\\ \end{array} \]
    8. Step-by-step derivation
      1. div-sub77.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}:\\ \;\;\;\;\frac{\sqrt[3]{{\left(b \cdot b - c \cdot \left(a \cdot 4\right)\right)}^{1.5}}}{2 \cdot a} - \frac{b}{2 \cdot a}\\ \end{array} \]
      2. sub-neg77.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}:\\ \;\;\;\;\frac{\sqrt[3]{{\left(b \cdot b - c \cdot \left(a \cdot 4\right)\right)}^{1.5}}}{2 \cdot a} + \left(-\frac{b}{2 \cdot a}\right)\\ \end{array} \]
      3. pow1/374.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}:\\ \;\;\;\;\frac{{\left({\left(b \cdot b - c \cdot \left(a \cdot 4\right)\right)}^{1.5}\right)}^{0.3333333333333333}}{2 \cdot a} + \left(-\frac{b}{2 \cdot a}\right)\\ \end{array} \]
      4. pow-pow87.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}:\\ \;\;\;\;\frac{{\left(b \cdot b - c \cdot \left(a \cdot 4\right)\right)}^{\left(1.5 \cdot 0.3333333333333333\right)}}{2 \cdot a} + \left(-\frac{b}{2 \cdot a}\right)\\ \end{array} \]
      5. metadata-eval87.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}:\\ \;\;\;\;\frac{{\left(b \cdot b - c \cdot \left(a \cdot 4\right)\right)}^{0.5}}{2 \cdot a} + \left(-\frac{b}{2 \cdot a}\right)\\ \end{array} \]
      6. pow1/287.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}:\\ \;\;\;\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{2 \cdot a} + \left(-\frac{b}{2 \cdot a}\right)\\ \end{array} \]
      7. *-un-lft-identity87.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}:\\ \;\;\;\;\frac{1 \cdot \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{2 \cdot a} + \left(-\frac{b}{2 \cdot a}\right)\\ \end{array} \]
      8. times-frac87.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}:\\ \;\;\;\;\frac{1}{2} \cdot \frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{a} + \left(-\frac{b}{2 \cdot a}\right)\\ \end{array} \]
      9. metadata-eval87.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}:\\ \;\;\;\;0.5 \cdot \frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{a} + \left(-\frac{b}{2 \cdot a}\right)\\ \end{array} \]
      10. add-sqr-sqrt39.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}{0.5} \cdot \frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{a} + \left(-\frac{\sqrt{b} \cdot \sqrt{b}}{2 \cdot a}\right)\\ \end{array} \]
      11. sqrt-prod72.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}{0.5} \cdot \frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{a} + \left(-\frac{\sqrt{b \cdot b}}{2 \cdot a}\right)\\ \end{array} \]
      12. *-un-lft-identity72.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}:\\ \;\;\;\;0.5 \cdot \frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{a} + \left(-\frac{\sqrt{1 \cdot \left(b \cdot b\right)}}{2 \cdot a}\right)\\ \end{array} \]
      13. metadata-eval72.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}:\\ \;\;\;\;0.5 \cdot \frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{a} + \left(-\frac{\sqrt{{-1}^{2} \cdot \left(b \cdot b\right)}}{2 \cdot a}\right)\\ \end{array} \]
      14. pow272.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}:\\ \;\;\;\;0.5 \cdot \frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{a} + \left(-\frac{\sqrt{{-1}^{2} \cdot {b}^{2}}}{2 \cdot a}\right)\\ \end{array} \]
      15. unpow-prod-down72.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}:\\ \;\;\;\;0.5 \cdot \frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{a} + \left(-\frac{\sqrt{{\left(-1 \cdot b\right)}^{2}}}{2 \cdot a}\right)\\ \end{array} \]
      16. neg-mul-172.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}:\\ \;\;\;\;0.5 \cdot \frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{a} + \left(-\frac{\sqrt{{\left(-b\right)}^{2}}}{2 \cdot a}\right)\\ \end{array} \]
      17. unpow272.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}:\\ \;\;\;\;0.5 \cdot \frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{a} + \left(-\frac{\sqrt{\left(-b\right) \cdot \left(-b\right)}}{2 \cdot a}\right)\\ \end{array} \]
      18. sqrt-prod72.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}{0.5} \cdot \frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{a} + \left(-\frac{\sqrt{-b} \cdot \sqrt{-b}}{2 \cdot a}\right)\\ \end{array} \]
      19. add-sqr-sqrt72.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}{0.5} \cdot \frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{a} + \left(-\frac{-b}{2 \cdot a}\right)\\ \end{array} \]
    9. Applied egg-rr87.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}:\\ \;\;\;\;0.5 \cdot \frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{a} + \left(-0.5 \cdot \frac{b}{a}\right)\\ \end{array} \]
    10. Step-by-step derivation
      1. sub-neg87.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}:\\ \;\;\;\;0.5 \cdot \frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{a} - 0.5 \cdot \frac{b}{a}\\ \end{array} \]
      2. distribute-lft-out--87.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}:\\ \;\;\;\;0.5 \cdot \left(\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{a} - \frac{b}{a}\right)\\ \end{array} \]
    11. Simplified87.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}:\\ \;\;\;\;0.5 \cdot \left(\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{a} - \frac{b}{a}\right)\\ \end{array} \]
    12. Step-by-step derivation
      1. sub-neg87.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}:\\ \;\;\;\;\color{blue}{0.5 \cdot \left(\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{a} + \left(-\frac{b}{a}\right)\right)}\\ \end{array} \]
    13. Applied egg-rr87.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}:\\ \;\;\;\;\color{blue}{0.5 \cdot \left(\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{a} + \left(-\frac{b}{a}\right)\right)}\\ \end{array} \]
    14. Step-by-step derivation
      1. unsub-neg87.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}:\\ \;\;\;\;\color{blue}{0.5 \cdot \left(\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}{a} - \frac{b}{a}\right)}\\ \end{array} \]
      2. div-sub87.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}:\\ \;\;\;\;\color{blue}{0.5 \cdot \frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b}{a}}\\ \end{array} \]
    15. Simplified87.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}:\\ \;\;\;\;\color{blue}{0.5 \cdot \frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b}{a}}\\ \end{array} \]

    if 2.70000000000000004e48 < b

    1. Initial program 64.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. Taylor expanded in b around -inf 64.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}:\\ \;\;\;\;-1 \cdot \frac{b}{a} + \left(\frac{c}{b} + \frac{a \cdot {c}^{2}}{{b}^{3}}\right)\\ \end{array} \]
    3. Step-by-step derivation
      1. +-commutative64.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(\frac{c}{b} + \frac{a \cdot {c}^{2}}{{b}^{3}}\right) + -1 \cdot \frac{b}{a}\\ \end{array} \]
      2. +-commutative64.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(\frac{a \cdot {c}^{2}}{{b}^{3}} + \frac{c}{b}\right) + -1 \cdot \frac{b}{a}\\ \end{array} \]
      3. associate-+l+64.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{a \cdot {c}^{2}}{{b}^{3}} + \left(\frac{c}{b} + -1 \cdot \frac{b}{a}\right)\\ \end{array} \]
      4. associate-/l*64.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{a}{\frac{{b}^{3}}{{c}^{2}}} + \left(\frac{c}{b} + -1 \cdot \frac{b}{a}\right)\\ \end{array} \]
      5. unpow264.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{a}{\frac{{b}^{3}}{c \cdot c}} + \left(\frac{c}{b} + -1 \cdot \frac{b}{a}\right)\\ \end{array} \]
      6. mul-1-neg64.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{a}{\frac{{b}^{3}}{c \cdot c}} + \color{blue}{\left(\frac{c}{b} + \left(-\frac{b}{a}\right)\right)}\\ \end{array} \]
      7. unsub-neg64.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}{\frac{a}{\frac{{b}^{3}}{c \cdot c}} + \left(\frac{c}{b} - \frac{b}{a}\right)}\\ \end{array} \]
    4. Simplified64.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{a}{\frac{{b}^{3}}{c \cdot c}} + \left(\frac{c}{b} - \frac{b}{a}\right)\\ \end{array} \]
    5. Taylor expanded in a around 0 64.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}:\\ \;\;\;\;-1 \cdot \frac{b}{a}\\ \end{array} \]
    6. Step-by-step derivation
      1. associate-*r/64.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{-1 \cdot b}{a}\\ \end{array} \]
      2. neg-mul-164.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{-b}{a}\\ \end{array} \]
    7. Simplified64.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{-b}{a}\\ \end{array} \]
    8. Taylor expanded in c around 0 97.1%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{-1 \cdot \frac{c}{b}}\\ \mathbf{else}:\\ \;\;\;\;\frac{-b}{a}\\ \end{array} \]
    9. Step-by-step derivation
      1. associate-*r/97.1%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{-1 \cdot c}{b}}\\ \mathbf{else}:\\ \;\;\;\;\frac{-b}{a}\\ \end{array} \]
      2. mul-1-neg97.1%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\color{blue}{-c}}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{-b}{a}\\ \end{array} \]
    10. Simplified97.1%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{-c}{b}}\\ \mathbf{else}:\\ \;\;\;\;\frac{-b}{a}\\ \end{array} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification91.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -6.8 \cdot 10^{+31}:\\ \;\;\;\;\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{c}{b} - \frac{b}{a}\\ \end{array}\\ \mathbf{elif}\;b \leq 2.7 \cdot 10^{+48}:\\ \;\;\;\;\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}:\\ \;\;\;\;0.5 \cdot \frac{\sqrt{b \cdot b - c \cdot \left(4 \cdot a\right)} - b}{a}\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;\frac{-c}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{-b}{a}\\ \end{array} \]

Alternative 5: 73.6% accurate, 1.0× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;t_0\\


\end{array}\\

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

\mathbf{else}:\\
\;\;\;\;t_0\\


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

    1. Initial program 78.6%

      \[\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. Taylor expanded in b around -inf 54.8%

      \[\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}:\\ \;\;\;\;-1 \cdot \frac{b}{a} + \left(\frac{c}{b} + \frac{a \cdot {c}^{2}}{{b}^{3}}\right)\\ \end{array} \]
    3. Step-by-step derivation
      1. +-commutative54.8%

        \[\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(\frac{c}{b} + \frac{a \cdot {c}^{2}}{{b}^{3}}\right) + -1 \cdot \frac{b}{a}\\ \end{array} \]
      2. +-commutative54.8%

        \[\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(\frac{a \cdot {c}^{2}}{{b}^{3}} + \frac{c}{b}\right) + -1 \cdot \frac{b}{a}\\ \end{array} \]
      3. associate-+l+54.8%

        \[\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{a \cdot {c}^{2}}{{b}^{3}} + \left(\frac{c}{b} + -1 \cdot \frac{b}{a}\right)\\ \end{array} \]
      4. associate-/l*57.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}:\\ \;\;\;\;\frac{a}{\frac{{b}^{3}}{{c}^{2}}} + \left(\frac{c}{b} + -1 \cdot \frac{b}{a}\right)\\ \end{array} \]
      5. unpow257.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}:\\ \;\;\;\;\frac{a}{\frac{{b}^{3}}{c \cdot c}} + \left(\frac{c}{b} + -1 \cdot \frac{b}{a}\right)\\ \end{array} \]
      6. mul-1-neg57.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}:\\ \;\;\;\;\frac{a}{\frac{{b}^{3}}{c \cdot c}} + \color{blue}{\left(\frac{c}{b} + \left(-\frac{b}{a}\right)\right)}\\ \end{array} \]
      7. unsub-neg57.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}:\\ \;\;\;\;\color{blue}{\frac{a}{\frac{{b}^{3}}{c \cdot c}} + \left(\frac{c}{b} - \frac{b}{a}\right)}\\ \end{array} \]
    4. Simplified57.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}:\\ \;\;\;\;\frac{a}{\frac{{b}^{3}}{c \cdot c}} + \left(\frac{c}{b} - \frac{b}{a}\right)\\ \end{array} \]
    5. Taylor expanded in a around 0 68.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}:\\ \;\;\;\;-1 \cdot \frac{b}{a}\\ \end{array} \]
    6. Step-by-step derivation
      1. associate-*r/68.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}:\\ \;\;\;\;\frac{-1 \cdot b}{a}\\ \end{array} \]
      2. neg-mul-168.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}:\\ \;\;\;\;\frac{-b}{a}\\ \end{array} \]
    7. Simplified68.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}:\\ \;\;\;\;\frac{-b}{a}\\ \end{array} \]
    8. Step-by-step derivation
      1. expm1-log1p-u64.8%

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;e^{\mathsf{log1p}\left(\frac{c \cdot 2}{\color{blue}{\sqrt{\left(-b\right) \cdot \left(-b\right)}} - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\right)} - 1\\ \mathbf{else}:\\ \;\;\;\;\frac{-b}{a}\\ \end{array} \]
      6. sqr-neg54.2%

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;e^{\mathsf{log1p}\left(\frac{c \cdot 2}{\color{blue}{\sqrt{b} \cdot \sqrt{b}} - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\right)} - 1\\ \mathbf{else}:\\ \;\;\;\;\frac{-b}{a}\\ \end{array} \]
      8. add-sqr-sqrt54.2%

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

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

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

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

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

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

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

    if 7.50000000000000006e-29 < b

    1. Initial program 67.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. Taylor expanded in b around -inf 67.8%

      \[\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}:\\ \;\;\;\;-1 \cdot \frac{b}{a} + \left(\frac{c}{b} + \frac{a \cdot {c}^{2}}{{b}^{3}}\right)\\ \end{array} \]
    3. Step-by-step derivation
      1. +-commutative67.8%

        \[\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(\frac{c}{b} + \frac{a \cdot {c}^{2}}{{b}^{3}}\right) + -1 \cdot \frac{b}{a}\\ \end{array} \]
      2. +-commutative67.8%

        \[\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(\frac{a \cdot {c}^{2}}{{b}^{3}} + \frac{c}{b}\right) + -1 \cdot \frac{b}{a}\\ \end{array} \]
      3. associate-+l+67.8%

        \[\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{a \cdot {c}^{2}}{{b}^{3}} + \left(\frac{c}{b} + -1 \cdot \frac{b}{a}\right)\\ \end{array} \]
      4. associate-/l*67.8%

        \[\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{a}{\frac{{b}^{3}}{{c}^{2}}} + \left(\frac{c}{b} + -1 \cdot \frac{b}{a}\right)\\ \end{array} \]
      5. unpow267.8%

        \[\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{a}{\frac{{b}^{3}}{c \cdot c}} + \left(\frac{c}{b} + -1 \cdot \frac{b}{a}\right)\\ \end{array} \]
      6. mul-1-neg67.8%

        \[\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{a}{\frac{{b}^{3}}{c \cdot c}} + \color{blue}{\left(\frac{c}{b} + \left(-\frac{b}{a}\right)\right)}\\ \end{array} \]
      7. unsub-neg67.8%

        \[\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}{\frac{a}{\frac{{b}^{3}}{c \cdot c}} + \left(\frac{c}{b} - \frac{b}{a}\right)}\\ \end{array} \]
    4. Simplified67.8%

      \[\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{a}{\frac{{b}^{3}}{c \cdot c}} + \left(\frac{c}{b} - \frac{b}{a}\right)\\ \end{array} \]
    5. Taylor expanded in a around 0 67.8%

      \[\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}:\\ \;\;\;\;-1 \cdot \frac{b}{a}\\ \end{array} \]
    6. Step-by-step derivation
      1. associate-*r/67.8%

        \[\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{-1 \cdot b}{a}\\ \end{array} \]
      2. neg-mul-167.8%

        \[\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{-b}{a}\\ \end{array} \]
    7. Simplified67.8%

      \[\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{-b}{a}\\ \end{array} \]
    8. Taylor expanded in c around 0 90.7%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{-1 \cdot \frac{c}{b}}\\ \mathbf{else}:\\ \;\;\;\;\frac{-b}{a}\\ \end{array} \]
    9. Step-by-step derivation
      1. associate-*r/90.7%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{-1 \cdot c}{b}}\\ \mathbf{else}:\\ \;\;\;\;\frac{-b}{a}\\ \end{array} \]
      2. mul-1-neg90.7%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\color{blue}{-c}}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{-b}{a}\\ \end{array} \]
    10. Simplified90.7%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{-c}{b}}\\ \mathbf{else}:\\ \;\;\;\;\frac{-b}{a}\\ \end{array} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification72.4%

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

Alternative 6: 3.0% accurate, 19.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{-c}{b}\\ \end{array} \end{array} \]
(FPCore (a b c) :precision binary64 (if (>= b 0.0) (/ b a) (/ (- c) b)))
double code(double a, double b, double c) {
	double tmp;
	if (b >= 0.0) {
		tmp = b / a;
	} else {
		tmp = -c / b;
	}
	return tmp;
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: tmp
    if (b >= 0.0d0) then
        tmp = b / a
    else
        tmp = -c / b
    end if
    code = tmp
end function
public static double code(double a, double b, double c) {
	double tmp;
	if (b >= 0.0) {
		tmp = b / a;
	} else {
		tmp = -c / b;
	}
	return tmp;
}
def code(a, b, c):
	tmp = 0
	if b >= 0.0:
		tmp = b / a
	else:
		tmp = -c / b
	return tmp
function code(a, b, c)
	tmp = 0.0
	if (b >= 0.0)
		tmp = Float64(b / a);
	else
		tmp = Float64(Float64(-c) / b);
	end
	return tmp
end
function tmp_2 = code(a, b, c)
	tmp = 0.0;
	if (b >= 0.0)
		tmp = b / a;
	else
		tmp = -c / b;
	end
	tmp_2 = tmp;
end
code[a_, b_, c_] := If[GreaterEqual[b, 0.0], N[(b / a), $MachinePrecision], N[((-c) / b), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\frac{b}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Initial program 75.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. Simplified75.0%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2}{\mathsf{fma}\left(2, \frac{a}{b}, \frac{b \cdot -2}{c}\right)}\\ \mathbf{else}:\\ \;\;\;\;-1 \cdot \frac{c}{b}\\ \end{array} \]
  7. Step-by-step derivation
    1. mul-1-neg33.4%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{-c}{b}\\ \end{array} \]
  10. Final simplification2.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{-c}{b}\\ \end{array} \]

Alternative 7: 67.8% accurate, 19.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{-c}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{-b}{a}\\ \end{array} \end{array} \]
(FPCore (a b c) :precision binary64 (if (>= b 0.0) (/ (- c) b) (/ (- b) a)))
double code(double a, double b, double c) {
	double tmp;
	if (b >= 0.0) {
		tmp = -c / b;
	} else {
		tmp = -b / 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) :: tmp
    if (b >= 0.0d0) then
        tmp = -c / b
    else
        tmp = -b / a
    end if
    code = tmp
end function
public static double code(double a, double b, double c) {
	double tmp;
	if (b >= 0.0) {
		tmp = -c / b;
	} else {
		tmp = -b / a;
	}
	return tmp;
}
def code(a, b, c):
	tmp = 0
	if b >= 0.0:
		tmp = -c / b
	else:
		tmp = -b / a
	return tmp
function code(a, b, c)
	tmp = 0.0
	if (b >= 0.0)
		tmp = Float64(Float64(-c) / b);
	else
		tmp = Float64(Float64(-b) / a);
	end
	return tmp
end
function tmp_2 = code(a, b, c)
	tmp = 0.0;
	if (b >= 0.0)
		tmp = -c / b;
	else
		tmp = -b / a;
	end
	tmp_2 = tmp;
end
code[a_, b_, c_] := If[GreaterEqual[b, 0.0], N[((-c) / b), $MachinePrecision], N[((-b) / a), $MachinePrecision]]
\begin{array}{l}

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

\mathbf{else}:\\
\;\;\;\;\frac{-b}{a}\\


\end{array}
\end{array}
Derivation
  1. Initial program 75.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. Taylor expanded in b around -inf 58.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}:\\ \;\;\;\;-1 \cdot \frac{b}{a} + \left(\frac{c}{b} + \frac{a \cdot {c}^{2}}{{b}^{3}}\right)\\ \end{array} \]
  3. Step-by-step derivation
    1. +-commutative58.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(\frac{c}{b} + \frac{a \cdot {c}^{2}}{{b}^{3}}\right) + -1 \cdot \frac{b}{a}\\ \end{array} \]
    2. +-commutative58.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(\frac{a \cdot {c}^{2}}{{b}^{3}} + \frac{c}{b}\right) + -1 \cdot \frac{b}{a}\\ \end{array} \]
    3. associate-+l+58.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}:\\ \;\;\;\;\frac{a \cdot {c}^{2}}{{b}^{3}} + \left(\frac{c}{b} + -1 \cdot \frac{b}{a}\right)\\ \end{array} \]
    4. associate-/l*60.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{a}{\frac{{b}^{3}}{{c}^{2}}} + \left(\frac{c}{b} + -1 \cdot \frac{b}{a}\right)\\ \end{array} \]
    5. unpow260.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{a}{\frac{{b}^{3}}{c \cdot c}} + \left(\frac{c}{b} + -1 \cdot \frac{b}{a}\right)\\ \end{array} \]
    6. mul-1-neg60.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{a}{\frac{{b}^{3}}{c \cdot c}} + \color{blue}{\left(\frac{c}{b} + \left(-\frac{b}{a}\right)\right)}\\ \end{array} \]
    7. unsub-neg60.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}{\frac{a}{\frac{{b}^{3}}{c \cdot c}} + \left(\frac{c}{b} - \frac{b}{a}\right)}\\ \end{array} \]
  4. Simplified60.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{a}{\frac{{b}^{3}}{c \cdot c}} + \left(\frac{c}{b} - \frac{b}{a}\right)\\ \end{array} \]
  5. Taylor expanded in a around 0 68.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}:\\ \;\;\;\;-1 \cdot \frac{b}{a}\\ \end{array} \]
  6. Step-by-step derivation
    1. associate-*r/68.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}:\\ \;\;\;\;\frac{-1 \cdot b}{a}\\ \end{array} \]
    2. neg-mul-168.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}:\\ \;\;\;\;\frac{-b}{a}\\ \end{array} \]
  7. Simplified68.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}:\\ \;\;\;\;\frac{-b}{a}\\ \end{array} \]
  8. Taylor expanded in c around 0 66.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{-1 \cdot \frac{c}{b}}\\ \mathbf{else}:\\ \;\;\;\;\frac{-b}{a}\\ \end{array} \]
  9. Step-by-step derivation
    1. associate-*r/66.7%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{-1 \cdot c}{b}}\\ \mathbf{else}:\\ \;\;\;\;\frac{-b}{a}\\ \end{array} \]
    2. mul-1-neg66.7%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\color{blue}{-c}}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{-b}{a}\\ \end{array} \]
  10. Simplified66.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{-c}{b}}\\ \mathbf{else}:\\ \;\;\;\;\frac{-b}{a}\\ \end{array} \]
  11. Final simplification66.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{-c}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{-b}{a}\\ \end{array} \]

Reproduce

?
herbie shell --seed 2023283 
(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))))