jeff quadratic root 2

Percentage Accurate: 73.0% → 91.1%
Time: 18.5s
Alternatives: 12
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 12 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: 73.0% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}

Alternative 1: 91.1% accurate, 0.9× speedup?

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

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

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

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


\end{array}\\

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


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

    1. Initial program 32.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. Simplified32.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 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, \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)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(-1 \cdot b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
      4. Step-by-step derivation
        1. 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, \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)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(\mathsf{neg}\left(b\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
        2. 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, \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)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(0 - b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
        3. --lowering--.f6496.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, \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)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
      5. Simplified96.3%

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

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

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;0 - \color{blue}{\frac{b}{a}}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\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(0, \color{blue}{\left(\frac{b}{a}\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
        4. /-lowering-/.f6496.3%

          \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{\_.f64}\left(0, \mathsf{/.f64}\left(b, \color{blue}{a}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
      8. Simplified96.3%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{0 - \frac{b}{a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(0 - b\right) - b}{2 \cdot a}\\ \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(0, \mathsf{/.f64}\left(b, a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\left(0 - b\right) - b}{2}}{a}\\ \end{array} \]
        2. div-invN/A

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{\_.f64}\left(0, \mathsf{/.f64}\left(b, a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{*.f64}\left(\left(\frac{\left(0 - b\right) - b}{2}\right), \left(\frac{1}{a}\right)\right)\\ \end{array} \]
      10. Applied egg-rr95.9%

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

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

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

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

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

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

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

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

          \[\leadsto 0 - \color{blue}{\frac{b}{a}} \]
        9. sub0-negN/A

          \[\leadsto \mathsf{neg}\left(\frac{b}{a}\right) \]
        10. neg-lowering-neg.f64N/A

          \[\leadsto \mathsf{neg.f64}\left(\left(\frac{b}{a}\right)\right) \]
        11. /-lowering-/.f6496.3%

          \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(b, a\right)\right) \]
      12. Applied egg-rr96.3%

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

      if -2.55e154 < b < 2.00000000000000007e139

      1. Initial program 89.6%

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

          \[\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

        if 2.00000000000000007e139 < b

        1. Initial program 40.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. Simplified42.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. Step-by-step derivation
            1. flip-+N/A

              \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\frac{c \cdot -2}{\frac{b \cdot b - \sqrt{b \cdot b + a \cdot \left(c \cdot -4\right)} \cdot \sqrt{b \cdot b + a \cdot \left(c \cdot -4\right)}}{\color{blue}{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. associate-/r/N/A

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

              \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{*.f64}\left(\left(\frac{c \cdot -2}{b \cdot b - \sqrt{b \cdot b + a \cdot \left(c \cdot -4\right)} \cdot \sqrt{b \cdot b + a \cdot \left(c \cdot -4\right)}}\right), \color{blue}{\left(b - \sqrt{b \cdot b + a \cdot \left(c \cdot -4\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. Applied egg-rr0.0%

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

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

              \[\leadsto \frac{1}{2} \cdot \color{blue}{\frac{\sqrt{-4 \cdot \left(a \cdot c\right) + {b}^{2}} + -1 \cdot b}{a}} \]
            2. associate-*r/N/A

              \[\leadsto \frac{\frac{1}{2} \cdot \left(\sqrt{-4 \cdot \left(a \cdot c\right) + {b}^{2}} + -1 \cdot b\right)}{\color{blue}{a}} \]
            3. mul-1-negN/A

              \[\leadsto \frac{\frac{1}{2} \cdot \left(\sqrt{-4 \cdot \left(a \cdot c\right) + {b}^{2}} + \left(\mathsf{neg}\left(b\right)\right)\right)}{a} \]
            4. sub-negN/A

              \[\leadsto \frac{\frac{1}{2} \cdot \left(\sqrt{-4 \cdot \left(a \cdot c\right) + {b}^{2}} - b\right)}{a} \]
            5. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{2} \cdot \left(\sqrt{-4 \cdot \left(a \cdot c\right) + {b}^{2}} - b\right)\right), \color{blue}{a}\right) \]
          7. Simplified2.2%

            \[\leadsto \color{blue}{\frac{0.5 \cdot \left(\sqrt{b \cdot b + -4 \cdot \left(c \cdot a\right)} - b\right)}{a}} \]
          8. Taylor expanded in b around inf

            \[\leadsto \color{blue}{-1 \cdot \frac{c}{b}} \]
          9. Step-by-step derivation
            1. mul-1-negN/A

              \[\leadsto \mathsf{neg}\left(\frac{c}{b}\right) \]
            2. neg-sub0N/A

              \[\leadsto 0 - \color{blue}{\frac{c}{b}} \]
            3. --lowering--.f64N/A

              \[\leadsto \mathsf{\_.f64}\left(0, \color{blue}{\left(\frac{c}{b}\right)}\right) \]
            4. /-lowering-/.f64100.0%

              \[\leadsto \mathsf{\_.f64}\left(0, \mathsf{/.f64}\left(c, \color{blue}{b}\right)\right) \]
          10. Simplified100.0%

            \[\leadsto \color{blue}{0 - \frac{c}{b}} \]
          11. Step-by-step derivation
            1. sub0-negN/A

              \[\leadsto \mathsf{neg}\left(\frac{c}{b}\right) \]
            2. neg-lowering-neg.f64N/A

              \[\leadsto \mathsf{neg.f64}\left(\left(\frac{c}{b}\right)\right) \]
            3. /-lowering-/.f64100.0%

              \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(c, b\right)\right) \]
          12. Applied egg-rr100.0%

            \[\leadsto \color{blue}{-\frac{c}{b}} \]
        3. Recombined 3 regimes into one program.
        4. Final simplification92.7%

          \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2.55 \cdot 10^{+154}:\\ \;\;\;\;0 - \frac{b}{a}\\ \mathbf{elif}\;b \leq 2 \cdot 10^{+139}:\\ \;\;\;\;\begin{array}{l} \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}{a \cdot 2}\\ \end{array}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{0 - b}\\ \end{array} \]
        5. Add Preprocessing

        Alternative 2: 91.0% accurate, 0.9× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -2.55 \cdot 10^{+154}:\\ \;\;\;\;0 - \frac{b}{a}\\ \mathbf{elif}\;b \leq 3.6 \cdot 10^{+139}:\\ \;\;\;\;\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}{a \cdot 2}\\ \end{array}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{0 - b}\\ \end{array} \end{array} \]
        (FPCore (a b c)
         :precision binary64
         (if (<= b -2.55e+154)
           (- 0.0 (/ b a))
           (if (<= b 3.6e+139)
             (if (>= b 0.0)
               (* c (/ -2.0 (+ b (sqrt (+ (* b b) (* c (* a -4.0)))))))
               (/ (- (sqrt (+ (* b b) (* a (* c -4.0)))) b) (* a 2.0)))
             (/ c (- 0.0 b)))))
        double code(double a, double b, double c) {
        	double tmp;
        	if (b <= -2.55e+154) {
        		tmp = 0.0 - (b / a);
        	} else if (b <= 3.6e+139) {
        		double tmp_1;
        		if (b >= 0.0) {
        			tmp_1 = c * (-2.0 / (b + sqrt(((b * b) + (c * (a * -4.0))))));
        		} else {
        			tmp_1 = (sqrt(((b * b) + (a * (c * -4.0)))) - b) / (a * 2.0);
        		}
        		tmp = tmp_1;
        	} else {
        		tmp = c / (0.0 - b);
        	}
        	return tmp;
        }
        
        real(8) function code(a, b, c)
            real(8), intent (in) :: a
            real(8), intent (in) :: b
            real(8), intent (in) :: c
            real(8) :: tmp
            real(8) :: tmp_1
            if (b <= (-2.55d+154)) then
                tmp = 0.0d0 - (b / a)
            else if (b <= 3.6d+139) then
                if (b >= 0.0d0) then
                    tmp_1 = c * ((-2.0d0) / (b + sqrt(((b * b) + (c * (a * (-4.0d0)))))))
                else
                    tmp_1 = (sqrt(((b * b) + (a * (c * (-4.0d0))))) - b) / (a * 2.0d0)
                end if
                tmp = tmp_1
            else
                tmp = c / (0.0d0 - b)
            end if
            code = tmp
        end function
        
        public static double code(double a, double b, double c) {
        	double tmp;
        	if (b <= -2.55e+154) {
        		tmp = 0.0 - (b / a);
        	} else if (b <= 3.6e+139) {
        		double tmp_1;
        		if (b >= 0.0) {
        			tmp_1 = c * (-2.0 / (b + Math.sqrt(((b * b) + (c * (a * -4.0))))));
        		} else {
        			tmp_1 = (Math.sqrt(((b * b) + (a * (c * -4.0)))) - b) / (a * 2.0);
        		}
        		tmp = tmp_1;
        	} else {
        		tmp = c / (0.0 - b);
        	}
        	return tmp;
        }
        
        def code(a, b, c):
        	tmp = 0
        	if b <= -2.55e+154:
        		tmp = 0.0 - (b / a)
        	elif b <= 3.6e+139:
        		tmp_1 = 0
        		if b >= 0.0:
        			tmp_1 = c * (-2.0 / (b + math.sqrt(((b * b) + (c * (a * -4.0))))))
        		else:
        			tmp_1 = (math.sqrt(((b * b) + (a * (c * -4.0)))) - b) / (a * 2.0)
        		tmp = tmp_1
        	else:
        		tmp = c / (0.0 - b)
        	return tmp
        
        function code(a, b, c)
        	tmp = 0.0
        	if (b <= -2.55e+154)
        		tmp = Float64(0.0 - Float64(b / a));
        	elseif (b <= 3.6e+139)
        		tmp_1 = 0.0
        		if (b >= 0.0)
        			tmp_1 = Float64(c * Float64(-2.0 / Float64(b + sqrt(Float64(Float64(b * b) + Float64(c * Float64(a * -4.0)))))));
        		else
        			tmp_1 = Float64(Float64(sqrt(Float64(Float64(b * b) + Float64(a * Float64(c * -4.0)))) - b) / Float64(a * 2.0));
        		end
        		tmp = tmp_1;
        	else
        		tmp = Float64(c / Float64(0.0 - b));
        	end
        	return tmp
        end
        
        function tmp_3 = code(a, b, c)
        	tmp = 0.0;
        	if (b <= -2.55e+154)
        		tmp = 0.0 - (b / a);
        	elseif (b <= 3.6e+139)
        		tmp_2 = 0.0;
        		if (b >= 0.0)
        			tmp_2 = c * (-2.0 / (b + sqrt(((b * b) + (c * (a * -4.0))))));
        		else
        			tmp_2 = (sqrt(((b * b) + (a * (c * -4.0)))) - b) / (a * 2.0);
        		end
        		tmp = tmp_2;
        	else
        		tmp = c / (0.0 - b);
        	end
        	tmp_3 = tmp;
        end
        
        code[a_, b_, c_] := If[LessEqual[b, -2.55e+154], N[(0.0 - N[(b / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3.6e+139], 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[(a * 2.0), $MachinePrecision]), $MachinePrecision]], N[(c / N[(0.0 - b), $MachinePrecision]), $MachinePrecision]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;b \leq -2.55 \cdot 10^{+154}:\\
        \;\;\;\;0 - \frac{b}{a}\\
        
        \mathbf{elif}\;b \leq 3.6 \cdot 10^{+139}:\\
        \;\;\;\;\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}{a \cdot 2}\\
        
        
        \end{array}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{c}{0 - b}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if b < -2.55e154

          1. Initial program 32.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. Simplified32.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 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, \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)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(-1 \cdot b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
            4. Step-by-step derivation
              1. 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, \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)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(\mathsf{neg}\left(b\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
              2. 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, \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)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(0 - b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
              3. --lowering--.f6496.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, \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)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
            5. Simplified96.3%

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

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

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

                \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;0 - \color{blue}{\frac{b}{a}}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\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(0, \color{blue}{\left(\frac{b}{a}\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
              4. /-lowering-/.f6496.3%

                \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{\_.f64}\left(0, \mathsf{/.f64}\left(b, \color{blue}{a}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
            8. Simplified96.3%

              \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{0 - \frac{b}{a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(0 - b\right) - b}{2 \cdot a}\\ \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(0, \mathsf{/.f64}\left(b, a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\left(0 - b\right) - b}{2}}{a}\\ \end{array} \]
              2. div-invN/A

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

                \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{\_.f64}\left(0, \mathsf{/.f64}\left(b, a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{*.f64}\left(\left(\frac{\left(0 - b\right) - b}{2}\right), \left(\frac{1}{a}\right)\right)\\ \end{array} \]
            10. Applied egg-rr95.9%

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

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

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

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

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

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

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

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

                \[\leadsto 0 - \color{blue}{\frac{b}{a}} \]
              9. sub0-negN/A

                \[\leadsto \mathsf{neg}\left(\frac{b}{a}\right) \]
              10. neg-lowering-neg.f64N/A

                \[\leadsto \mathsf{neg.f64}\left(\left(\frac{b}{a}\right)\right) \]
              11. /-lowering-/.f6496.3%

                \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(b, a\right)\right) \]
            12. Applied egg-rr96.3%

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

            if -2.55e154 < b < 3.59999999999999985e139

            1. Initial program 89.6%

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

                \[\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. Applied egg-rr89.5%

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

              if 3.59999999999999985e139 < b

              1. Initial program 40.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. Simplified42.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. Step-by-step derivation
                  1. flip-+N/A

                    \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\frac{c \cdot -2}{\frac{b \cdot b - \sqrt{b \cdot b + a \cdot \left(c \cdot -4\right)} \cdot \sqrt{b \cdot b + a \cdot \left(c \cdot -4\right)}}{\color{blue}{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. associate-/r/N/A

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

                    \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{*.f64}\left(\left(\frac{c \cdot -2}{b \cdot b - \sqrt{b \cdot b + a \cdot \left(c \cdot -4\right)} \cdot \sqrt{b \cdot b + a \cdot \left(c \cdot -4\right)}}\right), \color{blue}{\left(b - \sqrt{b \cdot b + a \cdot \left(c \cdot -4\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. Applied egg-rr0.0%

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

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

                    \[\leadsto \frac{1}{2} \cdot \color{blue}{\frac{\sqrt{-4 \cdot \left(a \cdot c\right) + {b}^{2}} + -1 \cdot b}{a}} \]
                  2. associate-*r/N/A

                    \[\leadsto \frac{\frac{1}{2} \cdot \left(\sqrt{-4 \cdot \left(a \cdot c\right) + {b}^{2}} + -1 \cdot b\right)}{\color{blue}{a}} \]
                  3. mul-1-negN/A

                    \[\leadsto \frac{\frac{1}{2} \cdot \left(\sqrt{-4 \cdot \left(a \cdot c\right) + {b}^{2}} + \left(\mathsf{neg}\left(b\right)\right)\right)}{a} \]
                  4. sub-negN/A

                    \[\leadsto \frac{\frac{1}{2} \cdot \left(\sqrt{-4 \cdot \left(a \cdot c\right) + {b}^{2}} - b\right)}{a} \]
                  5. /-lowering-/.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{2} \cdot \left(\sqrt{-4 \cdot \left(a \cdot c\right) + {b}^{2}} - b\right)\right), \color{blue}{a}\right) \]
                7. Simplified2.2%

                  \[\leadsto \color{blue}{\frac{0.5 \cdot \left(\sqrt{b \cdot b + -4 \cdot \left(c \cdot a\right)} - b\right)}{a}} \]
                8. Taylor expanded in b around inf

                  \[\leadsto \color{blue}{-1 \cdot \frac{c}{b}} \]
                9. Step-by-step derivation
                  1. mul-1-negN/A

                    \[\leadsto \mathsf{neg}\left(\frac{c}{b}\right) \]
                  2. neg-sub0N/A

                    \[\leadsto 0 - \color{blue}{\frac{c}{b}} \]
                  3. --lowering--.f64N/A

                    \[\leadsto \mathsf{\_.f64}\left(0, \color{blue}{\left(\frac{c}{b}\right)}\right) \]
                  4. /-lowering-/.f64100.0%

                    \[\leadsto \mathsf{\_.f64}\left(0, \mathsf{/.f64}\left(c, \color{blue}{b}\right)\right) \]
                10. Simplified100.0%

                  \[\leadsto \color{blue}{0 - \frac{c}{b}} \]
                11. Step-by-step derivation
                  1. sub0-negN/A

                    \[\leadsto \mathsf{neg}\left(\frac{c}{b}\right) \]
                  2. neg-lowering-neg.f64N/A

                    \[\leadsto \mathsf{neg.f64}\left(\left(\frac{c}{b}\right)\right) \]
                  3. /-lowering-/.f64100.0%

                    \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(c, b\right)\right) \]
                12. Applied egg-rr100.0%

                  \[\leadsto \color{blue}{-\frac{c}{b}} \]
              3. Recombined 3 regimes into one program.
              4. Final simplification92.6%

                \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2.55 \cdot 10^{+154}:\\ \;\;\;\;0 - \frac{b}{a}\\ \mathbf{elif}\;b \leq 3.6 \cdot 10^{+139}:\\ \;\;\;\;\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}{a \cdot 2}\\ \end{array}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{0 - b}\\ \end{array} \]
              5. Add Preprocessing

              Alternative 3: 85.9% accurate, 1.0× speedup?

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

                1. Initial program 32.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. Simplified32.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 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, \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)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(-1 \cdot b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                  4. Step-by-step derivation
                    1. 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, \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)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(\mathsf{neg}\left(b\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                    2. 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, \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)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(0 - b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                    3. --lowering--.f6496.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, \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)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                  5. Simplified96.3%

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

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

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

                      \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;0 - \color{blue}{\frac{b}{a}}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\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(0, \color{blue}{\left(\frac{b}{a}\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                    4. /-lowering-/.f6496.3%

                      \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{\_.f64}\left(0, \mathsf{/.f64}\left(b, \color{blue}{a}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                  8. Simplified96.3%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{0 - \frac{b}{a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(0 - b\right) - b}{2 \cdot a}\\ \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(0, \mathsf{/.f64}\left(b, a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\left(0 - b\right) - b}{2}}{a}\\ \end{array} \]
                    2. div-invN/A

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

                      \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{\_.f64}\left(0, \mathsf{/.f64}\left(b, a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{*.f64}\left(\left(\frac{\left(0 - b\right) - b}{2}\right), \left(\frac{1}{a}\right)\right)\\ \end{array} \]
                  10. Applied egg-rr95.9%

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

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

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

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

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

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

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

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

                      \[\leadsto 0 - \color{blue}{\frac{b}{a}} \]
                    9. sub0-negN/A

                      \[\leadsto \mathsf{neg}\left(\frac{b}{a}\right) \]
                    10. neg-lowering-neg.f64N/A

                      \[\leadsto \mathsf{neg.f64}\left(\left(\frac{b}{a}\right)\right) \]
                    11. /-lowering-/.f6496.3%

                      \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(b, a\right)\right) \]
                  12. Applied egg-rr96.3%

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

                  if -2.55e154 < b < 3.89999999999999994e-91

                  1. Initial program 89.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. Simplified89.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. flip-+N/A

                        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\frac{c \cdot -2}{\frac{b \cdot b - \sqrt{b \cdot b + a \cdot \left(c \cdot -4\right)} \cdot \sqrt{b \cdot b + a \cdot \left(c \cdot -4\right)}}{\color{blue}{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. associate-/r/N/A

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

                        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{*.f64}\left(\left(\frac{c \cdot -2}{b \cdot b - \sqrt{b \cdot b + a \cdot \left(c \cdot -4\right)} \cdot \sqrt{b \cdot b + a \cdot \left(c \cdot -4\right)}}\right), \color{blue}{\left(b - \sqrt{b \cdot b + a \cdot \left(c \cdot -4\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. Applied egg-rr86.9%

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

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

                        \[\leadsto \frac{1}{2} \cdot \color{blue}{\frac{\sqrt{-4 \cdot \left(a \cdot c\right) + {b}^{2}} + -1 \cdot b}{a}} \]
                      2. associate-*r/N/A

                        \[\leadsto \frac{\frac{1}{2} \cdot \left(\sqrt{-4 \cdot \left(a \cdot c\right) + {b}^{2}} + -1 \cdot b\right)}{\color{blue}{a}} \]
                      3. mul-1-negN/A

                        \[\leadsto \frac{\frac{1}{2} \cdot \left(\sqrt{-4 \cdot \left(a \cdot c\right) + {b}^{2}} + \left(\mathsf{neg}\left(b\right)\right)\right)}{a} \]
                      4. sub-negN/A

                        \[\leadsto \frac{\frac{1}{2} \cdot \left(\sqrt{-4 \cdot \left(a \cdot c\right) + {b}^{2}} - b\right)}{a} \]
                      5. /-lowering-/.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{2} \cdot \left(\sqrt{-4 \cdot \left(a \cdot c\right) + {b}^{2}} - b\right)\right), \color{blue}{a}\right) \]
                    7. Simplified87.2%

                      \[\leadsto \color{blue}{\frac{0.5 \cdot \left(\sqrt{b \cdot b + -4 \cdot \left(c \cdot a\right)} - b\right)}{a}} \]

                    if 3.89999999999999994e-91 < b

                    1. Initial program 62.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. Simplified63.5%

                        \[\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, \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)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(-1 \cdot b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                      4. Step-by-step derivation
                        1. 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, \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)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(\mathsf{neg}\left(b\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                        2. 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, \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)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(0 - b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                        3. --lowering--.f6463.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, \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)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                      5. Simplified63.5%

                        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{c \cdot -2}{b + \sqrt{b \cdot b + a \cdot \left(c \cdot -4\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(0 - b\right) - b}{2 \cdot a}\\ \end{array} \]
                      6. 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 \frac{a \cdot c}{b} + 2 \cdot b\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                      7. Step-by-step derivation
                        1. +-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(-2 \cdot \frac{a \cdot c}{b}\right), \color{blue}{\left(2 \cdot b\right)}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\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(\left(\frac{-2 \cdot \left(a \cdot c\right)}{b}\right), \left(\color{blue}{2} \cdot b\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\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(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(-2 \cdot \left(a \cdot c\right)\right), b\right), \left(\color{blue}{2} \cdot b\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\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(-2, \left(a \cdot c\right)\right), b\right), \left(2 \cdot b\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\right), b\right), \mathsf{*.f64}\left(2, a\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(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-2, \left(c \cdot a\right)\right), b\right), \left(2 \cdot b\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\right), b\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(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-2, \mathsf{*.f64}\left(c, a\right)\right), b\right), \left(2 \cdot b\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                        7. *-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(-2, \mathsf{*.f64}\left(c, a\right)\right), b\right), \left(b \cdot \color{blue}{2}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                        8. *-lowering-*.f6486.1%

                          \[\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(-2, \mathsf{*.f64}\left(c, a\right)\right), b\right), \mathsf{*.f64}\left(b, \color{blue}{2}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                      8. Simplified86.1%

                        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{c \cdot -2}{\color{blue}{\frac{-2 \cdot \left(c \cdot a\right)}{b} + b \cdot 2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(0 - b\right) - b}{2 \cdot a}\\ \end{array} \]
                      9. Step-by-step derivation
                        1. 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(\left(-2 \cdot \frac{c \cdot a}{b}\right), \mathsf{*.f64}\left(\color{blue}{b}, 2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\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):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(\left(\frac{c \cdot a}{b} \cdot -2\right), \mathsf{*.f64}\left(\color{blue}{b}, 2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\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(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\frac{c \cdot a}{b}\right), -2\right), \mathsf{*.f64}\left(\color{blue}{b}, 2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                        4. 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(\mathsf{*.f64}\left(\left(c \cdot \frac{a}{b}\right), -2\right), \mathsf{*.f64}\left(b, 2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\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(c, \left(\frac{a}{b}\right)\right), -2\right), \mathsf{*.f64}\left(b, 2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                        6. /-lowering-/.f6488.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(\mathsf{*.f64}\left(\mathsf{*.f64}\left(c, \mathsf{/.f64}\left(a, b\right)\right), -2\right), \mathsf{*.f64}\left(b, 2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                      10. Applied egg-rr88.5%

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

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

                    Alternative 4: 81.0% accurate, 1.0× speedup?

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

                      1. Initial program 62.8%

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

                          \[\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. flip-+N/A

                            \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\frac{c \cdot -2}{\frac{b \cdot b - \sqrt{b \cdot b + a \cdot \left(c \cdot -4\right)} \cdot \sqrt{b \cdot b + a \cdot \left(c \cdot -4\right)}}{\color{blue}{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. associate-/r/N/A

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

                            \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{*.f64}\left(\left(\frac{c \cdot -2}{b \cdot b - \sqrt{b \cdot b + a \cdot \left(c \cdot -4\right)} \cdot \sqrt{b \cdot b + a \cdot \left(c \cdot -4\right)}}\right), \color{blue}{\left(b - \sqrt{b \cdot b + a \cdot \left(c \cdot -4\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. Applied egg-rr62.8%

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

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

                            \[\leadsto \frac{1}{2} \cdot \color{blue}{\frac{\sqrt{-4 \cdot \left(a \cdot c\right) + {b}^{2}} + -1 \cdot b}{a}} \]
                          2. associate-*r/N/A

                            \[\leadsto \frac{\frac{1}{2} \cdot \left(\sqrt{-4 \cdot \left(a \cdot c\right) + {b}^{2}} + -1 \cdot b\right)}{\color{blue}{a}} \]
                          3. mul-1-negN/A

                            \[\leadsto \frac{\frac{1}{2} \cdot \left(\sqrt{-4 \cdot \left(a \cdot c\right) + {b}^{2}} + \left(\mathsf{neg}\left(b\right)\right)\right)}{a} \]
                          4. sub-negN/A

                            \[\leadsto \frac{\frac{1}{2} \cdot \left(\sqrt{-4 \cdot \left(a \cdot c\right) + {b}^{2}} - b\right)}{a} \]
                          5. /-lowering-/.f64N/A

                            \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{2} \cdot \left(\sqrt{-4 \cdot \left(a \cdot c\right) + {b}^{2}} - b\right)\right), \color{blue}{a}\right) \]
                        7. Simplified62.8%

                          \[\leadsto \color{blue}{\frac{0.5 \cdot \left(\sqrt{b \cdot b + -4 \cdot \left(c \cdot a\right)} - b\right)}{a}} \]
                        8. Taylor expanded in b around -inf

                          \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(-1 \cdot \left(b \cdot \left(1 + -1 \cdot \frac{a \cdot c}{{b}^{2}}\right)\right)\right)}, a\right) \]
                        9. Step-by-step derivation
                          1. associate-*r*N/A

                            \[\leadsto \mathsf{/.f64}\left(\left(\left(-1 \cdot b\right) \cdot \left(1 + -1 \cdot \frac{a \cdot c}{{b}^{2}}\right)\right), a\right) \]
                          2. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(-1 \cdot b\right), \left(1 + -1 \cdot \frac{a \cdot c}{{b}^{2}}\right)\right), a\right) \]
                          3. mul-1-negN/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\mathsf{neg}\left(b\right)\right), \left(1 + -1 \cdot \frac{a \cdot c}{{b}^{2}}\right)\right), a\right) \]
                          4. neg-sub0N/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(0 - b\right), \left(1 + -1 \cdot \frac{a \cdot c}{{b}^{2}}\right)\right), a\right) \]
                          5. --lowering--.f64N/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, b\right), \left(1 + -1 \cdot \frac{a \cdot c}{{b}^{2}}\right)\right), a\right) \]
                          6. mul-1-negN/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, b\right), \left(1 + \left(\mathsf{neg}\left(\frac{a \cdot c}{{b}^{2}}\right)\right)\right)\right), a\right) \]
                          7. unsub-negN/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, b\right), \left(1 - \frac{a \cdot c}{{b}^{2}}\right)\right), a\right) \]
                          8. --lowering--.f64N/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, b\right), \mathsf{\_.f64}\left(1, \left(\frac{a \cdot c}{{b}^{2}}\right)\right)\right), a\right) \]
                          9. associate-/l*N/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, b\right), \mathsf{\_.f64}\left(1, \left(a \cdot \frac{c}{{b}^{2}}\right)\right)\right), a\right) \]
                          10. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, b\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(a, \left(\frac{c}{{b}^{2}}\right)\right)\right)\right), a\right) \]
                          11. /-lowering-/.f64N/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, b\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(a, \mathsf{/.f64}\left(c, \left({b}^{2}\right)\right)\right)\right)\right), a\right) \]
                          12. unpow2N/A

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, b\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(a, \mathsf{/.f64}\left(c, \left(b \cdot b\right)\right)\right)\right)\right), a\right) \]
                          13. *-lowering-*.f6491.8%

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, b\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(a, \mathsf{/.f64}\left(c, \mathsf{*.f64}\left(b, b\right)\right)\right)\right)\right), a\right) \]
                        10. Simplified91.8%

                          \[\leadsto \frac{\color{blue}{\left(0 - b\right) \cdot \left(1 - a \cdot \frac{c}{b \cdot b}\right)}}{a} \]

                        if -2.4999999999999999e-39 < b < 4.4000000000000002e-91

                        1. Initial program 84.8%

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

                            \[\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. flip-+N/A

                              \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\frac{c \cdot -2}{\frac{b \cdot b - \sqrt{b \cdot b + a \cdot \left(c \cdot -4\right)} \cdot \sqrt{b \cdot b + a \cdot \left(c \cdot -4\right)}}{\color{blue}{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. associate-/r/N/A

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

                              \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{*.f64}\left(\left(\frac{c \cdot -2}{b \cdot b - \sqrt{b \cdot b + a \cdot \left(c \cdot -4\right)} \cdot \sqrt{b \cdot b + a \cdot \left(c \cdot -4\right)}}\right), \color{blue}{\left(b - \sqrt{b \cdot b + a \cdot \left(c \cdot -4\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. Applied egg-rr81.6%

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

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

                              \[\leadsto \frac{1}{2} \cdot \color{blue}{\frac{\sqrt{-4 \cdot \left(a \cdot c\right) + {b}^{2}} + -1 \cdot b}{a}} \]
                            2. associate-*r/N/A

                              \[\leadsto \frac{\frac{1}{2} \cdot \left(\sqrt{-4 \cdot \left(a \cdot c\right) + {b}^{2}} + -1 \cdot b\right)}{\color{blue}{a}} \]
                            3. mul-1-negN/A

                              \[\leadsto \frac{\frac{1}{2} \cdot \left(\sqrt{-4 \cdot \left(a \cdot c\right) + {b}^{2}} + \left(\mathsf{neg}\left(b\right)\right)\right)}{a} \]
                            4. sub-negN/A

                              \[\leadsto \frac{\frac{1}{2} \cdot \left(\sqrt{-4 \cdot \left(a \cdot c\right) + {b}^{2}} - b\right)}{a} \]
                            5. /-lowering-/.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{2} \cdot \left(\sqrt{-4 \cdot \left(a \cdot c\right) + {b}^{2}} - b\right)\right), \color{blue}{a}\right) \]
                          7. Simplified82.0%

                            \[\leadsto \color{blue}{\frac{0.5 \cdot \left(\sqrt{b \cdot b + -4 \cdot \left(c \cdot a\right)} - b\right)}{a}} \]
                          8. Taylor expanded in b around 0

                            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{\left(-4 \cdot \left(a \cdot c\right)\right)}\right), b\right)\right), a\right) \]
                          9. Step-by-step derivation
                            1. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(-4, \left(a \cdot c\right)\right)\right), b\right)\right), a\right) \]
                            2. *-commutativeN/A

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(-4, \left(c \cdot a\right)\right)\right), b\right)\right), a\right) \]
                            3. *-lowering-*.f6475.8%

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(c, a\right)\right)\right), b\right)\right), a\right) \]
                          10. Simplified75.8%

                            \[\leadsto \frac{0.5 \cdot \left(\sqrt{\color{blue}{-4 \cdot \left(c \cdot a\right)}} - b\right)}{a} \]

                          if 4.4000000000000002e-91 < b

                          1. Initial program 62.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. Simplified63.5%

                              \[\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, \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)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(-1 \cdot b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                            4. Step-by-step derivation
                              1. 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, \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)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(\mathsf{neg}\left(b\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                              2. 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, \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)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(0 - b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                              3. --lowering--.f6463.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, \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)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                            5. Simplified63.5%

                              \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{c \cdot -2}{b + \sqrt{b \cdot b + a \cdot \left(c \cdot -4\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(0 - b\right) - b}{2 \cdot a}\\ \end{array} \]
                            6. 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 \frac{a \cdot c}{b} + 2 \cdot b\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                            7. Step-by-step derivation
                              1. +-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(-2 \cdot \frac{a \cdot c}{b}\right), \color{blue}{\left(2 \cdot b\right)}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\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(\left(\frac{-2 \cdot \left(a \cdot c\right)}{b}\right), \left(\color{blue}{2} \cdot b\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\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(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(-2 \cdot \left(a \cdot c\right)\right), b\right), \left(\color{blue}{2} \cdot b\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\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(-2, \left(a \cdot c\right)\right), b\right), \left(2 \cdot b\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\right), b\right), \mathsf{*.f64}\left(2, a\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(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-2, \left(c \cdot a\right)\right), b\right), \left(2 \cdot b\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\right), b\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(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-2, \mathsf{*.f64}\left(c, a\right)\right), b\right), \left(2 \cdot b\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                              7. *-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(-2, \mathsf{*.f64}\left(c, a\right)\right), b\right), \left(b \cdot \color{blue}{2}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                              8. *-lowering-*.f6486.1%

                                \[\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(-2, \mathsf{*.f64}\left(c, a\right)\right), b\right), \mathsf{*.f64}\left(b, \color{blue}{2}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                            8. Simplified86.1%

                              \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{c \cdot -2}{\color{blue}{\frac{-2 \cdot \left(c \cdot a\right)}{b} + b \cdot 2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(0 - b\right) - b}{2 \cdot a}\\ \end{array} \]
                            9. Step-by-step derivation
                              1. 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(\left(-2 \cdot \frac{c \cdot a}{b}\right), \mathsf{*.f64}\left(\color{blue}{b}, 2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\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):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(\left(\frac{c \cdot a}{b} \cdot -2\right), \mathsf{*.f64}\left(\color{blue}{b}, 2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\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(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\frac{c \cdot a}{b}\right), -2\right), \mathsf{*.f64}\left(\color{blue}{b}, 2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                              4. 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(\mathsf{*.f64}\left(\left(c \cdot \frac{a}{b}\right), -2\right), \mathsf{*.f64}\left(b, 2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\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(c, \left(\frac{a}{b}\right)\right), -2\right), \mathsf{*.f64}\left(b, 2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                              6. /-lowering-/.f6488.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(\mathsf{*.f64}\left(\mathsf{*.f64}\left(c, \mathsf{/.f64}\left(a, b\right)\right), -2\right), \mathsf{*.f64}\left(b, 2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                            10. Applied egg-rr88.5%

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

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

                          Alternative 5: 80.4% accurate, 1.0× speedup?

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

                            1. Initial program 62.8%

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

                                \[\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. flip-+N/A

                                  \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\frac{c \cdot -2}{\frac{b \cdot b - \sqrt{b \cdot b + a \cdot \left(c \cdot -4\right)} \cdot \sqrt{b \cdot b + a \cdot \left(c \cdot -4\right)}}{\color{blue}{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. associate-/r/N/A

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

                                  \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{*.f64}\left(\left(\frac{c \cdot -2}{b \cdot b - \sqrt{b \cdot b + a \cdot \left(c \cdot -4\right)} \cdot \sqrt{b \cdot b + a \cdot \left(c \cdot -4\right)}}\right), \color{blue}{\left(b - \sqrt{b \cdot b + a \cdot \left(c \cdot -4\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. Applied egg-rr62.8%

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

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

                                  \[\leadsto \frac{1}{2} \cdot \color{blue}{\frac{\sqrt{-4 \cdot \left(a \cdot c\right) + {b}^{2}} + -1 \cdot b}{a}} \]
                                2. associate-*r/N/A

                                  \[\leadsto \frac{\frac{1}{2} \cdot \left(\sqrt{-4 \cdot \left(a \cdot c\right) + {b}^{2}} + -1 \cdot b\right)}{\color{blue}{a}} \]
                                3. mul-1-negN/A

                                  \[\leadsto \frac{\frac{1}{2} \cdot \left(\sqrt{-4 \cdot \left(a \cdot c\right) + {b}^{2}} + \left(\mathsf{neg}\left(b\right)\right)\right)}{a} \]
                                4. sub-negN/A

                                  \[\leadsto \frac{\frac{1}{2} \cdot \left(\sqrt{-4 \cdot \left(a \cdot c\right) + {b}^{2}} - b\right)}{a} \]
                                5. /-lowering-/.f64N/A

                                  \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{2} \cdot \left(\sqrt{-4 \cdot \left(a \cdot c\right) + {b}^{2}} - b\right)\right), \color{blue}{a}\right) \]
                              7. Simplified62.8%

                                \[\leadsto \color{blue}{\frac{0.5 \cdot \left(\sqrt{b \cdot b + -4 \cdot \left(c \cdot a\right)} - b\right)}{a}} \]
                              8. Taylor expanded in b around -inf

                                \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(-1 \cdot \left(b \cdot \left(1 + -1 \cdot \frac{a \cdot c}{{b}^{2}}\right)\right)\right)}, a\right) \]
                              9. Step-by-step derivation
                                1. associate-*r*N/A

                                  \[\leadsto \mathsf{/.f64}\left(\left(\left(-1 \cdot b\right) \cdot \left(1 + -1 \cdot \frac{a \cdot c}{{b}^{2}}\right)\right), a\right) \]
                                2. *-lowering-*.f64N/A

                                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(-1 \cdot b\right), \left(1 + -1 \cdot \frac{a \cdot c}{{b}^{2}}\right)\right), a\right) \]
                                3. mul-1-negN/A

                                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\mathsf{neg}\left(b\right)\right), \left(1 + -1 \cdot \frac{a \cdot c}{{b}^{2}}\right)\right), a\right) \]
                                4. neg-sub0N/A

                                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(0 - b\right), \left(1 + -1 \cdot \frac{a \cdot c}{{b}^{2}}\right)\right), a\right) \]
                                5. --lowering--.f64N/A

                                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, b\right), \left(1 + -1 \cdot \frac{a \cdot c}{{b}^{2}}\right)\right), a\right) \]
                                6. mul-1-negN/A

                                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, b\right), \left(1 + \left(\mathsf{neg}\left(\frac{a \cdot c}{{b}^{2}}\right)\right)\right)\right), a\right) \]
                                7. unsub-negN/A

                                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, b\right), \left(1 - \frac{a \cdot c}{{b}^{2}}\right)\right), a\right) \]
                                8. --lowering--.f64N/A

                                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, b\right), \mathsf{\_.f64}\left(1, \left(\frac{a \cdot c}{{b}^{2}}\right)\right)\right), a\right) \]
                                9. associate-/l*N/A

                                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, b\right), \mathsf{\_.f64}\left(1, \left(a \cdot \frac{c}{{b}^{2}}\right)\right)\right), a\right) \]
                                10. *-lowering-*.f64N/A

                                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, b\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(a, \left(\frac{c}{{b}^{2}}\right)\right)\right)\right), a\right) \]
                                11. /-lowering-/.f64N/A

                                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, b\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(a, \mathsf{/.f64}\left(c, \left({b}^{2}\right)\right)\right)\right)\right), a\right) \]
                                12. unpow2N/A

                                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, b\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(a, \mathsf{/.f64}\left(c, \left(b \cdot b\right)\right)\right)\right)\right), a\right) \]
                                13. *-lowering-*.f6491.8%

                                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, b\right), \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(a, \mathsf{/.f64}\left(c, \mathsf{*.f64}\left(b, b\right)\right)\right)\right)\right), a\right) \]
                              10. Simplified91.8%

                                \[\leadsto \frac{\color{blue}{\left(0 - b\right) \cdot \left(1 - a \cdot \frac{c}{b \cdot b}\right)}}{a} \]

                              if -3.9000000000000003e-39 < b < 6.0000000000000004e-91

                              1. Initial program 84.8%

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

                                  \[\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. flip-+N/A

                                    \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\frac{c \cdot -2}{\frac{b \cdot b - \sqrt{b \cdot b + a \cdot \left(c \cdot -4\right)} \cdot \sqrt{b \cdot b + a \cdot \left(c \cdot -4\right)}}{\color{blue}{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. associate-/r/N/A

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

                                    \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{*.f64}\left(\left(\frac{c \cdot -2}{b \cdot b - \sqrt{b \cdot b + a \cdot \left(c \cdot -4\right)} \cdot \sqrt{b \cdot b + a \cdot \left(c \cdot -4\right)}}\right), \color{blue}{\left(b - \sqrt{b \cdot b + a \cdot \left(c \cdot -4\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. Applied egg-rr81.6%

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

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

                                    \[\leadsto \frac{1}{2} \cdot \color{blue}{\frac{\sqrt{-4 \cdot \left(a \cdot c\right) + {b}^{2}} + -1 \cdot b}{a}} \]
                                  2. associate-*r/N/A

                                    \[\leadsto \frac{\frac{1}{2} \cdot \left(\sqrt{-4 \cdot \left(a \cdot c\right) + {b}^{2}} + -1 \cdot b\right)}{\color{blue}{a}} \]
                                  3. mul-1-negN/A

                                    \[\leadsto \frac{\frac{1}{2} \cdot \left(\sqrt{-4 \cdot \left(a \cdot c\right) + {b}^{2}} + \left(\mathsf{neg}\left(b\right)\right)\right)}{a} \]
                                  4. sub-negN/A

                                    \[\leadsto \frac{\frac{1}{2} \cdot \left(\sqrt{-4 \cdot \left(a \cdot c\right) + {b}^{2}} - b\right)}{a} \]
                                  5. /-lowering-/.f64N/A

                                    \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{2} \cdot \left(\sqrt{-4 \cdot \left(a \cdot c\right) + {b}^{2}} - b\right)\right), \color{blue}{a}\right) \]
                                7. Simplified82.0%

                                  \[\leadsto \color{blue}{\frac{0.5 \cdot \left(\sqrt{b \cdot b + -4 \cdot \left(c \cdot a\right)} - b\right)}{a}} \]
                                8. Applied egg-rr74.6%

                                  \[\leadsto \color{blue}{\frac{0.5}{a} \cdot \left(b + \sqrt{b \cdot b + c \cdot \left(a \cdot -4\right)}\right)} \]
                                9. Taylor expanded in b around 0

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, a\right), \mathsf{+.f64}\left(b, \mathsf{sqrt.f64}\left(\color{blue}{\left(-4 \cdot \left(a \cdot c\right)\right)}\right)\right)\right) \]
                                10. Step-by-step derivation
                                  1. *-commutativeN/A

                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, a\right), \mathsf{+.f64}\left(b, \mathsf{sqrt.f64}\left(\left(\left(a \cdot c\right) \cdot -4\right)\right)\right)\right) \]
                                  2. *-commutativeN/A

                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, a\right), \mathsf{+.f64}\left(b, \mathsf{sqrt.f64}\left(\left(\left(c \cdot a\right) \cdot -4\right)\right)\right)\right) \]
                                  3. associate-*r*N/A

                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, a\right), \mathsf{+.f64}\left(b, \mathsf{sqrt.f64}\left(\left(c \cdot \left(a \cdot -4\right)\right)\right)\right)\right) \]
                                  4. *-commutativeN/A

                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, a\right), \mathsf{+.f64}\left(b, \mathsf{sqrt.f64}\left(\left(c \cdot \left(-4 \cdot a\right)\right)\right)\right)\right) \]
                                  5. *-lowering-*.f64N/A

                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, a\right), \mathsf{+.f64}\left(b, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(c, \left(-4 \cdot a\right)\right)\right)\right)\right) \]
                                  6. *-commutativeN/A

                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, a\right), \mathsf{+.f64}\left(b, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(c, \left(a \cdot -4\right)\right)\right)\right)\right) \]
                                  7. *-lowering-*.f6474.4%

                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, a\right), \mathsf{+.f64}\left(b, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -4\right)\right)\right)\right)\right) \]
                                11. Simplified74.4%

                                  \[\leadsto \frac{0.5}{a} \cdot \left(b + \sqrt{\color{blue}{c \cdot \left(a \cdot -4\right)}}\right) \]

                                if 6.0000000000000004e-91 < b

                                1. Initial program 62.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. Simplified63.5%

                                    \[\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, \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)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(-1 \cdot b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                  4. Step-by-step derivation
                                    1. 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, \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)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(\mathsf{neg}\left(b\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                    2. 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, \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)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(0 - b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                    3. --lowering--.f6463.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, \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)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                  5. Simplified63.5%

                                    \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{c \cdot -2}{b + \sqrt{b \cdot b + a \cdot \left(c \cdot -4\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(0 - b\right) - b}{2 \cdot a}\\ \end{array} \]
                                  6. 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 \frac{a \cdot c}{b} + 2 \cdot b\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                  7. Step-by-step derivation
                                    1. +-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(-2 \cdot \frac{a \cdot c}{b}\right), \color{blue}{\left(2 \cdot b\right)}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\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(\left(\frac{-2 \cdot \left(a \cdot c\right)}{b}\right), \left(\color{blue}{2} \cdot b\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\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(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(-2 \cdot \left(a \cdot c\right)\right), b\right), \left(\color{blue}{2} \cdot b\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\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(-2, \left(a \cdot c\right)\right), b\right), \left(2 \cdot b\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\right), b\right), \mathsf{*.f64}\left(2, a\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(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-2, \left(c \cdot a\right)\right), b\right), \left(2 \cdot b\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\right), b\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(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-2, \mathsf{*.f64}\left(c, a\right)\right), b\right), \left(2 \cdot b\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                    7. *-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(-2, \mathsf{*.f64}\left(c, a\right)\right), b\right), \left(b \cdot \color{blue}{2}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                    8. *-lowering-*.f6486.1%

                                      \[\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(-2, \mathsf{*.f64}\left(c, a\right)\right), b\right), \mathsf{*.f64}\left(b, \color{blue}{2}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                  8. Simplified86.1%

                                    \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{c \cdot -2}{\color{blue}{\frac{-2 \cdot \left(c \cdot a\right)}{b} + b \cdot 2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(0 - b\right) - b}{2 \cdot a}\\ \end{array} \]
                                  9. Step-by-step derivation
                                    1. 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(\left(-2 \cdot \frac{c \cdot a}{b}\right), \mathsf{*.f64}\left(\color{blue}{b}, 2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\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):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(\left(\frac{c \cdot a}{b} \cdot -2\right), \mathsf{*.f64}\left(\color{blue}{b}, 2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\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(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\frac{c \cdot a}{b}\right), -2\right), \mathsf{*.f64}\left(\color{blue}{b}, 2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                    4. 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(\mathsf{*.f64}\left(\left(c \cdot \frac{a}{b}\right), -2\right), \mathsf{*.f64}\left(b, 2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\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(c, \left(\frac{a}{b}\right)\right), -2\right), \mathsf{*.f64}\left(b, 2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                    6. /-lowering-/.f6488.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(\mathsf{*.f64}\left(\mathsf{*.f64}\left(c, \mathsf{/.f64}\left(a, b\right)\right), -2\right), \mathsf{*.f64}\left(b, 2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                  10. Applied egg-rr88.5%

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

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

                                Alternative 6: 67.4% accurate, 6.0× speedup?

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

                                  \[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
                                2. Step-by-step derivation
                                  1. Simplified70.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 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, \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)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(-1 \cdot b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                  4. Step-by-step derivation
                                    1. 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, \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)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(\mathsf{neg}\left(b\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                    2. 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, \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)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(0 - b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                    3. --lowering--.f6468.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, \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)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                  5. Simplified68.5%

                                    \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{c \cdot -2}{b + \sqrt{b \cdot b + a \cdot \left(c \cdot -4\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(0 - b\right) - b}{2 \cdot a}\\ \end{array} \]
                                  6. 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 \frac{a \cdot c}{b} + 2 \cdot b\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                  7. Step-by-step derivation
                                    1. +-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(-2 \cdot \frac{a \cdot c}{b}\right), \color{blue}{\left(2 \cdot b\right)}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\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(\left(\frac{-2 \cdot \left(a \cdot c\right)}{b}\right), \left(\color{blue}{2} \cdot b\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\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(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(-2 \cdot \left(a \cdot c\right)\right), b\right), \left(\color{blue}{2} \cdot b\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\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(-2, \left(a \cdot c\right)\right), b\right), \left(2 \cdot b\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\right), b\right), \mathsf{*.f64}\left(2, a\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(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-2, \left(c \cdot a\right)\right), b\right), \left(2 \cdot b\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\right), b\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(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-2, \mathsf{*.f64}\left(c, a\right)\right), b\right), \left(2 \cdot b\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                    7. *-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(-2, \mathsf{*.f64}\left(c, a\right)\right), b\right), \left(b \cdot \color{blue}{2}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                    8. *-lowering-*.f6465.6%

                                      \[\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(-2, \mathsf{*.f64}\left(c, a\right)\right), b\right), \mathsf{*.f64}\left(b, \color{blue}{2}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                  8. Simplified65.6%

                                    \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{c \cdot -2}{\color{blue}{\frac{-2 \cdot \left(c \cdot a\right)}{b} + b \cdot 2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(0 - b\right) - b}{2 \cdot a}\\ \end{array} \]
                                  9. Step-by-step derivation
                                    1. 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(\left(-2 \cdot \frac{c \cdot a}{b}\right), \mathsf{*.f64}\left(\color{blue}{b}, 2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\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):\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(\left(\frac{c \cdot a}{b} \cdot -2\right), \mathsf{*.f64}\left(\color{blue}{b}, 2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\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(\mathsf{*.f64}\left(c, -2\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\frac{c \cdot a}{b}\right), -2\right), \mathsf{*.f64}\left(\color{blue}{b}, 2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                    4. 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(\mathsf{*.f64}\left(\left(c \cdot \frac{a}{b}\right), -2\right), \mathsf{*.f64}\left(b, 2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\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(c, \left(\frac{a}{b}\right)\right), -2\right), \mathsf{*.f64}\left(b, 2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                    6. /-lowering-/.f6466.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(c, \mathsf{/.f64}\left(a, b\right)\right), -2\right), \mathsf{*.f64}\left(b, 2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                  10. Applied egg-rr66.4%

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

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

                                  Alternative 7: 67.3% accurate, 6.4× speedup?

                                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq 1.7 \cdot 10^{-282}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;b \cdot \frac{1}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(0 - b\right) - b}{a \cdot 2}\\ \end{array}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{0 - b}\\ \end{array} \end{array} \]
                                  (FPCore (a b c)
                                   :precision binary64
                                   (if (<= b 1.7e-282)
                                     (if (>= b 0.0) (* b (/ 1.0 a)) (/ (- (- 0.0 b) b) (* a 2.0)))
                                     (/ c (- 0.0 b))))
                                  double code(double a, double b, double c) {
                                  	double tmp_1;
                                  	if (b <= 1.7e-282) {
                                  		double tmp_2;
                                  		if (b >= 0.0) {
                                  			tmp_2 = b * (1.0 / a);
                                  		} else {
                                  			tmp_2 = ((0.0 - b) - b) / (a * 2.0);
                                  		}
                                  		tmp_1 = tmp_2;
                                  	} else {
                                  		tmp_1 = c / (0.0 - 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) :: tmp
                                      real(8) :: tmp_1
                                      real(8) :: tmp_2
                                      if (b <= 1.7d-282) then
                                          if (b >= 0.0d0) then
                                              tmp_2 = b * (1.0d0 / a)
                                          else
                                              tmp_2 = ((0.0d0 - b) - b) / (a * 2.0d0)
                                          end if
                                          tmp_1 = tmp_2
                                      else
                                          tmp_1 = c / (0.0d0 - b)
                                      end if
                                      code = tmp_1
                                  end function
                                  
                                  public static double code(double a, double b, double c) {
                                  	double tmp_1;
                                  	if (b <= 1.7e-282) {
                                  		double tmp_2;
                                  		if (b >= 0.0) {
                                  			tmp_2 = b * (1.0 / a);
                                  		} else {
                                  			tmp_2 = ((0.0 - b) - b) / (a * 2.0);
                                  		}
                                  		tmp_1 = tmp_2;
                                  	} else {
                                  		tmp_1 = c / (0.0 - b);
                                  	}
                                  	return tmp_1;
                                  }
                                  
                                  def code(a, b, c):
                                  	tmp_1 = 0
                                  	if b <= 1.7e-282:
                                  		tmp_2 = 0
                                  		if b >= 0.0:
                                  			tmp_2 = b * (1.0 / a)
                                  		else:
                                  			tmp_2 = ((0.0 - b) - b) / (a * 2.0)
                                  		tmp_1 = tmp_2
                                  	else:
                                  		tmp_1 = c / (0.0 - b)
                                  	return tmp_1
                                  
                                  function code(a, b, c)
                                  	tmp_1 = 0.0
                                  	if (b <= 1.7e-282)
                                  		tmp_2 = 0.0
                                  		if (b >= 0.0)
                                  			tmp_2 = Float64(b * Float64(1.0 / a));
                                  		else
                                  			tmp_2 = Float64(Float64(Float64(0.0 - b) - b) / Float64(a * 2.0));
                                  		end
                                  		tmp_1 = tmp_2;
                                  	else
                                  		tmp_1 = Float64(c / Float64(0.0 - b));
                                  	end
                                  	return tmp_1
                                  end
                                  
                                  function tmp_4 = code(a, b, c)
                                  	tmp_2 = 0.0;
                                  	if (b <= 1.7e-282)
                                  		tmp_3 = 0.0;
                                  		if (b >= 0.0)
                                  			tmp_3 = b * (1.0 / a);
                                  		else
                                  			tmp_3 = ((0.0 - b) - b) / (a * 2.0);
                                  		end
                                  		tmp_2 = tmp_3;
                                  	else
                                  		tmp_2 = c / (0.0 - b);
                                  	end
                                  	tmp_4 = tmp_2;
                                  end
                                  
                                  code[a_, b_, c_] := If[LessEqual[b, 1.7e-282], If[GreaterEqual[b, 0.0], N[(b * N[(1.0 / a), $MachinePrecision]), $MachinePrecision], N[(N[(N[(0.0 - b), $MachinePrecision] - b), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision]], N[(c / N[(0.0 - b), $MachinePrecision]), $MachinePrecision]]
                                  
                                  \begin{array}{l}
                                  
                                  \\
                                  \begin{array}{l}
                                  \mathbf{if}\;b \leq 1.7 \cdot 10^{-282}:\\
                                  \;\;\;\;\begin{array}{l}
                                  \mathbf{if}\;b \geq 0:\\
                                  \;\;\;\;b \cdot \frac{1}{a}\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;\frac{\left(0 - b\right) - b}{a \cdot 2}\\
                                  
                                  
                                  \end{array}\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;\frac{c}{0 - b}\\
                                  
                                  
                                  \end{array}
                                  \end{array}
                                  
                                  Derivation
                                  1. Split input into 2 regimes
                                  2. if b < 1.69999999999999999e-282

                                    1. Initial program 70.9%

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

                                        \[\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, \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)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(-1 \cdot b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                      4. Step-by-step derivation
                                        1. 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, \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)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(\mathsf{neg}\left(b\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                        2. 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, \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)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(0 - b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                        3. --lowering--.f6467.6%

                                          \[\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, \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)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                      5. Simplified67.6%

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

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

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

                                          \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;0 - \color{blue}{\frac{b}{a}}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\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(0, \color{blue}{\left(\frac{b}{a}\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                        4. /-lowering-/.f6465.6%

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

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

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

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

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

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

                                      if 1.69999999999999999e-282 < b

                                      1. Initial program 68.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. Simplified69.6%

                                          \[\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. flip-+N/A

                                            \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\frac{c \cdot -2}{\frac{b \cdot b - \sqrt{b \cdot b + a \cdot \left(c \cdot -4\right)} \cdot \sqrt{b \cdot b + a \cdot \left(c \cdot -4\right)}}{\color{blue}{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. associate-/r/N/A

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

                                            \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{*.f64}\left(\left(\frac{c \cdot -2}{b \cdot b - \sqrt{b \cdot b + a \cdot \left(c \cdot -4\right)} \cdot \sqrt{b \cdot b + a \cdot \left(c \cdot -4\right)}}\right), \color{blue}{\left(b - \sqrt{b \cdot b + a \cdot \left(c \cdot -4\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. Applied egg-rr29.1%

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

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

                                            \[\leadsto \frac{1}{2} \cdot \color{blue}{\frac{\sqrt{-4 \cdot \left(a \cdot c\right) + {b}^{2}} + -1 \cdot b}{a}} \]
                                          2. associate-*r/N/A

                                            \[\leadsto \frac{\frac{1}{2} \cdot \left(\sqrt{-4 \cdot \left(a \cdot c\right) + {b}^{2}} + -1 \cdot b\right)}{\color{blue}{a}} \]
                                          3. mul-1-negN/A

                                            \[\leadsto \frac{\frac{1}{2} \cdot \left(\sqrt{-4 \cdot \left(a \cdot c\right) + {b}^{2}} + \left(\mathsf{neg}\left(b\right)\right)\right)}{a} \]
                                          4. sub-negN/A

                                            \[\leadsto \frac{\frac{1}{2} \cdot \left(\sqrt{-4 \cdot \left(a \cdot c\right) + {b}^{2}} - b\right)}{a} \]
                                          5. /-lowering-/.f64N/A

                                            \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{2} \cdot \left(\sqrt{-4 \cdot \left(a \cdot c\right) + {b}^{2}} - b\right)\right), \color{blue}{a}\right) \]
                                        7. Simplified33.7%

                                          \[\leadsto \color{blue}{\frac{0.5 \cdot \left(\sqrt{b \cdot b + -4 \cdot \left(c \cdot a\right)} - b\right)}{a}} \]
                                        8. Taylor expanded in b around inf

                                          \[\leadsto \color{blue}{-1 \cdot \frac{c}{b}} \]
                                        9. Step-by-step derivation
                                          1. mul-1-negN/A

                                            \[\leadsto \mathsf{neg}\left(\frac{c}{b}\right) \]
                                          2. neg-sub0N/A

                                            \[\leadsto 0 - \color{blue}{\frac{c}{b}} \]
                                          3. --lowering--.f64N/A

                                            \[\leadsto \mathsf{\_.f64}\left(0, \color{blue}{\left(\frac{c}{b}\right)}\right) \]
                                          4. /-lowering-/.f6467.0%

                                            \[\leadsto \mathsf{\_.f64}\left(0, \mathsf{/.f64}\left(c, \color{blue}{b}\right)\right) \]
                                        10. Simplified67.0%

                                          \[\leadsto \color{blue}{0 - \frac{c}{b}} \]
                                        11. Step-by-step derivation
                                          1. sub0-negN/A

                                            \[\leadsto \mathsf{neg}\left(\frac{c}{b}\right) \]
                                          2. neg-lowering-neg.f64N/A

                                            \[\leadsto \mathsf{neg.f64}\left(\left(\frac{c}{b}\right)\right) \]
                                          3. /-lowering-/.f6467.0%

                                            \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(c, b\right)\right) \]
                                        12. Applied egg-rr67.0%

                                          \[\leadsto \color{blue}{-\frac{c}{b}} \]
                                      3. Recombined 2 regimes into one program.
                                      4. Final simplification66.2%

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

                                      Alternative 8: 67.2% accurate, 8.6× speedup?

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

                                        \[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
                                      2. Step-by-step derivation
                                        1. Simplified70.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 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, \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)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(-1 \cdot b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                        4. Step-by-step derivation
                                          1. 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, \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)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(\mathsf{neg}\left(b\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                          2. 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, \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)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(0 - b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                          3. --lowering--.f6468.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, \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)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                        5. Simplified68.5%

                                          \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{c \cdot -2}{b + \sqrt{b \cdot b + a \cdot \left(c \cdot -4\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(0 - b\right) - b}{2 \cdot a}\\ \end{array} \]
                                        6. 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{\_.f64}\left(0, b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                        7. Step-by-step derivation
                                          1. Simplified66.2%

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

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

                                          Alternative 9: 67.3% accurate, 12.1× speedup?

                                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq 2 \cdot 10^{-283}:\\ \;\;\;\;0 - \frac{b}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{0 - b}\\ \end{array} \end{array} \]
                                          (FPCore (a b c)
                                           :precision binary64
                                           (if (<= b 2e-283) (- 0.0 (/ b a)) (/ c (- 0.0 b))))
                                          double code(double a, double b, double c) {
                                          	double tmp;
                                          	if (b <= 2e-283) {
                                          		tmp = 0.0 - (b / a);
                                          	} else {
                                          		tmp = c / (0.0 - b);
                                          	}
                                          	return tmp;
                                          }
                                          
                                          real(8) function code(a, b, c)
                                              real(8), intent (in) :: a
                                              real(8), intent (in) :: b
                                              real(8), intent (in) :: c
                                              real(8) :: tmp
                                              if (b <= 2d-283) then
                                                  tmp = 0.0d0 - (b / a)
                                              else
                                                  tmp = c / (0.0d0 - b)
                                              end if
                                              code = tmp
                                          end function
                                          
                                          public static double code(double a, double b, double c) {
                                          	double tmp;
                                          	if (b <= 2e-283) {
                                          		tmp = 0.0 - (b / a);
                                          	} else {
                                          		tmp = c / (0.0 - b);
                                          	}
                                          	return tmp;
                                          }
                                          
                                          def code(a, b, c):
                                          	tmp = 0
                                          	if b <= 2e-283:
                                          		tmp = 0.0 - (b / a)
                                          	else:
                                          		tmp = c / (0.0 - b)
                                          	return tmp
                                          
                                          function code(a, b, c)
                                          	tmp = 0.0
                                          	if (b <= 2e-283)
                                          		tmp = Float64(0.0 - Float64(b / a));
                                          	else
                                          		tmp = Float64(c / Float64(0.0 - b));
                                          	end
                                          	return tmp
                                          end
                                          
                                          function tmp_2 = code(a, b, c)
                                          	tmp = 0.0;
                                          	if (b <= 2e-283)
                                          		tmp = 0.0 - (b / a);
                                          	else
                                          		tmp = c / (0.0 - b);
                                          	end
                                          	tmp_2 = tmp;
                                          end
                                          
                                          code[a_, b_, c_] := If[LessEqual[b, 2e-283], N[(0.0 - N[(b / a), $MachinePrecision]), $MachinePrecision], N[(c / N[(0.0 - b), $MachinePrecision]), $MachinePrecision]]
                                          
                                          \begin{array}{l}
                                          
                                          \\
                                          \begin{array}{l}
                                          \mathbf{if}\;b \leq 2 \cdot 10^{-283}:\\
                                          \;\;\;\;0 - \frac{b}{a}\\
                                          
                                          \mathbf{else}:\\
                                          \;\;\;\;\frac{c}{0 - b}\\
                                          
                                          
                                          \end{array}
                                          \end{array}
                                          
                                          Derivation
                                          1. Split input into 2 regimes
                                          2. if b < 1.99999999999999989e-283

                                            1. Initial program 70.9%

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

                                                \[\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, \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)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(-1 \cdot b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                              4. Step-by-step derivation
                                                1. 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, \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)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(\mathsf{neg}\left(b\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                                2. 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, \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)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(0 - b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                                3. --lowering--.f6467.6%

                                                  \[\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, \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)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                              5. Simplified67.6%

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

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

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

                                                  \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;0 - \color{blue}{\frac{b}{a}}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\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(0, \color{blue}{\left(\frac{b}{a}\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                                4. /-lowering-/.f6465.6%

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

                                                \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{0 - \frac{b}{a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(0 - b\right) - b}{2 \cdot a}\\ \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(0, \mathsf{/.f64}\left(b, a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\left(0 - b\right) - b}{2}}{a}\\ \end{array} \]
                                                2. div-invN/A

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

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

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

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

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

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

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

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

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

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

                                                  \[\leadsto 0 - \color{blue}{\frac{b}{a}} \]
                                                9. sub0-negN/A

                                                  \[\leadsto \mathsf{neg}\left(\frac{b}{a}\right) \]
                                                10. neg-lowering-neg.f64N/A

                                                  \[\leadsto \mathsf{neg.f64}\left(\left(\frac{b}{a}\right)\right) \]
                                                11. /-lowering-/.f6465.6%

                                                  \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(b, a\right)\right) \]
                                              12. Applied egg-rr65.6%

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

                                              if 1.99999999999999989e-283 < b

                                              1. Initial program 68.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. Simplified69.6%

                                                  \[\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. flip-+N/A

                                                    \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\frac{c \cdot -2}{\frac{b \cdot b - \sqrt{b \cdot b + a \cdot \left(c \cdot -4\right)} \cdot \sqrt{b \cdot b + a \cdot \left(c \cdot -4\right)}}{\color{blue}{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. associate-/r/N/A

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

                                                    \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{*.f64}\left(\left(\frac{c \cdot -2}{b \cdot b - \sqrt{b \cdot b + a \cdot \left(c \cdot -4\right)} \cdot \sqrt{b \cdot b + a \cdot \left(c \cdot -4\right)}}\right), \color{blue}{\left(b - \sqrt{b \cdot b + a \cdot \left(c \cdot -4\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. Applied egg-rr29.1%

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

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

                                                    \[\leadsto \frac{1}{2} \cdot \color{blue}{\frac{\sqrt{-4 \cdot \left(a \cdot c\right) + {b}^{2}} + -1 \cdot b}{a}} \]
                                                  2. associate-*r/N/A

                                                    \[\leadsto \frac{\frac{1}{2} \cdot \left(\sqrt{-4 \cdot \left(a \cdot c\right) + {b}^{2}} + -1 \cdot b\right)}{\color{blue}{a}} \]
                                                  3. mul-1-negN/A

                                                    \[\leadsto \frac{\frac{1}{2} \cdot \left(\sqrt{-4 \cdot \left(a \cdot c\right) + {b}^{2}} + \left(\mathsf{neg}\left(b\right)\right)\right)}{a} \]
                                                  4. sub-negN/A

                                                    \[\leadsto \frac{\frac{1}{2} \cdot \left(\sqrt{-4 \cdot \left(a \cdot c\right) + {b}^{2}} - b\right)}{a} \]
                                                  5. /-lowering-/.f64N/A

                                                    \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{2} \cdot \left(\sqrt{-4 \cdot \left(a \cdot c\right) + {b}^{2}} - b\right)\right), \color{blue}{a}\right) \]
                                                7. Simplified33.7%

                                                  \[\leadsto \color{blue}{\frac{0.5 \cdot \left(\sqrt{b \cdot b + -4 \cdot \left(c \cdot a\right)} - b\right)}{a}} \]
                                                8. Taylor expanded in b around inf

                                                  \[\leadsto \color{blue}{-1 \cdot \frac{c}{b}} \]
                                                9. Step-by-step derivation
                                                  1. mul-1-negN/A

                                                    \[\leadsto \mathsf{neg}\left(\frac{c}{b}\right) \]
                                                  2. neg-sub0N/A

                                                    \[\leadsto 0 - \color{blue}{\frac{c}{b}} \]
                                                  3. --lowering--.f64N/A

                                                    \[\leadsto \mathsf{\_.f64}\left(0, \color{blue}{\left(\frac{c}{b}\right)}\right) \]
                                                  4. /-lowering-/.f6467.0%

                                                    \[\leadsto \mathsf{\_.f64}\left(0, \mathsf{/.f64}\left(c, \color{blue}{b}\right)\right) \]
                                                10. Simplified67.0%

                                                  \[\leadsto \color{blue}{0 - \frac{c}{b}} \]
                                                11. Step-by-step derivation
                                                  1. sub0-negN/A

                                                    \[\leadsto \mathsf{neg}\left(\frac{c}{b}\right) \]
                                                  2. neg-lowering-neg.f64N/A

                                                    \[\leadsto \mathsf{neg.f64}\left(\left(\frac{c}{b}\right)\right) \]
                                                  3. /-lowering-/.f6467.0%

                                                    \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(c, b\right)\right) \]
                                                12. Applied egg-rr67.0%

                                                  \[\leadsto \color{blue}{-\frac{c}{b}} \]
                                              3. Recombined 2 regimes into one program.
                                              4. Final simplification66.2%

                                                \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 2 \cdot 10^{-283}:\\ \;\;\;\;0 - \frac{b}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{0 - b}\\ \end{array} \]
                                              5. Add Preprocessing

                                              Alternative 10: 42.4% accurate, 12.1× speedup?

                                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq 6.8 \cdot 10^{+65}:\\ \;\;\;\;0 - \frac{b}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b}\\ \end{array} \end{array} \]
                                              (FPCore (a b c)
                                               :precision binary64
                                               (if (<= b 6.8e+65) (- 0.0 (/ b a)) (/ c b)))
                                              double code(double a, double b, double c) {
                                              	double tmp;
                                              	if (b <= 6.8e+65) {
                                              		tmp = 0.0 - (b / a);
                                              	} else {
                                              		tmp = c / b;
                                              	}
                                              	return tmp;
                                              }
                                              
                                              real(8) function code(a, b, c)
                                                  real(8), intent (in) :: a
                                                  real(8), intent (in) :: b
                                                  real(8), intent (in) :: c
                                                  real(8) :: tmp
                                                  if (b <= 6.8d+65) then
                                                      tmp = 0.0d0 - (b / a)
                                                  else
                                                      tmp = c / b
                                                  end if
                                                  code = tmp
                                              end function
                                              
                                              public static double code(double a, double b, double c) {
                                              	double tmp;
                                              	if (b <= 6.8e+65) {
                                              		tmp = 0.0 - (b / a);
                                              	} else {
                                              		tmp = c / b;
                                              	}
                                              	return tmp;
                                              }
                                              
                                              def code(a, b, c):
                                              	tmp = 0
                                              	if b <= 6.8e+65:
                                              		tmp = 0.0 - (b / a)
                                              	else:
                                              		tmp = c / b
                                              	return tmp
                                              
                                              function code(a, b, c)
                                              	tmp = 0.0
                                              	if (b <= 6.8e+65)
                                              		tmp = Float64(0.0 - Float64(b / a));
                                              	else
                                              		tmp = Float64(c / b);
                                              	end
                                              	return tmp
                                              end
                                              
                                              function tmp_2 = code(a, b, c)
                                              	tmp = 0.0;
                                              	if (b <= 6.8e+65)
                                              		tmp = 0.0 - (b / a);
                                              	else
                                              		tmp = c / b;
                                              	end
                                              	tmp_2 = tmp;
                                              end
                                              
                                              code[a_, b_, c_] := If[LessEqual[b, 6.8e+65], N[(0.0 - N[(b / a), $MachinePrecision]), $MachinePrecision], N[(c / b), $MachinePrecision]]
                                              
                                              \begin{array}{l}
                                              
                                              \\
                                              \begin{array}{l}
                                              \mathbf{if}\;b \leq 6.8 \cdot 10^{+65}:\\
                                              \;\;\;\;0 - \frac{b}{a}\\
                                              
                                              \mathbf{else}:\\
                                              \;\;\;\;\frac{c}{b}\\
                                              
                                              
                                              \end{array}
                                              \end{array}
                                              
                                              Derivation
                                              1. Split input into 2 regimes
                                              2. if b < 6.7999999999999999e65

                                                1. Initial program 74.8%

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

                                                    \[\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, \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)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(-1 \cdot b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                                  4. Step-by-step derivation
                                                    1. 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, \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)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(\mathsf{neg}\left(b\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                                    2. 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, \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)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(0 - b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                                    3. --lowering--.f6472.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(b, \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)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                                  5. Simplified72.4%

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

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

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

                                                      \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;0 - \color{blue}{\frac{b}{a}}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\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(0, \color{blue}{\left(\frac{b}{a}\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                                    4. /-lowering-/.f6449.1%

                                                      \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{\_.f64}\left(0, \mathsf{/.f64}\left(b, \color{blue}{a}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                                  8. Simplified49.1%

                                                    \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{0 - \frac{b}{a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(0 - b\right) - b}{2 \cdot a}\\ \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(0, \mathsf{/.f64}\left(b, a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\left(0 - b\right) - b}{2}}{a}\\ \end{array} \]
                                                    2. div-invN/A

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

                                                      \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{\_.f64}\left(0, \mathsf{/.f64}\left(b, a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{*.f64}\left(\left(\frac{\left(0 - b\right) - b}{2}\right), \left(\frac{1}{a}\right)\right)\\ \end{array} \]
                                                  10. Applied egg-rr48.9%

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

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

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

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

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

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

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

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

                                                      \[\leadsto 0 - \color{blue}{\frac{b}{a}} \]
                                                    9. sub0-negN/A

                                                      \[\leadsto \mathsf{neg}\left(\frac{b}{a}\right) \]
                                                    10. neg-lowering-neg.f64N/A

                                                      \[\leadsto \mathsf{neg.f64}\left(\left(\frac{b}{a}\right)\right) \]
                                                    11. /-lowering-/.f6449.1%

                                                      \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(b, a\right)\right) \]
                                                  12. Applied egg-rr49.1%

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

                                                  if 6.7999999999999999e65 < b

                                                  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. Simplified56.9%

                                                      \[\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. flip-+N/A

                                                        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\frac{c \cdot -2}{\frac{b \cdot b - \sqrt{b \cdot b + a \cdot \left(c \cdot -4\right)} \cdot \sqrt{b \cdot b + a \cdot \left(c \cdot -4\right)}}{\color{blue}{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. associate-/r/N/A

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

                                                        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{*.f64}\left(\left(\frac{c \cdot -2}{b \cdot b - \sqrt{b \cdot b + a \cdot \left(c \cdot -4\right)} \cdot \sqrt{b \cdot b + a \cdot \left(c \cdot -4\right)}}\right), \color{blue}{\left(b - \sqrt{b \cdot b + a \cdot \left(c \cdot -4\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. Applied egg-rr4.0%

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

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

                                                        \[\leadsto \frac{1}{2} \cdot \color{blue}{\frac{\sqrt{-4 \cdot \left(a \cdot c\right) + {b}^{2}} + -1 \cdot b}{a}} \]
                                                      2. associate-*r/N/A

                                                        \[\leadsto \frac{\frac{1}{2} \cdot \left(\sqrt{-4 \cdot \left(a \cdot c\right) + {b}^{2}} + -1 \cdot b\right)}{\color{blue}{a}} \]
                                                      3. mul-1-negN/A

                                                        \[\leadsto \frac{\frac{1}{2} \cdot \left(\sqrt{-4 \cdot \left(a \cdot c\right) + {b}^{2}} + \left(\mathsf{neg}\left(b\right)\right)\right)}{a} \]
                                                      4. sub-negN/A

                                                        \[\leadsto \frac{\frac{1}{2} \cdot \left(\sqrt{-4 \cdot \left(a \cdot c\right) + {b}^{2}} - b\right)}{a} \]
                                                      5. /-lowering-/.f64N/A

                                                        \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{2} \cdot \left(\sqrt{-4 \cdot \left(a \cdot c\right) + {b}^{2}} - b\right)\right), \color{blue}{a}\right) \]
                                                    7. Simplified11.1%

                                                      \[\leadsto \color{blue}{\frac{0.5 \cdot \left(\sqrt{b \cdot b + -4 \cdot \left(c \cdot a\right)} - b\right)}{a}} \]
                                                    8. Taylor expanded in b around inf

                                                      \[\leadsto \color{blue}{-1 \cdot \frac{c}{b}} \]
                                                    9. Step-by-step derivation
                                                      1. mul-1-negN/A

                                                        \[\leadsto \mathsf{neg}\left(\frac{c}{b}\right) \]
                                                      2. neg-sub0N/A

                                                        \[\leadsto 0 - \color{blue}{\frac{c}{b}} \]
                                                      3. --lowering--.f64N/A

                                                        \[\leadsto \mathsf{\_.f64}\left(0, \color{blue}{\left(\frac{c}{b}\right)}\right) \]
                                                      4. /-lowering-/.f6495.1%

                                                        \[\leadsto \mathsf{\_.f64}\left(0, \mathsf{/.f64}\left(c, \color{blue}{b}\right)\right) \]
                                                    10. Simplified95.1%

                                                      \[\leadsto \color{blue}{0 - \frac{c}{b}} \]
                                                    11. Applied egg-rr30.4%

                                                      \[\leadsto \color{blue}{\frac{c}{b}} \]
                                                  3. Recombined 2 regimes into one program.
                                                  4. Final simplification44.4%

                                                    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 6.8 \cdot 10^{+65}:\\ \;\;\;\;0 - \frac{b}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b}\\ \end{array} \]
                                                  5. Add Preprocessing

                                                  Alternative 11: 10.2% accurate, 40.3× speedup?

                                                  \[\begin{array}{l} \\ \frac{c}{b} \end{array} \]
                                                  (FPCore (a b c) :precision binary64 (/ c b))
                                                  double code(double a, double b, double c) {
                                                  	return c / b;
                                                  }
                                                  
                                                  real(8) function code(a, b, c)
                                                      real(8), intent (in) :: a
                                                      real(8), intent (in) :: b
                                                      real(8), intent (in) :: c
                                                      code = c / b
                                                  end function
                                                  
                                                  public static double code(double a, double b, double c) {
                                                  	return c / b;
                                                  }
                                                  
                                                  def code(a, b, c):
                                                  	return c / b
                                                  
                                                  function code(a, b, c)
                                                  	return Float64(c / b)
                                                  end
                                                  
                                                  function tmp = code(a, b, c)
                                                  	tmp = c / b;
                                                  end
                                                  
                                                  code[a_, b_, c_] := N[(c / b), $MachinePrecision]
                                                  
                                                  \begin{array}{l}
                                                  
                                                  \\
                                                  \frac{c}{b}
                                                  \end{array}
                                                  
                                                  Derivation
                                                  1. Initial program 69.9%

                                                    \[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
                                                  2. Step-by-step derivation
                                                    1. Simplified70.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. Step-by-step derivation
                                                      1. flip-+N/A

                                                        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\frac{c \cdot -2}{\frac{b \cdot b - \sqrt{b \cdot b + a \cdot \left(c \cdot -4\right)} \cdot \sqrt{b \cdot b + a \cdot \left(c \cdot -4\right)}}{\color{blue}{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. associate-/r/N/A

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

                                                        \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;\mathsf{*.f64}\left(\left(\frac{c \cdot -2}{b \cdot b - \sqrt{b \cdot b + a \cdot \left(c \cdot -4\right)} \cdot \sqrt{b \cdot b + a \cdot \left(c \cdot -4\right)}}\right), \color{blue}{\left(b - \sqrt{b \cdot b + a \cdot \left(c \cdot -4\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. Applied egg-rr52.1%

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

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

                                                        \[\leadsto \frac{1}{2} \cdot \color{blue}{\frac{\sqrt{-4 \cdot \left(a \cdot c\right) + {b}^{2}} + -1 \cdot b}{a}} \]
                                                      2. associate-*r/N/A

                                                        \[\leadsto \frac{\frac{1}{2} \cdot \left(\sqrt{-4 \cdot \left(a \cdot c\right) + {b}^{2}} + -1 \cdot b\right)}{\color{blue}{a}} \]
                                                      3. mul-1-negN/A

                                                        \[\leadsto \frac{\frac{1}{2} \cdot \left(\sqrt{-4 \cdot \left(a \cdot c\right) + {b}^{2}} + \left(\mathsf{neg}\left(b\right)\right)\right)}{a} \]
                                                      4. sub-negN/A

                                                        \[\leadsto \frac{\frac{1}{2} \cdot \left(\sqrt{-4 \cdot \left(a \cdot c\right) + {b}^{2}} - b\right)}{a} \]
                                                      5. /-lowering-/.f64N/A

                                                        \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{2} \cdot \left(\sqrt{-4 \cdot \left(a \cdot c\right) + {b}^{2}} - b\right)\right), \color{blue}{a}\right) \]
                                                    7. Simplified54.2%

                                                      \[\leadsto \color{blue}{\frac{0.5 \cdot \left(\sqrt{b \cdot b + -4 \cdot \left(c \cdot a\right)} - b\right)}{a}} \]
                                                    8. Taylor expanded in b around inf

                                                      \[\leadsto \color{blue}{-1 \cdot \frac{c}{b}} \]
                                                    9. Step-by-step derivation
                                                      1. mul-1-negN/A

                                                        \[\leadsto \mathsf{neg}\left(\frac{c}{b}\right) \]
                                                      2. neg-sub0N/A

                                                        \[\leadsto 0 - \color{blue}{\frac{c}{b}} \]
                                                      3. --lowering--.f64N/A

                                                        \[\leadsto \mathsf{\_.f64}\left(0, \color{blue}{\left(\frac{c}{b}\right)}\right) \]
                                                      4. /-lowering-/.f6431.3%

                                                        \[\leadsto \mathsf{\_.f64}\left(0, \mathsf{/.f64}\left(c, \color{blue}{b}\right)\right) \]
                                                    10. Simplified31.3%

                                                      \[\leadsto \color{blue}{0 - \frac{c}{b}} \]
                                                    11. Applied egg-rr9.9%

                                                      \[\leadsto \color{blue}{\frac{c}{b}} \]
                                                    12. Add Preprocessing

                                                    Alternative 12: 2.6% accurate, 40.3× speedup?

                                                    \[\begin{array}{l} \\ \frac{b}{a} \end{array} \]
                                                    (FPCore (a b c) :precision binary64 (/ b a))
                                                    double code(double a, double b, double c) {
                                                    	return b / a;
                                                    }
                                                    
                                                    real(8) function code(a, b, c)
                                                        real(8), intent (in) :: a
                                                        real(8), intent (in) :: b
                                                        real(8), intent (in) :: c
                                                        code = b / a
                                                    end function
                                                    
                                                    public static double code(double a, double b, double c) {
                                                    	return b / a;
                                                    }
                                                    
                                                    def code(a, b, c):
                                                    	return b / a
                                                    
                                                    function code(a, b, c)
                                                    	return Float64(b / a)
                                                    end
                                                    
                                                    function tmp = code(a, b, c)
                                                    	tmp = b / a;
                                                    end
                                                    
                                                    code[a_, b_, c_] := N[(b / a), $MachinePrecision]
                                                    
                                                    \begin{array}{l}
                                                    
                                                    \\
                                                    \frac{b}{a}
                                                    \end{array}
                                                    
                                                    Derivation
                                                    1. Initial program 69.9%

                                                      \[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
                                                    2. Step-by-step derivation
                                                      1. Simplified70.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 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, \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)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(-1 \cdot b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                                      4. Step-by-step derivation
                                                        1. 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, \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)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(\mathsf{neg}\left(b\right)\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                                        2. 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, \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)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(0 - b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                                        3. --lowering--.f6468.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, \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)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                                      5. Simplified68.5%

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

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

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

                                                          \[\leadsto \begin{array}{l} \mathbf{if}\;\mathsf{>=.f64}\left(b, 0\right):\\ \;\;\;\;0 - \color{blue}{\frac{b}{a}}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\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(0, \color{blue}{\left(\frac{b}{a}\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, b\right), b\right), \mathsf{*.f64}\left(2, a\right)\right)\\ \end{array} \]
                                                        4. /-lowering-/.f6437.4%

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

                                                        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\color{blue}{0 - \frac{b}{a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(0 - b\right) - b}{2 \cdot a}\\ \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(0, \mathsf{/.f64}\left(b, a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\left(0 - b\right) - b}{2}}{a}\\ \end{array} \]
                                                        2. div-invN/A

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

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

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

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

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

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

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

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

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

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

                                                          \[\leadsto 0 - \color{blue}{\frac{b}{a}} \]
                                                        9. flip3--N/A

                                                          \[\leadsto \frac{{0}^{3} - {\left(\frac{b}{a}\right)}^{3}}{\color{blue}{0 \cdot 0 + \left(\frac{b}{a} \cdot \frac{b}{a} + 0 \cdot \frac{b}{a}\right)}} \]
                                                        10. metadata-evalN/A

                                                          \[\leadsto \frac{0 - {\left(\frac{b}{a}\right)}^{3}}{\color{blue}{0} \cdot 0 + \left(\frac{b}{a} \cdot \frac{b}{a} + 0 \cdot \frac{b}{a}\right)} \]
                                                      12. Applied egg-rr2.6%

                                                        \[\leadsto \color{blue}{\frac{b}{a}} \]
                                                      13. Add Preprocessing

                                                      Reproduce

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