?

Average Error: 53.2% → 12.34%
Time: 21.0s
Precision: binary64
Cost: 13964

?

\[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
\[\begin{array}{l} \mathbf{if}\;b \leq -7.2 \cdot 10^{+152}:\\ \;\;\;\;\frac{-b}{a}\\ \mathbf{elif}\;b \leq -3.7 \cdot 10^{-306}:\\ \;\;\;\;\frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -4\right)} - b}{a \cdot 2}\\ \mathbf{elif}\;b \leq 2.9:\\ \;\;\;\;\frac{c \cdot -2}{b + \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -4\right)}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -2}{\mathsf{fma}\left(b, 2, 0.5 \cdot \frac{a \cdot -4}{\frac{b}{c}}\right)}\\ \end{array} \]
(FPCore (a b c)
 :precision binary64
 (/ (+ (- b) (sqrt (- (* b b) (* (* 4.0 a) c)))) (* 2.0 a)))
(FPCore (a b c)
 :precision binary64
 (if (<= b -7.2e+152)
   (/ (- b) a)
   (if (<= b -3.7e-306)
     (/ (- (sqrt (+ (* b b) (* c (* a -4.0)))) b) (* a 2.0))
     (if (<= b 2.9)
       (/ (* c -2.0) (+ b (hypot b (sqrt (* a (* c -4.0))))))
       (/ (* c -2.0) (fma b 2.0 (* 0.5 (/ (* a -4.0) (/ b c)))))))))
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) {
	double tmp;
	if (b <= -7.2e+152) {
		tmp = -b / a;
	} else if (b <= -3.7e-306) {
		tmp = (sqrt(((b * b) + (c * (a * -4.0)))) - b) / (a * 2.0);
	} else if (b <= 2.9) {
		tmp = (c * -2.0) / (b + hypot(b, sqrt((a * (c * -4.0)))));
	} else {
		tmp = (c * -2.0) / fma(b, 2.0, (0.5 * ((a * -4.0) / (b / c))));
	}
	return tmp;
}
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)
	tmp = 0.0
	if (b <= -7.2e+152)
		tmp = Float64(Float64(-b) / a);
	elseif (b <= -3.7e-306)
		tmp = Float64(Float64(sqrt(Float64(Float64(b * b) + Float64(c * Float64(a * -4.0)))) - b) / Float64(a * 2.0));
	elseif (b <= 2.9)
		tmp = Float64(Float64(c * -2.0) / Float64(b + hypot(b, sqrt(Float64(a * Float64(c * -4.0))))));
	else
		tmp = Float64(Float64(c * -2.0) / fma(b, 2.0, Float64(0.5 * Float64(Float64(a * -4.0) / Float64(b / c)))));
	end
	return tmp
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_] := If[LessEqual[b, -7.2e+152], N[((-b) / a), $MachinePrecision], If[LessEqual[b, -3.7e-306], N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] + N[(c * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.9], N[(N[(c * -2.0), $MachinePrecision] / N[(b + N[Sqrt[b ^ 2 + N[Sqrt[N[(a * N[(c * -4.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(c * -2.0), $MachinePrecision] / N[(b * 2.0 + N[(0.5 * N[(N[(a * -4.0), $MachinePrecision] / N[(b / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}
\begin{array}{l}
\mathbf{if}\;b \leq -7.2 \cdot 10^{+152}:\\
\;\;\;\;\frac{-b}{a}\\

\mathbf{elif}\;b \leq -3.7 \cdot 10^{-306}:\\
\;\;\;\;\frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -4\right)} - b}{a \cdot 2}\\

\mathbf{elif}\;b \leq 2.9:\\
\;\;\;\;\frac{c \cdot -2}{b + \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -4\right)}\right)}\\

\mathbf{else}:\\
\;\;\;\;\frac{c \cdot -2}{\mathsf{fma}\left(b, 2, 0.5 \cdot \frac{a \cdot -4}{\frac{b}{c}}\right)}\\


\end{array}

Error?

Derivation?

  1. Split input into 4 regimes
  2. if b < -7.1999999999999998e152

    1. Initial program 98.8

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

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

      [Start]98.8

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

      /-rgt-identity [<=]98.8

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

      metadata-eval [<=]98.8

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

      *-commutative [=>]98.8

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

      associate-/l* [=>]98.8

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

      associate-/l* [<=]98.8

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

      associate-*r/ [<=]98.8

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

      /-rgt-identity [<=]98.8

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

      metadata-eval [<=]98.8

      \[ \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{\color{blue}{--1}} \cdot \frac{\frac{--1}{2}}{a} \]
    3. Taylor expanded in b around -inf 3.36

      \[\leadsto \color{blue}{-1 \cdot \frac{b}{a}} \]
    4. Simplified3.36

      \[\leadsto \color{blue}{\frac{-b}{a}} \]
      Proof

      [Start]3.36

      \[ -1 \cdot \frac{b}{a} \]

      associate-*r/ [=>]3.36

      \[ \color{blue}{\frac{-1 \cdot b}{a}} \]

      mul-1-neg [=>]3.36

      \[ \frac{\color{blue}{-b}}{a} \]

    if -7.1999999999999998e152 < b < -3.7e-306

    1. Initial program 13.02

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

    if -3.7e-306 < b < 2.89999999999999991

    1. Initial program 40.83

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

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

      [Start]40.83

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

      /-rgt-identity [<=]40.83

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

      metadata-eval [<=]40.83

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

      *-commutative [=>]40.83

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

      associate-/l* [=>]40.83

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

      associate-/l* [<=]40.83

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

      associate-*r/ [<=]40.91

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

      /-rgt-identity [<=]40.91

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

      metadata-eval [<=]40.91

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

      \[\leadsto \color{blue}{\frac{\frac{0.5}{a} \cdot \left(\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -4\right)\right) - b \cdot b\right)}{b + \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -4\right)}\right)}} \]
    4. Taylor expanded in a around 0 21.7

      \[\leadsto \frac{\color{blue}{-2 \cdot c}}{b + \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -4\right)}\right)} \]
    5. Simplified21.7

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

      [Start]21.7

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

      *-commutative [=>]21.7

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

    if 2.89999999999999991 < b

    1. Initial program 86.66

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

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

      [Start]86.66

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

      /-rgt-identity [<=]86.66

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

      metadata-eval [<=]86.66

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

      *-commutative [=>]86.66

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

      associate-/l* [=>]86.66

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

      associate-/l* [<=]86.66

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

      associate-*r/ [<=]86.66

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

      /-rgt-identity [<=]86.66

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

      metadata-eval [<=]86.66

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

      \[\leadsto \color{blue}{\frac{\frac{0.5}{a} \cdot \left(\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -4\right)\right) - b \cdot b\right)}{b + \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -4\right)}\right)}} \]
    4. Taylor expanded in a around 0 46.06

      \[\leadsto \frac{\color{blue}{-2 \cdot c}}{b + \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -4\right)}\right)} \]
    5. Simplified46.06

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

      [Start]46.06

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

      *-commutative [=>]46.06

      \[ \frac{\color{blue}{c \cdot -2}}{b + \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -4\right)}\right)} \]
    6. Taylor expanded in b around inf 100

      \[\leadsto \frac{c \cdot -2}{\color{blue}{0.5 \cdot \frac{c \cdot \left(a \cdot {\left(\sqrt{-4}\right)}^{2}\right)}{b} + 2 \cdot b}} \]
    7. Simplified9.02

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

      [Start]100

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

      +-commutative [=>]100

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

      *-commutative [=>]100

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

      fma-def [=>]100

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

      *-commutative [=>]100

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

      associate-/l* [=>]100

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

      unpow2 [=>]100

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

      rem-square-sqrt [=>]9.02

      \[ \frac{c \cdot -2}{\mathsf{fma}\left(b, 2, 0.5 \cdot \frac{a \cdot \color{blue}{-4}}{\frac{b}{c}}\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification12.34

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -7.2 \cdot 10^{+152}:\\ \;\;\;\;\frac{-b}{a}\\ \mathbf{elif}\;b \leq -3.7 \cdot 10^{-306}:\\ \;\;\;\;\frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -4\right)} - b}{a \cdot 2}\\ \mathbf{elif}\;b \leq 2.9:\\ \;\;\;\;\frac{c \cdot -2}{b + \mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -4\right)}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -2}{\mathsf{fma}\left(b, 2, 0.5 \cdot \frac{a \cdot -4}{\frac{b}{c}}\right)}\\ \end{array} \]

