Quadratic roots, full range

Percentage Accurate: 52.5% → 87.5%
Time: 19.9s
Alternatives: 11
Speedup: 12.9×

Specification

?
\[\begin{array}{l} \\ \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (/ (+ (- b) (sqrt (- (* b b) (* (* 4.0 a) c)))) (* 2.0 a)))
double code(double a, double b, double c) {
	return (-b + sqrt(((b * b) - ((4.0 * a) * c)))) / (2.0 * a);
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    code = (-b + sqrt(((b * b) - ((4.0d0 * a) * c)))) / (2.0d0 * a)
end function
public static double code(double a, double b, double c) {
	return (-b + Math.sqrt(((b * b) - ((4.0 * a) * c)))) / (2.0 * a);
}
def code(a, b, c):
	return (-b + math.sqrt(((b * b) - ((4.0 * a) * c)))) / (2.0 * a)
function code(a, b, c)
	return Float64(Float64(Float64(-b) + sqrt(Float64(Float64(b * b) - Float64(Float64(4.0 * a) * c)))) / Float64(2.0 * a))
end
function tmp = code(a, b, c)
	tmp = (-b + sqrt(((b * b) - ((4.0 * a) * c)))) / (2.0 * a);
end
code[a_, b_, c_] := N[(N[((-b) + N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(N[(4.0 * a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(2.0 * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}
\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 11 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: 52.5% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (/ (+ (- b) (sqrt (- (* b b) (* (* 4.0 a) c)))) (* 2.0 a)))
double code(double a, double b, double c) {
	return (-b + sqrt(((b * b) - ((4.0 * a) * c)))) / (2.0 * a);
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    code = (-b + sqrt(((b * b) - ((4.0d0 * a) * c)))) / (2.0d0 * a)
end function
public static double code(double a, double b, double c) {
	return (-b + Math.sqrt(((b * b) - ((4.0 * a) * c)))) / (2.0 * a);
}
def code(a, b, c):
	return (-b + math.sqrt(((b * b) - ((4.0 * a) * c)))) / (2.0 * a)
function code(a, b, c)
	return Float64(Float64(Float64(-b) + sqrt(Float64(Float64(b * b) - Float64(Float64(4.0 * a) * c)))) / Float64(2.0 * a))
end
function tmp = code(a, b, c)
	tmp = (-b + sqrt(((b * b) - ((4.0 * a) * c)))) / (2.0 * a);
end
code[a_, b_, c_] := N[(N[((-b) + N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(N[(4.0 * a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(2.0 * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}
\end{array}

Alternative 1: 87.5% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -2 \cdot 10^{+153}:\\ \;\;\;\;\frac{c}{b} - \frac{b}{a}\\ \mathbf{elif}\;b \leq -7.2 \cdot 10^{-153}:\\ \;\;\;\;\frac{\sqrt{\mathsf{fma}\left(a, c \cdot -4, b \cdot b\right)} - b}{a \cdot 2}\\ \mathbf{elif}\;b \leq 5.6 \cdot 10^{-96}:\\ \;\;\;\;\frac{-2}{\frac{b + \mathsf{hypot}\left(\sqrt{a \cdot \left(c \cdot -4\right)}, b\right)}{c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{-b}\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b -2e+153)
   (- (/ c b) (/ b a))
   (if (<= b -7.2e-153)
     (/ (- (sqrt (fma a (* c -4.0) (* b b))) b) (* a 2.0))
     (if (<= b 5.6e-96)
       (/ -2.0 (/ (+ b (hypot (sqrt (* a (* c -4.0))) b)) c))
       (/ c (- b))))))
double code(double a, double b, double c) {
	double tmp;
	if (b <= -2e+153) {
		tmp = (c / b) - (b / a);
	} else if (b <= -7.2e-153) {
		tmp = (sqrt(fma(a, (c * -4.0), (b * b))) - b) / (a * 2.0);
	} else if (b <= 5.6e-96) {
		tmp = -2.0 / ((b + hypot(sqrt((a * (c * -4.0))), b)) / c);
	} else {
		tmp = c / -b;
	}
	return tmp;
}
function code(a, b, c)
	tmp = 0.0
	if (b <= -2e+153)
		tmp = Float64(Float64(c / b) - Float64(b / a));
	elseif (b <= -7.2e-153)
		tmp = Float64(Float64(sqrt(fma(a, Float64(c * -4.0), Float64(b * b))) - b) / Float64(a * 2.0));
	elseif (b <= 5.6e-96)
		tmp = Float64(-2.0 / Float64(Float64(b + hypot(sqrt(Float64(a * Float64(c * -4.0))), b)) / c));
	else
		tmp = Float64(c / Float64(-b));
	end
	return tmp
end
code[a_, b_, c_] := If[LessEqual[b, -2e+153], N[(N[(c / b), $MachinePrecision] - N[(b / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -7.2e-153], N[(N[(N[Sqrt[N[(a * N[(c * -4.0), $MachinePrecision] + N[(b * b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5.6e-96], N[(-2.0 / N[(N[(b + N[Sqrt[N[Sqrt[N[(a * N[(c * -4.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] ^ 2 + b ^ 2], $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], N[(c / (-b)), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -2 \cdot 10^{+153}:\\
\;\;\;\;\frac{c}{b} - \frac{b}{a}\\

\mathbf{elif}\;b \leq -7.2 \cdot 10^{-153}:\\
\;\;\;\;\frac{\sqrt{\mathsf{fma}\left(a, c \cdot -4, b \cdot b\right)} - b}{a \cdot 2}\\

\mathbf{elif}\;b \leq 5.6 \cdot 10^{-96}:\\
\;\;\;\;\frac{-2}{\frac{b + \mathsf{hypot}\left(\sqrt{a \cdot \left(c \cdot -4\right)}, b\right)}{c}}\\

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


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

    1. Initial program 39.4%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
    2. Step-by-step derivation
      1. *-commutative39.4%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{\color{blue}{a \cdot 2}} \]
    3. Simplified39.4%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{a \cdot 2}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around -inf 97.7%

      \[\leadsto \color{blue}{-1 \cdot \left(b \cdot \left(-1 \cdot \frac{c}{{b}^{2}} + \frac{1}{a}\right)\right)} \]
    6. Step-by-step derivation
      1. mul-1-neg97.7%

        \[\leadsto \color{blue}{-b \cdot \left(-1 \cdot \frac{c}{{b}^{2}} + \frac{1}{a}\right)} \]
      2. distribute-rgt-neg-in97.7%

        \[\leadsto \color{blue}{b \cdot \left(-\left(-1 \cdot \frac{c}{{b}^{2}} + \frac{1}{a}\right)\right)} \]
      3. +-commutative97.7%

        \[\leadsto b \cdot \left(-\color{blue}{\left(\frac{1}{a} + -1 \cdot \frac{c}{{b}^{2}}\right)}\right) \]
      4. mul-1-neg97.7%

        \[\leadsto b \cdot \left(-\left(\frac{1}{a} + \color{blue}{\left(-\frac{c}{{b}^{2}}\right)}\right)\right) \]
      5. unsub-neg97.7%

        \[\leadsto b \cdot \left(-\color{blue}{\left(\frac{1}{a} - \frac{c}{{b}^{2}}\right)}\right) \]
    7. Simplified97.7%

      \[\leadsto \color{blue}{b \cdot \left(-\left(\frac{1}{a} - \frac{c}{{b}^{2}}\right)\right)} \]
    8. Taylor expanded in a around inf 98.2%

      \[\leadsto \color{blue}{-1 \cdot \frac{b}{a} + \frac{c}{b}} \]

    if -2e153 < b < -7.1999999999999995e-153

    1. Initial program 92.8%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
    2. Step-by-step derivation
      1. *-commutative92.8%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{\color{blue}{a \cdot 2}} \]
    3. Simplified92.8%

      \[\leadsto \color{blue}{\frac{\sqrt{\mathsf{fma}\left(a, c \cdot -4, b \cdot b\right)} - b}{a \cdot 2}} \]
    4. Add Preprocessing

    if -7.1999999999999995e-153 < b < 5.60000000000000031e-96

    1. Initial program 75.2%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
    2. Step-by-step derivation
      1. *-commutative75.2%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{\color{blue}{a \cdot 2}} \]
    3. Simplified75.2%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{a \cdot 2}} \]
    4. Add Preprocessing
    5. Applied egg-rr75.0%

      \[\leadsto \color{blue}{\sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)} \cdot \frac{0.5}{a} + \left(-b \cdot \frac{0.5}{a}\right)} \]
    6. Step-by-step derivation
      1. sub-neg75.0%

        \[\leadsto \color{blue}{\sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)} \cdot \frac{0.5}{a} - b \cdot \frac{0.5}{a}} \]
      2. distribute-rgt-out--75.0%

        \[\leadsto \color{blue}{\frac{0.5}{a} \cdot \left(\sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)} - b\right)} \]
    7. Simplified75.0%

      \[\leadsto \color{blue}{\frac{0.5}{a} \cdot \left(\sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)} - b\right)} \]
    8. Step-by-step derivation
      1. associate-*l/75.2%

        \[\leadsto \color{blue}{\frac{0.5 \cdot \left(\sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)} - b\right)}{a}} \]
      2. clear-num75.0%

        \[\leadsto \color{blue}{\frac{1}{\frac{a}{0.5 \cdot \left(\sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)} - b\right)}}} \]
    9. Applied egg-rr75.0%

      \[\leadsto \color{blue}{\frac{1}{\frac{a}{0.5 \cdot \left(\sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)} - b\right)}}} \]
    10. Step-by-step derivation
      1. flip--72.5%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \color{blue}{\frac{\sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)} \cdot \sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)} - b \cdot b}{\sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)} + b}}}} \]
      2. add-sqr-sqrt72.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \frac{\color{blue}{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)} - b \cdot b}{\sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)} + b}}} \]
      3. fma-undefine72.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \frac{\color{blue}{\left(a \cdot \left(c \cdot -4\right) + {b}^{2}\right)} - b \cdot b}{\sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)} + b}}} \]
      4. unpow272.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \frac{\left(a \cdot \left(c \cdot -4\right) + {b}^{2}\right) - \color{blue}{{b}^{2}}}{\sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)} + b}}} \]
      5. associate--l+72.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \frac{\color{blue}{a \cdot \left(c \cdot -4\right) + \left({b}^{2} - {b}^{2}\right)}}{\sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)} + b}}} \]
      6. *-commutative72.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \frac{a \cdot \color{blue}{\left(-4 \cdot c\right)} + \left({b}^{2} - {b}^{2}\right)}{\sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)} + b}}} \]
      7. associate-*r*72.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \frac{\color{blue}{\left(a \cdot -4\right) \cdot c} + \left({b}^{2} - {b}^{2}\right)}{\sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)} + b}}} \]
      8. +-inverses72.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \frac{\left(a \cdot -4\right) \cdot c + \color{blue}{0}}{\sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)} + b}}} \]
      9. +-commutative72.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \frac{\left(a \cdot -4\right) \cdot c + 0}{\color{blue}{b + \sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)}}}}} \]
    11. Applied egg-rr72.3%

      \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \color{blue}{\frac{\left(a \cdot -4\right) \cdot c + 0}{b + \sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)}}}}} \]
    12. Step-by-step derivation
      1. div-inv72.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \color{blue}{\left(\left(\left(a \cdot -4\right) \cdot c + 0\right) \cdot \frac{1}{b + \sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)}}\right)}}} \]
      2. +-rgt-identity72.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \left(\color{blue}{\left(\left(a \cdot -4\right) \cdot c\right)} \cdot \frac{1}{b + \sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)}}\right)}} \]
      3. associate-*l*72.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \left(\color{blue}{\left(a \cdot \left(-4 \cdot c\right)\right)} \cdot \frac{1}{b + \sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)}}\right)}} \]
      4. fma-undefine72.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \left(\left(a \cdot \left(-4 \cdot c\right)\right) \cdot \frac{1}{b + \sqrt{\color{blue}{a \cdot \left(c \cdot -4\right) + {b}^{2}}}}\right)}} \]
      5. *-commutative72.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \left(\left(a \cdot \left(-4 \cdot c\right)\right) \cdot \frac{1}{b + \sqrt{a \cdot \color{blue}{\left(-4 \cdot c\right)} + {b}^{2}}}\right)}} \]
      6. associate-*l*72.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \left(\left(a \cdot \left(-4 \cdot c\right)\right) \cdot \frac{1}{b + \sqrt{\color{blue}{\left(a \cdot -4\right) \cdot c} + {b}^{2}}}\right)}} \]
      7. +-rgt-identity72.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \left(\left(a \cdot \left(-4 \cdot c\right)\right) \cdot \frac{1}{b + \sqrt{\color{blue}{\left(\left(a \cdot -4\right) \cdot c + 0\right)} + {b}^{2}}}\right)}} \]
      8. add-sqr-sqrt72.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \left(\left(a \cdot \left(-4 \cdot c\right)\right) \cdot \frac{1}{b + \sqrt{\color{blue}{\sqrt{\left(a \cdot -4\right) \cdot c + 0} \cdot \sqrt{\left(a \cdot -4\right) \cdot c + 0}} + {b}^{2}}}\right)}} \]
      9. unpow272.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \left(\left(a \cdot \left(-4 \cdot c\right)\right) \cdot \frac{1}{b + \sqrt{\sqrt{\left(a \cdot -4\right) \cdot c + 0} \cdot \sqrt{\left(a \cdot -4\right) \cdot c + 0} + \color{blue}{b \cdot b}}}\right)}} \]
      10. hypot-define72.0%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \left(\left(a \cdot \left(-4 \cdot c\right)\right) \cdot \frac{1}{b + \color{blue}{\mathsf{hypot}\left(\sqrt{\left(a \cdot -4\right) \cdot c + 0}, b\right)}}\right)}} \]
      11. +-rgt-identity72.0%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \left(\left(a \cdot \left(-4 \cdot c\right)\right) \cdot \frac{1}{b + \mathsf{hypot}\left(\sqrt{\color{blue}{\left(a \cdot -4\right) \cdot c}}, b\right)}\right)}} \]
      12. associate-*l*72.0%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \left(\left(a \cdot \left(-4 \cdot c\right)\right) \cdot \frac{1}{b + \mathsf{hypot}\left(\sqrt{\color{blue}{a \cdot \left(-4 \cdot c\right)}}, b\right)}\right)}} \]
    13. Applied egg-rr72.0%

      \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \color{blue}{\left(\left(a \cdot \left(-4 \cdot c\right)\right) \cdot \frac{1}{b + \mathsf{hypot}\left(\sqrt{a \cdot \left(-4 \cdot c\right)}, b\right)}\right)}}} \]
    14. Step-by-step derivation
      1. associate-*r/72.0%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \color{blue}{\frac{\left(a \cdot \left(-4 \cdot c\right)\right) \cdot 1}{b + \mathsf{hypot}\left(\sqrt{a \cdot \left(-4 \cdot c\right)}, b\right)}}}} \]
      2. *-rgt-identity72.0%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \frac{\color{blue}{a \cdot \left(-4 \cdot c\right)}}{b + \mathsf{hypot}\left(\sqrt{a \cdot \left(-4 \cdot c\right)}, b\right)}}} \]
      3. associate-/l*76.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \color{blue}{\left(a \cdot \frac{-4 \cdot c}{b + \mathsf{hypot}\left(\sqrt{a \cdot \left(-4 \cdot c\right)}, b\right)}\right)}}} \]
      4. *-commutative76.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \left(a \cdot \frac{\color{blue}{c \cdot -4}}{b + \mathsf{hypot}\left(\sqrt{a \cdot \left(-4 \cdot c\right)}, b\right)}\right)}} \]
      5. *-commutative76.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \left(a \cdot \frac{c \cdot -4}{b + \mathsf{hypot}\left(\sqrt{\color{blue}{\left(-4 \cdot c\right) \cdot a}}, b\right)}\right)}} \]
      6. *-commutative76.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \left(a \cdot \frac{c \cdot -4}{b + \mathsf{hypot}\left(\sqrt{\color{blue}{\left(c \cdot -4\right)} \cdot a}, b\right)}\right)}} \]
      7. associate-*l*76.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \left(a \cdot \frac{c \cdot -4}{b + \mathsf{hypot}\left(\sqrt{\color{blue}{c \cdot \left(-4 \cdot a\right)}}, b\right)}\right)}} \]
    15. Simplified76.3%

      \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \color{blue}{\left(a \cdot \frac{c \cdot -4}{b + \mathsf{hypot}\left(\sqrt{c \cdot \left(-4 \cdot a\right)}, b\right)}\right)}}} \]
    16. Step-by-step derivation
      1. div-inv76.3%

        \[\leadsto \frac{1}{\color{blue}{a \cdot \frac{1}{0.5 \cdot \left(a \cdot \frac{c \cdot -4}{b + \mathsf{hypot}\left(\sqrt{c \cdot \left(-4 \cdot a\right)}, b\right)}\right)}}} \]
      2. *-commutative76.3%

        \[\leadsto \frac{1}{a \cdot \frac{1}{\color{blue}{\left(a \cdot \frac{c \cdot -4}{b + \mathsf{hypot}\left(\sqrt{c \cdot \left(-4 \cdot a\right)}, b\right)}\right) \cdot 0.5}}} \]
      3. *-commutative76.3%

        \[\leadsto \frac{1}{a \cdot \frac{1}{\left(a \cdot \frac{\color{blue}{-4 \cdot c}}{b + \mathsf{hypot}\left(\sqrt{c \cdot \left(-4 \cdot a\right)}, b\right)}\right) \cdot 0.5}} \]
      4. *-un-lft-identity76.3%

        \[\leadsto \frac{1}{a \cdot \frac{1}{\left(a \cdot \frac{-4 \cdot c}{\color{blue}{1 \cdot \left(b + \mathsf{hypot}\left(\sqrt{c \cdot \left(-4 \cdot a\right)}, b\right)\right)}}\right) \cdot 0.5}} \]
      5. times-frac76.3%

        \[\leadsto \frac{1}{a \cdot \frac{1}{\left(a \cdot \color{blue}{\left(\frac{-4}{1} \cdot \frac{c}{b + \mathsf{hypot}\left(\sqrt{c \cdot \left(-4 \cdot a\right)}, b\right)}\right)}\right) \cdot 0.5}} \]
      6. metadata-eval76.3%

        \[\leadsto \frac{1}{a \cdot \frac{1}{\left(a \cdot \left(\color{blue}{-4} \cdot \frac{c}{b + \mathsf{hypot}\left(\sqrt{c \cdot \left(-4 \cdot a\right)}, b\right)}\right)\right) \cdot 0.5}} \]
      7. associate-*r*76.3%

        \[\leadsto \frac{1}{a \cdot \frac{1}{\left(a \cdot \left(-4 \cdot \frac{c}{b + \mathsf{hypot}\left(\sqrt{\color{blue}{\left(c \cdot -4\right) \cdot a}}, b\right)}\right)\right) \cdot 0.5}} \]
    17. Applied egg-rr76.3%

      \[\leadsto \frac{1}{\color{blue}{a \cdot \frac{1}{\left(a \cdot \left(-4 \cdot \frac{c}{b + \mathsf{hypot}\left(\sqrt{\left(c \cdot -4\right) \cdot a}, b\right)}\right)\right) \cdot 0.5}}} \]
    18. Step-by-step derivation
      1. associate-*r/76.3%

        \[\leadsto \frac{1}{\color{blue}{\frac{a \cdot 1}{\left(a \cdot \left(-4 \cdot \frac{c}{b + \mathsf{hypot}\left(\sqrt{\left(c \cdot -4\right) \cdot a}, b\right)}\right)\right) \cdot 0.5}}} \]
      2. times-frac76.3%

        \[\leadsto \frac{1}{\color{blue}{\frac{a}{a \cdot \left(-4 \cdot \frac{c}{b + \mathsf{hypot}\left(\sqrt{\left(c \cdot -4\right) \cdot a}, b\right)}\right)} \cdot \frac{1}{0.5}}} \]
      3. metadata-eval76.3%

        \[\leadsto \frac{1}{\frac{a}{a \cdot \left(-4 \cdot \frac{c}{b + \mathsf{hypot}\left(\sqrt{\left(c \cdot -4\right) \cdot a}, b\right)}\right)} \cdot \color{blue}{2}} \]
      4. *-commutative76.3%

        \[\leadsto \frac{1}{\color{blue}{2 \cdot \frac{a}{a \cdot \left(-4 \cdot \frac{c}{b + \mathsf{hypot}\left(\sqrt{\left(c \cdot -4\right) \cdot a}, b\right)}\right)}}} \]
      5. associate-*r/76.3%

        \[\leadsto \frac{1}{\color{blue}{\frac{2 \cdot a}{a \cdot \left(-4 \cdot \frac{c}{b + \mathsf{hypot}\left(\sqrt{\left(c \cdot -4\right) \cdot a}, b\right)}\right)}}} \]
      6. *-commutative76.3%

        \[\leadsto \frac{1}{\frac{\color{blue}{a \cdot 2}}{a \cdot \left(-4 \cdot \frac{c}{b + \mathsf{hypot}\left(\sqrt{\left(c \cdot -4\right) \cdot a}, b\right)}\right)}} \]
      7. times-frac76.6%

        \[\leadsto \frac{1}{\color{blue}{\frac{a}{a} \cdot \frac{2}{-4 \cdot \frac{c}{b + \mathsf{hypot}\left(\sqrt{\left(c \cdot -4\right) \cdot a}, b\right)}}}} \]
      8. *-inverses76.6%

        \[\leadsto \frac{1}{\color{blue}{1} \cdot \frac{2}{-4 \cdot \frac{c}{b + \mathsf{hypot}\left(\sqrt{\left(c \cdot -4\right) \cdot a}, b\right)}}} \]
      9. associate-*r/76.6%

        \[\leadsto \frac{1}{1 \cdot \frac{2}{\color{blue}{\frac{-4 \cdot c}{b + \mathsf{hypot}\left(\sqrt{\left(c \cdot -4\right) \cdot a}, b\right)}}}} \]
      10. *-commutative76.6%

        \[\leadsto \frac{1}{1 \cdot \frac{2}{\frac{\color{blue}{c \cdot -4}}{b + \mathsf{hypot}\left(\sqrt{\left(c \cdot -4\right) \cdot a}, b\right)}}} \]
      11. *-lft-identity76.6%

        \[\leadsto \frac{1}{1 \cdot \frac{2}{\frac{c \cdot -4}{\color{blue}{1 \cdot \left(b + \mathsf{hypot}\left(\sqrt{\left(c \cdot -4\right) \cdot a}, b\right)\right)}}}} \]
      12. times-frac76.5%

        \[\leadsto \frac{1}{1 \cdot \frac{2}{\color{blue}{\frac{c}{1} \cdot \frac{-4}{b + \mathsf{hypot}\left(\sqrt{\left(c \cdot -4\right) \cdot a}, b\right)}}}} \]
      13. /-rgt-identity76.5%

        \[\leadsto \frac{1}{1 \cdot \frac{2}{\color{blue}{c} \cdot \frac{-4}{b + \mathsf{hypot}\left(\sqrt{\left(c \cdot -4\right) \cdot a}, b\right)}}} \]
      14. *-commutative76.5%

        \[\leadsto \frac{1}{1 \cdot \frac{2}{c \cdot \frac{-4}{b + \mathsf{hypot}\left(\sqrt{\color{blue}{a \cdot \left(c \cdot -4\right)}}, b\right)}}} \]
    19. Simplified76.5%

      \[\leadsto \frac{1}{\color{blue}{1 \cdot \frac{2}{c \cdot \frac{-4}{b + \mathsf{hypot}\left(\sqrt{a \cdot \left(c \cdot -4\right)}, b\right)}}}} \]
    20. Step-by-step derivation
      1. *-un-lft-identity76.5%

        \[\leadsto \frac{1}{\color{blue}{\frac{2}{c \cdot \frac{-4}{b + \mathsf{hypot}\left(\sqrt{a \cdot \left(c \cdot -4\right)}, b\right)}}}} \]
      2. clear-num76.5%

        \[\leadsto \color{blue}{\frac{c \cdot \frac{-4}{b + \mathsf{hypot}\left(\sqrt{a \cdot \left(c \cdot -4\right)}, b\right)}}{2}} \]
      3. div-inv76.5%

        \[\leadsto \color{blue}{\left(c \cdot \frac{-4}{b + \mathsf{hypot}\left(\sqrt{a \cdot \left(c \cdot -4\right)}, b\right)}\right) \cdot \frac{1}{2}} \]
      4. clear-num76.5%

        \[\leadsto \left(c \cdot \color{blue}{\frac{1}{\frac{b + \mathsf{hypot}\left(\sqrt{a \cdot \left(c \cdot -4\right)}, b\right)}{-4}}}\right) \cdot \frac{1}{2} \]
      5. un-div-inv76.6%

        \[\leadsto \color{blue}{\frac{c}{\frac{b + \mathsf{hypot}\left(\sqrt{a \cdot \left(c \cdot -4\right)}, b\right)}{-4}}} \cdot \frac{1}{2} \]
      6. div-inv76.6%

        \[\leadsto \frac{c}{\color{blue}{\left(b + \mathsf{hypot}\left(\sqrt{a \cdot \left(c \cdot -4\right)}, b\right)\right) \cdot \frac{1}{-4}}} \cdot \frac{1}{2} \]
      7. metadata-eval76.6%

        \[\leadsto \frac{c}{\left(b + \mathsf{hypot}\left(\sqrt{a \cdot \left(c \cdot -4\right)}, b\right)\right) \cdot \color{blue}{-0.25}} \cdot \frac{1}{2} \]
      8. metadata-eval76.6%

        \[\leadsto \frac{c}{\left(b + \mathsf{hypot}\left(\sqrt{a \cdot \left(c \cdot -4\right)}, b\right)\right) \cdot -0.25} \cdot \color{blue}{0.5} \]
    21. Applied egg-rr76.6%

      \[\leadsto \color{blue}{\frac{c}{\left(b + \mathsf{hypot}\left(\sqrt{a \cdot \left(c \cdot -4\right)}, b\right)\right) \cdot -0.25} \cdot 0.5} \]
    22. Step-by-step derivation
      1. *-commutative76.6%

        \[\leadsto \color{blue}{0.5 \cdot \frac{c}{\left(b + \mathsf{hypot}\left(\sqrt{a \cdot \left(c \cdot -4\right)}, b\right)\right) \cdot -0.25}} \]
      2. associate-*r/76.6%

        \[\leadsto \color{blue}{\frac{0.5 \cdot c}{\left(b + \mathsf{hypot}\left(\sqrt{a \cdot \left(c \cdot -4\right)}, b\right)\right) \cdot -0.25}} \]
      3. *-commutative76.6%

        \[\leadsto \frac{0.5 \cdot c}{\color{blue}{-0.25 \cdot \left(b + \mathsf{hypot}\left(\sqrt{a \cdot \left(c \cdot -4\right)}, b\right)\right)}} \]
      4. times-frac76.6%

        \[\leadsto \color{blue}{\frac{0.5}{-0.25} \cdot \frac{c}{b + \mathsf{hypot}\left(\sqrt{a \cdot \left(c \cdot -4\right)}, b\right)}} \]
      5. metadata-eval76.6%

        \[\leadsto \color{blue}{-2} \cdot \frac{c}{b + \mathsf{hypot}\left(\sqrt{a \cdot \left(c \cdot -4\right)}, b\right)} \]
    23. Simplified76.6%

      \[\leadsto \color{blue}{-2 \cdot \frac{c}{b + \mathsf{hypot}\left(\sqrt{a \cdot \left(c \cdot -4\right)}, b\right)}} \]
    24. Step-by-step derivation
      1. clear-num76.6%

        \[\leadsto -2 \cdot \color{blue}{\frac{1}{\frac{b + \mathsf{hypot}\left(\sqrt{a \cdot \left(c \cdot -4\right)}, b\right)}{c}}} \]
      2. un-div-inv76.6%

        \[\leadsto \color{blue}{\frac{-2}{\frac{b + \mathsf{hypot}\left(\sqrt{a \cdot \left(c \cdot -4\right)}, b\right)}{c}}} \]
    25. Applied egg-rr76.6%

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

    if 5.60000000000000031e-96 < b

    1. Initial program 12.3%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
    2. Step-by-step derivation
      1. *-commutative12.3%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{\color{blue}{a \cdot 2}} \]
    3. Simplified12.3%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{a \cdot 2}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around inf 90.4%

      \[\leadsto \color{blue}{-1 \cdot \frac{c}{b}} \]
    6. Step-by-step derivation
      1. associate-*r/90.4%

        \[\leadsto \color{blue}{\frac{-1 \cdot c}{b}} \]
      2. mul-1-neg90.4%

        \[\leadsto \frac{\color{blue}{-c}}{b} \]
    7. Simplified90.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2 \cdot 10^{+153}:\\ \;\;\;\;\frac{c}{b} - \frac{b}{a}\\ \mathbf{elif}\;b \leq -7.2 \cdot 10^{-153}:\\ \;\;\;\;\frac{\sqrt{\mathsf{fma}\left(a, c \cdot -4, b \cdot b\right)} - b}{a \cdot 2}\\ \mathbf{elif}\;b \leq 5.6 \cdot 10^{-96}:\\ \;\;\;\;\frac{-2}{\frac{b + \mathsf{hypot}\left(\sqrt{a \cdot \left(c \cdot -4\right)}, b\right)}{c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{-b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 87.5% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -2 \cdot 10^{+153}:\\ \;\;\;\;\frac{c}{b} - \frac{b}{a}\\ \mathbf{elif}\;b \leq -7.2 \cdot 10^{-153}:\\ \;\;\;\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b}{a \cdot 2}\\ \mathbf{elif}\;b \leq 5.6 \cdot 10^{-96}:\\ \;\;\;\;\frac{-2}{\frac{b + \mathsf{hypot}\left(\sqrt{a \cdot \left(c \cdot -4\right)}, b\right)}{c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{-b}\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b -2e+153)
   (- (/ c b) (/ b a))
   (if (<= b -7.2e-153)
     (/ (- (sqrt (- (* b b) (* c (* a 4.0)))) b) (* a 2.0))
     (if (<= b 5.6e-96)
       (/ -2.0 (/ (+ b (hypot (sqrt (* a (* c -4.0))) b)) c))
       (/ c (- b))))))
double code(double a, double b, double c) {
	double tmp;
	if (b <= -2e+153) {
		tmp = (c / b) - (b / a);
	} else if (b <= -7.2e-153) {
		tmp = (sqrt(((b * b) - (c * (a * 4.0)))) - b) / (a * 2.0);
	} else if (b <= 5.6e-96) {
		tmp = -2.0 / ((b + hypot(sqrt((a * (c * -4.0))), b)) / c);
	} else {
		tmp = c / -b;
	}
	return tmp;
}
public static double code(double a, double b, double c) {
	double tmp;
	if (b <= -2e+153) {
		tmp = (c / b) - (b / a);
	} else if (b <= -7.2e-153) {
		tmp = (Math.sqrt(((b * b) - (c * (a * 4.0)))) - b) / (a * 2.0);
	} else if (b <= 5.6e-96) {
		tmp = -2.0 / ((b + Math.hypot(Math.sqrt((a * (c * -4.0))), b)) / c);
	} else {
		tmp = c / -b;
	}
	return tmp;
}
def code(a, b, c):
	tmp = 0
	if b <= -2e+153:
		tmp = (c / b) - (b / a)
	elif b <= -7.2e-153:
		tmp = (math.sqrt(((b * b) - (c * (a * 4.0)))) - b) / (a * 2.0)
	elif b <= 5.6e-96:
		tmp = -2.0 / ((b + math.hypot(math.sqrt((a * (c * -4.0))), b)) / c)
	else:
		tmp = c / -b
	return tmp
function code(a, b, c)
	tmp = 0.0
	if (b <= -2e+153)
		tmp = Float64(Float64(c / b) - Float64(b / a));
	elseif (b <= -7.2e-153)
		tmp = Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(c * Float64(a * 4.0)))) - b) / Float64(a * 2.0));
	elseif (b <= 5.6e-96)
		tmp = Float64(-2.0 / Float64(Float64(b + hypot(sqrt(Float64(a * Float64(c * -4.0))), b)) / c));
	else
		tmp = Float64(c / Float64(-b));
	end
	return tmp
