Quadratic roots, narrow range

Percentage Accurate: 56.1% → 91.1%
Time: 13.3s
Alternatives: 10
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 10 alternatives:

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

Initial Program: 56.1% accurate, 1.0× speedup?

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

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

Alternative 1: 91.1% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\frac{\sqrt{b \cdot b - c \cdot \left(4 \cdot a\right)} - b}{a \cdot 2} \leq -0.91:\\ \;\;\;\;\frac{\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -4\right)\right)} - b}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;c \cdot \left(c \cdot \left(c \cdot \left(-5 \cdot \frac{c \cdot {a}^{3}}{{b}^{7}} + \frac{{a}^{2}}{{b}^{5}} \cdot -2\right) - \frac{a}{{b}^{3}}\right) + \frac{-1}{b}\right)\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= (/ (- (sqrt (- (* b b) (* c (* 4.0 a)))) b) (* a 2.0)) -0.91)
   (/ (- (sqrt (fma b b (* c (* a -4.0)))) b) (* a 2.0))
   (*
    c
    (+
     (*
      c
      (-
       (*
        c
        (+
         (* -5.0 (/ (* c (pow a 3.0)) (pow b 7.0)))
         (* (/ (pow a 2.0) (pow b 5.0)) -2.0)))
       (/ a (pow b 3.0))))
     (/ -1.0 b)))))
double code(double a, double b, double c) {
	double tmp;
	if (((sqrt(((b * b) - (c * (4.0 * a)))) - b) / (a * 2.0)) <= -0.91) {
		tmp = (sqrt(fma(b, b, (c * (a * -4.0)))) - b) / (a * 2.0);
	} else {
		tmp = c * ((c * ((c * ((-5.0 * ((c * pow(a, 3.0)) / pow(b, 7.0))) + ((pow(a, 2.0) / pow(b, 5.0)) * -2.0))) - (a / pow(b, 3.0)))) + (-1.0 / b));
	}
	return tmp;
}
function code(a, b, c)
	tmp = 0.0
	if (Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(c * Float64(4.0 * a)))) - b) / Float64(a * 2.0)) <= -0.91)
		tmp = Float64(Float64(sqrt(fma(b, b, Float64(c * Float64(a * -4.0)))) - b) / Float64(a * 2.0));
	else
		tmp = Float64(c * Float64(Float64(c * Float64(Float64(c * Float64(Float64(-5.0 * Float64(Float64(c * (a ^ 3.0)) / (b ^ 7.0))) + Float64(Float64((a ^ 2.0) / (b ^ 5.0)) * -2.0))) - Float64(a / (b ^ 3.0)))) + Float64(-1.0 / b)));
	end
	return tmp
