Quadratic roots, narrow range

Percentage Accurate: 55.6% → 91.8%
Time: 14.7s
Alternatives: 9
Speedup: 29.0×

Specification

?
\[\left(\left(1.0536712127723509 \cdot 10^{-8} < a \land a < 94906265.62425156\right) \land \left(1.0536712127723509 \cdot 10^{-8} < b \land b < 94906265.62425156\right)\right) \land \left(1.0536712127723509 \cdot 10^{-8} < c \land c < 94906265.62425156\right)\]
\[\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 9 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: 55.6% 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: 91.8% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \mathsf{fma}\left(-4, a, \frac{{b}^{2}}{c}\right)\\ t_1 := -{b}^{2}\\ \mathbf{if}\;\frac{\sqrt{b \cdot b - c \cdot \left(4 \cdot a\right)} - b}{a \cdot 2} \leq -0.6:\\ \;\;\;\;\frac{\frac{\mathsf{fma}\left(c, t\_0, t\_1\right)}{\mathsf{fma}\left(\sqrt{c}, \sqrt{t\_0}, b\right)}}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(-2, {a}^{2} \cdot \frac{{c}^{3}}{{b}^{4}}, \mathsf{fma}\left(-0.25, \frac{{a}^{4} \cdot {c}^{4}}{a} \cdot \frac{20}{{b}^{6}}, a \cdot \frac{{c}^{2}}{t\_1}\right) - c\right)}{b}\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (let* ((t_0 (fma -4.0 a (/ (pow b 2.0) c))) (t_1 (- (pow b 2.0))))
   (if (<= (/ (- (sqrt (- (* b b) (* c (* 4.0 a)))) b) (* a 2.0)) -0.6)
     (/ (/ (fma c t_0 t_1) (fma (sqrt c) (sqrt t_0) b)) (* a 2.0))
     (/
      (fma
       -2.0
       (* (pow a 2.0) (/ (pow c 3.0) (pow b 4.0)))
       (-
        (fma
         -0.25
         (* (/ (* (pow a 4.0) (pow c 4.0)) a) (/ 20.0 (pow b 6.0)))
         (* a (/ (pow c 2.0) t_1)))
        c))
      b))))
double code(double a, double b, double c) {
	double t_0 = fma(-4.0, a, (pow(b, 2.0) / c));
	double t_1 = -pow(b, 2.0);
	double tmp;
	if (((sqrt(((b * b) - (c * (4.0 * a)))) - b) / (a * 2.0)) <= -0.6) {
		tmp = (fma(c, t_0, t_1) / fma(sqrt(c), sqrt(t_0), b)) / (a * 2.0);
	} else {
		tmp = fma(-2.0, (pow(a, 2.0) * (pow(c, 3.0) / pow(b, 4.0))), (fma(-0.25, (((pow(a, 4.0) * pow(c, 4.0)) / a) * (20.0 / pow(b, 6.0))), (a * (pow(c, 2.0) / t_1))) - c)) / b;
	}
	return tmp;
}
function code(a, b, c)
	t_0 = fma(-4.0, a, Float64((b ^ 2.0) / c))
	t_1 = Float64(-(b ^ 2.0))
	tmp = 0.0
	if (Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(c * Float64(4.0 * a)))) - b) / Float64(a * 2.0)) <= -0.6)
		tmp = Float64(Float64(fma(c, t_0, t_1) / fma(sqrt(c), sqrt(t_0), b)) / Float64(a * 2.0));
	else
		tmp = Float64(fma(-2.0, Float64((a ^ 2.0) * Float64((c ^ 3.0) / (b ^ 4.0))), Float64(fma(-0.25, Float64(Float64(Float64((a ^ 4.0) * (c ^ 4.0)) / a) * Float64(20.0 / (b ^ 6.0))), Float64(a * Float64((c ^ 2.0) / t_1))) - c)) / b);
	end
	return tmp