end
function tmp_2 = code(a, b, c)
	tmp = 0.0;
	if (b <= -2e+153)
		tmp = (c / b) - (b / a);
	elseif (b <= -7.2e-153)
		tmp = (sqrt(((b * b) - (c * (a * 4.0)))) - b) / (a * 2.0);
	elseif (b <= 5.6e-96)
		tmp = -2.0 / ((b + hypot(sqrt((a * (c * -4.0))), b)) / c);
	else
		tmp = c / -b;
	end
	tmp_2 = tmp;
end
code[a_, b_, c_] := If[LessEqual[b, -2e+153], N[(N[(c / b), $MachinePrecision] - N[(b / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -7.2e-153], N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(c * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5.6e-96], N[(-2.0 / N[(N[(b + N[Sqrt[N[Sqrt[N[(a * N[(c * -4.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] ^ 2 + b ^ 2], $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], N[(c / (-b)), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -2 \cdot 10^{+153}:\\
\;\;\;\;\frac{c}{b} - \frac{b}{a}\\

\mathbf{elif}\;b \leq -7.2 \cdot 10^{-153}:\\
\;\;\;\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b}{a \cdot 2}\\

\mathbf{elif}\;b \leq 5.6 \cdot 10^{-96}:\\
\;\;\;\;\frac{-2}{\frac{b + \mathsf{hypot}\left(\sqrt{a \cdot \left(c \cdot -4\right)}, b\right)}{c}}\\

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


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

    1. Initial program 39.4%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
    2. Step-by-step derivation
      1. *-commutative39.4%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{\color{blue}{a \cdot 2}} \]
    3. Simplified39.4%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{a \cdot 2}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around -inf 97.7%

      \[\leadsto \color{blue}{-1 \cdot \left(b \cdot \left(-1 \cdot \frac{c}{{b}^{2}} + \frac{1}{a}\right)\right)} \]
    6. Step-by-step derivation
      1. mul-1-neg97.7%

        \[\leadsto \color{blue}{-b \cdot \left(-1 \cdot \frac{c}{{b}^{2}} + \frac{1}{a}\right)} \]
      2. distribute-rgt-neg-in97.7%

        \[\leadsto \color{blue}{b \cdot \left(-\left(-1 \cdot \frac{c}{{b}^{2}} + \frac{1}{a}\right)\right)} \]
      3. +-commutative97.7%

        \[\leadsto b \cdot \left(-\color{blue}{\left(\frac{1}{a} + -1 \cdot \frac{c}{{b}^{2}}\right)}\right) \]
      4. mul-1-neg97.7%

        \[\leadsto b \cdot \left(-\left(\frac{1}{a} + \color{blue}{\left(-\frac{c}{{b}^{2}}\right)}\right)\right) \]
      5. unsub-neg97.7%

        \[\leadsto b \cdot \left(-\color{blue}{\left(\frac{1}{a} - \frac{c}{{b}^{2}}\right)}\right) \]
    7. Simplified97.7%

      \[\leadsto \color{blue}{b \cdot \left(-\left(\frac{1}{a} - \frac{c}{{b}^{2}}\right)\right)} \]
    8. Taylor expanded in a around inf 98.2%

      \[\leadsto \color{blue}{-1 \cdot \frac{b}{a} + \frac{c}{b}} \]

    if -2e153 < b < -7.1999999999999995e-153

    1. Initial program 92.8%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
    2. Add Preprocessing

    if -7.1999999999999995e-153 < b < 5.60000000000000031e-96

    1. Initial program 75.2%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
    2. Step-by-step derivation
      1. *-commutative75.2%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{\color{blue}{a \cdot 2}} \]
    3. Simplified75.2%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{a \cdot 2}} \]
    4. Add Preprocessing
    5. Applied egg-rr75.0%

      \[\leadsto \color{blue}{\sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)} \cdot \frac{0.5}{a} + \left(-b \cdot \frac{0.5}{a}\right)} \]
    6. Step-by-step derivation
      1. sub-neg75.0%

        \[\leadsto \color{blue}{\sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)} \cdot \frac{0.5}{a} - b \cdot \frac{0.5}{a}} \]
      2. distribute-rgt-out--75.0%

        \[\leadsto \color{blue}{\frac{0.5}{a} \cdot \left(\sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)} - b\right)} \]
    7. Simplified75.0%

      \[\leadsto \color{blue}{\frac{0.5}{a} \cdot \left(\sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)} - b\right)} \]
    8. Step-by-step derivation
      1. associate-*l/75.2%

        \[\leadsto \color{blue}{\frac{0.5 \cdot \left(\sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)} - b\right)}{a}} \]
      2. clear-num75.0%

        \[\leadsto \color{blue}{\frac{1}{\frac{a}{0.5 \cdot \left(\sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)} - b\right)}}} \]
    9. Applied egg-rr75.0%

      \[\leadsto \color{blue}{\frac{1}{\frac{a}{0.5 \cdot \left(\sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)} - b\right)}}} \]
    10. Step-by-step derivation
      1. flip--72.5%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \color{blue}{\frac{\sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)} \cdot \sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)} - b \cdot b}{\sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)} + b}}}} \]
      2. add-sqr-sqrt72.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \frac{\color{blue}{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)} - b \cdot b}{\sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)} + b}}} \]
      3. fma-undefine72.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \frac{\color{blue}{\left(a \cdot \left(c \cdot -4\right) + {b}^{2}\right)} - b \cdot b}{\sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)} + b}}} \]
      4. unpow272.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \frac{\left(a \cdot \left(c \cdot -4\right) + {b}^{2}\right) - \color{blue}{{b}^{2}}}{\sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)} + b}}} \]
      5. associate--l+72.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \frac{\color{blue}{a \cdot \left(c \cdot -4\right) + \left({b}^{2} - {b}^{2}\right)}}{\sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)} + b}}} \]
      6. *-commutative72.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \frac{a \cdot \color{blue}{\left(-4 \cdot c\right)} + \left({b}^{2} - {b}^{2}\right)}{\sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)} + b}}} \]
      7. associate-*r*72.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \frac{\color{blue}{\left(a \cdot -4\right) \cdot c} + \left({b}^{2} - {b}^{2}\right)}{\sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)} + b}}} \]
      8. +-inverses72.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \frac{\left(a \cdot -4\right) \cdot c + \color{blue}{0}}{\sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)} + b}}} \]
      9. +-commutative72.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \frac{\left(a \cdot -4\right) \cdot c + 0}{\color{blue}{b + \sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)}}}}} \]
    11. Applied egg-rr72.3%

      \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \color{blue}{\frac{\left(a \cdot -4\right) \cdot c + 0}{b + \sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)}}}}} \]
    12. Step-by-step derivation
      1. div-inv72.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \color{blue}{\left(\left(\left(a \cdot -4\right) \cdot c + 0\right) \cdot \frac{1}{b + \sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)}}\right)}}} \]
      2. +-rgt-identity72.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \left(\color{blue}{\left(\left(a \cdot -4\right) \cdot c\right)} \cdot \frac{1}{b + \sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)}}\right)}} \]
      3. associate-*l*72.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \left(\color{blue}{\left(a \cdot \left(-4 \cdot c\right)\right)} \cdot \frac{1}{b + \sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)}}\right)}} \]
      4. fma-undefine72.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \left(\left(a \cdot \left(-4 \cdot c\right)\right) \cdot \frac{1}{b + \sqrt{\color{blue}{a \cdot \left(c \cdot -4\right) + {b}^{2}}}}\right)}} \]
      5. *-commutative72.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \left(\left(a \cdot \left(-4 \cdot c\right)\right) \cdot \frac{1}{b + \sqrt{a \cdot \color{blue}{\left(-4 \cdot c\right)} + {b}^{2}}}\right)}} \]
      6. associate-*l*72.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \left(\left(a \cdot \left(-4 \cdot c\right)\right) \cdot \frac{1}{b + \sqrt{\color{blue}{\left(a \cdot -4\right) \cdot c} + {b}^{2}}}\right)}} \]
      7. +-rgt-identity72.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \left(\left(a \cdot \left(-4 \cdot c\right)\right) \cdot \frac{1}{b + \sqrt{\color{blue}{\left(\left(a \cdot -4\right) \cdot c + 0\right)} + {b}^{2}}}\right)}} \]
      8. add-sqr-sqrt72.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \left(\left(a \cdot \left(-4 \cdot c\right)\right) \cdot \frac{1}{b + \sqrt{\color{blue}{\sqrt{\left(a \cdot -4\right) \cdot c + 0} \cdot \sqrt{\left(a \cdot -4\right) \cdot c + 0}} + {b}^{2}}}\right)}} \]
      9. unpow272.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \left(\left(a \cdot \left(-4 \cdot c\right)\right) \cdot \frac{1}{b + \sqrt{\sqrt{\left(a \cdot -4\right) \cdot c + 0} \cdot \sqrt{\left(a \cdot -4\right) \cdot c + 0} + \color{blue}{b \cdot b}}}\right)}} \]
      10. hypot-define72.0%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \left(\left(a \cdot \left(-4 \cdot c\right)\right) \cdot \frac{1}{b + \color{blue}{\mathsf{hypot}\left(\sqrt{\left(a \cdot -4\right) \cdot c + 0}, b\right)}}\right)}} \]
      11. +-rgt-identity72.0%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \left(\left(a \cdot \left(-4 \cdot c\right)\right) \cdot \frac{1}{b + \mathsf{hypot}\left(\sqrt{\color{blue}{\left(a \cdot -4\right) \cdot c}}, b\right)}\right)}} \]
      12. associate-*l*72.0%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \left(\left(a \cdot \left(-4 \cdot c\right)\right) \cdot \frac{1}{b + \mathsf{hypot}\left(\sqrt{\color{blue}{a \cdot \left(-4 \cdot c\right)}}, b\right)}\right)}} \]
    13. Applied egg-rr72.0%

      \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \color{blue}{\left(\left(a \cdot \left(-4 \cdot c\right)\right) \cdot \frac{1}{b + \mathsf{hypot}\left(\sqrt{a \cdot \left(-4 \cdot c\right)}, b\right)}\right)}}} \]
    14. Step-by-step derivation
      1. associate-*r/72.0%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \color{blue}{\frac{\left(a \cdot \left(-4 \cdot c\right)\right) \cdot 1}{b + \mathsf{hypot}\left(\sqrt{a \cdot \left(-4 \cdot c\right)}, b\right)}}}} \]
      2. *-rgt-identity72.0%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \frac{\color{blue}{a \cdot \left(-4 \cdot c\right)}}{b + \mathsf{hypot}\left(\sqrt{a \cdot \left(-4 \cdot c\right)}, b\right)}}} \]
      3. associate-/l*76.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \color{blue}{\left(a \cdot \frac{-4 \cdot c}{b + \mathsf{hypot}\left(\sqrt{a \cdot \left(-4 \cdot c\right)}, b\right)}\right)}}} \]
      4. *-commutative76.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \left(a \cdot \frac{\color{blue}{c \cdot -4}}{b + \mathsf{hypot}\left(\sqrt{a \cdot \left(-4 \cdot c\right)}, b\right)}\right)}} \]
      5. *-commutative76.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \left(a \cdot \frac{c \cdot -4}{b + \mathsf{hypot}\left(\sqrt{\color{blue}{\left(-4 \cdot c\right) \cdot a}}, b\right)}\right)}} \]
      6. *-commutative76.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \left(a \cdot \frac{c \cdot -4}{b + \mathsf{hypot}\left(\sqrt{\color{blue}{\left(c \cdot -4\right)} \cdot a}, b\right)}\right)}} \]
      7. associate-*l*76.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \left(a \cdot \frac{c \cdot -4}{b + \mathsf{hypot}\left(\sqrt{\color{blue}{c \cdot \left(-4 \cdot a\right)}}, b\right)}\right)}} \]
    15. Simplified76.3%

      \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \color{blue}{\left(a \cdot \frac{c \cdot -4}{b + \mathsf{hypot}\left(\sqrt{c \cdot \left(-4 \cdot a\right)}, b\right)}\right)}}} \]
    16. Step-by-step derivation
      1. div-inv76.3%

        \[\leadsto \frac{1}{\color{blue}{a \cdot \frac{1}{0.5 \cdot \left(a \cdot \frac{c \cdot -4}{b + \mathsf{hypot}\left(\sqrt{c \cdot \left(-4 \cdot a\right)}, b\right)}\right)}}} \]
      2. *-commutative76.3%

        \[\leadsto \frac{1}{a \cdot \frac{1}{\color{blue}{\left(a \cdot \frac{c \cdot -4}{b + \mathsf{hypot}\left(\sqrt{c \cdot \left(-4 \cdot a\right)}, b\right)}\right) \cdot 0.5}}} \]
      3. *-commutative76.3%

        \[\leadsto \frac{1}{a \cdot \frac{1}{\left(a \cdot \frac{\color{blue}{-4 \cdot c}}{b + \mathsf{hypot}\left(\sqrt{c \cdot \left(-4 \cdot a\right)}, b\right)}\right) \cdot 0.5}} \]
      4. *-un-lft-identity76.3%

        \[\leadsto \frac{1}{a \cdot \frac{1}{\left(a \cdot \frac{-4 \cdot c}{\color{blue}{1 \cdot \left(b + \mathsf{hypot}\left(\sqrt{c \cdot \left(-4 \cdot a\right)}, b\right)\right)}}\right) \cdot 0.5}} \]
      5. times-frac76.3%

        \[\leadsto \frac{1}{a \cdot \frac{1}{\left(a \cdot \color{blue}{\left(\frac{-4}{1} \cdot \frac{c}{b + \mathsf{hypot}\left(\sqrt{c \cdot \left(-4 \cdot a\right)}, b\right)}\right)}\right) \cdot 0.5}} \]
      6. metadata-eval76.3%

        \[\leadsto \frac{1}{a \cdot \frac{1}{\left(a \cdot \left(\color{blue}{-4} \cdot \frac{c}{b + \mathsf{hypot}\left(\sqrt{c \cdot \left(-4 \cdot a\right)}, b\right)}\right)\right) \cdot 0.5}} \]
      7. associate-*r*76.3%

        \[\leadsto \frac{1}{a \cdot \frac{1}{\left(a \cdot \left(-4 \cdot \frac{c}{b + \mathsf{hypot}\left(\sqrt{\color{blue}{\left(c \cdot -4\right) \cdot a}}, b\right)}\right)\right) \cdot 0.5}} \]
    17. Applied egg-rr76.3%

      \[\leadsto \frac{1}{\color{blue}{a \cdot \frac{1}{\left(a \cdot \left(-4 \cdot \frac{c}{b + \mathsf{hypot}\left(\sqrt{\left(c \cdot -4\right) \cdot a}, b\right)}\right)\right) \cdot 0.5}}} \]
    18. Step-by-step derivation
      1. associate-*r/76.3%

        \[\leadsto \frac{1}{\color{blue}{\frac{a \cdot 1}{\left(a \cdot \left(-4 \cdot \frac{c}{b + \mathsf{hypot}\left(\sqrt{\left(c \cdot -4\right) \cdot a}, b\right)}\right)\right) \cdot 0.5}}} \]
      2. times-frac76.3%

        \[\leadsto \frac{1}{\color{blue}{\frac{a}{a \cdot \left(-4 \cdot \frac{c}{b + \mathsf{hypot}\left(\sqrt{\left(c \cdot -4\right) \cdot a}, b\right)}\right)} \cdot \frac{1}{0.5}}} \]
      3. metadata-eval76.3%

        \[\leadsto \frac{1}{\frac{a}{a \cdot \left(-4 \cdot \frac{c}{b + \mathsf{hypot}\left(\sqrt{\left(c \cdot -4\right) \cdot a}, b\right)}\right)} \cdot \color{blue}{2}} \]
      4. *-commutative76.3%

        \[\leadsto \frac{1}{\color{blue}{2 \cdot \frac{a}{a \cdot \left(-4 \cdot \frac{c}{b + \mathsf{hypot}\left(\sqrt{\left(c \cdot -4\right) \cdot a}, b\right)}\right)}}} \]
      5. associate-*r/76.3%

        \[\leadsto \frac{1}{\color{blue}{\frac{2 \cdot a}{a \cdot \left(-4 \cdot \frac{c}{b + \mathsf{hypot}\left(\sqrt{\left(c \cdot -4\right) \cdot a}, b\right)}\right)}}} \]
      6. *-commutative76.3%

        \[\leadsto \frac{1}{\frac{\color{blue}{a \cdot 2}}{a \cdot \left(-4 \cdot \frac{c}{b + \mathsf{hypot}\left(\sqrt{\left(c \cdot -4\right) \cdot a}, b\right)}\right)}} \]
      7. times-frac76.6%

        \[\leadsto \frac{1}{\color{blue}{\frac{a}{a} \cdot \frac{2}{-4 \cdot \frac{c}{b + \mathsf{hypot}\left(\sqrt{\left(c \cdot -4\right) \cdot a}, b\right)}}}} \]
      8. *-inverses76.6%

        \[\leadsto \frac{1}{\color{blue}{1} \cdot \frac{2}{-4 \cdot \frac{c}{b + \mathsf{hypot}\left(\sqrt{\left(c \cdot -4\right) \cdot a}, b\right)}}} \]
      9. associate-*r/76.6%

        \[\leadsto \frac{1}{1 \cdot \frac{2}{\color{blue}{\frac{-4 \cdot c}{b + \mathsf{hypot}\left(\sqrt{\left(c \cdot -4\right) \cdot a}, b\right)}}}} \]
      10. *-commutative76.6%

        \[\leadsto \frac{1}{1 \cdot \frac{2}{\frac{\color{blue}{c \cdot -4}}{b + \mathsf{hypot}\left(\sqrt{\left(c \cdot -4\right) \cdot a}, b\right)}}} \]
      11. *-lft-identity76.6%

        \[\leadsto \frac{1}{1 \cdot \frac{2}{\frac{c \cdot -4}{\color{blue}{1 \cdot \left(b + \mathsf{hypot}\left(\sqrt{\left(c \cdot -4\right) \cdot a}, b\right)\right)}}}} \]
      12. times-frac76.5%

        \[\leadsto \frac{1}{1 \cdot \frac{2}{\color{blue}{\frac{c}{1} \cdot \frac{-4}{b + \mathsf{hypot}\left(\sqrt{\left(c \cdot -4\right) \cdot a}, b\right)}}}} \]
      13. /-rgt-identity76.5%

        \[\leadsto \frac{1}{1 \cdot \frac{2}{\color{blue}{c} \cdot \frac{-4}{b + \mathsf{hypot}\left(\sqrt{\left(c \cdot -4\right) \cdot a}, b\right)}}} \]
      14. *-commutative76.5%

        \[\leadsto \frac{1}{1 \cdot \frac{2}{c \cdot \frac{-4}{b + \mathsf{hypot}\left(\sqrt{\color{blue}{a \cdot \left(c \cdot -4\right)}}, b\right)}}} \]
    19. Simplified76.5%

      \[\leadsto \frac{1}{\color{blue}{1 \cdot \frac{2}{c \cdot \frac{-4}{b + \mathsf{hypot}\left(\sqrt{a \cdot \left(c \cdot -4\right)}, b\right)}}}} \]
    20. Step-by-step derivation
      1. *-un-lft-identity76.5%

        \[\leadsto \frac{1}{\color{blue}{\frac{2}{c \cdot \frac{-4}{b + \mathsf{hypot}\left(\sqrt{a \cdot \left(c \cdot -4\right)}, b\right)}}}} \]
      2. clear-num76.5%

        \[\leadsto \color{blue}{\frac{c \cdot \frac{-4}{b + \mathsf{hypot}\left(\sqrt{a \cdot \left(c \cdot -4\right)}, b\right)}}{2}} \]
      3. div-inv76.5%

        \[\leadsto \color{blue}{\left(c \cdot \frac{-4}{b + \mathsf{hypot}\left(\sqrt{a \cdot \left(c \cdot -4\right)}, b\right)}\right) \cdot \frac{1}{2}} \]
      4. clear-num76.5%

        \[\leadsto \left(c \cdot \color{blue}{\frac{1}{\frac{b + \mathsf{hypot}\left(\sqrt{a \cdot \left(c \cdot -4\right)}, b\right)}{-4}}}\right) \cdot \frac{1}{2} \]
      5. un-div-inv76.6%

        \[\leadsto \color{blue}{\frac{c}{\frac{b + \mathsf{hypot}\left(\sqrt{a \cdot \left(c \cdot -4\right)}, b\right)}{-4}}} \cdot \frac{1}{2} \]
      6. div-inv76.6%

        \[\leadsto \frac{c}{\color{blue}{\left(b + \mathsf{hypot}\left(\sqrt{a \cdot \left(c \cdot -4\right)}, b\right)\right) \cdot \frac{1}{-4}}} \cdot \frac{1}{2} \]
      7. metadata-eval76.6%

        \[\leadsto \frac{c}{\left(b + \mathsf{hypot}\left(\sqrt{a \cdot \left(c \cdot -4\right)}, b\right)\right) \cdot \color{blue}{-0.25}} \cdot \frac{1}{2} \]
      8. metadata-eval76.6%

        \[\leadsto \frac{c}{\left(b + \mathsf{hypot}\left(\sqrt{a \cdot \left(c \cdot -4\right)}, b\right)\right) \cdot -0.25} \cdot \color{blue}{0.5} \]
    21. Applied egg-rr76.6%

      \[\leadsto \color{blue}{\frac{c}{\left(b + \mathsf{hypot}\left(\sqrt{a \cdot \left(c \cdot -4\right)}, b\right)\right) \cdot -0.25} \cdot 0.5} \]
    22. Step-by-step derivation
      1. *-commutative76.6%

        \[\leadsto \color{blue}{0.5 \cdot \frac{c}{\left(b + \mathsf{hypot}\left(\sqrt{a \cdot \left(c \cdot -4\right)}, b\right)\right) \cdot -0.25}} \]
      2. associate-*r/76.6%

        \[\leadsto \color{blue}{\frac{0.5 \cdot c}{\left(b + \mathsf{hypot}\left(\sqrt{a \cdot \left(c \cdot -4\right)}, b\right)\right) \cdot -0.25}} \]
      3. *-commutative76.6%

        \[\leadsto \frac{0.5 \cdot c}{\color{blue}{-0.25 \cdot \left(b + \mathsf{hypot}\left(\sqrt{a \cdot \left(c \cdot -4\right)}, b\right)\right)}} \]
      4. times-frac76.6%

        \[\leadsto \color{blue}{\frac{0.5}{-0.25} \cdot \frac{c}{b + \mathsf{hypot}\left(\sqrt{a \cdot \left(c \cdot -4\right)}, b\right)}} \]
      5. metadata-eval76.6%

        \[\leadsto \color{blue}{-2} \cdot \frac{c}{b + \mathsf{hypot}\left(\sqrt{a \cdot \left(c \cdot -4\right)}, b\right)} \]
    23. Simplified76.6%

      \[\leadsto \color{blue}{-2 \cdot \frac{c}{b + \mathsf{hypot}\left(\sqrt{a \cdot \left(c \cdot -4\right)}, b\right)}} \]
    24. Step-by-step derivation
      1. clear-num76.6%

        \[\leadsto -2 \cdot \color{blue}{\frac{1}{\frac{b + \mathsf{hypot}\left(\sqrt{a \cdot \left(c \cdot -4\right)}, b\right)}{c}}} \]
      2. un-div-inv76.6%

        \[\leadsto \color{blue}{\frac{-2}{\frac{b + \mathsf{hypot}\left(\sqrt{a \cdot \left(c \cdot -4\right)}, b\right)}{c}}} \]
    25. Applied egg-rr76.6%

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

    if 5.60000000000000031e-96 < b

    1. Initial program 12.3%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
    2. Step-by-step derivation
      1. *-commutative12.3%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{\color{blue}{a \cdot 2}} \]
    3. Simplified12.3%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{a \cdot 2}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around inf 90.4%

      \[\leadsto \color{blue}{-1 \cdot \frac{c}{b}} \]
    6. Step-by-step derivation
      1. associate-*r/90.4%

        \[\leadsto \color{blue}{\frac{-1 \cdot c}{b}} \]
      2. mul-1-neg90.4%

        \[\leadsto \frac{\color{blue}{-c}}{b} \]
    7. Simplified90.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2 \cdot 10^{+153}:\\ \;\;\;\;\frac{c}{b} - \frac{b}{a}\\ \mathbf{elif}\;b \leq -7.2 \cdot 10^{-153}:\\ \;\;\;\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b}{a \cdot 2}\\ \mathbf{elif}\;b \leq 5.6 \cdot 10^{-96}:\\ \;\;\;\;\frac{-2}{\frac{b + \mathsf{hypot}\left(\sqrt{a \cdot \left(c \cdot -4\right)}, b\right)}{c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{-b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 87.6% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -2 \cdot 10^{+153}:\\ \;\;\;\;\frac{c}{b} - \frac{b}{a}\\ \mathbf{elif}\;b \leq -7.2 \cdot 10^{-153}:\\ \;\;\;\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b}{a \cdot 2}\\ \mathbf{elif}\;b \leq 5.6 \cdot 10^{-96}:\\ \;\;\;\;-2 \cdot \frac{c}{b + \mathsf{hypot}\left(\sqrt{a \cdot \left(c \cdot -4\right)}, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{-b}\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b -2e+153)
   (- (/ c b) (/ b a))
   (if (<= b -7.2e-153)
     (/ (- (sqrt (- (* b b) (* c (* a 4.0)))) b) (* a 2.0))
     (if (<= b 5.6e-96)
       (* -2.0 (/ c (+ b (hypot (sqrt (* a (* c -4.0))) b))))
       (/ c (- b))))))
double code(double a, double b, double c) {
	double tmp;
	if (b <= -2e+153) {
		tmp = (c / b) - (b / a);
	} else if (b <= -7.2e-153) {
		tmp = (sqrt(((b * b) - (c * (a * 4.0)))) - b) / (a * 2.0);
	} else if (b <= 5.6e-96) {
		tmp = -2.0 * (c / (b + hypot(sqrt((a * (c * -4.0))), b)));
	} else {
		tmp = c / -b;
	}
	return tmp;
}
public static double code(double a, double b, double c) {
	double tmp;
	if (b <= -2e+153) {
		tmp = (c / b) - (b / a);
	} else if (b <= -7.2e-153) {
		tmp = (Math.sqrt(((b * b) - (c * (a * 4.0)))) - b) / (a * 2.0);
	} else if (b <= 5.6e-96) {
		tmp = -2.0 * (c / (b + Math.hypot(Math.sqrt((a * (c * -4.0))), b)));
	} else {
		tmp = c / -b;
	}
	return tmp;
}
def code(a, b, c):
	tmp = 0
	if b <= -2e+153:
		tmp = (c / b) - (b / a)
	elif b <= -7.2e-153:
		tmp = (math.sqrt(((b * b) - (c * (a * 4.0)))) - b) / (a * 2.0)
	elif b <= 5.6e-96:
		tmp = -2.0 * (c / (b + math.hypot(math.sqrt((a * (c * -4.0))), b)))
	else:
		tmp = c / -b
	return tmp
function code(a, b, c)
	tmp = 0.0
	if (b <= -2e+153)
		tmp = Float64(Float64(c / b) - Float64(b / a));
	elseif (b <= -7.2e-153)
		tmp = Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(c * Float64(a * 4.0)))) - b) / Float64(a * 2.0));
	elseif (b <= 5.6e-96)
		tmp = Float64(-2.0 * Float64(c / Float64(b + hypot(sqrt(Float64(a * Float64(c * -4.0))), b))));
	else
		tmp = Float64(c / Float64(-b));
	end
	return tmp
