Quadratic roots, narrow range

?

Percentage Accurate: 55.4% → 99.3%
Time: 11.6s
Precision: binary64
Cost: 8128

?

\[\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} \]
\[\frac{\frac{c \cdot \left(a \cdot -4\right)}{b + \sqrt{-8 \cdot \left(c \cdot a\right) + \left(b \cdot b + \left(c \cdot a\right) \cdot 4\right)}}}{a \cdot 2} \]
(FPCore (a b c)
 :precision binary64
 (/ (+ (- b) (sqrt (- (* b b) (* (* 4.0 a) c)))) (* 2.0 a)))
(FPCore (a b c)
 :precision binary64
 (/
  (/
   (* c (* a -4.0))
   (+ b (sqrt (+ (* -8.0 (* c a)) (+ (* b b) (* (* c a) 4.0))))))
  (* a 2.0)))
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 ((c * (a * -4.0)) / (b + sqrt(((-8.0 * (c * a)) + ((b * b) + ((c * a) * 4.0)))))) / (a * 2.0);
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    code = (-b + sqrt(((b * b) - ((4.0d0 * a) * c)))) / (2.0d0 * a)
end function
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    code = ((c * (a * (-4.0d0))) / (b + sqrt((((-8.0d0) * (c * a)) + ((b * b) + ((c * a) * 4.0d0)))))) / (a * 2.0d0)
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);
}
public static double code(double a, double b, double c) {
	return ((c * (a * -4.0)) / (b + Math.sqrt(((-8.0 * (c * a)) + ((b * b) + ((c * a) * 4.0)))))) / (a * 2.0);
}
def code(a, b, c):
	return (-b + math.sqrt(((b * b) - ((4.0 * a) * c)))) / (2.0 * a)
def code(a, b, c):
	return ((c * (a * -4.0)) / (b + math.sqrt(((-8.0 * (c * a)) + ((b * b) + ((c * a) * 4.0)))))) / (a * 2.0)
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(Float64(Float64(c * Float64(a * -4.0)) / Float64(b + sqrt(Float64(Float64(-8.0 * Float64(c * a)) + Float64(Float64(b * b) + Float64(Float64(c * a) * 4.0)))))) / Float64(a * 2.0))
end
function tmp = code(a, b, c)
	tmp = (-b + sqrt(((b * b) - ((4.0 * a) * c)))) / (2.0 * a);
end
function tmp = code(a, b, c)
	tmp = ((c * (a * -4.0)) / (b + sqrt(((-8.0 * (c * a)) + ((b * b) + ((c * a) * 4.0)))))) / (a * 2.0);
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[(N[(c * N[(a * -4.0), $MachinePrecision]), $MachinePrecision] / N[(b + N[Sqrt[N[(N[(-8.0 * N[(c * a), $MachinePrecision]), $MachinePrecision] + N[(N[(b * b), $MachinePrecision] + N[(N[(c * a), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision]
\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}
\frac{\frac{c \cdot \left(a \cdot -4\right)}{b + \sqrt{-8 \cdot \left(c \cdot a\right) + \left(b \cdot b + \left(c \cdot a\right) \cdot 4\right)}}}{a \cdot 2}

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.

Herbie found 5 alternatives:

AlternativeAccuracySpeedup

Accuracy vs Speed

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.

Bogosity?

Bogosity

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Initial program 54.9%

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

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

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

    *-commutative [=>]54.9%

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

    +-commutative [=>]54.9%

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

    unsub-neg [=>]54.9%

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

    fma-neg [=>]55.0%

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

    associate-*l* [=>]55.0%

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

    *-commutative [=>]55.0%

    \[ \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 [=>]55.0%

    \[ \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 [=>]55.0%

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

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

    [Start]55.0%

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

    fma-udef [=>]54.9%

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

    *-commutative [=>]54.9%

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

    metadata-eval [<=]54.9%

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

    cancel-sign-sub-inv [<=]54.9%

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

    associate-*l* [<=]54.9%

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

    *-un-lft-identity [=>]54.9%

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

    prod-diff [=>]55.0%

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

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

    [Start]54.9%

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

    +-commutative [=>]54.9%

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

    fma-udef [=>]54.9%

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

    *-rgt-identity [=>]54.9%

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

    *-rgt-identity [=>]54.9%

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

    count-2 [=>]54.9%

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

    *-commutative [=>]54.9%

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

    *-commutative [=>]54.9%

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

    associate-*r* [<=]54.9%

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

    *-rgt-identity [=>]54.9%

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

    fma-neg [<=]54.8%

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

    *-commutative [=>]54.8%

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

    *-commutative [=>]54.8%

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

    associate-*r* [<=]54.8%

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

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

    [Start]54.8%

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

    flip-- [=>]55.1%

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

    add-sqr-sqrt [<=]56.2%

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

    associate-*r* [=>]56.2%

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

    metadata-eval [=>]56.2%

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

    *-commutative [=>]56.2%

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

    cancel-sign-sub-inv [=>]56.2%

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

    metadata-eval [=>]56.2%

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

    *-commutative [=>]56.2%

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

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

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

    [Start]99.4%

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

    distribute-rgt-in [=>]99.4%

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

    associate-*r* [<=]99.4%

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

    associate-*r* [<=]99.4%

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

    +-commutative [=>]99.4%

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

    *-commutative [<=]99.4%

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

    associate-*l* [=>]99.4%

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

    *-commutative [<=]99.4%

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

    *-commutative [=>]99.4%

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

    *-commutative [=>]99.4%

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

    associate-*l* [<=]99.4%

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

    distribute-rgt-in [<=]99.4%

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

    distribute-rgt-out [=>]99.4%

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

    metadata-eval [=>]99.4%

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

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

Alternatives

Alternative 1
Accuracy99.3%
Cost8128
\[\frac{\frac{c \cdot \left(a \cdot -4\right)}{b + \sqrt{-8 \cdot \left(c \cdot a\right) + \left(b \cdot b + \left(c \cdot a\right) \cdot 4\right)}}}{a \cdot 2} \]
Alternative 2
Accuracy85.4%
Cost14788
\[\begin{array}{l} t_0 := \frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b}{a \cdot 2}\\ \mathbf{if}\;t_0 \leq -0.0026:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{-4 \cdot \left(c \cdot a\right)}{b + \left(b + -2 \cdot \frac{c \cdot a}{b}\right)}}{a \cdot 2}\\ \end{array} \]
Alternative 3
Accuracy85.3%
Cost7492
\[\begin{array}{l} \mathbf{if}\;b \leq 0.92:\\ \;\;\;\;\left(\sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)} - b\right) \cdot \frac{0.5}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{-4 \cdot \left(c \cdot a\right)}{b + \left(b + -2 \cdot \frac{c \cdot a}{b}\right)}}{a \cdot 2}\\ \end{array} \]
Alternative 4
Accuracy81.9%
Cost1344
\[\frac{\frac{-4 \cdot \left(c \cdot a\right)}{b + \left(b + -2 \cdot \frac{c \cdot a}{b}\right)}}{a \cdot 2} \]
Alternative 5
Accuracy64.3%
Cost256
\[\frac{-c}{b} \]

Reproduce?

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