Average Error: 45.1 → 45.1
Time: 15.4s
Precision: 64
\[\mathsf{fma}\left(x, y, z\right) - \left(1 + \left(x \cdot y + z\right)\right)\]
\[\sqrt[3]{{\left(\mathsf{fma}\left(x, y, z\right) - \left(1 + \left(x \cdot y + z\right)\right)\right)}^{3}}\]
\mathsf{fma}\left(x, y, z\right) - \left(1 + \left(x \cdot y + z\right)\right)
\sqrt[3]{{\left(\mathsf{fma}\left(x, y, z\right) - \left(1 + \left(x \cdot y + z\right)\right)\right)}^{3}}
double f(double x, double y, double z) {
        double r47813 = x;
        double r47814 = y;
        double r47815 = z;
        double r47816 = fma(r47813, r47814, r47815);
        double r47817 = 1.0;
        double r47818 = r47813 * r47814;
        double r47819 = r47818 + r47815;
        double r47820 = r47817 + r47819;
        double r47821 = r47816 - r47820;
        return r47821;
}

double f(double x, double y, double z) {
        double r47822 = x;
        double r47823 = y;
        double r47824 = z;
        double r47825 = fma(r47822, r47823, r47824);
        double r47826 = 1.0;
        double r47827 = r47822 * r47823;
        double r47828 = r47827 + r47824;
        double r47829 = r47826 + r47828;
        double r47830 = r47825 - r47829;
        double r47831 = 3.0;
        double r47832 = pow(r47830, r47831);
        double r47833 = cbrt(r47832);
        return r47833;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Target

Original45.1
Target0
Herbie45.1
\[-1\]

Derivation

  1. Initial program 45.1

    \[\mathsf{fma}\left(x, y, z\right) - \left(1 + \left(x \cdot y + z\right)\right)\]
  2. Using strategy rm
  3. Applied add-cbrt-cube45.1

    \[\leadsto \color{blue}{\sqrt[3]{\left(\left(\mathsf{fma}\left(x, y, z\right) - \left(1 + \left(x \cdot y + z\right)\right)\right) \cdot \left(\mathsf{fma}\left(x, y, z\right) - \left(1 + \left(x \cdot y + z\right)\right)\right)\right) \cdot \left(\mathsf{fma}\left(x, y, z\right) - \left(1 + \left(x \cdot y + z\right)\right)\right)}}\]
  4. Simplified45.1

    \[\leadsto \sqrt[3]{\color{blue}{{\left(\mathsf{fma}\left(x, y, z\right) - \left(1 + \left(x \cdot y + z\right)\right)\right)}^{3}}}\]
  5. Final simplification45.1

    \[\leadsto \sqrt[3]{{\left(\mathsf{fma}\left(x, y, z\right) - \left(1 + \left(x \cdot y + z\right)\right)\right)}^{3}}\]

Reproduce

herbie shell --seed 2019323 
(FPCore (x y z)
  :name "simple fma test"
  :precision binary64

  :herbie-target
  -1

  (- (fma x y z) (+ 1 (+ (* x y) z))))