?

Average Accuracy: 55.0% → 92.1%
Time: 17.4s
Precision: binary64
Cost: 40900

?

\[\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} \]
\[\begin{array}{l} \mathbf{if}\;b \leq 0.07:\\ \;\;\;\;\left(\sqrt{\mathsf{fma}\left(b, b, -4 \cdot \left(a \cdot c\right)\right)} - b\right) \cdot \frac{0.5}{a}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{-0.25}{a}, \frac{{\left(a \cdot c\right)}^{4} \cdot 20}{{b}^{7}}, -2 \cdot \left(\left(\left(c \cdot c\right) \cdot \left(c \cdot {b}^{-5}\right)\right) \cdot \left(a \cdot a\right)\right) - \mathsf{fma}\left(\frac{c}{\frac{{b}^{3}}{c}}, a, \frac{c}{b}\right)\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 0.07)
   (* (- (sqrt (fma b b (* -4.0 (* a c)))) b) (/ 0.5 a))
   (fma
    (/ -0.25 a)
    (/ (* (pow (* a c) 4.0) 20.0) (pow b 7.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) {
	double tmp;
	if (b <= 0.07) {
		tmp = (sqrt(fma(b, b, (-4.0 * (a * c)))) - b) * (0.5 / a);
	} else {
		tmp = fma((-0.25 / a), ((pow((a * c), 4.0) * 20.0) / pow(b, 7.0)), ((-2.0 * (((c * c) * (c * pow(b, -5.0))) * (a * a))) - fma((c / (pow(b, 3.0) / c)), a, (c / b))));
	}
	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 <= 0.07)
		tmp = Float64(Float64(sqrt(fma(b, b, Float64(-4.0 * Float64(a * c)))) - b) * Float64(0.5 / a));
	else
		tmp = fma(Float64(-0.25 / a), Float64(Float64((Float64(a * c) ^ 4.0) * 20.0) / (b ^ 7.0)), Float64(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
	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, 0.07], N[(N[(N[Sqrt[N[(b * b + N[(-4.0 * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] * N[(0.5 / a), $MachinePrecision]), $MachinePrecision], N[(N[(-0.25 / a), $MachinePrecision] * N[(N[(N[Power[N[(a * c), $MachinePrecision], 4.0], $MachinePrecision] * 20.0), $MachinePrecision] / N[Power[b, 7.0], $MachinePrecision]), $MachinePrecision] + N[(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] - N[(N[(c / N[(N[Power[b, 3.0], $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision] * a + N[(c / b), $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 0.07:\\
\;\;\;\;\left(\sqrt{\mathsf{fma}\left(b, b, -4 \cdot \left(a \cdot c\right)\right)} - b\right) \cdot \frac{0.5}{a}\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{-0.25}{a}, \frac{{\left(a \cdot c\right)}^{4} \cdot 20}{{b}^{7}}, -2 \cdot \left(\left(\left(c \cdot c\right) \cdot \left(c \cdot {b}^{-5}\right)\right) \cdot \left(a \cdot a\right)\right) - \mathsf{fma}\left(\frac{c}{\frac{{b}^{3}}{c}}, a, \frac{c}{b}\right)\right)\\


\end{array}

Error?

Bogosity?

Bogosity

Derivation?

  1. Split input into 2 regimes
  2. if b < 0.070000000000000007

    1. Initial program 90.0%

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

      \[\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]90.0

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

      /-rgt-identity [<=]90.0

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

      metadata-eval [<=]90.0

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

      associate-/l* [<=]90.0

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

      associate-*r/ [<=]90.0

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

      +-commutative [=>]90.0

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

      unsub-neg [=>]90.0

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

      fma-neg [=>]90.2

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

      associate-*l* [=>]90.2

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

      *-commutative [=>]90.2

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

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

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

      metadata-eval [=>]90.2

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

      associate-/r* [=>]90.2

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

      metadata-eval [=>]90.2

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

      metadata-eval [=>]90.2

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

    if 0.070000000000000007 < b

    1. Initial program 53.2%

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

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

      [Start]53.2

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

      *-commutative [=>]53.2

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

      +-commutative [=>]53.2

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

      unsub-neg [=>]53.2

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

      fma-neg [=>]53.3

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

      associate-*l* [=>]53.3

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

      *-commutative [=>]53.3

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

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

      \[ \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 b around inf 91.1%

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

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

      [Start]91.1

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

      +-commutative [=>]91.1

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

      associate-+l+ [=>]91.1

      \[ \color{blue}{-0.25 \cdot \frac{{\left(-2 \cdot \left({c}^{2} \cdot {a}^{2}\right)\right)}^{2} + 16 \cdot \left({c}^{4} \cdot {a}^{4}\right)}{a \cdot {b}^{7}} + \left(\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}}\right)} \]

      associate-*r/ [=>]91.1

      \[ \color{blue}{\frac{-0.25 \cdot \left({\left(-2 \cdot \left({c}^{2} \cdot {a}^{2}\right)\right)}^{2} + 16 \cdot \left({c}^{4} \cdot {a}^{4}\right)\right)}{a \cdot {b}^{7}}} + \left(\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}}\right) \]

      times-frac [=>]91.1

      \[ \color{blue}{\frac{-0.25}{a} \cdot \frac{{\left(-2 \cdot \left({c}^{2} \cdot {a}^{2}\right)\right)}^{2} + 16 \cdot \left({c}^{4} \cdot {a}^{4}\right)}{{b}^{7}}} + \left(\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}}\right) \]

      +-commutative [<=]91.1

      \[ \frac{-0.25}{a} \cdot \frac{{\left(-2 \cdot \left({c}^{2} \cdot {a}^{2}\right)\right)}^{2} + 16 \cdot \left({c}^{4} \cdot {a}^{4}\right)}{{b}^{7}} + \color{blue}{\left(-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)\right)} \]

      fma-def [=>]91.1

      \[ \color{blue}{\mathsf{fma}\left(\frac{-0.25}{a}, \frac{{\left(-2 \cdot \left({c}^{2} \cdot {a}^{2}\right)\right)}^{2} + 16 \cdot \left({c}^{4} \cdot {a}^{4}\right)}{{b}^{7}}, -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)\right)} \]
    5. Applied egg-rr91.1%

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

      [Start]91.1

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

      add-log-exp [=>]68.0

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

      *-un-lft-identity [=>]68.0

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

      log-prod [=>]68.0

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

      metadata-eval [=>]68.0

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

      add-log-exp [<=]91.1

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

      pow-prod-down [=>]91.1

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

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

      [Start]91.1

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

      +-lft-identity [=>]91.1

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

      \[\leadsto \mathsf{fma}\left(\frac{-0.25}{a}, \frac{{\left(c \cdot a\right)}^{4} \cdot 20}{{b}^{7}}, -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) - \mathsf{fma}\left(\frac{c}{\frac{{b}^{3}}{c}}, a, \frac{c}{b}\right)\right) \]
      Proof

      [Start]91.1

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

      div-inv [=>]91.1

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

      unpow3 [=>]91.1

      \[ \mathsf{fma}\left(\frac{-0.25}{a}, \frac{{\left(c \cdot a\right)}^{4} \cdot 20}{{b}^{7}}, -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) - \mathsf{fma}\left(\frac{c}{\frac{{b}^{3}}{c}}, a, \frac{c}{b}\right)\right) \]

      associate-*l* [=>]91.1

      \[ \mathsf{fma}\left(\frac{-0.25}{a}, \frac{{\left(c \cdot a\right)}^{4} \cdot 20}{{b}^{7}}, -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) - \mathsf{fma}\left(\frac{c}{\frac{{b}^{3}}{c}}, a, \frac{c}{b}\right)\right) \]

      pow-flip [=>]91.1

      \[ \mathsf{fma}\left(\frac{-0.25}{a}, \frac{{\left(c \cdot a\right)}^{4} \cdot 20}{{b}^{7}}, -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) - \mathsf{fma}\left(\frac{c}{\frac{{b}^{3}}{c}}, a, \frac{c}{b}\right)\right) \]

      metadata-eval [=>]91.1

      \[ \mathsf{fma}\left(\frac{-0.25}{a}, \frac{{\left(c \cdot a\right)}^{4} \cdot 20}{{b}^{7}}, -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) - \mathsf{fma}\left(\frac{c}{\frac{{b}^{3}}{c}}, a, \frac{c}{b}\right)\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification91.0%

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

Alternatives

Alternative 1
Accuracy88.9%
Cost20868
\[\begin{array}{l} \mathbf{if}\;b \leq 18:\\ \;\;\;\;\left(\sqrt{\mathsf{fma}\left(b, b, -4 \cdot \left(a \cdot c\right)\right)} - b\right) \cdot \frac{0.5}{a}\\ \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 31:\\ \;\;\;\;\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} - a \cdot \frac{c}{\left(b \cdot b\right) \cdot \frac{b}{c}}\\ \end{array} \]
Alternative 3
Accuracy85.0%
Cost7492
\[\begin{array}{l} \mathbf{if}\;b \leq 31:\\ \;\;\;\;\frac{0.5}{a} \cdot \left(\sqrt{b \cdot b + a \cdot \left(c \cdot -4\right)} - b\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{-c}{b} - a \cdot \frac{c}{\left(b \cdot b\right) \cdot \frac{b}{c}}\\ \end{array} \]
Alternative 4
Accuracy85.0%
Cost7492
\[\begin{array}{l} \mathbf{if}\;b \leq 31:\\ \;\;\;\;\frac{\sqrt{b \cdot b + a \cdot \left(c \cdot -4\right)} - b}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{-c}{b} - a \cdot \frac{c}{\left(b \cdot b\right) \cdot \frac{b}{c}}\\ \end{array} \]
Alternative 5
Accuracy82.0%
Cost1024
\[\frac{-c}{b} - a \cdot \frac{c}{\left(b \cdot b\right) \cdot \frac{b}{c}} \]
Alternative 6
Accuracy64.8%
Cost256
\[\frac{-c}{b} \]

Error

Reproduce?

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