Alternatives

Alternative 1
Error12.36%
Cost13964
\[\begin{array}{l} t_0 := c \cdot \left(a \cdot -4\right)\\ \mathbf{if}\;b \leq -1.06 \cdot 10^{+148}:\\ \;\;\;\;\frac{-b}{a}\\ \mathbf{elif}\;b \leq -7 \cdot 10^{-309}:\\ \;\;\;\;\frac{\sqrt{b \cdot b + t_0} - b}{a \cdot 2}\\ \mathbf{elif}\;b \leq 2.3 \cdot 10^{-5}:\\ \;\;\;\;c \cdot \frac{-2}{b + \mathsf{hypot}\left(b, \sqrt{t_0}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -2}{\mathsf{fma}\left(b, 2, 0.5 \cdot \frac{a \cdot -4}{\frac{b}{c}}\right)}\\ \end{array} \]
Alternative 2
Error15.61%
Cost7624
\[\begin{array}{l} \mathbf{if}\;b \leq -2.9 \cdot 10^{+76}:\\ \;\;\;\;\frac{c}{b} - \frac{b}{a}\\ \mathbf{elif}\;b \leq 3.3 \cdot 10^{-100}:\\ \;\;\;\;\left(\sqrt{b \cdot b + a \cdot \left(c \cdot -4\right)} - b\right) \cdot \frac{0.5}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{-c}{b}\\ \end{array} \]
Alternative 3
Error15.5%
Cost7624
\[\begin{array}{l} \mathbf{if}\;b \leq -9 \cdot 10^{+81}:\\ \;\;\;\;\frac{c}{b} - \frac{b}{a}\\ \mathbf{elif}\;b \leq 3.3 \cdot 10^{-100}:\\ \;\;\;\;\left(\sqrt{b \cdot b + a \cdot \left(c \cdot -4\right)} - b\right) \cdot \frac{0.5}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -2}{\mathsf{fma}\left(b, 2, 0.5 \cdot \frac{a \cdot -4}{\frac{b}{c}}\right)}\\ \end{array} \]
Alternative 4
Error15.16%
Cost7624
\[\begin{array}{l} \mathbf{if}\;b \leq -5 \cdot 10^{+145}:\\ \;\;\;\;\frac{-b}{a}\\ \mathbf{elif}\;b \leq 3 \cdot 10^{-100}:\\ \;\;\;\;\frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -4\right)} - b}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -2}{\mathsf{fma}\left(b, 2, 0.5 \cdot \frac{a \cdot -4}{\frac{b}{c}}\right)}\\ \end{array} \]
Alternative 5
Error21.6%
Cost7368
\[\begin{array}{l} \mathbf{if}\;b \leq -1 \cdot 10^{-12}:\\ \;\;\;\;\frac{c}{b} - \frac{b}{a}\\ \mathbf{elif}\;b \leq 2.15 \cdot 10^{-119}:\\ \;\;\;\;\frac{0.5}{a} \cdot \left(\sqrt{c \cdot \left(a \cdot -4\right)} - b\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{-c}{b}\\ \end{array} \]
Alternative 6
Error21.61%
Cost7368
\[\begin{array}{l} \mathbf{if}\;b \leq -3.35 \cdot 10^{-12}:\\ \;\;\;\;\frac{c}{b} - \frac{b}{a}\\ \mathbf{elif}\;b \leq 2.7 \cdot 10^{-119}:\\ \;\;\;\;\frac{\sqrt{c \cdot \left(a \cdot -4\right)} - b}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{-c}{b}\\ \end{array} \]
Alternative 7
Error34.39%
Cost580
\[\begin{array}{l} \mathbf{if}\;b \leq -1 \cdot 10^{-309}:\\ \;\;\;\;\frac{c}{b} - \frac{b}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{-c}{b}\\ \end{array} \]
Alternative 8
Error61%
Cost388
\[\begin{array}{l} \mathbf{if}\;b \leq 3.2 \cdot 10^{-23}:\\ \;\;\;\;\frac{-b}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b}\\ \end{array} \]
Alternative 9
Error34.39%
Cost388
\[\begin{array}{l} \mathbf{if}\;b \leq 1.1 \cdot 10^{-306}:\\ \;\;\;\;\frac{-b}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{-c}{b}\\ \end{array} \]
Alternative 10
Error88.29%
Cost192
\[\frac{c}{b} \]

Error

Reproduce?

herbie shell --seed 2023089 
(FPCore (a b c)
  :name "Quadratic roots, full range"
  :precision binary64
  (/ (+ (- b) (sqrt (- (* b b) (* (* 4.0 a) c)))) (* 2.0 a)))