Average Error: 45.2 → 45.1
Time: 7.2s
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 r74528 = x;
        double r74529 = y;
        double r74530 = z;
        double r74531 = fma(r74528, r74529, r74530);
        double r74532 = 1.0;
        double r74533 = r74528 * r74529;
        double r74534 = r74533 + r74530;
        double r74535 = r74532 + r74534;
        double r74536 = r74531 - r74535;
        return r74536;
}

double f(double x, double y, double z) {
        double r74537 = x;
        double r74538 = y;
        double r74539 = z;
        double r74540 = fma(r74537, r74538, r74539);
        double r74541 = 1.0;
        double r74542 = r74537 * r74538;
        double r74543 = r74542 + r74539;
        double r74544 = r74541 + r74543;
        double r74545 = r74540 - r74544;
        double r74546 = 3.0;
        double r74547 = pow(r74545, r74546);
        double r74548 = cbrt(r74547);
        return r74548;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Target

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

Derivation

  1. Initial program 45.2

    \[\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 2019322 
(FPCore (x y z)
  :name "simple fma test"
  :precision binary64

  :herbie-target
  -1

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