jeff quadratic root 2

Percentage Accurate: 72.1% → 91.3%
Time: 19.8s
Alternatives: 23
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 23 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.1% 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: 91.3% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\\ t_1 := \frac{t\_0 - b}{a \cdot 2}\\ \mathbf{if}\;b \leq -3.5 \cdot 10^{+153}:\\ \;\;\;\;\frac{-b}{a}\\ \mathbf{elif}\;b \leq 2.4 \cdot 10^{-28}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - t\_0}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\mathsf{fma}\left(-b, \sqrt{\mathsf{fma}\left(a, -4 \cdot \frac{\frac{c}{b}}{b}, 1\right)}, -b\right)}\\ \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 (/ (- t_0 b) (* a 2.0))))
   (if (<= b -3.5e+153)
     (/ (- b) a)
     (if (<= b 2.4e-28)
       (if (>= b 0.0) (/ (* 2.0 c) (- (- b) t_0)) t_1)
       (if (>= b 0.0)
         (/
          (* 2.0 c)
          (fma (- b) (sqrt (fma a (* -4.0 (/ (/ c b) b)) 1.0)) (- b)))
         t_1)))))
double code(double a, double b, double c) {
	double t_0 = sqrt(((b * b) - (c * (a * 4.0))));
	double t_1 = (t_0 - b) / (a * 2.0);
	double tmp;
	if (b <= -3.5e+153) {
		tmp = -b / a;
	} else if (b <= 2.4e-28) {
		double tmp_1;
		if (b >= 0.0) {
			tmp_1 = (2.0 * c) / (-b - t_0);
		} else {
			tmp_1 = t_1;
		}
		tmp = tmp_1;
	} else if (b >= 0.0) {
		tmp = (2.0 * c) / fma(-b, sqrt(fma(a, (-4.0 * ((c / b) / b)), 1.0)), -b);
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(a, b, c)
	t_0 = sqrt(Float64(Float64(b * b) - Float64(c * Float64(a * 4.0))))
	t_1 = Float64(Float64(t_0 - b) / Float64(a * 2.0))
	tmp = 0.0
	if (b <= -3.5e+153)
		tmp = Float64(Float64(-b) / a);
	elseif (b <= 2.4e-28)
		tmp_1 = 0.0
		if (b >= 0.0)
			tmp_1 = Float64(Float64(2.0 * c) / Float64(Float64(-b) - t_0));
		else
			tmp_1 = t_1;
		end
		tmp = tmp_1;
	elseif (b >= 0.0)
		tmp = Float64(Float64(2.0 * c) / fma(Float64(-b), sqrt(fma(a, Float64(-4.0 * Float64(Float64(c / b) / b)), 1.0)), Float64(-b)));
	else
		tmp = t_1;
	end
	return tmp
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[(t$95$0 - b), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3.5e+153], N[((-b) / a), $MachinePrecision], If[LessEqual[b, 2.4e-28], If[GreaterEqual[b, 0.0], N[(N[(2.0 * c), $MachinePrecision] / N[((-b) - t$95$0), $MachinePrecision]), $MachinePrecision], t$95$1], If[GreaterEqual[b, 0.0], N[(N[(2.0 * c), $MachinePrecision] / N[((-b) * N[Sqrt[N[(a * N[(-4.0 * N[(N[(c / b), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision] + (-b)), $MachinePrecision]), $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{t\_0 - b}{a \cdot 2}\\
\mathbf{if}\;b \leq -3.5 \cdot 10^{+153}:\\
\;\;\;\;\frac{-b}{a}\\

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

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


\end{array}\\

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

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


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

    1. Initial program 42.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 b around -inf

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \end{array} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\mathsf{neg}\left(\frac{b}{a}\right)}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{neg}\left(\frac{b}{a}\right)\\ \end{array} \]
      2. distribute-neg-frac2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      3. mul-1-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{-1 \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{-1 \cdot a}\\ \end{array} \]
      4. lower-/.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{-1 \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{-1 \cdot a}\\ \end{array} \]
      5. mul-1-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      6. lower-neg.f6496.1

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{-a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \left(-b\right)}{2 \cdot a}\\ \end{array} \]
    9. Step-by-step derivation
      1. lift->=.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\color{blue}{b \geq 0}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      2. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      3. lift-/.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      4. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      5. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      6. count-2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      7. times-fracN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      8. metadata-evalN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      9. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\color{blue}{b}}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      10. distribute-frac-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      11. distribute-frac-neg2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      12. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\color{blue}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      13. clear-numN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      14. div-invN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      15. clear-numN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      16. lift-/.f6496.1

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

        \[\leadsto \color{blue}{\frac{b}{-a}} \]
      18. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}} \]
      19. frac-2negN/A

        \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(b\right)}{\mathsf{neg}\left(\left(\mathsf{neg}\left(a\right)\right)\right)}} \]
      20. lift-neg.f64N/A

        \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(b\right)}}{\mathsf{neg}\left(\left(\mathsf{neg}\left(a\right)\right)\right)} \]
      21. lift-neg.f64N/A

        \[\leadsto \frac{\mathsf{neg}\left(b\right)}{\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(a\right)\right)}\right)} \]
      22. remove-double-negN/A

        \[\leadsto \frac{\mathsf{neg}\left(b\right)}{\color{blue}{a}} \]
      23. lower-/.f6496.1

        \[\leadsto \color{blue}{\frac{-b}{a}} \]
    10. Applied egg-rr96.1%

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

    if -3.4999999999999999e153 < b < 2.4000000000000002e-28

    1. Initial program 81.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

    if 2.4000000000000002e-28 < b

    1. Initial program 61.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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{\left(\mathsf{neg}\left(b\right)\right)} - \sqrt{\left(b \cdot b\right) \cdot \left(\left(a \cdot -4\right) \cdot \frac{c}{b \cdot b} + 1\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{\left(b \cdot b\right) \cdot \left(\left(a \cdot -4\right) \cdot \frac{c}{b \cdot b} + 1\right)}}\\ \end{array} \]
      3. lift-*.f64N/A

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{\left(b \cdot b\right) \cdot \left(\color{blue}{\left(a \cdot -4\right)} \cdot \frac{c}{b \cdot b} + 1\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{\left(b \cdot b\right) \cdot \left(\left(a \cdot -4\right) \cdot \frac{c}{b \cdot b} + 1\right)}}\\ \end{array} \]
      5. lift-*.f64N/A

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{\left(b \cdot b\right) \cdot \left(\left(a \cdot -4\right) \cdot \color{blue}{\frac{c}{b \cdot b}} + 1\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{\left(b \cdot b\right) \cdot \left(\left(a \cdot -4\right) \cdot \frac{c}{b \cdot b} + 1\right)}}\\ \end{array} \]
      7. lift-fma.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\mathsf{fma}\left(-b, \sqrt{\mathsf{fma}\left(a, -4 \cdot \color{blue}{\frac{\frac{c}{b}}{b}}, 1\right)}, -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. Recombined 3 regimes into one program.
  4. Final simplification90.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -3.5 \cdot 10^{+153}:\\ \;\;\;\;\frac{-b}{a}\\ \mathbf{elif}\;b \leq 2.4 \cdot 10^{-28}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\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}{a \cdot 2}\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\mathsf{fma}\left(-b, \sqrt{\mathsf{fma}\left(a, -4 \cdot \frac{\frac{c}{b}}{b}, 1\right)}, -b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b}{a \cdot 2}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 90.8% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\\ t_1 := \frac{t\_0 - b}{a \cdot 2}\\ \mathbf{if}\;b \leq -3.5 \cdot 10^{+153}:\\ \;\;\;\;\frac{-b}{a}\\ \mathbf{elif}\;b \leq 2.4 \cdot 10^{-28}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - t\_0}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\mathsf{fma}\left(-b, \sqrt{\mathsf{fma}\left(a, -4 \cdot \left(c \cdot \frac{1}{b \cdot b}\right), 1\right)}, -b\right)}\\ \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 (/ (- t_0 b) (* a 2.0))))
   (if (<= b -3.5e+153)
     (/ (- b) a)
     (if (<= b 2.4e-28)
       (if (>= b 0.0) (/ (* 2.0 c) (- (- b) t_0)) t_1)
       (if (>= b 0.0)
         (/
          (* 2.0 c)
          (fma (- b) (sqrt (fma a (* -4.0 (* c (/ 1.0 (* b b)))) 1.0)) (- b)))
         t_1)))))
double code(double a, double b, double c) {
	double t_0 = sqrt(((b * b) - (c * (a * 4.0))));
	double t_1 = (t_0 - b) / (a * 2.0);
	double tmp;
	if (b <= -3.5e+153) {
		tmp = -b / a;
	} else if (b <= 2.4e-28) {
		double tmp_1;
		if (b >= 0.0) {
			tmp_1 = (2.0 * c) / (-b - t_0);
		} else {
			tmp_1 = t_1;
		}
		tmp = tmp_1;
	} else if (b >= 0.0) {
		tmp = (2.0 * c) / fma(-b, sqrt(fma(a, (-4.0 * (c * (1.0 / (b * b)))), 1.0)), -b);
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(a, b, c)
	t_0 = sqrt(Float64(Float64(b * b) - Float64(c * Float64(a * 4.0))))
	t_1 = Float64(Float64(t_0 - b) / Float64(a * 2.0))
	tmp = 0.0
	if (b <= -3.5e+153)
		tmp = Float64(Float64(-b) / a);
	elseif (b <= 2.4e-28)
		tmp_1 = 0.0
		if (b >= 0.0)
			tmp_1 = Float64(Float64(2.0 * c) / Float64(Float64(-b) - t_0));
		else
			tmp_1 = t_1;
		end
		tmp = tmp_1;
	elseif (b >= 0.0)
		tmp = Float64(Float64(2.0 * c) / fma(Float64(-b), sqrt(fma(a, Float64(-4.0 * Float64(c * Float64(1.0 / Float64(b * b)))), 1.0)), Float64(-b)));
	else
		tmp = t_1;
	end
	return tmp
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[(t$95$0 - b), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3.5e+153], N[((-b) / a), $MachinePrecision], If[LessEqual[b, 2.4e-28], If[GreaterEqual[b, 0.0], N[(N[(2.0 * c), $MachinePrecision] / N[((-b) - t$95$0), $MachinePrecision]), $MachinePrecision], t$95$1], If[GreaterEqual[b, 0.0], N[(N[(2.0 * c), $MachinePrecision] / N[((-b) * N[Sqrt[N[(a * N[(-4.0 * N[(c * N[(1.0 / N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision] + (-b)), $MachinePrecision]), $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{t\_0 - b}{a \cdot 2}\\
\mathbf{if}\;b \leq -3.5 \cdot 10^{+153}:\\
\;\;\;\;\frac{-b}{a}\\

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

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


\end{array}\\

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

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


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

    1. Initial program 42.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 b around -inf

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \end{array} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\mathsf{neg}\left(\frac{b}{a}\right)}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{neg}\left(\frac{b}{a}\right)\\ \end{array} \]
      2. distribute-neg-frac2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      3. mul-1-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{-1 \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{-1 \cdot a}\\ \end{array} \]
      4. lower-/.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{-1 \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{-1 \cdot a}\\ \end{array} \]
      5. mul-1-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      6. lower-neg.f6496.1

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{-a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \left(-b\right)}{2 \cdot a}\\ \end{array} \]
    9. Step-by-step derivation
      1. lift->=.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\color{blue}{b \geq 0}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      2. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      3. lift-/.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      4. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      5. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      6. count-2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      7. times-fracN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      8. metadata-evalN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      9. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\color{blue}{b}}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      10. distribute-frac-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      11. distribute-frac-neg2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      12. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\color{blue}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      13. clear-numN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      14. div-invN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      15. clear-numN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      16. lift-/.f6496.1

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

        \[\leadsto \color{blue}{\frac{b}{-a}} \]
      18. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}} \]
      19. frac-2negN/A

        \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(b\right)}{\mathsf{neg}\left(\left(\mathsf{neg}\left(a\right)\right)\right)}} \]
      20. lift-neg.f64N/A

        \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(b\right)}}{\mathsf{neg}\left(\left(\mathsf{neg}\left(a\right)\right)\right)} \]
      21. lift-neg.f64N/A

        \[\leadsto \frac{\mathsf{neg}\left(b\right)}{\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(a\right)\right)}\right)} \]
      22. remove-double-negN/A

        \[\leadsto \frac{\mathsf{neg}\left(b\right)}{\color{blue}{a}} \]
      23. lower-/.f6496.1

        \[\leadsto \color{blue}{\frac{-b}{a}} \]
    10. Applied egg-rr96.1%

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

    if -3.4999999999999999e153 < b < 2.4000000000000002e-28

    1. Initial program 81.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

    if 2.4000000000000002e-28 < b

    1. Initial program 61.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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{\left(\mathsf{neg}\left(b\right)\right)} - \sqrt{\left(b \cdot b\right) \cdot \left(\left(a \cdot -4\right) \cdot \frac{c}{b \cdot b} + 1\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{\left(b \cdot b\right) \cdot \left(\left(a \cdot -4\right) \cdot \frac{c}{b \cdot b} + 1\right)}}\\ \end{array} \]
      3. lift-*.f64N/A

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{\left(b \cdot b\right) \cdot \left(\color{blue}{\left(a \cdot -4\right)} \cdot \frac{c}{b \cdot b} + 1\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{\left(b \cdot b\right) \cdot \left(\left(a \cdot -4\right) \cdot \frac{c}{b \cdot b} + 1\right)}}\\ \end{array} \]
      5. lift-*.f64N/A

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{\left(b \cdot b\right) \cdot \left(\left(a \cdot -4\right) \cdot \color{blue}{\frac{c}{b \cdot b}} + 1\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{\left(b \cdot b\right) \cdot \left(\left(a \cdot -4\right) \cdot \frac{c}{b \cdot b} + 1\right)}}\\ \end{array} \]
      7. lift-fma.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\mathsf{fma}\left(-b, \sqrt{\mathsf{fma}\left(a, -4 \cdot \color{blue}{\left(\frac{1}{b \cdot b} \cdot c\right)}, 1\right)}, -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. Recombined 3 regimes into one program.
  4. Final simplification90.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -3.5 \cdot 10^{+153}:\\ \;\;\;\;\frac{-b}{a}\\ \mathbf{elif}\;b \leq 2.4 \cdot 10^{-28}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\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}{a \cdot 2}\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\mathsf{fma}\left(-b, \sqrt{\mathsf{fma}\left(a, -4 \cdot \left(c \cdot \frac{1}{b \cdot b}\right), 1\right)}, -b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b}{a \cdot 2}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 90.8% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\\ t_1 := \frac{t\_0 - b}{a \cdot 2}\\ \mathbf{if}\;b \leq -3.5 \cdot 10^{+153}:\\ \;\;\;\;\frac{-b}{a}\\ \mathbf{elif}\;b \leq 2.4 \cdot 10^{-28}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - t\_0}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot \left(-c\right)}{\mathsf{fma}\left(b, \sqrt{\mathsf{fma}\left(-4, a \cdot \frac{c}{b \cdot b}, 1\right)}, b\right)}\\ \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 (/ (- t_0 b) (* a 2.0))))
   (if (<= b -3.5e+153)
     (/ (- b) a)
     (if (<= b 2.4e-28)
       (if (>= b 0.0) (/ (* 2.0 c) (- (- b) t_0)) t_1)
       (if (>= b 0.0)
         (/ (* 2.0 (- c)) (fma b (sqrt (fma -4.0 (* a (/ c (* b b))) 1.0)) b))
         t_1)))))
