jeff quadratic root 2

Percentage Accurate: 72.8% → 90.9%
Time: 32.8s
Alternatives: 10
Speedup: 1.0×

Specification

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

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

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


\end{array}
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 10 alternatives:

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

Initial Program: 72.8% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}

Alternative 1: 90.9% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\\ t_1 := \frac{b \cdot -2}{2 \cdot a}\\ t_2 := \frac{t\_0 - b}{2 \cdot a}\\ \mathbf{if}\;b \leq -3.4 \cdot 10^{+161}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{-1}{\frac{b}{c}}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array}\\ \mathbf{elif}\;b \leq -1.25 \cdot 10^{-174}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{c \cdot 2}{2 \cdot \mathsf{fma}\left(a, \frac{c}{b}, -b\right)}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array}\\ \mathbf{elif}\;b \leq -5.6 \cdot 10^{-207}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{c \cdot 2}{2 \cdot \frac{c \cdot a}{b} - b \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{0.5}{a} \cdot \left(\mathsf{hypot}\left(b, \sqrt{\left(c \cdot a\right) \cdot -4}\right) - b\right)\\ \end{array}\\ \mathbf{elif}\;b \leq 8.2 \cdot 10^{+130}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{c \cdot 2}{\left(-b\right) - t\_0}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;\frac{c}{-b}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (let* ((t_0 (sqrt (- (* b b) (* c (* a 4.0)))))
        (t_1 (/ (* b -2.0) (* 2.0 a)))
        (t_2 (/ (- t_0 b) (* 2.0 a))))
   (if (<= b -3.4e+161)
     (if (>= b 0.0) (/ -1.0 (/ b c)) t_1)
     (if (<= b -1.25e-174)
       (if (>= b 0.0) (/ (* c 2.0) (* 2.0 (fma a (/ c b) (- b)))) t_2)
       (if (<= b -5.6e-207)
         (if (>= b 0.0)
           (/ (* c 2.0) (- (* 2.0 (/ (* c a) b)) (* b 2.0)))
           (* (/ 0.5 a) (- (hypot b (sqrt (* (* c a) -4.0))) b)))
         (if (<= b 8.2e+130)
           (if (>= b 0.0) (/ (* c 2.0) (- (- b) t_0)) t_2)
           (if (>= b 0.0) (/ c (- b)) t_1)))))))
double code(double a, double b, double c) {
	double t_0 = sqrt(((b * b) - (c * (a * 4.0))));
	double t_1 = (b * -2.0) / (2.0 * a);
	double t_2 = (t_0 - b) / (2.0 * a);
	double tmp_1;
	if (b <= -3.4e+161) {
		double tmp_2;
		if (b >= 0.0) {
			tmp_2 = -1.0 / (b / c);
		} else {
			tmp_2 = t_1;
		}
		tmp_1 = tmp_2;
	} else if (b <= -1.25e-174) {
		double tmp_3;
		if (b >= 0.0) {
			tmp_3 = (c * 2.0) / (2.0 * fma(a, (c / b), -b));
		} else {
			tmp_3 = t_2;
		}
		tmp_1 = tmp_3;
	} else if (b <= -5.6e-207) {
		double tmp_4;
		if (b >= 0.0) {
			tmp_4 = (c * 2.0) / ((2.0 * ((c * a) / b)) - (b * 2.0));
		} else {
			tmp_4 = (0.5 / a) * (hypot(b, sqrt(((c * a) * -4.0))) - b);
		}
		tmp_1 = tmp_4;
	} else if (b <= 8.2e+130) {
		double tmp_5;
		if (b >= 0.0) {
			tmp_5 = (c * 2.0) / (-b - t_0);
		} else {
			tmp_5 = t_2;
		}
		tmp_1 = tmp_5;
	} else if (b >= 0.0) {
		tmp_1 = c / -b;
	} else {
		tmp_1 = t_1;
	}
	return tmp_1;
}
function code(a, b, c)
	t_0 = sqrt(Float64(Float64(b * b) - Float64(c * Float64(a * 4.0))))
	t_1 = Float64(Float64(b * -2.0) / Float64(2.0 * a))
	t_2 = Float64(Float64(t_0 - b) / Float64(2.0 * a))
	tmp_1 = 0.0
	if (b <= -3.4e+161)
		tmp_2 = 0.0
		if (b >= 0.0)
			tmp_2 = Float64(-1.0 / Float64(b / c));
		else
			tmp_2 = t_1;
		end
		tmp_1 = tmp_2;
	elseif (b <= -1.25e-174)
		tmp_3 = 0.0
		if (b >= 0.0)
			tmp_3 = Float64(Float64(c * 2.0) / Float64(2.0 * fma(a, Float64(c / b), Float64(-b))));
		else
			tmp_3 = t_2;
		end
		tmp_1 = tmp_3;
	elseif (b <= -5.6e-207)
		tmp_4 = 0.0
		if (b >= 0.0)
			tmp_4 = Float64(Float64(c * 2.0) / Float64(Float64(2.0 * Float64(Float64(c * a) / b)) - Float64(b * 2.0)));
		else
			tmp_4 = Float64(Float64(0.5 / a) * Float64(hypot(b, sqrt(Float64(Float64(c * a) * -4.0))) - b));
		end
		tmp_1 = tmp_4;
	elseif (b <= 8.2e+130)
		tmp_5 = 0.0
		if (b >= 0.0)
			tmp_5 = Float64(Float64(c * 2.0) / Float64(Float64(-b) - t_0));
		else
			tmp_5 = t_2;
		end
		tmp_1 = tmp_5;
	elseif (b >= 0.0)
		tmp_1 = Float64(c / Float64(-b));
	else
		tmp_1 = t_1;
	end
	return tmp_1
