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

Error

Bits error versus x

Bits error versus y

Bits error versus z

Target

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

Derivation

  1. Initial program 0.1

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

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

Runtime

Time bar (total: 27.9s) Debug log

Please include this information when filing a bug report:

herbie --seed '#(93631641 3924635752 3309067424 2373605777 3701578598 2935842251)'
(FPCore (x y z)
  :name "Linear.Quaternion:$c/ from linear-1.19.1.3, A"

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

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