double code(double a, double b, double c) {
	double t_0 = sqrt(((b * b) - (c * (a * 4.0))));
	double t_1 = (t_0 - b) / (a * 2.0);
	double tmp;
	if (b <= -3.5e+153) {
		tmp = -b / a;
	} else if (b <= 2.4e-28) {
		double tmp_1;
		if (b >= 0.0) {
			tmp_1 = (2.0 * c) / (-b - t_0);
		} else {
			tmp_1 = t_1;
		}
		tmp = tmp_1;
	} else if (b >= 0.0) {
		tmp = (2.0 * -c) / fma(b, sqrt(fma(-4.0, (a * (c / (b * b))), 1.0)), b);
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(a, b, c)
	t_0 = sqrt(Float64(Float64(b * b) - Float64(c * Float64(a * 4.0))))
	t_1 = Float64(Float64(t_0 - b) / Float64(a * 2.0))
	tmp = 0.0
	if (b <= -3.5e+153)
		tmp = Float64(Float64(-b) / a);
	elseif (b <= 2.4e-28)
		tmp_1 = 0.0
		if (b >= 0.0)
			tmp_1 = Float64(Float64(2.0 * c) / Float64(Float64(-b) - t_0));
		else
			tmp_1 = t_1;
		end
		tmp = tmp_1;
	elseif (b >= 0.0)
		tmp = Float64(Float64(2.0 * Float64(-c)) / fma(b, sqrt(fma(-4.0, Float64(a * Float64(c / Float64(b * b))), 1.0)), b));
	else
		tmp = t_1;
	end
	return tmp
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[(t$95$0 - b), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3.5e+153], N[((-b) / a), $MachinePrecision], If[LessEqual[b, 2.4e-28], If[GreaterEqual[b, 0.0], N[(N[(2.0 * c), $MachinePrecision] / N[((-b) - t$95$0), $MachinePrecision]), $MachinePrecision], t$95$1], If[GreaterEqual[b, 0.0], N[(N[(2.0 * (-c)), $MachinePrecision] / N[(b * N[Sqrt[N[(-4.0 * N[(a * N[(c / N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision] + b), $MachinePrecision]), $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{t\_0 - b}{a \cdot 2}\\
\mathbf{if}\;b \leq -3.5 \cdot 10^{+153}:\\
\;\;\;\;\frac{-b}{a}\\

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

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


\end{array}\\

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

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


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

    1. Initial program 42.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 b around -inf

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \end{array} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\mathsf{neg}\left(\frac{b}{a}\right)}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{neg}\left(\frac{b}{a}\right)\\ \end{array} \]
      2. distribute-neg-frac2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      3. mul-1-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{-1 \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{-1 \cdot a}\\ \end{array} \]
      4. lower-/.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{-1 \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{-1 \cdot a}\\ \end{array} \]
      5. mul-1-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      6. lower-neg.f6496.1

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{-a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \left(-b\right)}{2 \cdot a}\\ \end{array} \]
    9. Step-by-step derivation
      1. lift->=.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\color{blue}{b \geq 0}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      2. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      3. lift-/.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      4. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      5. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      6. count-2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      7. times-fracN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      8. metadata-evalN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      9. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\color{blue}{b}}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      10. distribute-frac-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      11. distribute-frac-neg2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      12. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\color{blue}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      13. clear-numN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      14. div-invN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      15. clear-numN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      16. lift-/.f6496.1

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

        \[\leadsto \color{blue}{\frac{b}{-a}} \]
      18. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}} \]
      19. frac-2negN/A

        \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(b\right)}{\mathsf{neg}\left(\left(\mathsf{neg}\left(a\right)\right)\right)}} \]
      20. lift-neg.f64N/A

        \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(b\right)}}{\mathsf{neg}\left(\left(\mathsf{neg}\left(a\right)\right)\right)} \]
      21. lift-neg.f64N/A

        \[\leadsto \frac{\mathsf{neg}\left(b\right)}{\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(a\right)\right)}\right)} \]
      22. remove-double-negN/A

        \[\leadsto \frac{\mathsf{neg}\left(b\right)}{\color{blue}{a}} \]
      23. lower-/.f6496.1

        \[\leadsto \color{blue}{\frac{-b}{a}} \]
    10. Applied egg-rr96.1%

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

    if -3.4999999999999999e153 < b < 2.4000000000000002e-28

    1. Initial program 81.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

    if 2.4000000000000002e-28 < b

    1. Initial program 61.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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{\left(\mathsf{neg}\left(b\right)\right)} - \sqrt{\left(b \cdot b\right) \cdot \left(\left(a \cdot -4\right) \cdot \frac{c}{b \cdot b} + 1\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{\left(b \cdot b\right) \cdot \left(\left(a \cdot -4\right) \cdot \frac{c}{b \cdot b} + 1\right)}}\\ \end{array} \]
      3. lift-*.f64N/A

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{\left(b \cdot b\right) \cdot \left(\color{blue}{\left(a \cdot -4\right)} \cdot \frac{c}{b \cdot b} + 1\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{\left(b \cdot b\right) \cdot \left(\left(a \cdot -4\right) \cdot \frac{c}{b \cdot b} + 1\right)}}\\ \end{array} \]
      5. lift-*.f64N/A

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{\left(b \cdot b\right) \cdot \left(\left(a \cdot -4\right) \cdot \color{blue}{\frac{c}{b \cdot b}} + 1\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{\left(b \cdot b\right) \cdot \left(\left(a \cdot -4\right) \cdot \frac{c}{b \cdot b} + 1\right)}}\\ \end{array} \]
      7. lift-fma.f64N/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{\left(\mathsf{neg}\left(b\right)\right)} \cdot \sqrt{a \cdot \left(-4 \cdot \frac{c}{b \cdot b}\right) + 1} + \left(\mathsf{neg}\left(b\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) \cdot \sqrt{a \cdot \left(-4 \cdot \frac{c}{b \cdot b}\right) + 1} + \left(\mathsf{neg}\left(b\right)\right)}\\ \end{array} \]
      3. lift-*.f64N/A

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) \cdot \sqrt{a \cdot \left(-4 \cdot \color{blue}{\frac{c}{b \cdot b}}\right) + 1} + \left(\mathsf{neg}\left(b\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) \cdot \sqrt{a \cdot \left(-4 \cdot \frac{c}{b \cdot b}\right) + 1} + \left(\mathsf{neg}\left(b\right)\right)}\\ \end{array} \]
      5. lift-*.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) \cdot \sqrt{a \cdot \color{blue}{\left(-4 \cdot \frac{c}{b \cdot b}\right)} + 1} + \left(\mathsf{neg}\left(b\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) \cdot \sqrt{a \cdot \left(-4 \cdot \frac{c}{b \cdot b}\right) + 1} + \left(\mathsf{neg}\left(b\right)\right)}\\ \end{array} \]
      6. lift-fma.f64N/A

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{2 \cdot c}{-\mathsf{fma}\left(b, \sqrt{\mathsf{fma}\left(-4, a \cdot \frac{c}{b \cdot b}, 1\right)}, 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. Recombined 3 regimes into one program.
  4. Final simplification90.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -3.5 \cdot 10^{+153}:\\ \;\;\;\;\frac{-b}{a}\\ \mathbf{elif}\;b \leq 2.4 \cdot 10^{-28}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\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}{a \cdot 2}\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot \left(-c\right)}{\mathsf{fma}\left(b, \sqrt{\mathsf{fma}\left(-4, a \cdot \frac{c}{b \cdot b}, 1\right)}, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b}{a \cdot 2}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 88.1% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_0 := -\frac{2 \cdot c}{b + \mathsf{fma}\left(\frac{c}{b}, a \cdot -2, b\right)}\\
\mathbf{if}\;b \leq -1.3 \cdot 10^{+83}:\\
\;\;\;\;\frac{-b}{a}\\

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

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


\end{array}\\

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

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


\end{array}\\

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

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


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

    1. Initial program 54.4%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \end{array} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\mathsf{neg}\left(\frac{b}{a}\right)}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{neg}\left(\frac{b}{a}\right)\\ \end{array} \]
      2. distribute-neg-frac2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      3. mul-1-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{-1 \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{-1 \cdot a}\\ \end{array} \]
      4. lower-/.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{-1 \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{-1 \cdot a}\\ \end{array} \]
      5. mul-1-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      6. lower-neg.f6496.9

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{-a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \left(-b\right)}{2 \cdot a}\\ \end{array} \]
    9. Step-by-step derivation
      1. lift->=.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\color{blue}{b \geq 0}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      2. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      3. lift-/.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      4. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      5. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      6. count-2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      7. times-fracN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      8. metadata-evalN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      9. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\color{blue}{b}}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      10. distribute-frac-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      11. distribute-frac-neg2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      12. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\color{blue}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      13. clear-numN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      14. div-invN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      15. clear-numN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      16. lift-/.f6496.9

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

        \[\leadsto \color{blue}{\frac{b}{-a}} \]
      18. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}} \]
      19. frac-2negN/A

        \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(b\right)}{\mathsf{neg}\left(\left(\mathsf{neg}\left(a\right)\right)\right)}} \]
      20. lift-neg.f64N/A

        \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(b\right)}}{\mathsf{neg}\left(\left(\mathsf{neg}\left(a\right)\right)\right)} \]
      21. lift-neg.f64N/A

        \[\leadsto \frac{\mathsf{neg}\left(b\right)}{\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(a\right)\right)}\right)} \]
      22. remove-double-negN/A

        \[\leadsto \frac{\mathsf{neg}\left(b\right)}{\color{blue}{a}} \]
      23. lower-/.f6496.9

        \[\leadsto \color{blue}{\frac{-b}{a}} \]
    10. Applied egg-rr96.9%

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

    if -1.3000000000000001e83 < b < -2.89999999999999985e-261

    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
    3. Taylor expanded in a around 0

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \color{blue}{\left(b + -2 \cdot \frac{a \cdot c}{b}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(b + -2 \cdot \frac{a \cdot c}{b}\right)}\\ \end{array} \]
    4. Step-by-step derivation
      1. +-commutativeN/A

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\frac{\color{blue}{\left(-2 \cdot c\right) \cdot a}}{b} + b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\frac{\left(-2 \cdot c\right) \cdot a}{b} + b\right)}\\ \end{array} \]
      5. associate-*l/N/A

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\color{blue}{\left(\frac{c}{b} \cdot -2\right)} \cdot a + b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\left(\frac{c}{b} \cdot -2\right) \cdot a + b\right)}\\ \end{array} \]
      8. associate-*l*N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\color{blue}{\frac{c}{b} \cdot \left(-2 \cdot a\right)} + b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\frac{c}{b} \cdot \left(-2 \cdot a\right) + b\right)}\\ \end{array} \]
      9. lower-fma.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \color{blue}{\mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      10. lower-/.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\color{blue}{\frac{c}{b}}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      11. lower-*.f6485.8

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \color{blue}{\mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, 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. Step-by-step derivation
      1. lift-neg.f64N/A

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      3. lift-*.f64N/A

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      5. lift--.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      6. lift-sqrt.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      7. lift-+.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      8. lift-*.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}}\\ \end{array} \]
      9. clear-numN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      10. associate-/r/N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      11. lower-*.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      12. lift-*.f64N/A

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      14. metadata-evalN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      15. lower-/.f6485.5

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}}\\ \end{array} \]
      18. lift-neg.f64N/A

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

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

    if -2.89999999999999985e-261 < b < 9.99999999999999948e123

    1. Initial program 79.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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \end{array} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

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

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \color{blue}{c \cdot \left(4 \cdot a\right)}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - c \cdot \left(4 \cdot a\right)}}\\ \end{array} \]
      4. cancel-sign-sub-invN/A

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{\color{blue}{b \cdot b} + \left(\mathsf{neg}\left(c\right)\right) \cdot \left(4 \cdot a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b + \left(\mathsf{neg}\left(c\right)\right) \cdot \left(4 \cdot a\right)}}\\ \end{array} \]
      6. distribute-lft-neg-inN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b + \color{blue}{\left(\mathsf{neg}\left(c \cdot \left(4 \cdot a\right)\right)\right)}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b + \left(\mathsf{neg}\left(c \cdot \left(4 \cdot a\right)\right)\right)}}\\ \end{array} \]
      7. distribute-rgt-neg-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.99999999999999948e123 < b

    1. Initial program 43.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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \color{blue}{\left(b + -2 \cdot \frac{a \cdot c}{b}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(b + -2 \cdot \frac{a \cdot c}{b}\right)}\\ \end{array} \]
    4. Step-by-step derivation
      1. +-commutativeN/A

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\frac{\color{blue}{\left(-2 \cdot c\right) \cdot a}}{b} + b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\frac{\left(-2 \cdot c\right) \cdot a}{b} + b\right)}\\ \end{array} \]
      5. associate-*l/N/A

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\color{blue}{\left(\frac{c}{b} \cdot -2\right)} \cdot a + b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\left(\frac{c}{b} \cdot -2\right) \cdot a + b\right)}\\ \end{array} \]
      8. associate-*l*N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\color{blue}{\frac{c}{b} \cdot \left(-2 \cdot a\right)} + b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\frac{c}{b} \cdot \left(-2 \cdot a\right) + b\right)}\\ \end{array} \]
      9. lower-fma.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \color{blue}{\mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      10. lower-/.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\color{blue}{\frac{c}{b}}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      11. lower-*.f6499.1

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \color{blue}{\mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, 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

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

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      6. +-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      7. mul-1-negN/A

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      9. lower--.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      10. lower-/.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      11. lower-/.f64N/A

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      13. lower-*.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      14. mul-1-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}}\\ \end{array} \]
      15. lower-neg.f6499.1

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.3 \cdot 10^{+83}:\\ \;\;\;\;\frac{-b}{a}\\ \mathbf{elif}\;b \leq -2.9 \cdot 10^{-261}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;-\frac{2 \cdot c}{b + \mathsf{fma}\left(\frac{c}{b}, a \cdot -2, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{0.5}{a} \cdot \left(\sqrt{\mathsf{fma}\left(c, a \cdot -4, b \cdot b\right)} - b\right)\\ \end{array}\\ \mathbf{elif}\;b \leq 10^{+124}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -4\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) - b}{a \cdot 2}\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;-\frac{2 \cdot c}{b + \mathsf{fma}\left(\frac{c}{b}, a \cdot -2, b\right)}\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\frac{c}{b \cdot b} + \frac{-1}{a}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 88.0% accurate, 0.8× speedup?

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

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

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

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


\end{array}\\

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

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


