Average Error: 44.0 → 43.4
Time: 25.8s
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}\]
\[\left(\sqrt[3]{\frac{\mathsf{fma}\left(\sqrt{\sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(a \cdot c\right)\right)}}, \sqrt{\sqrt{\mathsf{fma}\left(-3, a \cdot c, b \cdot b\right)}}, -b\right)}{a}} \cdot \sqrt[3]{\frac{1}{3}}\right) \cdot \left(\sqrt[3]{\frac{\mathsf{fma}\left(\sqrt{\sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(a \cdot c\right)\right)}}, \sqrt{\sqrt{\mathsf{fma}\left(-3, a \cdot c, b \cdot b\right)}}, -b\right)}{a \cdot 3}} \cdot \sqrt[3]{\frac{\mathsf{fma}\left(\sqrt{\sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(a \cdot c\right)\right)}}, \sqrt{\sqrt{\mathsf{fma}\left(-3, a \cdot c, b \cdot b\right)}}, -b\right)}{a \cdot 3}}\right)\]
\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}
\left(\sqrt[3]{\frac{\mathsf{fma}\left(\sqrt{\sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(a \cdot c\right)\right)}}, \sqrt{\sqrt{\mathsf{fma}\left(-3, a \cdot c, b \cdot b\right)}}, -b\right)}{a}} \cdot \sqrt[3]{\frac{1}{3}}\right) \cdot \left(\sqrt[3]{\frac{\mathsf{fma}\left(\sqrt{\sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(a \cdot c\right)\right)}}, \sqrt{\sqrt{\mathsf{fma}\left(-3, a \cdot c, b \cdot b\right)}}, -b\right)}{a \cdot 3}} \cdot \sqrt[3]{\frac{\mathsf{fma}\left(\sqrt{\sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(a \cdot c\right)\right)}}, \sqrt{\sqrt{\mathsf{fma}\left(-3, a \cdot c, b \cdot b\right)}}, -b\right)}{a \cdot 3}}\right)
double f(double a, double b, double c) {
        double r3072586 = b;
        double r3072587 = -r3072586;
        double r3072588 = r3072586 * r3072586;
        double r3072589 = 3.0;
        double r3072590 = a;
        double r3072591 = r3072589 * r3072590;
        double r3072592 = c;
        double r3072593 = r3072591 * r3072592;
        double r3072594 = r3072588 - r3072593;
        double r3072595 = sqrt(r3072594);
        double r3072596 = r3072587 + r3072595;
        double r3072597 = r3072596 / r3072591;
        return r3072597;
}

double f(double a, double b, double c) {
        double r3072598 = b;
        double r3072599 = -3.0;
        double r3072600 = a;
        double r3072601 = c;
        double r3072602 = r3072600 * r3072601;
        double r3072603 = r3072599 * r3072602;
        double r3072604 = fma(r3072598, r3072598, r3072603);
        double r3072605 = sqrt(r3072604);
        double r3072606 = sqrt(r3072605);
        double r3072607 = r3072598 * r3072598;
        double r3072608 = fma(r3072599, r3072602, r3072607);
        double r3072609 = sqrt(r3072608);
        double r3072610 = sqrt(r3072609);
        double r3072611 = -r3072598;
        double r3072612 = fma(r3072606, r3072610, r3072611);
        double r3072613 = r3072612 / r3072600;
        double r3072614 = cbrt(r3072613);
        double r3072615 = 0.3333333333333333;
        double r3072616 = cbrt(r3072615);
        double r3072617 = r3072614 * r3072616;
        double r3072618 = 3.0;
        double r3072619 = r3072600 * r3072618;
        double r3072620 = r3072612 / r3072619;
        double r3072621 = cbrt(r3072620);
        double r3072622 = r3072621 * r3072621;
        double r3072623 = r3072617 * r3072622;
        return r3072623;
}

Error

Bits error versus a

Bits error versus b

Bits error versus c

Derivation

  1. Initial program 44.0

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

    \[\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.0

    \[\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.1

    \[\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. Taylor expanded around 0 43.4

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

    \[\leadsto \frac{\mathsf{fma}\left(\sqrt{\sqrt{\color{blue}{\mathsf{fma}\left(b, b, -3 \cdot \left(a \cdot c\right)\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 add-cube-cbrt43.4

    \[\leadsto \color{blue}{\left(\sqrt[3]{\frac{\mathsf{fma}\left(\sqrt{\sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(a \cdot c\right)\right)}}, \sqrt{\sqrt{\mathsf{fma}\left(-3, c \cdot a, b \cdot b\right)}}, -b\right)}{3 \cdot a}} \cdot \sqrt[3]{\frac{\mathsf{fma}\left(\sqrt{\sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(a \cdot c\right)\right)}}, \sqrt{\sqrt{\mathsf{fma}\left(-3, c \cdot a, b \cdot b\right)}}, -b\right)}{3 \cdot a}}\right) \cdot \sqrt[3]{\frac{\mathsf{fma}\left(\sqrt{\sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(a \cdot c\right)\right)}}, \sqrt{\sqrt{\mathsf{fma}\left(-3, c \cdot a, b \cdot b\right)}}, -b\right)}{3 \cdot a}}}\]
  11. Using strategy rm
  12. Applied *-un-lft-identity43.4

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

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

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

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

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

Reproduce

herbie shell --seed 2019146 +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)))