Quadratic roots, narrow range

Percentage Accurate: 55.3% → 92.3%
Time: 11.6s
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.3% 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: 92.3% accurate, 0.0× speedup?

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

\\
\begin{array}{l}
t_0 := \frac{{c}^{4}}{{b}^{6}} \cdot 20\\
t_1 := {\left(\frac{c}{b}\right)}^{3}\\
t_2 := b \cdot b - \left(a \cdot c\right) \cdot 4\\
t_3 := \mathsf{fma}\left(b, b, -4 \cdot \left(a \cdot c\right)\right)\\
t_4 := \frac{c \cdot c}{b}\\
t_5 := t_2 + \left(b \cdot b + b \cdot \sqrt{t_2}\right)\\
t_6 := \frac{c}{\frac{b}{0}}\\
\mathbf{if}\;b \leq 0.025:\\
\;\;\;\;\frac{\frac{\frac{{t_3}^{3} - {b}^{6}}{{b}^{3} + {t_3}^{1.5}}}{t_5}}{a \cdot 2}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(a, \left(b \cdot c\right) \cdot -6, \mathsf{fma}\left(a \cdot a, \mathsf{fma}\left(-2, t_4, \mathsf{fma}\left(8, t_4, b \cdot 0\right)\right), \mathsf{fma}\left({a}^{3}, \mathsf{fma}\left(-4, t_1, \mathsf{fma}\left(-2, t_6, \mathsf{fma}\left(8, t_1, b \cdot 0\right)\right)\right), {a}^{4} \cdot \mathsf{fma}\left(-2, t_6, \mathsf{fma}\left(-2, \frac{c \cdot c}{\frac{{b}^{3}}{0}}, \mathsf{fma}\left(-0.5, b \cdot t_0, \mathsf{fma}\left(16, \frac{{c}^{4}}{{b}^{5}}, b \cdot \left(t_0 - t_0\right)\right)\right)\right)\right)\right)\right)\right)}{t_5}}{a \cdot 2}\\


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

    1. Initial program 89.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. Simplified89.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{\color{blue}{\frac{{\left(b \cdot b + -4 \cdot \left(c \cdot a\right)\right)}^{1.5} \cdot {\left(b \cdot b + -4 \cdot \left(c \cdot a\right)\right)}^{1.5} - {b}^{3} \cdot {b}^{3}}{{\left(b \cdot b + -4 \cdot \left(c \cdot a\right)\right)}^{1.5} + {b}^{3}}}}{\left(b \cdot b - 4 \cdot \left(a \cdot c\right)\right) + \left(b \cdot b + \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)} \cdot b\right)}}{a \cdot 2} \]
      8. Step-by-step derivation
        1. pow-sqr89.3%

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

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

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

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

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

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

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

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

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

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

      if 0.025000000000000001 < b

      1. Initial program 52.8%

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

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

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

            \[\leadsto \frac{\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(\color{blue}{\left(-4\right)} \cdot a\right)\right)} - b}{a \cdot 2} \]
          3. distribute-lft-neg-in52.8%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 0.025:\\ \;\;\;\;\frac{\frac{\frac{{\left(\mathsf{fma}\left(b, b, -4 \cdot \left(a \cdot c\right)\right)\right)}^{3} - {b}^{6}}{{b}^{3} + {\left(\mathsf{fma}\left(b, b, -4 \cdot \left(a \cdot c\right)\right)\right)}^{1.5}}}{\left(b \cdot b - \left(a \cdot c\right) \cdot 4\right) + \left(b \cdot b + b \cdot \sqrt{b \cdot b - \left(a \cdot c\right) \cdot 4}\right)}}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\mathsf{fma}\left(a, \left(b \cdot c\right) \cdot -6, \mathsf{fma}\left(a \cdot a, \mathsf{fma}\left(-2, \frac{c \cdot c}{b}, \mathsf{fma}\left(8, \frac{c \cdot c}{b}, b \cdot 0\right)\right), \mathsf{fma}\left({a}^{3}, \mathsf{fma}\left(-4, {\left(\frac{c}{b}\right)}^{3}, \mathsf{fma}\left(-2, \frac{c}{\frac{b}{0}}, \mathsf{fma}\left(8, {\left(\frac{c}{b}\right)}^{3}, b \cdot 0\right)\right)\right), {a}^{4} \cdot \mathsf{fma}\left(-2, \frac{c}{\frac{b}{0}}, \mathsf{fma}\left(-2, \frac{c \cdot c}{\frac{{b}^{3}}{0}}, \mathsf{fma}\left(-0.5, b \cdot \left(\frac{{c}^{4}}{{b}^{6}} \cdot 20\right), \mathsf{fma}\left(16, \frac{{c}^{4}}{{b}^{5}}, b \cdot \left(\frac{{c}^{4}}{{b}^{6}} \cdot 20 - \frac{{c}^{4}}{{b}^{6}} \cdot 20\right)\right)\right)\right)\right)\right)\right)\right)}{\left(b \cdot b - \left(a \cdot c\right) \cdot 4\right) + \left(b \cdot b + b \cdot \sqrt{b \cdot b - \left(a \cdot c\right) \cdot 4}\right)}}{a \cdot 2}\\ \end{array} \]

      Alternative 2: 92.0% accurate, 0.2× speedup?

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

        1. Initial program 89.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. Simplified89.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{\frac{\color{blue}{\frac{{\left(b \cdot b + -4 \cdot \left(c \cdot a\right)\right)}^{1.5} \cdot {\left(b \cdot b + -4 \cdot \left(c \cdot a\right)\right)}^{1.5} - {b}^{3} \cdot {b}^{3}}{{\left(b \cdot b + -4 \cdot \left(c \cdot a\right)\right)}^{1.5} + {b}^{3}}}}{\left(b \cdot b - 4 \cdot \left(a \cdot c\right)\right) + \left(b \cdot b + \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)} \cdot b\right)}}{a \cdot 2} \]
          8. Step-by-step derivation
            1. pow-sqr89.3%

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

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

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

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

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

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

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

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

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

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

          if 0.030499999999999999 < b

          1. Initial program 52.8%

            \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
          2. Taylor expanded in a around 0 93.2%

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

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

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

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

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

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

        Alternative 3: 92.0% accurate, 0.2× speedup?

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

          1. Initial program 89.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. Simplified89.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{\frac{\color{blue}{{\left(b \cdot b + -4 \cdot \left(c \cdot a\right)\right)}^{1.5} + \left(-{b}^{3}\right)}}{\left(b \cdot b - 4 \cdot \left(a \cdot c\right)\right) + \left(b \cdot b + \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)} \cdot b\right)}}{a \cdot 2} \]
            8. Step-by-step derivation
              1. sub-neg89.3%

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

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

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

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

            if 0.021999999999999999 < b

            1. Initial program 52.8%

              \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
            2. Taylor expanded in a around 0 93.2%

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

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

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

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

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

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

          Alternative 4: 89.8% accurate, 0.4× speedup?

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

            1. Initial program 86.6%

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

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

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

                  \[\leadsto \frac{\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(\color{blue}{\left(-4\right)} \cdot a\right)\right)} - b}{a \cdot 2} \]
                3. distribute-lft-neg-in86.6%

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

                  \[\leadsto \frac{\sqrt{\mathsf{fma}\left(b, b, \color{blue}{-c \cdot \left(4 \cdot a\right)}\right)} - b}{a \cdot 2} \]
                5. *-commutative86.6%

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

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

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

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

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

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

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

              if 0.17799999999999999 < b

              1. Initial program 52.4%

                \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
              2. Taylor expanded in b around inf 91.0%

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

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

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

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

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

                  \[\leadsto \color{blue}{\left(-2 \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{5}} - \frac{c}{b}\right)} - \frac{a \cdot {c}^{2}}{{b}^{3}} \]
                6. associate-/l*91.0%

                  \[\leadsto \left(-2 \cdot \color{blue}{\frac{{a}^{2}}{\frac{{b}^{5}}{{c}^{3}}}} - \frac{c}{b}\right) - \frac{a \cdot {c}^{2}}{{b}^{3}} \]
                7. associate-*r/91.0%

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

                  \[\leadsto \left(\frac{-2 \cdot \color{blue}{\left(a \cdot a\right)}}{\frac{{b}^{5}}{{c}^{3}}} - \frac{c}{b}\right) - \frac{a \cdot {c}^{2}}{{b}^{3}} \]
                9. associate-/l*91.0%

                  \[\leadsto \left(\frac{-2 \cdot \left(a \cdot a\right)}{\frac{{b}^{5}}{{c}^{3}}} - \frac{c}{b}\right) - \color{blue}{\frac{a}{\frac{{b}^{3}}{{c}^{2}}}} \]
                10. associate-/r/91.0%

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

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

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

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

            Alternative 5: 85.7% accurate, 0.9× speedup?

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

              1. Initial program 78.4%

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

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

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

                    \[\leadsto \frac{\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(\color{blue}{\left(-4\right)} \cdot a\right)\right)} - b}{a \cdot 2} \]
                  3. distribute-lft-neg-in78.5%

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

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

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

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

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

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

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

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

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

                if 3.7149999999999999 < b

                1. Initial program 49.9%

                  \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
                2. Taylor expanded in b around inf 35.9%

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

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

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

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

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

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

                    \[\leadsto \frac{\frac{\left(-b\right) \cdot \left(-b\right) - \left(b + \frac{-2 \cdot a}{\frac{b}{c}}\right) \cdot \left(b + \frac{-2 \cdot a}{\frac{b}{c}}\right)}{\left(-b\right) - \left(b + \color{blue}{\frac{-2 \cdot a}{\frac{b}{c}}}\right)}}{2 \cdot a} \]
                6. Applied egg-rr35.9%

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

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

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

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

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

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

                    \[\leadsto \frac{\frac{b \cdot b - \left(b + \frac{a \cdot -2}{b} \cdot c\right) \cdot \left(b + \frac{a \cdot -2}{b} \cdot c\right)}{\left(-b\right) - \left(b + \color{blue}{\frac{-2 \cdot a}{b} \cdot c}\right)}}{2 \cdot a} \]
                  7. *-commutative35.9%

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

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

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

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

              Alternative 6: 85.0% accurate, 1.0× speedup?

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

                1. Initial program 86.3%

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

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

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

                      \[\leadsto \frac{\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(\color{blue}{\left(-4\right)} \cdot a\right)\right)} - b}{a \cdot 2} \]
                    3. distribute-lft-neg-in86.3%

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

                      \[\leadsto \frac{\sqrt{\mathsf{fma}\left(b, b, \color{blue}{-c \cdot \left(4 \cdot a\right)}\right)} - b}{a \cdot 2} \]
                    5. *-commutative86.3%

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

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

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

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

                  if 0.185 < b

                  1. Initial program 52.2%

                    \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
                  2. Taylor expanded in b around inf 36.6%

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

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

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

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

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

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

                      \[\leadsto \frac{\frac{\left(-b\right) \cdot \left(-b\right) - \left(b + \frac{-2 \cdot a}{\frac{b}{c}}\right) \cdot \left(b + \frac{-2 \cdot a}{\frac{b}{c}}\right)}{\left(-b\right) - \left(b + \color{blue}{\frac{-2 \cdot a}{\frac{b}{c}}}\right)}}{2 \cdot a} \]
                  6. Applied egg-rr36.5%

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

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

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

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

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

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

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

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

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

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

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

                Alternative 7: 82.3% accurate, 5.3× speedup?

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

                  \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
                2. Taylor expanded in b around inf 36.5%

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

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

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

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

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

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

                    \[\leadsto \frac{\frac{\left(-b\right) \cdot \left(-b\right) - \left(b + \frac{-2 \cdot a}{\frac{b}{c}}\right) \cdot \left(b + \frac{-2 \cdot a}{\frac{b}{c}}\right)}{\left(-b\right) - \left(b + \color{blue}{\frac{-2 \cdot a}{\frac{b}{c}}}\right)}}{2 \cdot a} \]
                6. Applied egg-rr36.5%

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

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

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

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

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

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

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

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

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

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

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

                Alternative 8: 64.5% 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(Float64(-c) / b)
                end
                
                function tmp = code(a, b, c)
                	tmp = -c / b;
                end
                
                code[a_, b_, c_] := N[((-c) / b), $MachinePrecision]
                
                \begin{array}{l}
                
                \\
                \frac{-c}{b}
                \end{array}
                
                Derivation
                1. Initial program 55.0%

                  \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
                2. Taylor expanded in b around inf 65.3%

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

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

                    \[\leadsto \color{blue}{\frac{-c}{b}} \]
                4. Simplified65.3%

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

                  \[\leadsto \frac{-c}{b} \]

                Alternative 9: 1.6% accurate, 38.7× speedup?

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

                  \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
                2. Taylor expanded in b around -inf 11.5%

                  \[\leadsto \color{blue}{-1 \cdot \frac{b}{a} + \frac{c}{b}} \]
                3. Step-by-step derivation
                  1. +-commutative11.5%

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

                    \[\leadsto \frac{c}{b} + \color{blue}{\left(-\frac{b}{a}\right)} \]
                  3. unsub-neg11.5%

                    \[\leadsto \color{blue}{\frac{c}{b} - \frac{b}{a}} \]
                4. Simplified11.5%

                  \[\leadsto \color{blue}{\frac{c}{b} - \frac{b}{a}} \]
                5. Taylor expanded in c around inf 1.6%

                  \[\leadsto \color{blue}{\frac{c}{b}} \]
                6. Final simplification1.6%

                  \[\leadsto \frac{c}{b} \]

                Reproduce

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