\end{array}\\

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

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


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

    1. Initial program 54.4%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \end{array} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\mathsf{neg}\left(\frac{b}{a}\right)}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{neg}\left(\frac{b}{a}\right)\\ \end{array} \]
      2. distribute-neg-frac2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      3. mul-1-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{-1 \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{-1 \cdot a}\\ \end{array} \]
      4. lower-/.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{-1 \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{-1 \cdot a}\\ \end{array} \]
      5. mul-1-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      6. lower-neg.f6496.9

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{-a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \left(-b\right)}{2 \cdot a}\\ \end{array} \]
    9. Step-by-step derivation
      1. lift->=.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\color{blue}{b \geq 0}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      2. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      3. lift-/.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      4. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      5. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      6. count-2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      7. times-fracN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      8. metadata-evalN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      9. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\color{blue}{b}}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      10. distribute-frac-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      11. distribute-frac-neg2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      12. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\color{blue}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      13. clear-numN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      14. div-invN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      15. clear-numN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      16. lift-/.f6496.9

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

        \[\leadsto \color{blue}{\frac{b}{-a}} \]
      18. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}} \]
      19. frac-2negN/A

        \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(b\right)}{\mathsf{neg}\left(\left(\mathsf{neg}\left(a\right)\right)\right)}} \]
      20. lift-neg.f64N/A

        \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(b\right)}}{\mathsf{neg}\left(\left(\mathsf{neg}\left(a\right)\right)\right)} \]
      21. lift-neg.f64N/A

        \[\leadsto \frac{\mathsf{neg}\left(b\right)}{\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(a\right)\right)}\right)} \]
      22. remove-double-negN/A

        \[\leadsto \frac{\mathsf{neg}\left(b\right)}{\color{blue}{a}} \]
      23. lower-/.f6496.9

        \[\leadsto \color{blue}{\frac{-b}{a}} \]
    10. Applied egg-rr96.9%

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

    if -1.3000000000000001e83 < b < -2.89999999999999985e-261

    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
    3. Taylor expanded in a around 0

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \color{blue}{\left(b + -2 \cdot \frac{a \cdot c}{b}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(b + -2 \cdot \frac{a \cdot c}{b}\right)}\\ \end{array} \]
    4. Step-by-step derivation
      1. +-commutativeN/A

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\frac{\color{blue}{\left(-2 \cdot c\right) \cdot a}}{b} + b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\frac{\left(-2 \cdot c\right) \cdot a}{b} + b\right)}\\ \end{array} \]
      5. associate-*l/N/A

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\color{blue}{\left(\frac{c}{b} \cdot -2\right)} \cdot a + b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\left(\frac{c}{b} \cdot -2\right) \cdot a + b\right)}\\ \end{array} \]
      8. associate-*l*N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\color{blue}{\frac{c}{b} \cdot \left(-2 \cdot a\right)} + b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\frac{c}{b} \cdot \left(-2 \cdot a\right) + b\right)}\\ \end{array} \]
      9. lower-fma.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \color{blue}{\mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      10. lower-/.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\color{blue}{\frac{c}{b}}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      11. lower-*.f6485.8

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \color{blue}{\mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, 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. Step-by-step derivation
      1. lift-neg.f64N/A

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      3. lift-*.f64N/A

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      5. lift--.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      6. lift-sqrt.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      7. lift-+.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      8. lift-*.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}}\\ \end{array} \]
      9. clear-numN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      10. associate-/r/N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      11. lower-*.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      12. lift-*.f64N/A

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      14. metadata-evalN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      15. lower-/.f6485.5

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}}\\ \end{array} \]
      18. lift-neg.f64N/A

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

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

    if -2.89999999999999985e-261 < b < 1.36e125

    1. Initial program 79.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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \end{array} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{c \cdot 2}{\color{blue}{\left(\mathsf{neg}\left(b\right)\right)} - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \end{array} \]
      3. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.36e125 < b

    1. Initial program 43.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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \color{blue}{\left(b + -2 \cdot \frac{a \cdot c}{b}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(b + -2 \cdot \frac{a \cdot c}{b}\right)}\\ \end{array} \]
    4. Step-by-step derivation
      1. +-commutativeN/A

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\frac{\color{blue}{\left(-2 \cdot c\right) \cdot a}}{b} + b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\frac{\left(-2 \cdot c\right) \cdot a}{b} + b\right)}\\ \end{array} \]
      5. associate-*l/N/A

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\color{blue}{\left(\frac{c}{b} \cdot -2\right)} \cdot a + b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\left(\frac{c}{b} \cdot -2\right) \cdot a + b\right)}\\ \end{array} \]
      8. associate-*l*N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\color{blue}{\frac{c}{b} \cdot \left(-2 \cdot a\right)} + b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\frac{c}{b} \cdot \left(-2 \cdot a\right) + b\right)}\\ \end{array} \]
      9. lower-fma.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \color{blue}{\mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      10. lower-/.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\color{blue}{\frac{c}{b}}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      11. lower-*.f6499.1

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \color{blue}{\mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, 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

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

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      6. +-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      7. mul-1-negN/A

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      9. lower--.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      10. lower-/.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      11. lower-/.f64N/A

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      13. lower-*.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      14. mul-1-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}}\\ \end{array} \]
      15. lower-neg.f6499.1

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.3 \cdot 10^{+83}:\\ \;\;\;\;\frac{-b}{a}\\ \mathbf{elif}\;b \leq -2.9 \cdot 10^{-261}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;-\frac{2 \cdot c}{b + \mathsf{fma}\left(\frac{c}{b}, a \cdot -2, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{0.5}{a} \cdot \left(\sqrt{\mathsf{fma}\left(c, a \cdot -4, b \cdot b\right)} - b\right)\\ \end{array}\\ \mathbf{elif}\;b \leq 1.36 \cdot 10^{+125}:\\ \;\;\;\;\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{\left(-b\right) - b}{a \cdot 2}\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;-\frac{2 \cdot c}{b + \mathsf{fma}\left(\frac{c}{b}, a \cdot -2, b\right)}\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\frac{c}{b \cdot b} + \frac{-1}{a}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 83.7% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_0 := -\frac{2 \cdot c}{b + \mathsf{fma}\left(\frac{c}{b}, a \cdot -2, b\right)}\\
\mathbf{if}\;b \leq -1.2 \cdot 10^{-45}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;t\_0\\

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


\end{array}\\

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

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


\end{array}\\

\mathbf{elif}\;b \leq 1.36 \cdot 10^{+125}:\\
\;\;\;\;\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{\left(-b\right) - b}{a \cdot 2}\\


\end{array}\\

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

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


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

    1. Initial program 66.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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \color{blue}{\left(b + -2 \cdot \frac{a \cdot c}{b}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(b + -2 \cdot \frac{a \cdot c}{b}\right)}\\ \end{array} \]
    4. Step-by-step derivation
      1. +-commutativeN/A

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\frac{\color{blue}{\left(-2 \cdot c\right) \cdot a}}{b} + b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\frac{\left(-2 \cdot c\right) \cdot a}{b} + b\right)}\\ \end{array} \]
      5. associate-*l/N/A

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\color{blue}{\left(\frac{c}{b} \cdot -2\right)} \cdot a + b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\left(\frac{c}{b} \cdot -2\right) \cdot a + b\right)}\\ \end{array} \]
      8. associate-*l*N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\color{blue}{\frac{c}{b} \cdot \left(-2 \cdot a\right)} + b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\frac{c}{b} \cdot \left(-2 \cdot a\right) + b\right)}\\ \end{array} \]
      9. lower-fma.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \color{blue}{\mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      10. lower-/.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\color{blue}{\frac{c}{b}}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      11. lower-*.f6466.9

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \color{blue}{\mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, 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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      3. mul-1-negN/A

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      5. +-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      6. lower-fma.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      7. associate-/l*N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      8. lower-*.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      9. lower-/.f64N/A

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

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

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      3. unsub-negN/A

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      5. lower-/.f64N/A

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

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

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

    if -1.19999999999999995e-45 < b < -2.89999999999999985e-261

    1. Initial program 76.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 a around 0

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \color{blue}{\left(b + -2 \cdot \frac{a \cdot c}{b}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(b + -2 \cdot \frac{a \cdot c}{b}\right)}\\ \end{array} \]
    4. Step-by-step derivation
      1. +-commutativeN/A

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\frac{\color{blue}{\left(-2 \cdot c\right) \cdot a}}{b} + b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\frac{\left(-2 \cdot c\right) \cdot a}{b} + b\right)}\\ \end{array} \]
      5. associate-*l/N/A

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\color{blue}{\left(\frac{c}{b} \cdot -2\right)} \cdot a + b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\left(\frac{c}{b} \cdot -2\right) \cdot a + b\right)}\\ \end{array} \]
      8. associate-*l*N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\color{blue}{\frac{c}{b} \cdot \left(-2 \cdot a\right)} + b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\frac{c}{b} \cdot \left(-2 \cdot a\right) + b\right)}\\ \end{array} \]
      9. lower-fma.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \color{blue}{\mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      10. lower-/.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\color{blue}{\frac{c}{b}}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      11. lower-*.f6476.7

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{a}\\ \end{array} \]
    7. Step-by-step derivation
      1. lower-/.f6476.7

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{a}\\ \end{array} \]
    10. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{a}\\ \end{array} \]
      2. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{a}\\ \end{array} \]
      3. lower-*.f6461.7

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

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

    if -2.89999999999999985e-261 < b < 1.36e125

    1. Initial program 79.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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \end{array} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{c \cdot 2}{\color{blue}{\left(\mathsf{neg}\left(b\right)\right)} - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \end{array} \]
      3. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.36e125 < b

    1. Initial program 43.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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \color{blue}{\left(b + -2 \cdot \frac{a \cdot c}{b}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(b + -2 \cdot \frac{a \cdot c}{b}\right)}\\ \end{array} \]
    4. Step-by-step derivation
      1. +-commutativeN/A

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\frac{\color{blue}{\left(-2 \cdot c\right) \cdot a}}{b} + b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\frac{\left(-2 \cdot c\right) \cdot a}{b} + b\right)}\\ \end{array} \]
      5. associate-*l/N/A

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\color{blue}{\left(\frac{c}{b} \cdot -2\right)} \cdot a + b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\left(\frac{c}{b} \cdot -2\right) \cdot a + b\right)}\\ \end{array} \]
      8. associate-*l*N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\color{blue}{\frac{c}{b} \cdot \left(-2 \cdot a\right)} + b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\frac{c}{b} \cdot \left(-2 \cdot a\right) + b\right)}\\ \end{array} \]
      9. lower-fma.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \color{blue}{\mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      10. lower-/.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\color{blue}{\frac{c}{b}}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      11. lower-*.f6499.1

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \color{blue}{\mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, 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

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

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      6. +-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      7. mul-1-negN/A

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      9. lower--.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      10. lower-/.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      11. lower-/.f64N/A

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      13. lower-*.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      14. mul-1-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}}\\ \end{array} \]
      15. lower-neg.f6499.1

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.2 \cdot 10^{-45}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;-\frac{2 \cdot c}{b + \mathsf{fma}\left(\frac{c}{b}, a \cdot -2, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} - \frac{b}{a}\\ \end{array}\\ \mathbf{elif}\;b \leq -2.9 \cdot 10^{-261}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{-4 \cdot \left(a \cdot c\right)} - b}{a \cdot 2}\\ \end{array}\\ \mathbf{elif}\;b \leq 1.36 \cdot 10^{+125}:\\ \;\;\;\;\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{\left(-b\right) - b}{a \cdot 2}\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;-\frac{2 \cdot c}{b + \mathsf{fma}\left(\frac{c}{b}, a \cdot -2, b\right)}\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\frac{c}{b \cdot b} + \frac{-1}{a}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 79.0% accurate, 0.8× speedup?

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

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

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


\end{array}\\

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

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


\end{array}\\

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

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


\end{array}\\

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

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


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

    1. Initial program 66.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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \color{blue}{\left(b + -2 \cdot \frac{a \cdot c}{b}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(b + -2 \cdot \frac{a \cdot c}{b}\right)}\\ \end{array} \]
    4. Step-by-step derivation
      1. +-commutativeN/A

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\frac{\color{blue}{\left(-2 \cdot c\right) \cdot a}}{b} + b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\frac{\left(-2 \cdot c\right) \cdot a}{b} + b\right)}\\ \end{array} \]
      5. associate-*l/N/A

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\color{blue}{\left(\frac{c}{b} \cdot -2\right)} \cdot a + b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\left(\frac{c}{b} \cdot -2\right) \cdot a + b\right)}\\ \end{array} \]
      8. associate-*l*N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\color{blue}{\frac{c}{b} \cdot \left(-2 \cdot a\right)} + b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\frac{c}{b} \cdot \left(-2 \cdot a\right) + b\right)}\\ \end{array} \]
      9. lower-fma.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \color{blue}{\mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      10. lower-/.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\color{blue}{\frac{c}{b}}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      11. lower-*.f6466.9

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \color{blue}{\mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, 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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      3. mul-1-negN/A

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      5. +-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      6. lower-fma.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      7. associate-/l*N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      8. lower-*.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      9. lower-/.f64N/A

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

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

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      3. unsub-negN/A

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      5. lower-/.f64N/A

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

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

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

    if -1.19999999999999995e-45 < b < -2.89999999999999985e-261

    1. Initial program 76.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 a around 0

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \color{blue}{\left(b + -2 \cdot \frac{a \cdot c}{b}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(b + -2 \cdot \frac{a \cdot c}{b}\right)}\\ \end{array} \]
    4. Step-by-step derivation
      1. +-commutativeN/A

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\frac{\color{blue}{\left(-2 \cdot c\right) \cdot a}}{b} + b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\frac{\left(-2 \cdot c\right) \cdot a}{b} + b\right)}\\ \end{array} \]
      5. associate-*l/N/A

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\color{blue}{\left(\frac{c}{b} \cdot -2\right)} \cdot a + b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\left(\frac{c}{b} \cdot -2\right) \cdot a + b\right)}\\ \end{array} \]
      8. associate-*l*N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\color{blue}{\frac{c}{b} \cdot \left(-2 \cdot a\right)} + b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\frac{c}{b} \cdot \left(-2 \cdot a\right) + b\right)}\\ \end{array} \]
      9. lower-fma.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \color{blue}{\mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      10. lower-/.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\color{blue}{\frac{c}{b}}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      11. lower-*.f6476.7

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{a}\\ \end{array} \]
    7. Step-by-step derivation
      1. lower-/.f6476.7

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{a}\\ \end{array} \]
    10. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{a}\\ \end{array} \]
      2. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{a}\\ \end{array} \]
      3. lower-*.f6461.7

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

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

    if -2.89999999999999985e-261 < b < 1.75e-28

    1. Initial program 72.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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \end{array} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

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

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

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

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

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

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

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

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

    if 1.75e-28 < b

    1. Initial program 61.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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \color{blue}{\left(b + -2 \cdot \frac{a \cdot c}{b}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(b + -2 \cdot \frac{a \cdot c}{b}\right)}\\ \end{array} \]
    4. Step-by-step derivation
      1. +-commutativeN/A

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\frac{\color{blue}{\left(-2 \cdot c\right) \cdot a}}{b} + b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\frac{\left(-2 \cdot c\right) \cdot a}{b} + b\right)}\\ \end{array} \]
      5. associate-*l/N/A

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\color{blue}{\left(\frac{c}{b} \cdot -2\right)} \cdot a + b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\left(\frac{c}{b} \cdot -2\right) \cdot a + b\right)}\\ \end{array} \]
      8. associate-*l*N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\color{blue}{\frac{c}{b} \cdot \left(-2 \cdot a\right)} + b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\frac{c}{b} \cdot \left(-2 \cdot a\right) + b\right)}\\ \end{array} \]
      9. lower-fma.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \color{blue}{\mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      10. lower-/.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\color{blue}{\frac{c}{b}}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      11. lower-*.f6491.8

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \color{blue}{\mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, 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

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

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      6. +-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      7. mul-1-negN/A

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      9. lower--.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      10. lower-/.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      11. lower-/.f64N/A

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      13. lower-*.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      14. mul-1-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}}\\ \end{array} \]
      15. lower-neg.f6491.8

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.2 \cdot 10^{-45}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;-\frac{2 \cdot c}{b + \mathsf{fma}\left(\frac{c}{b}, a \cdot -2, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} - \frac{b}{a}\\ \end{array}\\ \mathbf{elif}\;b \leq -2.9 \cdot 10^{-261}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{-4 \cdot \left(a \cdot c\right)} - b}{a \cdot 2}\\ \end{array}\\ \mathbf{elif}\;b \leq 1.75 \cdot 10^{-28}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{-4 \cdot \left(a \cdot c\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) - b}{a \cdot 2}\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;-\frac{2 \cdot c}{b + \mathsf{fma}\left(\frac{c}{b}, a \cdot -2, b\right)}\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\frac{c}{b \cdot b} + \frac{-1}{a}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 78.9% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_0 := \sqrt{-4 \cdot \left(a \cdot c\right)}\\
\mathbf{if}\;b \leq -1.2 \cdot 10^{-45}:\\
\;\;\;\;\frac{-b}{a}\\

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

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


