Average Error: 0.1 → 0.1
Time: 20.1s
Precision: 64
Internal precision: 128
\[x \cdot \left(y + z\right) + z \cdot 5.0\]
\[x \cdot y + z \cdot \left(x + 5.0\right)\]

Error

Bits error versus x

Bits error versus y

Bits error versus z

Target

Original0.1
Comparison0.1
Herbie0.1
\[ \left(x + 5.0\right) \cdot z + x \cdot y \]

Derivation

  1. Initial program 0.1

    \[x \cdot \left(y + z\right) + z \cdot 5.0\]
  2. Applied taylor 0.1

    \[\leadsto \left(x \cdot z + y \cdot x\right) + z \cdot 5.0\]
  3. Taylor expanded around 0 0.1

    \[\leadsto \color{blue}{\left(x \cdot z + y \cdot x\right)} + z \cdot 5.0\]
  4. Applied simplify 0.1

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

Runtime

Time bar (total: 20.1s) Debug log

Please include this information when filing a bug report:

herbie --seed '#(924602804 3567834016 73551012 3509964869 602342971 269543744)'
(FPCore (x y z)
  :name "Graphics.Rendering.Plot.Render.Plot.Legend:renderLegendOutside from plot-0.2.3.4, C"

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

  (+ (* x (+ y z)) (* z 5.0)))