end
function tmp_2 = code(a, b, c)
	tmp = 0.0;
	if (b <= -2e+153)
		tmp = (c / b) - (b / a);
	elseif (b <= -7.2e-153)
		tmp = (sqrt(((b * b) - (c * (a * 4.0)))) - b) / (a * 2.0);
	elseif (b <= 5.6e-96)
		tmp = -2.0 * (c / (b + hypot(sqrt((a * (c * -4.0))), b)));
	else
		tmp = c / -b;
	end
	tmp_2 = tmp;
end
code[a_, b_, c_] := If[LessEqual[b, -2e+153], N[(N[(c / b), $MachinePrecision] - N[(b / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -7.2e-153], N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(c * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5.6e-96], N[(-2.0 * N[(c / N[(b + N[Sqrt[N[Sqrt[N[(a * N[(c * -4.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] ^ 2 + b ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c / (-b)), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -2 \cdot 10^{+153}:\\
\;\;\;\;\frac{c}{b} - \frac{b}{a}\\

\mathbf{elif}\;b \leq -7.2 \cdot 10^{-153}:\\
\;\;\;\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b}{a \cdot 2}\\

\mathbf{elif}\;b \leq 5.6 \cdot 10^{-96}:\\
\;\;\;\;-2 \cdot \frac{c}{b + \mathsf{hypot}\left(\sqrt{a \cdot \left(c \cdot -4\right)}, b\right)}\\

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


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

    1. Initial program 39.4%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
    2. Step-by-step derivation
      1. *-commutative39.4%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{\color{blue}{a \cdot 2}} \]
    3. Simplified39.4%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{a \cdot 2}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around -inf 97.7%

      \[\leadsto \color{blue}{-1 \cdot \left(b \cdot \left(-1 \cdot \frac{c}{{b}^{2}} + \frac{1}{a}\right)\right)} \]
    6. Step-by-step derivation
      1. mul-1-neg97.7%

        \[\leadsto \color{blue}{-b \cdot \left(-1 \cdot \frac{c}{{b}^{2}} + \frac{1}{a}\right)} \]
      2. distribute-rgt-neg-in97.7%

        \[\leadsto \color{blue}{b \cdot \left(-\left(-1 \cdot \frac{c}{{b}^{2}} + \frac{1}{a}\right)\right)} \]
      3. +-commutative97.7%

        \[\leadsto b \cdot \left(-\color{blue}{\left(\frac{1}{a} + -1 \cdot \frac{c}{{b}^{2}}\right)}\right) \]
      4. mul-1-neg97.7%

        \[\leadsto b \cdot \left(-\left(\frac{1}{a} + \color{blue}{\left(-\frac{c}{{b}^{2}}\right)}\right)\right) \]
      5. unsub-neg97.7%

        \[\leadsto b \cdot \left(-\color{blue}{\left(\frac{1}{a} - \frac{c}{{b}^{2}}\right)}\right) \]
    7. Simplified97.7%

      \[\leadsto \color{blue}{b \cdot \left(-\left(\frac{1}{a} - \frac{c}{{b}^{2}}\right)\right)} \]
    8. Taylor expanded in a around inf 98.2%

      \[\leadsto \color{blue}{-1 \cdot \frac{b}{a} + \frac{c}{b}} \]

    if -2e153 < b < -7.1999999999999995e-153

    1. Initial program 92.8%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
    2. Add Preprocessing

    if -7.1999999999999995e-153 < b < 5.60000000000000031e-96

    1. Initial program 75.2%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
    2. Step-by-step derivation
      1. *-commutative75.2%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{\color{blue}{a \cdot 2}} \]
    3. Simplified75.2%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{a \cdot 2}} \]
    4. Add Preprocessing
    5. Applied egg-rr75.0%

      \[\leadsto \color{blue}{\sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)} \cdot \frac{0.5}{a} + \left(-b \cdot \frac{0.5}{a}\right)} \]
    6. Step-by-step derivation
      1. sub-neg75.0%

        \[\leadsto \color{blue}{\sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)} \cdot \frac{0.5}{a} - b \cdot \frac{0.5}{a}} \]
      2. distribute-rgt-out--75.0%

        \[\leadsto \color{blue}{\frac{0.5}{a} \cdot \left(\sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)} - b\right)} \]
    7. Simplified75.0%

      \[\leadsto \color{blue}{\frac{0.5}{a} \cdot \left(\sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)} - b\right)} \]
    8. Step-by-step derivation
      1. associate-*l/75.2%

        \[\leadsto \color{blue}{\frac{0.5 \cdot \left(\sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)} - b\right)}{a}} \]
      2. clear-num75.0%

        \[\leadsto \color{blue}{\frac{1}{\frac{a}{0.5 \cdot \left(\sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)} - b\right)}}} \]
    9. Applied egg-rr75.0%

      \[\leadsto \color{blue}{\frac{1}{\frac{a}{0.5 \cdot \left(\sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)} - b\right)}}} \]
    10. Step-by-step derivation
      1. flip--72.5%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \color{blue}{\frac{\sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)} \cdot \sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)} - b \cdot b}{\sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)} + b}}}} \]
      2. add-sqr-sqrt72.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \frac{\color{blue}{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)} - b \cdot b}{\sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)} + b}}} \]
      3. fma-undefine72.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \frac{\color{blue}{\left(a \cdot \left(c \cdot -4\right) + {b}^{2}\right)} - b \cdot b}{\sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)} + b}}} \]
      4. unpow272.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \frac{\left(a \cdot \left(c \cdot -4\right) + {b}^{2}\right) - \color{blue}{{b}^{2}}}{\sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)} + b}}} \]
      5. associate--l+72.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \frac{\color{blue}{a \cdot \left(c \cdot -4\right) + \left({b}^{2} - {b}^{2}\right)}}{\sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)} + b}}} \]
      6. *-commutative72.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \frac{a \cdot \color{blue}{\left(-4 \cdot c\right)} + \left({b}^{2} - {b}^{2}\right)}{\sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)} + b}}} \]
      7. associate-*r*72.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \frac{\color{blue}{\left(a \cdot -4\right) \cdot c} + \left({b}^{2} - {b}^{2}\right)}{\sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)} + b}}} \]
      8. +-inverses72.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \frac{\left(a \cdot -4\right) \cdot c + \color{blue}{0}}{\sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)} + b}}} \]
      9. +-commutative72.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \frac{\left(a \cdot -4\right) \cdot c + 0}{\color{blue}{b + \sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)}}}}} \]
    11. Applied egg-rr72.3%

      \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \color{blue}{\frac{\left(a \cdot -4\right) \cdot c + 0}{b + \sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)}}}}} \]
    12. Step-by-step derivation
      1. div-inv72.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \color{blue}{\left(\left(\left(a \cdot -4\right) \cdot c + 0\right) \cdot \frac{1}{b + \sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)}}\right)}}} \]
      2. +-rgt-identity72.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \left(\color{blue}{\left(\left(a \cdot -4\right) \cdot c\right)} \cdot \frac{1}{b + \sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)}}\right)}} \]
      3. associate-*l*72.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \left(\color{blue}{\left(a \cdot \left(-4 \cdot c\right)\right)} \cdot \frac{1}{b + \sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)}}\right)}} \]
      4. fma-undefine72.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \left(\left(a \cdot \left(-4 \cdot c\right)\right) \cdot \frac{1}{b + \sqrt{\color{blue}{a \cdot \left(c \cdot -4\right) + {b}^{2}}}}\right)}} \]
      5. *-commutative72.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \left(\left(a \cdot \left(-4 \cdot c\right)\right) \cdot \frac{1}{b + \sqrt{a \cdot \color{blue}{\left(-4 \cdot c\right)} + {b}^{2}}}\right)}} \]
      6. associate-*l*72.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \left(\left(a \cdot \left(-4 \cdot c\right)\right) \cdot \frac{1}{b + \sqrt{\color{blue}{\left(a \cdot -4\right) \cdot c} + {b}^{2}}}\right)}} \]
      7. +-rgt-identity72.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \left(\left(a \cdot \left(-4 \cdot c\right)\right) \cdot \frac{1}{b + \sqrt{\color{blue}{\left(\left(a \cdot -4\right) \cdot c + 0\right)} + {b}^{2}}}\right)}} \]
      8. add-sqr-sqrt72.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \left(\left(a \cdot \left(-4 \cdot c\right)\right) \cdot \frac{1}{b + \sqrt{\color{blue}{\sqrt{\left(a \cdot -4\right) \cdot c + 0} \cdot \sqrt{\left(a \cdot -4\right) \cdot c + 0}} + {b}^{2}}}\right)}} \]
      9. unpow272.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \left(\left(a \cdot \left(-4 \cdot c\right)\right) \cdot \frac{1}{b + \sqrt{\sqrt{\left(a \cdot -4\right) \cdot c + 0} \cdot \sqrt{\left(a \cdot -4\right) \cdot c + 0} + \color{blue}{b \cdot b}}}\right)}} \]
      10. hypot-define72.0%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \left(\left(a \cdot \left(-4 \cdot c\right)\right) \cdot \frac{1}{b + \color{blue}{\mathsf{hypot}\left(\sqrt{\left(a \cdot -4\right) \cdot c + 0}, b\right)}}\right)}} \]
      11. +-rgt-identity72.0%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \left(\left(a \cdot \left(-4 \cdot c\right)\right) \cdot \frac{1}{b + \mathsf{hypot}\left(\sqrt{\color{blue}{\left(a \cdot -4\right) \cdot c}}, b\right)}\right)}} \]
      12. associate-*l*72.0%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \left(\left(a \cdot \left(-4 \cdot c\right)\right) \cdot \frac{1}{b + \mathsf{hypot}\left(\sqrt{\color{blue}{a \cdot \left(-4 \cdot c\right)}}, b\right)}\right)}} \]
    13. Applied egg-rr72.0%

      \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \color{blue}{\left(\left(a \cdot \left(-4 \cdot c\right)\right) \cdot \frac{1}{b + \mathsf{hypot}\left(\sqrt{a \cdot \left(-4 \cdot c\right)}, b\right)}\right)}}} \]
    14. Step-by-step derivation
      1. associate-*r/72.0%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \color{blue}{\frac{\left(a \cdot \left(-4 \cdot c\right)\right) \cdot 1}{b + \mathsf{hypot}\left(\sqrt{a \cdot \left(-4 \cdot c\right)}, b\right)}}}} \]
      2. *-rgt-identity72.0%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \frac{\color{blue}{a \cdot \left(-4 \cdot c\right)}}{b + \mathsf{hypot}\left(\sqrt{a \cdot \left(-4 \cdot c\right)}, b\right)}}} \]
      3. associate-/l*76.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \color{blue}{\left(a \cdot \frac{-4 \cdot c}{b + \mathsf{hypot}\left(\sqrt{a \cdot \left(-4 \cdot c\right)}, b\right)}\right)}}} \]
      4. *-commutative76.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \left(a \cdot \frac{\color{blue}{c \cdot -4}}{b + \mathsf{hypot}\left(\sqrt{a \cdot \left(-4 \cdot c\right)}, b\right)}\right)}} \]
      5. *-commutative76.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \left(a \cdot \frac{c \cdot -4}{b + \mathsf{hypot}\left(\sqrt{\color{blue}{\left(-4 \cdot c\right) \cdot a}}, b\right)}\right)}} \]
      6. *-commutative76.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \left(a \cdot \frac{c \cdot -4}{b + \mathsf{hypot}\left(\sqrt{\color{blue}{\left(c \cdot -4\right)} \cdot a}, b\right)}\right)}} \]
      7. associate-*l*76.3%

        \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \left(a \cdot \frac{c \cdot -4}{b + \mathsf{hypot}\left(\sqrt{\color{blue}{c \cdot \left(-4 \cdot a\right)}}, b\right)}\right)}} \]
    15. Simplified76.3%

      \[\leadsto \frac{1}{\frac{a}{0.5 \cdot \color{blue}{\left(a \cdot \frac{c \cdot -4}{b + \mathsf{hypot}\left(\sqrt{c \cdot \left(-4 \cdot a\right)}, b\right)}\right)}}} \]
    16. Step-by-step derivation
      1. div-inv76.3%

        \[\leadsto \frac{1}{\color{blue}{a \cdot \frac{1}{0.5 \cdot \left(a \cdot \frac{c \cdot -4}{b + \mathsf{hypot}\left(\sqrt{c \cdot \left(-4 \cdot a\right)}, b\right)}\right)}}} \]
      2. *-commutative76.3%

        \[\leadsto \frac{1}{a \cdot \frac{1}{\color{blue}{\left(a \cdot \frac{c \cdot -4}{b + \mathsf{hypot}\left(\sqrt{c \cdot \left(-4 \cdot a\right)}, b\right)}\right) \cdot 0.5}}} \]
      3. *-commutative76.3%

        \[\leadsto \frac{1}{a \cdot \frac{1}{\left(a \cdot \frac{\color{blue}{-4 \cdot c}}{b + \mathsf{hypot}\left(\sqrt{c \cdot \left(-4 \cdot a\right)}, b\right)}\right) \cdot 0.5}} \]
      4. *-un-lft-identity76.3%

        \[\leadsto \frac{1}{a \cdot \frac{1}{\left(a \cdot \frac{-4 \cdot c}{\color{blue}{1 \cdot \left(b + \mathsf{hypot}\left(\sqrt{c \cdot \left(-4 \cdot a\right)}, b\right)\right)}}\right) \cdot 0.5}} \]
      5. times-frac76.3%

        \[\leadsto \frac{1}{a \cdot \frac{1}{\left(a \cdot \color{blue}{\left(\frac{-4}{1} \cdot \frac{c}{b + \mathsf{hypot}\left(\sqrt{c \cdot \left(-4 \cdot a\right)}, b\right)}\right)}\right) \cdot 0.5}} \]
      6. metadata-eval76.3%

        \[\leadsto \frac{1}{a \cdot \frac{1}{\left(a \cdot \left(\color{blue}{-4} \cdot \frac{c}{b + \mathsf{hypot}\left(\sqrt{c \cdot \left(-4 \cdot a\right)}, b\right)}\right)\right) \cdot 0.5}} \]
      7. associate-*r*76.3%

        \[\leadsto \frac{1}{a \cdot \frac{1}{\left(a \cdot \left(-4 \cdot \frac{c}{b + \mathsf{hypot}\left(\sqrt{\color{blue}{\left(c \cdot -4\right) \cdot a}}, b\right)}\right)\right) \cdot 0.5}} \]
    17. Applied egg-rr76.3%

      \[\leadsto \frac{1}{\color{blue}{a \cdot \frac{1}{\left(a \cdot \left(-4 \cdot \frac{c}{b + \mathsf{hypot}\left(\sqrt{\left(c \cdot -4\right) \cdot a}, b\right)}\right)\right) \cdot 0.5}}} \]
    18. Step-by-step derivation
      1. associate-*r/76.3%

        \[\leadsto \frac{1}{\color{blue}{\frac{a \cdot 1}{\left(a \cdot \left(-4 \cdot \frac{c}{b + \mathsf{hypot}\left(\sqrt{\left(c \cdot -4\right) \cdot a}, b\right)}\right)\right) \cdot 0.5}}} \]
      2. times-frac76.3%

        \[\leadsto \frac{1}{\color{blue}{\frac{a}{a \cdot \left(-4 \cdot \frac{c}{b + \mathsf{hypot}\left(\sqrt{\left(c \cdot -4\right) \cdot a}, b\right)}\right)} \cdot \frac{1}{0.5}}} \]
      3. metadata-eval76.3%

        \[\leadsto \frac{1}{\frac{a}{a \cdot \left(-4 \cdot \frac{c}{b + \mathsf{hypot}\left(\sqrt{\left(c \cdot -4\right) \cdot a}, b\right)}\right)} \cdot \color{blue}{2}} \]
      4. *-commutative76.3%

        \[\leadsto \frac{1}{\color{blue}{2 \cdot \frac{a}{a \cdot \left(-4 \cdot \frac{c}{b + \mathsf{hypot}\left(\sqrt{\left(c \cdot -4\right) \cdot a}, b\right)}\right)}}} \]
      5. associate-*r/76.3%

        \[\leadsto \frac{1}{\color{blue}{\frac{2 \cdot a}{a \cdot \left(-4 \cdot \frac{c}{b + \mathsf{hypot}\left(\sqrt{\left(c \cdot -4\right) \cdot a}, b\right)}\right)}}} \]
      6. *-commutative76.3%

        \[\leadsto \frac{1}{\frac{\color{blue}{a \cdot 2}}{a \cdot \left(-4 \cdot \frac{c}{b + \mathsf{hypot}\left(\sqrt{\left(c \cdot -4\right) \cdot a}, b\right)}\right)}} \]
      7. times-frac76.6%

        \[\leadsto \frac{1}{\color{blue}{\frac{a}{a} \cdot \frac{2}{-4 \cdot \frac{c}{b + \mathsf{hypot}\left(\sqrt{\left(c \cdot -4\right) \cdot a}, b\right)}}}} \]
      8. *-inverses76.6%

        \[\leadsto \frac{1}{\color{blue}{1} \cdot \frac{2}{-4 \cdot \frac{c}{b + \mathsf{hypot}\left(\sqrt{\left(c \cdot -4\right) \cdot a}, b\right)}}} \]
      9. associate-*r/76.6%

        \[\leadsto \frac{1}{1 \cdot \frac{2}{\color{blue}{\frac{-4 \cdot c}{b + \mathsf{hypot}\left(\sqrt{\left(c \cdot -4\right) \cdot a}, b\right)}}}} \]
      10. *-commutative76.6%

        \[\leadsto \frac{1}{1 \cdot \frac{2}{\frac{\color{blue}{c \cdot -4}}{b + \mathsf{hypot}\left(\sqrt{\left(c \cdot -4\right) \cdot a}, b\right)}}} \]
      11. *-lft-identity76.6%

        \[\leadsto \frac{1}{1 \cdot \frac{2}{\frac{c \cdot -4}{\color{blue}{1 \cdot \left(b + \mathsf{hypot}\left(\sqrt{\left(c \cdot -4\right) \cdot a}, b\right)\right)}}}} \]
      12. times-frac76.5%

        \[\leadsto \frac{1}{1 \cdot \frac{2}{\color{blue}{\frac{c}{1} \cdot \frac{-4}{b + \mathsf{hypot}\left(\sqrt{\left(c \cdot -4\right) \cdot a}, b\right)}}}} \]
      13. /-rgt-identity76.5%

        \[\leadsto \frac{1}{1 \cdot \frac{2}{\color{blue}{c} \cdot \frac{-4}{b + \mathsf{hypot}\left(\sqrt{\left(c \cdot -4\right) \cdot a}, b\right)}}} \]
      14. *-commutative76.5%

        \[\leadsto \frac{1}{1 \cdot \frac{2}{c \cdot \frac{-4}{b + \mathsf{hypot}\left(\sqrt{\color{blue}{a \cdot \left(c \cdot -4\right)}}, b\right)}}} \]
    19. Simplified76.5%

      \[\leadsto \frac{1}{\color{blue}{1 \cdot \frac{2}{c \cdot \frac{-4}{b + \mathsf{hypot}\left(\sqrt{a \cdot \left(c \cdot -4\right)}, b\right)}}}} \]
    20. Step-by-step derivation
      1. *-un-lft-identity76.5%

        \[\leadsto \frac{1}{\color{blue}{\frac{2}{c \cdot \frac{-4}{b + \mathsf{hypot}\left(\sqrt{a \cdot \left(c \cdot -4\right)}, b\right)}}}} \]
      2. clear-num76.5%

        \[\leadsto \color{blue}{\frac{c \cdot \frac{-4}{b + \mathsf{hypot}\left(\sqrt{a \cdot \left(c \cdot -4\right)}, b\right)}}{2}} \]
      3. div-inv76.5%

        \[\leadsto \color{blue}{\left(c \cdot \frac{-4}{b + \mathsf{hypot}\left(\sqrt{a \cdot \left(c \cdot -4\right)}, b\right)}\right) \cdot \frac{1}{2}} \]
      4. clear-num76.5%

        \[\leadsto \left(c \cdot \color{blue}{\frac{1}{\frac{b + \mathsf{hypot}\left(\sqrt{a \cdot \left(c \cdot -4\right)}, b\right)}{-4}}}\right) \cdot \frac{1}{2} \]
      5. un-div-inv76.6%

        \[\leadsto \color{blue}{\frac{c}{\frac{b + \mathsf{hypot}\left(\sqrt{a \cdot \left(c \cdot -4\right)}, b\right)}{-4}}} \cdot \frac{1}{2} \]
      6. div-inv76.6%

        \[\leadsto \frac{c}{\color{blue}{\left(b + \mathsf{hypot}\left(\sqrt{a \cdot \left(c \cdot -4\right)}, b\right)\right) \cdot \frac{1}{-4}}} \cdot \frac{1}{2} \]
      7. metadata-eval76.6%

        \[\leadsto \frac{c}{\left(b + \mathsf{hypot}\left(\sqrt{a \cdot \left(c \cdot -4\right)}, b\right)\right) \cdot \color{blue}{-0.25}} \cdot \frac{1}{2} \]
      8. metadata-eval76.6%

        \[\leadsto \frac{c}{\left(b + \mathsf{hypot}\left(\sqrt{a \cdot \left(c \cdot -4\right)}, b\right)\right) \cdot -0.25} \cdot \color{blue}{0.5} \]
    21. Applied egg-rr76.6%

      \[\leadsto \color{blue}{\frac{c}{\left(b + \mathsf{hypot}\left(\sqrt{a \cdot \left(c \cdot -4\right)}, b\right)\right) \cdot -0.25} \cdot 0.5} \]
    22. Step-by-step derivation
      1. *-commutative76.6%

        \[\leadsto \color{blue}{0.5 \cdot \frac{c}{\left(b + \mathsf{hypot}\left(\sqrt{a \cdot \left(c \cdot -4\right)}, b\right)\right) \cdot -0.25}} \]
      2. associate-*r/76.6%

        \[\leadsto \color{blue}{\frac{0.5 \cdot c}{\left(b + \mathsf{hypot}\left(\sqrt{a \cdot \left(c \cdot -4\right)}, b\right)\right) \cdot -0.25}} \]
      3. *-commutative76.6%

        \[\leadsto \frac{0.5 \cdot c}{\color{blue}{-0.25 \cdot \left(b + \mathsf{hypot}\left(\sqrt{a \cdot \left(c \cdot -4\right)}, b\right)\right)}} \]
      4. times-frac76.6%

        \[\leadsto \color{blue}{\frac{0.5}{-0.25} \cdot \frac{c}{b + \mathsf{hypot}\left(\sqrt{a \cdot \left(c \cdot -4\right)}, b\right)}} \]
      5. metadata-eval76.6%

        \[\leadsto \color{blue}{-2} \cdot \frac{c}{b + \mathsf{hypot}\left(\sqrt{a \cdot \left(c \cdot -4\right)}, b\right)} \]
    23. Simplified76.6%

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

    if 5.60000000000000031e-96 < b

    1. Initial program 12.3%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
    2. Step-by-step derivation
      1. *-commutative12.3%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{\color{blue}{a \cdot 2}} \]
    3. Simplified12.3%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{a \cdot 2}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around inf 90.4%

      \[\leadsto \color{blue}{-1 \cdot \frac{c}{b}} \]
    6. Step-by-step derivation
      1. associate-*r/90.4%

        \[\leadsto \color{blue}{\frac{-1 \cdot c}{b}} \]
      2. mul-1-neg90.4%

        \[\leadsto \frac{\color{blue}{-c}}{b} \]
    7. Simplified90.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2 \cdot 10^{+153}:\\ \;\;\;\;\frac{c}{b} - \frac{b}{a}\\ \mathbf{elif}\;b \leq -7.2 \cdot 10^{-153}:\\ \;\;\;\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b}{a \cdot 2}\\ \mathbf{elif}\;b \leq 5.6 \cdot 10^{-96}:\\ \;\;\;\;-2 \cdot \frac{c}{b + \mathsf{hypot}\left(\sqrt{a \cdot \left(c \cdot -4\right)}, b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{-b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 80.5% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;b \leq -7 \cdot 10^{-192}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;b \leq -2.85 \cdot 10^{-196}:\\
\;\;\;\;\frac{b}{-a}\\

\mathbf{elif}\;b \leq 9 \cdot 10^{-92}:\\
\;\;\;\;t\_0\\

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


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

    1. Initial program 61.2%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
    2. Step-by-step derivation
      1. *-commutative61.2%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{\color{blue}{a \cdot 2}} \]
    3. Simplified61.2%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{a \cdot 2}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around -inf 90.3%

      \[\leadsto \color{blue}{-1 \cdot \left(b \cdot \left(-1 \cdot \frac{c}{{b}^{2}} + \frac{1}{a}\right)\right)} \]
    6. Step-by-step derivation
      1. mul-1-neg90.3%

        \[\leadsto \color{blue}{-b \cdot \left(-1 \cdot \frac{c}{{b}^{2}} + \frac{1}{a}\right)} \]
      2. distribute-rgt-neg-in90.3%

        \[\leadsto \color{blue}{b \cdot \left(-\left(-1 \cdot \frac{c}{{b}^{2}} + \frac{1}{a}\right)\right)} \]
      3. +-commutative90.3%

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

        \[\leadsto b \cdot \left(-\left(\frac{1}{a} + \color{blue}{\left(-\frac{c}{{b}^{2}}\right)}\right)\right) \]
      5. unsub-neg90.3%

        \[\leadsto b \cdot \left(-\color{blue}{\left(\frac{1}{a} - \frac{c}{{b}^{2}}\right)}\right) \]
    7. Simplified90.3%

      \[\leadsto \color{blue}{b \cdot \left(-\left(\frac{1}{a} - \frac{c}{{b}^{2}}\right)\right)} \]
    8. Taylor expanded in a around inf 90.6%

      \[\leadsto \color{blue}{-1 \cdot \frac{b}{a} + \frac{c}{b}} \]

    if -2e-8 < b < -7.00000000000000029e-192 or -2.8500000000000001e-196 < b < 9.0000000000000001e-92

    1. Initial program 84.6%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
    2. Step-by-step derivation
      1. *-commutative84.6%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{\color{blue}{a \cdot 2}} \]
    3. Simplified84.6%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{a \cdot 2}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around 0 72.2%

      \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{-4 \cdot \left(a \cdot c\right)}}}{a \cdot 2} \]
    6. Step-by-step derivation
      1. *-commutative72.2%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{\left(a \cdot c\right) \cdot -4}}}{a \cdot 2} \]
      2. *-commutative72.2%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{\left(c \cdot a\right)} \cdot -4}}{a \cdot 2} \]
      3. associate-*r*72.3%

        \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{c \cdot \left(a \cdot -4\right)}}}{a \cdot 2} \]
    7. Simplified72.3%

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

    if -7.00000000000000029e-192 < b < -2.8500000000000001e-196

    1. Initial program 10.8%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
    2. Step-by-step derivation
      1. *-commutative10.8%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{\color{blue}{a \cdot 2}} \]
    3. Simplified10.8%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{a \cdot 2}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around -inf 51.7%

      \[\leadsto \color{blue}{-1 \cdot \frac{b}{a}} \]
    6. Step-by-step derivation
      1. mul-1-neg51.7%

        \[\leadsto \color{blue}{-\frac{b}{a}} \]
      2. distribute-neg-frac251.7%

        \[\leadsto \color{blue}{\frac{b}{-a}} \]
    7. Simplified51.7%

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

    if 9.0000000000000001e-92 < b

    1. Initial program 11.3%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
    2. Step-by-step derivation
      1. *-commutative11.3%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{\color{blue}{a \cdot 2}} \]
    3. Simplified11.3%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{a \cdot 2}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around inf 91.4%

      \[\leadsto \color{blue}{-1 \cdot \frac{c}{b}} \]
    6. Step-by-step derivation
      1. associate-*r/91.4%

        \[\leadsto \color{blue}{\frac{-1 \cdot c}{b}} \]
      2. mul-1-neg91.4%

        \[\leadsto \frac{\color{blue}{-c}}{b} \]
    7. Simplified91.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2 \cdot 10^{-8}:\\ \;\;\;\;\frac{c}{b} - \frac{b}{a}\\ \mathbf{elif}\;b \leq -7 \cdot 10^{-192}:\\ \;\;\;\;\frac{\sqrt{c \cdot \left(a \cdot -4\right)} - b}{a \cdot 2}\\ \mathbf{elif}\;b \leq -2.85 \cdot 10^{-196}:\\ \;\;\;\;\frac{b}{-a}\\ \mathbf{elif}\;b \leq 9 \cdot 10^{-92}:\\ \;\;\;\;\frac{\sqrt{c \cdot \left(a \cdot -4\right)} - b}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{-b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 80.5% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;b \leq -7 \cdot 10^{-192}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;b \leq -2.85 \cdot 10^{-196}:\\
\;\;\;\;\frac{b}{-a}\\

\mathbf{elif}\;b \leq 2.1 \cdot 10^{-91}:\\
\;\;\;\;t\_0\\

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


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

    1. Initial program 61.2%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
    2. Step-by-step derivation
      1. *-commutative61.2%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{\color{blue}{a \cdot 2}} \]
    3. Simplified61.2%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{a \cdot 2}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around -inf 90.3%

      \[\leadsto \color{blue}{-1 \cdot \left(b \cdot \left(-1 \cdot \frac{c}{{b}^{2}} + \frac{1}{a}\right)\right)} \]
    6. Step-by-step derivation
      1. mul-1-neg90.3%

        \[\leadsto \color{blue}{-b \cdot \left(-1 \cdot \frac{c}{{b}^{2}} + \frac{1}{a}\right)} \]
      2. distribute-rgt-neg-in90.3%

        \[\leadsto \color{blue}{b \cdot \left(-\left(-1 \cdot \frac{c}{{b}^{2}} + \frac{1}{a}\right)\right)} \]
      3. +-commutative90.3%

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

        \[\leadsto b \cdot \left(-\left(\frac{1}{a} + \color{blue}{\left(-\frac{c}{{b}^{2}}\right)}\right)\right) \]
      5. unsub-neg90.3%

        \[\leadsto b \cdot \left(-\color{blue}{\left(\frac{1}{a} - \frac{c}{{b}^{2}}\right)}\right) \]
    7. Simplified90.3%

      \[\leadsto \color{blue}{b \cdot \left(-\left(\frac{1}{a} - \frac{c}{{b}^{2}}\right)\right)} \]
    8. Taylor expanded in a around inf 90.6%

      \[\leadsto \color{blue}{-1 \cdot \frac{b}{a} + \frac{c}{b}} \]

    if -1.32000000000000007e-8 < b < -7.00000000000000029e-192 or -2.8500000000000001e-196 < b < 2.0999999999999999e-91

    1. Initial program 84.6%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
    2. Step-by-step derivation
      1. *-commutative84.6%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{\color{blue}{a \cdot 2}} \]
    3. Simplified84.6%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{a \cdot 2}} \]
    4. Add Preprocessing
    5. Applied egg-rr84.4%

      \[\leadsto \color{blue}{\sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)} \cdot \frac{0.5}{a} + \left(-b \cdot \frac{0.5}{a}\right)} \]
    6. Step-by-step derivation
      1. sub-neg84.4%

        \[\leadsto \color{blue}{\sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)} \cdot \frac{0.5}{a} - b \cdot \frac{0.5}{a}} \]
      2. distribute-rgt-out--84.4%

        \[\leadsto \color{blue}{\frac{0.5}{a} \cdot \left(\sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)} - b\right)} \]
    7. Simplified84.4%

      \[\leadsto \color{blue}{\frac{0.5}{a} \cdot \left(\sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)} - b\right)} \]
    8. Taylor expanded in a around inf 72.0%

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

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

    if -7.00000000000000029e-192 < b < -2.8500000000000001e-196

    1. Initial program 10.8%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
    2. Step-by-step derivation
      1. *-commutative10.8%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{\color{blue}{a \cdot 2}} \]
    3. Simplified10.8%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{a \cdot 2}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around -inf 51.7%

      \[\leadsto \color{blue}{-1 \cdot \frac{b}{a}} \]
    6. Step-by-step derivation
      1. mul-1-neg51.7%

        \[\leadsto \color{blue}{-\frac{b}{a}} \]
      2. distribute-neg-frac251.7%

        \[\leadsto \color{blue}{\frac{b}{-a}} \]
    7. Simplified51.7%

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

    if 2.0999999999999999e-91 < b

    1. Initial program 11.3%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
    2. Step-by-step derivation
      1. *-commutative11.3%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{\color{blue}{a \cdot 2}} \]
    3. Simplified11.3%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{a \cdot 2}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around inf 91.4%

      \[\leadsto \color{blue}{-1 \cdot \frac{c}{b}} \]
    6. Step-by-step derivation
      1. associate-*r/91.4%

        \[\leadsto \color{blue}{\frac{-1 \cdot c}{b}} \]
      2. mul-1-neg91.4%

        \[\leadsto \frac{\color{blue}{-c}}{b} \]
    7. Simplified91.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.32 \cdot 10^{-8}:\\ \;\;\;\;\frac{c}{b} - \frac{b}{a}\\ \mathbf{elif}\;b \leq -7 \cdot 10^{-192}:\\ \;\;\;\;\frac{0.5}{a} \cdot \left(\sqrt{a \cdot \left(c \cdot -4\right)} - b\right)\\ \mathbf{elif}\;b \leq -2.85 \cdot 10^{-196}:\\ \;\;\;\;\frac{b}{-a}\\ \mathbf{elif}\;b \leq 2.1 \cdot 10^{-91}:\\ \;\;\;\;\frac{0.5}{a} \cdot \left(\sqrt{a \cdot \left(c \cdot -4\right)} - b\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{-b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 84.9% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -8.8 \cdot 10^{+173}:\\
\;\;\;\;\frac{c}{b} - \frac{b}{a}\\

\mathbf{elif}\;b \leq 2.4 \cdot 10^{-91}:\\
\;\;\;\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b}{a \cdot 2}\\

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


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

    1. Initial program 42.8%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
    2. Step-by-step derivation
      1. *-commutative42.8%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{\color{blue}{a \cdot 2}} \]
    3. Simplified42.8%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{a \cdot 2}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around -inf 97.6%

      \[\leadsto \color{blue}{-1 \cdot \left(b \cdot \left(-1 \cdot \frac{c}{{b}^{2}} + \frac{1}{a}\right)\right)} \]
    6. Step-by-step derivation
      1. mul-1-neg97.6%

        \[\leadsto \color{blue}{-b \cdot \left(-1 \cdot \frac{c}{{b}^{2}} + \frac{1}{a}\right)} \]
      2. distribute-rgt-neg-in97.6%

        \[\leadsto \color{blue}{b \cdot \left(-\left(-1 \cdot \frac{c}{{b}^{2}} + \frac{1}{a}\right)\right)} \]
      3. +-commutative97.6%

        \[\leadsto b \cdot \left(-\color{blue}{\left(\frac{1}{a} + -1 \cdot \frac{c}{{b}^{2}}\right)}\right) \]
      4. mul-1-neg97.6%

        \[\leadsto b \cdot \left(-\left(\frac{1}{a} + \color{blue}{\left(-\frac{c}{{b}^{2}}\right)}\right)\right) \]
      5. unsub-neg97.6%

        \[\leadsto b \cdot \left(-\color{blue}{\left(\frac{1}{a} - \frac{c}{{b}^{2}}\right)}\right) \]
    7. Simplified97.6%

      \[\leadsto \color{blue}{b \cdot \left(-\left(\frac{1}{a} - \frac{c}{{b}^{2}}\right)\right)} \]
    8. Taylor expanded in a around inf 98.0%

      \[\leadsto \color{blue}{-1 \cdot \frac{b}{a} + \frac{c}{b}} \]

    if -8.7999999999999999e173 < b < 2.40000000000000011e-91

    1. Initial program 82.7%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
    2. Add Preprocessing

    if 2.40000000000000011e-91 < b

    1. Initial program 11.3%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
    2. Step-by-step derivation
      1. *-commutative11.3%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{\color{blue}{a \cdot 2}} \]
    3. Simplified11.3%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{a \cdot 2}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around inf 91.4%

      \[\leadsto \color{blue}{-1 \cdot \frac{c}{b}} \]
    6. Step-by-step derivation
      1. associate-*r/91.4%

        \[\leadsto \color{blue}{\frac{-1 \cdot c}{b}} \]
      2. mul-1-neg91.4%

        \[\leadsto \frac{\color{blue}{-c}}{b} \]
    7. Simplified91.4%

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

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

