Average Error: 44.1 → 43.0
Time: 21.3s
Precision: 64
\[1.1102230246251565 \cdot 10^{-16} \lt a \lt 9007199254740992.0 \land 1.1102230246251565 \cdot 10^{-16} \lt b \lt 9007199254740992.0 \land 1.1102230246251565 \cdot 10^{-16} \lt c \lt 9007199254740992.0\]
\[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}\]
\[\frac{\mathsf{fma}\left(\sqrt{\sqrt{\sqrt[3]{{\left(\left(\mathsf{fma}\left(-3, a \cdot c, b \cdot b\right) \cdot \mathsf{fma}\left(-3, a \cdot c, b \cdot b\right)\right) \cdot \mathsf{fma}\left(-3, a \cdot c, b \cdot b\right)\right)}^{\frac{1}{3}}} \cdot \left(\sqrt[3]{{\left(\left(\mathsf{fma}\left(-3, a \cdot c, b \cdot b\right) \cdot \mathsf{fma}\left(-3, a \cdot c, b \cdot b\right)\right) \cdot \mathsf{fma}\left(-3, a \cdot c, b \cdot b\right)\right)}^{\frac{1}{3}}} \cdot \sqrt[3]{{\left(\left(\mathsf{fma}\left(-3, a \cdot c, b \cdot b\right) \cdot \mathsf{fma}\left(-3, a \cdot c, b \cdot b\right)\right) \cdot \mathsf{fma}\left(-3, a \cdot c, b \cdot b\right)\right)}^{\frac{1}{3}}}\right)}}, \sqrt{\sqrt{\mathsf{fma}\left(-3, a \cdot c, b \cdot b\right)}}, -b\right)}{a \cdot 3}\]
\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}
\frac{\mathsf{fma}\left(\sqrt{\sqrt{\sqrt[3]{{\left(\left(\mathsf{fma}\left(-3, a \cdot c, b \cdot b\right) \cdot \mathsf{fma}\left(-3, a \cdot c, b \cdot b\right)\right) \cdot \mathsf{fma}\left(-3, a \cdot c, b \cdot b\right)\right)}^{\frac{1}{3}}} \cdot \left(\sqrt[3]{{\left(\left(\mathsf{fma}\left(-3, a \cdot c, b \cdot b\right) \cdot \mathsf{fma}\left(-3, a \cdot c, b \cdot b\right)\right) \cdot \mathsf{fma}\left(-3, a \cdot c, b \cdot b\right)\right)}^{\frac{1}{3}}} \cdot \sqrt[3]{{\left(\left(\mathsf{fma}\left(-3, a \cdot c, b \cdot b\right) \cdot \mathsf{fma}\left(-3, a \cdot c, b \cdot b\right)\right) \cdot \mathsf{fma}\left(-3, a \cdot c, b \cdot b\right)\right)}^{\frac{1}{3}}}\right)}}, \sqrt{\sqrt{\mathsf{fma}\left(-3, a \cdot c, b \cdot b\right)}}, -b\right)}{a \cdot 3}
double f(double a, double b, double c) {
        double r2749799 = b;
        double r2749800 = -r2749799;
        double r2749801 = r2749799 * r2749799;
        double r2749802 = 3.0;
        double r2749803 = a;
        double r2749804 = r2749802 * r2749803;
        double r2749805 = c;
        double r2749806 = r2749804 * r2749805;
        double r2749807 = r2749801 - r2749806;
        double r2749808 = sqrt(r2749807);
        double r2749809 = r2749800 + r2749808;
        double r2749810 = r2749809 / r2749804;
        return r2749810;
}

double f(double a, double b, double c) {
        double r2749811 = -3.0;
        double r2749812 = a;
        double r2749813 = c;
        double r2749814 = r2749812 * r2749813;
        double r2749815 = b;
        double r2749816 = r2749815 * r2749815;
        double r2749817 = fma(r2749811, r2749814, r2749816);
        double r2749818 = r2749817 * r2749817;
        double r2749819 = r2749818 * r2749817;
        double r2749820 = 0.3333333333333333;
        double r2749821 = pow(r2749819, r2749820);
        double r2749822 = cbrt(r2749821);
        double r2749823 = r2749822 * r2749822;
        double r2749824 = r2749822 * r2749823;
        double r2749825 = sqrt(r2749824);
        double r2749826 = sqrt(r2749825);
        double r2749827 = sqrt(r2749817);
        double r2749828 = sqrt(r2749827);
        double r2749829 = -r2749815;
        double r2749830 = fma(r2749826, r2749828, r2749829);
        double r2749831 = 3.0;
        double r2749832 = r2749812 * r2749831;
        double r2749833 = r2749830 / r2749832;
        return r2749833;
}

Error

Bits error versus a

Bits error versus b

Bits error versus c

