Average Error: 6.0 → 0.1
Time: 8.8s
Precision: 64
Internal precision: 128
\[x + \frac{y \cdot y}{z}\]
\[x + y \cdot \frac{y}{z}\]

Error

Bits error versus x

Bits error versus y

Bits error versus z

Target

Original6.0
Comparison0.1
Herbie0.1
\[ x + y \cdot \frac{y}{z} \]

Derivation

  1. Initial program 6.0

    \[x + \frac{y \cdot y}{z}\]
  2. Applied simplify 6.0

    \[\leadsto \color{blue}{x + \frac{{y}^2}{z}}\]
  3. Using strategy rm
  4. Applied square-mult 6.0

    \[\leadsto x + \frac{\color{blue}{y \cdot y}}{z}\]
  5. Applied associate-/l* 0.1

    \[\leadsto x + \color{blue}{\frac{y}{\frac{z}{y}}}\]
  6. Using strategy rm
  7. Applied div-inv 0.1

    \[\leadsto x + \color{blue}{y \cdot \frac{1}{\frac{z}{y}}}\]
  8. Applied simplify 0.1

    \[\leadsto x + y \cdot \color{blue}{\frac{y}{z}}\]
  9. Removed slow pow expressions

Runtime

Time bar (total: 8.8s) Debug log

Please include this information when filing a bug report:

herbie --seed '#(113102215 3347309390 675437584 1031887738 2771438033 3362420742)'
(FPCore (x y z)
  :name "Crypto.Random.Test:calculate from crypto-random-0.0.9"

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

  (+ x (/ (* y y) z)))