Average Error: 44.9 → 7.9
Time: 40.3s
Precision: 64
Internal Precision: 2368
\[(x \cdot y + z)_* - \left(1 + \left(x \cdot y + z\right)\right)\]
\[\begin{array}{l} \mathbf{if}\;\sqrt[3]{{\left(-1 + \left(\left((x \cdot y + z)_* - x \cdot y\right) - z\right)\right)}^{3}} \le -1.0000000000000089:\\ \;\;\;\;\sqrt[3]{{\left(-1 - \left(y \cdot x + \left(z - (x \cdot y + z)_*\right)\right)\right)}^{3}}\\ \mathbf{if}\;\sqrt[3]{{\left(-1 + \left(\left((x \cdot y + z)_* - x \cdot y\right) - z\right)\right)}^{3}} \le -1.0:\\ \;\;\;\;\sqrt[3]{{\left(-1 + \left(\left((x \cdot y + z)_* - x \cdot y\right) - z\right)\right)}^{3}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt[3]{{\left(-1 - \left(y \cdot x + \left(z - (x \cdot y + z)_*\right)\right)\right)}^{3}}\\ \end{array}\]

Error

Bits error versus x

Bits error versus y

Bits error versus z

Target

Original44.9
Target0
Herbie7.9
\[-1\]

Derivation

  1. Split input into 2 regimes
  2. if (cbrt (pow (+ -1 (- (- (fma x y z) (* x y)) z)) 3)) < -1.0000000000000089 or -1.0 < (cbrt (pow (+ -1 (- (- (fma x y z) (* x y)) z)) 3))

    1. Initial program 62.5

      \[(x \cdot y + z)_* - \left(1 + \left(x \cdot y + z\right)\right)\]
    2. Using strategy rm
    3. Applied add-cbrt-cube62.5

      \[\leadsto \color{blue}{\sqrt[3]{\left(\left((x \cdot y + z)_* - \left(1 + \left(x \cdot y + z\right)\right)\right) \cdot \left((x \cdot y + z)_* - \left(1 + \left(x \cdot y + z\right)\right)\right)\right) \cdot \left((x \cdot y + z)_* - \left(1 + \left(x \cdot y + z\right)\right)\right)}}\]
    4. Applied simplify62.6

      \[\leadsto \sqrt[3]{\color{blue}{{\left(\left(-1 - y \cdot x\right) - \left(z - (x \cdot y + z)_*\right)\right)}^{3}}}\]
    5. Using strategy rm
    6. Applied associate--l-36.0

      \[\leadsto \sqrt[3]{{\color{blue}{\left(-1 - \left(y \cdot x + \left(z - (x \cdot y + z)_*\right)\right)\right)}}^{3}}\]

    if -1.0000000000000089 < (cbrt (pow (+ -1 (- (- (fma x y z) (* x y)) z)) 3)) < -1.0

    1. Initial program 40.0

      \[(x \cdot y + z)_* - \left(1 + \left(x \cdot y + z\right)\right)\]
    2. Using strategy rm
    3. Applied add-cbrt-cube40.0

      \[\leadsto \color{blue}{\sqrt[3]{\left(\left((x \cdot y + z)_* - \left(1 + \left(x \cdot y + z\right)\right)\right) \cdot \left((x \cdot y + z)_* - \left(1 + \left(x \cdot y + z\right)\right)\right)\right) \cdot \left((x \cdot y + z)_* - \left(1 + \left(x \cdot y + z\right)\right)\right)}}\]
    4. Applied simplify21.4

      \[\leadsto \sqrt[3]{\color{blue}{{\left(\left(-1 - y \cdot x\right) - \left(z - (x \cdot y + z)_*\right)\right)}^{3}}}\]
    5. Using strategy rm
    6. Applied sub-neg21.4

      \[\leadsto \sqrt[3]{{\left(\color{blue}{\left(-1 + \left(-y \cdot x\right)\right)} - \left(z - (x \cdot y + z)_*\right)\right)}^{3}}\]
    7. Applied associate--l+8.4

      \[\leadsto \sqrt[3]{{\color{blue}{\left(-1 + \left(\left(-y \cdot x\right) - \left(z - (x \cdot y + z)_*\right)\right)\right)}}^{3}}\]
    8. Applied simplify0.0

      \[\leadsto \sqrt[3]{{\left(-1 + \color{blue}{\left(\left((x \cdot y + z)_* - x \cdot y\right) - z\right)}\right)}^{3}}\]
  3. Recombined 2 regimes into one program.

Runtime

Time bar (total: 40.3s)Debug logProfile

herbie shell --seed '#(1071373924 2949776965 1885069702 3247780810 90874544 2263903749)' 
(FPCore (x y z)
  :name "simple fma test"

  :herbie-target
  -1

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