end
code[a_, b_, c_] := Block[{t$95$0 = N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(c * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[(b * -2.0), $MachinePrecision] / N[(2.0 * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t$95$0 - b), $MachinePrecision] / N[(2.0 * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3.4e+161], If[GreaterEqual[b, 0.0], N[(-1.0 / N[(b / c), $MachinePrecision]), $MachinePrecision], t$95$1], If[LessEqual[b, -1.25e-174], If[GreaterEqual[b, 0.0], N[(N[(c * 2.0), $MachinePrecision] / N[(2.0 * N[(a * N[(c / b), $MachinePrecision] + (-b)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2], If[LessEqual[b, -5.6e-207], If[GreaterEqual[b, 0.0], N[(N[(c * 2.0), $MachinePrecision] / N[(N[(2.0 * N[(N[(c * a), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision] - N[(b * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.5 / a), $MachinePrecision] * N[(N[Sqrt[b ^ 2 + N[Sqrt[N[(N[(c * a), $MachinePrecision] * -4.0), $MachinePrecision]], $MachinePrecision] ^ 2], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]], If[LessEqual[b, 8.2e+130], If[GreaterEqual[b, 0.0], N[(N[(c * 2.0), $MachinePrecision] / N[((-b) - t$95$0), $MachinePrecision]), $MachinePrecision], t$95$2], If[GreaterEqual[b, 0.0], N[(c / (-b)), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}

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

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


\end{array}\\

\mathbf{elif}\;b \leq -1.25 \cdot 10^{-174}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\frac{c \cdot 2}{2 \cdot \mathsf{fma}\left(a, \frac{c}{b}, -b\right)}\\

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


\end{array}\\

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

\mathbf{else}:\\
\;\;\;\;\frac{0.5}{a} \cdot \left(\mathsf{hypot}\left(b, \sqrt{\left(c \cdot a\right) \cdot -4}\right) - b\right)\\


\end{array}\\

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

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


\end{array}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if b < -3.39999999999999993e161

    1. Initial program 35.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. Add Preprocessing
    3. Taylor expanded in b around -inf 97.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}:\\ \;\;\;\;\frac{-2 \cdot b}{2 \cdot a}\\ \end{array} \]
    4. Step-by-step derivation
      1. *-commutative97.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}:\\ \;\;\;\;\frac{b \cdot -2}{2 \cdot a}\\ \end{array} \]
    5. Simplified97.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}:\\ \;\;\;\;\frac{b \cdot -2}{2 \cdot a}\\ \end{array} \]
    6. Applied egg-rr97.6%

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

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

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

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

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

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

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

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

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

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

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

    if -3.39999999999999993e161 < b < -1.2500000000000001e-174

    1. Initial program 94.2%

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

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

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

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

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

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

    if -1.2500000000000001e-174 < b < -5.59999999999999986e-207

    1. Initial program 74.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{2 \cdot \frac{a \cdot c}{b} - 2 \cdot b}\\ \mathbf{else}:\\ \;\;\;\;\frac{0.5}{a} \cdot \left(\mathsf{hypot}\left(b, \sqrt{\left(c \cdot a\right) \cdot -4}\right) - b\right)\\ \end{array} \]
    10. Simplified85.9%

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

    if -5.59999999999999986e-207 < b < 8.19999999999999955e130

    1. Initial program 84.0%

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

    if 8.19999999999999955e130 < b

    1. Initial program 52.2%

      \[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
    2. Add Preprocessing
    3. Taylor expanded in b around -inf 52.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{-2 \cdot b}{2 \cdot a}\\ \end{array} \]
    4. Step-by-step derivation
      1. *-commutative52.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 \cdot -2}{2 \cdot a}\\ \end{array} \]
    5. Simplified52.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 \cdot -2}{2 \cdot a}\\ \end{array} \]
    6. Taylor expanded in c around 0 100.0%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -3.4 \cdot 10^{+161}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{-1}{\frac{b}{c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b \cdot -2}{2 \cdot a}\\ \end{array}\\ \mathbf{elif}\;b \leq -1.25 \cdot 10^{-174}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{c \cdot 2}{2 \cdot \mathsf{fma}\left(a, \frac{c}{b}, -b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b}{2 \cdot a}\\ \end{array}\\ \mathbf{elif}\;b \leq -5.6 \cdot 10^{-207}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{c \cdot 2}{2 \cdot \frac{c \cdot a}{b} - b \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{0.5}{a} \cdot \left(\mathsf{hypot}\left(b, \sqrt{\left(c \cdot a\right) \cdot -4}\right) - b\right)\\ \end{array}\\ \mathbf{elif}\;b \leq 8.2 \cdot 10^{+130}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{c \cdot 2}{\left(-b\right) - \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b}{2 \cdot a}\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;\frac{c}{-b}\\ \mathbf{else}:\\ \;\;\;\;\frac{b \cdot -2}{2 \cdot a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 90.7% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{b \cdot -2}{2 \cdot a}\\ t_1 := \sqrt{\mathsf{fma}\left(c, a \cdot -4, b \cdot b\right)}\\ \mathbf{if}\;b \leq -3.4 \cdot 10^{+161}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{-1}{\frac{b}{c}}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array}\\ \mathbf{elif}\;b \leq -1.25 \cdot 10^{-174}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{c \cdot 2}{2 \cdot \mathsf{fma}\left(a, \frac{c}{b}, -b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b}{2 \cdot a}\\ \end{array}\\ \mathbf{elif}\;b \leq -2.2 \cdot 10^{-206}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{c \cdot 2}{2 \cdot \frac{c \cdot a}{b} - b \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{0.5}{a} \cdot \left(\mathsf{hypot}\left(b, \sqrt{\left(c \cdot a\right) \cdot -4}\right) - b\right)\\ \end{array}\\ \mathbf{elif}\;b \leq 7.8 \cdot 10^{-116}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{-2}{b + t\_1}\\ \mathbf{else}:\\ \;\;\;\;\frac{b - t\_1}{-2 \cdot a}\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;\frac{c \cdot 2}{\left(-b\right) - b \cdot \sqrt{\mathsf{fma}\left(-4, \frac{c}{b} \cdot \frac{a}{b}, 1\right)}}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (let* ((t_0 (/ (* b -2.0) (* 2.0 a))) (t_1 (sqrt (fma c (* a -4.0) (* b b)))))
   (if (<= b -3.4e+161)
     (if (>= b 0.0) (/ -1.0 (/ b c)) t_0)
     (if (<= b -1.25e-174)
       (if (>= b 0.0)
         (/ (* c 2.0) (* 2.0 (fma a (/ c b) (- b))))
         (/ (- (sqrt (- (* b b) (* c (* a 4.0)))) b) (* 2.0 a)))
       (if (<= b -2.2e-206)
         (if (>= b 0.0)
           (/ (* c 2.0) (- (* 2.0 (/ (* c a) b)) (* b 2.0)))
           (* (/ 0.5 a) (- (hypot b (sqrt (* (* c a) -4.0))) b)))
         (if (<= b 7.8e-116)
           (if (>= b 0.0) (* c (/ -2.0 (+ b t_1))) (/ (- b t_1) (* -2.0 a)))
           (if (>= b 0.0)
             (/
              (* c 2.0)
              (- (- b) (* b (sqrt (fma -4.0 (* (/ c b) (/ a b)) 1.0)))))
             t_0)))))))
double code(double a, double b, double c) {
	double t_0 = (b * -2.0) / (2.0 * a);
	double t_1 = sqrt(fma(c, (a * -4.0), (b * b)));
	double tmp_1;
	if (b <= -3.4e+161) {
		double tmp_2;
		if (b >= 0.0) {
			tmp_2 = -1.0 / (b / c);
		} else {
			tmp_2 = t_0;
		}
		tmp_1 = tmp_2;
	} else if (b <= -1.25e-174) {
		double tmp_3;
		if (b >= 0.0) {
			tmp_3 = (c * 2.0) / (2.0 * fma(a, (c / b), -b));
		} else {
			tmp_3 = (sqrt(((b * b) - (c * (a * 4.0)))) - b) / (2.0 * a);
		}
		tmp_1 = tmp_3;
	} else if (b <= -2.2e-206) {
		double tmp_4;
		if (b >= 0.0) {
			tmp_4 = (c * 2.0) / ((2.0 * ((c * a) / b)) - (b * 2.0));
		} else {
			tmp_4 = (0.5 / a) * (hypot(b, sqrt(((c * a) * -4.0))) - b);
		}
		tmp_1 = tmp_4;
	} else if (b <= 7.8e-116) {
		double tmp_5;
		if (b >= 0.0) {
			tmp_5 = c * (-2.0 / (b + t_1));
		} else {
			tmp_5 = (b - t_1) / (-2.0 * a);
		}
		tmp_1 = tmp_5;
	} else if (b >= 0.0) {
		tmp_1 = (c * 2.0) / (-b - (b * sqrt(fma(-4.0, ((c / b) * (a / b)), 1.0))));
	} else {
		tmp_1 = t_0;
	}
	return tmp_1;
}
function code(a, b, c)
	t_0 = Float64(Float64(b * -2.0) / Float64(2.0 * a))
	t_1 = sqrt(fma(c, Float64(a * -4.0), Float64(b * b)))
	tmp_1 = 0.0
	if (b <= -3.4e+161)
		tmp_2 = 0.0
		if (b >= 0.0)
			tmp_2 = Float64(-1.0 / Float64(b / c));
		else
			tmp_2 = t_0;
		end
		tmp_1 = tmp_2;
	elseif (b <= -1.25e-174)
		tmp_3 = 0.0
		if (b >= 0.0)
			tmp_3 = Float64(Float64(c * 2.0) / Float64(2.0 * fma(a, Float64(c / b), Float64(-b))));
		else
			tmp_3 = Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(c * Float64(a * 4.0)))) - b) / Float64(2.0 * a));
		end
		tmp_1 = tmp_3;
	elseif (b <= -2.2e-206)
		tmp_4 = 0.0
		if (b >= 0.0)
			tmp_4 = Float64(Float64(c * 2.0) / Float64(Float64(2.0 * Float64(Float64(c * a) / b)) - Float64(b * 2.0)));
		else
			tmp_4 = Float64(Float64(0.5 / a) * Float64(hypot(b, sqrt(Float64(Float64(c * a) * -4.0))) - b));
		end
		tmp_1 = tmp_4;
	elseif (b <= 7.8e-116)
		tmp_5 = 0.0
		if (b >= 0.0)
			tmp_5 = Float64(c * Float64(-2.0 / Float64(b + t_1)));
		else
			tmp_5 = Float64(Float64(b - t_1) / Float64(-2.0 * a));
		end
		tmp_1 = tmp_5;
	elseif (b >= 0.0)
		tmp_1 = Float64(Float64(c * 2.0) / Float64(Float64(-b) - Float64(b * sqrt(fma(-4.0, Float64(Float64(c / b) * Float64(a / b)), 1.0)))));
	else
		tmp_1 = t_0;
	end
	return tmp_1
end
code[a_, b_, c_] := Block[{t$95$0 = N[(N[(b * -2.0), $MachinePrecision] / N[(2.0 * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(c * N[(a * -4.0), $MachinePrecision] + N[(b * b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[b, -3.4e+161], If[GreaterEqual[b, 0.0], N[(-1.0 / N[(b / c), $MachinePrecision]), $MachinePrecision], t$95$0], If[LessEqual[b, -1.25e-174], If[GreaterEqual[b, 0.0], N[(N[(c * 2.0), $MachinePrecision] / N[(2.0 * N[(a * N[(c / b), $MachinePrecision] + (-b)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(c * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(2.0 * a), $MachinePrecision]), $MachinePrecision]], If[LessEqual[b, -2.2e-206], If[GreaterEqual[b, 0.0], N[(N[(c * 2.0), $MachinePrecision] / N[(N[(2.0 * N[(N[(c * a), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision] - N[(b * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.5 / a), $MachinePrecision] * N[(N[Sqrt[b ^ 2 + N[Sqrt[N[(N[(c * a), $MachinePrecision] * -4.0), $MachinePrecision]], $MachinePrecision] ^ 2], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]], If[LessEqual[b, 7.8e-116], If[GreaterEqual[b, 0.0], N[(c * N[(-2.0 / N[(b + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b - t$95$1), $MachinePrecision] / N[(-2.0 * a), $MachinePrecision]), $MachinePrecision]], If[GreaterEqual[b, 0.0], N[(N[(c * 2.0), $MachinePrecision] / N[((-b) - N[(b * N[Sqrt[N[(-4.0 * N[(N[(c / b), $MachinePrecision] * N[(a / b), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{b \cdot -2}{2 \cdot a}\\
t_1 := \sqrt{\mathsf{fma}\left(c, a \cdot -4, b \cdot b\right)}\\
\mathbf{if}\;b \leq -3.4 \cdot 10^{+161}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\frac{-1}{\frac{b}{c}}\\

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


\end{array}\\

\mathbf{elif}\;b \leq -1.25 \cdot 10^{-174}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\frac{c \cdot 2}{2 \cdot \mathsf{fma}\left(a, \frac{c}{b}, -b\right)}\\

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


\end{array}\\

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

\mathbf{else}:\\
\;\;\;\;\frac{0.5}{a} \cdot \left(\mathsf{hypot}\left(b, \sqrt{\left(c \cdot a\right) \cdot -4}\right) - b\right)\\


\end{array}\\

\mathbf{elif}\;b \leq 7.8 \cdot 10^{-116}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;c \cdot \frac{-2}{b + t\_1}\\

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


\end{array}\\

\mathbf{elif}\;b \geq 0:\\
\;\;\;\;\frac{c \cdot 2}{\left(-b\right) - b \cdot \sqrt{\mathsf{fma}\left(-4, \frac{c}{b} \cdot \frac{a}{b}, 1\right)}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if b < -3.39999999999999993e161

    1. Initial program 35.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. Add Preprocessing
    3. Taylor expanded in b around -inf 97.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}:\\ \;\;\;\;\frac{-2 \cdot b}{2 \cdot a}\\ \end{array} \]
    4. Step-by-step derivation
      1. *-commutative97.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}:\\ \;\;\;\;\frac{b \cdot -2}{2 \cdot a}\\ \end{array} \]
    5. Simplified97.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}:\\ \;\;\;\;\frac{b \cdot -2}{2 \cdot a}\\ \end{array} \]
    6. Applied egg-rr97.6%

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

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

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

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

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

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

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

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

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

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

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

    if -3.39999999999999993e161 < b < -1.2500000000000001e-174

    1. Initial program 94.2%

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

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

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

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

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

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

    if -1.2500000000000001e-174 < b < -2.1999999999999999e-206

    1. Initial program 74.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{2 \cdot \frac{a \cdot c}{b} - 2 \cdot b}\\ \mathbf{else}:\\ \;\;\;\;\frac{0.5}{a} \cdot \left(\mathsf{hypot}\left(b, \sqrt{\left(c \cdot a\right) \cdot -4}\right) - b\right)\\ \end{array} \]
    10. Simplified85.9%

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

    if -2.1999999999999999e-206 < b < 7.8000000000000001e-116

    1. Initial program 76.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. Simplified76.0%

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

    if 7.8000000000000001e-116 < b

    1. Initial program 75.5%

      \[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
    2. Add Preprocessing
    3. Taylor expanded in b around -inf 75.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{-2 \cdot b}{2 \cdot a}\\ \end{array} \]
    4. Step-by-step derivation
      1. *-commutative75.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 \cdot -2}{2 \cdot a}\\ \end{array} \]
    5. Simplified75.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 \cdot -2}{2 \cdot a}\\ \end{array} \]
    6. Taylor expanded in b around inf 74.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -3.4 \cdot 10^{+161}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{-1}{\frac{b}{c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b \cdot -2}{2 \cdot a}\\ \end{array}\\ \mathbf{elif}\;b \leq -1.25 \cdot 10^{-174}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{c \cdot 2}{2 \cdot \mathsf{fma}\left(a, \frac{c}{b}, -b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b}{2 \cdot a}\\ \end{array}\\ \mathbf{elif}\;b \leq -2.2 \cdot 10^{-206}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{c \cdot 2}{2 \cdot \frac{c \cdot a}{b} - b \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{0.5}{a} \cdot \left(\mathsf{hypot}\left(b, \sqrt{\left(c \cdot a\right) \cdot -4}\right) - b\right)\\ \end{array}\\ \mathbf{elif}\;b \leq 7.8 \cdot 10^{-116}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{-2}{b + \sqrt{\mathsf{fma}\left(c, a \cdot -4, b \cdot b\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b - \sqrt{\mathsf{fma}\left(c, a \cdot -4, b \cdot b\right)}}{-2 \cdot a}\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;\frac{c \cdot 2}{\left(-b\right) - b \cdot \sqrt{\mathsf{fma}\left(-4, \frac{c}{b} \cdot \frac{a}{b}, 1\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b \cdot -2}{2 \cdot a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 91.0% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{b \cdot -2}{2 \cdot a}\\ t_1 := \sqrt{\mathsf{fma}\left(c, a \cdot -4, b \cdot b\right)}\\ \mathbf{if}\;b \leq -3.4 \cdot 10^{+161}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{-1}{\frac{b}{c}}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array}\\ \mathbf{elif}\;b \leq -1.25 \cdot 10^{-174}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{c \cdot 2}{2 \cdot \mathsf{fma}\left(a, \frac{c}{b}, -b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b}{2 \cdot a}\\ \end{array}\\ \mathbf{elif}\;b \leq -2.55 \cdot 10^{-207}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{c \cdot 2}{2 \cdot \frac{c \cdot a}{b} - b \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{0.5}{a} \cdot \left(\mathsf{hypot}\left(b, \sqrt{\left(c \cdot a\right) \cdot -4}\right) - b\right)\\ \end{array}\\ \mathbf{elif}\;b \leq 8.2 \cdot 10^{-105}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{-2}{b + t\_1}\\ \mathbf{else}:\\ \;\;\;\;\frac{b - t\_1}{-2 \cdot a}\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;\frac{c \cdot \left(-2\right)}{b + b \cdot \sqrt{\mathsf{fma}\left(-4, a \cdot \frac{\frac{c}{b}}{b}, 1\right)}}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (let* ((t_0 (/ (* b -2.0) (* 2.0 a))) (t_1 (sqrt (fma c (* a -4.0) (* b b)))))
   (if (<= b -3.4e+161)
     (if (>= b 0.0) (/ -1.0 (/ b c)) t_0)
     (if (<= b -1.25e-174)
       (if (>= b 0.0)
         (/ (* c 2.0) (* 2.0 (fma a (/ c b) (- b))))
         (/ (- (sqrt (- (* b b) (* c (* a 4.0)))) b) (* 2.0 a)))
       (if (<= b -2.55e-207)
         (if (>= b 0.0)
           (/ (* c 2.0) (- (* 2.0 (/ (* c a) b)) (* b 2.0)))
           (* (/ 0.5 a) (- (hypot b (sqrt (* (* c a) -4.0))) b)))
         (if (<= b 8.2e-105)
           (if (>= b 0.0) (* c (/ -2.0 (+ b t_1))) (/ (- b t_1) (* -2.0 a)))
           (if (>= b 0.0)
             (/
              (* c (- 2.0))
              (+ b (* b (sqrt (fma -4.0 (* a (/ (/ c b) b)) 1.0)))))
             t_0)))))))
double code(double a, double b, double c) {
	double t_0 = (b * -2.0) / (2.0 * a);
	double t_1 = sqrt(fma(c, (a * -4.0), (b * b)));
	double tmp_1;
	if (b <= -3.4e+161) {
		double tmp_2;
		if (b >= 0.0) {
			tmp_2 = -1.0 / (b / c);
		} else {
			tmp_2 = t_0;
		}
		tmp_1 = tmp_2;
	} else if (b <= -1.25e-174) {
		double tmp_3;
		if (b >= 0.0) {
			tmp_3 = (c * 2.0) / (2.0 * fma(a, (c / b), -b));
		} else {
			tmp_3 = (sqrt(((b * b) - (c * (a * 4.0)))) - b) / (2.0 * a);
		}
		tmp_1 = tmp_3;
	} else if (b <= -2.55e-207) {
		double tmp_4;
		if (b >= 0.0) {
			tmp_4 = (c * 2.0) / ((2.0 * ((c * a) / b)) - (b * 2.0));
		} else {
			tmp_4 = (0.5 / a) * (hypot(b, sqrt(((c * a) * -4.0))) - b);
		}
		tmp_1 = tmp_4;
	} else if (b <= 8.2e-105) {
		double tmp_5;
		if (b >= 0.0) {
			tmp_5 = c * (-2.0 / (b + t_1));
		} else {
			tmp_5 = (b - t_1) / (-2.0 * a);
		}
		tmp_1 = tmp_5;
	} else if (b >= 0.0) {
		tmp_1 = (c * -2.0) / (b + (b * sqrt(fma(-4.0, (a * ((c / b) / b)), 1.0))));
	} else {
		tmp_1 = t_0;
	}
	return tmp_1;
}
function code(a, b, c)
	t_0 = Float64(Float64(b * -2.0) / Float64(2.0 * a))
	t_1 = sqrt(fma(c, Float64(a * -4.0), Float64(b * b)))
	tmp_1 = 0.0
	if (b <= -3.4e+161)
		tmp_2 = 0.0
		if (b >= 0.0)
			tmp_2 = Float64(-1.0 / Float64(b / c));
		else
			tmp_2 = t_0;
		end
		tmp_1 = tmp_2;
	elseif (b <= -1.25e-174)
		tmp_3 = 0.0
		if (b >= 0.0)
			tmp_3 = Float64(Float64(c * 2.0) / Float64(2.0 * fma(a, Float64(c / b), Float64(-b))));
		else
			tmp_3 = Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(c * Float64(a * 4.0)))) - b) / Float64(2.0 * a));
		end
		tmp_1 = tmp_3;
	elseif (b <= -2.55e-207)
		tmp_4 = 0.0
		if (b >= 0.0)
			tmp_4 = Float64(Float64(c * 2.0) / Float64(Float64(2.0 * Float64(Float64(c * a) / b)) - Float64(b * 2.0)));
		else
			tmp_4 = Float64(Float64(0.5 / a) * Float64(hypot(b, sqrt(Float64(Float64(c * a) * -4.0))) - b));
		end
		tmp_1 = tmp_4;
	elseif (b <= 8.2e-105)
		tmp_5 = 0.0
		if (b >= 0.0)
			tmp_5 = Float64(c * Float64(-2.0 / Float64(b + t_1)));
		else
			tmp_5 = Float64(Float64(b - t_1) / Float64(-2.0 * a));
		end
		tmp_1 = tmp_5;
	elseif (b >= 0.0)
		tmp_1 = Float64(Float64(c * Float64(-2.0)) / Float64(b + Float64(b * sqrt(fma(-4.0, Float64(a * Float64(Float64(c / b) / b)), 1.0)))));
	else
		tmp_1 = t_0;
	end
	return tmp_1
end
code[a_, b_, c_] := Block[{t$95$0 = N[(N[(b * -2.0), $MachinePrecision] / N[(2.0 * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(c * N[(a * -4.0), $MachinePrecision] + N[(b * b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[b, -3.4e+161], If[GreaterEqual[b, 0.0], N[(-1.0 / N[(b / c), $MachinePrecision]), $MachinePrecision], t$95$0], If[LessEqual[b, -1.25e-174], If[GreaterEqual[b, 0.0], N[(N[(c * 2.0), $MachinePrecision] / N[(2.0 * N[(a * N[(c / b), $MachinePrecision] + (-b)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(c * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(2.0 * a), $MachinePrecision]), $MachinePrecision]], If[LessEqual[b, -2.55e-207], If[GreaterEqual[b, 0.0], N[(N[(c * 2.0), $MachinePrecision] / N[(N[(2.0 * N[(N[(c * a), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision] - N[(b * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.5 / a), $MachinePrecision] * N[(N[Sqrt[b ^ 2 + N[Sqrt[N[(N[(c * a), $MachinePrecision] * -4.0), $MachinePrecision]], $MachinePrecision] ^ 2], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]], If[LessEqual[b, 8.2e-105], If[GreaterEqual[b, 0.0], N[(c * N[(-2.0 / N[(b + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b - t$95$1), $MachinePrecision] / N[(-2.0 * a), $MachinePrecision]), $MachinePrecision]], If[GreaterEqual[b, 0.0], N[(N[(c * (-2.0)), $MachinePrecision] / N[(b + N[(b * N[Sqrt[N[(-4.0 * N[(a * N[(N[(c / b), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{b \cdot -2}{2 \cdot a}\\
t_1 := \sqrt{\mathsf{fma}\left(c, a \cdot -4, b \cdot b\right)}\\
\mathbf{if}\;b \leq -3.4 \cdot 10^{+161}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\frac{-1}{\frac{b}{c}}\\

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


\end{array}\\

\mathbf{elif}\;b \leq -1.25 \cdot 10^{-174}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\frac{c \cdot 2}{2 \cdot \mathsf{fma}\left(a, \frac{c}{b}, -b\right)}\\

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


\end{array}\\

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

\mathbf{else}:\\
\;\;\;\;\frac{0.5}{a} \cdot \left(\mathsf{hypot}\left(b, \sqrt{\left(c \cdot a\right) \cdot -4}\right) - b\right)\\


\end{array}\\

\mathbf{elif}\;b \leq 8.2 \cdot 10^{-105}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;c \cdot \frac{-2}{b + t\_1}\\

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


\end{array}\\

\mathbf{elif}\;b \geq 0:\\
\;\;\;\;\frac{c \cdot \left(-2\right)}{b + b \cdot \sqrt{\mathsf{fma}\left(-4, a \cdot \frac{\frac{c}{b}}{b}, 1\right)}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if b < -3.39999999999999993e161

    1. Initial program 35.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. Add Preprocessing
    3. Taylor expanded in b around -inf 97.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}:\\ \;\;\;\;\frac{-2 \cdot b}{2 \cdot a}\\ \end{array} \]
    4. Step-by-step derivation
      1. *-commutative97.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}:\\ \;\;\;\;\frac{b \cdot -2}{2 \cdot a}\\ \end{array} \]
    5. Simplified97.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}:\\ \;\;\;\;\frac{b \cdot -2}{2 \cdot a}\\ \end{array} \]
    6. Applied egg-rr97.6%

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

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

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

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

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

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

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

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

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

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

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

    if -3.39999999999999993e161 < b < -1.2500000000000001e-174

    1. Initial program 94.2%

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

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

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

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

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

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

    if -1.2500000000000001e-174 < b < -2.5500000000000002e-207

    1. Initial program 74.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{2 \cdot \frac{a \cdot c}{b} - 2 \cdot b}\\ \mathbf{else}:\\ \;\;\;\;\frac{0.5}{a} \cdot \left(\mathsf{hypot}\left(b, \sqrt{\left(c \cdot a\right) \cdot -4}\right) - b\right)\\ \end{array} \]
    10. Simplified85.9%

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

    if -2.5500000000000002e-207 < b < 8.20000000000000061e-105

    1. Initial program 76.4%

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

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

    if 8.20000000000000061e-105 < b

    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. Add Preprocessing
    3. Taylor expanded in b around -inf 75.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{-2 \cdot b}{2 \cdot a}\\ \end{array} \]
    4. Step-by-step derivation
      1. *-commutative75.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 \cdot -2}{2 \cdot a}\\ \end{array} \]
    5. Simplified75.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 \cdot -2}{2 \cdot a}\\ \end{array} \]
    6. Taylor expanded in b around inf 75.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -3.4 \cdot 10^{+161}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{-1}{\frac{b}{c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b \cdot -2}{2 \cdot a}\\ \end{array}\\ \mathbf{elif}\;b \leq -1.25 \cdot 10^{-174}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{c \cdot 2}{2 \cdot \mathsf{fma}\left(a, \frac{c}{b}, -b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b}{2 \cdot a}\\ \end{array}\\ \mathbf{elif}\;b \leq -2.55 \cdot 10^{-207}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{c \cdot 2}{2 \cdot \frac{c \cdot a}{b} - b \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{0.5}{a} \cdot \left(\mathsf{hypot}\left(b, \sqrt{\left(c \cdot a\right) \cdot -4}\right) - b\right)\\ \end{array}\\ \mathbf{elif}\;b \leq 8.2 \cdot 10^{-105}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{-2}{b + \sqrt{\mathsf{fma}\left(c, a \cdot -4, b \cdot b\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b - \sqrt{\mathsf{fma}\left(c, a \cdot -4, b \cdot b\right)}}{-2 \cdot a}\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;\frac{c \cdot \left(-2\right)}{b + b \cdot \sqrt{\mathsf{fma}\left(-4, a \cdot \frac{\frac{c}{b}}{b}, 1\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b \cdot -2}{2 \cdot a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 81.4% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{c \cdot 2}{2 \cdot \mathsf{fma}\left(a, \frac{c}{b}, -b\right)}\\ t_1 := \frac{b \cdot -2}{2 \cdot a}\\ t_2 := \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{c \cdot 2}{\left(-b\right) - \sqrt{\left(c \cdot a\right) \cdot -4}}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array}\\ \mathbf{if}\;b \leq -4.8 \cdot 10^{+178}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{-1}{\frac{b}{c}}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array}\\ \mathbf{elif}\;b \leq -7.5 \cdot 10^{-240}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b}{2 \cdot a}\\ \end{array}\\ \mathbf{elif}\;b \leq 1.28 \cdot 10^{-107}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;b \leq 4.9 \cdot 10^{-86}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{c}{c \cdot \frac{a}{b} - b}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) - b}{2 \cdot a}\\ \end{array}\\ \mathbf{elif}\;b \leq 8.6 \cdot 10^{-48}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{a \cdot \left(c \cdot -2\right)}{b}}{2 \cdot a}\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (let* ((t_0 (/ (* c 2.0) (* 2.0 (fma a (/ c b) (- b)))))
        (t_1 (/ (* b -2.0) (* 2.0 a)))
        (t_2
         (if (>= b 0.0) (/ (* c 2.0) (- (- b) (sqrt (* (* c a) -4.0)))) t_1)))
   (if (<= b -4.8e+178)
     (if (>= b 0.0) (/ -1.0 (/ b c)) t_1)
     (if (<= b -7.5e-240)
       (if (>= b 0.0)
         t_0
         (/ (- (sqrt (- (* b b) (* c (* a 4.0)))) b) (* 2.0 a)))
       (if (<= b 1.28e-107)
         t_2
         (if (<= b 4.9e-86)
           (if (>= b 0.0) (/ c (- (* c (/ a b)) b)) (/ (- (- b) b) (* 2.0 a)))
           (if (<= b 8.6e-48)
             t_2
             (if (>= b 0.0) t_0 (/ (/ (* a (* c -2.0)) b) (* 2.0 a))))))))))
double code(double a, double b, double c) {
	double t_0 = (c * 2.0) / (2.0 * fma(a, (c / b), -b));
	double t_1 = (b * -2.0) / (2.0 * a);
	double tmp;
	if (b >= 0.0) {
		tmp = (c * 2.0) / (-b - sqrt(((c * a) * -4.0)));
	} else {
		tmp = t_1;
	}
	double t_2 = tmp;
	double tmp_2;
	if (b <= -4.8e+178) {
		double tmp_3;
		if (b >= 0.0) {
			tmp_3 = -1.0 / (b / c);
		} else {
			tmp_3 = t_1;
		}
		tmp_2 = tmp_3;
	} else if (b <= -7.5e-240) {
		double tmp_4;
		if (b >= 0.0) {
			tmp_4 = t_0;
		} else {
			tmp_4 = (sqrt(((b * b) - (c * (a * 4.0)))) - b) / (2.0 * a);
		}
		tmp_2 = tmp_4;
	} else if (b <= 1.28e-107) {
		tmp_2 = t_2;
	} else if (b <= 4.9e-86) {
		double tmp_5;
		if (b >= 0.0) {
			tmp_5 = c / ((c * (a / b)) - b);
		} else {
			tmp_5 = (-b - b) / (2.0 * a);
		}
		tmp_2 = tmp_5;
	} else if (b <= 8.6e-48) {
		tmp_2 = t_2;
	} else if (b >= 0.0) {
		tmp_2 = t_0;
	} else {
		tmp_2 = ((a * (c * -2.0)) / b) / (2.0 * a);
	}
	return tmp_2;
}
function code(a, b, c)
	t_0 = Float64(Float64(c * 2.0) / Float64(2.0 * fma(a, Float64(c / b), Float64(-b))))
	t_1 = Float64(Float64(b * -2.0) / Float64(2.0 * a))
	tmp = 0.0
	if (b >= 0.0)
		tmp = Float64(Float64(c * 2.0) / Float64(Float64(-b) - sqrt(Float64(Float64(c * a) * -4.0))));
	else
		tmp = t_1;
	end
	t_2 = tmp
	tmp_2 = 0.0
	if (b <= -4.8e+178)
		tmp_3 = 0.0
		if (b >= 0.0)
			tmp_3 = Float64(-1.0 / Float64(b / c));
		else
			tmp_3 = t_1;
		end
		tmp_2 = tmp_3;
	elseif (b <= -7.5e-240)
		tmp_4 = 0.0
		if (b >= 0.0)
			tmp_4 = t_0;
		else
			tmp_4 = Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(c * Float64(a * 4.0)))) - b) / Float64(2.0 * a));
		end
		tmp_2 = tmp_4;
	elseif (b <= 1.28e-107)
		tmp_2 = t_2;
	elseif (b <= 4.9e-86)
		tmp_5 = 0.0
		if (b >= 0.0)
			tmp_5 = Float64(c / Float64(Float64(c * Float64(a / b)) - b));
		else
			tmp_5 = Float64(Float64(Float64(-b) - b) / Float64(2.0 * a));
		end
		tmp_2 = tmp_5;
	elseif (b <= 8.6e-48)
		tmp_2 = t_2;
	elseif (b >= 0.0)
		tmp_2 = t_0;
	else
		tmp_2 = Float64(Float64(Float64(a * Float64(c * -2.0)) / b) / Float64(2.0 * a));
	end
	return tmp_2
end
code[a_, b_, c_] := Block[{t$95$0 = N[(N[(c * 2.0), $MachinePrecision] / N[(2.0 * N[(a * N[(c / b), $MachinePrecision] + (-b)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(b * -2.0), $MachinePrecision] / N[(2.0 * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = If[GreaterEqual[b, 0.0], N[(N[(c * 2.0), $MachinePrecision] / N[((-b) - N[Sqrt[N[(N[(c * a), $MachinePrecision] * -4.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]}, If[LessEqual[b, -4.8e+178], If[GreaterEqual[b, 0.0], N[(-1.0 / N[(b / c), $MachinePrecision]), $MachinePrecision], t$95$1], If[LessEqual[b, -7.5e-240], If[GreaterEqual[b, 0.0], t$95$0, N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(c * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(2.0 * a), $MachinePrecision]), $MachinePrecision]], If[LessEqual[b, 1.28e-107], t$95$2, If[LessEqual[b, 4.9e-86], If[GreaterEqual[b, 0.0], N[(c / N[(N[(c * N[(a / b), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision], N[(N[((-b) - b), $MachinePrecision] / N[(2.0 * a), $MachinePrecision]), $MachinePrecision]], If[LessEqual[b, 8.6e-48], t$95$2, If[GreaterEqual[b, 0.0], t$95$0, N[(N[(N[(a * N[(c * -2.0), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision] / N[(2.0 * a), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{c \cdot 2}{2 \cdot \mathsf{fma}\left(a, \frac{c}{b}, -b\right)}\\
t_1 := \frac{b \cdot -2}{2 \cdot a}\\
t_2 := \begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\frac{c \cdot 2}{\left(-b\right) - \sqrt{\left(c \cdot a\right) \cdot -4}}\\

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


\end{array}\\
\mathbf{if}\;b \leq -4.8 \cdot 10^{+178}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\frac{-1}{\frac{b}{c}}\\

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


\end{array}\\

\mathbf{elif}\;b \leq -7.5 \cdot 10^{-240}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;t\_0\\

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


\end{array}\\

\mathbf{elif}\;b \leq 1.28 \cdot 10^{-107}:\\
\;\;\;\;t\_2\\

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

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


\end{array}\\

\mathbf{elif}\;b \leq 8.6 \cdot 10^{-48}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;b \geq 0:\\
\;\;\;\;t\_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if b < -4.8e178

    1. Initial program 37.5%

      \[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
    2. Add Preprocessing
    3. Taylor expanded in b around -inf 97.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{-2 \cdot b}{2 \cdot a}\\ \end{array} \]
    4. Step-by-step derivation
      1. *-commutative97.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 \cdot -2}{2 \cdot a}\\ \end{array} \]
    5. Simplified97.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 \cdot -2}{2 \cdot a}\\ \end{array} \]
    6. Applied egg-rr97.2%

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

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

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

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

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

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

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

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

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

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

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

    if -4.8e178 < b < -7.4999999999999995e-240

    1. Initial program 86.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. Add Preprocessing
    3. Taylor expanded in a around 0 86.1%

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

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

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

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

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

    if -7.4999999999999995e-240 < b < 1.28e-107 or 4.89999999999999972e-86 < b < 8.6e-48

    1. Initial program 77.7%

      \[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
    2. Add Preprocessing
    3. Taylor expanded in b around -inf 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{-2 \cdot b}{2 \cdot a}\\ \end{array} \]
    4. Step-by-step derivation
      1. *-commutative68.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 \cdot -2}{2 \cdot a}\\ \end{array} \]
    5. 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 \cdot -2}{2 \cdot a}\\ \end{array} \]
    6. Taylor expanded in b around 0 66.8%

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

    if 1.28e-107 < b < 4.89999999999999972e-86

    1. Initial program 84.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \left(2 \cdot \frac{1}{2 \cdot \left(a \cdot \color{blue}{\frac{1}{\frac{b}{c}}} - b\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + -1 \cdot b}{2 \cdot a}\\ \end{array} \]
      9. un-div-inv83.7%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \left(2 \cdot \frac{1}{2 \cdot \left(\color{blue}{\frac{a}{\frac{b}{c}}} - b\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + -1 \cdot b}{2 \cdot a}\\ \end{array} \]
    8. Applied egg-rr83.7%

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

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

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

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

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

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

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

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

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

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

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

    if 8.6e-48 < b

    1. Initial program 74.9%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -4.8 \cdot 10^{+178}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{-1}{\frac{b}{c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b \cdot -2}{2 \cdot a}\\ \end{array}\\ \mathbf{elif}\;b \leq -7.5 \cdot 10^{-240}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{c \cdot 2}{2 \cdot \mathsf{fma}\left(a, \frac{c}{b}, -b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b}{2 \cdot a}\\ \end{array}\\ \mathbf{elif}\;b \leq 1.28 \cdot 10^{-107}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{c \cdot 2}{\left(-b\right) - \sqrt{\left(c \cdot a\right) \cdot -4}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b \cdot -2}{2 \cdot a}\\ \end{array}\\ \mathbf{elif}\;b \leq 4.9 \cdot 10^{-86}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{c}{c \cdot \frac{a}{b} - b}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) - b}{2 \cdot a}\\ \end{array}\\ \mathbf{elif}\;b \leq 8.6 \cdot 10^{-48}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{c \cdot 2}{\left(-b\right) - \sqrt{\left(c \cdot a\right) \cdot -4}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b \cdot -2}{2 \cdot a}\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;\frac{c \cdot 2}{2 \cdot \mathsf{fma}\left(a, \frac{c}{b}, -b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{a \cdot \left(c \cdot -2\right)}{b}}{2 \cdot a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 86.8% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\\ t_1 := \frac{b \cdot -2}{2 \cdot a}\\ \mathbf{if}\;b \leq -4.8 \cdot 10^{+178}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{-1}{\frac{b}{c}}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array}\\ \mathbf{elif}\;b \leq -7.5 \cdot 10^{-240}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{c \cdot 2}{2 \cdot \mathsf{fma}\left(a, \frac{c}{b}, -b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{t\_0 - b}{2 \cdot a}\\ \end{array}\\ \mathbf{elif}\;b \leq 1.5 \cdot 10^{+131}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{c \cdot 2}{\left(-b\right) - t\_0}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;\frac{c}{-b}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (let* ((t_0 (sqrt (- (* b b) (* c (* a 4.0)))))
        (t_1 (/ (* b -2.0) (* 2.0 a))))
   (if (<= b -4.8e+178)
     (if (>= b 0.0) (/ -1.0 (/ b c)) t_1)
     (if (<= b -7.5e-240)
       (if (>= b 0.0)
         (/ (* c 2.0) (* 2.0 (fma a (/ c b) (- b))))
         (/ (- t_0 b) (* 2.0 a)))
       (if (<= b 1.5e+131)
         (if (>= b 0.0) (/ (* c 2.0) (- (- b) t_0)) t_1)
         (if (>= b 0.0) (/ c (- b)) t_1))))))
double code(double a, double b, double c) {
	double t_0 = sqrt(((b * b) - (c * (a * 4.0))));
	double t_1 = (b * -2.0) / (2.0 * a);
	double tmp_1;
	if (b <= -4.8e+178) {
		double tmp_2;
		if (b >= 0.0) {
			tmp_2 = -1.0 / (b / c);
		} else {
			tmp_2 = t_1;
		}
		tmp_1 = tmp_2;
	} else if (b <= -7.5e-240) {
		double tmp_3;
		if (b >= 0.0) {
			tmp_3 = (c * 2.0) / (2.0 * fma(a, (c / b), -b));
		} else {
			tmp_3 = (t_0 - b) / (2.0 * a);
		}
		tmp_1 = tmp_3;
	} else if (b <= 1.5e+131) {
		double tmp_4;
		if (b >= 0.0) {
			tmp_4 = (c * 2.0) / (-b - t_0);
		} else {
			tmp_4 = t_1;
		}
		tmp_1 = tmp_4;
	} else if (b >= 0.0) {
		tmp_1 = c / -b;
	} else {
		tmp_1 = t_1;
	}
	return tmp_1;
}
function code(a, b, c)
	t_0 = sqrt(Float64(Float64(b * b) - Float64(c * Float64(a * 4.0))))
	t_1 = Float64(Float64(b * -2.0) / Float64(2.0 * a))
	tmp_1 = 0.0
	if (b <= -4.8e+178)
		tmp_2 = 0.0
		if (b >= 0.0)
			tmp_2 = Float64(-1.0 / Float64(b / c));
		else
			tmp_2 = t_1;
		end
		tmp_1 = tmp_2;
	elseif (b <= -7.5e-240)
		tmp_3 = 0.0
		if (b >= 0.0)
			tmp_3 = Float64(Float64(c * 2.0) / Float64(2.0 * fma(a, Float64(c / b), Float64(-b))));
		else
			tmp_3 = Float64(Float64(t_0 - b) / Float64(2.0 * a));
		end
		tmp_1 = tmp_3;
	elseif (b <= 1.5e+131)
		tmp_4 = 0.0
		if (b >= 0.0)
			tmp_4 = Float64(Float64(c * 2.0) / Float64(Float64(-b) - t_0));
		else
			tmp_4 = t_1;
		end
		tmp_1 = tmp_4;
	elseif (b >= 0.0)
		tmp_1 = Float64(c / Float64(-b));
	else
		tmp_1 = t_1;
	end
	return tmp_1
end
code[a_, b_, c_] := Block[{t$95$0 = N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(c * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[(b * -2.0), $MachinePrecision] / N[(2.0 * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -4.8e+178], If[GreaterEqual[b, 0.0], N[(-1.0 / N[(b / c), $MachinePrecision]), $MachinePrecision], t$95$1], If[LessEqual[b, -7.5e-240], If[GreaterEqual[b, 0.0], N[(N[(c * 2.0), $MachinePrecision] / N[(2.0 * N[(a * N[(c / b), $MachinePrecision] + (-b)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$0 - b), $MachinePrecision] / N[(2.0 * a), $MachinePrecision]), $MachinePrecision]], If[LessEqual[b, 1.5e+131], If[GreaterEqual[b, 0.0], N[(N[(c * 2.0), $MachinePrecision] / N[((-b) - t$95$0), $MachinePrecision]), $MachinePrecision], t$95$1], If[GreaterEqual[b, 0.0], N[(c / (-b)), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}

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

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


\end{array}\\

\mathbf{elif}\;b \leq -7.5 \cdot 10^{-240}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\frac{c \cdot 2}{2 \cdot \mathsf{fma}\left(a, \frac{c}{b}, -b\right)}\\

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


\end{array}\\

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

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


\end{array}\\

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

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


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

    1. Initial program 37.5%

      \[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
    2. Add Preprocessing
    3. Taylor expanded in b around -inf 97.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{-2 \cdot b}{2 \cdot a}\\ \end{array} \]
    4. Step-by-step derivation
      1. *-commutative97.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 \cdot -2}{2 \cdot a}\\ \end{array} \]
    5. Simplified97.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 \cdot -2}{2 \cdot a}\\ \end{array} \]
    6. Applied egg-rr97.2%

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

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

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

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

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

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

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

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

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

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

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

    if -4.8e178 < b < -7.4999999999999995e-240

    1. Initial program 86.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. Add Preprocessing
    3. Taylor expanded in a around 0 86.1%

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

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

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

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

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

    if -7.4999999999999995e-240 < b < 1.5000000000000001e131

    1. Initial program 85.5%

      \[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
    2. Add Preprocessing
    3. Taylor expanded in b around -inf 81.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}:\\ \;\;\;\;\frac{-2 \cdot b}{2 \cdot a}\\ \end{array} \]
    4. Step-by-step derivation
      1. *-commutative81.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}:\\ \;\;\;\;\frac{b \cdot -2}{2 \cdot a}\\ \end{array} \]
    5. Simplified81.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}:\\ \;\;\;\;\frac{b \cdot -2}{2 \cdot a}\\ \end{array} \]

    if 1.5000000000000001e131 < b

    1. Initial program 52.2%

      \[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
    2. Add Preprocessing
    3. Taylor expanded in b around -inf 52.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{-2 \cdot b}{2 \cdot a}\\ \end{array} \]
    4. Step-by-step derivation
      1. *-commutative52.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 \cdot -2}{2 \cdot a}\\ \end{array} \]
    5. Simplified52.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 \cdot -2}{2 \cdot a}\\ \end{array} \]
    6. Taylor expanded in c around 0 100.0%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -4.8 \cdot 10^{+178}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{-1}{\frac{b}{c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b \cdot -2}{2 \cdot a}\\ \end{array}\\ \mathbf{elif}\;b \leq -7.5 \cdot 10^{-240}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{c \cdot 2}{2 \cdot \mathsf{fma}\left(a, \frac{c}{b}, -b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b}{2 \cdot a}\\ \end{array}\\ \mathbf{elif}\;b \leq 1.5 \cdot 10^{+131}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{c \cdot 2}{\left(-b\right) - \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b \cdot -2}{2 \cdot a}\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;\frac{c}{-b}\\ \mathbf{else}:\\ \;\;\;\;\frac{b \cdot -2}{2 \cdot a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 89.5% accurate, 0.9× speedup?

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

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

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


\end{array}\\

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

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


\end{array}\\

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

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


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

    1. Initial program 37.5%

      \[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
    2. Add Preprocessing
    3. Taylor expanded in b around -inf 97.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{-2 \cdot b}{2 \cdot a}\\ \end{array} \]
    4. Step-by-step derivation
      1. *-commutative97.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 \cdot -2}{2 \cdot a}\\ \end{array} \]
    5. Simplified97.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 \cdot -2}{2 \cdot a}\\ \end{array} \]
    6. Applied egg-rr97.2%

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

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

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

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

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

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

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

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

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

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

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

    if -4.8e178 < b < 9.9999999999999991e130

    1. Initial program 85.8%

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

    if 9.9999999999999991e130 < b

    1. Initial program 52.2%

      \[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
    2. Add Preprocessing
    3. Taylor expanded in b around -inf 52.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{-2 \cdot b}{2 \cdot a}\\ \end{array} \]
    4. Step-by-step derivation
      1. *-commutative52.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 \cdot -2}{2 \cdot a}\\ \end{array} \]
    5. Simplified52.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 \cdot -2}{2 \cdot a}\\ \end{array} \]
    6. Taylor expanded in c around 0 100.0%

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

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

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

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

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

Alternative 7: 73.3% accurate, 1.0× speedup?

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

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

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


\end{array}\\

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

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


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

    1. Initial program 73.8%

      \[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
    2. Add Preprocessing
    3. Taylor expanded in b around -inf 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{-2 \cdot b}{2 \cdot a}\\ \end{array} \]
    4. Step-by-step derivation
      1. *-commutative69.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{b \cdot -2}{2 \cdot a}\\ \end{array} \]
    5. 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{b \cdot -2}{2 \cdot a}\\ \end{array} \]
    6. Taylor expanded in b around 0 69.1%

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

    if 1.15000000000000001e-142 < b

    1. Initial program 76.2%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{2 \cdot \frac{a \cdot c}{b} - 2 \cdot b}}\\ \mathbf{else}:\\ \;\;\;\;\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 80.6%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \left(2 \cdot \frac{1}{2 \cdot \left(a \cdot \color{blue}{\frac{1}{\frac{b}{c}}} - b\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + -1 \cdot b}{2 \cdot a}\\ \end{array} \]
      9. un-div-inv81.3%

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{\left(c \cdot 2\right) \cdot 1}{2 \cdot \left(\frac{a}{\frac{b}{c}} - b\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + -1 \cdot b}{2 \cdot a}\\ \end{array} \]
      3. *-rgt-identity81.6%

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{1} \cdot \frac{c}{\frac{a}{\frac{b}{c}} - b}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + -1 \cdot b}{2 \cdot a}\\ \end{array} \]
      7. *-lft-identity81.6%

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

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

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

Alternative 8: 67.1% accurate, 10.1× speedup?

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

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

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


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

    \[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
  2. Add Preprocessing
  3. Taylor expanded in b around -inf 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{-2 \cdot b}{2 \cdot a}\\ \end{array} \]
  4. Step-by-step derivation
    1. *-commutative71.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{b \cdot -2}{2 \cdot a}\\ \end{array} \]
  5. 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{b \cdot -2}{2 \cdot a}\\ \end{array} \]
  6. Taylor expanded in c around 0 66.4%

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

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

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

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

Alternative 9: 66.6% accurate, 10.1× speedup?

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

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

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


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

    \[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
  2. Add Preprocessing
  3. Taylor expanded in b around -inf 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{-2 \cdot b}{2 \cdot a}\\ \end{array} \]
  4. Step-by-step derivation
    1. *-commutative71.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{b \cdot -2}{2 \cdot a}\\ \end{array} \]
  5. 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{b \cdot -2}{2 \cdot a}\\ \end{array} \]
  6. Applied egg-rr66.1%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{-1}{\frac{b}{c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b \cdot -2}{2 \cdot a}\\ \end{array} \]
  15. Add Preprocessing

Alternative 10: 3.7% accurate, 15.1× 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(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 74.8%

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{2 \cdot \frac{a \cdot c}{b} - 2 \cdot b}\\ \mathbf{else}:\\ \;\;\;\;-b \cdot \left(-1 \cdot \frac{c}{{b}^{2}} + \frac{1}{a}\right)\\ \end{array} \]
    2. distribute-rgt-neg-in65.0%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{2 \cdot \frac{a \cdot c}{b} - 2 \cdot b}\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(-\left(\frac{1}{a} - \frac{c}{{b}^{2}}\right)\right)\\ \end{array} \]
  7. Taylor expanded in b around 0 34.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{2 \cdot \frac{a \cdot c}{b} - 2 \cdot b}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b}\\ \end{array} \]
  8. Taylor expanded in c around inf 3.6%

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

Reproduce

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