Average Error: 5.3 → 0.1
Time: 12.7s
Precision: 64
Internal precision: 128
\[x \cdot \left(1.0 + y \cdot y\right)\]
\[\left(x \cdot y\right) \cdot y + x \cdot 1.0\]

Error

Bits error versus x

Bits error versus y

Target

Original5.3
Comparison0.1
Herbie0.1
\[ x + \left(x \cdot y\right) \cdot y \]

Derivation

  1. Initial program 5.3

    \[x \cdot \left(1.0 + y \cdot y\right)\]
  2. Applied simplify 5.3

    \[\leadsto \color{blue}{x \cdot \left({y}^2 + 1.0\right)}\]
  3. Using strategy rm
  4. Applied distribute-lft-in 5.3

    \[\leadsto \color{blue}{x \cdot {y}^2 + x \cdot 1.0}\]
  5. Using strategy rm
  6. Applied square-mult 5.3

    \[\leadsto x \cdot \color{blue}{\left(y \cdot y\right)} + x \cdot 1.0\]
  7. Applied associate-*r* 0.1

    \[\leadsto \color{blue}{\left(x \cdot y\right) \cdot y} + x \cdot 1.0\]
  8. Removed slow pow expressions

Runtime

Time bar (total: 12.7s) Debug log

Please include this information when filing a bug report:

herbie --seed '#(3734708398 2977507609 710090672 2157009331 1219325995 4115902265)'
(FPCore (x y)
  :name "Numeric.Integration.TanhSinh:everywhere from integration-0.2.1"

  :target
  (+ x (* (* x y) y))

  (* x (+ 1.0 (* y y))))