end
code[a_, b_, c_] := Block[{t$95$0 = N[(-4.0 * a + N[(N[Power[b, 2.0], $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = (-N[Power[b, 2.0], $MachinePrecision])}, If[LessEqual[N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(c * N[(4.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision], -0.6], N[(N[(N[(c * t$95$0 + t$95$1), $MachinePrecision] / N[(N[Sqrt[c], $MachinePrecision] * N[Sqrt[t$95$0], $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(-2.0 * N[(N[Power[a, 2.0], $MachinePrecision] * N[(N[Power[c, 3.0], $MachinePrecision] / N[Power[b, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(-0.25 * N[(N[(N[(N[Power[a, 4.0], $MachinePrecision] * N[Power[c, 4.0], $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision] * N[(20.0 / N[Power[b, 6.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[Power[c, 2.0], $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - c), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]]]]
\begin{array}{l}

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

\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(-2, {a}^{2} \cdot \frac{{c}^{3}}{{b}^{4}}, \mathsf{fma}\left(-0.25, \frac{{a}^{4} \cdot {c}^{4}}{a} \cdot \frac{20}{{b}^{6}}, a \cdot \frac{{c}^{2}}{t\_1}\right) - c\right)}{b}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 #s(literal 4 binary64) a) c)))) (*.f64 #s(literal 2 binary64) a)) < -0.599999999999999978

    1. Initial program 84.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. *-commutative84.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -0.599999999999999978 < (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 #s(literal 4 binary64) a) c)))) (*.f64 #s(literal 2 binary64) a))

    1. Initial program 48.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. *-commutative48.2%

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

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

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

        \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(-2, {a}^{2} \cdot \frac{{c}^{3}}{{b}^{4}}, \mathsf{fma}\left(-0.25, \frac{{a}^{4} \cdot {c}^{4}}{a} \cdot \frac{20}{{b}^{6}}, \left(-a\right) \cdot \frac{{c}^{2}}{{b}^{2}}\right) - c\right)}{b}} \]
    7. Recombined 2 regimes into one program.
    8. Final simplification93.1%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\sqrt{b \cdot b - c \cdot \left(4 \cdot a\right)} - b}{a \cdot 2} \leq -0.6:\\ \;\;\;\;\frac{\frac{\mathsf{fma}\left(c, \mathsf{fma}\left(-4, a, \frac{{b}^{2}}{c}\right), -{b}^{2}\right)}{\mathsf{fma}\left(\sqrt{c}, \sqrt{\mathsf{fma}\left(-4, a, \frac{{b}^{2}}{c}\right)}, b\right)}}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(-2, {a}^{2} \cdot \frac{{c}^{3}}{{b}^{4}}, \mathsf{fma}\left(-0.25, \frac{{a}^{4} \cdot {c}^{4}}{a} \cdot \frac{20}{{b}^{6}}, a \cdot \frac{{c}^{2}}{-{b}^{2}}\right) - c\right)}{b}\\ \end{array} \]
    9. Add Preprocessing

    Alternative 2: 91.8% accurate, 0.1× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \mathsf{fma}\left(-4, a, \frac{{b}^{2}}{c}\right)\\ \mathbf{if}\;\frac{\sqrt{b \cdot b - c \cdot \left(4 \cdot a\right)} - b}{a \cdot 2} \leq -0.6:\\ \;\;\;\;\frac{\frac{\mathsf{fma}\left(c, t\_0, -{b}^{2}\right)}{\mathsf{fma}\left(\sqrt{c}, \sqrt{t\_0}, b\right)}}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{a \cdot \left(a \cdot \left(-5 \cdot \frac{a \cdot {c}^{4}}{{b}^{6}} + -2 \cdot \frac{{c}^{3}}{{b}^{4}}\right) - \frac{c}{b} \cdot \frac{c}{b}\right) - c}{b}\\ \end{array} \end{array} \]
    (FPCore (a b c)
     :precision binary64
     (let* ((t_0 (fma -4.0 a (/ (pow b 2.0) c))))
       (if (<= (/ (- (sqrt (- (* b b) (* c (* 4.0 a)))) b) (* a 2.0)) -0.6)
         (/ (/ (fma c t_0 (- (pow b 2.0))) (fma (sqrt c) (sqrt t_0) b)) (* a 2.0))
         (/
          (-
           (*
            a
            (-
             (*
              a
              (+
               (* -5.0 (/ (* a (pow c 4.0)) (pow b 6.0)))
               (* -2.0 (/ (pow c 3.0) (pow b 4.0)))))
             (* (/ c b) (/ c b))))
           c)
          b))))
    double code(double a, double b, double c) {
    	double t_0 = fma(-4.0, a, (pow(b, 2.0) / c));
    	double tmp;
    	if (((sqrt(((b * b) - (c * (4.0 * a)))) - b) / (a * 2.0)) <= -0.6) {
    		tmp = (fma(c, t_0, -pow(b, 2.0)) / fma(sqrt(c), sqrt(t_0), b)) / (a * 2.0);
    	} else {
    		tmp = ((a * ((a * ((-5.0 * ((a * pow(c, 4.0)) / pow(b, 6.0))) + (-2.0 * (pow(c, 3.0) / pow(b, 4.0))))) - ((c / b) * (c / b)))) - c) / b;
    	}
    	return tmp;
    }
    
    function code(a, b, c)
    	t_0 = fma(-4.0, a, Float64((b ^ 2.0) / c))
    	tmp = 0.0
    	if (Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(c * Float64(4.0 * a)))) - b) / Float64(a * 2.0)) <= -0.6)
    		tmp = Float64(Float64(fma(c, t_0, Float64(-(b ^ 2.0))) / fma(sqrt(c), sqrt(t_0), b)) / Float64(a * 2.0));
    	else
    		tmp = Float64(Float64(Float64(a * Float64(Float64(a * Float64(Float64(-5.0 * Float64(Float64(a * (c ^ 4.0)) / (b ^ 6.0))) + Float64(-2.0 * Float64((c ^ 3.0) / (b ^ 4.0))))) - Float64(Float64(c / b) * Float64(c / b)))) - c) / b);
    	end
    	return tmp
    end
    
    code[a_, b_, c_] := Block[{t$95$0 = N[(-4.0 * a + N[(N[Power[b, 2.0], $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(c * N[(4.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision], -0.6], N[(N[(N[(c * t$95$0 + (-N[Power[b, 2.0], $MachinePrecision])), $MachinePrecision] / N[(N[Sqrt[c], $MachinePrecision] * N[Sqrt[t$95$0], $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(a * N[(N[(a * N[(N[(-5.0 * N[(N[(a * N[Power[c, 4.0], $MachinePrecision]), $MachinePrecision] / N[Power[b, 6.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-2.0 * N[(N[Power[c, 3.0], $MachinePrecision] / N[Power[b, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(c / b), $MachinePrecision] * N[(c / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - c), $MachinePrecision] / b), $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := \mathsf{fma}\left(-4, a, \frac{{b}^{2}}{c}\right)\\
    \mathbf{if}\;\frac{\sqrt{b \cdot b - c \cdot \left(4 \cdot a\right)} - b}{a \cdot 2} \leq -0.6:\\
    \;\;\;\;\frac{\frac{\mathsf{fma}\left(c, t\_0, -{b}^{2}\right)}{\mathsf{fma}\left(\sqrt{c}, \sqrt{t\_0}, b\right)}}{a \cdot 2}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{a \cdot \left(a \cdot \left(-5 \cdot \frac{a \cdot {c}^{4}}{{b}^{6}} + -2 \cdot \frac{{c}^{3}}{{b}^{4}}\right) - \frac{c}{b} \cdot \frac{c}{b}\right) - c}{b}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 #s(literal 4 binary64) a) c)))) (*.f64 #s(literal 2 binary64) a)) < -0.599999999999999978

      1. Initial program 84.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. *-commutative84.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -0.599999999999999978 < (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 #s(literal 4 binary64) a) c)))) (*.f64 #s(literal 2 binary64) a))

      1. Initial program 48.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. *-commutative48.2%

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

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

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

          \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(-2, {a}^{2} \cdot \frac{{c}^{3}}{{b}^{4}}, \mathsf{fma}\left(-0.25, \frac{{a}^{4} \cdot {c}^{4}}{a} \cdot \frac{20}{{b}^{6}}, \left(-a\right) \cdot \frac{{c}^{2}}{{b}^{2}}\right) - c\right)}{b}} \]
        2. Taylor expanded in a around 0 94.7%

          \[\leadsto \frac{\color{blue}{a \cdot \left(-1 \cdot \frac{{c}^{2}}{{b}^{2}} + a \cdot \left(-5 \cdot \frac{a \cdot {c}^{4}}{{b}^{6}} + -2 \cdot \frac{{c}^{3}}{{b}^{4}}\right)\right) - c}}{b} \]
        3. Step-by-step derivation
          1. associate-*r/94.7%

            \[\leadsto \frac{a \cdot \left(\color{blue}{\frac{-1 \cdot {c}^{2}}{{b}^{2}}} + a \cdot \left(-5 \cdot \frac{a \cdot {c}^{4}}{{b}^{6}} + -2 \cdot \frac{{c}^{3}}{{b}^{4}}\right)\right) - c}{b} \]
        4. Applied egg-rr94.7%

          \[\leadsto \frac{a \cdot \left(\color{blue}{\frac{-1 \cdot {c}^{2}}{{b}^{2}}} + a \cdot \left(-5 \cdot \frac{a \cdot {c}^{4}}{{b}^{6}} + -2 \cdot \frac{{c}^{3}}{{b}^{4}}\right)\right) - c}{b} \]
        5. Step-by-step derivation
          1. associate-/l*94.7%

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

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

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

            \[\leadsto \frac{a \cdot \left(\left(-\frac{c \cdot c}{\color{blue}{b \cdot b}}\right) + a \cdot \left(-5 \cdot \frac{a \cdot {c}^{4}}{{b}^{6}} + -2 \cdot \frac{{c}^{3}}{{b}^{4}}\right)\right) - c}{b} \]
          5. times-frac94.7%

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

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

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

            \[\leadsto \frac{a \cdot \left(\left(-\color{blue}{\frac{c}{b} \cdot \frac{c}{b}}\right) + a \cdot \left(-5 \cdot \frac{a \cdot {c}^{4}}{{b}^{6}} + -2 \cdot \frac{{c}^{3}}{{b}^{4}}\right)\right) - c}{b} \]
        8. Applied egg-rr94.7%

          \[\leadsto \frac{a \cdot \left(\left(-\color{blue}{\frac{c}{b} \cdot \frac{c}{b}}\right) + a \cdot \left(-5 \cdot \frac{a \cdot {c}^{4}}{{b}^{6}} + -2 \cdot \frac{{c}^{3}}{{b}^{4}}\right)\right) - c}{b} \]
      7. Recombined 2 regimes into one program.
      8. Final simplification93.1%

        \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\sqrt{b \cdot b - c \cdot \left(4 \cdot a\right)} - b}{a \cdot 2} \leq -0.6:\\ \;\;\;\;\frac{\frac{\mathsf{fma}\left(c, \mathsf{fma}\left(-4, a, \frac{{b}^{2}}{c}\right), -{b}^{2}\right)}{\mathsf{fma}\left(\sqrt{c}, \sqrt{\mathsf{fma}\left(-4, a, \frac{{b}^{2}}{c}\right)}, b\right)}}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{a \cdot \left(a \cdot \left(-5 \cdot \frac{a \cdot {c}^{4}}{{b}^{6}} + -2 \cdot \frac{{c}^{3}}{{b}^{4}}\right) - \frac{c}{b} \cdot \frac{c}{b}\right) - c}{b}\\ \end{array} \]
      9. Add Preprocessing

      Alternative 3: 91.9% accurate, 0.2× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := c \cdot \left(4 \cdot a\right)\\ t_1 := {b}^{2} - t\_0\\ \mathbf{if}\;\frac{\sqrt{b \cdot b - t\_0} - b}{a \cdot 2} \leq -0.6:\\ \;\;\;\;\frac{\frac{t\_1 - {\left(-b\right)}^{2}}{b + \sqrt{t\_1}}}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{a \cdot \left(a \cdot \left(-5 \cdot \frac{a \cdot {c}^{4}}{{b}^{6}} + -2 \cdot \frac{{c}^{3}}{{b}^{4}}\right) - \frac{c}{b} \cdot \frac{c}{b}\right) - c}{b}\\ \end{array} \end{array} \]
      (FPCore (a b c)
       :precision binary64
       (let* ((t_0 (* c (* 4.0 a))) (t_1 (- (pow b 2.0) t_0)))
         (if (<= (/ (- (sqrt (- (* b b) t_0)) b) (* a 2.0)) -0.6)
           (/ (/ (- t_1 (pow (- b) 2.0)) (+ b (sqrt t_1))) (* a 2.0))
           (/
            (-
             (*
              a
              (-
               (*
                a
                (+
                 (* -5.0 (/ (* a (pow c 4.0)) (pow b 6.0)))
                 (* -2.0 (/ (pow c 3.0) (pow b 4.0)))))
               (* (/ c b) (/ c b))))
             c)
            b))))
      double code(double a, double b, double c) {
      	double t_0 = c * (4.0 * a);
      	double t_1 = pow(b, 2.0) - t_0;
      	double tmp;
      	if (((sqrt(((b * b) - t_0)) - b) / (a * 2.0)) <= -0.6) {
      		tmp = ((t_1 - pow(-b, 2.0)) / (b + sqrt(t_1))) / (a * 2.0);
      	} else {
      		tmp = ((a * ((a * ((-5.0 * ((a * pow(c, 4.0)) / pow(b, 6.0))) + (-2.0 * (pow(c, 3.0) / pow(b, 4.0))))) - ((c / b) * (c / b)))) - 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) :: t_1
          real(8) :: tmp
          t_0 = c * (4.0d0 * a)
          t_1 = (b ** 2.0d0) - t_0
          if (((sqrt(((b * b) - t_0)) - b) / (a * 2.0d0)) <= (-0.6d0)) then
              tmp = ((t_1 - (-b ** 2.0d0)) / (b + sqrt(t_1))) / (a * 2.0d0)
          else
              tmp = ((a * ((a * (((-5.0d0) * ((a * (c ** 4.0d0)) / (b ** 6.0d0))) + ((-2.0d0) * ((c ** 3.0d0) / (b ** 4.0d0))))) - ((c / b) * (c / b)))) - c) / b
          end if
          code = tmp
      end function
      
      public static double code(double a, double b, double c) {
      	double t_0 = c * (4.0 * a);
      	double t_1 = Math.pow(b, 2.0) - t_0;
      	double tmp;
      	if (((Math.sqrt(((b * b) - t_0)) - b) / (a * 2.0)) <= -0.6) {
      		tmp = ((t_1 - Math.pow(-b, 2.0)) / (b + Math.sqrt(t_1))) / (a * 2.0);
      	} else {
      		tmp = ((a * ((a * ((-5.0 * ((a * Math.pow(c, 4.0)) / Math.pow(b, 6.0))) + (-2.0 * (Math.pow(c, 3.0) / Math.pow(b, 4.0))))) - ((c / b) * (c / b)))) - c) / b;
      	}
      	return tmp;
      }
      
      def code(a, b, c):
      	t_0 = c * (4.0 * a)
      	t_1 = math.pow(b, 2.0) - t_0
      	tmp = 0
      	if ((math.sqrt(((b * b) - t_0)) - b) / (a * 2.0)) <= -0.6:
      		tmp = ((t_1 - math.pow(-b, 2.0)) / (b + math.sqrt(t_1))) / (a * 2.0)
      	else:
      		tmp = ((a * ((a * ((-5.0 * ((a * math.pow(c, 4.0)) / math.pow(b, 6.0))) + (-2.0 * (math.pow(c, 3.0) / math.pow(b, 4.0))))) - ((c / b) * (c / b)))) - c) / b
      	return tmp
      
      function code(a, b, c)
      	t_0 = Float64(c * Float64(4.0 * a))
      	t_1 = Float64((b ^ 2.0) - t_0)
      	tmp = 0.0
      	if (Float64(Float64(sqrt(Float64(Float64(b * b) - t_0)) - b) / Float64(a * 2.0)) <= -0.6)
      		tmp = Float64(Float64(Float64(t_1 - (Float64(-b) ^ 2.0)) / Float64(b + sqrt(t_1))) / Float64(a * 2.0));
      	else
      		tmp = Float64(Float64(Float64(a * Float64(Float64(a * Float64(Float64(-5.0 * Float64(Float64(a * (c ^ 4.0)) / (b ^ 6.0))) + Float64(-2.0 * Float64((c ^ 3.0) / (b ^ 4.0))))) - Float64(Float64(c / b) * Float64(c / b)))) - c) / b);
      	end
      	return tmp
      end
      
      function tmp_2 = code(a, b, c)
      	t_0 = c * (4.0 * a);
      	t_1 = (b ^ 2.0) - t_0;
      	tmp = 0.0;
      	if (((sqrt(((b * b) - t_0)) - b) / (a * 2.0)) <= -0.6)
      		tmp = ((t_1 - (-b ^ 2.0)) / (b + sqrt(t_1))) / (a * 2.0);
      	else
      		tmp = ((a * ((a * ((-5.0 * ((a * (c ^ 4.0)) / (b ^ 6.0))) + (-2.0 * ((c ^ 3.0) / (b ^ 4.0))))) - ((c / b) * (c / b)))) - c) / b;
      	end
      	tmp_2 = tmp;
      end
      
      code[a_, b_, c_] := Block[{t$95$0 = N[(c * N[(4.0 * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Power[b, 2.0], $MachinePrecision] - t$95$0), $MachinePrecision]}, If[LessEqual[N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision], -0.6], N[(N[(N[(t$95$1 - N[Power[(-b), 2.0], $MachinePrecision]), $MachinePrecision] / N[(b + N[Sqrt[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(a * N[(N[(a * N[(N[(-5.0 * N[(N[(a * N[Power[c, 4.0], $MachinePrecision]), $MachinePrecision] / N[Power[b, 6.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-2.0 * N[(N[Power[c, 3.0], $MachinePrecision] / N[Power[b, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(c / b), $MachinePrecision] * N[(c / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - c), $MachinePrecision] / b), $MachinePrecision]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := c \cdot \left(4 \cdot a\right)\\
      t_1 := {b}^{2} - t\_0\\
      \mathbf{if}\;\frac{\sqrt{b \cdot b - t\_0} - b}{a \cdot 2} \leq -0.6:\\
      \;\;\;\;\frac{\frac{t\_1 - {\left(-b\right)}^{2}}{b + \sqrt{t\_1}}}{a \cdot 2}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{a \cdot \left(a \cdot \left(-5 \cdot \frac{a \cdot {c}^{4}}{{b}^{6}} + -2 \cdot \frac{{c}^{3}}{{b}^{4}}\right) - \frac{c}{b} \cdot \frac{c}{b}\right) - c}{b}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 #s(literal 4 binary64) a) c)))) (*.f64 #s(literal 2 binary64) a)) < -0.599999999999999978

        1. Initial program 84.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. *-commutative84.0%

            \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{\color{blue}{a \cdot 2}} \]
        3. Simplified84.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. Step-by-step derivation
          1. add-cbrt-cube82.9%

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

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

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

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

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

            \[\leadsto \frac{\left(-b\right) + \sqrt{{\left({b}^{\color{blue}{6}}\right)}^{0.3333333333333333} - \left(4 \cdot a\right) \cdot c}}{a \cdot 2} \]
        6. Applied egg-rr78.7%

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

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

            \[\leadsto \frac{\frac{\color{blue}{{\left(-b\right)}^{2}} - \sqrt{{\left({b}^{6}\right)}^{0.3333333333333333} - \left(4 \cdot a\right) \cdot c} \cdot \sqrt{{\left({b}^{6}\right)}^{0.3333333333333333} - \left(4 \cdot a\right) \cdot c}}{\left(-b\right) - \sqrt{{\left({b}^{6}\right)}^{0.3333333333333333} - \left(4 \cdot a\right) \cdot c}}}{a \cdot 2} \]
          3. add-sqr-sqrt78.5%

            \[\leadsto \frac{\frac{{\left(-b\right)}^{2} - \color{blue}{\left({\left({b}^{6}\right)}^{0.3333333333333333} - \left(4 \cdot a\right) \cdot c\right)}}{\left(-b\right) - \sqrt{{\left({b}^{6}\right)}^{0.3333333333333333} - \left(4 \cdot a\right) \cdot c}}}{a \cdot 2} \]
          4. pow-pow84.7%

            \[\leadsto \frac{\frac{{\left(-b\right)}^{2} - \left(\color{blue}{{b}^{\left(6 \cdot 0.3333333333333333\right)}} - \left(4 \cdot a\right) \cdot c\right)}{\left(-b\right) - \sqrt{{\left({b}^{6}\right)}^{0.3333333333333333} - \left(4 \cdot a\right) \cdot c}}}{a \cdot 2} \]
          5. metadata-eval84.7%

            \[\leadsto \frac{\frac{{\left(-b\right)}^{2} - \left({b}^{\color{blue}{2}} - \left(4 \cdot a\right) \cdot c\right)}{\left(-b\right) - \sqrt{{\left({b}^{6}\right)}^{0.3333333333333333} - \left(4 \cdot a\right) \cdot c}}}{a \cdot 2} \]
          6. *-commutative84.7%

            \[\leadsto \frac{\frac{{\left(-b\right)}^{2} - \left({b}^{2} - \color{blue}{c \cdot \left(4 \cdot a\right)}\right)}{\left(-b\right) - \sqrt{{\left({b}^{6}\right)}^{0.3333333333333333} - \left(4 \cdot a\right) \cdot c}}}{a \cdot 2} \]
          7. *-commutative84.7%

            \[\leadsto \frac{\frac{{\left(-b\right)}^{2} - \left({b}^{2} - c \cdot \color{blue}{\left(a \cdot 4\right)}\right)}{\left(-b\right) - \sqrt{{\left({b}^{6}\right)}^{0.3333333333333333} - \left(4 \cdot a\right) \cdot c}}}{a \cdot 2} \]
          8. pow-pow85.0%

            \[\leadsto \frac{\frac{{\left(-b\right)}^{2} - \left({b}^{2} - c \cdot \left(a \cdot 4\right)\right)}{\left(-b\right) - \sqrt{\color{blue}{{b}^{\left(6 \cdot 0.3333333333333333\right)}} - \left(4 \cdot a\right) \cdot c}}}{a \cdot 2} \]
          9. metadata-eval85.0%

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

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

            \[\leadsto \frac{\frac{{\left(-b\right)}^{2} - \left({b}^{2} - c \cdot \left(a \cdot 4\right)\right)}{\left(-b\right) - \sqrt{{b}^{2} - c \cdot \color{blue}{\left(a \cdot 4\right)}}}}{a \cdot 2} \]
        8. Applied egg-rr85.0%

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

        if -0.599999999999999978 < (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 #s(literal 4 binary64) a) c)))) (*.f64 #s(literal 2 binary64) a))

        1. Initial program 48.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. *-commutative48.2%

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

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

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

            \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(-2, {a}^{2} \cdot \frac{{c}^{3}}{{b}^{4}}, \mathsf{fma}\left(-0.25, \frac{{a}^{4} \cdot {c}^{4}}{a} \cdot \frac{20}{{b}^{6}}, \left(-a\right) \cdot \frac{{c}^{2}}{{b}^{2}}\right) - c\right)}{b}} \]
          2. Taylor expanded in a around 0 94.7%

            \[\leadsto \frac{\color{blue}{a \cdot \left(-1 \cdot \frac{{c}^{2}}{{b}^{2}} + a \cdot \left(-5 \cdot \frac{a \cdot {c}^{4}}{{b}^{6}} + -2 \cdot \frac{{c}^{3}}{{b}^{4}}\right)\right) - c}}{b} \]
          3. Step-by-step derivation
            1. associate-*r/94.7%

              \[\leadsto \frac{a \cdot \left(\color{blue}{\frac{-1 \cdot {c}^{2}}{{b}^{2}}} + a \cdot \left(-5 \cdot \frac{a \cdot {c}^{4}}{{b}^{6}} + -2 \cdot \frac{{c}^{3}}{{b}^{4}}\right)\right) - c}{b} \]
          4. Applied egg-rr94.7%

            \[\leadsto \frac{a \cdot \left(\color{blue}{\frac{-1 \cdot {c}^{2}}{{b}^{2}}} + a \cdot \left(-5 \cdot \frac{a \cdot {c}^{4}}{{b}^{6}} + -2 \cdot \frac{{c}^{3}}{{b}^{4}}\right)\right) - c}{b} \]
          5. Step-by-step derivation
            1. associate-/l*94.7%

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

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

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

              \[\leadsto \frac{a \cdot \left(\left(-\frac{c \cdot c}{\color{blue}{b \cdot b}}\right) + a \cdot \left(-5 \cdot \frac{a \cdot {c}^{4}}{{b}^{6}} + -2 \cdot \frac{{c}^{3}}{{b}^{4}}\right)\right) - c}{b} \]
            5. times-frac94.7%

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

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

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

              \[\leadsto \frac{a \cdot \left(\left(-\color{blue}{\frac{c}{b} \cdot \frac{c}{b}}\right) + a \cdot \left(-5 \cdot \frac{a \cdot {c}^{4}}{{b}^{6}} + -2 \cdot \frac{{c}^{3}}{{b}^{4}}\right)\right) - c}{b} \]
          8. Applied egg-rr94.7%

            \[\leadsto \frac{a \cdot \left(\left(-\color{blue}{\frac{c}{b} \cdot \frac{c}{b}}\right) + a \cdot \left(-5 \cdot \frac{a \cdot {c}^{4}}{{b}^{6}} + -2 \cdot \frac{{c}^{3}}{{b}^{4}}\right)\right) - c}{b} \]
        7. Recombined 2 regimes into one program.
        8. Final simplification93.1%

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

        Alternative 4: 89.8% accurate, 0.2× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_0 := c \cdot \left(4 \cdot a\right)\\ t_1 := {b}^{2} - t\_0\\ \mathbf{if}\;\frac{\sqrt{b \cdot b - t\_0} - b}{a \cdot 2} \leq -0.6:\\ \;\;\;\;\frac{\frac{t\_1 - {\left(-b\right)}^{2}}{b + \sqrt{t\_1}}}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{a \cdot \left(-2 \cdot \frac{a \cdot {c}^{3}}{{b}^{4}} - {\left(\frac{c}{b}\right)}^{2}\right) - c}{b}\\ \end{array} \end{array} \]
        (FPCore (a b c)
         :precision binary64
         (let* ((t_0 (* c (* 4.0 a))) (t_1 (- (pow b 2.0) t_0)))
           (if (<= (/ (- (sqrt (- (* b b) t_0)) b) (* a 2.0)) -0.6)
             (/ (/ (- t_1 (pow (- b) 2.0)) (+ b (sqrt t_1))) (* a 2.0))
             (/
              (-
               (* a (- (* -2.0 (/ (* a (pow c 3.0)) (pow b 4.0))) (pow (/ c b) 2.0)))
               c)
              b))))
        double code(double a, double b, double c) {
        	double t_0 = c * (4.0 * a);
        	double t_1 = pow(b, 2.0) - t_0;
        	double tmp;
        	if (((sqrt(((b * b) - t_0)) - b) / (a * 2.0)) <= -0.6) {
        		tmp = ((t_1 - pow(-b, 2.0)) / (b + sqrt(t_1))) / (a * 2.0);
        	} else {
        		tmp = ((a * ((-2.0 * ((a * pow(c, 3.0)) / pow(b, 4.0))) - pow((c / b), 2.0))) - 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) :: t_1
            real(8) :: tmp
            t_0 = c * (4.0d0 * a)
            t_1 = (b ** 2.0d0) - t_0
            if (((sqrt(((b * b) - t_0)) - b) / (a * 2.0d0)) <= (-0.6d0)) then
                tmp = ((t_1 - (-b ** 2.0d0)) / (b + sqrt(t_1))) / (a * 2.0d0)
            else
                tmp = ((a * (((-2.0d0) * ((a * (c ** 3.0d0)) / (b ** 4.0d0))) - ((c / b) ** 2.0d0))) - c) / b
            end if
            code = tmp
        end function
        
        public static double code(double a, double b, double c) {
        	double t_0 = c * (4.0 * a);
        	double t_1 = Math.pow(b, 2.0) - t_0;
        	double tmp;
        	if (((Math.sqrt(((b * b) - t_0)) - b) / (a * 2.0)) <= -0.6) {
        		tmp = ((t_1 - Math.pow(-b, 2.0)) / (b + Math.sqrt(t_1))) / (a * 2.0);
        	} else {
        		tmp = ((a * ((-2.0 * ((a * Math.pow(c, 3.0)) / Math.pow(b, 4.0))) - Math.pow((c / b), 2.0))) - c) / b;
        	}
        	return tmp;
        }
        
        def code(a, b, c):
        	t_0 = c * (4.0 * a)
        	t_1 = math.pow(b, 2.0) - t_0
        	tmp = 0
        	if ((math.sqrt(((b * b) - t_0)) - b) / (a * 2.0)) <= -0.6:
        		tmp = ((t_1 - math.pow(-b, 2.0)) / (b + math.sqrt(t_1))) / (a * 2.0)
        	else:
        		tmp = ((a * ((-2.0 * ((a * math.pow(c, 3.0)) / math.pow(b, 4.0))) - math.pow((c / b), 2.0))) - c) / b
        	return tmp
        
        function code(a, b, c)
        	t_0 = Float64(c * Float64(4.0 * a))
        	t_1 = Float64((b ^ 2.0) - t_0)
        	tmp = 0.0
        	if (Float64(Float64(sqrt(Float64(Float64(b * b) - t_0)) - b) / Float64(a * 2.0)) <= -0.6)
        		tmp = Float64(Float64(Float64(t_1 - (Float64(-b) ^ 2.0)) / Float64(b + sqrt(t_1))) / Float64(a * 2.0));
        	else
        		tmp = Float64(Float64(Float64(a * Float64(Float64(-2.0 * Float64(Float64(a * (c ^ 3.0)) / (b ^ 4.0))) - (Float64(c / b) ^ 2.0))) - c) / b);
        	end
        	return tmp
        end
        
        function tmp_2 = code(a, b, c)
        	t_0 = c * (4.0 * a);
        	t_1 = (b ^ 2.0) - t_0;
        	tmp = 0.0;
        	if (((sqrt(((b * b) - t_0)) - b) / (a * 2.0)) <= -0.6)
        		tmp = ((t_1 - (-b ^ 2.0)) / (b + sqrt(t_1))) / (a * 2.0);
        	else
        		tmp = ((a * ((-2.0 * ((a * (c ^ 3.0)) / (b ^ 4.0))) - ((c / b) ^ 2.0))) - c) / b;
        	end
        	tmp_2 = tmp;
        end
        
        code[a_, b_, c_] := Block[{t$95$0 = N[(c * N[(4.0 * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Power[b, 2.0], $MachinePrecision] - t$95$0), $MachinePrecision]}, If[LessEqual[N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision], -0.6], N[(N[(N[(t$95$1 - N[Power[(-b), 2.0], $MachinePrecision]), $MachinePrecision] / N[(b + N[Sqrt[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(a * N[(N[(-2.0 * N[(N[(a * N[Power[c, 3.0], $MachinePrecision]), $MachinePrecision] / N[Power[b, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[Power[N[(c / b), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - c), $MachinePrecision] / b), $MachinePrecision]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_0 := c \cdot \left(4 \cdot a\right)\\
        t_1 := {b}^{2} - t\_0\\
        \mathbf{if}\;\frac{\sqrt{b \cdot b - t\_0} - b}{a \cdot 2} \leq -0.6:\\
        \;\;\;\;\frac{\frac{t\_1 - {\left(-b\right)}^{2}}{b + \sqrt{t\_1}}}{a \cdot 2}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{a \cdot \left(-2 \cdot \frac{a \cdot {c}^{3}}{{b}^{4}} - {\left(\frac{c}{b}\right)}^{2}\right) - c}{b}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 #s(literal 4 binary64) a) c)))) (*.f64 #s(literal 2 binary64) a)) < -0.599999999999999978

          1. Initial program 84.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. *-commutative84.0%

              \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{\color{blue}{a \cdot 2}} \]
          3. Simplified84.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. Step-by-step derivation
            1. add-cbrt-cube82.9%

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

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

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

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

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

              \[\leadsto \frac{\left(-b\right) + \sqrt{{\left({b}^{\color{blue}{6}}\right)}^{0.3333333333333333} - \left(4 \cdot a\right) \cdot c}}{a \cdot 2} \]
          6. Applied egg-rr78.7%

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

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

              \[\leadsto \frac{\frac{\color{blue}{{\left(-b\right)}^{2}} - \sqrt{{\left({b}^{6}\right)}^{0.3333333333333333} - \left(4 \cdot a\right) \cdot c} \cdot \sqrt{{\left({b}^{6}\right)}^{0.3333333333333333} - \left(4 \cdot a\right) \cdot c}}{\left(-b\right) - \sqrt{{\left({b}^{6}\right)}^{0.3333333333333333} - \left(4 \cdot a\right) \cdot c}}}{a \cdot 2} \]
            3. add-sqr-sqrt78.5%

              \[\leadsto \frac{\frac{{\left(-b\right)}^{2} - \color{blue}{\left({\left({b}^{6}\right)}^{0.3333333333333333} - \left(4 \cdot a\right) \cdot c\right)}}{\left(-b\right) - \sqrt{{\left({b}^{6}\right)}^{0.3333333333333333} - \left(4 \cdot a\right) \cdot c}}}{a \cdot 2} \]
            4. pow-pow84.7%

              \[\leadsto \frac{\frac{{\left(-b\right)}^{2} - \left(\color{blue}{{b}^{\left(6 \cdot 0.3333333333333333\right)}} - \left(4 \cdot a\right) \cdot c\right)}{\left(-b\right) - \sqrt{{\left({b}^{6}\right)}^{0.3333333333333333} - \left(4 \cdot a\right) \cdot c}}}{a \cdot 2} \]
            5. metadata-eval84.7%

              \[\leadsto \frac{\frac{{\left(-b\right)}^{2} - \left({b}^{\color{blue}{2}} - \left(4 \cdot a\right) \cdot c\right)}{\left(-b\right) - \sqrt{{\left({b}^{6}\right)}^{0.3333333333333333} - \left(4 \cdot a\right) \cdot c}}}{a \cdot 2} \]
            6. *-commutative84.7%

              \[\leadsto \frac{\frac{{\left(-b\right)}^{2} - \left({b}^{2} - \color{blue}{c \cdot \left(4 \cdot a\right)}\right)}{\left(-b\right) - \sqrt{{\left({b}^{6}\right)}^{0.3333333333333333} - \left(4 \cdot a\right) \cdot c}}}{a \cdot 2} \]
            7. *-commutative84.7%

              \[\leadsto \frac{\frac{{\left(-b\right)}^{2} - \left({b}^{2} - c \cdot \color{blue}{\left(a \cdot 4\right)}\right)}{\left(-b\right) - \sqrt{{\left({b}^{6}\right)}^{0.3333333333333333} - \left(4 \cdot a\right) \cdot c}}}{a \cdot 2} \]
            8. pow-pow85.0%

              \[\leadsto \frac{\frac{{\left(-b\right)}^{2} - \left({b}^{2} - c \cdot \left(a \cdot 4\right)\right)}{\left(-b\right) - \sqrt{\color{blue}{{b}^{\left(6 \cdot 0.3333333333333333\right)}} - \left(4 \cdot a\right) \cdot c}}}{a \cdot 2} \]
            9. metadata-eval85.0%

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

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

              \[\leadsto \frac{\frac{{\left(-b\right)}^{2} - \left({b}^{2} - c \cdot \left(a \cdot 4\right)\right)}{\left(-b\right) - \sqrt{{b}^{2} - c \cdot \color{blue}{\left(a \cdot 4\right)}}}}{a \cdot 2} \]
          8. Applied egg-rr85.0%

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

          if -0.599999999999999978 < (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 #s(literal 4 binary64) a) c)))) (*.f64 #s(literal 2 binary64) a))

          1. Initial program 48.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. *-commutative48.2%

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

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

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

              \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(-2, {a}^{2} \cdot \frac{{c}^{3}}{{b}^{4}}, \mathsf{fma}\left(-0.25, \frac{{a}^{4} \cdot {c}^{4}}{a} \cdot \frac{20}{{b}^{6}}, \left(-a\right) \cdot \frac{{c}^{2}}{{b}^{2}}\right) - c\right)}{b}} \]
            2. Taylor expanded in a around 0 94.7%

              \[\leadsto \frac{\color{blue}{a \cdot \left(-1 \cdot \frac{{c}^{2}}{{b}^{2}} + a \cdot \left(-5 \cdot \frac{a \cdot {c}^{4}}{{b}^{6}} + -2 \cdot \frac{{c}^{3}}{{b}^{4}}\right)\right) - c}}{b} \]
            3. Step-by-step derivation
              1. associate-*r/94.7%

                \[\leadsto \frac{a \cdot \left(\color{blue}{\frac{-1 \cdot {c}^{2}}{{b}^{2}}} + a \cdot \left(-5 \cdot \frac{a \cdot {c}^{4}}{{b}^{6}} + -2 \cdot \frac{{c}^{3}}{{b}^{4}}\right)\right) - c}{b} \]
            4. Applied egg-rr94.7%

              \[\leadsto \frac{a \cdot \left(\color{blue}{\frac{-1 \cdot {c}^{2}}{{b}^{2}}} + a \cdot \left(-5 \cdot \frac{a \cdot {c}^{4}}{{b}^{6}} + -2 \cdot \frac{{c}^{3}}{{b}^{4}}\right)\right) - c}{b} \]
            5. Step-by-step derivation
              1. associate-/l*94.7%

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

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

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

                \[\leadsto \frac{a \cdot \left(\left(-\frac{c \cdot c}{\color{blue}{b \cdot b}}\right) + a \cdot \left(-5 \cdot \frac{a \cdot {c}^{4}}{{b}^{6}} + -2 \cdot \frac{{c}^{3}}{{b}^{4}}\right)\right) - c}{b} \]
              5. times-frac94.7%

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

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

              \[\leadsto \frac{a \cdot \left(\color{blue}{\left(-{\left(\frac{c}{b}\right)}^{2}\right)} + a \cdot \left(-5 \cdot \frac{a \cdot {c}^{4}}{{b}^{6}} + -2 \cdot \frac{{c}^{3}}{{b}^{4}}\right)\right) - c}{b} \]
            7. Taylor expanded in a around 0 92.2%

              \[\leadsto \frac{a \cdot \left(\left(-{\left(\frac{c}{b}\right)}^{2}\right) + \color{blue}{-2 \cdot \frac{a \cdot {c}^{3}}{{b}^{4}}}\right) - c}{b} \]
          7. Recombined 2 regimes into one program.
          8. Final simplification91.0%

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

          Alternative 5: 89.6% accurate, 0.3× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\frac{\sqrt{b \cdot b - c \cdot \left(4 \cdot a\right)} - b}{a \cdot 2} \leq -0.6:\\ \;\;\;\;\frac{\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -4\right)\right)} - b}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{a \cdot \left(-2 \cdot \frac{a \cdot {c}^{3}}{{b}^{4}} - {\left(\frac{c}{b}\right)}^{2}\right) - c}{b}\\ \end{array} \end{array} \]
          (FPCore (a b c)
           :precision binary64
           (if (<= (/ (- (sqrt (- (* b b) (* c (* 4.0 a)))) b) (* a 2.0)) -0.6)
             (/ (- (sqrt (fma b b (* c (* a -4.0)))) b) (* a 2.0))
             (/
              (-
               (* a (- (* -2.0 (/ (* a (pow c 3.0)) (pow b 4.0))) (pow (/ c b) 2.0)))
               c)
              b)))
          double code(double a, double b, double c) {
          	double tmp;
          	if (((sqrt(((b * b) - (c * (4.0 * a)))) - b) / (a * 2.0)) <= -0.6) {
          		tmp = (sqrt(fma(b, b, (c * (a * -4.0)))) - b) / (a * 2.0);
          	} else {
          		tmp = ((a * ((-2.0 * ((a * pow(c, 3.0)) / pow(b, 4.0))) - pow((c / b), 2.0))) - c) / b;
          	}
          	return tmp;
          }
          
          function code(a, b, c)
          	tmp = 0.0
          	if (Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(c * Float64(4.0 * a)))) - b) / Float64(a * 2.0)) <= -0.6)
          		tmp = Float64(Float64(sqrt(fma(b, b, Float64(c * Float64(a * -4.0)))) - b) / Float64(a * 2.0));
          	else
          		tmp = Float64(Float64(Float64(a * Float64(Float64(-2.0 * Float64(Float64(a * (c ^ 3.0)) / (b ^ 4.0))) - (Float64(c / b) ^ 2.0))) - c) / b);
          	end
          	return tmp
          end
          
          code[a_, b_, c_] := If[LessEqual[N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(c * N[(4.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision], -0.6], N[(N[(N[Sqrt[N[(b * b + N[(c * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(a * N[(N[(-2.0 * N[(N[(a * N[Power[c, 3.0], $MachinePrecision]), $MachinePrecision] / N[Power[b, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[Power[N[(c / b), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - c), $MachinePrecision] / b), $MachinePrecision]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;\frac{\sqrt{b \cdot b - c \cdot \left(4 \cdot a\right)} - b}{a \cdot 2} \leq -0.6:\\
          \;\;\;\;\frac{\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -4\right)\right)} - b}{a \cdot 2}\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{a \cdot \left(-2 \cdot \frac{a \cdot {c}^{3}}{{b}^{4}} - {\left(\frac{c}{b}\right)}^{2}\right) - c}{b}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 #s(literal 4 binary64) a) c)))) (*.f64 #s(literal 2 binary64) a)) < -0.599999999999999978

            1. Initial program 84.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. *-commutative84.0%

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

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

            if -0.599999999999999978 < (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 #s(literal 4 binary64) a) c)))) (*.f64 #s(literal 2 binary64) a))

            1. Initial program 48.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. *-commutative48.2%

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

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

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

                \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(-2, {a}^{2} \cdot \frac{{c}^{3}}{{b}^{4}}, \mathsf{fma}\left(-0.25, \frac{{a}^{4} \cdot {c}^{4}}{a} \cdot \frac{20}{{b}^{6}}, \left(-a\right) \cdot \frac{{c}^{2}}{{b}^{2}}\right) - c\right)}{b}} \]
              2. Taylor expanded in a around 0 94.7%

                \[\leadsto \frac{\color{blue}{a \cdot \left(-1 \cdot \frac{{c}^{2}}{{b}^{2}} + a \cdot \left(-5 \cdot \frac{a \cdot {c}^{4}}{{b}^{6}} + -2 \cdot \frac{{c}^{3}}{{b}^{4}}\right)\right) - c}}{b} \]
              3. Step-by-step derivation
                1. associate-*r/94.7%

                  \[\leadsto \frac{a \cdot \left(\color{blue}{\frac{-1 \cdot {c}^{2}}{{b}^{2}}} + a \cdot \left(-5 \cdot \frac{a \cdot {c}^{4}}{{b}^{6}} + -2 \cdot \frac{{c}^{3}}{{b}^{4}}\right)\right) - c}{b} \]
              4. Applied egg-rr94.7%

                \[\leadsto \frac{a \cdot \left(\color{blue}{\frac{-1 \cdot {c}^{2}}{{b}^{2}}} + a \cdot \left(-5 \cdot \frac{a \cdot {c}^{4}}{{b}^{6}} + -2 \cdot \frac{{c}^{3}}{{b}^{4}}\right)\right) - c}{b} \]
              5. Step-by-step derivation
                1. associate-/l*94.7%

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

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

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

                  \[\leadsto \frac{a \cdot \left(\left(-\frac{c \cdot c}{\color{blue}{b \cdot b}}\right) + a \cdot \left(-5 \cdot \frac{a \cdot {c}^{4}}{{b}^{6}} + -2 \cdot \frac{{c}^{3}}{{b}^{4}}\right)\right) - c}{b} \]
                5. times-frac94.7%

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

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

                \[\leadsto \frac{a \cdot \left(\color{blue}{\left(-{\left(\frac{c}{b}\right)}^{2}\right)} + a \cdot \left(-5 \cdot \frac{a \cdot {c}^{4}}{{b}^{6}} + -2 \cdot \frac{{c}^{3}}{{b}^{4}}\right)\right) - c}{b} \]
              7. Taylor expanded in a around 0 92.2%

                \[\leadsto \frac{a \cdot \left(\left(-{\left(\frac{c}{b}\right)}^{2}\right) + \color{blue}{-2 \cdot \frac{a \cdot {c}^{3}}{{b}^{4}}}\right) - c}{b} \]
            7. Recombined 2 regimes into one program.
            8. Final simplification90.9%

              \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\sqrt{b \cdot b - c \cdot \left(4 \cdot a\right)} - b}{a \cdot 2} \leq -0.6:\\ \;\;\;\;\frac{\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -4\right)\right)} - b}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{a \cdot \left(-2 \cdot \frac{a \cdot {c}^{3}}{{b}^{4}} - {\left(\frac{c}{b}\right)}^{2}\right) - c}{b}\\ \end{array} \]
            9. Add Preprocessing

            Alternative 6: 85.3% accurate, 0.3× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\frac{\sqrt{b \cdot b - c \cdot \left(4 \cdot a\right)} - b}{a \cdot 2} \leq -0.072:\\ \;\;\;\;\frac{\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -4\right)\right)} - b}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{c + a \cdot {\left(\frac{c}{b}\right)}^{2}}{-b}\\ \end{array} \end{array} \]
            (FPCore (a b c)
             :precision binary64
             (if (<= (/ (- (sqrt (- (* b b) (* c (* 4.0 a)))) b) (* a 2.0)) -0.072)
               (/ (- (sqrt (fma b b (* c (* a -4.0)))) b) (* a 2.0))
               (/ (+ c (* a (pow (/ c b) 2.0))) (- b))))
            double code(double a, double b, double c) {
            	double tmp;
            	if (((sqrt(((b * b) - (c * (4.0 * a)))) - b) / (a * 2.0)) <= -0.072) {
            		tmp = (sqrt(fma(b, b, (c * (a * -4.0)))) - b) / (a * 2.0);
            	} else {
            		tmp = (c + (a * pow((c / b), 2.0))) / -b;
            	}
            	return tmp;
            }
            
            function code(a, b, c)
            	tmp = 0.0
            	if (Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(c * Float64(4.0 * a)))) - b) / Float64(a * 2.0)) <= -0.072)
            		tmp = Float64(Float64(sqrt(fma(b, b, Float64(c * Float64(a * -4.0)))) - b) / Float64(a * 2.0));
            	else
            		tmp = Float64(Float64(c + Float64(a * (Float64(c / b) ^ 2.0))) / Float64(-b));
            	end
            	return tmp
            end
            
            code[a_, b_, c_] := If[LessEqual[N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(c * N[(4.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision], -0.072], N[(N[(N[Sqrt[N[(b * b + N[(c * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(c + N[(a * N[Power[N[(c / b), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / (-b)), $MachinePrecision]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;\frac{\sqrt{b \cdot b - c \cdot \left(4 \cdot a\right)} - b}{a \cdot 2} \leq -0.072:\\
            \;\;\;\;\frac{\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -4\right)\right)} - b}{a \cdot 2}\\
            
            \mathbf{else}:\\
            \;\;\;\;\frac{c + a \cdot {\left(\frac{c}{b}\right)}^{2}}{-b}\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 #s(literal 4 binary64) a) c)))) (*.f64 #s(literal 2 binary64) a)) < -0.0719999999999999946

              1. Initial program 80.9%

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

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

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

              if -0.0719999999999999946 < (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 #s(literal 4 binary64) a) c)))) (*.f64 #s(literal 2 binary64) a))

              1. Initial program 45.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. *-commutative45.7%

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

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

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

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

                  \[\leadsto \frac{\frac{\color{blue}{-2 \cdot \left(a \cdot c + \frac{{a}^{2} \cdot {c}^{2}}{{b}^{2}}\right)}}{b}}{a \cdot 2} \]
                2. *-lft-identity89.2%

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

                  \[\leadsto \frac{\color{blue}{\frac{-2}{1} \cdot \frac{a \cdot c + \frac{{a}^{2} \cdot {c}^{2}}{{b}^{2}}}{b}}}{a \cdot 2} \]
                4. metadata-eval89.2%

                  \[\leadsto \frac{\color{blue}{-2} \cdot \frac{a \cdot c + \frac{{a}^{2} \cdot {c}^{2}}{{b}^{2}}}{b}}{a \cdot 2} \]
                5. *-commutative89.2%

                  \[\leadsto \frac{-2 \cdot \frac{\color{blue}{c \cdot a} + \frac{{a}^{2} \cdot {c}^{2}}{{b}^{2}}}{b}}{a \cdot 2} \]
                6. associate-/l*89.2%

                  \[\leadsto \frac{-2 \cdot \frac{c \cdot a + \color{blue}{{a}^{2} \cdot \frac{{c}^{2}}{{b}^{2}}}}{b}}{a \cdot 2} \]
                7. unpow289.2%

                  \[\leadsto \frac{-2 \cdot \frac{c \cdot a + {a}^{2} \cdot \frac{\color{blue}{c \cdot c}}{{b}^{2}}}{b}}{a \cdot 2} \]
                8. unpow289.2%

                  \[\leadsto \frac{-2 \cdot \frac{c \cdot a + {a}^{2} \cdot \frac{c \cdot c}{\color{blue}{b \cdot b}}}{b}}{a \cdot 2} \]
                9. times-frac89.2%

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

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

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

                \[\leadsto \color{blue}{\frac{-1 \cdot c + -1 \cdot \frac{a \cdot {c}^{2}}{{b}^{2}}}{b}} \]
              10. Step-by-step derivation
                1. distribute-lft-out89.4%

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

                  \[\leadsto \color{blue}{-1 \cdot \frac{c + \frac{a \cdot {c}^{2}}{{b}^{2}}}{b}} \]
                3. mul-1-neg89.4%

                  \[\leadsto \color{blue}{-\frac{c + \frac{a \cdot {c}^{2}}{{b}^{2}}}{b}} \]
                4. distribute-neg-frac289.4%

                  \[\leadsto \color{blue}{\frac{c + \frac{a \cdot {c}^{2}}{{b}^{2}}}{-b}} \]
                5. associate-/l*89.4%

                  \[\leadsto \frac{c + \color{blue}{a \cdot \frac{{c}^{2}}{{b}^{2}}}}{-b} \]
                6. unpow289.4%

                  \[\leadsto \frac{c + a \cdot \frac{\color{blue}{c \cdot c}}{{b}^{2}}}{-b} \]
                7. unpow289.4%

                  \[\leadsto \frac{c + a \cdot \frac{c \cdot c}{\color{blue}{b \cdot b}}}{-b} \]
                8. times-frac89.4%

                  \[\leadsto \frac{c + a \cdot \color{blue}{\left(\frac{c}{b} \cdot \frac{c}{b}\right)}}{-b} \]
                9. unpow289.4%

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

                \[\leadsto \color{blue}{\frac{c + a \cdot {\left(\frac{c}{b}\right)}^{2}}{-b}} \]
            3. Recombined 2 regimes into one program.
            4. Final simplification87.4%

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

            Alternative 7: 85.3% accurate, 0.5× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{\sqrt{b \cdot b - c \cdot \left(4 \cdot a\right)} - b}{a \cdot 2}\\ \mathbf{if}\;t\_0 \leq -0.072:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;\frac{c + a \cdot {\left(\frac{c}{b}\right)}^{2}}{-b}\\ \end{array} \end{array} \]
            (FPCore (a b c)
             :precision binary64
             (let* ((t_0 (/ (- (sqrt (- (* b b) (* c (* 4.0 a)))) b) (* a 2.0))))
               (if (<= t_0 -0.072) t_0 (/ (+ c (* a (pow (/ c b) 2.0))) (- b)))))
            double code(double a, double b, double c) {
            	double t_0 = (sqrt(((b * b) - (c * (4.0 * a)))) - b) / (a * 2.0);
            	double tmp;
            	if (t_0 <= -0.072) {
            		tmp = t_0;
            	} else {
            		tmp = (c + (a * pow((c / b), 2.0))) / -b;
            	}
            	return tmp;
            }
            
            real(8) function code(a, b, c)
                real(8), intent (in) :: a
                real(8), intent (in) :: b
                real(8), intent (in) :: c
                real(8) :: t_0
                real(8) :: tmp
                t_0 = (sqrt(((b * b) - (c * (4.0d0 * a)))) - b) / (a * 2.0d0)
                if (t_0 <= (-0.072d0)) then
                    tmp = t_0
                else
                    tmp = (c + (a * ((c / b) ** 2.0d0))) / -b
                end if
                code = tmp
            end function
            
            public static double code(double a, double b, double c) {
            	double t_0 = (Math.sqrt(((b * b) - (c * (4.0 * a)))) - b) / (a * 2.0);
            	double tmp;
            	if (t_0 <= -0.072) {
            		tmp = t_0;
            	} else {
            		tmp = (c + (a * Math.pow((c / b), 2.0))) / -b;
            	}
            	return tmp;
            }
            
            def code(a, b, c):
            	t_0 = (math.sqrt(((b * b) - (c * (4.0 * a)))) - b) / (a * 2.0)
            	tmp = 0
            	if t_0 <= -0.072:
            		tmp = t_0
            	else:
            		tmp = (c + (a * math.pow((c / b), 2.0))) / -b
            	return tmp
            
            function code(a, b, c)
            	t_0 = Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(c * Float64(4.0 * a)))) - b) / Float64(a * 2.0))
            	tmp = 0.0
            	if (t_0 <= -0.072)
            		tmp = t_0;
            	else
            		tmp = Float64(Float64(c + Float64(a * (Float64(c / b) ^ 2.0))) / Float64(-b));
            	end
            	return tmp
            end
            
            function tmp_2 = code(a, b, c)
            	t_0 = (sqrt(((b * b) - (c * (4.0 * a)))) - b) / (a * 2.0);
            	tmp = 0.0;
            	if (t_0 <= -0.072)
            		tmp = t_0;
            	else
            		tmp = (c + (a * ((c / b) ^ 2.0))) / -b;
            	end
            	tmp_2 = tmp;
            end
            
            code[a_, b_, c_] := Block[{t$95$0 = N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(c * N[(4.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -0.072], t$95$0, N[(N[(c + N[(a * N[Power[N[(c / b), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / (-b)), $MachinePrecision]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_0 := \frac{\sqrt{b \cdot b - c \cdot \left(4 \cdot a\right)} - b}{a \cdot 2}\\
            \mathbf{if}\;t\_0 \leq -0.072:\\
            \;\;\;\;t\_0\\
            
            \mathbf{else}:\\
            \;\;\;\;\frac{c + a \cdot {\left(\frac{c}{b}\right)}^{2}}{-b}\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 #s(literal 4 binary64) a) c)))) (*.f64 #s(literal 2 binary64) a)) < -0.0719999999999999946

              1. Initial program 80.9%

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

              if -0.0719999999999999946 < (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 #s(literal 4 binary64) a) c)))) (*.f64 #s(literal 2 binary64) a))

              1. Initial program 45.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. *-commutative45.7%

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

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

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

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

                  \[\leadsto \frac{\frac{\color{blue}{-2 \cdot \left(a \cdot c + \frac{{a}^{2} \cdot {c}^{2}}{{b}^{2}}\right)}}{b}}{a \cdot 2} \]
                2. *-lft-identity89.2%

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

                  \[\leadsto \frac{\color{blue}{\frac{-2}{1} \cdot \frac{a \cdot c + \frac{{a}^{2} \cdot {c}^{2}}{{b}^{2}}}{b}}}{a \cdot 2} \]
                4. metadata-eval89.2%

                  \[\leadsto \frac{\color{blue}{-2} \cdot \frac{a \cdot c + \frac{{a}^{2} \cdot {c}^{2}}{{b}^{2}}}{b}}{a \cdot 2} \]
                5. *-commutative89.2%

                  \[\leadsto \frac{-2 \cdot \frac{\color{blue}{c \cdot a} + \frac{{a}^{2} \cdot {c}^{2}}{{b}^{2}}}{b}}{a \cdot 2} \]
                6. associate-/l*89.2%

                  \[\leadsto \frac{-2 \cdot \frac{c \cdot a + \color{blue}{{a}^{2} \cdot \frac{{c}^{2}}{{b}^{2}}}}{b}}{a \cdot 2} \]
                7. unpow289.2%

                  \[\leadsto \frac{-2 \cdot \frac{c \cdot a + {a}^{2} \cdot \frac{\color{blue}{c \cdot c}}{{b}^{2}}}{b}}{a \cdot 2} \]
                8. unpow289.2%

                  \[\leadsto \frac{-2 \cdot \frac{c \cdot a + {a}^{2} \cdot \frac{c \cdot c}{\color{blue}{b \cdot b}}}{b}}{a \cdot 2} \]
                9. times-frac89.2%

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

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

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

                \[\leadsto \color{blue}{\frac{-1 \cdot c + -1 \cdot \frac{a \cdot {c}^{2}}{{b}^{2}}}{b}} \]
              10. Step-by-step derivation
                1. distribute-lft-out89.4%

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

                  \[\leadsto \color{blue}{-1 \cdot \frac{c + \frac{a \cdot {c}^{2}}{{b}^{2}}}{b}} \]
                3. mul-1-neg89.4%

                  \[\leadsto \color{blue}{-\frac{c + \frac{a \cdot {c}^{2}}{{b}^{2}}}{b}} \]
                4. distribute-neg-frac289.4%

                  \[\leadsto \color{blue}{\frac{c + \frac{a \cdot {c}^{2}}{{b}^{2}}}{-b}} \]
                5. associate-/l*89.4%

                  \[\leadsto \frac{c + \color{blue}{a \cdot \frac{{c}^{2}}{{b}^{2}}}}{-b} \]
                6. unpow289.4%

                  \[\leadsto \frac{c + a \cdot \frac{\color{blue}{c \cdot c}}{{b}^{2}}}{-b} \]
                7. unpow289.4%

                  \[\leadsto \frac{c + a \cdot \frac{c \cdot c}{\color{blue}{b \cdot b}}}{-b} \]
                8. times-frac89.4%

                  \[\leadsto \frac{c + a \cdot \color{blue}{\left(\frac{c}{b} \cdot \frac{c}{b}\right)}}{-b} \]
                9. unpow289.4%

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

                \[\leadsto \color{blue}{\frac{c + a \cdot {\left(\frac{c}{b}\right)}^{2}}{-b}} \]
            3. Recombined 2 regimes into one program.
            4. Final simplification87.4%

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

            Alternative 8: 81.6% accurate, 1.0× speedup?

            \[\begin{array}{l} \\ \frac{c + a \cdot {\left(\frac{c}{b}\right)}^{2}}{-b} \end{array} \]
            (FPCore (a b c) :precision binary64 (/ (+ c (* a (pow (/ c b) 2.0))) (- b)))
            double code(double a, double b, double c) {
            	return (c + (a * pow((c / b), 2.0))) / -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 + (a * ((c / b) ** 2.0d0))) / -b
            end function
            
            public static double code(double a, double b, double c) {
            	return (c + (a * Math.pow((c / b), 2.0))) / -b;
            }
            
            def code(a, b, c):
            	return (c + (a * math.pow((c / b), 2.0))) / -b
            
            function code(a, b, c)
            	return Float64(Float64(c + Float64(a * (Float64(c / b) ^ 2.0))) / Float64(-b))
            end
            
            function tmp = code(a, b, c)
            	tmp = (c + (a * ((c / b) ^ 2.0))) / -b;
            end
            
            code[a_, b_, c_] := N[(N[(c + N[(a * N[Power[N[(c / b), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / (-b)), $MachinePrecision]
            
            \begin{array}{l}
            
            \\
            \frac{c + a \cdot {\left(\frac{c}{b}\right)}^{2}}{-b}
            \end{array}
            
            Derivation
            1. Initial program 54.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. *-commutative54.1%

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

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

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

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

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

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

                \[\leadsto \frac{\color{blue}{\frac{-2}{1} \cdot \frac{a \cdot c + \frac{{a}^{2} \cdot {c}^{2}}{{b}^{2}}}{b}}}{a \cdot 2} \]
              4. metadata-eval82.4%

                \[\leadsto \frac{\color{blue}{-2} \cdot \frac{a \cdot c + \frac{{a}^{2} \cdot {c}^{2}}{{b}^{2}}}{b}}{a \cdot 2} \]
              5. *-commutative82.4%

                \[\leadsto \frac{-2 \cdot \frac{\color{blue}{c \cdot a} + \frac{{a}^{2} \cdot {c}^{2}}{{b}^{2}}}{b}}{a \cdot 2} \]
              6. associate-/l*82.4%

                \[\leadsto \frac{-2 \cdot \frac{c \cdot a + \color{blue}{{a}^{2} \cdot \frac{{c}^{2}}{{b}^{2}}}}{b}}{a \cdot 2} \]
              7. unpow282.4%

                \[\leadsto \frac{-2 \cdot \frac{c \cdot a + {a}^{2} \cdot \frac{\color{blue}{c \cdot c}}{{b}^{2}}}{b}}{a \cdot 2} \]
              8. unpow282.4%

                \[\leadsto \frac{-2 \cdot \frac{c \cdot a + {a}^{2} \cdot \frac{c \cdot c}{\color{blue}{b \cdot b}}}{b}}{a \cdot 2} \]
              9. times-frac82.4%

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

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

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

              \[\leadsto \color{blue}{\frac{-1 \cdot c + -1 \cdot \frac{a \cdot {c}^{2}}{{b}^{2}}}{b}} \]
            10. Step-by-step derivation
              1. distribute-lft-out82.5%

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

                \[\leadsto \color{blue}{-1 \cdot \frac{c + \frac{a \cdot {c}^{2}}{{b}^{2}}}{b}} \]
              3. mul-1-neg82.5%

                \[\leadsto \color{blue}{-\frac{c + \frac{a \cdot {c}^{2}}{{b}^{2}}}{b}} \]
              4. distribute-neg-frac282.5%

                \[\leadsto \color{blue}{\frac{c + \frac{a \cdot {c}^{2}}{{b}^{2}}}{-b}} \]
              5. associate-/l*82.5%

                \[\leadsto \frac{c + \color{blue}{a \cdot \frac{{c}^{2}}{{b}^{2}}}}{-b} \]
              6. unpow282.5%

                \[\leadsto \frac{c + a \cdot \frac{\color{blue}{c \cdot c}}{{b}^{2}}}{-b} \]
              7. unpow282.5%

                \[\leadsto \frac{c + a \cdot \frac{c \cdot c}{\color{blue}{b \cdot b}}}{-b} \]
              8. times-frac82.5%

                \[\leadsto \frac{c + a \cdot \color{blue}{\left(\frac{c}{b} \cdot \frac{c}{b}\right)}}{-b} \]
              9. unpow282.5%

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

              \[\leadsto \color{blue}{\frac{c + a \cdot {\left(\frac{c}{b}\right)}^{2}}{-b}} \]
            12. Add Preprocessing

            Alternative 9: 64.3% accurate, 29.0× 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 / Float64(-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 54.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. *-commutative54.1%

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

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

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

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

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

              \[\leadsto \color{blue}{\frac{-c}{b}} \]
            8. Final simplification65.5%

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

            Reproduce

            ?
            herbie shell --seed 2024163 
            (FPCore (a b c)
              :name "Quadratic roots, narrow range"
              :precision binary64
              :pre (and (and (and (< 1.0536712127723509e-8 a) (< a 94906265.62425156)) (and (< 1.0536712127723509e-8 b) (< b 94906265.62425156))) (and (< 1.0536712127723509e-8 c) (< c 94906265.62425156)))
              (/ (+ (- b) (sqrt (- (* b b) (* (* 4.0 a) c)))) (* 2.0 a)))