?

Average Accuracy: 31.7% → 93.1%
Time: 17.2s
Precision: binary64
Cost: 28292

?

\[\left(\left(1.1102230246251565 \cdot 10^{-16} < a \land a < 9007199254740992\right) \land \left(1.1102230246251565 \cdot 10^{-16} < b \land b < 9007199254740992\right)\right) \land \left(1.1102230246251565 \cdot 10^{-16} < c \land c < 9007199254740992\right)\]
\[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
\[\begin{array}{l} t_0 := \mathsf{fma}\left(c, a \cdot -4, b \cdot b\right)\\ \mathbf{if}\;\frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -4\right)} - b}{a \cdot 2} \leq -100:\\ \;\;\;\;\frac{\frac{b \cdot b - t_0}{\left(-b\right) - \sqrt{t_0}}}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{{c}^{3} \cdot -2}{\frac{{b}^{5}}{a \cdot a}} - \frac{c}{b}\right) - a \cdot \frac{c}{\frac{{b}^{3}}{c}}\\ \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
 (let* ((t_0 (fma c (* a -4.0) (* b b))))
   (if (<= (/ (- (sqrt (+ (* b b) (* c (* a -4.0)))) b) (* a 2.0)) -100.0)
     (/ (/ (- (* b b) t_0) (- (- b) (sqrt t_0))) (* a 2.0))
     (-
      (- (/ (* (pow c 3.0) -2.0) (/ (pow b 5.0) (* a a))) (/ c b))
      (* a (/ c (/ (pow b 3.0) 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 t_0 = fma(c, (a * -4.0), (b * b));
	double tmp;
	if (((sqrt(((b * b) + (c * (a * -4.0)))) - b) / (a * 2.0)) <= -100.0) {
		tmp = (((b * b) - t_0) / (-b - sqrt(t_0))) / (a * 2.0);
	} else {
		tmp = (((pow(c, 3.0) * -2.0) / (pow(b, 5.0) / (a * a))) - (c / b)) - (a * (c / (pow(b, 3.0) / 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)
	t_0 = fma(c, Float64(a * -4.0), Float64(b * b))
	tmp = 0.0
	if (Float64(Float64(sqrt(Float64(Float64(b * b) + Float64(c * Float64(a * -4.0)))) - b) / Float64(a * 2.0)) <= -100.0)
		tmp = Float64(Float64(Float64(Float64(b * b) - t_0) / Float64(Float64(-b) - sqrt(t_0))) / Float64(a * 2.0));
	else
		tmp = Float64(Float64(Float64(Float64((c ^ 3.0) * -2.0) / Float64((b ^ 5.0) / Float64(a * a))) - Float64(c / b)) - Float64(a * Float64(c / Float64((b ^ 3.0) / 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_] := Block[{t$95$0 = N[(c * N[(a * -4.0), $MachinePrecision] + N[(b * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] + N[(c * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision], -100.0], N[(N[(N[(N[(b * b), $MachinePrecision] - t$95$0), $MachinePrecision] / N[((-b) - N[Sqrt[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[Power[c, 3.0], $MachinePrecision] * -2.0), $MachinePrecision] / N[(N[Power[b, 5.0], $MachinePrecision] / N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(c / b), $MachinePrecision]), $MachinePrecision] - N[(a * N[(c / N[(N[Power[b, 3.0], $MachinePrecision] / c), $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}
t_0 := \mathsf{fma}\left(c, a \cdot -4, b \cdot b\right)\\
\mathbf{if}\;\frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -4\right)} - b}{a \cdot 2} \leq -100:\\
\;\;\;\;\frac{\frac{b \cdot b - t_0}{\left(-b\right) - \sqrt{t_0}}}{a \cdot 2}\\

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


\end{array}

Error?

Derivation?

  1. Split input into 2 regimes
  2. if (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 4 a) c)))) (*.f64 2 a)) < -100

    1. Initial program 71.0%

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

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

      [Start]71.0

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

      *-commutative [=>]71.0

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

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

      [Start]71.0

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

      flip-+ [=>]70.9

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

      sub-neg [=>]70.9

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

      add-sqr-sqrt [=>]70.8

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

      sqrt-prod [<=]70.9

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

      sqr-neg [<=]70.9

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

      sqrt-unprod [<=]0.0

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

      add-sqr-sqrt [<=]1.5

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

      distribute-neg-in [<=]1.5

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

      add-sqr-sqrt [=>]0.0

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

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

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

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

      [Start]72.1

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

      associate-/l/ [=>]72.1

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

      /-rgt-identity [<=]72.1

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

      /-rgt-identity [=>]72.1

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

      fma-def [<=]72.4

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

      +-commutative [=>]72.4

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

      fma-def [=>]72.5

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

      distribute-lft-neg-in [<=]72.5

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

      rem-square-sqrt [=>]72.5

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

      *-lft-identity [<=]72.5

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

      *-lft-identity [=>]72.5

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

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

    1. Initial program 27.5%

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

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

      [Start]27.5

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

      *-commutative [=>]27.5

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

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

      \[\leadsto \color{blue}{\left(\frac{{c}^{3} \cdot -2}{\frac{{b}^{5}}{a \cdot a}} - \frac{c}{b}\right) - \frac{c}{\frac{{b}^{3}}{c}} \cdot a} \]
      Proof

      [Start]95.3

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

      +-commutative [=>]95.3

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

      mul-1-neg [=>]95.3

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

      unsub-neg [=>]95.3

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

      +-commutative [=>]95.3

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

      mul-1-neg [=>]95.3

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

      unsub-neg [=>]95.3

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

      *-commutative [=>]95.3

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

      associate-/l* [=>]95.3

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

      associate-*l/ [=>]95.3

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

      unpow2 [=>]95.3

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

      associate-/l* [=>]95.3

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

      associate-/r/ [=>]95.3

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

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

Alternatives

Alternative 1
Accuracy95.4%
Cost34752
\[\left(\mathsf{fma}\left(-0.25, \frac{\left(a \cdot 20\right) \cdot \left(c \cdot c\right)}{\frac{\frac{{b}^{7}}{a \cdot a}}{c \cdot c}}, \frac{{c}^{3} \cdot -2}{\frac{{b}^{5}}{a \cdot a}}\right) - \frac{c}{b}\right) - a \cdot \frac{c}{\frac{{b}^{3}}{c}} \]
Alternative 2
Accuracy90.7%
Cost21060
\[\begin{array}{l} \mathbf{if}\;\frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -4\right)} - b}{a \cdot 2} \leq -100:\\ \;\;\;\;\left(\sqrt{\mathsf{fma}\left(b, b, -4 \cdot \left(a \cdot c\right)\right)} - b\right) \cdot \frac{0.5}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{-c}{b} - \frac{c \cdot c}{b \cdot \frac{b \cdot b}{a}}\\ \end{array} \]
Alternative 3
Accuracy93.9%
Cost20736
\[\left(\frac{{c}^{3} \cdot -2}{\frac{{b}^{5}}{a \cdot a}} - \frac{c}{b}\right) - a \cdot \frac{c}{\frac{{b}^{3}}{c}} \]
Alternative 4
Accuracy90.7%
Cost14788
\[\begin{array}{l} \mathbf{if}\;\frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -4\right)} - b}{a \cdot 2} \leq -100:\\ \;\;\;\;\frac{0.5}{a} \cdot \left(\sqrt{b \cdot b + a \cdot \left(c \cdot -4\right)} - b\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{-c}{b} - \frac{c \cdot c}{b \cdot \frac{b \cdot b}{a}}\\ \end{array} \]
Alternative 5
Accuracy90.8%
Cost1024
\[\frac{-c}{b} - \frac{c \cdot c}{b \cdot \frac{b \cdot b}{a}} \]
Alternative 6
Accuracy81.2%
Cost256
\[\frac{-c}{b} \]

Error

Reproduce?

herbie shell --seed 2023137 
(FPCore (a b c)
  :name "Quadratic roots, medium range"
  :precision binary64
  :pre (and (and (and (< 1.1102230246251565e-16 a) (< a 9007199254740992.0)) (and (< 1.1102230246251565e-16 b) (< b 9007199254740992.0))) (and (< 1.1102230246251565e-16 c) (< c 9007199254740992.0)))
  (/ (+ (- b) (sqrt (- (* b b) (* (* 4.0 a) c)))) (* 2.0 a)))