\end{array}\\

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

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


\end{array}\\

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

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


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

    1. Initial program 66.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 b around -inf

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \end{array} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\mathsf{neg}\left(\frac{b}{a}\right)}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{neg}\left(\frac{b}{a}\right)\\ \end{array} \]
      2. distribute-neg-frac2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      3. mul-1-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{-1 \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{-1 \cdot a}\\ \end{array} \]
      4. lower-/.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{-1 \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{-1 \cdot a}\\ \end{array} \]
      5. mul-1-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      6. lower-neg.f6489.4

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{-a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \left(-b\right)}{2 \cdot a}\\ \end{array} \]
    9. Step-by-step derivation
      1. lift->=.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\color{blue}{b \geq 0}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      2. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      3. lift-/.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      4. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      5. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      6. count-2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      7. times-fracN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      8. metadata-evalN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      9. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\color{blue}{b}}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      10. distribute-frac-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      11. distribute-frac-neg2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      12. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\color{blue}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      13. clear-numN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      14. div-invN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      15. clear-numN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      16. lift-/.f6489.4

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

        \[\leadsto \color{blue}{\frac{b}{-a}} \]
      18. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}} \]
      19. frac-2negN/A

        \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(b\right)}{\mathsf{neg}\left(\left(\mathsf{neg}\left(a\right)\right)\right)}} \]
      20. lift-neg.f64N/A

        \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(b\right)}}{\mathsf{neg}\left(\left(\mathsf{neg}\left(a\right)\right)\right)} \]
      21. lift-neg.f64N/A

        \[\leadsto \frac{\mathsf{neg}\left(b\right)}{\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(a\right)\right)}\right)} \]
      22. remove-double-negN/A

        \[\leadsto \frac{\mathsf{neg}\left(b\right)}{\color{blue}{a}} \]
      23. lower-/.f6489.4

        \[\leadsto \color{blue}{\frac{-b}{a}} \]
    10. Applied egg-rr89.4%

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

    if -1.19999999999999995e-45 < b < -2.89999999999999985e-261

    1. Initial program 76.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 a around 0

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \color{blue}{\left(b + -2 \cdot \frac{a \cdot c}{b}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(b + -2 \cdot \frac{a \cdot c}{b}\right)}\\ \end{array} \]
    4. Step-by-step derivation
      1. +-commutativeN/A

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\frac{\color{blue}{\left(-2 \cdot c\right) \cdot a}}{b} + b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\frac{\left(-2 \cdot c\right) \cdot a}{b} + b\right)}\\ \end{array} \]
      5. associate-*l/N/A

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\color{blue}{\left(\frac{c}{b} \cdot -2\right)} \cdot a + b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\left(\frac{c}{b} \cdot -2\right) \cdot a + b\right)}\\ \end{array} \]
      8. associate-*l*N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\color{blue}{\frac{c}{b} \cdot \left(-2 \cdot a\right)} + b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\frac{c}{b} \cdot \left(-2 \cdot a\right) + b\right)}\\ \end{array} \]
      9. lower-fma.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \color{blue}{\mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      10. lower-/.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\color{blue}{\frac{c}{b}}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      11. lower-*.f6476.7

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{a}\\ \end{array} \]
    7. Step-by-step derivation
      1. lower-/.f6476.7

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{a}\\ \end{array} \]
    10. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{a}\\ \end{array} \]
      2. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{a}\\ \end{array} \]
      3. lower-*.f6461.7

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

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

    if -2.89999999999999985e-261 < b < 1.75e-28

    1. Initial program 72.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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \end{array} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

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

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

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

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

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

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

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

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

    if 1.75e-28 < b

    1. Initial program 61.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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \color{blue}{\left(b + -2 \cdot \frac{a \cdot c}{b}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(b + -2 \cdot \frac{a \cdot c}{b}\right)}\\ \end{array} \]
    4. Step-by-step derivation
      1. +-commutativeN/A

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\frac{\color{blue}{\left(-2 \cdot c\right) \cdot a}}{b} + b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\frac{\left(-2 \cdot c\right) \cdot a}{b} + b\right)}\\ \end{array} \]
      5. associate-*l/N/A

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\color{blue}{\left(\frac{c}{b} \cdot -2\right)} \cdot a + b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\left(\frac{c}{b} \cdot -2\right) \cdot a + b\right)}\\ \end{array} \]
      8. associate-*l*N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\color{blue}{\frac{c}{b} \cdot \left(-2 \cdot a\right)} + b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\frac{c}{b} \cdot \left(-2 \cdot a\right) + b\right)}\\ \end{array} \]
      9. lower-fma.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \color{blue}{\mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      10. lower-/.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\color{blue}{\frac{c}{b}}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      11. lower-*.f6491.8

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \color{blue}{\mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, 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

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

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      6. +-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      7. mul-1-negN/A

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      9. lower--.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      10. lower-/.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      11. lower-/.f64N/A

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      13. lower-*.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      14. mul-1-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}}\\ \end{array} \]
      15. lower-neg.f6491.8

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.2 \cdot 10^{-45}:\\ \;\;\;\;\frac{-b}{a}\\ \mathbf{elif}\;b \leq -2.9 \cdot 10^{-261}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{-4 \cdot \left(a \cdot c\right)} - b}{a \cdot 2}\\ \end{array}\\ \mathbf{elif}\;b \leq 1.75 \cdot 10^{-28}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{-4 \cdot \left(a \cdot c\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) - b}{a \cdot 2}\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;-\frac{2 \cdot c}{b + \mathsf{fma}\left(\frac{c}{b}, a \cdot -2, b\right)}\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\frac{c}{b \cdot b} + \frac{-1}{a}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 90.2% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\\ \mathbf{if}\;b \leq -3.5 \cdot 10^{+153}:\\ \;\;\;\;\frac{-b}{a}\\ \mathbf{elif}\;b \leq 10^{+124}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - t\_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{t\_0 - b}{a \cdot 2}\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;-\frac{2 \cdot c}{b + \mathsf{fma}\left(\frac{c}{b}, a \cdot -2, b\right)}\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\frac{c}{b \cdot b} + \frac{-1}{a}\right)\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (let* ((t_0 (sqrt (- (* b b) (* c (* a 4.0))))))
   (if (<= b -3.5e+153)
     (/ (- b) a)
     (if (<= b 1e+124)
       (if (>= b 0.0) (/ (* 2.0 c) (- (- b) t_0)) (/ (- t_0 b) (* a 2.0)))
       (if (>= b 0.0)
         (- (/ (* 2.0 c) (+ b (fma (/ c b) (* a -2.0) b))))
         (* b (+ (/ c (* b b)) (/ -1.0 a))))))))
double code(double a, double b, double c) {
	double t_0 = sqrt(((b * b) - (c * (a * 4.0))));
	double tmp;
	if (b <= -3.5e+153) {
		tmp = -b / a;
	} else if (b <= 1e+124) {
		double tmp_1;
		if (b >= 0.0) {
			tmp_1 = (2.0 * c) / (-b - t_0);
		} else {
			tmp_1 = (t_0 - b) / (a * 2.0);
		}
		tmp = tmp_1;
	} else if (b >= 0.0) {
		tmp = -((2.0 * c) / (b + fma((c / b), (a * -2.0), b)));
	} else {
		tmp = b * ((c / (b * b)) + (-1.0 / a));
	}
	return tmp;
}
function code(a, b, c)
	t_0 = sqrt(Float64(Float64(b * b) - Float64(c * Float64(a * 4.0))))
	tmp = 0.0
	if (b <= -3.5e+153)
		tmp = Float64(Float64(-b) / a);
	elseif (b <= 1e+124)
		tmp_1 = 0.0
		if (b >= 0.0)
			tmp_1 = Float64(Float64(2.0 * c) / Float64(Float64(-b) - t_0));
		else
			tmp_1 = Float64(Float64(t_0 - b) / Float64(a * 2.0));
		end
		tmp = tmp_1;
	elseif (b >= 0.0)
		tmp = Float64(-Float64(Float64(2.0 * c) / Float64(b + fma(Float64(c / b), Float64(a * -2.0), b))));
	else
		tmp = Float64(b * Float64(Float64(c / Float64(b * b)) + Float64(-1.0 / a)));
	end
	return tmp
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]}, If[LessEqual[b, -3.5e+153], N[((-b) / a), $MachinePrecision], If[LessEqual[b, 1e+124], If[GreaterEqual[b, 0.0], N[(N[(2.0 * c), $MachinePrecision] / N[((-b) - t$95$0), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$0 - b), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision]], If[GreaterEqual[b, 0.0], (-N[(N[(2.0 * c), $MachinePrecision] / N[(b + N[(N[(c / b), $MachinePrecision] * N[(a * -2.0), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), N[(b * N[(N[(c / N[(b * b), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\\
\mathbf{if}\;b \leq -3.5 \cdot 10^{+153}:\\
\;\;\;\;\frac{-b}{a}\\

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

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


\end{array}\\

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

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


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

    1. Initial program 42.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 b around -inf

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \end{array} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\mathsf{neg}\left(\frac{b}{a}\right)}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{neg}\left(\frac{b}{a}\right)\\ \end{array} \]
      2. distribute-neg-frac2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      3. mul-1-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{-1 \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{-1 \cdot a}\\ \end{array} \]
      4. lower-/.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{-1 \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{-1 \cdot a}\\ \end{array} \]
      5. mul-1-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      6. lower-neg.f6496.1

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{-a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \left(-b\right)}{2 \cdot a}\\ \end{array} \]
    9. Step-by-step derivation
      1. lift->=.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\color{blue}{b \geq 0}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      2. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      3. lift-/.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      4. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      5. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      6. count-2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      7. times-fracN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      8. metadata-evalN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      9. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\color{blue}{b}}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      10. distribute-frac-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      11. distribute-frac-neg2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      12. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\color{blue}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      13. clear-numN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      14. div-invN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      15. clear-numN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      16. lift-/.f6496.1

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

        \[\leadsto \color{blue}{\frac{b}{-a}} \]
      18. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}} \]
      19. frac-2negN/A

        \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(b\right)}{\mathsf{neg}\left(\left(\mathsf{neg}\left(a\right)\right)\right)}} \]
      20. lift-neg.f64N/A

        \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(b\right)}}{\mathsf{neg}\left(\left(\mathsf{neg}\left(a\right)\right)\right)} \]
      21. lift-neg.f64N/A

        \[\leadsto \frac{\mathsf{neg}\left(b\right)}{\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(a\right)\right)}\right)} \]
      22. remove-double-negN/A

        \[\leadsto \frac{\mathsf{neg}\left(b\right)}{\color{blue}{a}} \]
      23. lower-/.f6496.1

        \[\leadsto \color{blue}{\frac{-b}{a}} \]
    10. Applied egg-rr96.1%

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

    if -3.4999999999999999e153 < b < 9.99999999999999948e123

    1. Initial program 83.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

    if 9.99999999999999948e123 < b

    1. Initial program 43.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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \color{blue}{\left(b + -2 \cdot \frac{a \cdot c}{b}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(b + -2 \cdot \frac{a \cdot c}{b}\right)}\\ \end{array} \]
    4. Step-by-step derivation
      1. +-commutativeN/A

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\frac{\color{blue}{\left(-2 \cdot c\right) \cdot a}}{b} + b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\frac{\left(-2 \cdot c\right) \cdot a}{b} + b\right)}\\ \end{array} \]
      5. associate-*l/N/A

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\color{blue}{\left(\frac{c}{b} \cdot -2\right)} \cdot a + b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\left(\frac{c}{b} \cdot -2\right) \cdot a + b\right)}\\ \end{array} \]
      8. associate-*l*N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\color{blue}{\frac{c}{b} \cdot \left(-2 \cdot a\right)} + b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\frac{c}{b} \cdot \left(-2 \cdot a\right) + b\right)}\\ \end{array} \]
      9. lower-fma.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \color{blue}{\mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      10. lower-/.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\color{blue}{\frac{c}{b}}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      11. lower-*.f6499.1

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \color{blue}{\mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, 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

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

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      6. +-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      7. mul-1-negN/A

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      9. lower--.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      10. lower-/.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      11. lower-/.f64N/A

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      13. lower-*.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      14. mul-1-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}}\\ \end{array} \]
      15. lower-neg.f6499.1

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -3.5 \cdot 10^{+153}:\\ \;\;\;\;\frac{-b}{a}\\ \mathbf{elif}\;b \leq 10^{+124}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\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}{a \cdot 2}\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;-\frac{2 \cdot c}{b + \mathsf{fma}\left(\frac{c}{b}, a \cdot -2, b\right)}\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\frac{c}{b \cdot b} + \frac{-1}{a}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 78.8% accurate, 0.8× speedup?

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

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

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

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


\end{array}\\

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

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


\end{array}\\

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

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


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

    1. Initial program 66.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 b around -inf

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \end{array} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\mathsf{neg}\left(\frac{b}{a}\right)}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{neg}\left(\frac{b}{a}\right)\\ \end{array} \]
      2. distribute-neg-frac2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      3. mul-1-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{-1 \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{-1 \cdot a}\\ \end{array} \]
      4. lower-/.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{-1 \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{-1 \cdot a}\\ \end{array} \]
      5. mul-1-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      6. lower-neg.f6489.4

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{-a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \left(-b\right)}{2 \cdot a}\\ \end{array} \]
    9. Step-by-step derivation
      1. lift->=.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\color{blue}{b \geq 0}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      2. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      3. lift-/.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      4. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      5. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      6. count-2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      7. times-fracN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      8. metadata-evalN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      9. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\color{blue}{b}}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      10. distribute-frac-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      11. distribute-frac-neg2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      12. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\color{blue}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      13. clear-numN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      14. div-invN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      15. clear-numN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      16. lift-/.f6489.4

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

        \[\leadsto \color{blue}{\frac{b}{-a}} \]
      18. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}} \]
      19. frac-2negN/A

        \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(b\right)}{\mathsf{neg}\left(\left(\mathsf{neg}\left(a\right)\right)\right)}} \]
      20. lift-neg.f64N/A

        \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(b\right)}}{\mathsf{neg}\left(\left(\mathsf{neg}\left(a\right)\right)\right)} \]
      21. lift-neg.f64N/A

        \[\leadsto \frac{\mathsf{neg}\left(b\right)}{\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(a\right)\right)}\right)} \]
      22. remove-double-negN/A

        \[\leadsto \frac{\mathsf{neg}\left(b\right)}{\color{blue}{a}} \]
      23. lower-/.f6489.4

        \[\leadsto \color{blue}{\frac{-b}{a}} \]
    10. Applied egg-rr89.4%

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

    if -1.19999999999999995e-45 < b < -2.89999999999999985e-261

    1. Initial program 76.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 a around 0

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \color{blue}{\left(b + -2 \cdot \frac{a \cdot c}{b}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(b + -2 \cdot \frac{a \cdot c}{b}\right)}\\ \end{array} \]
    4. Step-by-step derivation
      1. +-commutativeN/A

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\frac{\color{blue}{\left(-2 \cdot c\right) \cdot a}}{b} + b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\frac{\left(-2 \cdot c\right) \cdot a}{b} + b\right)}\\ \end{array} \]
      5. associate-*l/N/A

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\color{blue}{\left(\frac{c}{b} \cdot -2\right)} \cdot a + b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\left(\frac{c}{b} \cdot -2\right) \cdot a + b\right)}\\ \end{array} \]
      8. associate-*l*N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\color{blue}{\frac{c}{b} \cdot \left(-2 \cdot a\right)} + b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\frac{c}{b} \cdot \left(-2 \cdot a\right) + b\right)}\\ \end{array} \]
      9. lower-fma.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \color{blue}{\mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      10. lower-/.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\color{blue}{\frac{c}{b}}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      11. lower-*.f6476.7

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{a}\\ \end{array} \]
    7. Step-by-step derivation
      1. lower-/.f6476.7

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{a}\\ \end{array} \]
    10. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{a}\\ \end{array} \]
      2. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{a}\\ \end{array} \]
      3. lower-*.f6461.7

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

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

    if -2.89999999999999985e-261 < b < 1.75e-28

    1. Initial program 72.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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \end{array} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

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

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

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

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

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

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

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

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

    if 1.75e-28 < b

    1. Initial program 61.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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \end{array} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{b \cdot -2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{b \cdot -2}\\ \end{array} \]
      2. lower-*.f6490.7

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

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

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

