Quadratic roots, narrow range

Percentage Accurate: 55.0% → 99.4%
Time: 14.5s
Alternatives: 8
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 8 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.0% 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: 99.4% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \frac{\frac{\left(a \cdot c\right) \cdot -4}{a \cdot 2}}{b + \sqrt{\frac{{b}^{4} + -16 \cdot {\left(a \cdot c\right)}^{2}}{\mathsf{fma}\left(c, a \cdot 4, b \cdot b\right)}}} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (/
  (/ (* (* a c) -4.0) (* a 2.0))
  (+
   b
   (sqrt
    (/
     (+ (pow b 4.0) (* -16.0 (pow (* a c) 2.0)))
     (fma c (* a 4.0) (* b b)))))))
double code(double a, double b, double c) {
	return (((a * c) * -4.0) / (a * 2.0)) / (b + sqrt(((pow(b, 4.0) + (-16.0 * pow((a * c), 2.0))) / fma(c, (a * 4.0), (b * b)))));
}
function code(a, b, c)
	return Float64(Float64(Float64(Float64(a * c) * -4.0) / Float64(a * 2.0)) / Float64(b + sqrt(Float64(Float64((b ^ 4.0) + Float64(-16.0 * (Float64(a * c) ^ 2.0))) / fma(c, Float64(a * 4.0), Float64(b * b))))))