Derivation

  1. Initial program 44.1

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

    \[\leadsto \color{blue}{\frac{\sqrt{\mathsf{fma}\left(-3, c \cdot a, b \cdot b\right)} - b}{3 \cdot a}}\]
  3. Using strategy rm
  4. Applied add-sqr-sqrt44.1

    \[\leadsto \frac{\sqrt{\color{blue}{\sqrt{\mathsf{fma}\left(-3, c \cdot a, b \cdot b\right)} \cdot \sqrt{\mathsf{fma}\left(-3, c \cdot a, b \cdot b\right)}}} - b}{3 \cdot a}\]
  5. Applied sqrt-prod44.0

    \[\leadsto \frac{\color{blue}{\sqrt{\sqrt{\mathsf{fma}\left(-3, c \cdot a, b \cdot b\right)}} \cdot \sqrt{\sqrt{\mathsf{fma}\left(-3, c \cdot a, b \cdot b\right)}}} - b}{3 \cdot a}\]
  6. Applied fma-neg43.4

    \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\sqrt{\sqrt{\mathsf{fma}\left(-3, c \cdot a, b \cdot b\right)}}, \sqrt{\sqrt{\mathsf{fma}\left(-3, c \cdot a, b \cdot b\right)}}, -b\right)}}{3 \cdot a}\]
  7. Using strategy rm
  8. Applied add-cbrt-cube43.5

    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\sqrt{\color{blue}{\sqrt[3]{\left(\mathsf{fma}\left(-3, c \cdot a, b \cdot b\right) \cdot \mathsf{fma}\left(-3, c \cdot a, b \cdot b\right)\right) \cdot \mathsf{fma}\left(-3, c \cdot a, b \cdot b\right)}}}}, \sqrt{\sqrt{\mathsf{fma}\left(-3, c \cdot a, b \cdot b\right)}}, -b\right)}{3 \cdot a}\]
  9. Using strategy rm
  10. Applied pow1/343.1

    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\sqrt{\color{blue}{{\left(\left(\mathsf{fma}\left(-3, c \cdot a, b \cdot b\right) \cdot \mathsf{fma}\left(-3, c \cdot a, b \cdot b\right)\right) \cdot \mathsf{fma}\left(-3, c \cdot a, b \cdot b\right)\right)}^{\frac{1}{3}}}}}, \sqrt{\sqrt{\mathsf{fma}\left(-3, c \cdot a, b \cdot b\right)}}, -b\right)}{3 \cdot a}\]
  11. Using strategy rm
  12. Applied add-cube-cbrt43.0

    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\sqrt{\color{blue}{\left(\sqrt[3]{{\left(\left(\mathsf{fma}\left(-3, c \cdot a, b \cdot b\right) \cdot \mathsf{fma}\left(-3, c \cdot a, b \cdot b\right)\right) \cdot \mathsf{fma}\left(-3, c \cdot a, b \cdot b\right)\right)}^{\frac{1}{3}}} \cdot \sqrt[3]{{\left(\left(\mathsf{fma}\left(-3, c \cdot a, b \cdot b\right) \cdot \mathsf{fma}\left(-3, c \cdot a, b \cdot b\right)\right) \cdot \mathsf{fma}\left(-3, c \cdot a, b \cdot b\right)\right)}^{\frac{1}{3}}}\right) \cdot \sqrt[3]{{\left(\left(\mathsf{fma}\left(-3, c \cdot a, b \cdot b\right) \cdot \mathsf{fma}\left(-3, c \cdot a, b \cdot b\right)\right) \cdot \mathsf{fma}\left(-3, c \cdot a, b \cdot b\right)\right)}^{\frac{1}{3}}}}}}, \sqrt{\sqrt{\mathsf{fma}\left(-3, c \cdot a, b \cdot b\right)}}, -b\right)}{3 \cdot a}\]
  13. Final simplification43.0

    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\sqrt{\sqrt[3]{{\left(\left(\mathsf{fma}\left(-3, a \cdot c, b \cdot b\right) \cdot \mathsf{fma}\left(-3, a \cdot c, b \cdot b\right)\right) \cdot \mathsf{fma}\left(-3, a \cdot c, b \cdot b\right)\right)}^{\frac{1}{3}}} \cdot \left(\sqrt[3]{{\left(\left(\mathsf{fma}\left(-3, a \cdot c, b \cdot b\right) \cdot \mathsf{fma}\left(-3, a \cdot c, b \cdot b\right)\right) \cdot \mathsf{fma}\left(-3, a \cdot c, b \cdot b\right)\right)}^{\frac{1}{3}}} \cdot \sqrt[3]{{\left(\left(\mathsf{fma}\left(-3, a \cdot c, b \cdot b\right) \cdot \mathsf{fma}\left(-3, a \cdot c, b \cdot b\right)\right) \cdot \mathsf{fma}\left(-3, a \cdot c, b \cdot b\right)\right)}^{\frac{1}{3}}}\right)}}, \sqrt{\sqrt{\mathsf{fma}\left(-3, a \cdot c, b \cdot b\right)}}, -b\right)}{a \cdot 3}\]

Reproduce

herbie shell --seed 2019153 +o rules:numerics
(FPCore (a b c)
  :name "Cubic critical, medium range"
  :pre (and (< 1.1102230246251565e-16 a 9007199254740992.0) (< 1.1102230246251565e-16 b 9007199254740992.0) (< 1.1102230246251565e-16 c 9007199254740992.0))
  (/ (+ (- b) (sqrt (- (* b b) (* (* 3 a) c)))) (* 3 a)))