Alternative 7: 67.3% accurate, 9.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -7.2 \cdot 10^{-153}:\\
\;\;\;\;\frac{c}{b} - \frac{b}{a}\\

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


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

    1. Initial program 71.2%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
    2. Step-by-step derivation
      1. *-commutative71.2%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{\color{blue}{a \cdot 2}} \]
    3. Simplified71.2%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{a \cdot 2}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around -inf 74.6%

      \[\leadsto \color{blue}{-1 \cdot \left(b \cdot \left(-1 \cdot \frac{c}{{b}^{2}} + \frac{1}{a}\right)\right)} \]
    6. Step-by-step derivation
      1. mul-1-neg74.6%

        \[\leadsto \color{blue}{-b \cdot \left(-1 \cdot \frac{c}{{b}^{2}} + \frac{1}{a}\right)} \]
      2. distribute-rgt-neg-in74.6%

        \[\leadsto \color{blue}{b \cdot \left(-\left(-1 \cdot \frac{c}{{b}^{2}} + \frac{1}{a}\right)\right)} \]
      3. +-commutative74.6%

        \[\leadsto b \cdot \left(-\color{blue}{\left(\frac{1}{a} + -1 \cdot \frac{c}{{b}^{2}}\right)}\right) \]
      4. mul-1-neg74.6%

        \[\leadsto b \cdot \left(-\left(\frac{1}{a} + \color{blue}{\left(-\frac{c}{{b}^{2}}\right)}\right)\right) \]
      5. unsub-neg74.6%

        \[\leadsto b \cdot \left(-\color{blue}{\left(\frac{1}{a} - \frac{c}{{b}^{2}}\right)}\right) \]
    7. Simplified74.6%

      \[\leadsto \color{blue}{b \cdot \left(-\left(\frac{1}{a} - \frac{c}{{b}^{2}}\right)\right)} \]
    8. Taylor expanded in a around inf 75.0%

      \[\leadsto \color{blue}{-1 \cdot \frac{b}{a} + \frac{c}{b}} \]

    if -7.1999999999999995e-153 < b

    1. Initial program 36.1%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
    2. Step-by-step derivation
      1. *-commutative36.1%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{\color{blue}{a \cdot 2}} \]
    3. Simplified36.1%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{a \cdot 2}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around inf 58.7%

      \[\leadsto \color{blue}{-1 \cdot \frac{c}{b}} \]
    6. Step-by-step derivation
      1. associate-*r/58.7%

        \[\leadsto \color{blue}{\frac{-1 \cdot c}{b}} \]
      2. mul-1-neg58.7%

        \[\leadsto \frac{\color{blue}{-c}}{b} \]
    7. Simplified58.7%

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

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

