jeff quadratic root 2

Percentage Accurate: 72.1% → 89.9%
Time: 20.0s
Alternatives: 6
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 6 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: 89.9% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.8 \cdot 10^{+93}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\frac{c}{2} \cdot \frac{-2}{b}\\

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


\end{array}\\

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

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


\end{array}\\

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

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


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

    1. Initial program 55.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. Step-by-step derivation
      1. Simplified55.4%

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, \color{blue}{b}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(c, -4\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
      4. Step-by-step derivation
        1. Simplified55.4%

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\left(-2 \cdot b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
        3. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\left(b \cdot -2\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
          2. *-lowering-*.f6498.0%

            \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(b, -2\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
        4. Simplified98.0%

          \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{c \cdot -2}{b + b}\\ \mathbf{else}:\\ \;\;\;\;\frac{b \cdot -2}{2 \cdot a}\\ \end{array} \]
        5. Step-by-step derivation
          1. count-2N/A

            \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\frac{c \cdot -2}{2 \cdot \color{blue}{b}}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(b, -2\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
          2. times-fracN/A

            \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\frac{c}{2} \cdot \color{blue}{\frac{-2}{b}}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(b, -2\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
          3. *-lowering-*.f64N/A

            \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{*.f64}\left(\left(\frac{c}{2}\right), \color{blue}{\left(\frac{-2}{b}\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(b, -2\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
          4. /-lowering-/.f64N/A

            \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{*.f64}\left(\mathsf{/.f64}\left(c, 2\right), \left(\frac{\color{blue}{-2}}{b}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(b, -2\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
          5. /-lowering-/.f6498.0%

            \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{*.f64}\left(\mathsf{/.f64}\left(c, 2\right), \mathsf{/.f64}\left(-2, \color{blue}{b}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(b, -2\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
        6. Applied egg-rr98.0%

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

        if -1.8e93 < b < 5.50000000000000053e92

        1. Initial program 90.0%

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

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

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

              \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\frac{-2}{b + \sqrt{b \cdot b + a \cdot \left(c \cdot -4\right)}} \cdot \color{blue}{c}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(c, -4\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
            3. *-lowering-*.f64N/A

              \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{*.f64}\left(\left(\frac{-2}{b + \sqrt{b \cdot b + a \cdot \left(c \cdot -4\right)}}\right), \color{blue}{c}\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(c, -4\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
            4. /-lowering-/.f64N/A

              \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{*.f64}\left(\mathsf{/.f64}\left(-2, \left(b + \sqrt{b \cdot b + a \cdot \left(c \cdot -4\right)}\right)\right), c\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(c, -4\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
            5. +-lowering-+.f64N/A

              \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{*.f64}\left(\mathsf{/.f64}\left(-2, \mathsf{+.f64}\left(b, \left(\sqrt{b \cdot b + a \cdot \left(c \cdot -4\right)}\right)\right)\right), c\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(c, -4\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
            6. sqrt-lowering-sqrt.f64N/A

              \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{*.f64}\left(\mathsf{/.f64}\left(-2, \mathsf{+.f64}\left(b, \mathsf{sqrt.f64}\left(\left(b \cdot b + a \cdot \left(c \cdot -4\right)\right)\right)\right)\right), c\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(c, -4\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
            7. +-lowering-+.f64N/A

              \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{*.f64}\left(\mathsf{/.f64}\left(-2, \mathsf{+.f64}\left(b, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(b \cdot b\right), \left(a \cdot \left(c \cdot -4\right)\right)\right)\right)\right)\right), c\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(c, -4\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
            8. *-lowering-*.f64N/A

              \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{*.f64}\left(\mathsf{/.f64}\left(-2, \mathsf{+.f64}\left(b, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(a \cdot \left(c \cdot -4\right)\right)\right)\right)\right)\right), c\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(c, -4\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
            9. *-commutativeN/A

              \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{*.f64}\left(\mathsf{/.f64}\left(-2, \mathsf{+.f64}\left(b, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\left(c \cdot -4\right) \cdot a\right)\right)\right)\right)\right), c\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(c, -4\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
            10. associate-*l*N/A

              \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{*.f64}\left(\mathsf{/.f64}\left(-2, \mathsf{+.f64}\left(b, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(c \cdot \left(-4 \cdot a\right)\right)\right)\right)\right)\right), c\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(c, -4\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
            11. *-lowering-*.f64N/A

              \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{*.f64}\left(\mathsf{/.f64}\left(-2, \mathsf{+.f64}\left(b, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(-4 \cdot a\right)\right)\right)\right)\right)\right), c\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(c, -4\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
            12. *-lowering-*.f6490.0%

              \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{*.f64}\left(\mathsf{/.f64}\left(-2, \mathsf{+.f64}\left(b, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(-4, a\right)\right)\right)\right)\right)\right), c\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(c, -4\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
          4. Applied egg-rr90.0%

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

          if 5.50000000000000053e92 < b

          1. Initial program 49.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. Step-by-step derivation
            1. Simplified49.4%

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

              \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \color{blue}{\left(2 \cdot b + a \cdot \left(-2 \cdot \frac{c}{b} + -2 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}}\right)\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(c, -4\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
            4. Step-by-step derivation
              1. +-commutativeN/A

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

                \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(\left(a \cdot \left(-2 \cdot \frac{c}{b} + -2 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}}\right)\right), \color{blue}{\left(2 \cdot b\right)}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(c, -4\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
            5. Simplified77.9%

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

                \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, -2\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(c, b\right), \left(\frac{\left(c \cdot c\right) \cdot a}{b \cdot \left(b \cdot b\right)}\right)\right)\right), \mathsf{*.f64}\left(b, 2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(c, -4\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
              2. associate-*r*N/A

                \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, -2\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(c, b\right), \left(\frac{\left(c \cdot c\right) \cdot a}{\left(b \cdot b\right) \cdot b}\right)\right)\right), \mathsf{*.f64}\left(b, 2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(c, -4\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
              3. times-fracN/A

                \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, -2\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(c, b\right), \left(\frac{c \cdot c}{b \cdot b} \cdot \frac{a}{b}\right)\right)\right), \mathsf{*.f64}\left(b, 2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(c, -4\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
              4. frac-timesN/A

                \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, -2\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(c, b\right), \left(\left(\frac{c}{b} \cdot \frac{c}{b}\right) \cdot \frac{a}{b}\right)\right)\right), \mathsf{*.f64}\left(b, 2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(c, -4\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
              5. *-lowering-*.f64N/A

                \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, -2\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(c, b\right), \mathsf{*.f64}\left(\left(\frac{c}{b} \cdot \frac{c}{b}\right), \left(\frac{a}{b}\right)\right)\right)\right), \mathsf{*.f64}\left(b, 2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(c, -4\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
              6. clear-numN/A

                \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, -2\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(c, b\right), \mathsf{*.f64}\left(\left(\frac{c}{b} \cdot \frac{1}{\frac{b}{c}}\right), \left(\frac{a}{b}\right)\right)\right)\right), \mathsf{*.f64}\left(b, 2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(c, -4\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
              7. un-div-invN/A

                \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, -2\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(c, b\right), \mathsf{*.f64}\left(\left(\frac{\frac{c}{b}}{\frac{b}{c}}\right), \left(\frac{a}{b}\right)\right)\right)\right), \mathsf{*.f64}\left(b, 2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(c, -4\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
              8. /-lowering-/.f64N/A

                \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, -2\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(c, b\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{c}{b}\right), \left(\frac{b}{c}\right)\right), \left(\frac{a}{b}\right)\right)\right)\right), \mathsf{*.f64}\left(b, 2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(c, -4\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
              9. /-lowering-/.f64N/A

                \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, -2\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(c, b\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c, b\right), \left(\frac{b}{c}\right)\right), \left(\frac{a}{b}\right)\right)\right)\right), \mathsf{*.f64}\left(b, 2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(c, -4\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
              10. /-lowering-/.f64N/A

                \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, -2\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(c, b\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c, b\right), \mathsf{/.f64}\left(b, c\right)\right), \left(\frac{a}{b}\right)\right)\right)\right), \mathsf{*.f64}\left(b, 2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(c, -4\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
              11. /-lowering-/.f6494.7%

                \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, -2\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(c, b\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c, b\right), \mathsf{/.f64}\left(b, c\right)\right), \mathsf{/.f64}\left(a, b\right)\right)\right)\right), \mathsf{*.f64}\left(b, 2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(c, -4\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
            7. Applied egg-rr94.7%

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

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

                \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, -2\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(c, b\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c, b\right), \mathsf{/.f64}\left(b, c\right)\right), \mathsf{/.f64}\left(a, b\right)\right)\right)\right), \mathsf{*.f64}\left(b, 2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\left(\frac{-2 \cdot \left(a \cdot c\right)}{b}\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
              2. /-lowering-/.f64N/A

                \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, -2\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(c, b\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c, b\right), \mathsf{/.f64}\left(b, c\right)\right), \mathsf{/.f64}\left(a, b\right)\right)\right)\right), \mathsf{*.f64}\left(b, 2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(-2 \cdot \left(a \cdot c\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
              3. associate-*r*N/A

                \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, -2\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(c, b\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c, b\right), \mathsf{/.f64}\left(b, c\right)\right), \mathsf{/.f64}\left(a, b\right)\right)\right)\right), \mathsf{*.f64}\left(b, 2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(-2 \cdot a\right) \cdot c\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
              4. *-lowering-*.f64N/A

                \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, -2\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(c, b\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c, b\right), \mathsf{/.f64}\left(b, c\right)\right), \mathsf{/.f64}\left(a, b\right)\right)\right)\right), \mathsf{*.f64}\left(b, 2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(-2 \cdot a\right), c\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
              5. *-lowering-*.f6494.7%

                \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, -2\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(c, b\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c, b\right), \mathsf{/.f64}\left(b, c\right)\right), \mathsf{/.f64}\left(a, b\right)\right)\right)\right), \mathsf{*.f64}\left(b, 2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-2, a\right), c\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
            10. Simplified94.7%

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

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

          Alternative 2: 74.1% accurate, 1.0× speedup?

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

            1. Initial program 72.2%

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

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

                \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, \color{blue}{b}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(c, -4\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
              4. Step-by-step derivation
                1. Simplified72.2%

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

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

                    \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\left(\left(-1 \cdot b\right) \cdot \left(2 + -2 \cdot \frac{a \cdot c}{{b}^{2}}\right)\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                  2. *-lowering-*.f64N/A

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

                    \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\mathsf{neg}\left(b\right)\right), \left(2 + -2 \cdot \frac{a \cdot c}{{b}^{2}}\right)\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                  4. neg-sub0N/A

                    \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(0 - b\right), \left(2 + -2 \cdot \frac{a \cdot c}{{b}^{2}}\right)\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                  5. --lowering--.f64N/A

                    \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, b\right), \left(2 + -2 \cdot \frac{a \cdot c}{{b}^{2}}\right)\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                  6. +-lowering-+.f64N/A

                    \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, b\right), \mathsf{+.f64}\left(2, \left(-2 \cdot \frac{a \cdot c}{{b}^{2}}\right)\right)\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                  7. associate-*r/N/A

                    \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, b\right), \mathsf{+.f64}\left(2, \left(\frac{-2 \cdot \left(a \cdot c\right)}{{b}^{2}}\right)\right)\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                  8. *-commutativeN/A

                    \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, b\right), \mathsf{+.f64}\left(2, \left(\frac{\left(a \cdot c\right) \cdot -2}{{b}^{2}}\right)\right)\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                  9. unpow2N/A

                    \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, b\right), \mathsf{+.f64}\left(2, \left(\frac{\left(a \cdot c\right) \cdot -2}{b \cdot b}\right)\right)\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                  10. times-fracN/A

                    \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, b\right), \mathsf{+.f64}\left(2, \left(\frac{a \cdot c}{b} \cdot \frac{-2}{b}\right)\right)\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                  11. *-lowering-*.f64N/A

                    \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, b\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left(\frac{a \cdot c}{b}\right), \left(\frac{-2}{b}\right)\right)\right)\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                  12. /-lowering-/.f64N/A

                    \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, b\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(a \cdot c\right), b\right), \left(\frac{-2}{b}\right)\right)\right)\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                  13. *-commutativeN/A

                    \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, b\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(c \cdot a\right), b\right), \left(\frac{-2}{b}\right)\right)\right)\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                  14. *-lowering-*.f64N/A

                    \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, b\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, a\right), b\right), \left(\frac{-2}{b}\right)\right)\right)\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                  15. /-lowering-/.f6487.0%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, b\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, a\right), b\right), \mathsf{/.f64}\left(-2, b\right)\right)\right)\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                4. Simplified87.0%

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

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

                    \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} + -1 \cdot \frac{b}{a}\\ \end{array} \]
                  2. mul-1-negN/A

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

                    \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} - \frac{b}{a}\\ \end{array} \]
                  4. --lowering--.f64N/A

                    \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{\_.f64}\left(\left(\frac{c}{b}\right), \left(\frac{b}{a}\right)\right)\\ \end{array} \]
                  5. /-lowering-/.f64N/A

                    \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{\_.f64}\left(\mathsf{/.f64}\left(c, b\right), \left(\frac{b}{a}\right)\right)\\ \end{array} \]
                  6. /-lowering-/.f6488.3%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{\_.f64}\left(\mathsf{/.f64}\left(c, b\right), \mathsf{/.f64}\left(b, a\right)\right)\\ \end{array} \]
                7. Simplified88.3%

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

                if -8.9999999999999996e-28 < b < -4.999999999999985e-310

                1. Initial program 86.2%

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

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

                    \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \color{blue}{\left(2 \cdot b + a \cdot \left(-2 \cdot \frac{c}{b} + -2 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}}\right)\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(c, -4\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                  4. Step-by-step derivation
                    1. +-commutativeN/A

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

                      \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(\left(a \cdot \left(-2 \cdot \frac{c}{b} + -2 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}}\right)\right), \color{blue}{\left(2 \cdot b\right)}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(c, -4\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                  5. Simplified86.2%

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

                    \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, -2\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(c, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c, c\right), \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, b\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(b, 2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(-4 \cdot \left(a \cdot c\right)\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                  7. Step-by-step derivation
                    1. *-commutativeN/A

                      \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, -2\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(c, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c, c\right), \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, b\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(b, 2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(\left(a \cdot c\right) \cdot -4\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                    2. rem-square-sqrtN/A

                      \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, -2\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(c, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c, c\right), \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, b\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(b, 2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(\left(a \cdot c\right) \cdot \left(\sqrt{-4} \cdot \sqrt{-4}\right)\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                    3. unpow2N/A

                      \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, -2\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(c, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c, c\right), \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, b\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(b, 2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(\left(a \cdot c\right) \cdot {\left(\sqrt{-4}\right)}^{2}\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                    4. associate-*r*N/A

                      \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, -2\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(c, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c, c\right), \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, b\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(b, 2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(a \cdot \left(c \cdot {\left(\sqrt{-4}\right)}^{2}\right)\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                    5. *-lowering-*.f64N/A

                      \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, -2\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(c, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c, c\right), \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, b\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(b, 2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(a, \left(c \cdot {\left(\sqrt{-4}\right)}^{2}\right)\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                    6. unpow2N/A

                      \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, -2\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(c, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c, c\right), \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, b\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(b, 2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(a, \left(c \cdot \left(\sqrt{-4} \cdot \sqrt{-4}\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                    7. rem-square-sqrtN/A

                      \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, -2\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(c, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c, c\right), \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, b\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(b, 2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(a, \left(c \cdot -4\right)\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                    8. *-lowering-*.f6471.8%

                      \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, -2\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(c, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c, c\right), \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, b\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(b, 2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(c, -4\right)\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                  8. Simplified71.8%

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

                  if -4.999999999999985e-310 < b

                  1. Initial program 69.0%

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

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

                      \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, \color{blue}{b}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(c, -4\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                    4. Step-by-step derivation
                      1. Simplified70.9%

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

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

                          \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\left(\left(-1 \cdot b\right) \cdot \left(2 + -2 \cdot \frac{a \cdot c}{{b}^{2}}\right)\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                        2. *-lowering-*.f64N/A

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

                          \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\mathsf{neg}\left(b\right)\right), \left(2 + -2 \cdot \frac{a \cdot c}{{b}^{2}}\right)\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                        4. neg-sub0N/A

                          \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(0 - b\right), \left(2 + -2 \cdot \frac{a \cdot c}{{b}^{2}}\right)\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                        5. --lowering--.f64N/A

                          \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, b\right), \left(2 + -2 \cdot \frac{a \cdot c}{{b}^{2}}\right)\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                        6. +-lowering-+.f64N/A

                          \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, b\right), \mathsf{+.f64}\left(2, \left(-2 \cdot \frac{a \cdot c}{{b}^{2}}\right)\right)\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                        7. associate-*r/N/A

                          \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, b\right), \mathsf{+.f64}\left(2, \left(\frac{-2 \cdot \left(a \cdot c\right)}{{b}^{2}}\right)\right)\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                        8. *-commutativeN/A

                          \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, b\right), \mathsf{+.f64}\left(2, \left(\frac{\left(a \cdot c\right) \cdot -2}{{b}^{2}}\right)\right)\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                        9. unpow2N/A

                          \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, b\right), \mathsf{+.f64}\left(2, \left(\frac{\left(a \cdot c\right) \cdot -2}{b \cdot b}\right)\right)\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                        10. times-fracN/A

                          \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, b\right), \mathsf{+.f64}\left(2, \left(\frac{a \cdot c}{b} \cdot \frac{-2}{b}\right)\right)\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                        11. *-lowering-*.f64N/A

                          \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, b\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left(\frac{a \cdot c}{b}\right), \left(\frac{-2}{b}\right)\right)\right)\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                        12. /-lowering-/.f64N/A

                          \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, b\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(a \cdot c\right), b\right), \left(\frac{-2}{b}\right)\right)\right)\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                        13. *-commutativeN/A

                          \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, b\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(c \cdot a\right), b\right), \left(\frac{-2}{b}\right)\right)\right)\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                        14. *-lowering-*.f64N/A

                          \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, b\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, a\right), b\right), \left(\frac{-2}{b}\right)\right)\right)\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                        15. /-lowering-/.f6470.9%

                          \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, b\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, a\right), b\right), \mathsf{/.f64}\left(-2, b\right)\right)\right)\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                      4. Simplified70.9%

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

                        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b}\\ \end{array} \]
                      6. Step-by-step derivation
                        1. /-lowering-/.f6470.9%

                          \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(c, b\right)\\ \end{array} \]
                      7. Simplified70.9%

                        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{c \cdot -2}{b + b}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b}\\ \end{array} \]
                    5. Recombined 3 regimes into one program.
                    6. Final simplification76.5%

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

                    Alternative 3: 74.2% accurate, 1.0× speedup?

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

                      1. Initial program 72.2%

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

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

                          \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, \color{blue}{b}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(c, -4\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                        4. Step-by-step derivation
                          1. Simplified72.2%

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

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

                              \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\left(\left(-1 \cdot b\right) \cdot \left(2 + -2 \cdot \frac{a \cdot c}{{b}^{2}}\right)\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                            2. *-lowering-*.f64N/A

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

                              \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\mathsf{neg}\left(b\right)\right), \left(2 + -2 \cdot \frac{a \cdot c}{{b}^{2}}\right)\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                            4. neg-sub0N/A

                              \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(0 - b\right), \left(2 + -2 \cdot \frac{a \cdot c}{{b}^{2}}\right)\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                            5. --lowering--.f64N/A

                              \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, b\right), \left(2 + -2 \cdot \frac{a \cdot c}{{b}^{2}}\right)\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                            6. +-lowering-+.f64N/A

                              \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, b\right), \mathsf{+.f64}\left(2, \left(-2 \cdot \frac{a \cdot c}{{b}^{2}}\right)\right)\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                            7. associate-*r/N/A

                              \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, b\right), \mathsf{+.f64}\left(2, \left(\frac{-2 \cdot \left(a \cdot c\right)}{{b}^{2}}\right)\right)\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                            8. *-commutativeN/A

                              \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, b\right), \mathsf{+.f64}\left(2, \left(\frac{\left(a \cdot c\right) \cdot -2}{{b}^{2}}\right)\right)\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                            9. unpow2N/A

                              \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, b\right), \mathsf{+.f64}\left(2, \left(\frac{\left(a \cdot c\right) \cdot -2}{b \cdot b}\right)\right)\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                            10. times-fracN/A

                              \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, b\right), \mathsf{+.f64}\left(2, \left(\frac{a \cdot c}{b} \cdot \frac{-2}{b}\right)\right)\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                            11. *-lowering-*.f64N/A

                              \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, b\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left(\frac{a \cdot c}{b}\right), \left(\frac{-2}{b}\right)\right)\right)\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                            12. /-lowering-/.f64N/A

                              \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, b\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(a \cdot c\right), b\right), \left(\frac{-2}{b}\right)\right)\right)\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                            13. *-commutativeN/A

                              \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, b\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(c \cdot a\right), b\right), \left(\frac{-2}{b}\right)\right)\right)\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                            14. *-lowering-*.f64N/A

                              \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, b\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, a\right), b\right), \left(\frac{-2}{b}\right)\right)\right)\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                            15. /-lowering-/.f6487.0%

                              \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, b\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, a\right), b\right), \mathsf{/.f64}\left(-2, b\right)\right)\right)\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                          4. Simplified87.0%

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

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

                              \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} + -1 \cdot \frac{b}{a}\\ \end{array} \]
                            2. mul-1-negN/A

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

                              \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} - \frac{b}{a}\\ \end{array} \]
                            4. --lowering--.f64N/A

                              \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{\_.f64}\left(\left(\frac{c}{b}\right), \left(\frac{b}{a}\right)\right)\\ \end{array} \]
                            5. /-lowering-/.f64N/A

                              \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{\_.f64}\left(\mathsf{/.f64}\left(c, b\right), \left(\frac{b}{a}\right)\right)\\ \end{array} \]
                            6. /-lowering-/.f6488.3%

                              \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{\_.f64}\left(\mathsf{/.f64}\left(c, b\right), \mathsf{/.f64}\left(b, a\right)\right)\\ \end{array} \]
                          7. Simplified88.3%

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

                          if -8.9999999999999996e-28 < b

                          1. Initial program 74.3%

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

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

                              \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \color{blue}{\left(2 \cdot b + a \cdot \left(-2 \cdot \frac{c}{b} + -2 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}}\right)\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(c, -4\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                            4. Step-by-step derivation
                              1. +-commutativeN/A

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

                                \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(\left(a \cdot \left(-2 \cdot \frac{c}{b} + -2 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}}\right)\right), \color{blue}{\left(2 \cdot b\right)}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(c, -4\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                            5. Simplified65.7%

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

                              \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, -2\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(c, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c, c\right), \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, b\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(b, 2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(-4 \cdot \left(a \cdot c\right)\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                            7. Step-by-step derivation
                              1. *-commutativeN/A

                                \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, -2\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(c, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c, c\right), \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, b\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(b, 2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(\left(a \cdot c\right) \cdot -4\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                              2. rem-square-sqrtN/A

                                \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, -2\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(c, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c, c\right), \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, b\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(b, 2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(\left(a \cdot c\right) \cdot \left(\sqrt{-4} \cdot \sqrt{-4}\right)\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                              3. unpow2N/A

                                \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, -2\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(c, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c, c\right), \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, b\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(b, 2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(\left(a \cdot c\right) \cdot {\left(\sqrt{-4}\right)}^{2}\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                              4. associate-*r*N/A

                                \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, -2\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(c, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c, c\right), \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, b\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(b, 2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(a \cdot \left(c \cdot {\left(\sqrt{-4}\right)}^{2}\right)\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                              5. *-lowering-*.f64N/A

                                \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, -2\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(c, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c, c\right), \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, b\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(b, 2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(a, \left(c \cdot {\left(\sqrt{-4}\right)}^{2}\right)\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                              6. unpow2N/A

                                \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, -2\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(c, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c, c\right), \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, b\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(b, 2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(a, \left(c \cdot \left(\sqrt{-4} \cdot \sqrt{-4}\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                              7. rem-square-sqrtN/A

                                \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, -2\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(c, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c, c\right), \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, b\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(b, 2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(a, \left(c \cdot -4\right)\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                              8. *-lowering-*.f6461.3%

                                \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, -2\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(c, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(c, c\right), \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, b\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(b, 2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(c, -4\right)\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                            8. Simplified61.3%

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

                              \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, -2\right), \color{blue}{\left(\frac{c}{b}\right)}\right), \mathsf{*.f64}\left(b, 2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(c, -4\right)\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                            10. Step-by-step derivation
                              1. /-lowering-/.f6471.4%

                                \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, -2\right), \mathsf{/.f64}\left(c, b\right)\right), \mathsf{*.f64}\left(b, 2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(c, -4\right)\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                            11. Simplified71.4%

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

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

                          Alternative 4: 67.6% accurate, 10.1× speedup?

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

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

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

                              \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, \color{blue}{b}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(c, -4\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                            4. Step-by-step derivation
                              1. Simplified74.6%

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

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

                                  \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\left(\left(-1 \cdot b\right) \cdot \left(2 + -2 \cdot \frac{a \cdot c}{{b}^{2}}\right)\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                2. *-lowering-*.f64N/A

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

                                  \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\mathsf{neg}\left(b\right)\right), \left(2 + -2 \cdot \frac{a \cdot c}{{b}^{2}}\right)\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                4. neg-sub0N/A

                                  \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(0 - b\right), \left(2 + -2 \cdot \frac{a \cdot c}{{b}^{2}}\right)\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                5. --lowering--.f64N/A

                                  \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, b\right), \left(2 + -2 \cdot \frac{a \cdot c}{{b}^{2}}\right)\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                6. +-lowering-+.f64N/A

                                  \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, b\right), \mathsf{+.f64}\left(2, \left(-2 \cdot \frac{a \cdot c}{{b}^{2}}\right)\right)\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                7. associate-*r/N/A

                                  \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, b\right), \mathsf{+.f64}\left(2, \left(\frac{-2 \cdot \left(a \cdot c\right)}{{b}^{2}}\right)\right)\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                8. *-commutativeN/A

                                  \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, b\right), \mathsf{+.f64}\left(2, \left(\frac{\left(a \cdot c\right) \cdot -2}{{b}^{2}}\right)\right)\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                9. unpow2N/A

                                  \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, b\right), \mathsf{+.f64}\left(2, \left(\frac{\left(a \cdot c\right) \cdot -2}{b \cdot b}\right)\right)\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                10. times-fracN/A

                                  \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, b\right), \mathsf{+.f64}\left(2, \left(\frac{a \cdot c}{b} \cdot \frac{-2}{b}\right)\right)\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                11. *-lowering-*.f64N/A

                                  \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, b\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\left(\frac{a \cdot c}{b}\right), \left(\frac{-2}{b}\right)\right)\right)\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                12. /-lowering-/.f64N/A

                                  \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, b\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(a \cdot c\right), b\right), \left(\frac{-2}{b}\right)\right)\right)\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                13. *-commutativeN/A

                                  \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, b\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(c \cdot a\right), b\right), \left(\frac{-2}{b}\right)\right)\right)\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                14. *-lowering-*.f64N/A

                                  \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, b\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, a\right), b\right), \left(\frac{-2}{b}\right)\right)\right)\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                15. /-lowering-/.f6465.3%

                                  \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, b\right), \mathsf{+.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, a\right), b\right), \mathsf{/.f64}\left(-2, b\right)\right)\right)\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                              4. Simplified65.3%

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

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

                                  \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} + -1 \cdot \frac{b}{a}\\ \end{array} \]
                                2. mul-1-negN/A

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

                                  \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} - \frac{b}{a}\\ \end{array} \]
                                4. --lowering--.f64N/A

                                  \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{\_.f64}\left(\left(\frac{c}{b}\right), \left(\frac{b}{a}\right)\right)\\ \end{array} \]
                                5. /-lowering-/.f64N/A

                                  \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{\_.f64}\left(\mathsf{/.f64}\left(c, b\right), \left(\frac{b}{a}\right)\right)\\ \end{array} \]
                                6. /-lowering-/.f6465.8%

                                  \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{\_.f64}\left(\mathsf{/.f64}\left(c, b\right), \mathsf{/.f64}\left(b, a\right)\right)\\ \end{array} \]
                              7. Simplified65.8%

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

                              Alternative 5: 67.4% accurate, 10.1× speedup?

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

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

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

                                  \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, \color{blue}{b}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(c, -4\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                4. Step-by-step derivation
                                  1. Simplified74.6%

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

                                    \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\left(-2 \cdot b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                  3. Step-by-step derivation
                                    1. *-commutativeN/A

                                      \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\left(b \cdot -2\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                    2. *-lowering-*.f6465.5%

                                      \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(b, -2\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                  4. Simplified65.5%

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

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

                                      \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \frac{b}{2 \cdot a}\\ \end{array} \]
                                    3. *-lowering-*.f64N/A

                                      \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{*.f64}\left(-2, \left(\frac{b}{2 \cdot a}\right)\right)\\ \end{array} \]
                                    4. /-lowering-/.f64N/A

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

                                      \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{*.f64}\left(-2, \mathsf{/.f64}\left(b, \left(a \cdot 2\right)\right)\right)\\ \end{array} \]
                                    6. *-lowering-*.f6465.5%

                                      \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{*.f64}\left(-2, \mathsf{/.f64}\left(b, \mathsf{*.f64}\left(a, 2\right)\right)\right)\\ \end{array} \]
                                  6. Applied egg-rr65.5%

                                    \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{c \cdot -2}{b + b}\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \frac{b}{a \cdot 2}\\ \end{array} \]
                                  7. Final simplification65.5%

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

                                  Alternative 6: 67.3% accurate, 10.1× speedup?

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

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

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

                                      \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, \color{blue}{b}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(c, -4\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                    4. Step-by-step derivation
                                      1. Simplified74.6%

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

                                        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\left(-2 \cdot b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                      3. Step-by-step derivation
                                        1. *-commutativeN/A

                                          \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\left(b \cdot -2\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                        2. *-lowering-*.f6465.5%

                                          \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(b, b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(b, -2\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                      4. Simplified65.5%

                                        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{c \cdot -2}{b + b}\\ \mathbf{else}:\\ \;\;\;\;\frac{b \cdot -2}{2 \cdot a}\\ \end{array} \]
                                      5. Step-by-step derivation
                                        1. count-2N/A

                                          \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\frac{c \cdot -2}{2 \cdot \color{blue}{b}}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(b, -2\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                        2. times-fracN/A

                                          \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\frac{c}{2} \cdot \color{blue}{\frac{-2}{b}}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(b, -2\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                        3. *-lowering-*.f64N/A

                                          \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{*.f64}\left(\left(\frac{c}{2}\right), \color{blue}{\left(\frac{-2}{b}\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(b, -2\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                        4. /-lowering-/.f64N/A

                                          \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{*.f64}\left(\mathsf{/.f64}\left(c, 2\right), \left(\frac{\color{blue}{-2}}{b}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(b, -2\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                        5. /-lowering-/.f6465.4%

                                          \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{*.f64}\left(\mathsf{/.f64}\left(c, 2\right), \mathsf{/.f64}\left(-2, \color{blue}{b}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(b, -2\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                      6. Applied egg-rr65.4%

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

                                      Reproduce

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