Quadratic roots, narrow range

?

Percentage Accurate: 55.4% → 90.8%
Time: 18.0s
Precision: binary64
Cost: 41152

?

\[\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)\]
\[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
\[\mathsf{fma}\left(-0.25, \frac{{a}^{3}}{b} \cdot \left(\left(\left(c \cdot c\right) \cdot \left(\left(c \cdot c\right) \cdot {b}^{-6}\right)\right) \cdot 20\right), -2 \cdot \left(\left(\left(c \cdot c\right) \cdot \left(c \cdot {b}^{-5}\right)\right) \cdot \left(a \cdot a\right)\right)\right) - \mathsf{fma}\left(\frac{c}{\frac{{b}^{3}}{c}}, a, \frac{c}{b}\right) \]
(FPCore (a b c)
 :precision binary64
 (/ (+ (- b) (sqrt (- (* b b) (* (* 4.0 a) c)))) (* 2.0 a)))
(FPCore (a b c)
 :precision binary64
 (-
  (fma
   -0.25
   (* (/ (pow a 3.0) b) (* (* (* c c) (* (* c c) (pow b -6.0))) 20.0))
   (* -2.0 (* (* (* c c) (* c (pow b -5.0))) (* a a))))
  (fma (/ c (/ (pow b 3.0) c)) a (/ c b))))
double code(double a, double b, double c) {
	return (-b + sqrt(((b * b) - ((4.0 * a) * c)))) / (2.0 * a);
}
double code(double a, double b, double c) {
	return fma(-0.25, ((pow(a, 3.0) / b) * (((c * c) * ((c * c) * pow(b, -6.0))) * 20.0)), (-2.0 * (((c * c) * (c * pow(b, -5.0))) * (a * a)))) - fma((c / (pow(b, 3.0) / c)), a, (c / b));
}
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 code(a, b, c)
	return Float64(fma(-0.25, Float64(Float64((a ^ 3.0) / b) * Float64(Float64(Float64(c * c) * Float64(Float64(c * c) * (b ^ -6.0))) * 20.0)), Float64(-2.0 * Float64(Float64(Float64(c * c) * Float64(c * (b ^ -5.0))) * Float64(a * a)))) - fma(Float64(c / Float64((b ^ 3.0) / c)), a, Float64(c / b)))
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]
code[a_, b_, c_] := N[(N[(-0.25 * N[(N[(N[Power[a, 3.0], $MachinePrecision] / b), $MachinePrecision] * N[(N[(N[(c * c), $MachinePrecision] * N[(N[(c * c), $MachinePrecision] * N[Power[b, -6.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 20.0), $MachinePrecision]), $MachinePrecision] + N[(-2.0 * N[(N[(N[(c * c), $MachinePrecision] * N[(c * N[Power[b, -5.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(c / N[(N[Power[b, 3.0], $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision] * a + N[(c / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}
\mathsf{fma}\left(-0.25, \frac{{a}^{3}}{b} \cdot \left(\left(\left(c \cdot c\right) \cdot \left(\left(c \cdot c\right) \cdot {b}^{-6}\right)\right) \cdot 20\right), -2 \cdot \left(\left(\left(c \cdot c\right) \cdot \left(c \cdot {b}^{-5}\right)\right) \cdot \left(a \cdot a\right)\right)\right) - \mathsf{fma}\left(\frac{c}{\frac{{b}^{3}}{c}}, a, \frac{c}{b}\right)

Local Percentage Accuracy?

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.

Herbie found 7 alternatives:

AlternativeAccuracySpeedup

Accuracy vs Speed

The accuracy (vertical axis) and speed (horizontal axis) of each of Herbie's proposed alternatives. Up and to the right is better. Each dot represents an alternative program; the red square represents the initial program.

Bogosity?

Bogosity

Derivation?

  1. Initial program 54.3%

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

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

    [Start]54.3

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

    *-commutative [=>]54.3

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

    +-commutative [=>]54.3

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

    unsub-neg [=>]54.3

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

    fma-neg [=>]54.4

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

    associate-*l* [=>]54.4

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

    *-commutative [=>]54.4

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

    distribute-rgt-neg-in [=>]54.4

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

    metadata-eval [=>]54.4

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

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

    \[\leadsto \color{blue}{\mathsf{fma}\left(-0.25, \frac{{a}^{3}}{b} \cdot \left(\frac{{c}^{4}}{{b}^{6}} \cdot 20\right), -2 \cdot \left(\frac{{c}^{3}}{{b}^{5}} \cdot \left(a \cdot a\right)\right)\right) - \mathsf{fma}\left(\frac{c}{\frac{{b}^{3}}{c}}, a, \frac{c}{b}\right)} \]
    Step-by-step derivation

    [Start]92.6

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

    associate-+r+ [=>]92.6

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

    +-commutative [=>]92.6

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

    distribute-lft-out [=>]92.6

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

    mul-1-neg [=>]92.6

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

    unsub-neg [=>]92.6

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

    \[\leadsto \mathsf{fma}\left(-0.25, \frac{{a}^{3}}{b} \cdot \left(\frac{{c}^{4}}{{b}^{6}} \cdot 20\right), -2 \cdot \left(\color{blue}{\left(\left(c \cdot c\right) \cdot \left(c \cdot {b}^{-5}\right)\right)} \cdot \left(a \cdot a\right)\right)\right) - \mathsf{fma}\left(\frac{c}{\frac{{b}^{3}}{c}}, a, \frac{c}{b}\right) \]
    Step-by-step derivation

    [Start]92.6

    \[ \mathsf{fma}\left(-0.25, \frac{{a}^{3}}{b} \cdot \left(\frac{{c}^{4}}{{b}^{6}} \cdot 20\right), -2 \cdot \left(\frac{{c}^{3}}{{b}^{5}} \cdot \left(a \cdot a\right)\right)\right) - \mathsf{fma}\left(\frac{c}{\frac{{b}^{3}}{c}}, a, \frac{c}{b}\right) \]

    div-inv [=>]92.6

    \[ \mathsf{fma}\left(-0.25, \frac{{a}^{3}}{b} \cdot \left(\frac{{c}^{4}}{{b}^{6}} \cdot 20\right), -2 \cdot \left(\color{blue}{\left({c}^{3} \cdot \frac{1}{{b}^{5}}\right)} \cdot \left(a \cdot a\right)\right)\right) - \mathsf{fma}\left(\frac{c}{\frac{{b}^{3}}{c}}, a, \frac{c}{b}\right) \]

    unpow3 [=>]92.6

    \[ \mathsf{fma}\left(-0.25, \frac{{a}^{3}}{b} \cdot \left(\frac{{c}^{4}}{{b}^{6}} \cdot 20\right), -2 \cdot \left(\left(\color{blue}{\left(\left(c \cdot c\right) \cdot c\right)} \cdot \frac{1}{{b}^{5}}\right) \cdot \left(a \cdot a\right)\right)\right) - \mathsf{fma}\left(\frac{c}{\frac{{b}^{3}}{c}}, a, \frac{c}{b}\right) \]

    associate-*l* [=>]92.6

    \[ \mathsf{fma}\left(-0.25, \frac{{a}^{3}}{b} \cdot \left(\frac{{c}^{4}}{{b}^{6}} \cdot 20\right), -2 \cdot \left(\color{blue}{\left(\left(c \cdot c\right) \cdot \left(c \cdot \frac{1}{{b}^{5}}\right)\right)} \cdot \left(a \cdot a\right)\right)\right) - \mathsf{fma}\left(\frac{c}{\frac{{b}^{3}}{c}}, a, \frac{c}{b}\right) \]

    pow-flip [=>]92.6

    \[ \mathsf{fma}\left(-0.25, \frac{{a}^{3}}{b} \cdot \left(\frac{{c}^{4}}{{b}^{6}} \cdot 20\right), -2 \cdot \left(\left(\left(c \cdot c\right) \cdot \left(c \cdot \color{blue}{{b}^{\left(-5\right)}}\right)\right) \cdot \left(a \cdot a\right)\right)\right) - \mathsf{fma}\left(\frac{c}{\frac{{b}^{3}}{c}}, a, \frac{c}{b}\right) \]

    metadata-eval [=>]92.6

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

    \[\leadsto \mathsf{fma}\left(-0.25, \frac{{a}^{3}}{b} \cdot \left(\color{blue}{\left(\left(c \cdot c\right) \cdot \left(\left(c \cdot c\right) \cdot {b}^{-6}\right)\right)} \cdot 20\right), -2 \cdot \left(\left(\left(c \cdot c\right) \cdot \left(c \cdot {b}^{-5}\right)\right) \cdot \left(a \cdot a\right)\right)\right) - \mathsf{fma}\left(\frac{c}{\frac{{b}^{3}}{c}}, a, \frac{c}{b}\right) \]
    Step-by-step derivation

    [Start]92.6

    \[ \mathsf{fma}\left(-0.25, \frac{{a}^{3}}{b} \cdot \left(\frac{{c}^{4}}{{b}^{6}} \cdot 20\right), -2 \cdot \left(\left(\left(c \cdot c\right) \cdot \left(c \cdot {b}^{-5}\right)\right) \cdot \left(a \cdot a\right)\right)\right) - \mathsf{fma}\left(\frac{c}{\frac{{b}^{3}}{c}}, a, \frac{c}{b}\right) \]

    div-inv [=>]92.6

    \[ \mathsf{fma}\left(-0.25, \frac{{a}^{3}}{b} \cdot \left(\color{blue}{\left({c}^{4} \cdot \frac{1}{{b}^{6}}\right)} \cdot 20\right), -2 \cdot \left(\left(\left(c \cdot c\right) \cdot \left(c \cdot {b}^{-5}\right)\right) \cdot \left(a \cdot a\right)\right)\right) - \mathsf{fma}\left(\frac{c}{\frac{{b}^{3}}{c}}, a, \frac{c}{b}\right) \]

    metadata-eval [<=]92.6

    \[ \mathsf{fma}\left(-0.25, \frac{{a}^{3}}{b} \cdot \left(\left({c}^{\color{blue}{\left(2 + 2\right)}} \cdot \frac{1}{{b}^{6}}\right) \cdot 20\right), -2 \cdot \left(\left(\left(c \cdot c\right) \cdot \left(c \cdot {b}^{-5}\right)\right) \cdot \left(a \cdot a\right)\right)\right) - \mathsf{fma}\left(\frac{c}{\frac{{b}^{3}}{c}}, a, \frac{c}{b}\right) \]

    metadata-eval [<=]92.6

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

    metadata-eval [<=]92.6

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

    pow-prod-up [<=]92.6

    \[ \mathsf{fma}\left(-0.25, \frac{{a}^{3}}{b} \cdot \left(\left(\color{blue}{\left({c}^{\left(\sqrt{4}\right)} \cdot {c}^{\left(\sqrt{4}\right)}\right)} \cdot \frac{1}{{b}^{6}}\right) \cdot 20\right), -2 \cdot \left(\left(\left(c \cdot c\right) \cdot \left(c \cdot {b}^{-5}\right)\right) \cdot \left(a \cdot a\right)\right)\right) - \mathsf{fma}\left(\frac{c}{\frac{{b}^{3}}{c}}, a, \frac{c}{b}\right) \]

    pow-prod-down [=>]92.6

    \[ \mathsf{fma}\left(-0.25, \frac{{a}^{3}}{b} \cdot \left(\left(\color{blue}{{\left(c \cdot c\right)}^{\left(\sqrt{4}\right)}} \cdot \frac{1}{{b}^{6}}\right) \cdot 20\right), -2 \cdot \left(\left(\left(c \cdot c\right) \cdot \left(c \cdot {b}^{-5}\right)\right) \cdot \left(a \cdot a\right)\right)\right) - \mathsf{fma}\left(\frac{c}{\frac{{b}^{3}}{c}}, a, \frac{c}{b}\right) \]

    metadata-eval [=>]92.6

    \[ \mathsf{fma}\left(-0.25, \frac{{a}^{3}}{b} \cdot \left(\left({\left(c \cdot c\right)}^{\color{blue}{2}} \cdot \frac{1}{{b}^{6}}\right) \cdot 20\right), -2 \cdot \left(\left(\left(c \cdot c\right) \cdot \left(c \cdot {b}^{-5}\right)\right) \cdot \left(a \cdot a\right)\right)\right) - \mathsf{fma}\left(\frac{c}{\frac{{b}^{3}}{c}}, a, \frac{c}{b}\right) \]

    pow2 [<=]92.6

    \[ \mathsf{fma}\left(-0.25, \frac{{a}^{3}}{b} \cdot \left(\left(\color{blue}{\left(\left(c \cdot c\right) \cdot \left(c \cdot c\right)\right)} \cdot \frac{1}{{b}^{6}}\right) \cdot 20\right), -2 \cdot \left(\left(\left(c \cdot c\right) \cdot \left(c \cdot {b}^{-5}\right)\right) \cdot \left(a \cdot a\right)\right)\right) - \mathsf{fma}\left(\frac{c}{\frac{{b}^{3}}{c}}, a, \frac{c}{b}\right) \]

    associate-*l* [=>]92.6

    \[ \mathsf{fma}\left(-0.25, \frac{{a}^{3}}{b} \cdot \left(\color{blue}{\left(\left(c \cdot c\right) \cdot \left(\left(c \cdot c\right) \cdot \frac{1}{{b}^{6}}\right)\right)} \cdot 20\right), -2 \cdot \left(\left(\left(c \cdot c\right) \cdot \left(c \cdot {b}^{-5}\right)\right) \cdot \left(a \cdot a\right)\right)\right) - \mathsf{fma}\left(\frac{c}{\frac{{b}^{3}}{c}}, a, \frac{c}{b}\right) \]

    pow-flip [=>]92.6

    \[ \mathsf{fma}\left(-0.25, \frac{{a}^{3}}{b} \cdot \left(\left(\left(c \cdot c\right) \cdot \left(\left(c \cdot c\right) \cdot \color{blue}{{b}^{\left(-6\right)}}\right)\right) \cdot 20\right), -2 \cdot \left(\left(\left(c \cdot c\right) \cdot \left(c \cdot {b}^{-5}\right)\right) \cdot \left(a \cdot a\right)\right)\right) - \mathsf{fma}\left(\frac{c}{\frac{{b}^{3}}{c}}, a, \frac{c}{b}\right) \]

    metadata-eval [=>]92.6

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

    \[\leadsto \mathsf{fma}\left(-0.25, \frac{{a}^{3}}{b} \cdot \left(\left(\left(c \cdot c\right) \cdot \left(\left(c \cdot c\right) \cdot {b}^{-6}\right)\right) \cdot 20\right), -2 \cdot \left(\left(\left(c \cdot c\right) \cdot \left(c \cdot {b}^{-5}\right)\right) \cdot \left(a \cdot a\right)\right)\right) - \mathsf{fma}\left(\frac{c}{\frac{{b}^{3}}{c}}, a, \frac{c}{b}\right) \]

Alternatives

Alternative 1
Accuracy89.6%
Cost28164
\[\begin{array}{l} \mathbf{if}\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b}{a \cdot 2} \leq -15:\\ \;\;\;\;\frac{\sqrt{\mathsf{fma}\left(b, b, \left(a \cdot c\right) \cdot -4\right)} - b}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{-2 \cdot {c}^{3}}{\frac{{b}^{5}}{a \cdot a}} - \frac{c}{b}\right) - a \cdot \frac{c}{\frac{{b}^{3}}{c}}\\ \end{array} \]
Alternative 2
Accuracy85.1%
Cost13764
\[\begin{array}{l} \mathbf{if}\;b \leq 0.225:\\ \;\;\;\;\left(\sqrt{\mathsf{fma}\left(b, b, \left(a \cdot c\right) \cdot -4\right)} - b\right) \cdot \frac{0.5}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{a}{b} - \frac{b}{c}}\\ \end{array} \]
Alternative 3
Accuracy85.1%
Cost7492
\[\begin{array}{l} \mathbf{if}\;b \leq 0.22:\\ \;\;\;\;\frac{0.5}{a} \cdot \left(\sqrt{b \cdot b + a \cdot \left(c \cdot -4\right)} - b\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{a}{b} - \frac{b}{c}}\\ \end{array} \]
Alternative 4
Accuracy82.1%
Cost576
\[\frac{1}{\frac{a}{b} - \frac{b}{c}} \]
Alternative 5
Accuracy64.4%
Cost256
\[-\frac{c}{b} \]
Alternative 6
Accuracy1.6%
Cost192
\[\frac{c}{b} \]

Reproduce?

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