Alternative 8: 68.0% accurate, 12.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -6.8 \cdot 10^{-232}:\\
\;\;\;\;\frac{b}{-a}\\

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


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

    1. Initial program 70.7%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
    2. Step-by-step derivation
      1. *-commutative70.7%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{\color{blue}{a \cdot 2}} \]
    3. Simplified70.7%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{a \cdot 2}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around -inf 66.7%

      \[\leadsto \color{blue}{-1 \cdot \frac{b}{a}} \]
    6. Step-by-step derivation
      1. mul-1-neg66.7%

        \[\leadsto \color{blue}{-\frac{b}{a}} \]
      2. distribute-neg-frac266.7%

        \[\leadsto \color{blue}{\frac{b}{-a}} \]
    7. Simplified66.7%

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

    if -6.8000000000000004e-232 < b

    1. Initial program 31.4%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
    2. Step-by-step derivation
      1. *-commutative31.4%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{\color{blue}{a \cdot 2}} \]
    3. Simplified31.4%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{a \cdot 2}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around inf 67.1%

      \[\leadsto \color{blue}{-1 \cdot \frac{c}{b}} \]
    6. Step-by-step derivation
      1. associate-*r/67.1%

        \[\leadsto \color{blue}{\frac{-1 \cdot c}{b}} \]
      2. mul-1-neg67.1%

        \[\leadsto \frac{\color{blue}{-c}}{b} \]
    7. Simplified67.1%

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

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

