Average Error: 44.6 → 44.6
Time: 15.2s
Precision: 64
\[\mathsf{fma}\left(x, y, z\right) - \left(1 + \left(x \cdot y + z\right)\right)\]
\[\left(\sqrt[3]{\mathsf{fma}\left(x, y, z\right) - \left(1 + \left(x \cdot y + z\right)\right)} \cdot \sqrt[3]{\mathsf{fma}\left(x, y, z\right) - \left(1 + \left(x \cdot y + z\right)\right)}\right) \cdot \sqrt[3]{\mathsf{fma}\left(x, y, z\right) - \left(1 + \left(x \cdot y + z\right)\right)}\]
\mathsf{fma}\left(x, y, z\right) - \left(1 + \left(x \cdot y + z\right)\right)
\left(\sqrt[3]{\mathsf{fma}\left(x, y, z\right) - \left(1 + \left(x \cdot y + z\right)\right)} \cdot \sqrt[3]{\mathsf{fma}\left(x, y, z\right) - \left(1 + \left(x \cdot y + z\right)\right)}\right) \cdot \sqrt[3]{\mathsf{fma}\left(x, y, z\right) - \left(1 + \left(x \cdot y + z\right)\right)}
double f(double x, double y, double z) {
        double r45749 = x;
        double r45750 = y;
        double r45751 = z;
        double r45752 = fma(r45749, r45750, r45751);
        double r45753 = 1.0;
        double r45754 = r45749 * r45750;
        double r45755 = r45754 + r45751;
        double r45756 = r45753 + r45755;
        double r45757 = r45752 - r45756;
        return r45757;
}

double f(double x, double y, double z) {
        double r45758 = x;
        double r45759 = y;
        double r45760 = z;
        double r45761 = fma(r45758, r45759, r45760);
        double r45762 = 1.0;
        double r45763 = r45758 * r45759;
        double r45764 = r45763 + r45760;
        double r45765 = r45762 + r45764;
        double r45766 = r45761 - r45765;
        double r45767 = cbrt(r45766);
        double r45768 = r45767 * r45767;
        double r45769 = r45768 * r45767;
        return r45769;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Target

Original44.6
Target0
Herbie44.6
\[-1\]

Derivation

  1. Initial program 44.6

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

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

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

Reproduce

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

  :herbie-target
  -1.0

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