Alternative 11: 90.2% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -3.5 \cdot 10^{+153}:\\ \;\;\;\;\frac{-b}{a}\\ \mathbf{elif}\;b \leq 10^{+124}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -4\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b}{a \cdot 2}\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;-\frac{2 \cdot c}{b + \mathsf{fma}\left(\frac{c}{b}, a \cdot -2, b\right)}\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\frac{c}{b \cdot b} + \frac{-1}{a}\right)\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b -3.5e+153)
   (/ (- b) a)
   (if (<= b 1e+124)
     (if (>= b 0.0)
       (/ (* 2.0 c) (- (- b) (sqrt (fma b b (* c (* a -4.0))))))
       (/ (- (sqrt (- (* b b) (* c (* a 4.0)))) b) (* a 2.0)))
     (if (>= b 0.0)
       (- (/ (* 2.0 c) (+ b (fma (/ c b) (* a -2.0) b))))
       (* b (+ (/ c (* b b)) (/ -1.0 a)))))))
double code(double a, double b, double c) {
	double tmp;
	if (b <= -3.5e+153) {
		tmp = -b / a;
	} else if (b <= 1e+124) {
		double tmp_1;
		if (b >= 0.0) {
			tmp_1 = (2.0 * c) / (-b - sqrt(fma(b, b, (c * (a * -4.0)))));
		} else {
			tmp_1 = (sqrt(((b * b) - (c * (a * 4.0)))) - b) / (a * 2.0);
		}
		tmp = tmp_1;
	} else if (b >= 0.0) {
		tmp = -((2.0 * c) / (b + fma((c / b), (a * -2.0), b)));
	} else {
		tmp = b * ((c / (b * b)) + (-1.0 / a));
	}
	return tmp;
}
function code(a, b, c)
	tmp = 0.0
	if (b <= -3.5e+153)
		tmp = Float64(Float64(-b) / a);
	elseif (b <= 1e+124)
		tmp_1 = 0.0
		if (b >= 0.0)
			tmp_1 = Float64(Float64(2.0 * c) / Float64(Float64(-b) - sqrt(fma(b, b, Float64(c * Float64(a * -4.0))))));
		else
			tmp_1 = Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(c * Float64(a * 4.0)))) - b) / Float64(a * 2.0));
		end
		tmp = tmp_1;
	elseif (b >= 0.0)
		tmp = Float64(-Float64(Float64(2.0 * c) / Float64(b + fma(Float64(c / b), Float64(a * -2.0), b))));
	else
		tmp = Float64(b * Float64(Float64(c / Float64(b * b)) + Float64(-1.0 / a)));
	end
	return tmp
end
code[a_, b_, c_] := If[LessEqual[b, -3.5e+153], N[((-b) / a), $MachinePrecision], If[LessEqual[b, 1e+124], If[GreaterEqual[b, 0.0], N[(N[(2.0 * c), $MachinePrecision] / N[((-b) - N[Sqrt[N[(b * b + N[(c * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $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[(a * 2.0), $MachinePrecision]), $MachinePrecision]], If[GreaterEqual[b, 0.0], (-N[(N[(2.0 * c), $MachinePrecision] / N[(b + N[(N[(c / b), $MachinePrecision] * N[(a * -2.0), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), N[(b * N[(N[(c / N[(b * b), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.5 \cdot 10^{+153}:\\
\;\;\;\;\frac{-b}{a}\\

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

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


\end{array}\\

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

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


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

    1. Initial program 42.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 b around -inf

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \end{array} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\mathsf{neg}\left(\frac{b}{a}\right)}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{neg}\left(\frac{b}{a}\right)\\ \end{array} \]
      2. distribute-neg-frac2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      3. mul-1-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{-1 \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{-1 \cdot a}\\ \end{array} \]
      4. lower-/.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{-1 \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{-1 \cdot a}\\ \end{array} \]
      5. mul-1-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      6. lower-neg.f6496.1

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{-a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \left(-b\right)}{2 \cdot a}\\ \end{array} \]
    9. Step-by-step derivation
      1. lift->=.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\color{blue}{b \geq 0}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      2. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      3. lift-/.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      4. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      5. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      6. count-2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      7. times-fracN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      8. metadata-evalN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      9. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\color{blue}{b}}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      10. distribute-frac-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      11. distribute-frac-neg2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      12. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\color{blue}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      13. clear-numN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      14. div-invN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      15. clear-numN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      16. lift-/.f6496.1

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

        \[\leadsto \color{blue}{\frac{b}{-a}} \]
      18. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}} \]
      19. frac-2negN/A

        \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(b\right)}{\mathsf{neg}\left(\left(\mathsf{neg}\left(a\right)\right)\right)}} \]
      20. lift-neg.f64N/A

        \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(b\right)}}{\mathsf{neg}\left(\left(\mathsf{neg}\left(a\right)\right)\right)} \]
      21. lift-neg.f64N/A

        \[\leadsto \frac{\mathsf{neg}\left(b\right)}{\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(a\right)\right)}\right)} \]
      22. remove-double-negN/A

        \[\leadsto \frac{\mathsf{neg}\left(b\right)}{\color{blue}{a}} \]
      23. lower-/.f6496.1

        \[\leadsto \color{blue}{\frac{-b}{a}} \]
    10. Applied egg-rr96.1%

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

    if -3.4999999999999999e153 < b < 9.99999999999999948e123

    1. Initial program 83.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. Step-by-step derivation
      1. lift-*.f64N/A

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \color{blue}{\left(4 \cdot a\right)} \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \end{array} \]
      3. lift-*.f64N/A

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

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{\mathsf{fma}\left(b, b, \mathsf{neg}\left(\color{blue}{c \cdot \left(4 \cdot a\right)}\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{\mathsf{fma}\left(b, b, \mathsf{neg}\left(c \cdot \left(4 \cdot a\right)\right)\right)}}\\ \end{array} \]
      9. distribute-rgt-neg-inN/A

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{\mathsf{fma}\left(b, b, c \cdot \left(\mathsf{neg}\left(\color{blue}{a \cdot 4}\right)\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{\mathsf{fma}\left(b, b, c \cdot \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right)}}\\ \end{array} \]
      13. distribute-rgt-neg-inN/A

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

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

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

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

    if 9.99999999999999948e123 < b

    1. Initial program 43.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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \color{blue}{\left(b + -2 \cdot \frac{a \cdot c}{b}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(b + -2 \cdot \frac{a \cdot c}{b}\right)}\\ \end{array} \]
    4. Step-by-step derivation
      1. +-commutativeN/A

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\frac{\color{blue}{\left(-2 \cdot c\right) \cdot a}}{b} + b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\frac{\left(-2 \cdot c\right) \cdot a}{b} + b\right)}\\ \end{array} \]
      5. associate-*l/N/A

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\color{blue}{\left(\frac{c}{b} \cdot -2\right)} \cdot a + b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\left(\frac{c}{b} \cdot -2\right) \cdot a + b\right)}\\ \end{array} \]
      8. associate-*l*N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\color{blue}{\frac{c}{b} \cdot \left(-2 \cdot a\right)} + b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\frac{c}{b} \cdot \left(-2 \cdot a\right) + b\right)}\\ \end{array} \]
      9. lower-fma.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \color{blue}{\mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      10. lower-/.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\color{blue}{\frac{c}{b}}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      11. lower-*.f6499.1

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \color{blue}{\mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, 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

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

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      6. +-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      7. mul-1-negN/A

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      9. lower--.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      10. lower-/.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      11. lower-/.f64N/A

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      13. lower-*.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      14. mul-1-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}}\\ \end{array} \]
      15. lower-neg.f6499.1

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

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

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

Alternative 12: 90.1% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -3.5 \cdot 10^{+153}:\\ \;\;\;\;\frac{-b}{a}\\ \mathbf{elif}\;b \leq 1.36 \cdot 10^{+125}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{2}{\left(-b\right) - \sqrt{\mathsf{fma}\left(c, a \cdot -4, b \cdot b\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b}{a \cdot 2}\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;-\frac{2 \cdot c}{b + \mathsf{fma}\left(\frac{c}{b}, a \cdot -2, b\right)}\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\frac{c}{b \cdot b} + \frac{-1}{a}\right)\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b -3.5e+153)
   (/ (- b) a)
   (if (<= b 1.36e+125)
     (if (>= b 0.0)
       (* c (/ 2.0 (- (- b) (sqrt (fma c (* a -4.0) (* b b))))))
       (/ (- (sqrt (- (* b b) (* c (* a 4.0)))) b) (* a 2.0)))
     (if (>= b 0.0)
       (- (/ (* 2.0 c) (+ b (fma (/ c b) (* a -2.0) b))))
       (* b (+ (/ c (* b b)) (/ -1.0 a)))))))
double code(double a, double b, double c) {
	double tmp;
	if (b <= -3.5e+153) {
		tmp = -b / a;
	} else if (b <= 1.36e+125) {
		double tmp_1;
		if (b >= 0.0) {
			tmp_1 = c * (2.0 / (-b - sqrt(fma(c, (a * -4.0), (b * b)))));
		} else {
			tmp_1 = (sqrt(((b * b) - (c * (a * 4.0)))) - b) / (a * 2.0);
		}
		tmp = tmp_1;
	} else if (b >= 0.0) {
		tmp = -((2.0 * c) / (b + fma((c / b), (a * -2.0), b)));
	} else {
		tmp = b * ((c / (b * b)) + (-1.0 / a));
	}
	return tmp;
}
function code(a, b, c)
	tmp = 0.0
	if (b <= -3.5e+153)
		tmp = Float64(Float64(-b) / a);
	elseif (b <= 1.36e+125)
		tmp_1 = 0.0
		if (b >= 0.0)
			tmp_1 = Float64(c * Float64(2.0 / Float64(Float64(-b) - sqrt(fma(c, Float64(a * -4.0), Float64(b * b))))));
		else
			tmp_1 = Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(c * Float64(a * 4.0)))) - b) / Float64(a * 2.0));
		end
		tmp = tmp_1;
	elseif (b >= 0.0)
		tmp = Float64(-Float64(Float64(2.0 * c) / Float64(b + fma(Float64(c / b), Float64(a * -2.0), b))));
	else
		tmp = Float64(b * Float64(Float64(c / Float64(b * b)) + Float64(-1.0 / a)));
	end
	return tmp
end
code[a_, b_, c_] := If[LessEqual[b, -3.5e+153], N[((-b) / a), $MachinePrecision], If[LessEqual[b, 1.36e+125], If[GreaterEqual[b, 0.0], N[(c * N[(2.0 / N[((-b) - N[Sqrt[N[(c * N[(a * -4.0), $MachinePrecision] + N[(b * b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $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[(a * 2.0), $MachinePrecision]), $MachinePrecision]], If[GreaterEqual[b, 0.0], (-N[(N[(2.0 * c), $MachinePrecision] / N[(b + N[(N[(c / b), $MachinePrecision] * N[(a * -2.0), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), N[(b * N[(N[(c / N[(b * b), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.5 \cdot 10^{+153}:\\
\;\;\;\;\frac{-b}{a}\\

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

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


\end{array}\\

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

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


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

    1. Initial program 42.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 b around -inf

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \end{array} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\mathsf{neg}\left(\frac{b}{a}\right)}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{neg}\left(\frac{b}{a}\right)\\ \end{array} \]
      2. distribute-neg-frac2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      3. mul-1-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{-1 \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{-1 \cdot a}\\ \end{array} \]
      4. lower-/.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{-1 \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{-1 \cdot a}\\ \end{array} \]
      5. mul-1-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      6. lower-neg.f6496.1

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{-a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \left(-b\right)}{2 \cdot a}\\ \end{array} \]
    9. Step-by-step derivation
      1. lift->=.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\color{blue}{b \geq 0}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      2. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      3. lift-/.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      4. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      5. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      6. count-2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      7. times-fracN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      8. metadata-evalN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      9. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\color{blue}{b}}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      10. distribute-frac-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      11. distribute-frac-neg2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      12. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\color{blue}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      13. clear-numN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      14. div-invN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      15. clear-numN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      16. lift-/.f6496.1

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

        \[\leadsto \color{blue}{\frac{b}{-a}} \]
      18. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}} \]
      19. frac-2negN/A

        \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(b\right)}{\mathsf{neg}\left(\left(\mathsf{neg}\left(a\right)\right)\right)}} \]
      20. lift-neg.f64N/A

        \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(b\right)}}{\mathsf{neg}\left(\left(\mathsf{neg}\left(a\right)\right)\right)} \]
      21. lift-neg.f64N/A

        \[\leadsto \frac{\mathsf{neg}\left(b\right)}{\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(a\right)\right)}\right)} \]
      22. remove-double-negN/A

        \[\leadsto \frac{\mathsf{neg}\left(b\right)}{\color{blue}{a}} \]
      23. lower-/.f6496.1

        \[\leadsto \color{blue}{\frac{-b}{a}} \]
    10. Applied egg-rr96.1%

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

    if -3.4999999999999999e153 < b < 1.36e125

    1. Initial program 83.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. Applied egg-rr83.5%

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

    if 1.36e125 < b

    1. Initial program 43.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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \color{blue}{\left(b + -2 \cdot \frac{a \cdot c}{b}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(b + -2 \cdot \frac{a \cdot c}{b}\right)}\\ \end{array} \]
    4. Step-by-step derivation
      1. +-commutativeN/A

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\frac{\color{blue}{\left(-2 \cdot c\right) \cdot a}}{b} + b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\frac{\left(-2 \cdot c\right) \cdot a}{b} + b\right)}\\ \end{array} \]
      5. associate-*l/N/A

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\color{blue}{\left(\frac{c}{b} \cdot -2\right)} \cdot a + b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\left(\frac{c}{b} \cdot -2\right) \cdot a + b\right)}\\ \end{array} \]
      8. associate-*l*N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\color{blue}{\frac{c}{b} \cdot \left(-2 \cdot a\right)} + b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\frac{c}{b} \cdot \left(-2 \cdot a\right) + b\right)}\\ \end{array} \]
      9. lower-fma.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \color{blue}{\mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      10. lower-/.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\color{blue}{\frac{c}{b}}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      11. lower-*.f6499.1

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \color{blue}{\mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, 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

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

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      6. +-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      7. mul-1-negN/A

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      9. lower--.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      10. lower-/.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      11. lower-/.f64N/A

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      13. lower-*.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      14. mul-1-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}}\\ \end{array} \]
      15. lower-neg.f6499.1

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

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

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

Alternative 13: 72.4% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.2 \cdot 10^{-45}:\\
\;\;\;\;\frac{-b}{a}\\

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

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


\end{array}\\

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

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


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

    1. Initial program 66.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 b around -inf

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \end{array} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\mathsf{neg}\left(\frac{b}{a}\right)}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{neg}\left(\frac{b}{a}\right)\\ \end{array} \]
      2. distribute-neg-frac2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      3. mul-1-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{-1 \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{-1 \cdot a}\\ \end{array} \]
      4. lower-/.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{-1 \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{-1 \cdot a}\\ \end{array} \]
      5. mul-1-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      6. lower-neg.f6489.4

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{-a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \left(-b\right)}{2 \cdot a}\\ \end{array} \]
    9. Step-by-step derivation
      1. lift->=.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\color{blue}{b \geq 0}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      2. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      3. lift-/.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      4. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      5. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      6. count-2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      7. times-fracN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      8. metadata-evalN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      9. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\color{blue}{b}}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      10. distribute-frac-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      11. distribute-frac-neg2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      12. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\color{blue}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      13. clear-numN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      14. div-invN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      15. clear-numN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      16. lift-/.f6489.4

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

        \[\leadsto \color{blue}{\frac{b}{-a}} \]
      18. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}} \]
      19. frac-2negN/A

        \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(b\right)}{\mathsf{neg}\left(\left(\mathsf{neg}\left(a\right)\right)\right)}} \]
      20. lift-neg.f64N/A

        \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(b\right)}}{\mathsf{neg}\left(\left(\mathsf{neg}\left(a\right)\right)\right)} \]
      21. lift-neg.f64N/A

        \[\leadsto \frac{\mathsf{neg}\left(b\right)}{\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(a\right)\right)}\right)} \]
      22. remove-double-negN/A

        \[\leadsto \frac{\mathsf{neg}\left(b\right)}{\color{blue}{a}} \]
      23. lower-/.f6489.4

        \[\leadsto \color{blue}{\frac{-b}{a}} \]
    10. Applied egg-rr89.4%

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

    if -1.19999999999999995e-45 < b < -2.89999999999999985e-261

    1. Initial program 76.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 a around 0

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \color{blue}{\left(b + -2 \cdot \frac{a \cdot c}{b}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(b + -2 \cdot \frac{a \cdot c}{b}\right)}\\ \end{array} \]
    4. Step-by-step derivation
      1. +-commutativeN/A

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\frac{\color{blue}{\left(-2 \cdot c\right) \cdot a}}{b} + b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\frac{\left(-2 \cdot c\right) \cdot a}{b} + b\right)}\\ \end{array} \]
      5. associate-*l/N/A

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\color{blue}{\left(\frac{c}{b} \cdot -2\right)} \cdot a + b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\left(\frac{c}{b} \cdot -2\right) \cdot a + b\right)}\\ \end{array} \]
      8. associate-*l*N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\color{blue}{\frac{c}{b} \cdot \left(-2 \cdot a\right)} + b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \left(\frac{c}{b} \cdot \left(-2 \cdot a\right) + b\right)}\\ \end{array} \]
      9. lower-fma.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \color{blue}{\mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      10. lower-/.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\color{blue}{\frac{c}{b}}, -2 \cdot a, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \mathsf{fma}\left(\frac{c}{b}, -2 \cdot a, b\right)}\\ \end{array} \]
      11. lower-*.f6476.7

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{a}\\ \end{array} \]
    7. Step-by-step derivation
      1. lower-/.f6476.7

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{a}\\ \end{array} \]
    10. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{a}\\ \end{array} \]
      2. *-commutativeN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{a}\\ \end{array} \]
      3. lower-*.f6461.7

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

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

    if -2.89999999999999985e-261 < b

    1. Initial program 66.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 b around -inf

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \end{array} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

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

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

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

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

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

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

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

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