Alternative 9: 43.2% accurate, 12.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -4.2 \cdot 10^{-199}:\\
\;\;\;\;\frac{b}{-a}\\

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


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

    1. Initial program 69.8%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
    2. Step-by-step derivation
      1. *-commutative69.8%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{\color{blue}{a \cdot 2}} \]
    3. Simplified69.8%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{a \cdot 2}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around -inf 69.3%

      \[\leadsto \color{blue}{-1 \cdot \frac{b}{a}} \]
    6. Step-by-step derivation
      1. mul-1-neg69.3%

        \[\leadsto \color{blue}{-\frac{b}{a}} \]
      2. distribute-neg-frac269.3%

        \[\leadsto \color{blue}{\frac{b}{-a}} \]
    7. Simplified69.3%

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

    if -4.20000000000000004e-199 < b

    1. Initial program 34.5%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
    2. Step-by-step derivation
      1. *-commutative34.5%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{\color{blue}{a \cdot 2}} \]
    3. Simplified34.5%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{a \cdot 2}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around -inf 2.3%

      \[\leadsto \color{blue}{-1 \cdot \left(b \cdot \left(-1 \cdot \frac{c}{{b}^{2}} + \frac{1}{a}\right)\right)} \]
    6. Step-by-step derivation
      1. mul-1-neg2.3%

        \[\leadsto \color{blue}{-b \cdot \left(-1 \cdot \frac{c}{{b}^{2}} + \frac{1}{a}\right)} \]
      2. distribute-rgt-neg-in2.3%

        \[\leadsto \color{blue}{b \cdot \left(-\left(-1 \cdot \frac{c}{{b}^{2}} + \frac{1}{a}\right)\right)} \]
      3. +-commutative2.3%

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

        \[\leadsto b \cdot \left(-\left(\frac{1}{a} + \color{blue}{\left(-\frac{c}{{b}^{2}}\right)}\right)\right) \]
      5. unsub-neg2.3%

        \[\leadsto b \cdot \left(-\color{blue}{\left(\frac{1}{a} - \frac{c}{{b}^{2}}\right)}\right) \]
    7. Simplified2.3%

      \[\leadsto \color{blue}{b \cdot \left(-\left(\frac{1}{a} - \frac{c}{{b}^{2}}\right)\right)} \]
    8. Taylor expanded in b around 0 14.2%

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