end
code[a_, b_, c_] := N[(N[(N[(N[(a * c), $MachinePrecision] * -4.0), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision] / N[(b + N[Sqrt[N[(N[(N[Power[b, 4.0], $MachinePrecision] + N[(-16.0 * N[Power[N[(a * c), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c * N[(a * 4.0), $MachinePrecision] + N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\frac{\left(a \cdot c\right) \cdot -4}{a \cdot 2}}{b + \sqrt{\frac{{b}^{4} + -16 \cdot {\left(a \cdot c\right)}^{2}}{\mathsf{fma}\left(c, a \cdot 4, b \cdot b\right)}}}
\end{array}
Derivation
  1. Initial program 53.5%

    \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
  2. Step-by-step derivation
    1. Simplified53.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. *-commutative53.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-eval53.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-in53.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-in53.6%

        \[\leadsto \frac{\sqrt{\mathsf{fma}\left(b, b, \color{blue}{-c \cdot \left(4 \cdot a\right)}\right)} - b}{a \cdot 2} \]
      5. *-commutative53.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-neg53.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 2: 99.3% accurate, 0.3× speedup?

      \[\begin{array}{l} \\ \frac{c \cdot \frac{a \cdot -4}{b + \sqrt{\frac{{b}^{4} + -16 \cdot {\left(a \cdot c\right)}^{2}}{\mathsf{fma}\left(c, a \cdot 4, b \cdot b\right)}}}}{a \cdot 2} \end{array} \]
      (FPCore (a b c)
       :precision binary64
       (/
        (*
         c
         (/
          (* a -4.0)
          (+
           b
           (sqrt
            (/
             (+ (pow b 4.0) (* -16.0 (pow (* a c) 2.0)))
             (fma c (* a 4.0) (* b b)))))))
        (* a 2.0)))
      double code(double a, double b, double c) {
      	return (c * ((a * -4.0) / (b + sqrt(((pow(b, 4.0) + (-16.0 * pow((a * c), 2.0))) / fma(c, (a * 4.0), (b * b))))))) / (a * 2.0);
      }
      
      function code(a, b, c)
      	return Float64(Float64(c * Float64(Float64(a * -4.0) / Float64(b + sqrt(Float64(Float64((b ^ 4.0) + Float64(-16.0 * (Float64(a * c) ^ 2.0))) / fma(c, Float64(a * 4.0), Float64(b * b))))))) / Float64(a * 2.0))
      end
      
      code[a_, b_, c_] := N[(N[(c * N[(N[(a * -4.0), $MachinePrecision] / N[(b + N[Sqrt[N[(N[(N[Power[b, 4.0], $MachinePrecision] + N[(-16.0 * N[Power[N[(a * c), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c * N[(a * 4.0), $MachinePrecision] + N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision]
      
      \begin{array}{l}
      
      \\
      \frac{c \cdot \frac{a \cdot -4}{b + \sqrt{\frac{{b}^{4} + -16 \cdot {\left(a \cdot c\right)}^{2}}{\mathsf{fma}\left(c, a \cdot 4, b \cdot b\right)}}}}{a \cdot 2}
      \end{array}
      
      Derivation
      1. Initial program 53.5%

        \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
      2. Step-by-step derivation
        1. Simplified53.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. *-commutative53.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-eval53.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-in53.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-in53.6%

            \[\leadsto \frac{\sqrt{\mathsf{fma}\left(b, b, \color{blue}{-c \cdot \left(4 \cdot a\right)}\right)} - b}{a \cdot 2} \]
          5. *-commutative53.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-neg53.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 3: 86.0% accurate, 0.5× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_0 := b \cdot b + \left(a \cdot c\right) \cdot -4\\ \mathbf{if}\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b}{a \cdot 2} \leq -0.007:\\ \;\;\;\;\frac{\frac{t_0 - b \cdot b}{b + \sqrt{t_0}}}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{a}{{b}^{3}} \cdot \left(-c \cdot c\right) - \frac{c}{b}\\ \end{array} \end{array} \]
          (FPCore (a b c)
           :precision binary64
           (let* ((t_0 (+ (* b b) (* (* a c) -4.0))))
             (if (<= (/ (- (sqrt (- (* b b) (* c (* a 4.0)))) b) (* a 2.0)) -0.007)
               (/ (/ (- t_0 (* b b)) (+ b (sqrt t_0))) (* a 2.0))
               (- (* (/ a (pow b 3.0)) (- (* c c))) (/ c b)))))
          double code(double a, double b, double c) {
          	double t_0 = (b * b) + ((a * c) * -4.0);
          	double tmp;
          	if (((sqrt(((b * b) - (c * (a * 4.0)))) - b) / (a * 2.0)) <= -0.007) {
          		tmp = ((t_0 - (b * b)) / (b + sqrt(t_0))) / (a * 2.0);
          	} else {
          		tmp = ((a / pow(b, 3.0)) * -(c * c)) - (c / b);
          	}
          	return tmp;
          }
          
          real(8) function code(a, b, c)
              real(8), intent (in) :: a
              real(8), intent (in) :: b
              real(8), intent (in) :: c
              real(8) :: t_0
              real(8) :: tmp
              t_0 = (b * b) + ((a * c) * (-4.0d0))
              if (((sqrt(((b * b) - (c * (a * 4.0d0)))) - b) / (a * 2.0d0)) <= (-0.007d0)) then
                  tmp = ((t_0 - (b * b)) / (b + sqrt(t_0))) / (a * 2.0d0)
              else
                  tmp = ((a / (b ** 3.0d0)) * -(c * c)) - (c / b)
              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 (((Math.sqrt(((b * b) - (c * (a * 4.0)))) - b) / (a * 2.0)) <= -0.007) {
          		tmp = ((t_0 - (b * b)) / (b + Math.sqrt(t_0))) / (a * 2.0);
          	} else {
          		tmp = ((a / Math.pow(b, 3.0)) * -(c * c)) - (c / b);
          	}
          	return tmp;
          }
          
          def code(a, b, c):
          	t_0 = (b * b) + ((a * c) * -4.0)
          	tmp = 0
          	if ((math.sqrt(((b * b) - (c * (a * 4.0)))) - b) / (a * 2.0)) <= -0.007:
          		tmp = ((t_0 - (b * b)) / (b + math.sqrt(t_0))) / (a * 2.0)
          	else:
          		tmp = ((a / math.pow(b, 3.0)) * -(c * c)) - (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 (Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(c * Float64(a * 4.0)))) - b) / Float64(a * 2.0)) <= -0.007)
          		tmp = Float64(Float64(Float64(t_0 - Float64(b * b)) / Float64(b + sqrt(t_0))) / Float64(a * 2.0));
          	else
          		tmp = Float64(Float64(Float64(a / (b ^ 3.0)) * Float64(-Float64(c * c))) - Float64(c / b));
          	end
          	return tmp
          end
          
          function tmp_2 = code(a, b, c)
          	t_0 = (b * b) + ((a * c) * -4.0);
          	tmp = 0.0;
          	if (((sqrt(((b * b) - (c * (a * 4.0)))) - b) / (a * 2.0)) <= -0.007)
          		tmp = ((t_0 - (b * b)) / (b + sqrt(t_0))) / (a * 2.0);
          	else
          		tmp = ((a / (b ^ 3.0)) * -(c * c)) - (c / b);
          	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[N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(c * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision], -0.007], 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[(a / N[Power[b, 3.0], $MachinePrecision]), $MachinePrecision] * (-N[(c * c), $MachinePrecision])), $MachinePrecision] - N[(c / b), $MachinePrecision]), $MachinePrecision]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_0 := b \cdot b + \left(a \cdot c\right) \cdot -4\\
          \mathbf{if}\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b}{a \cdot 2} \leq -0.007:\\
          \;\;\;\;\frac{\frac{t_0 - b \cdot b}{b + \sqrt{t_0}}}{a \cdot 2}\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{a}{{b}^{3}} \cdot \left(-c \cdot c\right) - \frac{c}{b}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 4 a) c)))) (*.f64 2 a)) < -0.00700000000000000015

            1. Initial program 76.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. Simplified76.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. *-commutative76.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-eval76.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-in76.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-in76.8%

                  \[\leadsto \frac{\sqrt{\mathsf{fma}\left(b, b, \color{blue}{-c \cdot \left(4 \cdot a\right)}\right)} - b}{a \cdot 2} \]
                5. *-commutative76.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-neg76.8%

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

                  \[\leadsto \frac{\sqrt{b \cdot b - \color{blue}{4 \cdot \left(a \cdot c\right)}} - b}{a \cdot 2} \]
              3. Applied egg-rr76.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. flip--76.8%

                  \[\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-sqrt79.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} \]
                3. cancel-sign-sub-inv79.0%

                  \[\leadsto \frac{\frac{\color{blue}{\left(b \cdot b + \left(-4\right) \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} \]
                4. metadata-eval79.0%

                  \[\leadsto \frac{\frac{\left(b \cdot b + \color{blue}{-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. cancel-sign-sub-inv79.0%

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

                  \[\leadsto \frac{\frac{\left(b \cdot b + -4 \cdot \left(a \cdot c\right)\right) - b \cdot b}{\sqrt{b \cdot b + \color{blue}{-4} \cdot \left(a \cdot c\right)} + b}}{a \cdot 2} \]
              5. Applied egg-rr79.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.00700000000000000015 < (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 4 a) c)))) (*.f64 2 a))

              1. Initial program 44.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 88.8%

                \[\leadsto \color{blue}{-1 \cdot \frac{c}{b} + -1 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}}} \]
              3. Step-by-step derivation
                1. mul-1-neg88.8%

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

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

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

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

                  \[\leadsto \frac{-c}{b} - \color{blue}{\frac{a}{\frac{{b}^{3}}{{c}^{2}}}} \]
                6. associate-/r/88.8%

                  \[\leadsto \frac{-c}{b} - \color{blue}{\frac{a}{{b}^{3}} \cdot {c}^{2}} \]
                7. unpow288.8%

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

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

              \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b}{a \cdot 2} \leq -0.007:\\ \;\;\;\;\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{a}{{b}^{3}} \cdot \left(-c \cdot c\right) - \frac{c}{b}\\ \end{array} \]

            Alternative 4: 85.5% accurate, 0.5× speedup?

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

              1. Initial program 76.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. Simplified76.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. *-commutative76.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-eval76.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-in76.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-in76.8%

                    \[\leadsto \frac{\sqrt{\mathsf{fma}\left(b, b, \color{blue}{-c \cdot \left(4 \cdot a\right)}\right)} - b}{a \cdot 2} \]
                  5. *-commutative76.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-neg76.8%

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

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

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

                if -0.00700000000000000015 < (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 4 a) c)))) (*.f64 2 a))

                1. Initial program 44.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 88.8%

                  \[\leadsto \color{blue}{-1 \cdot \frac{c}{b} + -1 \cdot \frac{a \cdot {c}^{2}}{{b}^{3}}} \]
                3. Step-by-step derivation
                  1. mul-1-neg88.8%

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

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

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

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

                    \[\leadsto \frac{-c}{b} - \color{blue}{\frac{a}{\frac{{b}^{3}}{{c}^{2}}}} \]
                  6. associate-/r/88.8%

                    \[\leadsto \frac{-c}{b} - \color{blue}{\frac{a}{{b}^{3}} \cdot {c}^{2}} \]
                  7. unpow288.8%

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

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

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

              Alternative 5: 99.3% accurate, 0.5× speedup?

              \[\begin{array}{l} \\ \frac{\frac{c \cdot \left(a \cdot -4\right)}{b + \sqrt{\mathsf{fma}\left(-4, a \cdot c, b \cdot b\right)}}}{a \cdot 2} \end{array} \]
              (FPCore (a b c)
               :precision binary64
               (/ (/ (* c (* a -4.0)) (+ b (sqrt (fma -4.0 (* a c) (* b b))))) (* a 2.0)))
              double code(double a, double b, double c) {
              	return ((c * (a * -4.0)) / (b + sqrt(fma(-4.0, (a * c), (b * b))))) / (a * 2.0);
              }
              
              function code(a, b, c)
              	return Float64(Float64(Float64(c * Float64(a * -4.0)) / Float64(b + sqrt(fma(-4.0, Float64(a * c), Float64(b * b))))) / Float64(a * 2.0))
              end
              
              code[a_, b_, c_] := N[(N[(N[(c * N[(a * -4.0), $MachinePrecision]), $MachinePrecision] / N[(b + N[Sqrt[N[(-4.0 * N[(a * c), $MachinePrecision] + N[(b * b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision]
              
              \begin{array}{l}
              
              \\
              \frac{\frac{c \cdot \left(a \cdot -4\right)}{b + \sqrt{\mathsf{fma}\left(-4, a \cdot c, b \cdot b\right)}}}{a \cdot 2}
              \end{array}
              
              Derivation
              1. Initial program 53.5%

                \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
              2. Step-by-step derivation
                1. Simplified53.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. *-commutative53.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-eval53.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-in53.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-in53.6%

                    \[\leadsto \frac{\sqrt{\mathsf{fma}\left(b, b, \color{blue}{-c \cdot \left(4 \cdot a\right)}\right)} - b}{a \cdot 2} \]
                  5. *-commutative53.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-neg53.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  Alternative 6: 81.8% accurate, 1.0× speedup?

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

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

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

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

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

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

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

                      \[\leadsto \frac{-c}{b} - \color{blue}{\frac{a}{\frac{{b}^{3}}{{c}^{2}}}} \]
                    6. associate-/r/82.6%

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

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

                    \[\leadsto \color{blue}{\frac{-c}{b} - \frac{a}{{b}^{3}} \cdot \left(c \cdot c\right)} \]
                  5. Final simplification82.6%

                    \[\leadsto \frac{a}{{b}^{3}} \cdot \left(-c \cdot c\right) - \frac{c}{b} \]

                  Alternative 7: 64.7% 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 53.5%

                    \[\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.8%

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

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

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

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

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

                  Alternative 8: 3.2% accurate, 38.7× speedup?

                  \[\begin{array}{l} \\ \frac{0}{a} \end{array} \]
                  (FPCore (a b c) :precision binary64 (/ 0.0 a))
                  double code(double a, double b, double c) {
                  	return 0.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 = 0.0d0 / a
                  end function
                  
                  public static double code(double a, double b, double c) {
                  	return 0.0 / a;
                  }
                  
                  def code(a, b, c):
                  	return 0.0 / a
                  
                  function code(a, b, c)
                  	return Float64(0.0 / a)
                  end
                  
                  function tmp = code(a, b, c)
                  	tmp = 0.0 / a;
                  end
                  
                  code[a_, b_, c_] := N[(0.0 / a), $MachinePrecision]
                  
                  \begin{array}{l}
                  
                  \\
                  \frac{0}{a}
                  \end{array}
                  
                  Derivation
                  1. Initial program 53.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \color{blue}{0.25 \cdot \frac{-2 \cdot \sqrt{a \cdot c} + 2 \cdot \sqrt{a \cdot c}}{a}} \]
                  7. Step-by-step derivation
                    1. associate-*r/3.2%

                      \[\leadsto \color{blue}{\frac{0.25 \cdot \left(-2 \cdot \sqrt{a \cdot c} + 2 \cdot \sqrt{a \cdot c}\right)}{a}} \]
                    2. distribute-rgt-out3.2%

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

                      \[\leadsto \frac{0.25 \cdot \left(\sqrt{a \cdot c} \cdot \color{blue}{0}\right)}{a} \]
                    4. mul0-rgt3.2%

                      \[\leadsto \frac{0.25 \cdot \color{blue}{0}}{a} \]
                    5. metadata-eval3.2%

                      \[\leadsto \frac{\color{blue}{0}}{a} \]
                  8. Simplified3.2%

                    \[\leadsto \color{blue}{\frac{0}{a}} \]
                  9. Final simplification3.2%

                    \[\leadsto \frac{0}{a} \]

                  Reproduce

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