Alternative 14: 40.7% accurate, 1.7× speedup?

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

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

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


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

    1. Initial program 68.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 b around -inf

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \end{array} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \left(-b\right)}{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{\left(-b\right) + \left(-b\right)}{2 \cdot a}\\ \end{array} \]
    6. Taylor expanded in b around -inf

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\mathsf{neg}\left(\frac{b}{a}\right)}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{neg}\left(\frac{b}{a}\right)\\ \end{array} \]
      2. distribute-neg-frac2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      3. mul-1-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{-1 \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{-1 \cdot a}\\ \end{array} \]
      4. lower-/.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{-1 \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{-1 \cdot a}\\ \end{array} \]
      5. mul-1-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      6. lower-neg.f6471.9

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{-a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \left(-b\right)}{2 \cdot a}\\ \end{array} \]
    9. Step-by-step derivation
      1. lift->=.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\color{blue}{b \geq 0}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      2. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      3. lift-/.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      4. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      5. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      6. count-2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      7. times-fracN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      8. metadata-evalN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      9. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\color{blue}{b}}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      10. distribute-frac-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      11. distribute-frac-neg2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      12. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\color{blue}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      13. clear-numN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      14. div-invN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      15. clear-numN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      16. lift-/.f6471.9

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

        \[\leadsto \color{blue}{\frac{b}{-a}} \]
      18. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}} \]
      19. frac-2negN/A

        \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(b\right)}{\mathsf{neg}\left(\left(\mathsf{neg}\left(a\right)\right)\right)}} \]
      20. lift-neg.f64N/A

        \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(b\right)}}{\mathsf{neg}\left(\left(\mathsf{neg}\left(a\right)\right)\right)} \]
      21. lift-neg.f64N/A

        \[\leadsto \frac{\mathsf{neg}\left(b\right)}{\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(a\right)\right)}\right)} \]
      22. remove-double-negN/A

        \[\leadsto \frac{\mathsf{neg}\left(b\right)}{\color{blue}{a}} \]
      23. lower-/.f6471.9

        \[\leadsto \color{blue}{\frac{-b}{a}} \]
    10. Applied egg-rr71.9%

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

    if -3.39999999999999972e-288 < b

    1. Initial program 66.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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \end{array} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\mathsf{neg}\left(\frac{b}{a}\right)}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{neg}\left(\frac{b}{a}\right)\\ \end{array} \]
      2. distribute-neg-frac2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      3. mul-1-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{-1 \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{-1 \cdot a}\\ \end{array} \]
      4. lower-/.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{-1 \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{-1 \cdot a}\\ \end{array} \]
      5. mul-1-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      6. lower-neg.f643.1

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

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

      \[\leadsto \color{blue}{\frac{b}{a} - \frac{b}{a}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 15: 39.1% accurate, 1.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq 1.1 \cdot 10^{-308}:\\
\;\;\;\;\frac{-b}{a}\\

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


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

    1. Initial program 67.8%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \end{array} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\mathsf{neg}\left(\frac{b}{a}\right)}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{neg}\left(\frac{b}{a}\right)\\ \end{array} \]
      2. distribute-neg-frac2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      3. mul-1-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{-1 \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{-1 \cdot a}\\ \end{array} \]
      4. lower-/.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{-1 \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{-1 \cdot a}\\ \end{array} \]
      5. mul-1-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      6. lower-neg.f6470.8

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{-a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \left(-b\right)}{2 \cdot a}\\ \end{array} \]
    9. Step-by-step derivation
      1. lift->=.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\color{blue}{b \geq 0}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      2. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      3. lift-/.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      4. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      5. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      6. count-2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      7. times-fracN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      8. metadata-evalN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      9. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\color{blue}{b}}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      10. distribute-frac-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      11. distribute-frac-neg2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      12. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\color{blue}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      13. clear-numN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      14. div-invN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      15. clear-numN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      16. lift-/.f6470.8

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

        \[\leadsto \color{blue}{\frac{b}{-a}} \]
      18. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}} \]
      19. frac-2negN/A

        \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(b\right)}{\mathsf{neg}\left(\left(\mathsf{neg}\left(a\right)\right)\right)}} \]
      20. lift-neg.f64N/A

        \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(b\right)}}{\mathsf{neg}\left(\left(\mathsf{neg}\left(a\right)\right)\right)} \]
      21. lift-neg.f64N/A

        \[\leadsto \frac{\mathsf{neg}\left(b\right)}{\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(a\right)\right)}\right)} \]
      22. remove-double-negN/A

        \[\leadsto \frac{\mathsf{neg}\left(b\right)}{\color{blue}{a}} \]
      23. lower-/.f6470.8

        \[\leadsto \color{blue}{\frac{-b}{a}} \]
    10. Applied egg-rr70.8%

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

    if 1.1000000000000001e-308 < b

    1. Initial program 67.4%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \end{array} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\mathsf{neg}\left(\frac{b}{a}\right)}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{neg}\left(\frac{b}{a}\right)\\ \end{array} \]
      2. distribute-neg-frac2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      3. mul-1-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{-1 \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{-1 \cdot a}\\ \end{array} \]
      4. lower-/.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{-1 \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{-1 \cdot a}\\ \end{array} \]
      5. mul-1-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      6. lower-neg.f643.1

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

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

      \[\leadsto \color{blue}{\frac{0 \cdot \left(a \cdot \left(b + b\right)\right) - \left(-a\right)}{a \cdot \left(a \cdot \left(b + b\right)\right)}} \]
    10. Step-by-step derivation
      1. lift-+.f64N/A

        \[\leadsto \frac{0 \cdot \left(a \cdot \color{blue}{\left(b + b\right)}\right) - \left(\mathsf{neg}\left(a\right)\right)}{a \cdot \left(a \cdot \left(b + b\right)\right)} \]
      2. lift-*.f64N/A

        \[\leadsto \frac{0 \cdot \color{blue}{\left(a \cdot \left(b + b\right)\right)} - \left(\mathsf{neg}\left(a\right)\right)}{a \cdot \left(a \cdot \left(b + b\right)\right)} \]
      3. mul0-lftN/A

        \[\leadsto \frac{\color{blue}{0} - \left(\mathsf{neg}\left(a\right)\right)}{a \cdot \left(a \cdot \left(b + b\right)\right)} \]
      4. lift-neg.f64N/A

        \[\leadsto \frac{0 - \color{blue}{\left(\mathsf{neg}\left(a\right)\right)}}{a \cdot \left(a \cdot \left(b + b\right)\right)} \]
      5. neg-sub0N/A

        \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\left(\mathsf{neg}\left(a\right)\right)\right)}}{a \cdot \left(a \cdot \left(b + b\right)\right)} \]
      6. lift-neg.f64N/A

        \[\leadsto \frac{\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(a\right)\right)}\right)}{a \cdot \left(a \cdot \left(b + b\right)\right)} \]
      7. remove-double-neg11.1

        \[\leadsto \frac{\color{blue}{a}}{a \cdot \left(a \cdot \left(b + b\right)\right)} \]
    11. Applied egg-rr11.1%

      \[\leadsto \frac{\color{blue}{a}}{a \cdot \left(a \cdot \left(b + b\right)\right)} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 16: 38.7% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq 9.2 \cdot 10^{-289}:\\ \;\;\;\;\frac{-b}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{-1}{a \cdot \left(a \cdot \left(b + b\right)\right)}\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b 9.2e-289) (/ (- b) a) (/ -1.0 (* a (* a (+ b b))))))