Alternative 10: 10.8% accurate, 38.7× speedup?

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

\\
\frac{c}{b}
\end{array}
Derivation
  1. Initial program 52.0%

    \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
  2. Step-by-step derivation
    1. *-commutative52.0%

      \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{\color{blue}{a \cdot 2}} \]
  3. Simplified52.0%

    \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{a \cdot 2}} \]
  4. Add Preprocessing
  5. Taylor expanded in b around -inf 35.5%

    \[\leadsto \color{blue}{-1 \cdot \left(b \cdot \left(-1 \cdot \frac{c}{{b}^{2}} + \frac{1}{a}\right)\right)} \]
  6. Step-by-step derivation
    1. mul-1-neg35.5%

      \[\leadsto \color{blue}{-b \cdot \left(-1 \cdot \frac{c}{{b}^{2}} + \frac{1}{a}\right)} \]
    2. distribute-rgt-neg-in35.5%

      \[\leadsto \color{blue}{b \cdot \left(-\left(-1 \cdot \frac{c}{{b}^{2}} + \frac{1}{a}\right)\right)} \]
    3. +-commutative35.5%

      \[\leadsto b \cdot \left(-\color{blue}{\left(\frac{1}{a} + -1 \cdot \frac{c}{{b}^{2}}\right)}\right) \]
    4. mul-1-neg35.5%

      \[\leadsto b \cdot \left(-\left(\frac{1}{a} + \color{blue}{\left(-\frac{c}{{b}^{2}}\right)}\right)\right) \]
    5. unsub-neg35.5%

      \[\leadsto b \cdot \left(-\color{blue}{\left(\frac{1}{a} - \frac{c}{{b}^{2}}\right)}\right) \]
  7. Simplified35.5%

    \[\leadsto \color{blue}{b \cdot \left(-\left(\frac{1}{a} - \frac{c}{{b}^{2}}\right)\right)} \]
  8. Taylor expanded in b around 0 9.2%

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

