jeff quadratic root 2

Percentage Accurate: 72.2% → 90.5%
Time: 29.3s
Alternatives: 10
Speedup: 1.0×

Specification

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

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

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


\end{array}
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 10 alternatives:

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

Initial Program: 72.2% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}

Alternative 1: 90.5% accurate, 1.0× speedup?

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

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

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


\end{array}\\

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

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


\end{array}\\

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

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


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

    1. Initial program 54.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. Simplified54.9%

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

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

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

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

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

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

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

    if -4.4000000000000003e108 < b < 2.5500000000000001e81

    1. Initial program 86.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} \]

    if 2.5500000000000001e81 < b

    1. Initial program 56.5%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\frac{c}{-1}}{b}\\ \mathbf{else}:\\ \;\;\;\;-\frac{c}{b}\\ \end{array} \]
      2. distribute-neg-frac96.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\frac{c}{-1}}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{-c}{b}\\ \end{array} \]
    8. Simplified96.5%

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

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

Alternative 2: 90.4% accurate, 1.0× speedup?

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

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

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


\end{array}\\

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

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


\end{array}\\

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

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


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

    1. Initial program 54.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. Simplified54.9%

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

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

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

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

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

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

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

    if -1e104 < b < 2.5500000000000001e81

    1. Initial program 86.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. Simplified86.4%

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

      if 2.5500000000000001e81 < b

      1. Initial program 56.5%

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\frac{c}{-1}}{b}\\ \mathbf{else}:\\ \;\;\;\;-\frac{c}{b}\\ \end{array} \]
        2. distribute-neg-frac96.5%

          \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\frac{c}{-1}}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{-c}{b}\\ \end{array} \]
      8. Simplified96.5%

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

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

    Alternative 3: 80.6% accurate, 1.0× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \mathsf{fma}\left(-1, \frac{b}{a}, \frac{c}{b}\right)\\ \mathbf{if}\;b \leq -1.9 \cdot 10^{-116}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{-2}{b + b}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} - \frac{b}{a}\\ \end{array}\\ \mathbf{elif}\;b \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\frac{c}{-1}}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{0.5}{a} \cdot \left(\sqrt{a \cdot \left(c \cdot -4\right)} - b\right)\\ \end{array}\\ \mathbf{elif}\;b \leq 5.2 \cdot 10^{-118}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{c \cdot -2}{b + \sqrt{-4 \cdot \left(c \cdot a\right)}}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{-2}{b + \left(b + -2 \cdot \left(c \cdot \frac{a}{b}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \end{array} \]
    (FPCore (a b c)
     :precision binary64
     (let* ((t_0 (fma -1.0 (/ b a) (/ c b))))
       (if (<= b -1.9e-116)
         (if (>= b 0.0) (* c (/ -2.0 (+ b b))) (- (/ c b) (/ b a)))
         (if (<= b -5e-310)
           (if (>= b 0.0)
             (/ (/ c -1.0) b)
             (* (/ 0.5 a) (- (sqrt (* a (* c -4.0))) b)))
           (if (<= b 5.2e-118)
             (if (>= b 0.0) (/ (* c -2.0) (+ b (sqrt (* -4.0 (* c a))))) t_0)
             (if (>= b 0.0)
               (* c (/ -2.0 (+ b (+ b (* -2.0 (* c (/ a b)))))))
               t_0))))))
    double code(double a, double b, double c) {
    	double t_0 = fma(-1.0, (b / a), (c / b));
    	double tmp_1;
    	if (b <= -1.9e-116) {
    		double tmp_2;
    		if (b >= 0.0) {
    			tmp_2 = c * (-2.0 / (b + b));
    		} else {
    			tmp_2 = (c / b) - (b / a);
    		}
    		tmp_1 = tmp_2;
    	} else if (b <= -5e-310) {
    		double tmp_3;
    		if (b >= 0.0) {
    			tmp_3 = (c / -1.0) / b;
    		} else {
    			tmp_3 = (0.5 / a) * (sqrt((a * (c * -4.0))) - b);
    		}
    		tmp_1 = tmp_3;
    	} else if (b <= 5.2e-118) {
    		double tmp_4;
    		if (b >= 0.0) {
    			tmp_4 = (c * -2.0) / (b + sqrt((-4.0 * (c * a))));
    		} else {
    			tmp_4 = t_0;
    		}
    		tmp_1 = tmp_4;
    	} else if (b >= 0.0) {
    		tmp_1 = c * (-2.0 / (b + (b + (-2.0 * (c * (a / b))))));
    	} else {
    		tmp_1 = t_0;
    	}
    	return tmp_1;
    }
    
    function code(a, b, c)
    	t_0 = fma(-1.0, Float64(b / a), Float64(c / b))
    	tmp_1 = 0.0
    	if (b <= -1.9e-116)
    		tmp_2 = 0.0
    		if (b >= 0.0)
    			tmp_2 = Float64(c * Float64(-2.0 / Float64(b + b)));
    		else
    			tmp_2 = Float64(Float64(c / b) - Float64(b / a));
    		end
    		tmp_1 = tmp_2;
    	elseif (b <= -5e-310)
    		tmp_3 = 0.0
    		if (b >= 0.0)
    			tmp_3 = Float64(Float64(c / -1.0) / b);
    		else
    			tmp_3 = Float64(Float64(0.5 / a) * Float64(sqrt(Float64(a * Float64(c * -4.0))) - b));
    		end
    		tmp_1 = tmp_3;
    	elseif (b <= 5.2e-118)
    		tmp_4 = 0.0
    		if (b >= 0.0)
    			tmp_4 = Float64(Float64(c * -2.0) / Float64(b + sqrt(Float64(-4.0 * Float64(c * a)))));
    		else
    			tmp_4 = t_0;
    		end
    		tmp_1 = tmp_4;
    	elseif (b >= 0.0)
    		tmp_1 = Float64(c * Float64(-2.0 / Float64(b + Float64(b + Float64(-2.0 * Float64(c * Float64(a / b)))))));
    	else
    		tmp_1 = t_0;
    	end
    	return tmp_1
    end
    
    code[a_, b_, c_] := Block[{t$95$0 = N[(-1.0 * N[(b / a), $MachinePrecision] + N[(c / b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.9e-116], If[GreaterEqual[b, 0.0], N[(c * N[(-2.0 / N[(b + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(c / b), $MachinePrecision] - N[(b / a), $MachinePrecision]), $MachinePrecision]], If[LessEqual[b, -5e-310], If[GreaterEqual[b, 0.0], N[(N[(c / -1.0), $MachinePrecision] / b), $MachinePrecision], N[(N[(0.5 / a), $MachinePrecision] * N[(N[Sqrt[N[(a * N[(c * -4.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]], If[LessEqual[b, 5.2e-118], If[GreaterEqual[b, 0.0], N[(N[(c * -2.0), $MachinePrecision] / N[(b + N[Sqrt[N[(-4.0 * N[(c * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0], If[GreaterEqual[b, 0.0], N[(c * N[(-2.0 / N[(b + N[(b + N[(-2.0 * N[(c * N[(a / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := \mathsf{fma}\left(-1, \frac{b}{a}, \frac{c}{b}\right)\\
    \mathbf{if}\;b \leq -1.9 \cdot 10^{-116}:\\
    \;\;\;\;\begin{array}{l}
    \mathbf{if}\;b \geq 0:\\
    \;\;\;\;c \cdot \frac{-2}{b + b}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{c}{b} - \frac{b}{a}\\
    
    
    \end{array}\\
    
    \mathbf{elif}\;b \leq -5 \cdot 10^{-310}:\\
    \;\;\;\;\begin{array}{l}
    \mathbf{if}\;b \geq 0:\\
    \;\;\;\;\frac{\frac{c}{-1}}{b}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{0.5}{a} \cdot \left(\sqrt{a \cdot \left(c \cdot -4\right)} - b\right)\\
    
    
    \end{array}\\
    
    \mathbf{elif}\;b \leq 5.2 \cdot 10^{-118}:\\
    \;\;\;\;\begin{array}{l}
    \mathbf{if}\;b \geq 0:\\
    \;\;\;\;\frac{c \cdot -2}{b + \sqrt{-4 \cdot \left(c \cdot a\right)}}\\
    
    \mathbf{else}:\\
    \;\;\;\;t_0\\
    
    
    \end{array}\\
    
    \mathbf{elif}\;b \geq 0:\\
    \;\;\;\;c \cdot \frac{-2}{b + \left(b + -2 \cdot \left(c \cdot \frac{a}{b}\right)\right)}\\
    
    \mathbf{else}:\\
    \;\;\;\;t_0\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 4 regimes
    2. if b < -1.9000000000000001e-116

      1. Initial program 71.2%

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

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

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

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

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

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

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

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

      if -1.9000000000000001e-116 < b < -4.999999999999985e-310

      1. Initial program 80.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. Simplified80.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\frac{c}{-1}}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{0.5}{a} \cdot \left(\sqrt{-4 \cdot \left(c \cdot a\right)} - b\right)\\ \end{array} \]
        3. associate-*r*80.4%

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

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

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

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

      if -4.999999999999985e-310 < b < 5.2e-118

      1. Initial program 75.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. Simplified75.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 5.2e-118 < b

      1. Initial program 71.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. Simplified71.6%

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

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.9 \cdot 10^{-116}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{-2}{b + b}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} - \frac{b}{a}\\ \end{array}\\ \mathbf{elif}\;b \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\frac{c}{-1}}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{0.5}{a} \cdot \left(\sqrt{a \cdot \left(c \cdot -4\right)} - b\right)\\ \end{array}\\ \mathbf{elif}\;b \leq 5.2 \cdot 10^{-118}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{c \cdot -2}{b + \sqrt{-4 \cdot \left(c \cdot a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-1, \frac{b}{a}, \frac{c}{b}\right)\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{-2}{b + \left(b + -2 \cdot \left(c \cdot \frac{a}{b}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-1, \frac{b}{a}, \frac{c}{b}\right)\\ \end{array} \]

    Alternative 4: 80.6% accurate, 1.0× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \mathsf{fma}\left(-1, \frac{b}{a}, \frac{c}{b}\right)\\ \mathbf{if}\;b \leq -5.2 \cdot 10^{-117}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{-2}{b + b}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} - \frac{b}{a}\\ \end{array}\\ \mathbf{elif}\;b \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\frac{c}{-1}}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{c \cdot \left(a \cdot -4\right)} - b}{a \cdot 2}\\ \end{array}\\ \mathbf{elif}\;b \leq 1.3 \cdot 10^{-118}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{c \cdot -2}{b + \sqrt{-4 \cdot \left(c \cdot a\right)}}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{-2}{b + \left(b + -2 \cdot \left(c \cdot \frac{a}{b}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \end{array} \]
    (FPCore (a b c)
     :precision binary64
     (let* ((t_0 (fma -1.0 (/ b a) (/ c b))))
       (if (<= b -5.2e-117)
         (if (>= b 0.0) (* c (/ -2.0 (+ b b))) (- (/ c b) (/ b a)))
         (if (<= b -5e-310)
           (if (>= b 0.0)
             (/ (/ c -1.0) b)
             (/ (- (sqrt (* c (* a -4.0))) b) (* a 2.0)))
           (if (<= b 1.3e-118)
             (if (>= b 0.0) (/ (* c -2.0) (+ b (sqrt (* -4.0 (* c a))))) t_0)
             (if (>= b 0.0)
               (* c (/ -2.0 (+ b (+ b (* -2.0 (* c (/ a b)))))))
               t_0))))))
    double code(double a, double b, double c) {
    	double t_0 = fma(-1.0, (b / a), (c / b));
    	double tmp_1;
    	if (b <= -5.2e-117) {
    		double tmp_2;
    		if (b >= 0.0) {
    			tmp_2 = c * (-2.0 / (b + b));
    		} else {
    			tmp_2 = (c / b) - (b / a);
    		}
    		tmp_1 = tmp_2;
    	} else if (b <= -5e-310) {
    		double tmp_3;
    		if (b >= 0.0) {
    			tmp_3 = (c / -1.0) / b;
    		} else {
    			tmp_3 = (sqrt((c * (a * -4.0))) - b) / (a * 2.0);
    		}
    		tmp_1 = tmp_3;
    	} else if (b <= 1.3e-118) {
    		double tmp_4;
    		if (b >= 0.0) {
    			tmp_4 = (c * -2.0) / (b + sqrt((-4.0 * (c * a))));
    		} else {
    			tmp_4 = t_0;
    		}
    		tmp_1 = tmp_4;
    	} else if (b >= 0.0) {
    		tmp_1 = c * (-2.0 / (b + (b + (-2.0 * (c * (a / b))))));
    	} else {
    		tmp_1 = t_0;
    	}
    	return tmp_1;
    }
    
    function code(a, b, c)
    	t_0 = fma(-1.0, Float64(b / a), Float64(c / b))
    	tmp_1 = 0.0
    	if (b <= -5.2e-117)
    		tmp_2 = 0.0
    		if (b >= 0.0)
    			tmp_2 = Float64(c * Float64(-2.0 / Float64(b + b)));
    		else
    			tmp_2 = Float64(Float64(c / b) - Float64(b / a));
    		end
    		tmp_1 = tmp_2;
    	elseif (b <= -5e-310)
    		tmp_3 = 0.0
    		if (b >= 0.0)
    			tmp_3 = Float64(Float64(c / -1.0) / b);
    		else
    			tmp_3 = Float64(Float64(sqrt(Float64(c * Float64(a * -4.0))) - b) / Float64(a * 2.0));
    		end
    		tmp_1 = tmp_3;
    	elseif (b <= 1.3e-118)
    		tmp_4 = 0.0
    		if (b >= 0.0)
    			tmp_4 = Float64(Float64(c * -2.0) / Float64(b + sqrt(Float64(-4.0 * Float64(c * a)))));
    		else
    			tmp_4 = t_0;
    		end
    		tmp_1 = tmp_4;
    	elseif (b >= 0.0)
    		tmp_1 = Float64(c * Float64(-2.0 / Float64(b + Float64(b + Float64(-2.0 * Float64(c * Float64(a / b)))))));
    	else
    		tmp_1 = t_0;
    	end
    	return tmp_1
    end
    
    code[a_, b_, c_] := Block[{t$95$0 = N[(-1.0 * N[(b / a), $MachinePrecision] + N[(c / b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -5.2e-117], If[GreaterEqual[b, 0.0], N[(c * N[(-2.0 / N[(b + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(c / b), $MachinePrecision] - N[(b / a), $MachinePrecision]), $MachinePrecision]], If[LessEqual[b, -5e-310], If[GreaterEqual[b, 0.0], N[(N[(c / -1.0), $MachinePrecision] / b), $MachinePrecision], N[(N[(N[Sqrt[N[(c * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision]], If[LessEqual[b, 1.3e-118], If[GreaterEqual[b, 0.0], N[(N[(c * -2.0), $MachinePrecision] / N[(b + N[Sqrt[N[(-4.0 * N[(c * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0], If[GreaterEqual[b, 0.0], N[(c * N[(-2.0 / N[(b + N[(b + N[(-2.0 * N[(c * N[(a / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := \mathsf{fma}\left(-1, \frac{b}{a}, \frac{c}{b}\right)\\
    \mathbf{if}\;b \leq -5.2 \cdot 10^{-117}:\\
    \;\;\;\;\begin{array}{l}
    \mathbf{if}\;b \geq 0:\\
    \;\;\;\;c \cdot \frac{-2}{b + b}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{c}{b} - \frac{b}{a}\\
    
    
    \end{array}\\
    
    \mathbf{elif}\;b \leq -5 \cdot 10^{-310}:\\
    \;\;\;\;\begin{array}{l}
    \mathbf{if}\;b \geq 0:\\
    \;\;\;\;\frac{\frac{c}{-1}}{b}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{\sqrt{c \cdot \left(a \cdot -4\right)} - b}{a \cdot 2}\\
    
    
    \end{array}\\
    
    \mathbf{elif}\;b \leq 1.3 \cdot 10^{-118}:\\
    \;\;\;\;\begin{array}{l}
    \mathbf{if}\;b \geq 0:\\
    \;\;\;\;\frac{c \cdot -2}{b + \sqrt{-4 \cdot \left(c \cdot a\right)}}\\
    
    \mathbf{else}:\\
    \;\;\;\;t_0\\
    
    
    \end{array}\\
    
    \mathbf{elif}\;b \geq 0:\\
    \;\;\;\;c \cdot \frac{-2}{b + \left(b + -2 \cdot \left(c \cdot \frac{a}{b}\right)\right)}\\
    
    \mathbf{else}:\\
    \;\;\;\;t_0\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 4 regimes
    2. if b < -5.19999999999999966e-117

      1. Initial program 71.2%

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

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

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

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

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

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

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

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

      if -5.19999999999999966e-117 < b < -4.999999999999985e-310

      1. Initial program 80.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. Simplified80.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -4.999999999999985e-310 < b < 1.3e-118

      1. Initial program 75.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. Simplified75.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 1.3e-118 < b

      1. Initial program 71.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. Simplified71.6%

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

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -5.2 \cdot 10^{-117}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{-2}{b + b}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} - \frac{b}{a}\\ \end{array}\\ \mathbf{elif}\;b \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\frac{c}{-1}}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{c \cdot \left(a \cdot -4\right)} - b}{a \cdot 2}\\ \end{array}\\ \mathbf{elif}\;b \leq 1.3 \cdot 10^{-118}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{c \cdot -2}{b + \sqrt{-4 \cdot \left(c \cdot a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-1, \frac{b}{a}, \frac{c}{b}\right)\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{-2}{b + \left(b + -2 \cdot \left(c \cdot \frac{a}{b}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-1, \frac{b}{a}, \frac{c}{b}\right)\\ \end{array} \]

    Alternative 5: 74.2% accurate, 1.0× speedup?

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

      1. Initial program 73.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. Simplified74.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 5.2e-118 < b

      1. Initial program 71.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. Simplified71.6%

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

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 5.2 \cdot 10^{-118}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{-2}{b + \sqrt{-4 \cdot \left(c \cdot a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-1, \frac{b}{a}, \frac{c}{b}\right)\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{-2}{b + \left(b + -2 \cdot \left(c \cdot \frac{a}{b}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-1, \frac{b}{a}, \frac{c}{b}\right)\\ \end{array} \]

    Alternative 6: 74.2% accurate, 1.0× speedup?

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

      1. Initial program 73.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. Simplified74.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 4.5e-118 < b

      1. Initial program 71.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. Simplified71.6%

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

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 4.5 \cdot 10^{-118}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{c \cdot -2}{b + \sqrt{-4 \cdot \left(c \cdot a\right)}}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-1, \frac{b}{a}, \frac{c}{b}\right)\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{-2}{b + \left(b + -2 \cdot \left(c \cdot \frac{a}{b}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-1, \frac{b}{a}, \frac{c}{b}\right)\\ \end{array} \]

    Alternative 7: 67.9% accurate, 1.1× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{-2}{b + \left(b + -2 \cdot \left(c \cdot \frac{a}{b}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-1, \frac{b}{a}, \frac{c}{b}\right)\\ \end{array} \end{array} \]
    (FPCore (a b c)
     :precision binary64
     (if (>= b 0.0)
       (* c (/ -2.0 (+ b (+ b (* -2.0 (* c (/ a b)))))))
       (fma -1.0 (/ b a) (/ c b))))
    double code(double a, double b, double c) {
    	double tmp;
    	if (b >= 0.0) {
    		tmp = c * (-2.0 / (b + (b + (-2.0 * (c * (a / b))))));
    	} else {
    		tmp = fma(-1.0, (b / a), (c / b));
    	}
    	return tmp;
    }
    
    function code(a, b, c)
    	tmp = 0.0
    	if (b >= 0.0)
    		tmp = Float64(c * Float64(-2.0 / Float64(b + Float64(b + Float64(-2.0 * Float64(c * Float64(a / b)))))));
    	else
    		tmp = fma(-1.0, Float64(b / a), Float64(c / b));
    	end
    	return tmp
    end
    
    code[a_, b_, c_] := If[GreaterEqual[b, 0.0], N[(c * N[(-2.0 / N[(b + N[(b + N[(-2.0 * N[(c * N[(a / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-1.0 * N[(b / a), $MachinePrecision] + N[(c / b), $MachinePrecision]), $MachinePrecision]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;b \geq 0:\\
    \;\;\;\;c \cdot \frac{-2}{b + \left(b + -2 \cdot \left(c \cdot \frac{a}{b}\right)\right)}\\
    
    \mathbf{else}:\\
    \;\;\;\;\mathsf{fma}\left(-1, \frac{b}{a}, \frac{c}{b}\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Initial program 73.2%

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

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

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

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

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

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

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

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

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

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

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

    Alternative 8: 67.6% accurate, 12.9× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 1.19999999999999994e-207 < b

      1. Initial program 74.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. Simplified73.9%

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

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

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

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

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

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

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

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

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\frac{c}{-1}}{b}\\ \mathbf{else}:\\ \;\;\;\;-\frac{c}{b}\\ \end{array} \]
        2. distribute-neg-frac77.2%

          \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\frac{c}{-1}}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{-c}{b}\\ \end{array} \]
      8. Simplified77.2%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 1.2 \cdot 10^{-207}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot -2\\ \mathbf{else}:\\ \;\;\;\;\frac{-b}{a}\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;\frac{\frac{c}{-1}}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{-c}{b}\\ \end{array} \]

    Alternative 9: 67.8% accurate, 13.0× speedup?

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

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

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

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

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

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

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

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

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

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

    Alternative 10: 37.1% accurate, 19.5× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot -2\\ \mathbf{else}:\\ \;\;\;\;\frac{-b}{a}\\ \end{array} \]
    10. Final simplification37.3%

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

    Reproduce

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