double code(double a, double b, double c) {
	double tmp;
	if (b <= 9.2e-289) {
		tmp = -b / a;
	} else {
		tmp = -1.0 / (a * (a * (b + 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 <= 9.2d-289) then
        tmp = -b / a
    else
        tmp = (-1.0d0) / (a * (a * (b + b)))
    end if
    code = tmp
end function
public static double code(double a, double b, double c) {
	double tmp;
	if (b <= 9.2e-289) {
		tmp = -b / a;
	} else {
		tmp = -1.0 / (a * (a * (b + b)));
	}
	return tmp;
}
def code(a, b, c):
	tmp = 0
	if b <= 9.2e-289:
		tmp = -b / a
	else:
		tmp = -1.0 / (a * (a * (b + b)))
	return tmp
function code(a, b, c)
	tmp = 0.0
	if (b <= 9.2e-289)
		tmp = Float64(Float64(-b) / a);
	else
		tmp = Float64(-1.0 / Float64(a * Float64(a * Float64(b + b))));
	end
	return tmp
end
function tmp_2 = code(a, b, c)
	tmp = 0.0;
	if (b <= 9.2e-289)
		tmp = -b / a;
	else
		tmp = -1.0 / (a * (a * (b + b)));
	end
	tmp_2 = tmp;
end
code[a_, b_, c_] := If[LessEqual[b, 9.2e-289], N[((-b) / a), $MachinePrecision], N[(-1.0 / N[(a * N[(a * N[(b + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq 9.2 \cdot 10^{-289}:\\
\;\;\;\;\frac{-b}{a}\\

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


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

    1. Initial program 68.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 b around -inf

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \end{array} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\mathsf{neg}\left(\frac{b}{a}\right)}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{neg}\left(\frac{b}{a}\right)\\ \end{array} \]
      2. distribute-neg-frac2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      3. mul-1-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{-1 \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{-1 \cdot a}\\ \end{array} \]
      4. lower-/.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{-1 \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{-1 \cdot a}\\ \end{array} \]
      5. mul-1-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      6. lower-neg.f6465.5

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{-a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \left(-b\right)}{2 \cdot a}\\ \end{array} \]
    9. Step-by-step derivation
      1. lift->=.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\color{blue}{b \geq 0}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      2. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      3. lift-/.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      4. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      5. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      6. count-2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      7. times-fracN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      8. metadata-evalN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      9. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\color{blue}{b}}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      10. distribute-frac-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      11. distribute-frac-neg2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      12. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\color{blue}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      13. clear-numN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      14. div-invN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      15. clear-numN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      16. lift-/.f6465.5

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

        \[\leadsto \color{blue}{\frac{b}{-a}} \]
      18. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}} \]
      19. frac-2negN/A

        \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(b\right)}{\mathsf{neg}\left(\left(\mathsf{neg}\left(a\right)\right)\right)}} \]
      20. lift-neg.f64N/A

        \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(b\right)}}{\mathsf{neg}\left(\left(\mathsf{neg}\left(a\right)\right)\right)} \]
      21. lift-neg.f64N/A

        \[\leadsto \frac{\mathsf{neg}\left(b\right)}{\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(a\right)\right)}\right)} \]
      22. remove-double-negN/A

        \[\leadsto \frac{\mathsf{neg}\left(b\right)}{\color{blue}{a}} \]
      23. lower-/.f6465.5

        \[\leadsto \color{blue}{\frac{-b}{a}} \]
    10. Applied egg-rr65.5%

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

    if 9.2000000000000007e-289 < b

    1. Initial program 67.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 b around -inf

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \end{array} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\mathsf{neg}\left(\frac{b}{a}\right)}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{neg}\left(\frac{b}{a}\right)\\ \end{array} \]
      2. distribute-neg-frac2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      3. mul-1-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{-1 \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{-1 \cdot a}\\ \end{array} \]
      4. lower-/.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{-1 \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{-1 \cdot a}\\ \end{array} \]
      5. mul-1-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      6. lower-neg.f643.2

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

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

      \[\leadsto \color{blue}{\frac{-1}{a \cdot \left(b + b\right)}} \]
    10. Step-by-step derivation
      1. flip-+N/A

        \[\leadsto \frac{-1}{a \cdot \color{blue}{\frac{b \cdot b - b \cdot b}{b - b}}} \]
      2. lift-*.f64N/A

        \[\leadsto \frac{-1}{a \cdot \frac{\color{blue}{b \cdot b} - b \cdot b}{b - b}} \]
      3. lift-*.f64N/A

        \[\leadsto \frac{-1}{a \cdot \frac{b \cdot b - \color{blue}{b \cdot b}}{b - b}} \]
      4. +-inversesN/A

        \[\leadsto \frac{-1}{a \cdot \frac{\color{blue}{0}}{b - b}} \]
      5. mul0-lftN/A

        \[\leadsto \frac{-1}{a \cdot \frac{\color{blue}{0 \cdot a}}{b - b}} \]
      6. mul0-lftN/A

        \[\leadsto \frac{-1}{a \cdot \frac{\color{blue}{\left(0 \cdot \left(a \cdot \left(b + b\right)\right)\right)} \cdot a}{b - b}} \]
      7. lift-*.f64N/A

        \[\leadsto \frac{-1}{a \cdot \frac{\color{blue}{\left(0 \cdot \left(a \cdot \left(b + b\right)\right)\right)} \cdot a}{b - b}} \]
      8. +-inversesN/A

        \[\leadsto \frac{-1}{a \cdot \frac{\left(0 \cdot \left(a \cdot \left(b + b\right)\right)\right) \cdot a}{\color{blue}{0}}} \]
      9. mul0-lftN/A

        \[\leadsto \frac{-1}{a \cdot \frac{\left(0 \cdot \left(a \cdot \left(b + b\right)\right)\right) \cdot a}{\color{blue}{0 \cdot \left(a \cdot \left(b + b\right)\right)}}} \]
      10. lift-*.f64N/A

        \[\leadsto \frac{-1}{a \cdot \frac{\left(0 \cdot \left(a \cdot \left(b + b\right)\right)\right) \cdot a}{\color{blue}{0 \cdot \left(a \cdot \left(b + b\right)\right)}}} \]
      11. associate-*l/N/A

        \[\leadsto \frac{-1}{a \cdot \color{blue}{\left(\frac{0 \cdot \left(a \cdot \left(b + b\right)\right)}{0 \cdot \left(a \cdot \left(b + b\right)\right)} \cdot a\right)}} \]
    11. Applied egg-rr11.3%

      \[\leadsto \frac{-1}{a \cdot \color{blue}{\left(\left(b + b\right) \cdot a\right)}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification38.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 9.2 \cdot 10^{-289}:\\ \;\;\;\;\frac{-b}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{-1}{a \cdot \left(a \cdot \left(b + b\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 67.8% accurate, 2.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Initial program 67.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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \end{array} \]
  4. Step-by-step derivation
    1. mul-1-negN/A

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

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

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

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

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

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

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

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

Alternative 18: 38.5% accurate, 2.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq 1.1 \cdot 10^{-308}:\\
\;\;\;\;\frac{-b}{a}\\

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


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

    1. Initial program 67.8%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \end{array} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\mathsf{neg}\left(\frac{b}{a}\right)}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{neg}\left(\frac{b}{a}\right)\\ \end{array} \]
      2. distribute-neg-frac2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      3. mul-1-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{-1 \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{-1 \cdot a}\\ \end{array} \]
      4. lower-/.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{-1 \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{-1 \cdot a}\\ \end{array} \]
      5. mul-1-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      6. lower-neg.f6470.8

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{-a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \left(-b\right)}{2 \cdot a}\\ \end{array} \]
    9. Step-by-step derivation
      1. lift->=.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\color{blue}{b \geq 0}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      2. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      3. lift-/.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      4. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      5. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      6. count-2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      7. times-fracN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      8. metadata-evalN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      9. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\color{blue}{b}}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      10. distribute-frac-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      11. distribute-frac-neg2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      12. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\color{blue}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      13. clear-numN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      14. div-invN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      15. clear-numN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      16. lift-/.f6470.8

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

        \[\leadsto \color{blue}{\frac{b}{-a}} \]
      18. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}} \]
      19. frac-2negN/A

        \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(b\right)}{\mathsf{neg}\left(\left(\mathsf{neg}\left(a\right)\right)\right)}} \]
      20. lift-neg.f64N/A

        \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(b\right)}}{\mathsf{neg}\left(\left(\mathsf{neg}\left(a\right)\right)\right)} \]
      21. lift-neg.f64N/A

        \[\leadsto \frac{\mathsf{neg}\left(b\right)}{\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(a\right)\right)}\right)} \]
      22. remove-double-negN/A

        \[\leadsto \frac{\mathsf{neg}\left(b\right)}{\color{blue}{a}} \]
      23. lower-/.f6470.8

        \[\leadsto \color{blue}{\frac{-b}{a}} \]
    10. Applied egg-rr70.8%

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

    if 1.1000000000000001e-308 < b

    1. Initial program 67.4%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \end{array} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\mathsf{neg}\left(\frac{b}{a}\right)}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{neg}\left(\frac{b}{a}\right)\\ \end{array} \]
      2. distribute-neg-frac2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      3. mul-1-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{-1 \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{-1 \cdot a}\\ \end{array} \]
      4. lower-/.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{-1 \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{-1 \cdot a}\\ \end{array} \]
      5. mul-1-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      6. lower-neg.f643.1

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

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

      \[\leadsto \color{blue}{\frac{0 \cdot \left(a \cdot \left(b + b\right)\right) - \left(-a\right)}{a \cdot \left(a \cdot \left(b + b\right)\right)}} \]
    10. Taylor expanded in a around 0

      \[\leadsto \color{blue}{\frac{\frac{1}{2}}{a \cdot b}} \]
    11. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{1}{2}}{a \cdot b}} \]
      2. *-commutativeN/A

        \[\leadsto \frac{\frac{1}{2}}{\color{blue}{b \cdot a}} \]
      3. lower-*.f649.2

        \[\leadsto \frac{0.5}{\color{blue}{b \cdot a}} \]
    12. Simplified9.2%

      \[\leadsto \color{blue}{\frac{0.5}{b \cdot a}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 19: 38.2% accurate, 2.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq 1.1 \cdot 10^{-308}:\\
\;\;\;\;\frac{-b}{a}\\

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


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

    1. Initial program 67.8%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \end{array} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\mathsf{neg}\left(\frac{b}{a}\right)}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{neg}\left(\frac{b}{a}\right)\\ \end{array} \]
      2. distribute-neg-frac2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      3. mul-1-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{-1 \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{-1 \cdot a}\\ \end{array} \]
      4. lower-/.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{-1 \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{-1 \cdot a}\\ \end{array} \]
      5. mul-1-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      6. lower-neg.f6470.8

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{-a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \left(-b\right)}{2 \cdot a}\\ \end{array} \]
    9. Step-by-step derivation
      1. lift->=.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\color{blue}{b \geq 0}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      2. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      3. lift-/.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      4. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      5. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      6. count-2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      7. times-fracN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      8. metadata-evalN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      9. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\color{blue}{b}}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      10. distribute-frac-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      11. distribute-frac-neg2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      12. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\color{blue}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      13. clear-numN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      14. div-invN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      15. clear-numN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      16. lift-/.f6470.8

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

        \[\leadsto \color{blue}{\frac{b}{-a}} \]
      18. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}} \]
      19. frac-2negN/A

        \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(b\right)}{\mathsf{neg}\left(\left(\mathsf{neg}\left(a\right)\right)\right)}} \]
      20. lift-neg.f64N/A

        \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(b\right)}}{\mathsf{neg}\left(\left(\mathsf{neg}\left(a\right)\right)\right)} \]
      21. lift-neg.f64N/A

        \[\leadsto \frac{\mathsf{neg}\left(b\right)}{\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(a\right)\right)}\right)} \]
      22. remove-double-negN/A

        \[\leadsto \frac{\mathsf{neg}\left(b\right)}{\color{blue}{a}} \]
      23. lower-/.f6470.8

        \[\leadsto \color{blue}{\frac{-b}{a}} \]
    10. Applied egg-rr70.8%

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

    if 1.1000000000000001e-308 < b

    1. Initial program 67.4%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \end{array} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\mathsf{neg}\left(\frac{b}{a}\right)}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{neg}\left(\frac{b}{a}\right)\\ \end{array} \]
      2. distribute-neg-frac2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      3. mul-1-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{-1 \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{-1 \cdot a}\\ \end{array} \]
      4. lower-/.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{-1 \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{-1 \cdot a}\\ \end{array} \]
      5. mul-1-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      6. lower-neg.f643.1

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

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

      \[\leadsto \color{blue}{\frac{0 \cdot \left(a \cdot \left(b + b\right)\right) - \left(-a\right)}{a \cdot \left(a \cdot \left(b + b\right)\right)}} \]
    10. Step-by-step derivation
      1. lift-+.f64N/A

        \[\leadsto \frac{0 \cdot \left(a \cdot \color{blue}{\left(b + b\right)}\right) - \left(\mathsf{neg}\left(a\right)\right)}{a \cdot \left(a \cdot \left(b + b\right)\right)} \]
      2. lift-*.f64N/A

        \[\leadsto \frac{0 \cdot \color{blue}{\left(a \cdot \left(b + b\right)\right)} - \left(\mathsf{neg}\left(a\right)\right)}{a \cdot \left(a \cdot \left(b + b\right)\right)} \]
      3. mul0-lftN/A

        \[\leadsto \frac{\color{blue}{0} - \left(\mathsf{neg}\left(a\right)\right)}{a \cdot \left(a \cdot \left(b + b\right)\right)} \]
      4. lift-neg.f64N/A

        \[\leadsto \frac{0 - \color{blue}{\left(\mathsf{neg}\left(a\right)\right)}}{a \cdot \left(a \cdot \left(b + b\right)\right)} \]
      5. neg-sub0N/A

        \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\left(\mathsf{neg}\left(a\right)\right)\right)}}{a \cdot \left(a \cdot \left(b + b\right)\right)} \]
      6. lift-neg.f64N/A

        \[\leadsto \frac{\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(a\right)\right)}\right)}{a \cdot \left(a \cdot \left(b + b\right)\right)} \]
      7. remove-double-negN/A

        \[\leadsto \frac{\color{blue}{a}}{a \cdot \left(a \cdot \left(b + b\right)\right)} \]
      8. lift-+.f64N/A

        \[\leadsto \frac{a}{a \cdot \left(a \cdot \color{blue}{\left(b + b\right)}\right)} \]
      9. *-commutativeN/A

        \[\leadsto \frac{a}{a \cdot \color{blue}{\left(\left(b + b\right) \cdot a\right)}} \]
      10. lift-+.f64N/A

        \[\leadsto \frac{a}{a \cdot \left(\color{blue}{\left(b + b\right)} \cdot a\right)} \]
      11. flip-+N/A

        \[\leadsto \frac{a}{a \cdot \left(\color{blue}{\frac{b \cdot b - b \cdot b}{b - b}} \cdot a\right)} \]
      12. lift-*.f64N/A

        \[\leadsto \frac{a}{a \cdot \left(\frac{\color{blue}{b \cdot b} - b \cdot b}{b - b} \cdot a\right)} \]
      13. lift-*.f64N/A

        \[\leadsto \frac{a}{a \cdot \left(\frac{b \cdot b - \color{blue}{b \cdot b}}{b - b} \cdot a\right)} \]
      14. +-inversesN/A

        \[\leadsto \frac{a}{a \cdot \left(\frac{\color{blue}{0}}{b - b} \cdot a\right)} \]
      15. mul0-lftN/A

        \[\leadsto \frac{a}{a \cdot \left(\frac{\color{blue}{0 \cdot \left(a \cdot \left(b + b\right)\right)}}{b - b} \cdot a\right)} \]
      16. lift-*.f64N/A

        \[\leadsto \frac{a}{a \cdot \left(\frac{\color{blue}{0 \cdot \left(a \cdot \left(b + b\right)\right)}}{b - b} \cdot a\right)} \]
      17. +-inversesN/A

        \[\leadsto \frac{a}{a \cdot \left(\frac{0 \cdot \left(a \cdot \left(b + b\right)\right)}{\color{blue}{0}} \cdot a\right)} \]
      18. mul0-lftN/A

        \[\leadsto \frac{a}{a \cdot \left(\frac{0 \cdot \left(a \cdot \left(b + b\right)\right)}{\color{blue}{0 \cdot \left(a \cdot \left(b + b\right)\right)}} \cdot a\right)} \]
      19. lift-*.f64N/A

        \[\leadsto \frac{a}{a \cdot \left(\frac{0 \cdot \left(a \cdot \left(b + b\right)\right)}{\color{blue}{0 \cdot \left(a \cdot \left(b + b\right)\right)}} \cdot a\right)} \]
      20. associate-*l/N/A

        \[\leadsto \frac{a}{a \cdot \color{blue}{\frac{\left(0 \cdot \left(a \cdot \left(b + b\right)\right)\right) \cdot a}{0 \cdot \left(a \cdot \left(b + b\right)\right)}}} \]
    11. Applied egg-rr9.1%

      \[\leadsto \color{blue}{\frac{a}{b + b}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 20: 36.2% accurate, 2.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq 4.3 \cdot 10^{+148}:\\ \;\;\;\;\frac{-b}{a}\\ \mathbf{else}:\\ \;\;\;\;\left(b + b\right) \cdot \left(a \cdot a\right)\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b 4.3e+148) (/ (- b) a) (* (+ b b) (* a a))))
double code(double a, double b, double c) {
	double tmp;
	if (b <= 4.3e+148) {
		tmp = -b / a;
	} else {
		tmp = (b + b) * (a * 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 <= 4.3d+148) then
        tmp = -b / a
    else
        tmp = (b + b) * (a * a)
    end if
    code = tmp
end function
public static double code(double a, double b, double c) {
	double tmp;
	if (b <= 4.3e+148) {
		tmp = -b / a;
	} else {
		tmp = (b + b) * (a * a);
	}
	return tmp;
}
def code(a, b, c):
	tmp = 0
	if b <= 4.3e+148:
		tmp = -b / a
	else:
		tmp = (b + b) * (a * a)
	return tmp
function code(a, b, c)
	tmp = 0.0
	if (b <= 4.3e+148)
		tmp = Float64(Float64(-b) / a);
	else
		tmp = Float64(Float64(b + b) * Float64(a * a));
	end
	return tmp
end
function tmp_2 = code(a, b, c)
	tmp = 0.0;
	if (b <= 4.3e+148)
		tmp = -b / a;
	else
		tmp = (b + b) * (a * a);
	end
	tmp_2 = tmp;
end
code[a_, b_, c_] := If[LessEqual[b, 4.3e+148], N[((-b) / a), $MachinePrecision], N[(N[(b + b), $MachinePrecision] * N[(a * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq 4.3 \cdot 10^{+148}:\\
\;\;\;\;\frac{-b}{a}\\

\mathbf{else}:\\
\;\;\;\;\left(b + b\right) \cdot \left(a \cdot a\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < 4.3000000000000002e148

    1. Initial program 74.4%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \end{array} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\mathsf{neg}\left(\frac{b}{a}\right)}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{neg}\left(\frac{b}{a}\right)\\ \end{array} \]
      2. distribute-neg-frac2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      3. mul-1-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{-1 \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{-1 \cdot a}\\ \end{array} \]
      4. lower-/.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{-1 \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{-1 \cdot a}\\ \end{array} \]
      5. mul-1-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      6. lower-neg.f6442.1

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{-a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \left(-b\right)}{2 \cdot a}\\ \end{array} \]
    9. Step-by-step derivation
      1. lift->=.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;\color{blue}{b \geq 0}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      2. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      3. lift-/.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      4. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      5. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      6. count-2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      7. times-fracN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      8. metadata-evalN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      9. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\color{blue}{b}}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      10. distribute-frac-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      11. distribute-frac-neg2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      12. lift-neg.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\color{blue}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      13. clear-numN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \end{array} \]
      14. div-invN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      15. clear-numN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      16. lift-/.f6442.1

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

        \[\leadsto \color{blue}{\frac{b}{-a}} \]
      18. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}} \]
      19. frac-2negN/A

        \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(b\right)}{\mathsf{neg}\left(\left(\mathsf{neg}\left(a\right)\right)\right)}} \]
      20. lift-neg.f64N/A

        \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(b\right)}}{\mathsf{neg}\left(\left(\mathsf{neg}\left(a\right)\right)\right)} \]
      21. lift-neg.f64N/A

        \[\leadsto \frac{\mathsf{neg}\left(b\right)}{\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(a\right)\right)}\right)} \]
      22. remove-double-negN/A

        \[\leadsto \frac{\mathsf{neg}\left(b\right)}{\color{blue}{a}} \]
      23. lower-/.f6442.1

        \[\leadsto \color{blue}{\frac{-b}{a}} \]
    10. Applied egg-rr42.1%

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

    if 4.3000000000000002e148 < b

    1. Initial program 37.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 b around -inf

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \end{array} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\mathsf{neg}\left(\frac{b}{a}\right)}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{neg}\left(\frac{b}{a}\right)\\ \end{array} \]
      2. distribute-neg-frac2N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      3. mul-1-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{-1 \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{-1 \cdot a}\\ \end{array} \]
      4. lower-/.f64N/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{-1 \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{-1 \cdot a}\\ \end{array} \]
      5. mul-1-negN/A

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
      6. lower-neg.f642.4

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

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

      \[\leadsto \color{blue}{\frac{0 \cdot \left(a \cdot \left(b + b\right)\right) - \left(-a\right)}{a \cdot \left(a \cdot \left(b + b\right)\right)}} \]
    10. Applied egg-rr15.2%

      \[\leadsto \color{blue}{\left(b + b\right) \cdot \left(a \cdot a\right)} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 21: 4.7% accurate, 4.0× speedup?

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

\\
\left(b + b\right) \cdot \left(a \cdot a\right)
\end{array}
Derivation
  1. Initial program 67.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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \end{array} \]
  4. Step-by-step derivation
    1. mul-1-negN/A

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\mathsf{neg}\left(\frac{b}{a}\right)}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{neg}\left(\frac{b}{a}\right)\\ \end{array} \]
    2. distribute-neg-frac2N/A

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
    3. mul-1-negN/A

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{-1 \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{-1 \cdot a}\\ \end{array} \]
    4. lower-/.f64N/A

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{-1 \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{-1 \cdot a}\\ \end{array} \]
    5. mul-1-negN/A

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
    6. lower-neg.f6434.8

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

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

    \[\leadsto \color{blue}{\frac{0 \cdot \left(a \cdot \left(b + b\right)\right) - \left(-a\right)}{a \cdot \left(a \cdot \left(b + b\right)\right)}} \]
  10. Applied egg-rr4.7%

    \[\leadsto \color{blue}{\left(b + b\right) \cdot \left(a \cdot a\right)} \]
  11. Add Preprocessing