Alternative 11: 5.2% accurate, 38.7× speedup?

\[\begin{array}{l} \\ c \cdot -0.5 \end{array} \]
(FPCore (a b c) :precision binary64 (* c -0.5))
double code(double a, double b, double c) {
	return c * -0.5;
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    code = c * (-0.5d0)
end function
public static double code(double a, double b, double c) {
	return c * -0.5;
}
def code(a, b, c):
	return c * -0.5
function code(a, b, c)
	return Float64(c * -0.5)
end
function tmp = code(a, b, c)
	tmp = c * -0.5;
end
code[a_, b_, c_] := N[(c * -0.5), $MachinePrecision]
\begin{array}{l}

\\
c \cdot -0.5
\end{array}
Derivation
  1. Initial program 52.0%

    \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
  2. Step-by-step derivation
    1. *-commutative52.0%

      \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{\color{blue}{a \cdot 2}} \]
  3. Simplified52.0%

    \[\leadsto \color{blue}{\frac{\sqrt{\mathsf{fma}\left(a, c \cdot -4, b \cdot b\right)} - b}{a \cdot 2}} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. *-un-lft-identity52.0%

      \[\leadsto \frac{\color{blue}{1 \cdot \sqrt{\mathsf{fma}\left(a, c \cdot -4, b \cdot b\right)}} - b}{a \cdot 2} \]
    2. *-un-lft-identity52.0%

      \[\leadsto \frac{1 \cdot \sqrt{\mathsf{fma}\left(a, c \cdot -4, b \cdot b\right)} - \color{blue}{1 \cdot b}}{a \cdot 2} \]
    3. prod-diff52.0%

      \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(1, \sqrt{\mathsf{fma}\left(a, c \cdot -4, b \cdot b\right)}, -b \cdot 1\right) + \mathsf{fma}\left(-b, 1, b \cdot 1\right)}}{a \cdot 2} \]
    4. *-commutative52.0%

      \[\leadsto \frac{\mathsf{fma}\left(1, \sqrt{\mathsf{fma}\left(a, c \cdot -4, b \cdot b\right)}, -\color{blue}{1 \cdot b}\right) + \mathsf{fma}\left(-b, 1, b \cdot 1\right)}{a \cdot 2} \]
    5. *-un-lft-identity52.0%

      \[\leadsto \frac{\mathsf{fma}\left(1, \sqrt{\mathsf{fma}\left(a, c \cdot -4, b \cdot b\right)}, -\color{blue}{b}\right) + \mathsf{fma}\left(-b, 1, b \cdot 1\right)}{a \cdot 2} \]
    6. fma-define52.0%

      \[\leadsto \frac{\color{blue}{\left(1 \cdot \sqrt{\mathsf{fma}\left(a, c \cdot -4, b \cdot b\right)} + \left(-b\right)\right)} + \mathsf{fma}\left(-b, 1, b \cdot 1\right)}{a \cdot 2} \]
    7. *-un-lft-identity52.0%

      \[\leadsto \frac{\left(\color{blue}{\sqrt{\mathsf{fma}\left(a, c \cdot -4, b \cdot b\right)}} + \left(-b\right)\right) + \mathsf{fma}\left(-b, 1, b \cdot 1\right)}{a \cdot 2} \]
    8. +-commutative52.0%

      \[\leadsto \frac{\color{blue}{\left(\left(-b\right) + \sqrt{\mathsf{fma}\left(a, c \cdot -4, b \cdot b\right)}\right)} + \mathsf{fma}\left(-b, 1, b \cdot 1\right)}{a \cdot 2} \]
    9. add-sqr-sqrt39.7%

      \[\leadsto \frac{\left(\color{blue}{\sqrt{-b} \cdot \sqrt{-b}} + \sqrt{\mathsf{fma}\left(a, c \cdot -4, b \cdot b\right)}\right) + \mathsf{fma}\left(-b, 1, b \cdot 1\right)}{a \cdot 2} \]
    10. sqrt-unprod50.1%

      \[\leadsto \frac{\left(\color{blue}{\sqrt{\left(-b\right) \cdot \left(-b\right)}} + \sqrt{\mathsf{fma}\left(a, c \cdot -4, b \cdot b\right)}\right) + \mathsf{fma}\left(-b, 1, b \cdot 1\right)}{a \cdot 2} \]
    11. sqr-neg50.1%

      \[\leadsto \frac{\left(\sqrt{\color{blue}{b \cdot b}} + \sqrt{\mathsf{fma}\left(a, c \cdot -4, b \cdot b\right)}\right) + \mathsf{fma}\left(-b, 1, b \cdot 1\right)}{a \cdot 2} \]
    12. sqrt-prod10.6%

      \[\leadsto \frac{\left(\color{blue}{\sqrt{b} \cdot \sqrt{b}} + \sqrt{\mathsf{fma}\left(a, c \cdot -4, b \cdot b\right)}\right) + \mathsf{fma}\left(-b, 1, b \cdot 1\right)}{a \cdot 2} \]
    13. add-sqr-sqrt35.0%

      \[\leadsto \frac{\left(\color{blue}{b} + \sqrt{\mathsf{fma}\left(a, c \cdot -4, b \cdot b\right)}\right) + \mathsf{fma}\left(-b, 1, b \cdot 1\right)}{a \cdot 2} \]
    14. pow235.0%

      \[\leadsto \frac{\left(b + \sqrt{\mathsf{fma}\left(a, c \cdot -4, \color{blue}{{b}^{2}}\right)}\right) + \mathsf{fma}\left(-b, 1, b \cdot 1\right)}{a \cdot 2} \]
    15. add-sqr-sqrt24.6%

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

      \[\leadsto \frac{\left(b + \sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)}\right) + \mathsf{fma}\left(\color{blue}{\sqrt{\left(-b\right) \cdot \left(-b\right)}}, 1, b \cdot 1\right)}{a \cdot 2} \]
    17. sqr-neg35.0%

      \[\leadsto \frac{\left(b + \sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)}\right) + \mathsf{fma}\left(\sqrt{\color{blue}{b \cdot b}}, 1, b \cdot 1\right)}{a \cdot 2} \]
    18. sqrt-prod10.6%

      \[\leadsto \frac{\left(b + \sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)}\right) + \mathsf{fma}\left(\color{blue}{\sqrt{b} \cdot \sqrt{b}}, 1, b \cdot 1\right)}{a \cdot 2} \]
    19. add-sqr-sqrt34.2%

      \[\leadsto \frac{\left(b + \sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)}\right) + \mathsf{fma}\left(\color{blue}{b}, 1, b \cdot 1\right)}{a \cdot 2} \]
    20. *-commutative34.2%

      \[\leadsto \frac{\left(b + \sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)}\right) + \mathsf{fma}\left(b, 1, \color{blue}{1 \cdot b}\right)}{a \cdot 2} \]
    21. *-un-lft-identity34.2%

      \[\leadsto \frac{\left(b + \sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)}\right) + \mathsf{fma}\left(b, 1, \color{blue}{b}\right)}{a \cdot 2} \]
  6. Applied egg-rr34.2%

    \[\leadsto \frac{\color{blue}{\left(b + \sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)}\right) + \mathsf{fma}\left(b, 1, b\right)}}{a \cdot 2} \]
  7. Step-by-step derivation
    1. +-commutative34.2%

      \[\leadsto \frac{\color{blue}{\left(\sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)} + b\right)} + \mathsf{fma}\left(b, 1, b\right)}{a \cdot 2} \]
    2. associate-+l+34.2%

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

      \[\leadsto \frac{\sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)} + \left(b + \color{blue}{\left(b \cdot 1 + b\right)}\right)}{a \cdot 2} \]
    4. *-rgt-identity34.2%

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

    \[\leadsto \frac{\color{blue}{\sqrt{\mathsf{fma}\left(a, c \cdot -4, {b}^{2}\right)} + \left(b + \left(b + b\right)\right)}}{a \cdot 2} \]
  9. Taylor expanded in b around inf 1.8%

    \[\leadsto \frac{\color{blue}{b \cdot \left(4 + -2 \cdot \frac{a \cdot c}{{b}^{2}}\right)}}{a \cdot 2} \]
  10. Simplified3.1%

    \[\leadsto \frac{\color{blue}{b \cdot \left(4 + \frac{a \cdot \left(-c\right)}{b}\right)}}{a \cdot 2} \]
  11. Taylor expanded in b around 0 4.9%

    \[\leadsto \color{blue}{-0.5 \cdot c} \]
  12. Step-by-step derivation
    1. *-commutative4.9%

      \[\leadsto \color{blue}{c \cdot -0.5} \]
  13. Simplified4.9%

    \[\leadsto \color{blue}{c \cdot -0.5} \]
  14. Add Preprocessing

Reproduce

?
herbie shell --seed 2024107 
(FPCore (a b c)
  :name "Quadratic roots, full range"
  :precision binary64
  (/ (+ (- b) (sqrt (- (* b b) (* (* 4.0 a) c)))) (* 2.0 a)))