end
code[a_, b_, c_] := If[LessEqual[N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(c * N[(4.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision], -0.91], N[(N[(N[Sqrt[N[(b * b + N[(c * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision], N[(c * N[(N[(c * N[(N[(c * N[(N[(-5.0 * N[(N[(c * N[Power[a, 3.0], $MachinePrecision]), $MachinePrecision] / N[Power[b, 7.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[Power[a, 2.0], $MachinePrecision] / N[Power[b, 5.0], $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a / N[Power[b, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;\frac{\sqrt{b \cdot b - c \cdot \left(4 \cdot a\right)} - b}{a \cdot 2} \leq -0.91:\\
\;\;\;\;\frac{\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -4\right)\right)} - b}{a \cdot 2}\\

\mathbf{else}:\\
\;\;\;\;c \cdot \left(c \cdot \left(c \cdot \left(-5 \cdot \frac{c \cdot {a}^{3}}{{b}^{7}} + \frac{{a}^{2}}{{b}^{5}} \cdot -2\right) - \frac{a}{{b}^{3}}\right) + \frac{-1}{b}\right)\\


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

    1. Initial program 85.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. *-commutative85.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 52.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -1 \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(\frac{c}{b}\right)} - 1\right)} + {c}^{4} \cdot \left(-5 \cdot \frac{{a}^{3}}{{b}^{7}} + -1 \cdot \frac{2 \cdot \frac{{a}^{2}}{{b}^{5}} + \frac{a}{{b}^{3} \cdot c}}{c}\right) \]
    8. Applied egg-rr67.0%

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

        \[\leadsto -1 \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{c}{b}\right)\right)} + {c}^{4} \cdot \left(-5 \cdot \frac{{a}^{3}}{{b}^{7}} + -1 \cdot \frac{2 \cdot \frac{{a}^{2}}{{b}^{5}} + \frac{a}{{b}^{3} \cdot c}}{c}\right) \]
    10. Simplified93.2%

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

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

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

Alternative 2: 90.4% accurate, 0.2× speedup?

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

\\
{c}^{4} \cdot \left(-5 \cdot \frac{{a}^{3}}{{b}^{7}} - \frac{2 \cdot \frac{{a}^{2}}{{b}^{5}} + \frac{a}{c \cdot {b}^{3}}}{c}\right) - \frac{c}{b}
\end{array}
Derivation
  1. Initial program 58.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. *-commutative58.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto {c}^{4} \cdot \left(-5 \cdot \frac{{a}^{3}}{{b}^{7}} - \frac{2 \cdot \frac{{a}^{2}}{{b}^{5}} + \frac{a}{c \cdot {b}^{3}}}{c}\right) - \frac{c}{b} \]
  10. Add Preprocessing

Alternative 3: 89.2% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;\frac{\sqrt{b \cdot b - c \cdot \left(4 \cdot a\right)} - b}{a \cdot 2} \leq -0.91:\\
\;\;\;\;\frac{\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -4\right)\right)} - b}{a \cdot 2}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{1}{a}}{\frac{\mathsf{fma}\left(a, \frac{1}{b} + \frac{c \cdot a}{{b}^{3}}, \frac{b}{-c}\right)}{a}}\\


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

    1. Initial program 85.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. *-commutative85.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 52.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{\color{blue}{a \cdot \frac{2}{c \cdot \mathsf{fma}\left(c, \mathsf{fma}\left(-4, {a}^{3} \cdot \frac{c}{{b}^{5}}, -2 \cdot \left({a}^{2} \cdot {b}^{-3}\right)\right), \frac{a}{b} \cdot -2\right)}}} \]
      3. associate-/r*90.6%

        \[\leadsto \color{blue}{\frac{\frac{1}{a}}{\frac{2}{c \cdot \mathsf{fma}\left(c, \mathsf{fma}\left(-4, {a}^{3} \cdot \frac{c}{{b}^{5}}, -2 \cdot \left({a}^{2} \cdot {b}^{-3}\right)\right), \frac{a}{b} \cdot -2\right)}}} \]
      4. associate-/r*90.6%

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

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

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

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

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

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

        \[\leadsto \frac{\frac{1}{a}}{\color{blue}{\frac{\mathsf{fma}\left(a, \frac{1}{b} - \frac{c \cdot a}{-{b}^{3}}, \frac{b}{-c}\right)}{a}}} \]
    12. Recombined 2 regimes into one program.
    13. Final simplification90.2%

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

    Alternative 4: 89.2% accurate, 0.3× speedup?

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

      1. Initial program 85.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. *-commutative85.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

      1. Initial program 52.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{1}{\color{blue}{a \cdot \frac{2}{c \cdot \mathsf{fma}\left(c, \mathsf{fma}\left(-4, {a}^{3} \cdot \frac{c}{{b}^{5}}, -2 \cdot \left({a}^{2} \cdot {b}^{-3}\right)\right), \frac{a}{b} \cdot -2\right)}}} \]
        3. associate-/r*90.6%

          \[\leadsto \color{blue}{\frac{\frac{1}{a}}{\frac{2}{c \cdot \mathsf{fma}\left(c, \mathsf{fma}\left(-4, {a}^{3} \cdot \frac{c}{{b}^{5}}, -2 \cdot \left({a}^{2} \cdot {b}^{-3}\right)\right), \frac{a}{b} \cdot -2\right)}}} \]
        4. associate-/r*90.6%

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{1}{a}}{\frac{\frac{2}{c}}{\mathsf{fma}\left(c, \mathsf{fma}\left(-4, {a}^{3} \cdot \frac{c}{{b}^{5}}, \left({a}^{2} \cdot -2\right) \cdot {b}^{-3}\right), \frac{a \cdot -2}{b}\right)}}} \]
      10. Taylor expanded in b around inf 91.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\frac{1}{a}}{b \cdot \left(\left(\frac{1}{b} \cdot \color{blue}{\frac{1}{b}} + a \cdot \frac{c}{{b}^{4}}\right) + \frac{-1}{c \cdot a}\right)} \]
      14. Applied egg-rr91.1%

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

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

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

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

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

    Alternative 5: 89.2% accurate, 0.5× speedup?

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

      1. Initial program 85.5%

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

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

      1. Initial program 52.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{1}{\color{blue}{a \cdot \frac{2}{c \cdot \mathsf{fma}\left(c, \mathsf{fma}\left(-4, {a}^{3} \cdot \frac{c}{{b}^{5}}, -2 \cdot \left({a}^{2} \cdot {b}^{-3}\right)\right), \frac{a}{b} \cdot -2\right)}}} \]
        3. associate-/r*90.6%

          \[\leadsto \color{blue}{\frac{\frac{1}{a}}{\frac{2}{c \cdot \mathsf{fma}\left(c, \mathsf{fma}\left(-4, {a}^{3} \cdot \frac{c}{{b}^{5}}, -2 \cdot \left({a}^{2} \cdot {b}^{-3}\right)\right), \frac{a}{b} \cdot -2\right)}}} \]
        4. associate-/r*90.6%

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{1}{a}}{\frac{\frac{2}{c}}{\mathsf{fma}\left(c, \mathsf{fma}\left(-4, {a}^{3} \cdot \frac{c}{{b}^{5}}, \left({a}^{2} \cdot -2\right) \cdot {b}^{-3}\right), \frac{a \cdot -2}{b}\right)}}} \]
      10. Taylor expanded in b around inf 91.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\frac{1}{a}}{b \cdot \left(\left(\frac{1}{b} \cdot \color{blue}{\frac{1}{b}} + a \cdot \frac{c}{{b}^{4}}\right) + \frac{-1}{c \cdot a}\right)} \]
      14. Applied egg-rr91.1%

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

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

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

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

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

    Alternative 6: 85.2% accurate, 0.5× speedup?

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

      1. Initial program 79.5%

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

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

      1. Initial program 44.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. *-commutative44.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{1}{\color{blue}{a \cdot \frac{2}{c \cdot \mathsf{fma}\left(c, \mathsf{fma}\left(-4, {a}^{3} \cdot \frac{c}{{b}^{5}}, -2 \cdot \left({a}^{2} \cdot {b}^{-3}\right)\right), \frac{a}{b} \cdot -2\right)}}} \]
        3. associate-/r*94.7%

          \[\leadsto \color{blue}{\frac{\frac{1}{a}}{\frac{2}{c \cdot \mathsf{fma}\left(c, \mathsf{fma}\left(-4, {a}^{3} \cdot \frac{c}{{b}^{5}}, -2 \cdot \left({a}^{2} \cdot {b}^{-3}\right)\right), \frac{a}{b} \cdot -2\right)}}} \]
        4. associate-/r*94.6%

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{1}{a}}{\frac{\frac{2}{c}}{\mathsf{fma}\left(c, \mathsf{fma}\left(-4, {a}^{3} \cdot \frac{c}{{b}^{5}}, \left({a}^{2} \cdot -2\right) \cdot {b}^{-3}\right), \frac{a \cdot -2}{b}\right)}}} \]
      10. Taylor expanded in b around inf 91.4%

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

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

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

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

    Alternative 7: 85.3% accurate, 0.5× speedup?

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

      1. Initial program 79.5%

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

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

      1. Initial program 44.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. *-commutative44.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{1}{\color{blue}{a \cdot \frac{2}{c \cdot \mathsf{fma}\left(c, \mathsf{fma}\left(-4, {a}^{3} \cdot \frac{c}{{b}^{5}}, -2 \cdot \left({a}^{2} \cdot {b}^{-3}\right)\right), \frac{a}{b} \cdot -2\right)}}} \]
        3. associate-/r*94.7%

          \[\leadsto \color{blue}{\frac{\frac{1}{a}}{\frac{2}{c \cdot \mathsf{fma}\left(c, \mathsf{fma}\left(-4, {a}^{3} \cdot \frac{c}{{b}^{5}}, -2 \cdot \left({a}^{2} \cdot {b}^{-3}\right)\right), \frac{a}{b} \cdot -2\right)}}} \]
        4. associate-/r*94.6%

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

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

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

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

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

        \[\leadsto \frac{\frac{1}{a}}{\color{blue}{\frac{-1 \cdot \frac{b}{c} + \frac{a}{b}}{a}}} \]
      11. Step-by-step derivation
        1. +-commutative91.4%

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

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

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

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

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

    Alternative 8: 81.5% accurate, 8.9× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{\color{blue}{a \cdot \frac{2}{c \cdot \mathsf{fma}\left(c, \mathsf{fma}\left(-4, {a}^{3} \cdot \frac{c}{{b}^{5}}, -2 \cdot \left({a}^{2} \cdot {b}^{-3}\right)\right), \frac{a}{b} \cdot -2\right)}}} \]
      3. associate-/r*86.5%

        \[\leadsto \color{blue}{\frac{\frac{1}{a}}{\frac{2}{c \cdot \mathsf{fma}\left(c, \mathsf{fma}\left(-4, {a}^{3} \cdot \frac{c}{{b}^{5}}, -2 \cdot \left({a}^{2} \cdot {b}^{-3}\right)\right), \frac{a}{b} \cdot -2\right)}}} \]
      4. associate-/r*86.5%

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

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

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

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

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

      \[\leadsto \frac{\frac{1}{a}}{\color{blue}{\frac{-1 \cdot \frac{b}{a} + \frac{c}{b}}{c}}} \]
    11. Step-by-step derivation
      1. +-commutative80.6%

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

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

        \[\leadsto \frac{\frac{1}{a}}{\frac{\color{blue}{\frac{c}{b} - \frac{b}{a}}}{c}} \]
    12. Simplified80.6%

      \[\leadsto \frac{\frac{1}{a}}{\color{blue}{\frac{\frac{c}{b} - \frac{b}{a}}{c}}} \]
    13. Add Preprocessing

    Alternative 9: 81.5% accurate, 8.9× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{\color{blue}{a \cdot \frac{2}{c \cdot \mathsf{fma}\left(c, \mathsf{fma}\left(-4, {a}^{3} \cdot \frac{c}{{b}^{5}}, -2 \cdot \left({a}^{2} \cdot {b}^{-3}\right)\right), \frac{a}{b} \cdot -2\right)}}} \]
      3. associate-/r*86.5%

        \[\leadsto \color{blue}{\frac{\frac{1}{a}}{\frac{2}{c \cdot \mathsf{fma}\left(c, \mathsf{fma}\left(-4, {a}^{3} \cdot \frac{c}{{b}^{5}}, -2 \cdot \left({a}^{2} \cdot {b}^{-3}\right)\right), \frac{a}{b} \cdot -2\right)}}} \]
      4. associate-/r*86.5%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{1}{a}}{\frac{\color{blue}{\frac{a}{b} - \frac{b}{c}}}{a}} \]
    12. Simplified80.5%

      \[\leadsto \frac{\frac{1}{a}}{\color{blue}{\frac{\frac{a}{b} - \frac{b}{c}}{a}}} \]
    13. Add Preprocessing

    Alternative 10: 63.8% 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 58.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. *-commutative58.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Reproduce

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