Alternative 22: 3.3% accurate, 9.3× speedup?

\[\begin{array}{l} \\ b \cdot -2 \end{array} \]
(FPCore (a b c) :precision binary64 (* b -2.0))
double code(double a, double b, double c) {
	return b * -2.0;
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    code = b * (-2.0d0)
end function
public static double code(double a, double b, double c) {
	return b * -2.0;
}
def code(a, b, c):
	return b * -2.0
function code(a, b, c)
	return Float64(b * -2.0)
end
function tmp = code(a, b, c)
	tmp = b * -2.0;
end
code[a_, b_, c_] := N[(b * -2.0), $MachinePrecision]
\begin{array}{l}

\\
b \cdot -2
\end{array}
Derivation
  1. Initial program 67.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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \end{array} \]
  4. Step-by-step derivation
    1. mul-1-negN/A

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\mathsf{neg}\left(\frac{b}{a}\right)}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{neg}\left(\frac{b}{a}\right)\\ \end{array} \]
    2. distribute-neg-frac2N/A

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
    3. mul-1-negN/A

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{-1 \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{-1 \cdot a}\\ \end{array} \]
    4. lower-/.f64N/A

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{-1 \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{-1 \cdot a}\\ \end{array} \]
    5. mul-1-negN/A

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
    6. lower-neg.f6434.8

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

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

    \[\leadsto \color{blue}{\frac{-1}{a \cdot \left(b + b\right)}} \]
  10. Step-by-step derivation
    1. lift-+.f64N/A

      \[\leadsto \frac{-1}{a \cdot \color{blue}{\left(b + b\right)}} \]
    2. lift-*.f64N/A

      \[\leadsto \frac{-1}{\color{blue}{a \cdot \left(b + b\right)}} \]
    3. div-invN/A

      \[\leadsto \color{blue}{-1 \cdot \frac{1}{a \cdot \left(b + b\right)}} \]
    4. mul-1-negN/A

      \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{1}{a \cdot \left(b + b\right)}\right)} \]
    5. lift-*.f64N/A

      \[\leadsto \mathsf{neg}\left(\frac{1}{\color{blue}{a \cdot \left(b + b\right)}}\right) \]
    6. lift-+.f64N/A

      \[\leadsto \mathsf{neg}\left(\frac{1}{a \cdot \color{blue}{\left(b + b\right)}}\right) \]
    7. flip-+N/A

      \[\leadsto \mathsf{neg}\left(\frac{1}{a \cdot \color{blue}{\frac{b \cdot b - b \cdot b}{b - b}}}\right) \]
    8. lift-*.f64N/A

      \[\leadsto \mathsf{neg}\left(\frac{1}{a \cdot \frac{\color{blue}{b \cdot b} - b \cdot b}{b - b}}\right) \]
    9. lift-*.f64N/A

      \[\leadsto \mathsf{neg}\left(\frac{1}{a \cdot \frac{b \cdot b - \color{blue}{b \cdot b}}{b - b}}\right) \]
    10. +-inversesN/A

      \[\leadsto \mathsf{neg}\left(\frac{1}{a \cdot \frac{\color{blue}{0}}{b - b}}\right) \]
    11. mul0-lftN/A

      \[\leadsto \mathsf{neg}\left(\frac{1}{a \cdot \frac{\color{blue}{0 \cdot \left(a \cdot \left(b + b\right)\right)}}{b - b}}\right) \]
    12. lift-*.f64N/A

      \[\leadsto \mathsf{neg}\left(\frac{1}{a \cdot \frac{\color{blue}{0 \cdot \left(a \cdot \left(b + b\right)\right)}}{b - b}}\right) \]
    13. +-inversesN/A

      \[\leadsto \mathsf{neg}\left(\frac{1}{a \cdot \frac{0 \cdot \left(a \cdot \left(b + b\right)\right)}{\color{blue}{0}}}\right) \]
    14. mul0-lftN/A

      \[\leadsto \mathsf{neg}\left(\frac{1}{a \cdot \frac{0 \cdot \left(a \cdot \left(b + b\right)\right)}{\color{blue}{0 \cdot \left(a \cdot \left(b + b\right)\right)}}}\right) \]
    15. lift-*.f64N/A

      \[\leadsto \mathsf{neg}\left(\frac{1}{a \cdot \frac{0 \cdot \left(a \cdot \left(b + b\right)\right)}{\color{blue}{0 \cdot \left(a \cdot \left(b + b\right)\right)}}}\right) \]
    16. associate-*r/N/A

      \[\leadsto \mathsf{neg}\left(\frac{1}{\color{blue}{\frac{a \cdot \left(0 \cdot \left(a \cdot \left(b + b\right)\right)\right)}{0 \cdot \left(a \cdot \left(b + b\right)\right)}}}\right) \]
    17. *-commutativeN/A

      \[\leadsto \mathsf{neg}\left(\frac{1}{\frac{\color{blue}{\left(0 \cdot \left(a \cdot \left(b + b\right)\right)\right) \cdot a}}{0 \cdot \left(a \cdot \left(b + b\right)\right)}}\right) \]
    18. lift-*.f64N/A

      \[\leadsto \mathsf{neg}\left(\frac{1}{\frac{\color{blue}{\left(0 \cdot \left(a \cdot \left(b + b\right)\right)\right)} \cdot a}{0 \cdot \left(a \cdot \left(b + b\right)\right)}}\right) \]
    19. mul0-lftN/A

      \[\leadsto \mathsf{neg}\left(\frac{1}{\frac{\color{blue}{0} \cdot a}{0 \cdot \left(a \cdot \left(b + b\right)\right)}}\right) \]
    20. mul0-lftN/A

      \[\leadsto \mathsf{neg}\left(\frac{1}{\frac{\color{blue}{0}}{0 \cdot \left(a \cdot \left(b + b\right)\right)}}\right) \]
    21. +-inversesN/A

      \[\leadsto \mathsf{neg}\left(\frac{1}{\frac{\color{blue}{b - b}}{0 \cdot \left(a \cdot \left(b + b\right)\right)}}\right) \]
    22. lift-*.f64N/A

      \[\leadsto \mathsf{neg}\left(\frac{1}{\frac{b - b}{\color{blue}{0 \cdot \left(a \cdot \left(b + b\right)\right)}}}\right) \]
    23. mul0-lftN/A

      \[\leadsto \mathsf{neg}\left(\frac{1}{\frac{b - b}{\color{blue}{0}}}\right) \]
    24. +-inversesN/A

      \[\leadsto \mathsf{neg}\left(\frac{1}{\frac{b - b}{\color{blue}{b \cdot b - b \cdot b}}}\right) \]
    25. lift-*.f64N/A

      \[\leadsto \mathsf{neg}\left(\frac{1}{\frac{b - b}{\color{blue}{b \cdot b} - b \cdot b}}\right) \]
    26. lift-*.f64N/A

      \[\leadsto \mathsf{neg}\left(\frac{1}{\frac{b - b}{b \cdot b - \color{blue}{b \cdot b}}}\right) \]
  11. Applied egg-rr3.3%

    \[\leadsto \color{blue}{-2 \cdot b} \]
  12. Final simplification3.3%

    \[\leadsto b \cdot -2 \]
  13. Add Preprocessing

Alternative 23: 3.3% accurate, 14.0× speedup?

\[\begin{array}{l} \\ b + b \end{array} \]
(FPCore (a b c) :precision binary64 (+ b b))
double code(double a, double b, double c) {
	return b + b;
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    code = b + b
end function
public static double code(double a, double b, double c) {
	return b + b;
}
def code(a, b, c):
	return b + b
function code(a, b, c)
	return Float64(b + b)
end
function tmp = code(a, b, c)
	tmp = b + b;
end
code[a_, b_, c_] := N[(b + b), $MachinePrecision]
\begin{array}{l}

\\
b + b
\end{array}
Derivation
  1. Initial program 67.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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \end{array} \]
  4. Step-by-step derivation
    1. mul-1-negN/A

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\mathsf{neg}\left(\frac{b}{a}\right)}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{neg}\left(\frac{b}{a}\right)\\ \end{array} \]
    2. distribute-neg-frac2N/A

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
    3. mul-1-negN/A

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{-1 \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{-1 \cdot a}\\ \end{array} \]
    4. lower-/.f64N/A

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{\frac{b}{-1 \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{-1 \cdot a}\\ \end{array} \]
    5. mul-1-negN/A

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{\color{blue}{\mathsf{neg}\left(a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{\mathsf{neg}\left(a\right)}\\ \end{array} \]
    6. lower-neg.f6434.8

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

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

    \[\leadsto \color{blue}{\frac{0 \cdot \left(a \cdot \left(b + b\right)\right) - \left(-a\right)}{a \cdot \left(a \cdot \left(b + b\right)\right)}} \]
  10. Step-by-step derivation
    1. lift-+.f64N/A

      \[\leadsto \frac{0 \cdot \left(a \cdot \color{blue}{\left(b + b\right)}\right) - \left(\mathsf{neg}\left(a\right)\right)}{a \cdot \left(a \cdot \left(b + b\right)\right)} \]
    2. lift-*.f64N/A

      \[\leadsto \frac{0 \cdot \color{blue}{\left(a \cdot \left(b + b\right)\right)} - \left(\mathsf{neg}\left(a\right)\right)}{a \cdot \left(a \cdot \left(b + b\right)\right)} \]
    3. lift-*.f64N/A

      \[\leadsto \frac{\color{blue}{0 \cdot \left(a \cdot \left(b + b\right)\right)} - \left(\mathsf{neg}\left(a\right)\right)}{a \cdot \left(a \cdot \left(b + b\right)\right)} \]
    4. lift-neg.f64N/A

      \[\leadsto \frac{0 \cdot \left(a \cdot \left(b + b\right)\right) - \color{blue}{\left(\mathsf{neg}\left(a\right)\right)}}{a \cdot \left(a \cdot \left(b + b\right)\right)} \]
    5. lift--.f64N/A

      \[\leadsto \frac{\color{blue}{0 \cdot \left(a \cdot \left(b + b\right)\right) - \left(\mathsf{neg}\left(a\right)\right)}}{a \cdot \left(a \cdot \left(b + b\right)\right)} \]
    6. lift-+.f64N/A

      \[\leadsto \frac{0 \cdot \left(a \cdot \left(b + b\right)\right) - \left(\mathsf{neg}\left(a\right)\right)}{a \cdot \left(a \cdot \color{blue}{\left(b + b\right)}\right)} \]
    7. lift-*.f64N/A

      \[\leadsto \frac{0 \cdot \left(a \cdot \left(b + b\right)\right) - \left(\mathsf{neg}\left(a\right)\right)}{a \cdot \color{blue}{\left(a \cdot \left(b + b\right)\right)}} \]
    8. lift-*.f64N/A

      \[\leadsto \frac{0 \cdot \left(a \cdot \left(b + b\right)\right) - \left(\mathsf{neg}\left(a\right)\right)}{\color{blue}{a \cdot \left(a \cdot \left(b + b\right)\right)}} \]
    9. div-invN/A

      \[\leadsto \color{blue}{\left(0 \cdot \left(a \cdot \left(b + b\right)\right) - \left(\mathsf{neg}\left(a\right)\right)\right) \cdot \frac{1}{a \cdot \left(a \cdot \left(b + b\right)\right)}} \]
    10. lift--.f64N/A

      \[\leadsto \color{blue}{\left(0 \cdot \left(a \cdot \left(b + b\right)\right) - \left(\mathsf{neg}\left(a\right)\right)\right)} \cdot \frac{1}{a \cdot \left(a \cdot \left(b + b\right)\right)} \]
    11. lift-*.f64N/A

      \[\leadsto \left(\color{blue}{0 \cdot \left(a \cdot \left(b + b\right)\right)} - \left(\mathsf{neg}\left(a\right)\right)\right) \cdot \frac{1}{a \cdot \left(a \cdot \left(b + b\right)\right)} \]
    12. mul0-lftN/A

      \[\leadsto \left(\color{blue}{0} - \left(\mathsf{neg}\left(a\right)\right)\right) \cdot \frac{1}{a \cdot \left(a \cdot \left(b + b\right)\right)} \]
    13. neg-sub0N/A

      \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(a\right)\right)\right)\right)} \cdot \frac{1}{a \cdot \left(a \cdot \left(b + b\right)\right)} \]
    14. lift-neg.f64N/A

      \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(a\right)\right)}\right)\right) \cdot \frac{1}{a \cdot \left(a \cdot \left(b + b\right)\right)} \]
    15. remove-double-negN/A

      \[\leadsto \color{blue}{a} \cdot \frac{1}{a \cdot \left(a \cdot \left(b + b\right)\right)} \]
    16. lift-*.f64N/A

      \[\leadsto a \cdot \frac{1}{\color{blue}{a \cdot \left(a \cdot \left(b + b\right)\right)}} \]
    17. lift-*.f64N/A

      \[\leadsto a \cdot \frac{1}{a \cdot \color{blue}{\left(a \cdot \left(b + b\right)\right)}} \]
    18. lift-+.f64N/A

      \[\leadsto a \cdot \frac{1}{a \cdot \left(a \cdot \color{blue}{\left(b + b\right)}\right)} \]
    19. flip-+N/A

      \[\leadsto a \cdot \frac{1}{a \cdot \left(a \cdot \color{blue}{\frac{b \cdot b - b \cdot b}{b - b}}\right)} \]
  11. Applied egg-rr3.0%

    \[\leadsto \color{blue}{b + b} \]
  12. Add Preprocessing

Reproduce

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